What is RIP?
- RIP is a distance vector routing protocol.
- RIP is a Classful routing protocol.
- RIP uses hop count as its only metric for path selection.
- RIP have administrative Distance is 120
- Advertised routes with hop counts greater than 15 are unreachable.
- Messages are broadcast every 30 seconds.
|
Routing Protocols |
RIP Message
The data portion of a RIP message is encapsulated into a UDP segment, with both source and destination port numbers set to 520. The IP header and data link headers add broadcast destination addresses before the message is sent out to all RIP configured interfaces.
|
RIP Message structure |
RIP is Classful routing protocol
RIPv1 does not send subnet mask information in the update. Therefore, a router either uses the subnet mask configured on a local interface, or applies the default subnet mask based on the address class. Due to this limitation, RIPv1 networks cannot be discontiguous nor can they implement VLSM
|
IP classes |
RIPv1 configuration
Syntax:
Router#router rip
Router(config-router)#network directly-connected-classful-network-address
Example:
R1(config-router)#network 192.168.1.0
R1(config-router)#network 192.168.2.0
R1(config-router)#network 192.168.3.0
LAB
|
RIP lab topology |
IP address table:
Task 1: Configure IP address for each devices
Router R1:
R1>enable
R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip address 172.30.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface serial 1/0
R1(config-if)#ip ad
R1(config-if)#ip address 172.30.2.1 255.255.255.0
R1(config-if)#clock rate 64000
R1(config-if)#no shutdown
R1(config-if)#
Router R2:
R2>enable
R2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#interface f0/0
R2(config-if)#ip address 172.30.3.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface serial 1/0
R2(config-if)#ip address 172.30.2.2 255.255.255.0
R2(config-if)#clock rate 64000
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface serial 1/1
R2(config-if)#ip address 192.168.4.9 255.255.255.252
R2(config-if)#clock rate 64000
R2(config-if)#no shutdown
Router R3:
R3>enable
R3#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#interface s
R3(config)#interface serial 1/0
R3(config-if)#ip address 192.168.4.10 255.255.255.252
R3(config-if)#clock rate 64000
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface fastEthernet 0/0
R3(config-if)#ip address 192.168.5.1 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#
PC1:
PC1> ip 172.30.1.10 255.255.255.0 172.30.1.1
Checking for duplicate address...
PC1 : 172.30.1.10 255.255.255.0 gateway 172.30.1.1
PC2:
PC2> ip 172.30.3.10 255.255.255.0 172.30.3.1
Checking for duplicate address...
PC1 : 172.30.3.10 255.255.255.0 gateway 172.30.3.1
PC3:
PC3> ip 192.168.5.10 255.255.255.0 192.168.5.1
Checking for duplicate address...
PC1 : 192.168.5.10 255.255.255.0 gateway 192.168.5.1
Task 2: Configure RIPv1 in each router
Router 1:
R1>enable
R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#router rip
R1(config-router)#network 172.30.0.0
Notice that only a single network statement is needed for R1. This statement includes both interfaces on different subnets of the 172.30.0.0 major network.
One things, s
ending updates out f0/0 interface wastes the bandwidth and processing resources of all devices on the LAN. So we should prevent send out Rip update via f0/0 use command "passive-interface fastEthernet 0/0"
R1(config-router)#passive-interface fastEthernet 0/0
Router 2:
R2>enable
R2#configure terminal
R2(config)#router rip
R2(config-router)#network 172.30.0.0
R2(config-router)#network 192.168.4.0
R2(config-router)#passive-interface fastEthernet 0/0
Router 3:
R3>enable
R3#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#router rip
R3(config-router)#network 192.168.4.0
R3(config-router)#network 192.168.5.0
R3(config-router)#passive-interface fastEthernet 0/0
Task 3: Verify RIP
Step 1: Use the show ip route command to verify that each router has all of the networks in the topology in the routing table.
In Router R1:
R1#show 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
172.30.0.0/24 is subnetted, 3 subnets
C 172.30.2.0 is directly connected, Serial1/0
R 172.30.3.0 [120/1] via 172.30.2.2, 00:00:07, Serial1/0
C 172.30.1.0 is directly connected, FastEthernet0/0
R 192.168.4.0/24 [120/1] via 172.30.2.2, 00:00:07, Serial1/0
R 192.168.5.0/24 [120/1] via 172.30.2.2, 00:00:07, Serial1/0
In router R2
R2#show 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
172.30.0.0/24 is subnetted, 3 subnets
C 172.30.2.0 is directly connected, Serial1/0
C 172.30.3.0 is directly connected, FastEthernet0/0
R 172.30.1.0 [120/1] via 172.30.2.1, 00:00:08, Serial1/0
192.168.4.0/30 is subnetted, 1 subnets
C 192.168.4.8 is directly connected, Serial1/1
R 192.168.5.0/24 [120/1] via 192.168.4.10, 00:00:14, Serial1/1
And Router R3:
R3#show 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
R 172.30.0.0/16 [120/1] via 192.168.4.9, 00:00:09, Serial1/0
192.168.4.0/30 is subnetted, 1 subnets
C 192.168.4.8 is directly connected, Serial1/0
C 192.168.5.0/24 is directly connected, FastEthernet0/0
Step 2: Verify that all necessary interface are active
To view necessary port are active, we use command "Show ip protocol"
R1#show ip protocols
Routing Protocol is "rip"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Sending updates every 30 seconds, next due in 23 seconds
Invalid after 180 seconds, hold down 180, flushed after 240
Redistributing: rip
Default version control: send version 1, receive any version
Interface Send Recv Triggered RIP Key-chain
Serial1/0 1 1 2
Automatic network summarization is in effect
Maximum path: 4
Routing for Networks:
172.30.0.0
Passive Interface(s):
FastEthernet0/0
Routing Information Sources:
Gateway Distance Last Update
172.30.2.2 120 00:00:19
Distance: (default is 120)
Step 3: View RIP message send and receive
To view sending and receiving RIP message, we need to turn on debug mode in each router. Note, turn debug on will wastes the bandwidth and processing resources of all devices
R1#debug ip rip
RIP protocol debugging is on
R1#
*Jan 28 17:34:20.559: RIP: sending v1 update to 255.255.255.255 via Serial1/0 (172.30.2.1)
*Jan 28 17:34:20.559: RIP: build update entries
*Jan 28 17:34:20.559: subnet 172.30.1.0 metric 1
R1#
*Jan 28 17:34:21.627: RIP: received v1 update from 172.30.2.2 on Serial1/0
*Jan 28 17:34:21.627: 172.30.3.0 in 1 hops
*Jan 28 17:34:21.631: 192.168.4.0 in 1 hops
*Jan 28
To turn debug mode, we use command "undebug all"
R1#undebug all
All possible debugging has been turned off
I hope this post will help you understand well RIPv1. Next lab i will show you how to configure RIPv1 in Stub network. See you soon.