Configuring RIP

This section describes how to configure RIP using the CLI interface.

To display RIP configuration information and statistics, see Overview of RIP. For more information on configuring RIP, see Viewing RIP information.

Overview of RIP

Routing Information Protocol (RIP) is an IP route exchange protocol that uses a distance vector (a number representing distance) to measure the cost of a given route. The cost is a distance vector because the cost often is equivalent to the number of router hops between the HP routing switch and the destination network.

An HP routing switch can receive multiple paths to a destination. The software evaluates the paths, selects the best path, and saves the path in the IP route table as the route to the destination. Typically, the best path is the path with the fewest hops. A hop is another router through which packets must travel to reach the destination. If the HP routing switch receives an RIP update from another router that contains a path with fewer hops than the path stored in the HP routing switch's route table, the routing switch replaces the older route with the newer one. The routing switch then includes the new path in the updates it sends to other RIP routers, including HP routing switches.

RIP routers, including HP routing switches, also can modify a route's cost, generally by adding to it, to bias the selection of a route for a given destination. In this case, the actual number of router hops may be the same, but the route has an administratively higher cost and is thus less likely to be used than other, lower-cost routes. A RIP route can have a maximum cost of 15. Any destination with a higher cost is considered unreachable. Although limiting to larger networks, the low maximum hop count prevents endless loops in the network.

The switches support the following RIP types:

  • Version 1

  • V1 compatible with V2

  • Version 2 (the default)


[NOTE: ]

NOTE: If the routing switch receives an ARP request packet that it is unable to deliver to the final destination because of the ARP timeout and no ARP response is received (the routing switch knows of no route to the destination address), the routing switch sends an ICMP Host Unreachable message to the source.


RIP parameters and defaults

The following tables list the RIP parameters, their default values, and where to find configuration information.

RIP global parameters

RIP global parameters lists the global RIP parameters and their default values.

RIP global parameters

Parameter Description Default
RIP state Routing Information Protocol V2-only. Disabled
auto-summary Enable/disable advertisement of summarized routes. Enabled
metric Default metric for imported routes. 1
redistribution RIP can redistribute static, and connected routes. (RIP redistributes connected routes by default, when RIP is enabled.) Disabled

RIP interface parameters

RIP interface parameters lists the VLAN interface RIP parameters and their default values.

RIP interface parameters

Parameter Description Default
RIP version The version of the protocol that is supported on the interface.

The version can be one of the following:

  • Version 1 only

  • Version 2 only

  • Version 1 or version 2

V2-only
metric A numeric cost the routing switch adds to RIP routes learned on the interface. This parameter applies only to RIP routes. 1
IP address The routes that a routing switch learns or advertises can be controlled. The routing switch learns and advertises all RIP routes on all RIP interfaces
loop prevention The method the routing switch uses to prevent routing loops caused by advertising a route on the same interface as the one on which the routing switch learned the route:
  • Split horizon — The routing switch does not advertise a route on the same interface as the one on which the routing switch learned the route.

  • Poison reverse — The routing switch assigns a cost of 16 "infinite" or "unreachable") to a route before advertising it on the same interface as the one on which the routing switch learned the route.

Poison reverse
receive Define the RIP version for incoming packets V2-only
send Define the RIP version for outgoing packets V2-only

Configuring RIP parameters

Use the following procedures to configure RIP parameters on a system-wide and individual VLAN interface basis.

Enabling RIP

RIP is disabled by default. To enable it, use one of the following methods. When you enable RIP, the default RIP version is RIPv2-only. You can change the RIP version on an individual interface basis to RIPv1 or RIPv1-or-v2, if needed.

To enable RIP on a routing switch, enter the following commands:

HP Switch(config)# ip routing
HP Switch(config)# router rip
HP Switch(rip)# exit
HP Switch(config)# write memory

[NOTE: ]

NOTE: IP routing must be enabled prior to enabling RIP. The first command in the preceding sequence enables IP routing.


Enabling RIP on the routing switch and entering the RIP router context

Syntax:

[no] router rip [[enable] | [disable]] [auto-summary]

Executed at the global configuration level to enable RIP on the routing switch and to enter the RIP router context. This enables you to proceed with assigning RIP areas and to modify RIP global parameter settings as needed. Global IP routing must be enabled before the RIP protocol can be enabled.

Default: Disabled

enable Enables RIP routing.
disable Disables RIP routing.

The no form of the command deletes all protocol-specific information from the global context and interface context. All protocol parameters are set to default values.


[NOTE: ]

