Tag Archives: Routing

Lab Practice – Routing

So now that we have our switching working, lets get the router up and running, get our addressing scheme defined and figure out what else we need to do to get this show on the road.

sw5Lets assume that:

  • our ISP gave us 1 IP address
  • All hosts require access to the internet
  • We have been asked to create a subnet scheme that allows for expansion.

Our IP address is 172.12.123.2 /24
(You may recognize this from my frame relay lab)

Our local addressing scheme is:

  • 192.168.10.0 255.255.255.0

This needs to be split into subnets, so lets take a look at that. We have 5 VLANs and that can translate into 5 subnets. Five is not a great binary number so lets make that 8 subnets, which would give us 30 hosts per subnet.

128 63 32 16 8 4 2 1
 1  1  1  0  0 0 0 0 - subnets (8)
 0  0  0  1  1 1 1 1 - hosts (32)

Subnet mask = 224
# hosts per subnet = 32 - 2 = 30

Remember that we can’t use the all 0’s and all 1’s host addresses as these are the network address and broadcast addresses.

So this gives us the following address scheme:

1.  192.168.10.0   - 192.168.10.31      Finance
2.  192.168.10.32  - 192.168.10.63      HR
3.  192.168.10.64  - 192.168.10.95      Sales
4.  192.168.10.96  - 192.168.10.127     R&D
5.  192.168.10.128 - 192.168.10.159     IT
6.  192.168.10.160 - 192.168.10.191     not used
7.  192.168.10.192 - 192.168.10.223     not used
8.  192.168.10.224 - 192.168.10.255     not used
 with a subnet mask of 255.255.255.224

… and lets assign these to the subnet groups defined by our VLANs.

The Router

I have a Cisco 1760 with the serial port connected to the frame relay network, and the Fast Ethernet port connected to our LAN.

So we need to do the following:

  • Implement our addressing scheme
  • Implement routing
  • control access though ACLs
  • Implement NAT and PAT for host access to the internet

Implementing the addressing Scheme

So lets bring our VLANs to the router via a logically segmented fast ethernet port.

!
interface FastEthernet0/0
 no ip address
 speed auto
!
interface FastEthernet0/0.1
 encapsulation dot1Q 10
 ip address 192.168.10.1 255.255.255.224
 no snmp trap link-status
!
interface FastEthernet0/0.2
 encapsulation dot1Q 20
 ip address 192.168.10.33 255.255.255.224
 no snmp trap link-status
!
interface FastEthernet0/0.3
 encapsulation dot1Q 30
 ip address 192.168.10.65 255.255.255.224
 no snmp trap link-status
!
interface FastEthernet0/0.4
 encapsulation dot1Q 40
 ip address 192.168.10.97 255.255.255.224
 no snmp trap link-status
!
interface FastEthernet0/0.5
 encapsulation dot1Q 50
 ip address 192.168.10.129 255.255.255.224
 no snmp trap link-status

and then set up our default gateway:

ip default-network 172.12.123.2

Routing

At this point, it looks like no routing protocols are required. A quick look at show ip route, shows that all of our nets and subnets are direct connections.

r2#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
 D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
 N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
 E1 - OSPF external type 1, E2 - OSPF external type 2
 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
 ia - IS-IS inter area, * - candidate default, U - per-user static route
 o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
192.168.10.0/27 is subnetted, 5 subnets
C 192.168.10.96 is directly connected, FastEthernet0/0.4
C 192.168.10.64 is directly connected, FastEthernet0/0.3
C 192.168.10.32 is directly connected, FastEthernet0/0.2
C 192.168.10.0 is directly connected, FastEthernet0/0.1
C 192.168.10.128 is directly connected, FastEthernet0/0.5
172.12.0.0/16 is variably subnetted, 2 subnets, 2 masks
S 172.12.0.0/16 [1/0] via 172.12.123.2
C 172.12.123.0/24 is directly connected, Serial1/0

Now if I fire up router three and use its ethernet port as a host, lets see if we can ping around:

