RIP Commands

Routing Information Protocol (RIP) is a distance-vector routing protocol, which uses a hop count as a way to determine network distance. RIP broadcasts its entire routing table every 30 seconds. Each neighbor will broadcast this information forward to its own neighbors. As a result, all routers in the network will have the same knowledge of routing paths, a state known as network convergence.

RIP is suitable for managing routing information within a self-contained network such as a local area network (LAN). RIP calculates the best route based on hop count, a destination that is more than 15 hops away is considered unreachable.

RCP100 RIP features:


Table Of Contents

clear ip rip
default-information originate
ip rip md5 secret
neighbor
network
passive-interface
redistribute connected
redistribute ospf
redistribute static
router rip
show ip rip
show ip rip database
update-timer
Example

clear ip rip


Reset RIP protocol. All RIP routes are removed, RIP database is cleaned and all statistics are reseted.

clear ip rip


default-information originate


Insert the default route into RIP database. The route will be exchanged with the other routers.

[no] default-information originate

The no form of the command removes the default route from RIP database.

Example:

rcp(config)#router rip
rcp(rip)#default-information originate 
rcp(rip)#

ip rip md5 secret


Enable RIP MD5 authentication. The command is executed in interface mode.

ip rip md5 secret <password>
no ip rip md5 secret

The no form of the command disables the authentication.

Example:

rcp(config)#interface ethernet eth0
rcp(config-if eth0)#ip rip md5 secret abcdef
rcp(config-if eth0)#

neighbor


Define a neighboring router with which to exchange routing information. The updates are sent as unicast packets to this neighbor.

[no] neighbor <IP>

The no form of the command removes the neighbor.

Example:

rcp(config)#router rip 
rcp(rip)#neighbor 10.2.3.50
rcp(rip)#interface ethernet eth0
rcp(config-if eth0)#ip address 10.2.3.1/24
rcp(config-if eth0)#

In the example above, interface eth0 is configured with an IP address of 10.2.3.1. RIP exchanges are configured with a single neighbor on 10.2.3.0/24 network. The messages are sent as unicast, the neighbor at 10.2.3.50 has to be configured also for unicast messaging.


network


Enable multicast RIP messaging for this network.

[no] network <CIDR address>

The no form of the command removes the network.

Example:

rcp(config)#router rip 
rcp(rip)#network 10.1.0.0/16
rcp(rip)#

passive-interface


Disable sending of RIP multicast updates on an interface.

[no] passive-interface <interface>

The no form of the command removes the passive interface.

Example:

rcp(config)#router rip 
rcp(rip)#network 10.1.0.0/16
rcp(rip)#passive-interface eth0
rcp(rip)#interface ethernet eth0
rcp(config-if eth0)#ip address 10.1.0.1/16
rcp(config-if eth0)#

redistribute connected


Distribute connected routes using RIP.

[no] redistribute connected [metric <metric>]
[no] redistribute connected [loopback]

Loopback argument will redistribute loopback interface addresses. The no form of the command removes the connected routes from RIP database.

Example:

rcp(config)#router rip 
rcp(rip)#redistribute connected
rcp(rip)#

redistribute ospf


Distribute OSPF routes using RIP.

[no] redistribute static [metric <metric>]

The no form of the command removes the OSPF routes from RIP database.

Example:

rcp(config)#router rip 
rcp(rip)#redistribute ospf
rcp(rip)#

redistribute static


Distribute static routes using RIP.

[no] redistribute static [metric <metric>]

The no form of the command removes the static routes from RIP database.

Example:

rcp(config)#router rip 
rcp(rip)#redistribute static
rcp(rip)#

router rip


Enter RIP configuration mode.

router rip

Use exit command to return to configuration mode.

Example:

rcp(config)#router rip 
rcp(rip)#exit
rcp(config)#

show ip rip


Show RIP information.

show ip rip

Example:

rcp#show ip rip 
Network            Request (Rx/Tx)     Response (Rx/Tx)    
10.0.0.0/16        1/1                 11/14            
10.1.0.0/16        1/1                 13/14              

Neighbor           Last Update        Errors (packet/route/MD5)
10.0.0.12          5                  0/0/0
10.1.0.12          6                  0/0/0
10.0.0.10          5                  0/0/0
10.0.0.11          5                  0/0/0
10.1.0.11          5                  0/0/0
10.1.0.10          5                  0/0/0

Interface          Update
br0                21
br1                28
rcp#

show ip rip database


Show internal RIP database.

show ip rip database

Example:

rcp#show ip rip database 
Codes: Rn - RIP network, R - RIP, C - connected, S - static, * - cleanup timer

   Network            Next Hop         Metric From             Interface Time
R  10.0.11.0/24       10.0.0.10        2      10.0.0.10        br0       26
R  10.0.12.0/24       10.0.0.11        2      10.0.0.11        br0       26
Rn 10.2.0.0/24                         1                       br2        
R  10.0.3.0/24        10.0.0.10        4      10.0.0.10        br0       26
R  10.0.3.0/24        10.0.0.11        4      10.0.0.11        br0       26
Rn 10.0.0.0/24                         1                       br0        
Rn 10.1.0.0/24                         1                       br1        
R  10.0.22.0/24       10.0.0.11        3      10.0.0.11        br0       26
R  10.0.21.0/24       10.0.0.10        3      10.0.0.10        br0       26
R  10.0.40.0/24       10.0.0.10        4      10.0.0.10        br0       26
R  10.0.41.0/24       10.0.0.11        4      10.0.0.11        br0       26
rcp#show ip route
Codes: C - connected, S - static, R - RIP, B - blackhole, O - OSPF
IA - OSPF inter area, E1 - OSPF external type 1, E2 - OSPF external type 2

S    0.0.0.0/0[0/0] via 192.168.1.254, eth0
C    10.0.0.0/24 is directly connected, br0
R    10.0.3.0/24[120/4] via 10.0.0.10, br0
                        via 10.0.0.11, br0
R    10.0.11.0/24[120/2] via 10.0.0.10, br0
R    10.0.12.0/24[120/2] via 10.0.0.11, br0
R    10.0.21.0/24[120/3] via 10.0.0.10, br0
R    10.0.22.0/24[120/3] via 10.0.0.11, br0
R    10.0.40.0/24[120/4] via 10.0.0.10, br0
R    10.0.41.0/24[120/4] via 10.0.0.11, br0
C    10.1.0.0/24 is directly connected, br1
C    10.2.0.0/24 is directly connected, br2
C    192.168.1.0/24 is directly connected, eth0
rcp#

update-timer


Set RIP update timer.

update-timer <time>
no update-timer

The no form of the command restores the default of 30 seconds.

Example:

rcp(rip)#update-timer 
  5..60                       Update interval in seconds
rcp(rip)#update-timer 5 
rcp(rip)#

Example



Local RIP network
Local RIP network


Two local network segments, 10.1.0.0/16 and 10.22.0.0/16, are connected to a firewall at 192.168.254.254 by two RCP routers running RIP. Default gateway route is configured on RCP1 and included in the updates for RCP2.

The configuration for the two routers is as follows:

RCP1

hostname rcp1
ip default-route 192.168.254.254
!
router rip
  network 10.0.0.0/16
  network 10.1.0.0/16
  redistribute connected
  redistribute static
  default-information originate
!
interface ethernet eth0
  ip address 192.168.254.19/24
  ip mtu 1500
  no shutdown
!
interface ethernet eth1
  ip address 10.0.0.1/16
  ip mtu 1500
  no shutdown
!
interface ethernet eth2
  ip address 10.1.0.1/16
  ip mtu 1500
  no shutdown
!

RCP2

hostname rcp2
!
router rip
  network 10.0.0.0/16
  redistribute connected
!
interface ethernet eth0
  ip address 10.0.0.10/16
  ip mtu 1500
  no shutdown
!
interface ethernet eth1
  ip address 10.22.0.1/24
  ip mtu 1500
  no shutdown
!

RIP database on RCP2 looks as follows:

rcp2#show ip rip database
Codes: Rn - RIP network, R - RIP, C - connected, S - static, * - cleanup timer

   Network            Next Hop         Metric From             Interface Time
R  0.0.0.0/0          10.0.0.1         2      10.0.0.1         eth0      168
Rn 10.0.0.0/16                         1                       eth0       
R  10.1.0.0/16        10.0.0.1         2      10.0.0.1         eth0      168
C  10.22.0.0/24                        1                       eth1        
R  192.168.254.0/24   10.0.0.1         2      10.0.0.1         eth0      168
rcp2#

and the routing table:

rcp2#show ip route
Codes: C - connected, S - static, R - RIP, B - blackhole

R    0.0.0.0/0[120/2] via 10.0.0.1, eth0
C    10.0.0.0/16 is directly connected, eth0
R    10.1.0.0/16[120/2] via 10.0.0.1, eth0
C    10.22.0.0/24 is directly connected, eth1
R    192.168.254.0/24[120/2] via 10.0.0.1, eth0
rcp2#