RIP/RIPng

1. Protocol Overview

RIP (Routing Information Protocol) is a distance vector routing protocol and one of the Interior Gateway Protocols (IGPs) designed for TCP/IP networks.
Because it uses the number of networks (hop count) that must be traversed to reach the destination as a metric, it is not suitable for networks that require consideration of real-time information such as delay, load, and reliability. However, because it is easy to configure and has a low load, it is suitable for use in relatively small networks.
This product supports the following RIP versions.

  • RIPv1 (RFC1058)
    RIPv1 has a significantly lower computational load than OSPF (Open Shortest Path First), making it widely adopted during an era when computer processing power was limited.
    It has the following features:

    • The computational load is extremely low.

    • This cannot be used in large networks with 15 or more hops.

    • It takes a long time for routes across the network to fully converge.

    • It takes a long time to detect a fault.

    • Once a link goes down, a Count-to-Infinity problem may occur.

  • RIPv2 (RFC2453)
    RIPv2 was established to resolve the issues with RIPv1.
    The following functions have been added to RIPv2:

    • Send RIP packets using multicast addresses

    • Support the authentication function (with a simple password or MD5)

    • Support subnet mask

    • Support next hop addresses

  • RIPng (RFC2080)
    RIPng follows the RIPv2 specifications and is designed for IPv6 networks.
    There are no differences from the basic specifications of RIPv2 except that it handles route information for IPv6 networks.

This page describes how to configure RIP and RIPng.

3. Number of routes

The number of routes that RIP and RIPng can handle, respectively, is as follows:

  • RIP (v1/v2)

    Models Number of routes

    SWX3200-28GT
    SWX3200-52GT

    900

    SWX3220-16MT
    SWX3220-16TMs

    1024

    SWX3220-30MC
    SWX3220-30TCs

    1024

  • RIPng

    Models Number of routes

    SWX3200-28GT
    SWX3200-52GT

    900

    SWX3220-16MT
    SWX3220-16TMs

    1024

    SWX3220-30MC
    SWX3220-30TCs

    1024

4. Basic settings

The reference network for configuring RIP’s basic settings is as follows:

image

Settings for SWX (1)
SWX (1) is connected to three networks: 192.168.0.0/24, 192.168.1.0/24, and 192.168.3.0/24.
Use the network command to register each network.

!
vlan database
 vlan 2-3 state enable
!
interface port1.1
 switchport
 switchport mode access
!
interface port1.2
 switchport
 switchport mode access
 switchport access vlan 2
!
interface port1.3
 switchport
 switchport mode access
 switchport access vlan 3
!
interface vlan1
 ip address 192.168.0.1/24
!
interface vlan2
 ip address 192.168.1.2/24
!
interface vlan3
 ip address 192.168.3.3/24
!
router rip
 network 192.168.0.0/24
 network 192.168.1.0/24
 network 192.168.3.0/24
!

Settings for SWX (2)
SWX (2) is connected to two networks, 192.168.1.0/24 and 192.168.2.0/24.
Use the network command to register each network.

!
vlan database
 vlan 2 state enable
!
interface port1.1
 switchport
 switchport mode access
!
interface port1.2
 switchport
 switchport mode access
 switchport access vlan 2
!
interface vlan1
 ip address 192.168.1.1/24
!
interface vlan2
 ip address 192.168.2.1/24
!
router rip
 network 192.168.1.0/24
 network 192.168.2.0/24
!

Settings on SWX (3)
SWX (3) is connected to the 192.168.3.0/24 network.
Use the network command to register each network.

!
interface port1.1
 switchport
 switchport mode access
!
interface vlan1
 ip address 192.168.3.1/24
!
router rip
 network 192.168.3.0/24
!

The network command allows you to specify a VLAN interface in addition to specifying a network address.
If a VLAN interface is specified, the network directly connected to that VLAN interface will become the RIP network.
The SWX (3) configuration can be written as follows using the VLAN interface specification:

!
interface port1.1
 switchport
 switchport mode access
!
interface vlan1
 ip address 192.168.3.1/24
!
router rip
 network vlan1
!

5. Setup Guide

In addition to the basic settings above, RIP and RIPng also allow you to configure settings such as filtering and authentication of route information.
This section serves as a configuration guide to help you make the appropriate settings based on your situation.

5.1. RIP Version Settings