vlan switch    port ip
 10  3550     1- 6  192.168.10.2   
 20  3550    13-18  192.168.10.34  
 30  2950-12  4- 8  192.168.10.67  
 40  3550     9-12  192.168.10.98  
 50  2950-24  9-16  192.168.10.131

… and yes, i can ping out onto the network to other routers on the frame relay network.

Network Access

Now we need to set up network access. Given that we only have one routable IP address, we have to use port address translation.

So we need to define:

  • inside address(es)
  • Outside address
  • inside source list

… and we do this as follows:

  • Add ip nat inside to each sub interface
  • Add ip nat outside to the serial interface

and here is our source list:

r2(config)#access-list 1 permit 192.168.10.0 0.0.0.255 
r2(config)#^Z

This is list 1, and we are selecting all of the hosts from the network 192.128.20 (our inside addresses) with the wildcard mask of 0.0.0.255.

As we only have the one routable address, the NAT command is pretty simple because there is no pool option, we just specify the interface to use:

r2(config)#ip nat inside source list 1 interface serial1/0 overload

… and the key word here is overload. that should be it

 

 

Tweet about this on TwitterShare on Google+Share on LinkedInShare on FacebookShare on RedditShare on StumbleUponEmail this to someone

Route Summarization

In this post we look at how and why we summarize routes. Lets start with the why.

Route summarization is a tool we can use to streamline our routing tables. We know that a concise routing table helps the router to process packets efficiently and use less router resource. This also helps with router updates especially with RIP where the entire routing table is sent out. If we can summarize the table, we can reduce the amount of processing and packet overhead.

The one caveat is that we have to be careful about where we summarize. Get it right, and we have a nice and efficient routing structure, get it wrong and we have a horrible mess. with missing routes, bad routes etc.

Essentially this is just more binary math for us.

So how do we do this?

We take our pool of IP addresses, and we break them down into binary:

100.4.0.0     01100100  00000100
100.5.0.0     01100100  00000101
100.6.0.0     01100100  00000110
100.7.0.0     01100100  00000111
              11111111  11111100  - summary mask

So this gives us 100.4.0.0  255.252.0.0  or /14 – the summary mask is a 1 where we have all the bits in common. Simple yes?

OK, lets do a real example with RIP:
I have two routers, R1 and R3 (from my frame relay lab) and on R1 I have 4 loopbacks that i want to advertise to R3. The loopbacks are:

interface Loopback8
 ip address 172.16.8.1 255.255.255.0
!
interface Loopback9
 ip address 172.16.9.1 255.255.255.0
!
interface Loopback10
 ip address 172.16.10.1 255.255.255.0
!
interface Loopback11
 ip address 172.16.11.1 255.255.255.0

We can summarize these as follows:

172.16.8.1       10101100.00010000.00001000
172.16.9.1       10101100.00010000.00001001
172.16.10.1      10101100.00010000.00001010
172.16.11.1      10101100.00010000.00001011

                 11111111.11111111.11111100 - summary mask (/22)

So the result of summarizing this is: 172.16.8.0 255.255.252.0

Implement this is simple, all we need to do is:

(config-if)# ip summary-address rip 172.16.8.0 255.255.252.0

Notice that this is done on an interface basis. Follow this with a clear ip route * command, to get the router table rebuilt, and you are good to go.

 

 

 

Tweet about this on TwitterShare on Google+Share on LinkedInShare on FacebookShare on RedditShare on StumbleUponEmail this to someone

Routing Summary

So we have looked at static and dynamic routing and have seen how each can be used. Now its time to review what we have learned and where we apply it.

routing

So when do we use these differing routing technologies?

That’s a great question, after all you can’t use them all at once right?
Well, yes you can. In a small LAN like a home or small office network you may just have nothing more than a default route which is essentially a single static route. Maybe if there are a couple of servers involved you might have two or three static routes.

Once the complexity goes up a little, perhaps RIPv2 will do the job if you aren’t too worried about overhead, but once you get into the larger LANs and smaller WANs, you might start looking at OSPF or EIGRP.

