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.
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: 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. |
|
|
The following tables list the RIP parameters, their default values, and where to find configuration information.
RIP global parameters lists the global RIP parameters and their default values.
RIP global 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:
|
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:
|
Poison reverse |
receive | Define the RIP version for incoming packets | V2-only |
send | Define the RIP version for outgoing packets | V2-only |
Use the following procedures to configure RIP parameters on a system-wide and individual VLAN interface basis.
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 routingHP Switch(config)# router ripHP Switch(rip)# exitHP Switch(config)# write memory
|
|
NOTE: IP routing must be enabled prior to enabling RIP. The first command in the preceding sequence enables IP routing. |
|
|
Syntax:
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.
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.
Delete all protocol-specific information from the global and interface context
HP Switch(config)# no router rip HP Switch(rip)#
|
|
NOTE: Deleting all protocol-specific information from the global and interface context sets all protocol parameters to default values. |
|
|
|
|
NOTE: IP routing must be enabled prior to enabling RIP. The first command in the preceding sequence enables IP routing. |
|
|
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 [<
in the VLAN context and enter a specific IP address. If you want RIP enabled on all IP addresses, you can specify ip-addr
>|all]all
in the command instead of a specific IP address.
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 1HP Switch(vlan-1)# ip rip v1-onlyHP Switch(vlan-1)# exitHP Switch(config)# write memory
Syntax:
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: 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:
These commands configure vlan-1 to add 5 to the cost of each route learned on the interface.
Syntax:
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:
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.
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.
Syntax:
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:
Syntax:
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: 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:
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.
Syntax:
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: 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:
All RIP configuration and status information is shown by the CLI command show ip rip
and options off that command.
Syntax:
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 |
||||||||||||
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:
|
||||||||||||
RIP peer information |
RIP peers are neighboring routers from which the routing switch has received RIP updates:
|
To display RIP interface information, enter the show ip rip interface
command at any context level.
Syntax:
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 <
command.vid
>
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:
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.)
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.
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).