- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
02-RIP Commands | 78.39 KB |
Table of Contents
Chapter 1 RIP Configuration Commands
1.1 RIP Configuration Commands
1.1.13 rip authentication-mode
1.1.23 traffic-share-across-interface
Chapter 1 RIP Configuration Commands
& Note:
When a switch runs a routing protocol, it can perform the router functions. The term “router” or the router icon in this document refers to a router in a generic sense or an S9500 switch running routing protocols.
1.1 RIP Configuration Commands
1.1.1 checkzero
Syntax
checkzero
undo checkzero
View
RIP view
Parameters
None
Description
Use the checkzero command to check the zero field of RIPv1 packet.
Use the undo checkzero command to disable the checking of the zero fields.
By default, RIPv1 performs zero field check.
According to the protocol specifications (RFC1058), some fields in RIPv1 packets must be zero, called zero fields. You can use the checkzero command to enable the zero field check operation on RIPv1 packet. During the zero field check operation, if a RIPv1 packet whose zero fields are not zeros is received, it will be rejected.
This command does not take effect on RIPv2 since RIPv2 packets have no zero fields.
Examples
# Disable zero field checking for RIPv1 packets.
[H3C-rip] undo checkzero
1.1.2 default cost
Syntax
default cost value
undo default cost
View
RIP view
Parameters
value: Default routing cost to be set, ranging from 1 to 16. The default value is 1.
Description
Use default cost command to set the default routing cost of an imported route.
Use the undo default cost command to restore the default value.
If no specific routing cost is specified when importing the route of another routing protocol with the import-route command, the redistribution will be performed with the default routing cost specified with the default cost command.
Related commands: import-route.
Examples
# Set the default routing cost of the imported route of another routing protocol to 3.
[H3C-rip] default cost 3
1.1.3 display rip
Syntax
display rip [ routing | vpn-instance ]
View
Any view
Parameters
routing: Displays RIP routing information.
vpn-instance: Displays VPN instance information.
Description
Use the display rip command to display the current RIP running state and its configuration information.
Examples
# Display the current running state and configuration information of RIP.
<H3C> display rip
RIP is running
public net VPN-Instance
Checkzero is on Default cost : 1
Summary is on Preference : 100
Traffic-share is off
Period update timer : 30
Timeout timer : 180
Garbage-collection timer : 120
No peer router
Network :
202.38.168.0
Table 1-1 Description on the fields of the display rip command
Field |
Description |
RIP is running |
RIP is active. |
public net VPN-Instance |
Public network in the VPN |
Checkzero is on |
Zero field checking is enabled. |
Default cost : 1 |
The default route cost is 1. |
Summary is on |
Routes are summarized automatically. |
Preference : 100 |
The preference of RIP is 100. |
Traffic-share is off |
Load balancing state for the interface |
Period update timer : 30 Timeout timer : 180 Garbage-collection timer : 120 |
Three timers of RIP |
No peer router |
No destination address of a transmission is specified. |
Network :202.38.168.0 |
RIP is enabled on network segment 202.38.168.0. |
1.1.4 filter-policy export
Syntax
filter-policy { acl-number | ip-prefix ip-prefix-name } export [ routing-protocol ]
undo filter-policy { acl-number | ip-prefix ip-prefix-name } export [ routing-protocol ]
View
RIP view
Parameters
acl-number: Access control list (ACL) number used for filtering the destination addresses of the routing information.
ip-prefix-name: Name of address prefix list used for filtering the destination addresses of the routing information.
routing-protocol: Routing protocol whose routing information is to be filtered. It can be direct, isis, bgp, ospf, ospf-ase, ospf-nssa, nat, and static at present.
Description
Use the filter-policy export command to configure to filter the advertised routing information by RIP.
Use the undo filter-policy export command to configure not to filter the advertised routing information.
By default, RIP does not filter the advertised routing information.
Related commands: acl, filter-policy import, ip ip-prefix.
& Note:
If no rule is specified in the filter-policy command, all routes are denied by default.
Examples
# Filter the advertised route information with ACL 2000.
[H3C-rip] filter-policy 2000 export
1.1.5 filter-policy import
Syntax
filter-policy gateway ip-prefix-name import
undo filter-policy gateway ip-prefix-name import
filter-policy { acl-number | ip-prefix ip-prefix-name [ gateway ip-prefix-name ] } import
undo filter-policy { acl-number | ip-prefix ip-prefix-name [ gateway ip-prefix-name ] } import
View
RIP view
Parameters
acl-number: Specifies an ACL for filtering the destination addresses of the routing information.
ip-prefix-name: Name of address prefix list used for filtering the destination addresses of the routing information.
gateway ip-prefix-name: Specifies the name of an address prefix list for filtering the addresses of the neighboring routers advertising the routing information.
Description
Use the filter-policy gateway import command to configure to filter the received routing information distributed from the specified address.
Use the undo filter-policy gateway import command to configure not to filter the received routing information distributed from the specified address.
Use the filter-policy import command to configure the filtering to the received global routing information.
Use the undo filter-policy import command to disable filtering to the received global routing information
By default, RIP does not filter the received routing information.
Related commands: acl, filter-policy export, ip ip-prefix.
& Note:
If no rule is specified in the filter-policy command, all routes are denied by default.
Examples
# Filter the received global routing information with ACL 2000.
[H3C-rip] filter-policy 2000 import
# Filter incoming routes from the addresses specified by IP prefix list 4.
[H3C-rip] filter-policy gateway 4 import
1.1.6 host-route
Syntax
host-route
undo host-route
View
RIP view
Parameters
None
Description
Use the host-route command to enable RIP to accept the host route.
Use the undo host-route command to reject the host route.
By default, RIP accepts the host route.
In some special cases, RIP receives a great number of host routes in the same network segment. These routes do not help routing much but occupy a lot of resources. In this case, the undo host-route command can be used to reject a host route.
Examples
# Configure RIP to reject the host route.
[H3C-rip] undo host-route
1.1.7 import-route
Syntax
import-route protocol [ cost value | route-policy route-policy-name ]*
undo import-route protocol
View
RIP view
Parameters
protocol: Specifies the source routing protocol to be redistributed by RIP. At present, RIP can redistribute the following routes: direct, bgp, ospf, ospf-ase, ospf-nssa, isis, nat, and static. When routes are redistributed from BGP, the allow-ibgp keyword can be specified to redistribute IBGP routes.
value: Cost value of the route to be redistributed.
Description
Use the import-route command to redistribute the routes of other protocols into RIP.
Use the undo import-route command to cancel the routes redistributed from other protocols.
By default, RIP does not redistribute any other route.
The import-route command is used to redistribute the route of another protocol by using a certain cost value. RIP regards the redistributed route as its own route and transmits it with the specified cost value. This command can greatly enhance the RIP capability of obtaining routes, thus increasing the RIP performance.
If the cost value is not specified, routes will be redistributed according to the default cost ranging from 1 to 16. If the cost value of the redistributed route is 16, then RIP continues to advertise this cost to other routers running RIP, and marks this route “Hold Down”. However, this router can still forward packets until the Garbage Collection timer times out (defaults to 120 seconds).
Related commands: default cost.
Examples
# Redistribute a static route with the cost value of 4.
[H3C-rip] import-route static cost 4
# Set the default cost and redistribute an OSPF route with the default cost.
[H3C-rip] default cost 3
[H3C-rip] import-route ospf
# Redistribute BGP routes, including IBGP routes.
[H3C-rip] import-route bgp allow-ibgp
1.1.8 network
Syntax
network network-address
undo network network-address
View
RIP view
Parameters
network-address: IP address of the RIP interface. It can be the IP network address of any interface.
Description
Use the network command to enable RIP for the specified network connected to the router.
Use the undo network command to disable RIP on the interface.
By default, all RIP interfaces are disabled.
RIP route processes are disabled on all interfaces by default. To enable a RIP route process on an interface, use the network command.
The undo network command is similar to the undo rip work command in terms of function. But they are not identical. Their similarity is that the interface using either command will not receive/transmit RIP routes. The difference between them is that, in the case of undo rip work, other interfaces will still forward the routes of the interface using the undo rip work command. In the case of undo network, other interfaces will not forward the routes of the interface using this command and it seems that the interface disappeared.
When the network command is used on an address, the effect is that the interface on the network segment at this address is enabled. For example, the results of viewing the network 129.102.1.1 with both the display current-configuration command and the display rip command are shown as the network 129.102.0.0.
Related commands: rip work.
Examples
# Enable RIP on the interface with the network address as 129.102.0.0.
[H3C-rip] network 129.102.0.0
1.1.9 peer
Syntax
peer ip-address
undo peer ip-address
View
RIP view
Parameters
ip-address: The interface IP address of the peer router, in dotted decimal format.
Description
Use the peer command to configure the sending destination address of the peer device. Use the undo peer command to cancel the set destination address.
By default, no peer IP address is specified.
RIP exchanges routing information with non-broadcast networks in unicast view. This command specifies the sending destination address to fit some non-broadcast networks. Usually, it is not recommended to use this command.
Examples
# Specify to send unicast updates to peer 202.38.165.1.
[H3C-rip] peer 202.38.165.1
1.1.10 preference
Syntax
preference value
undo preference
View
RIP view
Parameters
value: Preference value, ranging from 1 to 255. By default, the value is 100.
Description
Use the preference command to configure the route preference of RIP.
Use the undo preference command to restore the default preference.
Every routing protocol has its own preference. Its default value is determined by the specific routing policy. The preference will finally determine the routing algorithm to obtain the optimal route in the IP routing table. This command can be used to modify the RIP preference manually.
Examples
# Specify the RIP preference as 20.
[H3C-rip] preference 20
1.1.11 reset
Syntax
reset
View
RIP view
Parameters
None
Description
Use the reset command to reset the system configuration parameters of RIP.
When you need to reconfigure parameters of RIP, this command can be used to restore to the default setting.
Examples
# Reset the RIP system.
[H3C-rip] reset
1.1.12 rip
Syntax
rip
undo rip
View
system view
Parameters
None
Description
Use the rip command to enable RIP and enter RIP view.
Use the undo rip command to disable RIP.
By default, the system does not run RIP.
To enter RIP view to configure RIP global parameters, enable RIP first. But the configuration of parameters related to the interfaces is not restricted by the enabling/disabling of RIP.
& Note:
The interface parameters configured previously would be invalid when RIP is disabled or reset.
Examples
# Enable RIP and enter RIP view.
[H3C] rip
[H3C-rip]
1.1.13 rip authentication-mode
Syntax
rip authentication-mode { simple password-string | md5 { usual key-string | nonstandard key-string key-id } }
undo rip authentication-mode
View
Interface view
Parameters
simple: Simple text authentication mode.
password-string: Simple text authentication key. It is a string of 1 to 16 characters.
md5: MD5 cipher text authentication mode.
usual: Specifies the MD5 cipher text authentication packet to use the general packet format (RFC1723 standard format).
key-string: MD5 cipher text authentication key. If it is input in a plain text form, the MD5 key is a string of no more than 16 characters. And it will be displayed in a cipher text form in a length of 24 characters when the display current-configuration command is executed. Inputting the MD5 key in a cipher text form with 24 characters long is also supported.
nonstandard: Specifies the MD5 cipher text authentication packet to use a nonstandard packet format described in RFC2082.
key-id: MD5 cipher text authentication identifier, ranging from 1 to 255.
Description
Use the rip authentication-mode command to configure RIPv2 authentication mode and its parameters.
Use the undo rip authentication-mode command to cancel the RIPv2 authentication.
RIPv1 does not support authentication. There are two RIP authentication modes: simple authentication and MD5 cipher text authentication for RIPv2. When MD5 cipher text authentication mode is used, there are two types of packet formats. One of them is that described in RFC 1723, which was brought forward earlier. The other format is the one described specially in RFC 2082. The router supports both of the packet formats and the user can select either of them as required.
Related commands: rip version.
Examples
# Specify VLAN-interface 10 to use the simple authentication with the key as aaa.
[H3C] interface Vlan-interface 10
[H3C-Vlan-interface10] rip version 2
[H3C-Vlan-interface10] rip authentication-mode simple aaa
# Set MD5 authentication on VLAN-interface 10 with the key string as aaa and the packet type as usual.
[H3C] interface Vlan-interface 10
[H3C-Vlan-interface10] rip version 2
[H3C-Vlan-interface10] rip authentication-mode md5 usual aaa
1.1.14 rip input
Syntax
rip input
undo rip input
View
Interface view
Parameters
None
Description
Use the rip input command to allow an interface to receive RIP packets.
Use the undo rip input command to disable an interface from receiving RIP packets.
By default, all interfaces except loopback interfaces are enabled to receive RIP packets.
This command is used in cooperation with two other commands: rip output and rip work. Functionally, the rip work command is equivalent to the rip input command and the rip output command. The latter two control the receipt and the transmission of RIP packets respectively on an interface. The former command equals the functional combination of the latter two commands.
Related commands: rip output, rip work.
Examples
# Disable VLAN-interface 10 from receiving RIP packets.
[H3C-Vlan-interface10] undo rip input
1.1.15 rip metricin
Syntax
rip metricin value
undo rip metricin
View
Interface view
Parameters
value: Additional route metric added when an interface receives a packet, ranging from 0 to 16. By default, the value is 0.
Description
Use the rip metricin command to configure the additional route metric added to the route when an interface receives RIP packets.
Use the undo rip metricin command to restore the default value of this additional route metric.
Related commands: rip metricout.
Examples
# Specify the additional route metric to 2 when the interface VLAN-interface 10 receives RIP packets.
[H3C] interface Vlan-interface 10
[H3C-Vlan-interface10] rip metricin 2
1.1.16 rip metricout
Syntax
rip metricout value
undo rip metricout
View
Interface view
Parameters
value: Additional route metric added when an interface transmits a packet, ranging from 1 to 16. By default, the value is 1.
Description
Use the rip metricout command to configure the additional route metric to the route when an interface transmits RIP packets.
Use the undo rip metricout command to restore the default value of this additional route metric.
Related commands: rip metricin.
Examples
# Set the additional route metric to 2 when the interface VLAN-interface 10 transmits RIP packets.
[H3C] interface Vlan-interface 10
[H3C-Vlan-interface10] rip metricout 2
1.1.17 rip output
Syntax
rip output
undo rip output
View
Interface view
Parameters
None
Description
Use the rip output command to enable an interface to send RIP packets.
Use the undo rip output command to disable the interface from sending RIP packets.
By default, all interfaces except loopback interfaces are enabled to send RIP packets.
This command is used in cooperation with two other commands: rip input and rip work. Functionally, the rip work command is equivalent to the rip input command and the rip output command. The latter two control the receipt and the transmission of RIP packets respectively on an interface. The former command equals the functional combination of the latter two commands.
Related commands: rip input, rip work.
Examples
# Disable the interface VLAN-interface 10 from sending RIP packets.
[H3C] interface Vlan-interface 10
[H3C-Vlan-interface10] undo rip output
1.1.18 rip split-horizon
Syntax
rip split-horizon
undo rip split-horizon
View
Interface view
Parameters
None
Description
Use the rip split-horizon command to configure an interface to use split horizon when transmitting RIP packets.
Use undo rip split-horizon command to configure an interface not to use split horizon when transmitting RIP packets.
By default, an interface is enabled to use split horizon when transmitting RIP packets.
Normally, split horizon is necessary for reducing route loops. In some special cases, you need to disable split horizon to ensure the correct execution of protocols. Do so only when necessary.
Examples
# Disable VLAN-interface 10 from using split horizon when processing RIP packets.
[H3C] interface Vlan-interface 10
[H3C-Vlan-interface10] undo rip split-horizon
1.1.19 rip version
Syntax
rip version 1
rip version 2 [ broadcast | multicast ]
undo rip version
View
Interface view
Parameters
1: Specifies the version of RIP packets on an interface as RIPv1.
2: Specifies the version of RIP packets on an interface as RIPv2.
broadcast: Sends RIPv2 packets in broadcast mode.
multicast: Sends RIPv2 packets in multicast mode.
Description
Use the rip version command to configure the version of RIP packets on an interface. Use the undo rip version command to restore the default value of RIP packet version on the interface.
By default, the interface RIP version is RIPv1. RIPv1 transmits packets in broadcast mode, while RIPv2 transmits packets in multicast mode by default.
When running RIPv1, the interface only receives and transmits RIPv1 broadcast packets, and receives RIPv2 broadcast packets, but does not receive RIPv2 multicast packets. When running RIPv2 in broadcast mode, the interface only receives and transmits RIPv2 broadcast packets, receives RIPv1 packets and RIPv2 multicast packets. When running RIPv2 in multicast mode, the interface only receives and transmits RIPv2 multicast packets, receives RIPv2 broadcast packets, but does not receive RIPv1 packets.
Examples
# Configure VLAN-interface 10 to broadcast RIPv2 packets.
[H3C] interface Vlan-interface 10
[H3C-Vlan-interface10] rip version 2 broadcast
1.1.20 rip work
Syntax
rip work
undo rip work
View
Interface view
Parameters
None
Description
Use the rip work command to enable the running of RIP on an interface.
Use the undo rip work command to disable the running of RIP on an interface.
By default, RIP is enabled on an interface.
This command is used in cooperation with the rip input, rip output, and network commands.
Related commands: network, rip input, rip output.
Examples
# Disable RIP on VLAN-interface 10.
[H3C] interface Vlan-interface 10
[H3C-Vlan-interface10] undo rip work
1.1.21 summary
Syntax
summary
undo summary
View
RIP view
Parameters
None
Description
Use the summary command to configure to activate RIPv2 automatic route summarization.
Use the undo summary command to disable RIPv2 automatic route summarization.
By default, RIPv2 route summarization is used.
Automatic route summarization can be performed to reduce the routing traffic on the network as well as to reduce the size of the routing table. If RIPv2 is used, route summarization function can be disabled with the undo summary command, when it is necessary to broadcast the subnet route.
RIPv1 does not support subnet masks. Forwarding subnet route may cause ambiguity. Therefore, RIPv1 uses route summarization all the time. Thus, the undo summary command does not take effect on RIPv1.
Related commands: rip version.
Examples
# Set the RIP version on VLAN-interface 10 to RIPv2 and disable the route summarization function.
[H3C] interface Vlan-interface 10
[H3C-Vlan-interface10] rip version 2
[H3C-Vlan-interface10] quit
[H3C] rip
[H3C-rip] undo summary
1.1.22 timers
Syntax
timers { update update-timer-length | timeout timeout-timer-length } *
undo timers { update | timeout } *
View
RIP view
Parameters
update-timer-length: Value of the Period Update timer, ranging from 1 to 3600 seconds. By default, it is 30 seconds.
timeout-timer-length: Value of the Timeout timer, ranging from 1 to 3600 seconds. By default, it is 180 seconds.
Description
Use the timers command to modify the values of the three RIP timers: Period Update, Timeout, and Garbage-collection.
Use the undo timers command to restore the default settings.
By default, the values of Period Update, Timeout, and Garbage-collection timers are 30 seconds, 180 seconds, and 120 seconds respectively.
Generally, the value of Garbage-collection timer is fixed to four times of that of Period Update timer. Adjusting Period Update timer will affect Garbage-collection timer.
The modification of RIP timers is validated immediately.
Related commands: display rip.
Examples
# Set the Period Update timer and Timeout timer of RIP to 10 seconds and 30 seconds respectively.
[H3C] rip
[H3C-rip] timers update 10 timeout 30
1.1.23 traffic-share-across-interface
Syntax
traffic-share-across-interface
undo traffic-share-across-interface
View
RIP view
Parameters
None
Description
Use the traffic-share-across-interface command to enable traffic sharing across RIP interfaces; namely, distribute traffic over equivalent routes across the interfaces on a router.
Use the undo traffic-share-across-interface command to disable this function.
By default, traffic sharing across interfaces is disabled.
In the case the number of equal-cost routes reaches the upper limit:
l With this function enabled, the newly learned equal-cost routes replace the old ones in the routing table.
l With this function disabled, if there are equal cost routes reaching the set age time, the router will replace them with the newly learned equal cost routes. Otherwise, the router drops the equal-cost route newly learned.
Examples
# Enable traffic sharing on RIP interfaces.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] rip
[H3C-rip] traffic-share-across-interface