When you start looking at a medium sized central office LAN, with some remote LANs at satellite offices, then you are looking at a mix of static, and dynamic routing – perhaps OSPF in your main office LAN with RIP on the smaller LANs.

There are any number of scenarios where multiple routing schemes may be used, especially in a mixed vendor environment. For the CCNA we had better know RIPv2, OSPF and EIGRP.

OSPF

  • Supports VLSM
  • Multivendor support
  • Allows hierachical design
  • >45-50 routers is recommended

EIGRP

  • proprietary to Cisco
  • Supports VLSM & CIDR

 

Tweet about this on TwitterShare on Google+Share on LinkedInShare on FacebookShare on RedditShare on StumbleUponEmail this to someone

Even More Routing – Part 4 – EIGRP

route6This post also applies to OSPF as well. What we are going to look at is auto-summarization. By default it is normally on and for the CCNA studies and the networks we are working with, this is undesirable.

So what is summarization? It is a process where the network routes are summarized when those routes are sent across a network boundary.

We will illustrate this in a quick lab, as follows:

We have some loopbacks on router 2 and 3, that are part of the same network, but have been subnetted. We are going to implement EIGRP routing with the auto summarization left on.

And this is what we get at router 1:

D 20.0.0.0/8 [90/2297856] via 172.12.123.3, 00:00:48, Serial0/1
             [90/2297856] via 172.12.123.2, 00:00:48, Serial0/1
 172.12.0.0/24 is subnetted, 1 subnets
C 172.12.123.0 is directly connected, Serial0/1

Routers 2 and 3 have summerized their routes when sending them to router 1. Router 1 THINKS it has two routes to the network, however, when we ping the network we get a small disaster:

r2610xm#ping 20.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 20.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/33/37 ms
r2610xm#ping 20.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 20.2.2.2, timeout is 2 seconds:
U.U.U
Success rate is 0 percent (0/5)
r2610xm#ping 20.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 20.3.3.3, timeout is 2 seconds:
U.U.U
Success rate is 0 percent (0/5)
r2610xm#ping 20.4.4.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 20.4.4.4, timeout is 2 seconds:
U.U.U
Success rate is 0 percent (0/5)

To fix that we would add no auto-summary on routers 2 and 3, and that would solve the problem at router1.

r2610xm#sh ip route
20.0.0.0/16 is subnetted, 4 subnets
D  20.4.0.0 [90/2297856] via 172.12.123.3, 00:01:05, Serial0/1
D  20.1.0.0 [90/2297856] via 172.12.123.2, 00:01:55, Serial0/1
D  20.2.0.0 [90/2297856] via 172.12.123.2, 00:01:55, Serial0/1
D  20.3.0.0 [90/2297856] via 172.12.123.3, 00:01:05, Serial0/1
 172.12.0.0/24 is subnetted, 1 subnets
C  172.12.123.0 is directly connected, Serial0/1

And there is the problem solved!

Maximum Path

This is the command that specifies how many routes we can run load balancing over. Default is 4.

If you set it to 1, you are disabling load balancing.

The Topology Table.

Lets take a quick look at the topology table.

r2610xm#sh ip eigrp topology
IP-EIGRP Topology Table for AS(100)/ID(172.12.123.1)

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
 r - reply Status, s - sia Status

P  20.4.0.0/16, 1 successors, FD is 2297856
          via 172.12.123.3 (2297856/128256), Serial0/1
P  20.1.0.0/16, 1 successors, FD is 2297856
          via 172.12.123.2 (2297856/128256), Serial0/1
P  20.2.0.0/16, 1 successors, FD is 2297856
          via 172.12.123.2 (2297856/128256), Serial0/1
P  20.3.0.0/16, 1 successors, FD is 2297856
          via 172.12.123.3 (2297856/128256), Serial0/1
P  172.12.123.0/24, 1 successors, FD is 2169856
          via Connected, Serial0/1

