RIP

Document revision:1 (Wed Mar 24 12:32:12 GMT 2004)
Applies to: V2.9

General Information

Summary

MikroTik RouterOS implements RIP Version 1 (RFC1058) and Version 2 (RFC 2453). RIP enables routers in an autonomous system to exchange routing information. It always uses the best path (the path with the fewest number of hops (i.e. routers)) available.

Specifications

Packages required: routing
License required: Level3
Submenu level: /routing rip
Standards and Technologies: RIPv1, RIPv2
Hardware usage: Not significant

Related Documents

Description

Routing Information Protocol (RIP) is one protocol in a series of routing protocols based on Bellman-Ford (or distance vector) algorithm. This Interior Gateway Protocol (IGP) lets routers exchange routing information across a single autonomous system 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 the current state of the network and all the best paths are available. Best path considered to be a path with the fewest hop count (id est that include fewer routers).

The routes learned by RIP protocol are installed in the route list (/ip route print) with the distance of 120.

Additional Resources

General Setup

Property Description

redistribute-static (yes | no; default: no) - specifies whether to redistribute static routes to neighbour routers or not

redistribute-connected (yes | no; default: no) - specifies whether to redistribute connected routes to neighbour routers or not

redistribute-ospf (yes | no; default: no) - specifies whether to redistribute routes learned via OSPF protocol to neighbour routers or not

redistribute-bgp (yes | no; default: no) - specifies whether to redistribute routes learned via bgp protocol to neighbour routers or not

metric-static (integer; default: 1) - specifies metric (the number of hops) for the static routes

metric-connected (integer; default: 1) - specifies metric (the number of hops) for the connected routes

metric-ospf (integer; default: 1) - specifies metric (the number of hops) for the routes learned via OSPF protocol

metric-bgp (integer; default: 1) - specifies metric (the number of hops) for the routes learned via BGP protocol

update-timer (time; default: 30s) - specifies frequency of RIP updates

timeout-timer (time; default: 3m) - specifies time interval after which the route is considered invalid

garbage-timer (time; default: 2m) - specifies time interval after which the invalid route will be dropped from neighbor router table

Notes

The maximum metric of RIP route is 15. Metric higher than 15 is considered 'infinity' and routes with such metric are considered unreachable. Thus RIP cannot be used on networks with more than 15 hops between any two routers, and using redistribute metrics larger that 1 further reduces this maximum hop count.

Example

To enable RIP protocol to redistribute the routes to the connected networks:

[admin@MikroTik] routing rip> set redistribute-connected=yes
[admin@MikroTik] routing rip> print
       redistribute-static: no
    redistribute-connected: yes
         redistribute-ospf: no
          redistribute-bgp: no
             metric-static: 1
          metric-connected: 1
               metric-ospf: 1
                metric-bgp: 1
              update-timer: 30s
             timeout-timer: 3m
             garbage-timer: 2m
[admin@MikroTik] routing rip>

Interfaces

Submenu level: /routing rip interface

Description

In general you do not have to configure interfaces in order to run RIP. This command level is provided only for additional configuration of specific RIP interface parameters.

Property Description

interface (name; default: all) - interface on which RIP runs
all - sets defaults for interfaces not having any specific settings

send (v1 | v1-2 | v2; default: v2) - specifies RIP protocol update versions to distribute

receive (v1 | v1-2 | v2; default: v2) - specifies RIP protocol update versions the router will be able to receive

authentication (none | simple | md5; default: none) - specifies authentication method to use for RIP messages
none - no authentication performed
simple - plain text authentication
md5 - Keyed Message Digest 5 authentication

authentication-key (text; default: "") - specifies authentication key for RIP messages

prefix-list-in (name; default: "") - name of the filtering prefix list for received routes

prefix-list-out (name; default: "") - name of the filtering prefix list for advertised routes

Notes

It is recommended not to use RIP version 1 wherever it is possible due to security issues

Example

To add an entry that specifies that when advertising routes through the ether1 interface, prefix list plout should be applied:

[admin@MikroTik] routing rip> interface add interface=ether1 \
\... prefix-list-out=plout
[admin@MikroTik] routing rip> interface print
Flags: I - inactive
  0   interface=ether1 receive=v2 send=v2 authentication=none
      authentication-key="" prefix-list-in=plout prefix-list-out=none


[admin@MikroTik] routing rip>

Networks

Submenu level: /routing rip network

Description

To start the RIP protocol, you have to define the networks on which RIP will run.

Property Description

address (IP address mask; default: 0.0.0.0/0) - specifies the network on which RIP will run. Only directly connected networks of the router may be specified

netmask (IP address; default: 0.0.0.0) - specifies the network part of the address (if it is not specified in the address argument)

Notes

For point-to-point links you should specify the remote endpoint IP address as the network IP address. For this case the correct netmask will be /32.

Example

To enable RIP protocol on 10.10.1.0/24 network:

[admin@MikroTik] routing rip network> add address=10.10.1.0/24
[admin@MikroTik] routing rip network> print
  # ADDRESS
  0 10.10.1.0/24
[admin@MikroTik] routing rip>

Neighbors

Description

This submenu is used to define a neighboring routers to exchange routing information with. Normally there is no need to add the neighbors, if multicasting is working properly within the network. If there are problems with exchanging routing information, neighbor routers can be added to the list. It will force the router to exchange the routing information with the neighbor using regular unicast packets.

Property Description

address (IP address; default: 0.0.0.0) - IP address of neighboring router

Example

To force RIP protocol to exchange routing information with the 10.0.0.1 router:

[admin@MikroTik] routing rip> neighbor add address=10.0.0.1
[admin@MikroTik] routing rip> neighbor print
Flags: I - inactive
  #   ADDRESS
  0   10.0.0.1
[admin@MikroTik] routing rip>

Routes

Submenu level: /routing rip route

Property Description

dst-address (read-only: IP address mask) - network address and netmask of destination

gateway (read-only: IP address) - last gateway on the route to destination

metric (read-only: integer) - distance vector length to the destination network

from (IP address) - specifies the IP address of the router from which the route was received

Notes

This list shows routes learned by all dynamic routing protocols (RIP, OSPF and BGP)

Example

To view the list of the routes:

[admin@MikroTik] routing rip route> print
Flags: S - static, R - rip, O - ospf, C - connect, B - bgp
  0 O dst-address=0.0.0.0/32 gateway=10.7.1.254 metric=1 from=0.0.0.0

...

 33 R dst-address=159.148.10.104/29 gateway=10.6.1.1 metric=2 from=10.6.1.1

 34 R dst-address=159.148.10.112/28 gateway=10.6.1.1 metric=2 from=10.6.1.1

[admin@MikroTik] routing rip route>

Application Examples

Example

Let us consider an example of routing information exchange between MikroTik router, a Cisco router and the ISP (also MikroTik) routers:

RIP Example Drawing