How To Configure RIP Routing For Cisco IOS? – POFTUT

How To Configure RIP Routing For Cisco IOS?


Hi, today we will look for some networking stuff. Up to now, I have not written any routing-related technical post. In this article, I am gonna show you some simple dynamic routing with RIP protocol. Routing is divided into two part which one is static. In static routing, routes are configured in the router by typing every detail of the route and all things configured are used in routing. But in dynamic routing, we configure the general rules and then let the network generate specific rules according to the config.

For example, if you need to statically route A, B, C  networks through D network you should write separate route all of the three networks in each router. But in dynamic routing, you should only write three route in one router. Other routers get theses routes with dynamic routing protocols. Now let start typing commands.

Set Static IP Addresses For Interfaces

First, we need to configure the IP address of the interfaces that play in routing.

R1#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#interface ethernet 0/0
R1(config-if)#ip address 10.1.0.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit

R2#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#interface ethernet 0/1
R2(config-if)#ip address 10.2.0.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit

R3#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#interface ethernet 0/0
R3(config-if)#ip add 10.1.0.2 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit

R3#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.

R3(config)#interface ethernet 0/1
R3(config-if)#ip address 10.2.0.1 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit

Check Connectivity

Now we should check the L3 connectivity. One direction check is enough

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

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

Enable RIP Routing Service

Now we can start describing networks for routing. With network command, we specify network that will be used for rip routing. There are two main effects of this command. First, we specify that this network will be used for rip routing which means this network address will be learned by other routers. Second the interface this network belongs to start to rip communication like sending and receiving rip packets. Auto-summary command makes routing classfull which is generally not used today so we disable it with no auto-summary command. If you have problem with rip routing look first this auto-summary option.

R1(config)#router rip 
R1(config-router)#network 10.1.0.0
R1(config-router)#no auto-summary 
R1(config-router)#exit

Troubleshoot RIP Protocol

To see that rip protocol works we can debug rip packets with debug IP route command. We see that rip is sending packets but not receiving yet because we didn’t configure other routers.

R1#debug ip rip 
RIP protocol debugging is on
R1#
*Oct 11 04:05:58.871: RIP: sending v1 update to 255.255.255.255 via Ethernet0/0 (10.1.0.1)
*Oct 11 04:05:58.871: RIP: build update entries - suppressing null update

Configure RIP On Interface

Now it is time to configure R3. so we can set neighbor-ship with R1 and see the RIP in work. As you can see after describing network R3 created neighbor-ship with R1

R3(config)#router rip 
R3(config-router)#network 10.1.0.0
*Oct 11 04:08:25.865: RIP: sending request on Ethernet0/0 to 255.255.255.255
*Oct 11 04:08:25.865: RIP: sending request on Ethernet0/1 to 255.255.255.255
R3(config-router)#no auto-summary
*Oct 11 04:08:27.863: RIP: sending v1 flash update to 255.255.255.255 via Ethernet0/0 (10.1.0.2)
*Oct 11 04:08:27.864: RIP: build flash update entries
*Oct 11 04:08:27.864: subnet 10.2.0.0 metric 1
*Oct 11 04:08:27.864: RIP: sending v1 flash update to 255.255.255.255 via Ethernet0/1 (10.2.0.1)
*Oct 11 04:08:27.864: RIP: build flash update entries
*Oct 11 04:08:27.864: subnet 10.1.0.0 metric 1
R3(config-router)#exit

Print/List RIP Configuration and Information

If you look to rip database and routing table you will see a new route is added. The new route id sends from R3 to R1. The new route is the et0/1 interface and network of R3. Then we ping to the IP of the new route. sh ip rip database command shows rip database. show ip route command shows routing table.

R1#sh ip rip database 
10.0.0.0/8 auto-summary
10.1.0.0/24 directly connected, Ethernet0/0
10.2.0.0/24
[1] via 10.1.0.2, 00:00:18, Ethernet0/0

R1#show ip route 
Codes: L - local, 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, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks
C 10.1.0.0/24 is directly connected, Ethernet0/0
L 10.1.0.1/32 is directly connected, Ethernet0/0
R 10.2.0.0/24 [120/1] via 10.1.0.2, 00:00:24, Ethernet0/0

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

LEARN MORE  Router vs Modem What Is Different and What Is The Same?

Leave a Comment