Good old RIP! The oldest distance vector routing protocol which exists here since early 1969
So what is the magic? And why we are going to keep using this old routing protocol?
The answer is very simple – simplicity and wide spread usage.
RIP is very simple routing protocol, which doesn't require complex routing calculations, large database or even the craving for memory unlike his more sophisticated brothers (EIGRP, OSPF, ISIS).
Due to his nature he is suitable for small LAN's and can be integrated in large wide networks were the end points are low-end non-brand routers (D-Link, Linksys, Edimax etc.). Furthermore RIP can be found in Microsoft Windows servers and UNIX/Linux systems and by that allow these machines to participate and to be aware to routing decisions.
RIP (routing Information Protocol) Summary
The metric of RIP is hop count were 1 is for directly connected neighbor and 16 for unreachable destination
RIP uses UDP port 520
There are two version of RIP: v1 and v2, the main difference between the two are classful and classless routing and the way they are sending updates (broadcast and multicast)
Each RIP packet is composed from 4 bytes for initial message, 20 bytes for each route advertised (up to 25 routes per packet) and more 8 bytes for UDP header will set the maximum packet size to 512 bytes.
RIP has 2 Message types: Request and Response, both are represented by the command area in the packet decode with the number 1 or 2 accordingly.
Update timer – every 30 seconds the RIP router sends update message with full routing table to each RIP enabled interface.
Invalid timer – the time that pass before a route become invalid. Cisco IOS default is 180 seconds (six update period)
Flush timer – 240 seconds before the router will flush the route from the routing table. Until then it will remain in the routing table and marked as unreachable.
Holddown timer – An update with a hop count higher than the metric recorded in the routing table will cause the route to go into holddown for 180 seconds.
Sleep timer – This timer, which sets in milliseconds, prevent routing flooding in case of flush event. The value should be less then update timer else routing tables will be unsynchronized.
These timers can be manipulated by the command:
timers basic update invalid holddown flush sleep
Suppress a flush update if regular update occurs within the specific time
Source IP Validates
RIP and IGRP are the only routing protocols that validate the source IP address of incoming updates.
In order to disable this behavior use the command:
router(Config-router)#no validate-source ip
Basic routing-loop prevention mechanism which doesn't allow a router to advertise a route prefix back to an interface, which the router, has learned this route.
On a Frame-Relay topology where multipoint is used on a physical interface, split-horizon is disabled. While using multipoint on a sub-interface, split-horizon is enabled.
To disable split-horizon used interface configuration mode command:
Suppress periodic updates and sends only triggered updates
router(Config-if)#ip rip triggered
This command works on Point-to-point and some multipoint configurations and should be configured on both sides of the link.
When passive-interface is configured on a RIP router it prevents from the router to send updates on the configured interface, but the router will continue to listen and receive RIP updates.
router(config-router)#passive-interface fastEthernet 0/0
By default RIP sends and receive updates through broadcast (RIPv1) or Multicast (RIPv2 184.108.40.206).
In order to send and receive updates using unicast, first configure passive-interface to prevent multicast and then configure the neighbor command:
In order to configure RIPv2 routers to exchange updates using broadcast configure:
router(config-if)#ip rip v2-broadcast
To summarize an address:
router(config-if)#ip summary-address rip 220.127.116.11 255.255.255.0
In order to prevent routing information lose while sending updates we can configure a delay between using the following command:
Changing the receiving router's queue for getting updates:
The default is 50
Using RIP authentication on interface level with two modes: clear text and MD5
In MD5 key number must be match.
MD5 Authentication example:
First create a key chain:
Router(Config)#key chain TST
Configure authentication type (Clear-text or MD5 and key-chain on interface level)
Router(Config-if)#ip rip authentication mode md5
Router(Config-if)#ip rip authentication key-chain TST
Basic RIP Route Influence
Access-list with route-maps while injecting conditional default-route example:
default-information originate route-map TST
access-list 1 permit 18.104.22.168 0.0.0.255
access-list 1 permit 22.214.171.124 0.0.0.255
route-map TST permit 10
match ip address 1
While 126.96.36.199/24 and 188.8.131.52/24 are in the routing table, this router will inject a default route into RIP domain.
offset-list 1 out 12 Serial0/0.12
offset-list 1 out 13 Serial0/0.14
access-list 1 permit 184.108.40.206 0.63.255.255
access-list 1 permit 220.127.116.11 0.31.255.255
In this example the router will advertise routes 18.104.22.168/18 and 22.214.171.124/19 to interface serial 0/0.12 with hop count of 12 and to interface serial 0/0.14 with hop count of 14.