The version of RIP to run can be configured both for the RIP process and for the VLAN interface.
The version configured on the VLAN interface takes precedence over the version configured for the RIP process.

  • Set the RIP version to 2 in the RIP process and set the RIP version to 1 on the VLAN2 interface.
    In this case, RIPv2 runs on the VLAN1 interface and RIPv1 runs on the VLAN2 interface.

    Yamaha(config)# router rip
    Yamaha(config-router)# version 2
    Yamaha(config-router)# exit
    Yamaha(config)# int vlan2
    Yamaha(config-if)# ip rip send version 1
    Yamaha)config-if)# ip rip receive version 1

5.2. Metric Value Settings

In RIP, the number of hops is used as the metric, but the metric value of any route can be changed using the offset-list command.

  • When route information destined for 192.168.0.0/24 is received, the metric is increased by 3 and then incorporated into the RIP routing table.

  • When sending route information destined for 192.168.1.0/24, the metric is increased by 2 before sending.

    Yamaha(config)# access-list 10 permit any 192.168.0.0/24 any
    Yamaha(config)# access-list 11 permit any 192.168.1.0/24 any
    Yamaha(config)# router rip
    Yamaha(config-router)# offset-list 10 in 3
    Yamaha(config-router)# offset-list 11 out 2

5.3. Re-advertisement of External Routes

To re-advertise external routes, such as static routes or OSPF routes, to a RIP network, use the redistribute command.
You can also specify the metric values for the re-advertisement at the same time.

  • Re-advertise the static route into the RIP network with a metric of 3.

    Yamaha(config)# router rip
    Yamaha(config-router)# redistribute static metric 3
  • Re-advertise the OSPF route of OSPF process 2 into the RIP network with a metric of 5.

    Yamaha(config)# router rip
    Yamaha(config-router)# redistribute ospf 2 metric 5

The default metric when re-advertising an external route via RIP is set using the default-metric command.
However, if a metric is specified in the redistribute command, that metric value takes precedence.

  • Set the default metric to 3 when re-advertising external routes via RIP.

    Yamaha(config)# router rip
    Yamaha(config-router)# default-metric 3

5.4. Route Information Filtering

You can filter specific route information between RIB and RIP route information.

  • Prevent RIP from advertising only the route information destined for 192.168.1.0/24 among the route information registered in RIB.

    Yamaha(config)# access-list 1 deny any 192.168.1.0/24 any
    Yamaha(config)# access-list 1 permit any any any
    Yamaha(config)# router rip
    Yamaha(config-router)# distribute-list 1 out
  • Of the routes received via RIP, only route information in the range of 192.168.0.0/16 is registered in the RIB.

    Yamaha(config)# access-list 1 permit any 192.168.0.0/16 any
    Yamaha(config)# access-list 1 deny any any any
    Yamaha(config)# router rip
    Yamaha(config-router)# distribute-list 1 in

5.5. Certification

RIPv2 supports authentication using a simple password or MD5 digest.
Using authentication can prevent malicious devices from advertising fraudulent route information.
Authentication settings are configured for each interface that runs RIP.
Authentication must also be enabled on the opposing device that sends and receives RIP packets to and from the interface on which authentication is enabled.

  • Simple Password Authentication
    Enable simple password authentication with the password "yamaha" on the VLAN2 interface.

    Yamaha(config)# interface vlan2
    Yamaha(config-if)# ip rip authentication mode text
    Yamaha(config-if)# ip rip authentication string yamaha
  • MD5 Digest Authentication
    MD5 digest authentication on the VLAN3 interface with the password "0a1b2c3d4e5f6789".

    Yamaha(config)# interface vlan2
    Yamaha(config-if)# ip rip authentication mode md5
    Yamaha(config-if)# ip rip authentication string 0a1b2c3d4e5f6789

To set multiple passwords for one interface, register the passwords in a keychain and specify that keychain for each interface.

  • Enable simple password authentication on the VLAN2 interface using either "yamaha" or "0a1b2c3d4e5f6789" as the password.

    Yamaha(config)#key chain KeyChainName
    Yamaha(config-keychain)#key 1
    Yamaha(config-keychain-key)#key-string yamaha
    Yamaha(config-keychain-key)#key 2
    Yamaha(config-keychain-key)#key-string 0a1b2c3d4e5f6789
    Yamaha(config-keychain-key)#exit
    Yamaha(config-keychain)#exit
    Yamaha(config)#int vlan2
    Yamaha(config-if)# ip rip authentication mode text
    Yamaha(config-if)#ip rip authentication key-chain KeyChainName

5.6. Check the RIP Status

The following commands are available to display the configuration and status of RIP.

  • Display the RIP settings and status.

    Yamaha# show ip protocols rip
  • Display the RIP routing table.

    Yamaha# show ip rip
  • Display the RIP status for each interface.

    Yamaha# show ip rip interface
  • Display RIP statistics.

    Yamaha# show ip rip statistics