Routing Information Protocol (RIP) is one protocol in a series of routing protocols based on Bellman-Ford (or distance vector) algorithm. This interior routing protocol lets routers in the same autonomous system exchange routing information in the way of periodic RIP updates. Routers transmit their own RIP updates to neighboring networks and listen to the RIP updates from the routers on those neighboring networks to ensure their routing table reflects current state of the network and all the best paths are available. Best path is a path with the fewest hops (routers gateways).
Topics covered in this manual:
When migrating from V2.4 to V2.5, please note that:
RIP general settings are under the /routing rip menu:
[MikroTik]> routing rip print redistribute-static: no redistribute-connected: no redistribute-ospf: no metric-static: 1 metric-connected: 1 metric-ospf: 1 update-timer: 30s timeout-timer: 3m garbage-timer: 2m [MikroTik]>
Argument description:
Set the desired argument values to "yes" for redistributing the routing information to other routers, for example:
[MikroTik] routing rip> set redistribute-connected=yes [MikroTik] routing rip> print redistribute-static: no redistribute-connected: yes redistribute-ospf: no redistribute-kernel: no metric-static: 1 metric-connected: 1 metric-ospf: 1 metric-kernel: 1 update-timer: 30s timeout-timer: 3m garbage-timer: 2m [MikroTik] routing rip>
[MikroTik]> routing rip interface print detail Flags: X - disabled 0 X interface=ether1 send=v2 receive=v2 authentication=none authentication-key="" 1 X interface=prism1 send=v2 receive=v2 authentication=none authentication-key="" [MikroTik]> routing rip interface enable 0 [MikroTik]> routing rip interface print detail Flags: X - disabled 0 interface=ether1 send=v2 receive=v2 authentication=none authentication-key="" 1 X interface=prism1 send=v2 receive=v2 authentication=none authentication-key="" [MikroTik]>
Argument description:
RIP Neighbors
To define a neighboring router with which to exchange routing information, use the /routing rip neighbour add command, for example:
[MikroTik] routing rip neighbour> add address=10.0.0.1 [MikroTik] routing rip neighbour> print Flags: X - disabled # ADDRESS 0 10.0.0.1 [MikroTik] routing rip neighbour>
Normally there is no need to add the neighbors, if the multicasting is working properly within the network. If there are problems with exchanging the routing information, the neighbors can be added to the list. It will force to exchange the routing information with the neighbor.
The routes installed by RIP and other routing protocols can be viewed using the /routing rip route print command:
[MikroTik] routing rip route> print 0 type=ospf metric=1 prefix=0.0.0.0/0 gateway=10.7.1.254 from=0.0.0.0 timeout=0s ... 33 type=rip metric=2 prefix=159.148.10.104/29 gateway=10.6.1.1 from=10.6.1.1 timeout=2m44s 34 type=rip metric=2 prefix=159.148.10.112/28 gateway=10.6.1.1 from=10.6.1.1 timeout=2m44s [MikroTik] routing rip route>
Links for RIP documentation:
Let us consider an example of routing information exchange between MikroTik router, a Cisco router, and the ISP (also mikrotik) routers:
The configuration of the MikroTik router is as follows:
[MikroTik] > interface print Flags: X - disabled, D - dynamic # NAME MTU TYPE 0 ether2 1500 ether 1 ether1 1500 ether [MikroTik] > ip address print Flags: X - disabled, I - invalid, D - dynamic # ADDRESS NETWORK BROADCAST INTERFACE 0 10.0.0.174/24 10.0.0.174 10.0.0.255 ether1 1 192.168.0.1/24 192.168.0.0 192.168.0.255 ether2 [MikroTik] > [MikroTik] > ip route print Flags: X - disabled, I - invalid, D - dynamic, R - rejected # TYPE DST-ADDRESS NEXTHOP-S... GATEWAY DISTANCE INTERFACE 1 D connect 192.168.0.0/24 A 0.0.0.0 0 ether2 2 D connect 10.0.0.0/24 A 0.0.0.0 0 ether1 [MikroTik] >
Note, that no default route has been configured. The route will be obtained using the RIP. The necessary configuration of the RIP general settings is as follows:
[MikroTik] routing rip> set redistribute-connected=yes [MikroTik] routing rip> print redistribute-static: no redistribute-connected: yes redistribute-ospf: no metric-static: 1 metric-connected: 1 metric-ospf: 1 update-timer: 30s timeout-timer: 3m garbage-timer: 2m [MikroTik] routing rip>
The minimum required configuration of RIP interface is just enabling the ether1:
[MikroTik] routing rip interface> enable ether1 [MikroTik] routing rip interface> print Flags: X - disabled 0 X interface=ether2 send=v2 receive=v2 authentication=none authentication-key="" 1 interface=ether1 send=v2 receive=v2 authentication=none authentication-key="" [MikroTik] routing rip interface>
Note, that the ether2 does not need to be enabled, if no propagation of RIP information is required into the Remote network. The routes obtained by RIP can be viewed in the /routing rip route menu:
[MikroTik] routing rip> route print 0 type=rip metric=2 prefix=0.0.0.0/0 gateway=10.0.0.26 from=10.0.0.26 timeout=2m52s 1 type=connect metric=1 prefix=10.0.0.0/24 gateway=0.0.0.0 from=0.0.0.0 timeout=0s 2 type=connect metric=1 prefix=192.168.0.0/24 gateway=0.0.0.0 from=0.0.0.0 timeout=0s 3 type=rip metric=2 prefix=192.168.1.0/24 gateway=10.0.0.26 from=10.0.0.26 timeout=2m52s 4 type=rip metric=3 prefix=192.168.3.0/24 gateway=10.0.0.26 from=10.0.0.26 timeout=2m52s [MikroTik] routing rip>
The regular routing table is:
[MikroTik] routing rip> /ip route print Flags: X - disabled, I - invalid, D - dynamic, R - rejected # TYPE DST-ADDRESS NEXTHOP-S... GATEWAY DISTANCE INTERFACE 0 D rip 0.0.0.0/0 A 10.0.0.26 120 ether1 1 D rip 192.168.3.0/24 A 10.0.0.26 120 ether1 2 D rip 192.168.1.0/24 A 10.0.0.26 120 ether1 3 D connect 192.168.0.0/24 A 0.0.0.0 0 ether2 4 D connect 10.0.0.0/24 A 0.0.0.0 0 ether1 [MikroTik] routing rip>
As we can see, the MikroTik router has learned RIP routes from the Cisco router.
Cisco#show running-config ... interface Ethernet0 ip address 10.0.0.26 255.255.255.0 no ip directed-broadcast ! interface Serial1 ip address 192.168.1.1 255.255.255.252 ip directed-broadcast ! router rip version 2 redistribute connected redistribute static network 10.0.0.0 network 192.168.1.0 ! ip classless ! ...
The routing table of the Cisco router is:
Cisco#show ip route Codes: C - connected, S - static, I - IGRP, 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, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default U - per-user static route, o - ODR Gateway of last resort is 192.168.1.2 to network 0.0.0.0 10.0.0.0/24 is subnetted, 1 subnets C 10.0.0.0 is directly connected, Ethernet0 R 192.168.0.0/24 [120/1] via 10.0.0.174, 00:00:19, Ethernet0 192.168.1.0/30 is subnetted, 1 subnets C 192.168.1.0 is directly connected, Serial1 R 192.168.3.0/24 [120/1] via 192.168.1.2, 00:00:05, Serial1 R* 0.0.0.0/0 [120/1] via 192.168.1.2, 00:00:05, Serial1 Cisco#
As we can see, the Cisco router has learned RIP routes both from the MikroTik router (192.168.0.0/24), and from the ISP router (0.0.0.0/0 and 192.168.3.0/24).