Posts Tagged ‘routing’

RIP, a distance-vector routing protocol, works well in small networks. It sends the complete routing table to all active interfaces every 30 seconds. RIP uses hop count as its routing metric to determine the best path to in a network and has a maximum hop count of 15. It has an Administrative Distance of 20 while Static Routes has an AD of 1.

Three versions of RIP are:
RIPv1 uses classful routing, lacks support for Variable Length Subnet Masks (VLSM).
RIPv2 uses classless routing, supports Classless Inter-Domain Routing (CIDR).
RIPng an extension of RIPv2 for support of IPv6.


Configuration

1. Configure each of the router’s interfaces.

2. Configure RIP as the network’s routing protocol and add all network to be advertised.

R1(config)#router rip
R1(config-router)#network 192.168.10.0
R1(config-router)#network 192.168.10.100


R2(config)#router rip
R2(config-router)#network 192.168.100.0
R2(config-router)#network 192.168.200.0
R2(config-router)#network 192.168.20.0


R3(config)#router rip
R3(config-router)#net 192.168.200.0
R3(config-router)#net 192.168.30.0

3. Use passive-interface command to prevent RIP update broadcsts from being sent out a defined interface. The same interface can still receive RIP updates. (optional)

R1(config)#router rip
R3(config-router)#passive-interface serial 0/0

4. verify connection and routing configuration.

Ping Samples:

R1#ping 192.168.30.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.30.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/64/100 ms


R2#ping 192.168.10.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.10.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/16/36 ms

R2#ping 192.168.30.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.30.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/43/64 ms


R3#ping 192.168.10.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.10.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/64/68 ms

Routes:


R1#sh ip route
R    192.168.30.0/24 [120/1] via 192.168.100.2, 00:00:23, Serial0/0
C    192.168.10.0/24 is directly connected, FastEthernet0/0
R    192.168.200.0/24 [120/1] via 192.168.100.2, 00:00:23, Serial0/0
R    192.168.20.0/24 [120/1] via 192.168.100.2, 00:00:23, Serial0/0
C    192.168.100.0/24 is directly connected, Serial0/0


R2#sh ip route
R    192.168.30.0/24 [120/1] via 192.168.200.2, 00:00:23, Serial0/1
R    192.168.10.0/24 [120/1] via 192.168.100.1, 00:00:21, Serial0/0
C    192.168.200.0/24 is directly connected, Serial0/1
C    192.168.20.0/24 is directly connected, FastEthernet0/0
C    192.168.100.0/24 is directly connected, Serial0/0


R3#sh ip route
C    192.168.30.0/24 is directly connected, FastEthernet0/0
R    192.168.10.0/24 [120/1] via 192.168.200.1, 00:00:10, Serial0/0
C    192.168.200.0/24 is directly connected, Serial0/0
R    192.168.20.0/24 [120/1] via 192.168.200.1, 00:00:10, Serial0/0
R    192.168.100.0/24 [120/1] via 192.168.200.1, 00:00:10, Serial0/0

Static routing is a data communication concept describing one way of configuring path selection of routers in computer networks [Wikipedia]. Static Routing is achieved by manually adding routes in each router’s routing table. It is commonly used by Network Administrators preferably on small-scale networks.

To create a static route, use the following syntax:
ip route destination_network network_mask next-hop_address_or_exit_interface [administrative_distance] [permanent]

Here’s a quick tutorial on how to manually add routes to a router’s routing table. Let’s say, we want to connect two different networks through static routing: network 10.10.10.0 and network 10.10.20.0.

1. Configure each of the router’s interfaces.

R1(config)#int s0/0
R1(config-if)#ip add 10.10.10.1 255.255.255.0
R1(config-if)#no sh

R2(config)#int s0/0
R2(config-if)#ip add 10.10.10.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#clock rate 56000
R2(config)#int s0/1
R2(config-if)#ip add 10.10.20.1 255.255.255.0
R2(config-if)#no sh

R3(config)#int s0/0
R3(config-if)#ip add 10.10.20.2 255.255.255.0
R3(config-if)#no sh
R3(config-if)#clock rate 56000

2. Configure static routing on each router.

R1(config)#ip route 10.10.20.0 255.255.255.0 10.10.10.2
R3(config)#ip route 10.10.10.0 255.255.255.0 10.10.20.1

No static routing configuration is needed on R2 since it is connected in both networks.

3. Verify the configuration

R1#ping 10.10.20.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.20.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 64/65/68 ms

R3#ping 10.10.10.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.10.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/56/64 ms

R1#show ip route
     10.0.0.0/24 is subnetted, 2 subnets
C       10.10.10.0 is directly connected, Serial0/0
S       10.10.20.0 [1/0] via 10.10.10.2

R3#show ip route
     10.0.0.0/24 is subnetted, 2 subnets
S       10.10.10.0 [1/0] via 10.10.20.1
C       10.10.20.0 is directly connected, Serial0/0