NOTE: If you disable RIP, the switch retains all the configuration information for the disabled protocol in flash memory. If you subsequently restart RIP, the existing configuration will be applied.

The auto-summary form of the command enables advertisement of the summarized routes. When used with the no form of the command, auto-summary disables the advertisement of the summarized routes.


Enter RIP router context

HP Switch(config)# router rip
HP Switch(rip)#

Enable RIP routing

HP Switch(config)# router rip enable
HP Switch(rip)#

Disable RIP routing

HP Switch(config)# router rip disable
HP Switch(rip)#

Delete all protocol-specific information from the global and interface context

HP Switch(config)# no router rip
HP Switch(rip)#

[NOTE: ]

NOTE: Deleting all protocol-specific information from the global and interface context sets all protocol parameters to default values.



[NOTE: ]

NOTE: IP routing must be enabled prior to enabling RIP. The first command in the preceding sequence enables IP routing.


Enabling IP RIP on a VLAN

To enable RIP on all IP addresses in a VLAN, use ip rip in the VLAN context. When the command is entered without specifying any IP address, it is enabled in all configured IP addresses of the VLAN.

To enable RIP on a specific IP address in a VLAN, use ip rip [<ip-addr>|all] in the VLAN context and enter a specific IP address. If you want RIP enabled on all IP addresses, you can specify all in the command instead of a specific IP address.

Changing the RIP type on a VLAN interface

When you enable RIP on a VLAN interface, RIPv2-only is enabled by default. You can change the RIP type to one of the following on an individual VLAN interface basis:

  • Version 1 only

  • Version 2 only (the default)

  • Version 1 - or - version 2

To change the RIP type supported on a VLAN interface, enter commands such as the following:

HP Switch(config)# vlan 1
HP Switch(vlan-1)# ip rip v1-only
HP Switch(vlan-1)# exit
HP Switch(config)# write memory
Syntax:

[no] ip rip <v1-only | v1-or-v2 | v2-only>

Changing the cost of routes learned on a VLAN interface

By default, the switch interface increases the cost of an RIP route that is learned on the interface. The switch increases the cost by adding one to the route's metric before storing the route.

You can change the amount that an individual VLAN interface adds to the metric of RIP routes learned on the interface.


[NOTE: ]

NOTE: RIP considers a route with a metric of 16 to be unreachable. Use this metric only if you do not want the route to be used. In fact, you can prevent the switch from using a specific interface for routes learned though that interface by setting its metric to 16.


To increase the cost a VLAN interface adds to RIP routes learned on that interface, enter commands such as the following:

HP Switch(config)# vlan 1
HP Switch(vlan-1)# ip rip metric 5

These commands configure vlan-1 to add 5 to the cost of each route learned on the interface.

Syntax:

ip rip metric <1-16>

Configuring RIP redistribution

You can configure the routing switch to redistribute connected, static, and OSPF routes into RIP. When you redistribute a route into RIP, the routing switch can use RIP to advertise the route to its RIP neighbors.

To configure redistribution, perform the following tasks:

  1. Configure redistribution filters to permit or deny redistribution for a route based on the destination network address or interface. (optional)

  2. Enable redistribution.

Defining RIP redistribution filters

Route redistribution imports and translates different protocol routes into a specified protocol type. On the switches covered in this guide, redistribution is supported for static and directly connected routes. Redistribution of any other routing protocol into RIP is not currently supported. When you configure redistribution for RIP, you can specify that static or connected routes are imported into RIP routes.

Configuring for redistribution

To configure for redistribution, define the redistribution tables with "restrict" redistribution filters. In the CLI, use the restrict command for RIP at the RIP router level.


[NOTE: ]

NOTE: Do not enable redistribution until you have configured the redistribution filters. Otherwise, the network might become overloaded with routes that you did not intend to redistribute.

Example:

To configure the switch to filter out redistribution of static or connected routes on network 10.0.0.0, enter the following commands:

HP Switch(config)# router rip
HP Switch(rip)# restrict 10.0.0.0 255.0.0.0
HP Switch(rip)# write memory

The default configuration permits redistribution for all default connected routes only.


Syntax:

restrict <ip-addr> <ip-mask> | <ip-addr/<prefix length>

This command prevents any routes with a destination address that is included in the range specified by the address/mask pair from being redistributed by RIP.

Modifying default metric for redistribution

The default metric is a global parameter that specifies the cost applied to all RIP routes by default. The default value is 1. You can assign a cost from 1 to 15.

Example:

To assign a default metric of 4 to all routes imported into RIP, enter the following commands:

HP Switch(config)# router rip
HP Switch(rip)# default-metric 4
Syntax:

default-metric <value>

The <value> can be from 1 to 15. The default is 1.

Enabling RIP route redistribution

The basic form of the redistribute command redistributes all routes of the selected type. For finer control over route selection and modification of route properties, you can specify the route-map parameter and the name of a route map.


[NOTE: ]

NOTE: Do not enable redistribution until you have configured the redistribution filters. Otherwise, the network might become overloaded with routes that you did not intend to redistribute.


Syntax:

[no] router rip redistribute <connected | static> [route-map <name>]

Enables redistribution of the specified route type to the RIP domain.

static

Redistribute from manually configured routes.

connected

Redistribute from locally connected networks.

route-map <name>

Optionally specify the name of a route-map to apply during redistribution.

The no form of the command disables redistribution for the specified route type.

Example:

To enable redistribution of all connected, static, and OSPF routes into RIP, enter the following commands.

HP Switch(config)# router rip
HP Switch(rip)# redistribute connected
HP Switch(rip)# redistribute static
HP Switch(rip)# write memory

Changing the route loop prevention method

Syntax:

[no] ip rip poison-reverse

Entering the command without the no option will re-enable Poison reverse.

RIP can use the following methods to prevent routing loops:

  • Split horizon - the routing switch does not advertise a route on the same interface as the one on which the routing switch learned the route.

  • Poison reverse - the routing switch assigns a cost of 16 (“infinity” or “unreachable”) to a route before advertising it on the same interface as the one on which the routing switch learned the route. This is the default.

These loop prevention methods are configurable on an individual VLAN interface basis.


[NOTE: ]

NOTE: These methods are in addition to RIP's maximum valid route cost of 15.


Poison reverse is enabled by default. Disabling Poison reverse causes the routing switch to revert to Split horizon. (Poison reverse is an extension of Split horizon.) To disable Poison reverse on an interface, and thereby enable Split horizon, enter the following:

HP Switch(config)# vlan 1
HP Switch(vlan-1)# no ip rip poison-reverse

Viewing RIP information

All RIP configuration and status information is shown by the CLI command show ip rip and options off that command.

Viewing general RIP information

Syntax:

show ip rip

To display general RIP information, enter show ip rip at any context level. The resulting display will appear similar to the following:

General RIP information listing

HP Switch(config)# show ip rip

RIP global parameters

  RIP protocol   : enabled
  Auto-summary   : enabled 
  Default Metric : 1
  Distance       : 120
  Route changes  : 0
  Queries        : 0

RIP interface information

  IP Address  Status   Send mode Recv mode  Metric  Auth
  ----------- -------- --------- ---------- ------- ----
  100.1.0.1   enabled  V2-only   V2-only    5       none
  100.2.0.1   enabled  V2-only   V2-only    5       none
  100.3.0.1   enabled  V2-only   V2-only    5       none
  100.4.0.1   enabled  V2-only   V2-only    5       none
  100.10.0.1  enabled  V2-only   V2-only    5       none
  100.11.0.1  enabled  V2-only   V2-only    5       none

RIP peer information

  IP Address      Bad routes  Last update timeticks
  --------------- ----------- ---------------------

The display is a summary of global RIP information, information about interfaces with RIP enabled, and information about RIP peers. The following fields are displayed:

RIP protocol

Status of the RIP protocol on the router. RIP must be enabled here and on the VLAN interface for RIP to be active.

The default is disabled.

Auto-summary

Status of auto-summary for all interfaces running RIP. If auto-summary is enabled, subnets will be summarized to a class network when advertising outside of the given network.

Default metric

Sets the default metric for imported routes. This is the metric that will be advertised with the imported route to other RIP peers. A RIP metric is a measurement used to determine the "best" path to network: 1 is the best, 15 is the worst, 16 is unreachable.

Route changes

The number of times RIP has modified the routing switch’s routing table.

Queries

The number of RIP queries that have been received by the routing switch.

RIP interface information

RIP information on the VLAN interfaces on which RIP is enabled:

IP address

IP address of the VLAN interface running RIP.

Status

Status of RIP on the VLAN interface.

Send mode

Format of the RIP updates: RIP 1, RIP 2, or RIP 2 version 1 compatible.

Recv mode

The switch can process RIP 1, RIP 2, or RIP 2 version 1 compatible update messages.

Metric

Path "cost", a measurement used to determine the "best" RIP route path: 1 is the best, 15 is the worst, 16 is unreachable.

Auth

RIP messages can be required to include an authentication key if enabled on the interface.

RIP peer information

RIP peers are neighboring routers from which the routing switch has received RIP updates:

IP address

IP address of the RIP neighbor.

Bad routes

Number of route entries which were not processed for any reason.

Last update timeticks

Number of seconds that have passed since we received an update from this neighbor.

Viewing RIP interface information

To display RIP interface information, enter the show ip rip interface command at any context level.

Syntax:

show ip rip interface [ ip-addr | vlan <vlan-id> ]

The resulting display will appear similar to the following:

Output for the show IP RIP interface command

HP Switch(config)# show ip rip interface

 RIP interface information

  IP Address  Status   Send mode  Recv mode  Metric  Auth
  ----------- -------- ---------- ---------- ------- ----
  100.1.0.1   enabled  V2-only    V2-only    1       none
  100.2.0.1   enabled  V2-only    V2-only    1       none
  100.3.0.1   enabled  V2-only    V2-only    1       none
  100.4.0.1   enabled  V2-only    V2-only    1       none

You can also display the information for a single RIP VLAN interface, by specifying the VLAN ID for the interface, or by specifying the IP address for the interface.

To show the RIP interface information for VLAN 1000, use the show ip rip interface vlan <vid> command.

RIP interface output by VLAN

HP Switch# show ip rip interface vlan 4

 RIP configuration and statistics for VLAN 4

 RIP interface information for 100.4.0.1

  IP Address : 100.4.0.1
  Status     : enabled

  Send Mode  : V2-only 
  Recv mode  : V2-only 
  Metric : 1
  Auth : none

  Bad packets received : 0
  Bad routes received  : 0
  Sent updates : 0

For definitions of the fields in RIP interface output by VLAN, see Viewing general RIP information.

The RIP interface information also includes the following fields:

Bad packets received Number of packets that were received on this interface and were not processed for any reason.
Bad routes received Number of route entries that were received on this interface and were not processed for any reason.
Sent updates Number of RIP routing updates that have been sent on this interface.

To show the RIP interface information for the interface with IP address 100.2.0.1, enter the show ip rip interface command:

The show IP rip interface output by IP address

HP Switch# show ip rip interface 100.2.0.1

 RIP interface information for 100.2.0.1

  IP Address : 100.2.0.1
  Status    : enabled

  Send Mode : V2-only 
  Recv mode : V2-only 
  Metric : 1
  Auth : none

  Bad packets received : 0
  Bad routes received  : 0
  Sent updates : 0

Viewing RIP peer information

To display RIP peer information, enter the show ip rip peer command at any context level.

The resulting display will appear similar to the following:

Output for the show IP rip peer command

HP Switch# show ip rip peer

RIP peer information

 IP Address      Bad routes  Last update timeticks
 --------------- ----------- ---------------------
 100.1.0.100     0           1
 100.2.0.100     0           0
 100.3.0.100     0           2
 100.10.0.100    0           1

This display lists all neighboring routers from which the routing switch has received RIP updates. The following fields are displayed:

IP address IP address of the RIP peer neighbor.
Bad routes The number of route entries that were not processed for any reason.
Last update timeticks How many seconds have passed since the routing switch received an update from this peer neighbor.

To show the RIP peer information for a specific peer with IP address 100.1.0.100, enter show ip rip peer 100.1.0.100.

Output for the show IP rip peer <ip-addr> command

HP Switch# show ip rip peer 100.0.1.100

RIP peer information for 100.0.1.100

  IP Address : 100.1.0.100
  Bad routes : 0
  Last update timeticks : 2

This display lists information in the fields described above (IP address, Bad routes, Last update timeticks.)

Viewing RIP redistribution information

To display RIP redistribution information, enter the show ip rip redistribute command at any context level:

Output for the show IP rip redistribute command

HP Switch# show ip rip redistribute

RIP redistributing

 Route type Status
 ---------- ------
 connected  enabled
 static     disabled

RIP automatically redistributes connected routes that are configured on interfaces that are running RIP and all routes that are learned via RIP. The router rip redistribute command, described in Configuring for redistribution, configures the routing switch to cause RIP to advertise connected routes that are not running RIP or static routes. The display shows whether RIP redistribution is enabled or disabled for connected or static routes.

Viewing RIP redistribution filter (restrict) information

To display RIP restrict filter information, enter the show ip rip restrict command at any context level:

Output for the show IP rip restrict command

HP Switch# show ip rip restrict

RIP restrict list

 IP Address      Mask
 --------------- ------------

The display shows if any routes identified by the IP Address and Mask fields are being restricted from redistribution. The restrict filters are configured by the router rip restrict command (see Configuring for redistribution).