RIP (Routing Information Protocol) It is an open standard, distance vector, classfull routing protocol. Rip version 2 supports classless. It sends the complete routing table out to all active interfaces every 30 seconds. Rip only uses hop count to determine the best way to a remote network, but it has a maximum allowable hop count of 15 by default, meaning that 16 is deemed unreachable. RIP works well in small networks, but it’s inefficient on large networks with slow WAN links or on networks with a large number of routers installed.
RIP version1, uses only classfull routing. This means that all devices in the network must use the same subne mask. This is because RIP version 1 doesn’t send updates with subnet mask information in tow.
RIP version 2, provides something called prefix routing, and does send subnet mask information with the route updates. This is called Classless Routing.
It broadcasts routing updates to its neighbor router using ip 255.255.255.255. Multicast Address- 224.0.0.9 It forward updates periodically and sends complete routing table to each active interface. Update timer is 30 sec. Invalid timer is 180 sec. Hold down timer is 180 sec. Flush timer is 240 sec. Metric – Hop count Max Hop count – 15 By default Max-path 4 (1 to 16) AD – 120 It performs automatic route summarization with default subnet mask. It doesn’t support manual summarization. It doesn’t support manual route summarization. It support equal cost load balancing. It use bellman-ford Algorithm It use UDP port number 520 RIP is an Application Layer Protocol. RIP Version 1 – Classfull, RIP Version 2 Classless RIP Version 1 doesn’t support Authentication but RIP Version 2 Supports MD5 authentication. The Network command tells the routing protocol which network to advertise.
Split-Horizon-
A method of preventing routing loops in distance-vector routing protocols by
prohibiting a router from advertising a route back onto the interface from which it was learned.
Route Poisoning-
Route poisoning is a method of preventing a network from sending packets
through a route that has become invalid. When the routing protocol detects an invalid route (such as
RIP (Routing Information Protocol) can be caused by a severed cable or the failure of a network node), all of the routers in the network are informed that the bad route has a hop count of 16, which stands for infinity. This makes all nodes on the invalid route appear infinitely distant, thereby preventing any of the routers from sending packets over the invalid route.
Updates- Updates are sent every 30 seconds by default to the address 224.0.0.9. Invalid Timer- Invalid timer means a timer which starts when a router didn’t receive an update about a route in a specified time.
Holddown- The timer for holddown will be activated when the route goes into an invalid state. This is set to 180 by default.
Flush- This timer is set to 240 seconds, when a route is 240 seconds old it is flushed from the routing table.
Differences between Rip v1 and Rip v2 Rip version1
Rip version2
Updates Broadcast Multicast (No) Classfull VLSM (NO) Manual summary (No) Authentication (No)
No Yes (224.0.0.9) Classless Yes Yes Yes
Example
Figure 1
RIP (Routing Information Protocol) Assign ip add on required interfaces Router (config) #host r1 r1 (config) #no ip domain look up r1 (config) #line con 0 r1 (config) #logg syn r1 (config) #exec-t 0 0 r1 (config) #int fa0/0 r1 (config-if) #ip add 10.1.1.1 255.255.255.0 r1 (config-if) #no shut r1 (config-if) #int s0/0 r1 (config-if) #ip add 192.168.1.1 255.255.255.0 r1 (config-if) #no shut Router (config) #host r2 r2 (config) #no ip domain look up r2 (config) #line con 0 r2 (config) #logg syn r2 (config) #exec-t 0 0 r2 (config) #int fa0/0 r2 (config-if) #ip add 20.1.1.1 255.255.255.0 r2 (config-if) #no shut r2 (config-if) #int s0/0 r2 (config-if) #ip add 192.168.1.2 255.255.255.0 r2 (config-if) #no shut r2 (config-if) #int s0/1 r2 (config-if) #ip add 192.168.2.1 255.255.255.0 r2 (config-if) #no shut
Router (config) #host r3 r3 (config) #no ip domain look up r3 (config) #line con 0 r3 (config) #logg syn r3 (config) #exec-t 0 0 r3 (config) #int fa0/0 r3 (config-if) #ip add 30.1.1.1 255.255.255.0 r3 (config-if) #no shut r3 (config-if) #int s0/0 r3 (config-if) #ip add 192.168.2.2 255.255.255.0 r3 (config-if) #no shut
RIP (Routing Information Protocol) Now here we will configure RIP Version 2 r1 (config) #router rip r1 (config-router) #version 2 r1 (config-router) #network 10.1.1.0 r1 (config-router) #network 192.168.1.0 r1 (config-router) #no auto summary r1 (config-router) #passive interface fa0/0 r2 (config) #router rip r2 (config-router) #version 2 r2 (config-router) #network 20.1.1.0 r2 (config-router) #network 192.168.1.0 r2 (config-router) #network 192.168.2.0 r2 (config-router) #no auto summary r2 (config-router) #passive interface fa0/0 r3 (config) #router rip r3 (config-router) #version 2 r3 (config-router) #network 30.1.1.0 r3 (config-router) #network 192.168.2.0 r3 (config-router) #no auto summary r3 (config-router) #passive interface fa0/0
To advertise all connected interfaces we use this command also Router (config) #router rip Router (config-router) Network 0.0.0.0
To check all the route Router#show ip route
To check the internal rip events Router#debug ip rip
To turn off this command Router#undebug all
RIP (Routing Information Protocol) To stop automatic Summarization Router (config) #router rip Router (config-router) #no auto summary
To check the RIP Timers Router#show ip protocols
To stop update on LAN Router (config) #router rip Router (config-router) #passive interface fa0/0
To clear the ip route Router#clear ip route *
To check the load balancing (To discover the path of a packet) Router#Traceroute 192.168.1.1
To change the Rip Timers Router (config) #router rip Router (config-router) # timers basic 10 10 10 10 (Timers basic update invalid hold flush)
To change the maximum path value Router (config) # router rip Router (config-router) #maximum path 10
To change the AD value Router (config) # router rip Router (config-router) #distance 100
IP Rip authentication We will run this command on each routers serial interface one which we want to implement authentication.
RIP (Routing Information Protocol) Router (config) #key chain Mani Router (config-keychain) #key? <0-2147483647> key identifier Router (config-keychain) #key 5 Router (config-keychain-key) #key-string cisco Remember that, Key number and key string must match on both routers. But we can use key chain name different. Now we will implement this authentication on the serial interface. Router (config) #int s0/0 Router (config-if) #Ip rip authentication mode md5 Router (config-if) #ip rip authentication key-chain Mani
Mannual route summarization We will create some loopback on first router r1 (config) # int loo 1 r1 (config-if) # ip add 10.1.1.1 255.255.255.0 r1 (config-if) # int loo 2 r1 (config-if) # ip add 10.1.2.1 255.255.255.0 r1 (config-if) # int loo 3 r1 (config-if) # ip add 10.1.3.1 255.255.255.0 r1 (config-if) # int loo 4 r1 (config-if) # ip add 10.1.4.1 255.255.255.0 r1 (config-if) # int loo 5 r1 (config-if) #ip add 10.1.5.1 255.255.255.0
Now here we will advertise all the routes via this command r1 (config-router) # network 0.0.0.0 This command would advertise all the loopback interfaces to another router. We will create some loopback on second router r2 (config) # int loo 1 r2 (config-if) # ip add 20.1.1.1 255.255.255.0 r2 (config-if) # int loo 2 r2 (config-if) # ip add 20.1.2.1 255.255.255.0 r2 (config-if) # int loo 3 r2 (config-if) # ip add 20.1.3.1 255.255.255.0 r2 (config-if) # int loo 4
RIP (Routing Information Protocol) r2 (config-if) # ip add 20.1.4.1 255.255.255.0 r2 (config-if) # int loo 5 r2 (config-if) # ip add 20.1.5.1 255.255.255.0
Now here we will advertise all the routes via this command r2 (config-router) # network 0.0.0.0 This command would advertise all the loopback interfaces to another router We will create some loopback on third router r3 (config) # int loo 1 r3 (config-if) # ip add 30.1.1.1 255.255.255.0 r3 (config-if) # int loo 2 r3 (config-if) # ip add 30.1.2.1 255.255.255.0 r3 (config-if) # int loo 3 r3 (config-if) # ip add 30.1.3.1 255.255.255.0 r3 (config-if) #int loo 4 r3 (config-if) # ip add 30.1.4.1 255.255.255.0 r3 (config-if) # int loo 5 r3 (config-if) # ip add 30.1.5.1 255.255.255.0
Now here we will advertise all the routes via this command r3 (config-router) #network 0.0.0.0 This command would advertise all the loopback interfaces to another router. Now here, once we advertise all the routes then routing table become larger. It would use more processor and memory of router.
To reduce the load of router here we will create manual route summarization r1 (config) #int s0/0 r1 (config-if) #ip summary-address rip 10.1.0.0 255.255.248.0 r1 (config) #int s0/1 r1 (config-if) #ip summary-address rip 10.1.0.0 255.255.248.0
Now we can check the routes of r1 on another router r2#clear ip route* r2#sh ip route