There is that letter P, for passive. So what does that mean and wouldn’t active be better? It sounds better!

Well no and here is why. This goes back to the short paragraph on DUAL Query. If the router needs to find a route, that route will go active while the dual query is in effect. Once a route has been established or not found and removed, it will go back to passive.

And that pretty much concludes routing.

Tweet about this on TwitterShare on Google+Share on LinkedInShare on FacebookShare on RedditShare on StumbleUponEmail this to someone

Even More Routing – Part 3 – EIGRP

So we have successfully run our lab, but lets take a look at a couple of other facets of EIGRP.

The Topology Table

Running the command sh ip eigrp top, give us the topology table.

r2610xm#sh ip eigrp topology

IP-EIGRP Topology Table for AS(100)/ID(172.12.123.1)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
 r - reply Status, s - sia Status

P 3.3.3.3/32, 1 successors, FD is 2297856
     via 172.12.123.3 (2297856/128256), Serial0/1
     via 172.12.123.2 (2300416/156160), Serial0/1
P 2.2.2.2/32, 1 successors, FD is 2297856
     via 172.12.123.2 (2297856/128256), Serial0/1
     via 172.12.123.3 (2300416/156160), Serial0/1
P 1.1.1.1/32, 1 successors, FD is 128256
     via Connected, Loopback0
P 172.23.23.0/24, 2 successors, FD is 2172416
     via 172.12.123.2 (2172416/28160), Serial0/1
     via 172.12.123.3 (2172416/28160), Serial0/1
P 172.12.123.0/24, 1 successors, FD is 2169856
     via Connected, Serial0/1

Notice the two successors indicated for the Ethernet segment?
Notice also there are two successors listed for the loopback 3.3.3.3 and 2.2.2.2, BUT only one successor is indicated. This is because of the metrics – one is a little higher than the other one.

Now when we look at the metrics for the route to 3.3.3.3, they are pretty close. (229xxxx vs 230xxxx) We could use both of these paths but we can’t use equal cost load balancing. What we can do is unequal cost load balancing, and this is achieved through the variance command.

The Variance Command

This is a multiplier. What it essentially says is that if we take the value of the successor route metric, and multiply it by the variance, any feasible successor route with a value less than the metric x variance value will also go into the routing table.
It sounds complex but really it is pretty simple. Here is a very basic example:

Successor Route Metric:                150
Feasible Successor Route Metric : 250

With a variance of 2, the multiplied value is 300 so the feasible successor can be added to the routing table.

The problem with this is that if you make the variance too high, you can end up including routes that should never be in the routing table so we have to use the variance with care.

The command syntax is:

router eigrp 100
variance 2

and here is on the live equipment:

r2610xm(config)#router eigrp 100
r2610xm(config-router)#variance ?
 <1-128> Metric variance multiplier
r2610xm(config-router)#variance 2
r2610xm(config-router)#^Z
r2610xm#conf t
*Feb 16 09:56:02.591: %SYS-5-CONFIG_I: Configured from console by console
r2610xm#sh ip route eigrp
2.0.0.0/32 is subnetted, 1 subnets
D 2.2.2.2 [90/2300416] via 172.12.123.3, 00:00:20, Serial0/1
          [90/2297856] via 172.12.123.2, 00:00:20, Serial0/1
3.0.0.0/32 is subnetted, 1 subnets
D 3.3.3.3 [90/2297856] via 172.12.123.3, 00:00:20, Serial0/1
          [90/2300416] via 172.12.123.2, 00:00:20, Serial0/1
172.23.0.0/24 is subnetted, 1 subnets
D 172.23.23.0 [90/2172416] via 172.12.123.3, 00:00:20, Serial0/1
              [90/2172416] via 172.12.123.2, 00:00:20, Serial0/1

You can clearly see the extra routes added to the routing table for 2.2.2.2 and 3.3.3.3 because the variance command is global, not per route.

 

 

 

Tweet about this on TwitterShare on Google+Share on LinkedInShare on FacebookShare on RedditShare on StumbleUponEmail this to someone