- Table of Contents
-
- H3C S3600 Command Manual-Release 1602(V1.02)
- 00-1Cover
- 01-CLI Command
- 02-Login Command
- 03-Configuration File Management Command
- 04-VLAN Command
- 05-IP Address and Performance Command
- 06-Voice VLAN Command
- 07-GVRP Command
- 08-Port Basic Configuration Command
- 09-Link Aggregation Command
- 10-Port Isolation Command
- 11-Port Security-Port Binding Command
- 12-DLDP Command
- 13-MAC Address Table Management Command
- 14-Auto Detect Command
- 15-MSTP Command
- 16-Routing Protocol Command
- 17-Multicast Command
- 18-802.1x and System Guard Command
- 19-AAA Command
- 20-Web Authentication Command
- 21-MAC Address Authentication Command
- 22-VRRP Command
- 23-ARP Command
- 24-DHCP Command
- 25-ACL Command
- 26-QoS-QoS Profile Command
- 27-Web Cache Redirection Command
- 28-Mirroring Command
- 29-IRF Fabric Command
- 30-Cluster Command
- 31-PoE-PoE Profile Command
- 32-UDP Helper Command
- 33-SNMP-RMON Command
- 34-NTP Command
- 35-SSH Command
- 36-File System Management Command
- 37-FTP-SFTP-TFTP Command
- 38-Information Center Command
- 39-System Maintenance and Debugging Command
- 40-VLAN-VPN Command
- 41-HWPing Command
- 42-IPv6 Management Command
- 43-DNS Command
- 44-Smart Link-Monitor Link Command
- 45-Access Management Command
- 46-Appendix
- Related Documents
-
Title | Size | Download |
---|---|---|
16-Routing Protocol Command | 438.3 KB |
Table of Contents
display ip routing-table ip-address
display ip routing-table ip-address1 ip-address2
display ip routing-table ip-prefix
display ip routing-table protocol
display ip routing-table radix
display ip routing-table statistics
display ip routing-table verbose
reset ip routing-table statistics protocol
2 Static Route Configuration Commands
Static Route Configuration Commands
traffic-share-across-interface
5 IP Routing Policy Configuration Commands
IP Routing Policy Configuration Commands
6 Route Capacity Configuration Commands
Route Capacity Configuration Commands
l The term router in this chapter refers to a router in a generic sense or an Ethernet switch running a routing protocol.
l The S3600-SI series do not support OSPF.
l The feature of specifying the ABR of an NSSA area as the Type-7 LSAs translator is added. For the command used, refer to nssa.
l The feature of configuring an OSPF interface to unicast packets on a P2MP network is added. For the command used, refer to ospf network-type.
IP Routing Table Commands
display ip routing-table
Syntax
display ip routing-table [ | { begin | exclude | include } regular-expression ]
View
Any view
Parameters
regular-expression: Regular expression, a string of 1 to 256 case-sensitive characters used for specifying routing entries.
|: Uses the regular expression to match the output routing information.
begin: Displays the routing information from the route entry containing the specified character string.
include: Displays all routing information containing the specified character string.
exclude: Displays all routing information without the specified character string.
For details about regular expressions, refer to Configuration File Management Operation of this manual.
Description
Use the display ip routing-table command to display the routing table summary.
This command displays the summary of the routing table. Each line represents one route, containing destination address/mask length, protocol, preference, cost, next hop, and output interface.
This command displays only the currently used routes, that is, the optimal routes.
Examples
# Display the summary of the current routing table.
<Sysname> display ip routing-table
Destination/Mask Protocol Pre Cost Nexthop Interface
1.1.1.0/24 DIRECT 0 0 1.1.1.1 Vlan-interface1
1.1.1.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0
2.2.2.0/24 DIRECT 0 0 2.2.2.1 Vlan-interface2
2.2.2.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0
3.3.3.0/24 DIRECT 0 0 3.3.3.1 Vlan-interface3
3.3.3.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0
4.4.4.0/24 DIRECT 0 0 4.4.4.1 Vlan-interface4
4.4.4.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0
127.0.0.0/8 DIRECT 0 0 127.0.0.1 InLoopBack0
127.0.0.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0
# Display the routing information from the entry containing the character string interface4 in the current routing table.
<Sysname> display ip routing-table | begin interface4
Routing Table: public net
4.4.4.0/24 DIRECT 0 0 4.4.4.1 Vlan-interface4
4.4.4.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0
127.0.0.0/8 DIRECT 0 0 127.0.0.1 InLoopBack0
127.0.0.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0
# Display the routing information containing the character string interface4 in the current routing table.
<Sysname> display ip routing-table | include interface4
Routing Table: public net
Destination/Mask Protocol Pre Cost Nexthop Interface
4.4.4.0/24 DIRECT 0 0 4.4.4.1 Vlan-interface4
# Display the routing information without the character string interface4 in the current routing table.
<Sysname> display ip routing-table | exclude interface4
Routing Table: public net
Destination/Mask Protocol Pre Cost Nexthop Interface
1.1.1.0/24 DIRECT 0 0 1.1.1.1 Vlan-interface1
1.1.1.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0
2.2.2.0/24 DIRECT 0 0 2.2.2.1 Vlan-interface2
2.2.2.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0
3.3.3.0/24 DIRECT 0 0 3.3.3.1 Vlan-interface3
3.3.3.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0
4.4.4.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0
127.0.0.0/8 DIRECT 0 0 127.0.0.1 InLoopBack0
127.0.0.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0
Table 1-1 Description on the fields of the display ip routing-table command
Field |
Description |
Destination/Mask |
Destination address/mask length |
Protocol |
Routing protocol |
Pre |
Route preference |
Cost |
Route cost |
Nexthop |
Next hop address |
Interface |
Output interface, through which the data packets destined for the destination network segment are sent |
display ip routing-table acl
Syntax
display ip routing-table acl acl-number [ verbose ]
View
Any view
Parameters
acl-number: Basic access control list number, in the range of 2000 to 2999.
verbose: With this keyword specified, detailed information of routes in the active or inactive state that match the ACL is displayed. With this keyword not specified, brief information of only the routes in the active state that match the ACL is displayed.
Description
Use the display ip routing-table acl command to display the information of routes that match the specified ACL.
Examples
# Display the information of ACL 2100.
<Sysname> display acl 2100
Basic ACL 2100, 1 rule
Acl's step is 1
rule 0 permit source 192.168.1.0 0.0.0.255
For details about the display acl command, refer to ACL Command.
# Display the information of routes that match ACL 2100.
<Sysname> display ip routing-table acl 2100
Routes matched by access-list 2100:
Summary count: 2
Destination/Mask Protocol Pre Cost Nexthop Interface
192.168.1.0/24 DIRECT 0 0 192.168.1.2 Vlan-interface2
192.168.1.2/32 DIRECT 0 0 127.0.0.1 InLoopBack0
For descriptions of the above fields, refer to Table 1-1.
# Display the detailed information of routes that match ACL 2100.
<Sysname> display ip routing-table acl 2100 verbose
Routes matched by access-list 2100:
+ = Active Route, - = Last Active, # = Both * = Next hop in use
Summary count: 3
**Destination: 192.168.1.0 Mask: 255.255.255.0
Protocol: #DIRECT Preference: 0
*NextHop: 192.168.1.2 Interface: 192.168.1.2(Vlan-interface2)
State: <Int ActiveU Retain Unicast>
Age: 21:34:13 Cost: 0/0
**Destination: 192.168.1.2 Mask: 255.255.255.255
Protocol: #DIRECT Preference: 0
*NextHop: 127.0.0.1 Interface: 127.0.0.1(InLoopBack0)
State: <NoAdvise Int ActiveU Retain Gateway Unicast>
Age: 21:34:13 Cost: 0/0
Table 1-2 Description on the fields of the display ip routing-table command
Field |
Description |
|
Destination |
Destination address |
|
Mask |
Subnet mask |
|
Protocol |
Protocol that discovers the route |
|
Preference |
Route preference |
|
Nexthop |
Next hop to the destination |
|
Interface |
Outbound interface through which data packets are forwarded to the destination network segment. |
|
State |
Description of route state: |
|
ActiveU |
An active unicast route, where “U” represents unicast. |
|
Blackhole |
A blackhole route is similar to a reject route, but no ICMP unreachable message is sent to the source. |
|
Delete |
A route is to be deleted. |
|
Gateway |
An indirect route. |
|
Hidden |
An existing route that is temporarily unavailable for some reason (for example, suppressed by a routing policy or down interface). However, deletion is not expected. It is therefore hidden so that it can recover later. |
|
Holddown |
Number of routes that are held down. Holddown is a route advertisement policy that some D-V based routing protocols (for example, RIP) use to avoid the spread of wrong routes but speed up the correct spread of ICMP unreachable messages. A certain route is advertised at intervals, no matter whether the currently discovered route to the same destination changes. For details, refer to the specific routing protocols. |
|
Int |
A route discovered by IGP. |
|
NoAdvise |
A routing protocol does not advertise any NoAdvise route when advertising routes in accordance with a routing policy. |
|
NotInstall |
A NotInstall route cannot be added to the core routing table, but may be advertised. A route with the highest priority is generally selected from the routing table, added to the core routing table, and then advertised. |
|
Reject |
The routes marked with reject do not guide the router to forward packets as a normal route does. The router discards the packets matching reject routes and sends an ICMP unreachable message to the source. Reject routes are usually used for network tests. |
|
Retain |
The routes marked with retain will not be deleted when you delete routes in the core routing table. You can mark static routes with retain to make them stay in the core routing table. |
|
Static |
The routes marked with static will not be deleted from the routing table after you perform a save operation and restart the router. The routes manually configured on a router are marked with static. |
|
Unicast |
A unicast route. |
|
Age |
Lifetime of a route in the routing table, in the format of HH:MM:SS. |
|
Cost |
Cost of a route. |
display ip routing-table ip-address
Syntax
display ip routing-table ip-address [ mask | mask-length ] [ longer-match ] [ verbose ]
View
Any view
Parameters
ip-address: Destination IP address, in dotted decimal notation.
mask: Subnet mask, in dotted decimal notation.
mask-length: Length of a subnet mask, in the range of 0 to 32.
longer-match: Specifies all the routes that lead to the destination address and match the specified mask. If you do not specify the mask argument, those that match the natural mask are specified.
verbose: Displays the detailed information of routes.
Description
Use the display ip routing-table ip-address command to display the routing information of the specified destination address.
With different arguments provided, the command output is different. The following is the command output with different arguments provided:
l display ip routing-table ip-address
If the destination address ip-address corresponds to a route in the natural mask range, this command displays the route that is the longest match of the destination address ip-address and is active.
l display ip routing-table ip-address mask
This command only displays the routes exactly matching the specified destination address and mask.
l display ip routing-table ip-address longer-match
This command displays all destination address routes matching the specified destination address in the natural mask range.
l display ip routing-table ip-address mask longer-match
This command displays all destination address routes matching the specified destination address in the specified mask range.
Examples
# Display the brief information of routes with a natural mask.
<Sysname> display ip routing-table 169.0.0.0
Destination/Mask Protocol Pre Cost Nexthop Interface
169.0.0.0/16 Static 60 0 2.1.1.1 LoopBack1
For descriptions of the above fields, see Table 1-1.
# Display the detailed information of routes with a natural mask.
<Sysname> display ip routing-table 169.253.0.0 verbose
Routing Tables:
+ = Active Route, - = Last Active, # = Both * = Next hop in use
Summary count:1
**Destination: 169.0.0.0 Mask: 255.0.0.0
Protocol: #Static Preference: -60
*NextHop: 2.1.1.1 Interface: 2.1.1.1(LoopBack1)
State: <Int ActiveU Static Unicast>
Age: 3:47 Cost: 0/0
For descriptions of the above fields, see Table 1-2.
display ip routing-table ip-address1 ip-address2
Syntax
display ip routing-table ip-address1 { mask1 | mask-length1 } ip-address2 { mask2 | mask-length2 } [ verbose ]
View
Any view
Parameters
ip-address1, ip-address2: Destination IP address in dotted decimal notation. ip-address1 {mask1 | mask-length1} and ip-address2 {mask2 | mask-length2} determine one address range together. ip-address1 ANDed with {mask1 | mask-length1} specifies the start of the range, while ip-address2 ANDed with {mask2 | mask-length2} specifies the end. This command displays the route in this address range.
mask1, mask2: Subnet mask, in dotted decimal notation.
mask-length1, mask-length2: Mask length, in the ranges of 0 to 32.
verbose: With the verbose argument provided, this command displays the verbose information of both active and inactive routes. Without this argument provided, this command displays the summary of active routes only.
Description
Use the display ip routing-table ip-address1 ip-address2 command to display the route information in the specified destination address range.
Examples
# Display the routing information of destination addresses ranging from 1.1.1.0 to 2.2.2.0.
<Sysname>display ip routing-table 1.1.1.0 24 2.2.2.0 24
Routing tables:
Summary count: 3
Destination/Mask Protocol Pre Cost Nexthop Interface
1.1.1.0/24 DIRECT 0 0 1.1.1.1 Vlan-interface1
1.1.1.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0
2.2.2.0/24 DIRECT 0 0 2.2.2.1 Vlan-interface2
For descriptions of the above fields, see Table 1-1.
display ip routing-table ip-prefix
Syntax
display ip routing-table ip-prefix ip-prefix-name [ verbose ]
View
Any view
Parameters
ip-prefix-name: IP prefix list name, a string of 1 to 19 characters.
verbose: With this keyword specified, detailed information of routes in the active or inactive state that match the IP prefix list is displayed. With this keyword not specified, brief information of only the routes in the active state that match the prefix list is displayed.
Description
Use the display ip routing-table ip-prefix command to display the information of routes matching the specified IP prefix list.
Examples
# Display the brief information of routes in the active state that match the prefix list abc2.
<Sysname>system-view
System View: return to User View with Ctrl+Z.
[Sysname] ip ip-prefix abc2 permit 10.1.1.0 24 less-equal 32
[Sysname] display ip routing-table ip-prefix abc2
Routes matched by ip-prefix abc2:
Summary count: 2
Destination/Mask Protocol Pre Cost Nexthop Interface
10.1.1.0/24 DIRECT 0 0 10.1.1.2 Vlan-interface1
10.1.1.2/32 DIRECT 0 0 127.0.0.1 InLoopBack0
For descriptions of the above fields, see Table 1-1.
# Display the detailed information of routes in the active or inactive state that match the prefix list abc2.
[Sysname] display ip routing-table ip-prefix abc2 verbose
Routes matched by ip-prefix abc2:
+ = Active Route, - = Last Active, # = Both * = Next hop in use
Summary count: 2
**Destination: 10.1.1.0 Mask: 255.255.255.0
Protocol: #DIRECT Preference: 0
*NextHop: 10.1.1.2 Interface: 10.1.1.2(Vlan-interface1)
State: <Int ActiveU Retain Unicast>
Age: 3:23:44 Cost: 0/0
**Destination: 10.1.1.2 Mask: 255.255.255.255
Protocol: #DIRECT Preference: 0
*NextHop: 127.0.0.1 Interface: 127.0.0.1(InLoopBack0)
State: <NoAdvise Int ActiveU Retain Gateway Unicast>
Age: 3:23:44 Cost: 0/0
For descriptions of the above fields, see Table 1-2.
display ip routing-table protocol
Syntax
display ip routing-table protocol protocol [ inactive | verbose ]
View
Any view
Parameters
protocol: You can provide one of the following values for this argument.
l direct: Displays direct-connect route information
l ospf: Displays OSPF route information.
l ospf-ase: Displays OSPF ASE route information.
l ospf-nssa: Displays OSPF not-so-stubby area (NSSA) route information.
l rip: Displays RIP route information.
l static: Displays static route information.
inactive: With this argument provided, this command displays the inactive route information. Without this argument provided, this command displays both active and inactive route information.
verbose: With this keyword specified, detailed information of routes in the active or inactive state is displayed. With this keyword not specified, brief information of only the routes in the active state is displayed.
Description
Use the display ip routing-table protocol command to display the route information of a specific protocol.
Examples
# Display the summary of all direct-connect routes.
<Sysname> display ip routing-table protocol direct
DIRECT Routing tables:
Summary count: 4
DIRECT Routing tables status:<active>:
Summary count: 3
Destination/Mask Protocol Pre Cost Nexthop Interface
20.1.1.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0
127.0.0.0/8 DIRECT 0 0 127.0.0.1 InLoopBack0
127.0.0.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0
DIRECT Routing tables status:<inactive>:
Summary count: 1
Destination/Mask Protocol Pre Cost Nexthop Interface
210.0.0.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0
For detailed description of the output information, see Table 1-1.
display ip routing-table radix
Syntax
display ip routing-table radix
View
Any view
Parameters
None
Description
Use the display ip routing-table radix command to display the route information in a tree structure.
Examples
<Sysname> display ip routing-table radix
Radix tree for INET (2) inodes 7 routes 5:
+-32+--{210.0.0.1
+--0+
| | +--8+--{127.0.0.0
| | | +-32+--{127.0.0.1
| +--1+
| +--8+--{20.0.0.0
| +-32+--{20.1.1.1
Table 1-3 Description on the fields of the display ip routing-table radix command
Field |
Description |
INET |
Address suite |
Inodes |
Number of nodes |
Routes |
Number of routes |
display ip routing-table statistics
Syntax
display ip routing-table statistics
View
Any view
Parameters
None
Description
Use the display ip routing-table statistics command to display the integrated routing information.
The integrated routing information includes the total number of routes, the number of active routes, the number of routes added by protocols, and the number of routes deleted.
Examples
# Display the integrated route information.
<Sysname> display ip routing-table statistics
Routing tables:
Proto route active added deleted
DIRECT 24 4 25 1
STATIC 4 1 4 0
RIP 0 0 0 0
OSPF 0 0 0 0
O_ASE 0 0 0 0
O_NSSA 0 0 0 0
Total 28 5 29 1
Table 1-4 Description on the fields of the display ip routing-table statistics command
Field |
Description |
Proto |
Routing protocol type O_ASE: OSPF_ASE O_NSSA: OSPF NSSA AGGRE: Aggregation protocol |
Route |
Total number of routes |
Active |
Number of active routes |
Added |
Number of routes added after the router is rebooted or the routing table is cleared last time. |
Deleted |
Number of routes deleted (Such routes will be freed in a period of time) |
Total |
Total number of the different kinds of routes |
display ip routing-table verbose
Syntax
display ip routing-table verbose
View
Any view
Parameters
None
Description
Use the display ip routing-table verbose command to display the detailed information of a routing table, including inactive routes and null routes. The information displayed includes route state descriptor, statistics of the routing table, and detailed information of each route.
Examples
# Display the verbose routing table information.
<Sysname> display ip routing-table verbose
Routing Tables:
+ = Active Route, - = Last Active, # = Both * = Next hop in use
Destinations: 3 Routes: 3
Holddown: 0 Delete: 62 Hidden: 0
**Destination: 1.1.1.0 Mask: 255.255.255.0
Protocol: #DIRECT Preference: 0
*NextHop: 1.1.1.1 Interface: 1.1.1.1(Vlan-interface1)
State: <Int ActiveU Retain Unicast>
Age: 20:17:41 Cost: 0/0
**Destination: 1.1.1.1 Mask: 255.255.255.255
Protocol: #DIRECT Preference: 0
*NextHop: 127.0.0.1 Interface: 127.0.0.1(InLoopBack0)
State: <NoAdvise Int ActiveU Retain Gateway Unicast>
Age: 20:17:42 Cost: 0/0
**Destination: 2.2.2.0 Mask: 255.255.255.0
Protocol: #DIRECT Preference: 0
*NextHop: 2.2.2.1 Interface: 2.2.2.1(Vlan-interface2)
State: <Int ActiveU Retain Unicast>
Age: 20:08:05 Cost: 0/0
For descriptions of route states, see Table 1-2.
Table 1-5 lists the statistics of the routing table.
Table 1-5 Description on the fields of the display ip routing-table verbose command
Field |
Description |
Holddown |
Number of suppressed routes |
Delete |
Number of deleted routes |
Hidden |
Number of hidden routes |
reset ip routing-table statistics protocol
Syntax
reset ip routing-table statistics protocol { all | protocol }
View
User view
Parameters
all: Specifies all protocols.
protocol: Specifies a protocol, which can be direct, ospf, ospf_ase, ospf_nssa, rip, or static.
Description
Use the reset ip routing-table statistics protocol command to clear the statistics of routes in a routing table.
Examples
# Before executing the reset ip routing-table statistics protocol command, use the display ip routing-table statistics command to display the routing statistics:
<Sysname> display ip routing-table statistics
Routing tables:
Proto route active added deleted
DIRECT 4 4 12 8
STATIC 0 0 0 0
RIP 0 0 0 0
OSPF 0 0 0 0
O_ASE 0 0 0 0
O_NSSA 0 0 0 0
Total 4 4 12 8
# Clear the routing statistics of all protocols from the IP routing table.
<Sysname> reset ip routing-table statistics protocol all
# Display the routing statistics in the IP routing table.
<Sysname> display ip routing-table statistics
Routing tables:
Proto route active added deleted
DIRECT 4 4 0 0
STATIC 0 0 0 0
RIP 0 0 0 0
OSPF 0 0 0 0
O_ASE 0 0 0 0
O_NSSA 0 0 0 0
Total 4 4 0 0
The above information shows that the routing statistics in the IP routing table is cleared.
The term router in this chapter refers to a router in a generic sense or an Ethernet switch running a routing protocol.
Static Route Configuration Commands
delete static-routes all
Syntax
delete static-routes all
View
System view
Parameters
None
Description
Use the delete static-routes all command to delete all static routes.
The system will request your confirmation before it deletes all the configured static routes.
Related commands: ip route-static, display ip routing-table.
Examples
# Delete all the static routes in the router.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] delete static-routes all
Are you sure to delete all the unicast static routes?[Y/N]y
ip route-static
Syntax
ip route-static ip-address { mask | mask-length } { interface-type interface-number | next-hop } [ preference preference-value ] [ reject | blackhole ] [ detect-group group number ] [ description text ]
undo ip route-static ip-address { mask | mask-length } [ interface-type interface-number | next-hop ] [ preference preference-value ]
View
System view
Parameters
ip-address: Destination IP address, in dotted decimal notation.
mask: Subnet mask, in dotted decimal notation.
mask-length: Mask length, in the range of 0 to 32.
interface-type interface-number: Next-hop outbound interface.
next-hop: Next hop IP address of the route, in dotted decimal notation.
preference preference-value: Preference level of a static route, in the range of 1 to 255. The default preference is 60.
reject: Indicates the destination is unreachable. If a static route to a destination is marked with reject, all IP packets destined for this destination will be discarded, and the source host will be informed that the destination is unreachable.
blackhole: Indicates a blackhole route. If a static route to a destination is marked with blackhole, the outbound interface of this route is the Null 0 interface regardless of the next hop address, and all the IP packet addresses destined for this destination are dropped without the source host being notified.
description text: Provides a description for the current route, which is a string of 1 to 60 characters.
detect-group group number: Specifies a detect group number, which ranges from 1 to 25.
l If you specify the next-hop outgoing interface when configuring a static route, the type of outgoing interface can be Null only.
l The packets sent to a Null interface, which is a virtual interface, will be discarded immediately. This can decrease the system load.
l For automatic detection information, refer to the part discussing Auto Detect.
Description
Use the ip route-static command to configure a static route.
Use the undo ip route-static command to delete a static route.
By default, the system can obtain the subnet route directly connected to the router. When you configure a static route, if no preference is specified for the route, the preference defaults to 60, and if the route is not specified as reject or blackhole, the route will be reachable by default.
When configuring a static route, note the following points:
l If the destination IP address and the mask are both 0.0.0.0, what you are configuring is a default route. All the packets that fail to find a routing entry will be forwarded through this default route.
l You cannot configure an interface address of the local switch as the next hop address of a static route.
l You can configure a different preference to implement flexible route management policy.
Related commands: display ip routing-table.
Examples
# Configure the next hop of the default route as 129.102.0.2.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ip route-static 0.0.0.0 0.0.0.0 129.102.0.2
The term router in this chapter refers to a router in a generic sense or an Ethernet switch running a routing protocol.
RIP Configuration Commands
checkzero
Syntax
checkzero
undo checkzero
View
RIP view
Parameters
None
Description
Use the checkzero command to enable the must be zero field check for RIP-1 packets.
Use the undo checkzero command to disable the must be zero field check for RIP-1 packets.
By default, RIP-1 performs the must be zero field check.
According to the protocol (RFC 1058) specifications, some fields in RIP-1 packets must be zero and these fields are called zero fields. You can use the checkzero command to enable/disable the must be zero field check for RIP-1 packets. When the must be zero field check is enabled, if the must be zero field in an incoming RIP-1 packet is non-zero, the packet will be rejected.
Examples
# Disable the must be zero field check for RIP-1 packets.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] rip
[Sysname-rip] undo checkzero
default cost
Syntax
default cost value
undo default cost
View
RIP view
Parameters
value: Default cost, in the range of 1 to 16.
Description
Use the default cost command to set the default cost for redistributed routes.
Use the undo default cost command to restore the default.
By default, the default cost of a redistributed route is 1.
If no cost is specified when you use the import-route command to redistribute routes from another routing protocol, the routes will be redistributed with the default cost specified with the default cost command.
Related commands: import-route.
Examples
# Redistribute static routes and set the default cost of the redistributed routes to 3.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] rip
[Sysname-rip] import-route static
[Sysname-rip] default cost 3
display rip
Syntax
display rip
View
Any view
Parameters
None
Description
Use the display rip command to display the current RIP operation state and RIP configuration.
Examples
# Display the current RIP operation state and configuration.
<Sysname> display rip
RIP is running
Checkzero is on Default cost : 1
Summary is on Preference : 100
Traffic-share-across-interface is off
Period update timer : 30
Timeout timer : 180
Garbage-collection timer : 120
No peer router
Network :
202.38.168.0
Table 3-1 Description on the fields of the display rip command
Field |
Description |
RIP is running |
RIP is active. |
Checkzero |
State of the must be zero field check for RIP-1 packets on: Enabled off: Disabled |
Default cost |
Default cost for redistributed routes |
Summary |
State of the automatic route summarization function: on: Enabled off: Disabled |
Preference |
RIP preference |
Period update timer |
Length of the period update timer in seconds |
Timeout timer |
Length of the timeout timer in seconds |
Garbage-collection timer |
Length of the garbage-collection timer in seconds |
No peer router |
No destination address of a transmission is specified |
Network |
Network segment on which RIP is enabled |
Traffic-share-across-interface |
State of load sharing among interfaces: on: Enabled off: Disabled |
display rip interface
Syntax
display rip interface
View
Any view
Parameters
None
Description
Use the display rip interface command to display RIP interface information.
Examples
# Display RIP interface information.
<Sysname> display rip interface
RIP Interface: public net
Address Interface Ver MetrIn/Out Input Output Split-horizon
1.0.0.1 Vlan-interface100 2 0/1 on on on
Table 3-2 Description on the fields of the display rip interface command
Field |
Description |
Address |
IP address of the interface running RIP (You need to use the network command to enable the network segment on which the address resides.) |
Interface |
Name of the interface running RIP. The IP address of the interface corresponds to that in the Address field. |
Ver |
Version of RIP running on the interface |
MetrIn/Out |
Additional metric added when a route is received/sent |
Input |
Indicates whether to allow the interface to receive RIP packets (on means yes; off means no). |
Output |
Indicates whether to allow the interface to send RIP packets (on means yes; off means no). |
Split-horizon |
Indicates whether split horizon is enabled (on means yes; off means no) |
display rip routing
Syntax
display rip routing
View
Any view
Parameters
None
Description
Use the display rip routing command to display RIP routing information.
Examples
# Display the information of the RIP routing table.
<Sysname> display rip routing
RIP routing table: public net
A = Active I = Inactive G = Garbage collection
C = Change T = Trigger RIP
Destination/Mask Cost NextHop Age SourceGateway Att
192.168.110.0/24 1 31.31.31.8 7s 31.31.31.8 A
200.1.1.0/24 1 31.31.31.8 7s 31.31.31.8 A
130.1.0.0/16 1 31.31.31.8 7s 31.31.31.8 A
Table 3-3 Description on the fields of the display rip routing command
Field |
Description |
Destination/Mask |
Destination address/Mask |
Cost |
Cost |
NextHop |
Net hop address |
Age |
Time elapsed after the route is advertised |
SourceGateway |
Gateway originating the route |
Att |
Attributes of a route: A: Active route I: Inactive route G: Working state of the garbage collection timer C: Change state T: Triggered RIP |
filter-policy export
Syntax
filter-policy { acl-number | ip-prefix ip-prefix-name } export [ protocol [ process-id ] ]
undo filter-policy { acl-number | ip-prefix ip-prefix-name } export [ protocol [ process-id ] ]
filter-policy route-policy route-policy-name export
undo filter-policy route-policy route-policy-name export
View
RIP view
Parameters
acl-number: Number of the basic or advanced ACL used to filter routing information by destination address, in the range of 2000 to 3999.
ip-prefix-name: Name of the address ip-prefix list used to filter routing information by destination address, a string of 1 to 19 characters.
route-policy-name: Name of the route-policy used to filter routing information, a string of 1 to 19 characters.
protocol: Filters routing protocol redistributed from the protocol. Currently, this argument can be direct, ospf, ospf-ase, ospf-nssa, or static.
process-id: Process ID of the routing protocol whose routing information is to be filtered, in the range of 1 to 65535. This argument is valid only for ospf, ospf-ase, and ospf-nssa.
Description
Use the filter-policy export command to enable RIP to filter the outgoing routing information.
Use the undo filter-policy export command to disable RIP from filtering the outgoing routing information.
Note that, if protocol is specified, RIP filters only the outgoing routes redistributed from the specified routing protocol. Otherwise, RIP filters all routes to be advertised.
By default, RIP does not filter advertised routing information.
Related commands: acl, filter-policy import, ip ip-prefix.
For details about ACL, refer to ACL Operation.
Examples
# Apply ACL 2000 to filter the outgoing routing information.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] rip
[Sysname-rip] filter-policy 2000 export
filter-policy import
Syntax
filter-policy { acl-number | ip-prefix ip-prefix-name [ gateway ip-prefix-name ] | route-policy route-policy-name } import
undo filter-policy { acl-number | ip-prefix ip-prefix-name [ gateway ip-prefix-name ] | route-policy route-policy-name } import
filter-policy gateway ip-prefix-name import
undo filter-policy gateway ip-prefix-name import
View
RIP view
Parameters
acl-number: Number of the ACL used to filter routing information by destination address, in the range of 2000 to 3999.
ip-prefix-name: Name of the address prefix list used to filter routing information by destination address, a string of 1 to 19 characters.
gateway ip-prefix-name: Name of the address prefix list used to filter routing information by the address of the neighbor router advertising the information, a string of 1 to 19 characters.
route-policy-name: Name of the route-policy used to filter routing information, a string of 1 to 19 characters.
Description
Use the filter-policy gateway command to enable RIP to filter the routing information advertised by a specified address.
Use the undo filter-policy gateway command to disable RIP from filtering the routing information advertised by a specified address.
Use the filter-policy import command to enable RIP to filter the incoming routing information.
Use the undo filter-policy import command to disable RIP from filtering the incoming routing information.
By default, RIP does not filter the received routing information.
Related commands: acl, filter-policy export, ip ip-prefix.
For details about ACL, refer to ACL Operation.
Examples
# Apply ACL 2000 to filter the incoming routing information.
<Sysname>system-view
System View: return to User View with Ctrl+Z.
[Sysname] rip
[Sysname-rip] filter-policy 2000 import
host-route
Syntax
host-route
undo host-route
View
RIP view
Parameters
None
Description
Use the host-route command to enable RIP to receive host routes.
Use the undo host-route command to disable RIP from receiving host routes.
By default, RIP is enabled to receive host routes.
In some special cases, RIP receives a great number of host routes from the same network segment. These routes are of little help to addressing but occupy a lot of resources. In this case, the undo host-route command can be used to disable RIP from receiving host routes to save network resources.
Examples
# Disable RIP from receiving host routes.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] rip
[Sysname-rip] undo host-route
import-route
Syntax
import-route protocol [process-id ] [ cost value | route-policy route-policy-name ]*
undo import-route protocol [ process-id ]
View
RIP view
Parameters
protocol: Source routing protocol from which routes are redistributed by RIP. At present, RIP can redistribute routes from protocols: direct, ospf, ospf-ase, ospf-nssa and static.
process-id: Process ID of a routing protocol from which routes are redistributed, in the range of 1 to 65535. This argument is valid only for ospf, ospf-ase, and ospf-nssa.
value: Cost for redistributed routes, in the range of 0 16. If no cost is specified when redistributing routes, the default cost defined by the default cost command will be used.
route-policy-name: Name of a routing policy, a string of 1 to 19 characters.
Description
Use the import-route command to enable RIP to redistribute routes from other protocols.
Use the undo import-route command to disable RIP from redistributing routes from other protocols.
By default, RIP does not redistribute routes from other protocols.
If the value is not specified, routes will be redistributed with the default cost defined by the default cost command. If the cost of a redistributed route is 16, RIP does not stop advertising the route to other routers until the Garbage Collection timer expires (the timer length defaults to 120 seconds).
Related commands: default cost.
Examples
# Redistribute static routes with the cost of 4.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] rip
[Sysname-rip] import-route static cost 4
# Set the default cost and redistribute OSPF routes with the default cost.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] rip
[Sysname-rip] default cost 3
[Sysname-rip] import-route ospf
network
Syntax
network network-address
undo network network-address
View
RIP view
Parameters
network-address: Network/IP address of an interface, in dotted decimal notation.
Description
Use the network command to enable RIP on an interface attached to the specified network segment.
Use the undo network command to disable RIP on the interface attached to the specified network segment.
RIP runs only on the interface attached to the specified network. For an interface not on the specified network, RIP neither receives/sends routes on it nor forwards interface route through it. Therefore, you need to specify the network after enabling RIP to validate RIP on a specific interface.
By default, RIP is disabled on all interfaces.
The differences between the network and rip work commands are as follows:
l The network command enables RIP on an interface attached to the specified network segment.
l The rip work command enables an interface to receive and send RIP packets.
Related commands: rip work.
Examples
# Enable RIP on the interface with the network address 129.102.0.0.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] rip
[Sysname-rip] network 129.102.0.0
peer
Syntax
peer ip-address
undo peer ip-address
View
RIP view
Parameters
ip-address: IP address of the interface receiving RIP packets in the unicast mode on the neighbor router, in dotted decimal notation.
Description
Use the peer command to specify the IP address of a neighbor, where routing updates destined for the peer are unicast, rather than multicast or broadcast.
Use the undo peer command to remove the IP address of a neighbor.
By default, no neighbor is specified.
This command is used for non-broadcast networks where the broadcast mode is not suitable. Generally you are not recommended to use this command.
Examples
# Send RIP packets in the unicast mode to the destination 202.38.165.1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] rip
[Sysname-rip] peer 202.38.165.1
preference
Syntax
preference value
undo preference
View
RIP view
Parameters
value: Preference level, in the range of 1 to 255.
Description
Use the preference command to configure the preference of RIP routes.
Use the undo preference command to restore the default.
By default, the preference of RIP routes is 100.
Every routing protocol has its own preference. Its default value is determined by the specific routing policy. The preferences of routing protocols will finally determine which routing algorithm's routes will be selected as the optimal routes in the IP routing table. You can use the preference command to modify the preference of RIP routes manually.
Examples
# Specify the RIP preference as 20.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] rip
[Sysname-rip] preference 20
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 re-configure the parameters of RIP, you can use this command to restore the default.
Examples
# Reset the RIP system configuration.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] rip
[Sysname-rip] reset
% Reset RIP's configuration and restart RIP? [Y/N]y
rip
Syntax
rip
undo rip
View
System view
Parameters
None
Description
Use the rip command to enable RIP or enter RIP view.
Use the undo rip command to disable RIP.
By default, the system does not run RIP.
You must enable RIP and enter RIP view before configuring RIP global parameters. You can, however, configure the interface-related parameters no matter whether RIP is enabled.
Note that the interface-related parameters configured previously would be invalid after RIP is disabled.
Examples
# Enable RIP and enter RIP view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] rip
[Sysname-rip]
rip authentication-mode
Syntax
rip authentication-mode { simple password | md5 { rfc2082 key-string key-id | rfc2453 key-string } }
undo rip authentication-mode
View
Interface view
Parameters
simple: Specifies to use plain text authentication mode.
password: Plain text authentication key, containing 1 to 16 characters.
md5: Specifies to use MD5 cipher text authentication mode.
rfc2082: Specifies that MD5 cipher text authentication packets will use the packet format stipulated by RFC2082.
rfc2453: Specifies that MD5 cipher text authentication packets will use the packet format stipulated by RFC2453.
key-string: MD5 cipher text authentication key. If it is typed in the plain text mode, the length does not exceed 16 characters. If it is typed in the cipher text mode, the length is 24 characters. The system will display the MD5 cipher text authentication key with a length of 24 characters in the cipher text mode when you execute the display current-configuration command.
key-id: MD5 cipher text authentication identifier, ranging from 1 to 255.
Description
Use the rip authentication-mode command to configure RIP-2 authentication mode and its parameters.
Use the undo rip authentication-mode command to remove authentication.
Only one authentication key is supported each time authentication is performed. An authentication key newly input overwrites an old one.
Related commands: rip version.
You can configure RIPv1 authentication mode in interface view, but the configuration will not take effect because RIPv1 does not support authentication.
Examples
# Specify the interface VLAN-interface 10 to use the simple authentication with the authentication key of aaa.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 10
[Sysname-Vlan-interface10] rip authentication-mode simple aaa
# Specify VLAN-interface 10 to use the MD5 cipher text authentication, with the authentication key of aaa and the packet format of rfc2453.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 10
[Sysname-Vlan-interface10] rip authentication-mode md5 rfc2453 aaa
rip input
Syntax
rip input
undo rip input
View
Interface view
Parameters
None
Description
Use the rip input command to enable 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, can receive RIP packets.
Related commands: rip work.
Examples
# Disable the interface VLAN-interface 10 from receiving RIP packets.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname]interface Vlan-interface 10
[Sysname-Vlan-interface10] undo rip input
rip metricin
Syntax
rip metricin value
undo rip metricin
View
Interface view
Parameters
value: Additional metric of RIP routes received on an interface, in the range of 0 to 16.
Description
Use the rip metricin command to configure an additional metric for RIP routes received on an interface.
Use the undo rip metricin command to restore the default.
By default, the additional metric of RIP routes received on an interface is 0.
Before a valid RIP route received on an interface is added to the routing table, the additional metric will be added to the route. Therefore, if you increase the additional metric, the metric of RIP routes received on the interface will increase accordingly. If the sum of the additional metric and the original metric is greater than 16, the metric of the route will be 16.
Related commands: rip metricout.
Examples
# Set the additional metric of RIP routes received on the interface VLAN-interface 10 to 2.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 10
[Sysname-Vlan-interface10] rip metricin 2
rip metricout
Syntax
rip metricout value
undo rip metricout
View
Interface view
Parameters
value: Additional metric of RIP routes sent out of an interface, in the range of 1 to 16.
Description
Use the rip metricout command to configure an additional metric for RIP routes sent out of an interface.
Use the undo rip metricout command to restore the default.
By default, the additional metric of RIP routes sent out of an interface is 1.
With the command configured on an interface, the metric of RIP routes sent on the interface will be increased.
Related commands: rip metricin.
Examples
# Set the additional metric of RIP routes sent out of the interface VLAN-interface 10 to 2.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 10
[Sysname-Vlan-interface10] rip metricout 2
rip output
Syntax
rip output
undo rip output
View
Interface view
Parameters
None
Description
Use the rip output command to enable an interface to transmit RIP packets.
Use the undo rip output command to disable an interface from transmitting RIP packets.
By default, all interfaces except loopback interfaces are enabled to transmit RIP packets.
Related commands: rip input, rip work.
Examples
# Disable the interface VLAN-interface 10 from transmitting RIP packets.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 10
[Sysname-Vlan-interface10] undo rip output
rip split-horizon
Syntax
rip split-horizon
undo rip split-horizon
View
Interface view
Parameters
None
Description
Use the rip split-horizon command to enable the split horizon function.
Use the undo rip split-horizon command to disable the split horizon function.
By default, the split horizon function is enabled.
The split horizon function disables an interface from sending routes received from the interface to prevent routing loops between adjacent routers. Therefore, normally, split horizon is necessary for avoiding routing loops. Only in some special cases the split horizon function needs to be disabled to ensure the correct execution of the protocol. So, disable the split horizon function only when necessary.
Examples
# Disable the split horizon function on the interface VLAN-interface 10.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 10
[Sysname-Vlan-interface10] undo rip split-horizon
rip version
Syntax
rip version { 1 | 2 [ broadcast | multicast ] }
undo rip version
View
Interface view
Parameters
1: Specifies the version of RIP running on an interface as RIP-1.
2: Specifies the version of RIP running on an interface as RIP-2.
broadcast: Sends RIP-2 packets in the broadcast mode.
multicast: Sends RIP-2 packets in the multicast mode.
Description
Use the rip version command to specify the version of RIP running on an interface.
Use the undo rip version command to restore the default.
By default, the version of RIP running on an interface is RIP-1 and RIP-1 packets are sent in the broadcast mode.
If RIP-2 runs on an interface, RIP packets are sent in the multicast mode by default, which reduces resource consumption.
Table 3-4 Receive mode of RIP packets
RIP version |
RIP-1 broadcast packet |
RIP-2 broadcast packet |
RIP-2 multicast packet |
RIP-1 |
√ |
√ |
— |
RIP-2 broadcast mode |
√ |
√ |
— |
RIP-2 multicast mode |
— |
— |
√ |
Table 3-5 Send mode of RIP packets
RIP version |
RIP-1 broadcast packet |
RIP-2 broadcast packet |
RIP-2 multicast packet |
RIP-1 |
√ |
— |
— |
RIP-2 broadcast mode |
— |
√ |
— |
RIP-2 multicast mode |
— |
— |
√ |
Examples
# Run RIP-2 on the interface VLAN-interface 10 and send RIP packets in the broadcast mode.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 10
[Sysname-Vlan-interface10] rip version 2 broadcast
rip work
Syntax
rip work
undo rip work
View
Interface view
Parameters
None
Description
Use the rip work command to enable the interface to receive and send RIP packets.
Use the undo rip work command to disable the interface from neither receiving nor sending RIP packets.
By default, all interfaces except loopback interfaces are enabled to receive and send RIP packets.
The differences between the rip work, rip input, and rip output commands are as follows:
l The rip work command controls the receiving and sending of RIP packets on an interface.
l The rip input command controls only the receiving of RIP packets on an interface.
l The rip output command controls only the sending of RIP packets on an interface.
Related commands: rip input, rip output.
Examples
# Disable the interface VLAN-interface 10 from receiving or sending RIP packets.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 10
[Sysname-Vlan-interface10] undo rip work
summary
Syntax
summary
undo summary
View
RIP view
Parameters
None
Description
Use the summary command to enable RIP-2 automatic route summarization.
Use the undo summary command to disable RIP-2 automatic route summarization.
By default, RIP-2 automatic route summarization is enabled.
Route summarization can be used to reduce the routing traffic on the network as well as to reduce the size of the routing table. The summary routes contain the natural masks when advertised.
If RIP-2 is used, route summarization can be disabled with the undo summary command when it is necessary to broadcast subnet routes.
RIP-1 always uses automatic route summarization, but the undo summary command is invalid for RIP-1.
Related commands: rip version.
Examples
# Set RIP version on the interface VLAN-interface 10 as RIP-2 and disable route summarization.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 10
[Sysname-Vlan-interface10] rip version 2
[Sysname-Vlan-interface10] quit
[Sysname] rip
[Sysname-rip] undo summary
timers
Syntax
timers { update update-timer | timeout timeout-timer } *
undo timers { update | timeout } *
View
RIP view
Parameters
update-timer: Length of the Period Update timer in seconds, in the range of 1 to 3600.
timeout-timer: Length of the Timeout timer in seconds, in the range of 1 to 3600.
Description
Use the timers command to modify the lengths of the three RIP timers: Period Update, Timeout, and Garbage-collection (which is usually set to a length four times that of the Period Update timer).
Use the undo timers command to restore the default settings.
By default, the lengths of the Period Update, Timeout, and Garbage-collection timers are 30 seconds, 180 seconds, and 120 seconds, respectively.
Generally, it is regarded that the value of the Garbage-collection timer is fixed at four times that of the Period Update timer. Adjusting the Period Update timer will affect the Garbage-collection timer.
The modification of RIP timers is validated immediately.
As specified in RFC 1058, RIP is controlled by the above three timers:
l The update timer defines the interval between routing updates.
l The timeout timer defines the route aging time. If no routing update related to a route is received within the aging time, the metric of the route is set to 16 in the routing table.
l The garbage-collect timer defines the interval from when the metric of a route becomes 16 to when it is deleted from the routing table. During the Garbage-Collect timer length, RIP advertises the route with the routing metric set to 16. If no routing update is announced for that route after the Garbage-Collect timer expires, the route will be deleted from the routing table.
Related commands: display rip.
Examples
# Set the values of the Period Update timer and the Timeout timer of RIP to 10 seconds and 30 seconds respectively.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] rip
[Sysname-rip] timers update 10 timeout 30
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 to be forwarded along multiple equivalent RIP routes.
Use the undo traffic-share-across-interface command to disable this function.
By default, this function is disabled.
When the number of equivalent routes reaches the upper limit:
l If this function is enabled, the newly learned equivalent route replaces the existing equivalent route in the routing table.
l If this function is disabled, the first aged route entry is replaced by the newly learned route. If no route entry is aged, the newly learned equivalent route will be dropped.
Examples
# Enable traffic to be forwarded along multiple equivalent RIP routes.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] rip
[Sysname-rip] traffic-share-across-interface
l The term router in this chapter refers to a router in a generic sense or an Ethernet switch running a routing protocol.
l The S3600-SI series do not support OSPF
OSPF Configuration Commands
abr-summary
Syntax
abr-summary ip-address mask [ advertise | not-advertise ]
undo abr-summary ip-address mask
View
OSPF area view
Parameters
ip-address: Network address of the summary route, in dotted decimal notation.
mask: Subnet mask of the summary route, in dotted decimal notation.
advertise: Advertises the summary route. If this argument is not provided, the summary route will be advertised.
not-advertise: Specifies not to advertise the summary route.
Description
Use the abr-summary command to enable route summarization on an area border router (ABR).
Use the undo abr-summary command to disable route summarization on an ABR.
By default, route summarization is disabled on an ABR.
This command is applicable to ABRs only and is used for route summarization of routes described by Type-3 LSAs in an area. It allows an ABR to advertise the summary route in a Type-3 LSA to other areas instead of other more specific routes.
You can configure multiple summary routes for an area.
With the undo abr-summary command used, summarized routes will be advertised.
Examples
# Summarize subnets 36.42.10.0/24 and 36.42.110.0/24, in OSPF area 1 with summary route 36.42.0.0/16 and advertise it to other areas.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ospf 1
[Sysname-ospf-1] area 1
[Sysname-ospf-1-area-0.0.0.1] network 36.42.10.0 0.0.0.255
[Sysname-ospf-1-area-0.0.0.1] network 36.42.110.0 0.0.0.255
[Sysname-ospf-1-area-0.0.0.1] abr-summary 36.42.0.0 255.255.0.0
area
Syntax
area area-id
undo area area-id
View
OSPF view
Parameters
area-id: ID of an OSPF area, which can be a decimal integer (ranging from 0 to 4294967295) or in the form of an IP address.
Description
Use the area command to enter OSPF area view.
Use the undo area command to cancel the specified area.
Examples
# Enter OSPF area 0 view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ospf 1
[Sysname-ospf-1] area 0
[Sysname-ospf-1-area-0.0.0.0]
asbr-summary
Syntax
asbr-summary ip-address mask [ not-advertise | tag value ]
undo asbr-summary ip-address mask
View
OSPF view
Parameters
ip-address: IP address of the summary route, in dotted decimal notation.
mask: IP address mask, in dotted decimal notation.
not-advertise: Specifies not to advertise the summary route. If this argument is not provided, the summary route will be advertised.
tag value: Tag value, which is mainly used to control route advertisement through a route-policy. It ranges from 0 to 4294967295 and defaults to 1.
Description
Use the asbr-summary command to enable OSPF to summarize redistributed routes.
Use the undo asbr-summary command to disable the summarization function.
By default, redistributed routes are not summarized.
After the summarization of redistributed routes is configured, if the local router is an autonomous system border router (ASBR), this command summarizes the redistributed Type-5 LSAs falling into the specified network. If an NSSA area is configured, this command also summarizes the redistributed Type-7 LSAs falling into the specified network.
If the local router acts as an NSSA ABR, this command summarizes Type-5 LSAs translated from Type-7 LSAs falling into the specified network. This command does not take effect on non NSSA ABRs.
Related commands: display ospf asbr-summary.
Examples
# Configure two ASBR summary routes, and specify tag values of 8 and 10 for the routes respectively.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ospf 1
[Sysname-ospf-1] asbr-summary 10.2.0.0 255.255.0.0 tag 8
[Sysname-ospf-1] asbr-summary 20.2.0.0 255.255.0.0 tag 10
authentication-mode
Syntax
authentication-mode { simple | md5 }
undo authentication-mode
View
OSPF area view
Parameters
simple: Specifies the simple text authentication mode.
md5: Specifies the MD5 cipher text authentication mode.
Description
Use the authentication-mode command to configure one area of OSPF to support the authentication attribute.
Use the undo authentication-mode command to cancel the authentication attribute of this area.
By default, an area does not support authentication attribute.
All the routers in one area must use the same authentication mode (no authentication, simple text authentication, or MD5 cipher text authentication). If the mode of supporting authentication is configured, all routers on the same segment must use the same authentication key.
Use the ospf authentication-mode simple command to configure a simple text authentication key.
Use the ospf authentication-mode md5 command to configure the MD5 cipher text authentication key if the area is configured to support MD5 cipher text authentication mode.
After you configure one OSPF area to support the authentication attribute, you need to use the ospf authentication-mode command to set the authentication mode on interfaces. When configuring virtual link authentication, you can use the authentication-mode command to specify the authentication mode as MD5 cipher text or simple text for the backbone area.
Related commands: ospf authentication-mode, vlink-peer.
Examples
# Enter area 0 view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ospf 1
[Sysname-ospf-1] area 0
# Specify the OSPF area 0 to support MD5 cipher text authentication.
[Sysname-ospf-1-area-0.0.0.0] authentication-mode md5
default
Syntax
default { cost value | interval seconds | limit routes | tag tag | type type } *
undo default { cost | interval | limit | tag | type } *
View
OSPF view
Parameters
value: Default cost of an external route redistributed by OSPF, in the range of 0 to 16777214.
seconds: Default interval for redistributing external routes in seconds, in the range of 1 to 2147483647.
routes: Default limit of external routes that can be redistributed at one time, in the range of 200 to 2147483647.
tag: Default tag of routes redistributed by OSPF, in the range of 0 to 4294967295.
type: Default type of external routes redistributed by OSPF. The value of this argument is 1 or 2.
Description
Use the default command to configure the default parameters for redistributed routes, including cost, interval, limit, tag, and type.
Use the undo default cost command to restore the default.
By default, the cost, interval, limit, tag, and type are 1, 1, 1000, 1, and 2, respectively.
When OSPF redistributes external routes and propagates them in the entire autonomous system
l The cost of external routes can influence route selection and calculation.
l The performance of the device will be degraded significantly if OSPF redistributes routes frequently.
l The performance will also be degraded significantly if OSPF redistributes a large number of routes at one time.
Therefore, it is necessary to reasonably set the default cost of redistributed routes, the default interval for redistributing routes, and the limit of routes that can be redistributed at one time.
Examples
# Set the default cost, interval, limit, tag, and type of redistributed routes to 10, 20 seconds, 300, 15, and 1, respectively.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ospf 1
[Sysname-ospf-1] default cost 10 interval 20 limit 300 tag 15 type 1
default-cost
Syntax
default-cost value
undo default-cost
View
OSPF area view
Parameters
value: Cost of the default route, in the range of 0 to 16777214.
Description
Use the default-cost command to configure the cost of the default route advertised by OSPF to a Stub area or NSSA.
Use the undo default-cost command to restore the default.
By default, the cost of the default route advertised by OSPF to a Stub area or NSSA is 1.
This command only applies to an ABR in a Stub area or NSSA.
To configure a Stub area, you need to use the stub and default-cost commands.
You must use the stub command on all the routers connected to a Stub area to configure the area with the stub attribute.
Use the default-cost command to configure the cost of the default route advertised by an ABR to a Stub area or NSSA.
OSPF advertises a default route in the following cases:
l When a (totally) stub area is configured, the ABR of the area automatically generates a default route.
l After the nssa no-summary command is used on the ABR of an NSSA area, the NSSA ABR advertises a default route into the area.
l After the nssa default-route-advertise command is configured on an NSSA ABR, the ABR generates a default route into the NSSA regardless of whether the default route is available. If the nssa default-route-advertise command is configured on an NSSA ASBR, only when a default route is available on the ASBR can the router generate the default route into the attached area.
Related commands: stub, nssa.
Examples
# Set area 1 to a Stub area and the cost of the default route advertised to this Stub area to 60.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ospf 1
[Sysname-ospf-1] area 1
[Sysname-ospf-1-area-0.0.0.1] network 20.0.0.0 0.255.255.255
[Sysname-ospf-1-area-0.0.0.1] stub
[Sysname-ospf-1-area-0.0.0.1] default-cost 60
default-route-advertise
Syntax
default-route-advertise [ always | cost value | type type-value | route-policy route-policy-name ]*
undo default-route-advertise [ always | cost | type | route-policy ]*
View
OSPF view
Parameters
always: Generates a default external route in an ASE LSA into the OSPF routing domain in the case that the router has no default route configured. Without this keyword, you have to configure a default route to redistribute an ASE LSA into the OSPF routing domain.
cost value: Specifies the cost value of the default route. The default route with the lowest cost value is preferred. The value of value ranges from 0 to 16777214. If no cost is specified, the default cost specified by the default cost command applies.
type type-value: Specifies the type of the route. If type-value is 2, the cost value of the default route is equal to that specified by cost value, and all the routers in the OSPF domain use the same cost. If type-value is 1, the cost value of the default route is equal to the sum of the cost from the local router to the corresponding ASBR and the cost specified by cost value. The value of type-value is 1 or 2. If no type-value is specified, the default route type specified by the default type command applies.
route-policy route-policy-name: Specifies a route policy. .The route-policy-name argument is a string of 1 to 19 characters.
Description
Use the default-route-advertise command to generate a default route in the OSPF routing domain.
Use the undo default-route-advertise command to disable OSPF from redistributing a default route.
By default, OSPF does not redistribute any default route.
The import-route command cannot redistribute any default route. To redistribute the default route to the route area, the default-route-advertise command must be used. If the local router is not configured with a default route, the keyword always must be specified so that a default route can be generated in an ASE LSA.
Related commands: import-route.
Examples
# Generate a default route in an ASE LSA into the OSPF routing domain if a default route is configured on the local router.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ospf 1
[Sysname-ospf-1] default-route-advertise
# Generate a default route in an ASE LSA into the OSPF routing domain if no default route is configured on the local router.
[Sysname-ospf-1] default-route-advertise always
display router id
Syntax
display router id
View
Any view
Parameters
None
Description
Use the display router id command to display the router ID.
Related commands: router id.
Examples
# Display the router ID.
<Sysname> display router id
Configured router id is 1.1.1.1
display ospf abr-asbr
Syntax
display ospf [ process-id ] abr-asbr
View
Any view
Parameters
process-id: OSPF process ID, in the range of 1 to 65535. If you do not specify a process ID, this command applies to all current OSPF processes.
Description
Use the display ospf abr-asbr command to display the information about the ABR and ASBR of OSPF.
If you use this command on routers in a stub area, no ASBR information is displayed.
Examples
# Display the information about the OSPF ABRs and ASBRs.
<Sysname> display ospf abr-asbr
OSPF Process 1 with Router ID 1.1.1.1
Routing Table to ABR and ASBR
I = Intra i = Inter A = ASBR B = ABR S = SumASBR
Destination Area Cost Nexthop Interface
IA 2.2.2.2 0.0.0.0 10 10.153.17.89 Vlan-interface1
Table 4-1 Description on the fields of the display ospf abr-asbr command
Field |
Description |
I = Intra i = Inter A = ASBR B = ABR S = SumASBR |
Type of the route to the ABR or ASBR: Intra: intra-area route Inter: Inter-area route ASBR: Route to the ASBR ABR: Route to the ABR SumASBR: Summary route to the ASBR |
Destination |
Router ID of the ABR or ASBR |
Area |
Area where the router is connected to the ABR or ASBR |
Cost |
Cost of the route from the local router to the ABR or ASBR |
Nexthop |
IP address of the next hop |
Interface |
Local output interface |
display ospf asbr-summary
Syntax
display ospf [ process-id ] asbr-summary [ ip-address mask ]
View
Any view
Parameters
process-id: OSPF process ID, in the range of 1 to 65535. If you do not specify a process ID, this command applies to all current OSPF processes.
ip-address: Matched IP address, in dotted decimal notation.
mask: Subnet mask, in dotted decimal notation.
Description
Use the display ospf asbr-summary command to display the summary information of OSPF redistributed routes.
If you do not specify an IP address or subnet mask, the summary information of all OSPF redistributed routes will be displayed.
Related commands: asbr-summary.
Examples
# Display the summary information of all OSPF redistributed routes.
<Sysname> display ospf asbr-summary
OSPF Process 1 with Router ID 1.1.1.1
Summary Addresses
Total summary address count: 2
Summary Address
net : 168.10.0.0
mask : 255.254.0.0
tag : 1
status : Advertise
The Count of Route is 0
Summary Address
net : 1.1.0.0
mask : 255.255.0.0
tag : 100
status : DoNotAdvertise
The Count of Route is 0
Table 4-2 Description on the fields of the display ospf asbr-summary command.
Field |
Description |
net |
Network address of the summary route |
mask |
Subnet mask of the summary route |
tag |
Tag of the summary route |
status |
Advertisement state of the summary route, including DoNotAdvertise: The summary can not be advertised. Advertise: The summary can be advertised. |
display ospf brief
Syntax
display ospf [ process-id ] brief
View
Any view
Parameters
process-id: OSPF process ID, in the range of 1 to 65535. If you do not specify a process ID, this command applies to all current OSPF processes.
Description
Use the display ospf brief command to display brief OSPF information.
Examples
# Display brief OSPF information.
<Sysname> display ospf brief
OSPF Process 1 with Router ID 7.7.7.7
OSPF Protocol Information
RouterID: 7.7.7.7 Border Router: Nssa Area AS
Spf-schedule-interval: 5
Routing preference: Inter/Intra: 10 External: 150
Default ASE parameters: Metric: 1 Tag: 1 Type: 2
SPF computation count: 30
Area Count: 2 Nssa Area Count: 1
Area 0.0.0.0:
Authtype: none Flags: <>
SPF scheduled: <>
Interface: 192.168.0.39 (Vlan-interface1)
Cost: 10 State: DROther Type: Broadcast
Priority: 1
Designated Router: 192.168.0.153
Backup Designated Router: 192.168.0.154
Timers: Hello 10, Dead 40, Poll 40, Retransmit 5, Transmit Delay 1
Area 0.0.0.2:
Authtype: none Flags: <Nssa>
SPF scheduled: <>
7/5 translator state: Enabled
Interface: 30.1.1.1 (Vlan-interface2)
Cost: 10 State: BackupDR Type: Broadcast
Priority: 1
Designated Router: 30.1.1.2
Backup Designated Router: 30.1.1.1
Timers: Hello 10, Dead 40, Poll 40, Retransmit 5, Transmit Delay 1
Table 4-3 Description on the fields of the display ospf brief command
Field |
Description |
RouterID |
Router ID of the router |
Border Router |
Whether the router is a border router: Area: ABR AS: ASBR Nssa Area AS: NSSA ABR |
Spf-schedule-interval |
Interval of SPF schedule |
Routing preference |
OSPF route preference, including Inter/Intra: Inter-area/intra-area route preference External: External route preference |
Default ASE parameters |
Default ASE parameters of OSPF redistributed routes, including Metric: Route cost Tag: Route tag Type: Route type |
SPF computation count |
SPF computation count since OSPF is enabled |
Area Count |
Areas for connection to this router |
Nssa Area Count |
Number of NSSA areas |
Area |
Area ID |
Authtype |
OSPF authentication type of the area: None: Non-authentication Simple: simple authentication MD5: MD5 authentication |
Flags |
Area type flag: Nssa: NSSA area NssaDefault: A default route is generated into the NSSA. NssaNoSummary: ABR is disabled from advertising Type-3 LSAs into NSSA. NssaNoRedistribution: Prohibits advertisement of redistributed routes into NSSA. Stub: Stub area StubDefault: A default route is generated into Stub area. StubNoSummary: ABR is disabled from advertising Type-3 LSAs to Stub area. |
SPF scheduled |
SPF scheduled (flag). It indicates what type of route calculation is being performed. |
7/5 translator state |
Type-7 LSAs translator state: Enabled: manually configured Type-7 LSAs translator Elected: automatically elected Type-7 LSAs translator Disabled: non-Type-7 LSAs translator |
Interface |
Name of interface belonging to this area |
Cost |
Cost of routes |
State |
State of the interface state machine: DOWN: No protocol packet is sent or received on the interface. Waiting: The interface starts sending and receiving Hello packets and is trying to identify the (Backup) designated router for the network. PtoP: The interface sends Hello packets at the interval of HelloInterval, and tries to establish an adjacency with the peer router. DR: The router itself is the designated router on the attached network. BDR: The router itself is the backup designated router on the attached network. DROther: The interface is on a network on which another router has been selected to be the designated router. |
Type |
Network type of OSPF interface. It can be Broadcast, NBMA, P2MP, or P2P. |
Priority |
Router priority |
Designated Router |
IP address of a designated router (DR) |
Backup Designated Router |
IP address of a backup designated router (BDR) |
Timers |
OSPF timers, including Hello: Hello interval Dead: Dead interval Poll: Poll interval Retransmit: LSA retransmission interval |
Transmit Delay |
Delay time in transmitting LSA |
display ospf cumulative
Syntax
display ospf [ process-id ] cumulative
View
Any view
Parameters
process-id: OSPF process ID, in the range of 1 to 65535. If you do not specify a process ID, this command applies to all current OSPF processes.
Description
Use the display ospf cumulative command to display cumulative OSPF statistics.
Examples
# Display cumulative OSPF statistics.
<Sysname> display ospf cumulative
OSPF Process 1 with Router ID 1.1.1.1
Cumulations
IO Statistics
Type Input Output
Hello 0 10430
DB Description 0 0
Link-State Req 0 0
Link-State Update 0 0
Link-State Ack 0 0
ASE: 0 Checksum Sum: 0
LSAs originated by this router
Router: 180 SumNet: 116
LSAs Originated: 296 LSAs Received: 0
Area 0.0.0.0:
Neighbors: 0 Interfaces: 0
Spf: 2 Checksum Sum 15B27
rtr: 1 net: 0 sumasb: 0 sumnet: 1
Area 0.0.0.1:
Neighbors: 0 Interfaces: 1
Spf: 3 Checksum Sum 383C
rtr: 1 net: 0 sumasb: 0 sumnet: 0
Area 0.0.0.2:
Neighbors: 0 Interfaces: 0
Spf: 1 Checksum Sum 15D26
rtr: 1 net: 0 sumasb: 0 sumnet: 1
Routing Table:
Intra Area: 1 Inter Area: 0 ASE: 0
Table 4-4 Description on the fields of the display ospf cumulative command
Field |
Description |
|
IO Statistics |
Type |
Type of input/output OSPF packet: Hello: Hello packet DB Description: Database Description packet Link-State Req: Link-State Request packet Link-State Update: Link-State Update packet Link-State Ack: Link-State Acknowledge packet |
Input |
Number of received packets |
|
Output |
Number of transmitted packets |
|
ASE |
Number of all ASE LSAs |
|
Checksum Sum |
Checksum of ASE LSA |
|
LSAs |
Originated |
Number of originated LSAs |
Received |
Number of received LSAs generated by other routers |
|
Router |
Number of all Router LSAs |
|
SumNet |
Number of all Sumnet LSAs |
|
SumASB |
Number of all SumASB LSAs |
|
Area |
Neighbors |
Number of neighbors in this area |
Interfaces |
Number of interfaces in this area |
|
Spf |
Number of SPF computation count in this area |
|
rtr, net, sumasb, sumnet |
Number of all LSAs in this area |
|
Routing Table |
Intra Area |
Number of intra-area routes |
Inter Area |
Number of inter-area routes |
|
ASE |
Number of external routes |
display ospf error
Syntax
display ospf [ process-id ] error
View
Any view
Parameters
process-id: OSPF process ID, in the range of 1 to 65535. If you do not specify a process ID, this command applies to all current OSPF processes.
Description
Use the display ospf error command to display OSPF error information.
Examples
# Display the OSPF error information.
OSPF Process 1 with Router ID 1.1.1.1
OSPF packet error statistics:
0: IP: received my own packet 0: OSPF: wrong packet type
0: OSPF: wrong version 0: OSPF: wrong checksum
0: OSPF: wrong area id 0: OSPF: area mismatch
0: OSPF: wrong virtual link 0: OSPF: wrong authentication type
0: OSPF: wrong authentication key 0: OSPF: too small packet
0: OSPF: packet size > ip length 0: OSPF: transmit error
0: OSPF: interface down 0: OSPF: unknown neighbor
0: HELLO: netmask mismatch 0: HELLO: hello timer mismatch
0: HELLO: dead timer mismatch 0: HELLO: extern option mismatch
0: HELLO: router id confusion 0: HELLO: virtual neighbor unknown
0: HELLO: NBMA neighbor unknown 0: DD: neighbor state low
0: DD: router id confusion 0: DD: extern option mismatch
0: DD: unknown LSA type 0: LS ACK: neighbor state low
0: LS ACK: wrong ack 0: LS ACK: duplicate ack
0: LS ACK: unknown LSA type 0: LS ACK: ACK length wrong
0: LS REQ: neighbor state low 0: LS REQ: empty request
0: LS REQ: wrong request 0: LS REQ: wrong length
0: LS UPD: neighbor state low 0: LS UPD: newer self-generate LSA
0: LS UPD: LSA checksum wrong 0: LS UPD: received less recent LSA
0: LS UPD: unknown LSA type 0: OSPF routing: next hop not exist
0: DD: MTU option mismatch 0: ROUTETYPE: wrong type value
0: LS UPD: LSA length wrong
Table 4-5 Description on the fields of the display ospf error command
Description |
|
IP: received my own packet |
Received my own packet |
OSPF: wrong packet type |
OSPF packet type error |
OSPF: wrong version |
OSPF version error |
OSPF: wrong checksum |
OSPF checksum error |
OSPF: wrong area id |
OSPF area ID error |
OSPF: area mismatch |
OSPF area mismatch |
OSPF: wrong virtual link |
OSPF virtual link error |
OSPF: wrong authentication type |
OSPF authentication type error |
OSPF: wrong authentication key |
OSPF authentication key error |
OSPF: too small packet |
OSPF packet too small |
OSPF: packet size > ip length |
OSPF packet size exceeds IP packet length |
OSPF: transmit error |
OSPF transmission error |
OSPF: interface down |
OSPF interface is down, unavailable |
OSPF: unknown neighbor |
OSPF neighbors are unknown |
HELLO: netmask mismatch |
Network mask mismatch |
HELLO: hello timer mismatch |
Interval of HELLO packet is mismatched |
HELLO: dead timer mismatch |
Interval of dead neighbor packet is mismatched |
HELLO: extern option mismatch |
Extern option of Hello packet is mismatched |
HELLO: router id confusion |
Hello packet: Router ID confusion |
HELLO: virtual neighbor unknown |
Hello packet: unknown virtual neighbor |
HELLO: NBMA neighbor unknown |
Hello packet: unknown NBMA neighbor |
DD: neighbor state low |
Database description (DD) packet: asynchronous neighbor state |
DD: router id confusion |
DD packet: router id unidentifiable |
DD: extern option mismatch |
DD packet: external route flag error |
DD: unknown LSA type |
DD packet: unknown LSA type |
LS ACK: neighbor state low |
Link state acknowledgment (LS ACK) packet: asynchronous neighbor state |
LS ACK: wrong ack |
Link state acknowledgment packet: ack error |
LS ACK: duplicate ack |
Link state acknowledgment packet: ack duplication |
LS ACK: unknown LSA type |
Link state acknowledgment packet: unknown LSA type |
LS ACK: ACK length wrong |
Link state acknowledgment packet: ACK length error |
LS REQ: neighbor state low |
Link state request (LS REQ) packet: asynchronous neighbor state |
LS REQ: empty request |
Link state request packet: empty request |
LS REQ: wrong request |
Link state request packet: erroneous request |
LS REQ: wrong length |
Link state request packet: length error |
LS UPD: neighbor state low |
Link state update packet: asynchronous neighbor state |
LS UPD: newer self-generate LSA |
Link state update packet: newer LSA generated by itself |
LS UPD: LSA checksum wrong |
Link state update packet: LSA checksum error |
LS UPD:received less recent LSA |
Link state update packet: received less recent LSA |
LS UPD: unknown LSA type |
Link state update packet: unknown LSA type |
OSPF routing: next hop not exist |
Next hop of OSPF routing does not exist |
DD: MTU option mismatch |
MTU option of DD packet is mismatched |
ROUTETYPE: wrong type value |
Route type: the value of the type is wrong |
LS UPD: LSA length wrong |
Link state update packet: LSA length error |
display ospf interface
Syntax
display ospf [ process-id ] interface [ interface-type interface-number ]
View
Any view
Parameters
process-id: OSPF process ID, in the range of 1 to 65535. If you do not specify a process ID, this command applies to all current OSPF processes.
interface-type interface-number: Interface type and interface number.
Description
Use the display ospf interface command to display the OSPF interface information.
Examples
# Display the OSPF interface information of VLAN-interface 1.
<Sysname> display ospf interface vlan-interface 1
OSPF Process 1 with Router ID 1.1.1.1
Interfaces
Interface: 10.110.10.2 (Vlan-interface1)
Cost: 1 State: BackupDR Type: Broadcast
Priority: 1
Designated Router: 10.110.10.1
Backup Designated Router: 10.110.10.2
Timers: Hello 10, Dead 40, Poll 10, Retransmit 5, Transmit Delay 1
Table 4-6 Description on the fields of the display ospf interface command
Field |
Description |
|
Cost |
Cost of the interface |
|
State |
State of the interface state machine: DOWN: No protocol packet is sent or received on the interface. Waiting: The interface starts sending and receiving Hello packets and is trying to identify the (Backup) designated router for the network. PtoP: The interface sends Hello packets at the interval of HelloInterval, and tries to establish an adjacency with the peer router. DR: The router itself is the designated router on the attached network. BDR: The router itself is the backup designated router on the attached network. DROther: The interface is on a network on which another router has been selected to be the designated router. |
|
Type |
Network type of OSPF interface. It can be Broadcast, NBMA, P2MP, or P2P. |
|
Priority |
Priority of DR for interface election |
|
Designated Router |
DR on the network in which the interface resides |
|
Backup Designated Router |
BDR on the network in which the interface resides |
|
Timers |
OSPF timers, defined as follows: |
|
Hello |
Interval of hello packet |
|
Dead |
Interval of dead neighbors |
|
Poll |
Interval of poll |
|
Retransmit |
Interval of retransmitting LSA |
|
Transmit Delay |
Delay time of transmitting LSA |
display ospf lsdb
Syntax
display ospf process-id area-id lsdb [ brief | [ [ asbr | network | nssa | router | summary ] [ ip-address ] ] [ originate-router ip-address | self-originate ] ]
display ospf [ process-id ] lsdb [ brief | [ [ asbr | ase | network | nssa | router | summary ] [ ip-address ] ] [ originate-router ip-address | self-originate ] ]
View
Any view
Parameters
process-id: OSPF Process ID. If you do not specify a process ID, this command applies to all current OSPF processes.
area-id: OSPF area ID, which can be a decimal integer (ranging from 0 to 4294967295) or in the form of an IP address.
brief: Displays brief database information.
asbr: Displays the database information about Type-4 LSAs (summary-Asbr-LSAs).
ase: Displays the database information about the Type-5 LSAs (AS-external-LSAs). This argument is unavailable if you have provided a value for area-id.
network: Displays the database information about the Type-2 LSAs (network-LSAs).
nssa: Displays the database information about the Type-7 LSAs (NSSA-external-LSAs).
router: Displays the database information about the Type-1 LSAs (router-LSAs).
summary: Displays the database information about the Type-3 LSAs (summary-net-LSAs).
ip-address: Link state identifier (in the form of an IP address).
originate-router ip-address: Specifies the IP address of the router advertising the LSAs.
self-originate: Displays the database information about the LSAs generated by the local router (self-originate LSAs).
Description
Use the display ospf lsdb command to display the database information about OSPF connecting state.
If no OSPF process is specified, LSDB information of all OSPF processes is displayed.
Examples
# Display the database information about OSPF connection state.
OSPF Process 1 with Router ID 1.1.1.1
Link State Database
Area: 0.0.0.0
Type LinkState ID AdvRouter Age Len Sequence Metric Where
Rtr 2.2.2.2 2.2.2.2 465 36 8000000c 0 SpfTree
Rtr 1.1.1.1 1.1.1.1 449 36 80000004 0 SpfTree
Net 10.153.17.89 2.2.2.2 465 32 80000004 0 SpfTree
SNet 10.153.18.0 1.1.1.1 355 28 80000003 10 Inter List
Area: 0.0.0.1
Type LinkState ID AdvRouter Age Len Sequence Metric Where
Rtr 1.1.1.1 1.1.1.1 449 36 80000004 0 SpfTree
Rtr 3.3.3.3 3.3.3.3 429 36 8000000a 0 Clist
Net 10.153.18.89 3.3.3.3 429 32 80000003 0 SpfTree
SNet 10.153.17.0 1.1.1.1 355 28 80000003 10 Inter List
ASB 2.2.2.2 1.1.1.1 355 28 80000003 10 SumAsb List
AS External Database:
Type LinkState ID AdvRouter Age Len Sequence Metric Where
ASE 10.153.18.0 1.1.1.1 1006 36 80000002 1 Ase List
ASE 10.153.16.0 2.2.2.2 798 36 80000002 1 Uninitialized
ASE 10.153.17.0 2.2.2.2 623 36 80000003 1 Uninitialized
ASE 10.153.17.0 1.1.1.1 1188 36 80000002 1 Ase List
Table 4-7 Description on the fields of the display ospf lsdb command
Field |
Description |
Type |
Type of the LSA |
LinkStateID |
Link state ID of the LSA |
AdvRouter |
Router ID of the router that advertises the LSA |
Age |
Age of the LSA |
Len |
Length of the LSA |
Sequence |
Sequence number of the LSA |
Metric |
Cost from the router that advertises the LSA to LSA destination |
Where |
Location of the LSA, used to indicate in which stage of the route calculation the LSA is: Uninitialized: The LSA is not initialized or is originated by another router. Clist: The LSA is on the candidate list. SpfTree: The LSA is in the SPF tree. SumAsb List: The LSA is in the AS border reachable to the attached area. SumNet List: The LSA is in another area reachable to the attached area. Inter List: The LSA is in another area. Sum Infinity: The LSA is in an unreachable area. Ase List: The LSA is outside the AS and is reachable. Ase Infinity: The LSA is outside the AS and is unreachable. Nssa List: The LSA is in an NSSA. Nssa Infinity: The LSA is in an unreachable NSSA. |
<Sysname> display ospf lsdb ase
OSPF Process 1 with Router ID 1.1.1.1
Link State Database
Type : ASE
Ls id : 10.0.0.0
Adv rtr : 2.2.2.2
Ls age : 87
Len : 36
Seq# : 80000001
Chksum : 0xb45d
Options : (DC)
Net mask : 255.0.0.0
Tos 0 metric: 1
E type : 2
Forwarding Address :192.168.0.37
Tag: 1
Table 4-8 Description on the fields of the display ospf lsdb ase command
Field |
Description |
type |
Type of the LSA |
ls id |
Link state ID of the LSA |
adv rtr |
Router ID of the router that advertises the LSA |
ls age |
Age of the LSA |
len |
Length of the LSA |
seq# |
Sequence number of the LSA |
chksum |
Checksum of the LSA |
Options |
Options of the LSA: O: Opaque LSA advertisement and reception capability E: AS External LSA reception capability EA: External extended LSA reception and forwarding capability DC: On-demand link support N: NSSA external LSA support P: Capability of an NSSA ABR to translate Type-7 LSAs into Type-5 LSAs. |
Net mask |
Network mask |
E type |
Type of external route: 1: Type-1 external route 2: Type-2 external route |
Forwarding Address |
Forwarding address |
Tag |
Tag |
display ospf nexthop
Syntax
display ospf [ process-id ] nexthop
View
Any view
Parameters
process-id: OSPF process ID, in the range of 1 to 65535. If you do not specify a process ID, this command applies to all current OSPF processes.
Description
Use the display ospf nexthop command to display the OSPF next-hop information.
Examples
# Display the OSPF next-hop information.
<Sysname> display ospf nexthop
OSPF Process 1 with Router ID 1.1.1.1
Next hops:
Address Type Refcount Intf Addr Intf Name
---------------------------------------------------------------
202.38.160.1 Direct 3 202.38.160.1 Vlan-interface2
202.38.160.2 Neighbor 1 202.38.160.1 Vlan-interface2
Table 4-9 Description on the fields of the display ospf nexthop command
Field |
Description |
Next hops |
Detailed information of next hops |
Address |
IP address of next hop |
Type |
Type of next hop |
Refcount |
Reference count of the next hop, namely, number of routes using the next hop |
Intf Addr |
IP address of the interface to the next hop |
Intf Name |
Name of the interface to the next hop |
display ospf peer
Syntax
display ospf [ process-id ] peer [ brief | statistics ]
View
Any view
Parameters
process-id: OSPF process ID, in the range of 1 to 65535. If you do not specify a process ID, this command applies to all current OSPF processes.
brief: Displays brief information of OSPF neighbors.
statistics: Displays the statistics of OSPF neighbors.
Description
Use the display ospf peer command to display the information of OSPF neighbors.
Examples
# Display the information of OSPF neighbors.
OSPF Process 1 with Router ID 1.1.1.1
Neighbors
Area 0.0.0.0 interface 10.153.17.88(Vlan-interface1)'s neighbor(s)
RouterID: 2.2.2.2 Address: 10.153.17.89
State: Full Mode: Nbr is Master Priority: 1
DR: 10.153.17.89 BDR: 10.153.17.88
Dead timer expires in 31s
Neighbor has been up for 01:14:14
Table 4-10 Description on the fields of the display ospf peer command
Field |
Description |
RouterID |
ID of a neighbor router |
Address |
IP address of the interface on a neighbor router |
State |
State of a neighbor: Down: This is the initial state of a neighbor conversation. Init: In this state, the router has seen a Hello packet from the neighbor. However, the router has not established bidirectional communication with the neighbor (the router itself did not appear in the neighbor's hello packet). Attempt: Available only in an NBMA network, Under this state, the OSPF router has not received any information from a neighbor for a period but can send Hello packets with a longer interval to keep neighbor relationship. 2-Way: In this state, communication between the two routers is bidirectional. The router itself appears in the neighbor's Hello packet. Exstart: The goal of this state is to decide which router is the master, and to decide upon the initial Database Description (DD) sequence number. Exchange: In this state, the router is sending DD packets to the neighbor, describing its entire link-state database. Loading: In this state, the router sends Link State Request packets to the neighbor, requesting more recent LSAs. Full: In this state, the neighboring routers are fully adjacent. |
Mode |
Master/Slave mode formed by negotiation in exchanging DD packet |
Priority |
Priority of DR/BDR for neighbor election |
DR |
DR in the subnet the interface is attached to |
BDR |
BDR in the subnet the interface is attached to |
Dead timer expires in 31s |
If no hello packet is received from the neighbor within this interval, the neighbor will be considered dead. |
Neighbor has been up for 01:14:14 |
Lifetime of neighbor |
# Display the brief information about every peer.
<Sysname> display ospf peer brief
OSPF Process 1 with Router ID 1.1.1.1
Neighbor Brief Information
Area 0.0.0.1:
Router ID Address Pri DeadTime(s) Interface State
2.2.2.2 192.168.0.2 1 39 Vlan-interface 1 Full/BDR
Table 4-11 Description on the fields of the display ospf peer brief command
Field |
Description |
Router ID |
Router ID of neighbor router |
Address |
IP address of the interface of a neighbor router |
Pri |
Priority of a neighbor router |
DeadTime(s) |
Dead time, in seconds, of neighbor router |
Interface |
Type and number of the local router interface connected to the neighbor router |
State |
State of a neighbor router, including Down Init Attempt 2-Way Exstart Exchange Loading Full If the neighbor router is a designated router, DR will be attached to the state. If the neighbor route is a backup designated router, BDR will be attached. If the neighbor route is neither a DR, nor a BDR, only the state is displayed. |
# Display OSPF neighbor statistics.
<Sysname> display ospf peer statistics
OSPF Process 1 with Router ID 1.1.1.1
Neighbor Statistics
Area ID Down Attempt Init 2-Way ExStart Exchange Loading Full Total
0.0.0.1 0 0 0 0 0 0 0 1 1
Total 0 0 0 0 0 0 0 1 1
Table 4-12 Description on the fields of the display ospf peer statistics command
Field |
Description |
Area ID |
Area ID |
Down |
Initial state for OSPF to establish neighbor relation, which indicates that OSPF router does not receive the message from a certain neighbor router within a period of time |
Attempt |
It is enabled in an NBMA environment, such as Frame Relay, X.25 or ATM. It indicates that OSPF router does not receive the message from a certain neighbor router within a period of time, but still attempts to send Hello packet to the adjacent routers for their communications with a lower frequency. |
Init |
It indicates that OSPF router has received Hello packet from a neighbor router, but its IP address is not contained in the Hello packet. Therefore, a two-way communication between them has not been established. |
2-Way |
It indicates that a two-way communication between OSPF router and neighbor router has been established. DR and BDR can be selected in this state (or higher state). |
ExStart |
In this state, the router determines the sequence number of initial database description (DD) packet used for data exchange, so that it can obtain the latest link state information |
Exchange |
It indicates that OSPF router sends DD packet to its neighbor routers to exchange link state information |
Loading |
In this state, OSPF router requests neighbor routers based on the updated link state information from neighbor routers and its expired information, and waits for response from neighbor routers |
Full |
It indicates that database synchronization between the routers that have established neighbor relation has been completed, and their link state databases have been consistent |
Total |
Total number of neighbors in various states |
display ospf request-queue
Syntax
display ospf [ process-id ] request-queue
View
Any view
Parameters
process-id: OSPF process ID, in the range of 1 to 65535. If you do not specify a process ID, this command applies to all current OSPF processes.
Description
Use the display ospf request-queue command to display the information about the OSPF request-queue.
Examples
# Display the information about the OSPF request-queue.
<Sysname> display ospf request-queue
The Router's Neighbors is
RouterID: 1.1.1.1 Address: 1.1.1.1
Interface: 1.1.1.3 Area: 0.0.0.0
LSID:1.1.1.3 AdvRouter:1.1.1.3 Sequence:80000017 Age:35
Table 4-13 Description on the fields of the display ospf request-queue command
Field |
Description |
RouterID |
ID of a neighbor router |
Address |
IP address of the interface on a neighbor router |
Interface |
IP address of the interface on the local router |
Area |
Area number of OSPF |
LSID |
Link state ID in the LSA |
AdvRouter |
Router ID of the router that advertised the LSA |
Sequence |
Sequence number of the LSA, used to discover old and repeated LSAs |
Age |
Age of the LSA |
display ospf retrans-queue
Syntax
display ospf [ process-id ] retrans-queue
View
Any view
Parameters
process-id: OSPF process ID, in the range of 1 to 65535. If you do not specify a process ID, this command applies to all current OSPF processes.
Description
Use the display ospf retrans-queue command to display the information about the OSPF retransmission queue.
Examples
# Display the information about the OSPF retransmission queue.
<Sysname> display ospf retrans-queue
OSPF Process 200 with Router ID 103.160.1.1
Retransmit List
The Router's Neighbors is
RouterID: 162.162.162.162 Address: 103.169.2.2
Interface: 103.169.2.5 Area: 0.0.0.1
Retrans list:
Type: ASE LSID:129.11.77.0 AdvRouter:103.160.1.1
Type: ASE LSID:129.11.108.0 AdvRouter:103.160.1.1
Table 4-14 Description on the fields of the display ospf retrans-queue command
Field |
Description |
RouterID |
ID of a neighbor router |
Address |
IP address of the interface on a neighbor router |
Interface |
IP address of the interface on the local router |
Retrans list |
Retransmit list |
Area |
Area number of OSPF |
Type |
Type of the LSA |
LSID |
Link State ID of the LSA |
AdvRouter |
Router ID of the router that advertises the LSA |
display ospf routing
Syntax
display ospf [ process-id ] routing
View
Any view
Parameters
process-id: OSPF process ID, in the range of 1 to 65535. If you do not specify a process ID, this command applies to all current OSPF processes.
Description
Use the display ospf routing command to display the information about OSPF routing table.
Examples
# Display OSPF routing information.
<Sysname> display ospf routing
OSPF Process 1 with Router ID 1.1.1.1
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
10.110.0.0/16 1 Net 10.110.10.1 10.10.10.1 0.0.0.0
10.10.0.0/16 1 Stub 10.10.0.1 3.3.3.3 0.0.0.0
Total Nets: 2
Intra Area: 2 Inter Area: 0 ASE: 0 NSSA: 0
Table 4-15 Description on the fields of the display ospf routing command
Field |
Description |
Destination |
IP address of the destination network |
Cost |
Cost of a route |
Type |
Type of route |
NextHop |
Next hop of route |
AdvRouter |
ID of the router that advertises the route |
Area |
Area ID |
Total Nets |
Total number of intra-area routes, inter-area routes, external routes, and NSSA routes |
Intra Area |
Number of intra-area routes |
Inter Area |
Number of inter-area routes |
ASE |
Number of external routes |
NSSA |
Number of NSSA routes |
display ospf vlink
Syntax
display ospf [ process-id ] vlink
View
Any view
Parameters
process-id: OSPF process ID, in the range of 1 to 65535. If you do not specify a process ID, this command applies to all current OSPF processes.
Description
Use the display ospf vlink command to display the information about OSPF virtual links.
Examples
# Display OSPF virtual link information.
<Sysname> display ospf vlink
OSPF Process 1 with Router ID 1.1.1.0
Virtual Links
Virtual-link Neighbor-id -> 1.1.1.1, State: Full
Interface: 192.168.0.37 (Vlan-interface1)
Cost: 10 State: PtoP Type: Virtual
Transit Area: 0.0.0.2
Timers: Hello 10, Dead 40, Poll 0, Retransmit 5, Transmit Delay
Table 4-16 Description on the fields of the display ospf vlink command
Field |
Description |
Virtual-link Neighbor-id |
ID of a virtual-link neighbor router |
State |
State of a neighbor router. It can be Down, Init, Attempt, 2-Way, Exstart, Exchange, Loading, or Full. |
Cost |
Route cost of the interface |
State |
State of the interface state machine: DOWN: No protocol packet is sent or received on the interface. Waiting: The interface starts sending and receiving Hello packets and is trying to identify the (Backup) designated router for the network. PtoP: The interface sends Hello packets at the interval of HelloInterval, and tries to establish an adjacency with the peer router. DR: The router itself is the designated router on the attached network. BDR: The router itself is the backup designated router on the attached network. DROther: Tthe interface is on a network on which another router has been selected to be the designated router. |
Type |
Type: virtual link |
Transit Area |
ID of transit area |
Timers |
OSPF timers, including Hello: Hello interval Dead: Dead neighbor interval Poll: Poll interval Retransmit: Interval for retransmitting LSA |
Transmit Delay |
Delay time of transmitting LSA |
filter-policy export
Syntax
filter-policy { acl-number | ip-prefix ip-prefix-name } export [ protocol ]
undo filter-policy { acl-number | ip-prefix ip-prefix-name} export [ protocol ]
View
OSPF view
Parameters
acl-number: Number of an ACL used to match the destination address in routing information, in the range of 2000 to 3999.
ip-prefix-name: Name of the address prefix list used to match the destination address in routing information, a string of up to 19 characters.
protocol: Filters outgoing routes redistributed from the routing protocol, including direct, rip, and static.
For details about IP prefix list information, refer to the section IP Route Policy Configuration.
Description
Use the filter-policy export command to configure the filtering of outgoing redistributed routes.
Use the undo filter-policy export command to disable such filtering.
By default, filtering of outgoing redistributed routes is not configured.
In some cases, it may be required that only the routing information meeting some conditions can be advertised. You can use the filter-policy command to set the filtering conditions for the routing information to be advertised. Only the routing information passing the filtration can be advertised.
This command filters routes redistributed (with the import-route command) by OSPF. If the protocol argument is specified, this command filters only the outgoing routes redistributed from the protocol. If the protocol argument is not specified, the outgoing routes redistributed from all protocols will be filtered.
Related commands: acl, ip ip-prefix.
For details about ACL, refer to the section ACL Operation.
Examples
# Reference ACL 2000 to filter outgoing redistributed routing information.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] acl number 2000
[Sysname-acl-basic-2000] rule 0 permit source 10.1.1.1 0.0.0.255
[Sysname-acl-basic-2000] quit
[Sysname] ospf
[Sysname-ospf-1] filter-policy 2000 export
filter-policy import
Syntax
filter-policy { acl-number | ip-prefix ip-prefix-name | gateway prefix-list-name } import
undo filter-policy { acl-number | ip-prefix ip-prefix-name | gateway ip-prefix-name } import
View
OSPF view
Parameters
acl-number: Number of an ACL used to match destination addresses in routing information, in the range 2000 to 3999.
ip-prefix-name: Name of the IP prefix list used to match destination addresses in routing information, a string of 1 to 19 characters.
gateway ip-prefix-name: Name of an IP address prefix list used to filter routes based on the next hop of the routing information, a string of 1 to 19 characters.
For details about IP prefix lists, refer to the section IP Route Policy Configuration.
Description
Use the filter-policy import command to configure the filtering of incoming routes.
Use the undo filter-policy import command to disable such filtering.
By default, no filtering of incoming routes is configured.
In some cases, it may be required that only the routing information meeting some conditions can be received. You can use the filter-policy import command to set the matching rules for the routing information to be received. Only the routing information matching the rules will be received.
The filter-policy import command only filters the routes calculated with the SPF algorithm. Only the routes passing the filtration can be added to the routing table.
OSPF is a dynamic routing protocol based on link state, with routing information contained in LSAs.
For the filtering of incoming routes, routes to be filtered are calculated by SPF and installed in the OSPF routing table.
For the filtering of outing routes, denied LSAs will not be generated for advertisement.
Examples
# Reference ACL 2000 to filter incoming routing information.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] acl ospf
[Sysname-ospf-1] filter-policy 2000 import
import-route
Syntax
import-route protocol [ process-id ] [ cost value | type value | tag value | route-policy route-policy-name ] *
undo import-route protocol [ process-id ]
View
OSPF view
Parameters
protocol: Source routing protocol whose routes will be imported. At present, it can be direct, ospf, ospf-ase, ospf-nssa, rip, or static.
process-id: OSPF Process ID, in the range of 1 to 65535. This argument is valid only when the routing protocol is ospf, ospf-ase, or ospf-nssa.
route-policy: Redistributes only the routing information matching the routing policy.
route-policy-name: Name of a routing policy, a string of up to 19 characters.
cost value: Specifies the cost of redistributed routes. The cost value ranges from 0 to 16777214 and defaults to 1.
type value: Specifies the type of redistributed routes. The type value is 1 or 2 and defaults to 2.
tag value: Specifies the tag of redistributed routes. A tag can be used by a route policy. The tag value ranges from 0 to 4294967295 and defaults to 1.
Use the import-route command to redistribute external routes.
Use the undo import-route command to disable importing redistribution from other protocols.
You are recommended to configure the route type, cost and tag together in one command. When you configure them individually, the new configuration for an attribute will overwrite the old configuration for the attribute.
By default, OSPF does not redistribute any routing information of other protocols.
Examples
# Redistribute routes from RIP and specify the type as type-2, tag as 33, and cost as 50 for redistributed routes.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ospf 1
[Sysname-ospf-1] import-route rip type 2 tag 33 cost 50
log-peer-change
Syntax
log-peer-change
undo log-peer-change
View
OSPF view
Parameters
None
Description
Use the log-peer-change command to enable logging of OSPF neighbor state changes.
Use the undo log-peer-change command to disable logging of OSPF neighbor state changes.
By default, logging of OSPF neighbor state changes is disabled.
Note that:
With the logging enabled, the system will output log information when a neighbor changes to the Full state or to the Down state.
Neighbor states include Down, Init, Attempt, 2-Way, Exstart, Exchange, Loading and Full.
Examples
# Enable logging of neighbor state changes.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ospf 1
[Sysname-ospf-1] log-peer-change
multi-path-number
Syntax
multi-path-number value
undo multi-path-number
View
OSPF view
Parameters
value: Number of equal cost multi-path (ECMP) routes, in the range of 1 to 3.
Description
Use the multi-path-number command to set the number of OSPF ECMP routes.
Use the undo multi-path-number command to restore the default.
By default, the number of OSPF ECMP routes is 3.
Examples
# Set the number of OSPF ECMP routes to 2.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ospf 1
[Sysname-ospf-1] multi-path-number 2
network
Syntax
network ip-address wildcard-mask
undo network ip-address wildcard-mask
View
OSPF area view
Parameters
ip-address: IP address of the network segment where the interface resides, in dotted decimal notation.
wildcard-mask: Wildcard mask, in dotted decimal notation. The wildcard mask is the exact reverse, bit for bit, of the subnet mask. For example, if the subnet mask is 255.0.0.0, the wildcard mask is 0.255.255.255.
Description
Use the network command to enable an interface to run the OSPF protocol.
Use the undo network command to disable an interface from running OSPF.
By default, the interface does not belong to any area.
To run OSPF on an interface, the master IP address of this interface must be in the range of the network segment specified by this command. If only the slave IP address of the interface is in the range of the network segment specified by this command, this interface will not run OSPF.
Related commands: ospf.
Examples
# Specify the interfaces whose master IP addresses are in the segment range of 10.110.36.0/24 to run OSPF and specify the number of the OSPF area (where these interfaces reside) as 6.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ospf 1
[Sysname-ospf-1] area 6
[Sysname-ospf-1-area-0.0.0.6] network 10.110.36.0 0.0.0.255
nssa
Syntax
nssa [ default-route-advertise | no-import-route | no-summary | translate-always ] *
undo nssa
View
OSPF area view
Parameters
default-route-advertise: Redistributes a default route into an NSSA.
no-import-route: Redistributes no routes into an NSSA.
no-summary: Advertises only a default route in a Type-3 summary LSA into the NSSA area and disables the ABR from transmitting any other Type-3 LSAs to an NSSA
translate-always: Specifies the ABR as the Type-7 LSAs translator of the NSSA area. This keyword takes effect only on the ABR of an NSSA area.
Description
Use the nssa command to configure an OSPF area as an NSSA area.
Use the undo nssa command to cancel the function.
By default, no NSSA area is configured.
For all the routers connected to the NSSA area, the nssa command must be used to configure the area as an NSSA.
The default-route-advertise keyword is available only on an NSSA ABR or ASBR. If this keyword is configured on an NSSA ABR, the ABR generates a default route in a Type-7 LSA into the NSSA regardless of whether the default route is available. If it is configured on an ASBR, only when a default route is available on the ASBR can it generate the default route in a Type-7 LSA into the attached area.
The no-import-route keyword is usable only on an NSSA ABR that is also the ASBR of the OSPF routing domain. It disables redistributed routes from entering the NSSA area, but allows them to enter other OSPF areas.
The no-summary keyword is usable only on an NSSA ABR to advertise only a default route in a Type-3 summary LSA into the NSSA area. In this way, all the other summary LSAs are not advertised into the area. Such an area is known as an NSSA totally stub area.
The translate-always keyword is used to specify the ABR of an NSSA area as the Type-7 LSAs translator.
In the NSSA area, the Type-7 LSAs translator state determines whether the ABR needs to translate Type-7 LSAs into Type-5 LSAs. You can use the display ospf brief command to display the Type-7 LSAs translator state.
If the translate-always keyword is not used on the ABR, the ABR will take part in the Type-7 LSAs translator election among all the ABRs in the NSSA area.
l If the Type-7 LSAs translator state is Elected after the election, the ABR translates Type-7 LSAs into Type-5 LSAs.
l If the Type-7 LSAs translator state is Disabled after the election, the ABR does not translate Type-7 LSAs into Type-5 LSAs.
If the ABR that has the translate-always keyword configured and has a neighbor in the FULL state in the backbone area, its Type-7 LSAs translator state becomes Enabled and it will translate Type-7 LSAs into Type-5 LSAs.
After an OSPF area is configured as a Stub area, the ABR in the area automatically advertises a default route into the attached NSSA area. After an area is configured as an NSSA area, however, no ABR or ASBR in the area will automatically advertise a default route into the attached NSSA.
Examples
# Configure area 1 as NSSA area.
System View: return to User View with Ctrl+Z.
[Sysname] ospf 1
[Sysname-ospf-1] area 1
[Sysname-ospf-1-area-0.0.0.1] network 36.0.0.0 0.255.255.255
[Sysname-ospf-1-area-0.0.0.1] nssa
ospf
Syntax
ospf [ process-id [ router-id router-id ] ]
undo ospf [ process-id ]
View
System view
Parameters
process-id: OSPF process ID, in the range of 1 to 65535. By default, the process ID is 1. process-id is locally significant.
router-id: Router ID of an OSPF process, in dotted decimal notation.
Description
Use the ospf command to enable one or more OSPF processes or enter OSPF view.
Use the undo ospf command to disable an OSPF process.
By default, the system does not run any OSPF process.
Related commands: network.
l To run OSPF, a router must have a router ID specified. If no router ID is specified, the system will automatically select one of the router interface IP addresses as the router ID.
l If a router runs multiple OSPF processes, you are recommended to specify a router ID for each process by using the ospf command.
Examples
# Enable OSPF process 120, with the Router ID being 10.110.1.8.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] router id 10.110.1.8
[Sysname] ospf 120 router-id 10.110.1.8
[Sysname-ospf-120]
ospf authentication-mode
Syntax
ospf authentication-mode { simple password | md5 key-id key }
undo ospf authentication-mode { simple | md5 }
View
Interface view
Parameters
simple: Plain authentication.
md5: MD5 authentication.
password: Password of plain. The password argument is a string of up to eight characters.
key-id: ID of the authentication key in MD5 authentication mode, ranging from 1 to 255.
key: MD5 authentication key. If it is input in a plain text form, MD5 key is a string of 1 to 16 characters. It is displayed in a cipher text form with 24 characters in length when the display current-configuration command is executed. Inputting the MD5 key in a cipher text form with 24 characters in length is also supported.
Description
Use the ospf authentication-mode command to configure the authentication mode and key between adjacent routers.
Use the undo ospf authentication-mode command to cancel the authentication key that has been set.
By default, the interface does not authenticate the OSPF packets.
The passwords for authentication keys of the routers on the same network segment must be identical. In addition, you need to use the authentication-mode command to set the authentication type of the area, so as to validate the configuration.
Related commands: authentication-mode.
Examples
# Configure area 1 where the network segment 131.119.0.0 of interface VLAN-interface 10 resides to support MD5 cipher text authentication. Set the authentication key identifier to 15 and the authentication key to abc.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ospf 1
[Sysname-ospf-1] area 1
[Sysname-ospf-1-area-0.0.0.1] network 131.119.0.0 0.0.255.255
[Sysname-ospf-1-area-0.0.0.1] authentication-mode md5
[Sysname-ospf-1-area-0.0.0.1] quit
[Sysname-ospf-1] quit
[Sysname] interface Vlan-interface 10
[Sysname-Vlan-interface10] ospf authentication-mode md5 15 abc
ospf cost
Syntax
ospf cost value
undo ospf cost
View
Interface view
Parameters
value: Cost for running an OSPF process on an interface, in the range of 1 to 65535.
Description
Use the ospf cost command to configure the OSPF cost on an interface.
Use the undo ospf cost command to restore the default.
By default, the OSPF cost on an interface is 10.
You can use the display ospf brief command to display the OSPF cost information.
Related commands: display ospf brief.
Examples
# Specify the OSPF cost on the interface as 33.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 10
[Sysname-Vlan-interface10] ospf cost 33
ospf dr-priority
Syntax
ospf dr-priority priority
undo ospf dr-priority
View
Interface view
Parameters
priority: Designated router (DR) election priority of the interface, in the range of 0 to 255.
Description
Use the ospf dr-priority command to configure the DR election priority of the interface.
Use the undo ospf dr-priority command to restore the default.
By default, the DR election priority of an interface is 1.
The DR election priority of an interface determines the qualification of the interface. The interface with a higher priority will be preferred when an election conflict occurs. An interface with a DR priority of 0 does not take part in any DR election.
The priority of a router affects the DR and BDR election. However, a router that has a higher priority specified after the DR and BDR have been selected cannot become the DR or BDR immediately.
Examples
# Set the DR election priority of the interface VLAN-interface 10 to 8.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ospf dr-priority 8
ospf mib-binding
Syntax
ospf mib-binding process-id
undo ospf mib-binding
View
System view
Parameters
process-id: OSPF process ID, in the range of 1 to 65535.
Description
Use the ospf mib-binding command to bind MIB operations to the specified OSPF process.
Use the undo ospf mib-binding command to restore the default.
By default, MIB operations are bound to the first enabled OSPF process.
When OSPF enables the first process, OSPF always binds MIB operation to this process. You can use this command to bind MIB operation to another OSPF process.
To cancel the binding, use the undo ospf mib-binding command. OSPF will automatically re-bind MIB operation to the first process that it enables.
Examples
# Bind MIB operations to OSPF process 100.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ospf mib-binding 100
ospf mtu-enable
Syntax
ospf mtu-enable
undo ospf mtu-enable
View
Interface view
Parameters
None
Description
Use the ospf mtu-enable command to add the interface MTU to the MTU field in DD packets.
Use the undo ospf mtu-enable command to restore the default.
By default, the MTU field in DD packets is 0. That is, no interface MTU is added to the MTU field in DD packets.
The default MTU value in DD packet is 0. You can use this command to add the interface MTU to the MTU field in DD packets.
When a router starts, it sends a Hello packet via the OSPF interface, and the router that receives the hello packet checks parameters carried in the packet. If parameters of the two routers match, they become neighbors.
Not every pair of neighboring routers become adjacent, which depends on network types. Only by synchronizing the LSDB via exchanging DD packets and LSAs can two routers become adjacent. If the MTU values of the DD packets sent by two neighboring routers are different, they will not receive DD packets from each other and therefore they will not become adjacent.
Examples
# Add the MTU of the interface VLAN-interface 3 to the MTU field in DD packets.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 3
[Sysname-Vlan-interface3] ospf mtu-enable
ospf network-type
Syntax
ospf network-type { broadcast | nbma | p2mp [ unicast ] | p2p }
undo ospf network-type
View
Interface view
Parameters
broadcast: Specifies the network type as broadcast.
nbma: Specifies the network type as NBMA.
p2mp: Specifies the network type as point-to-multipoint.
unicast: Sends packets to unicast addresses.
p2p: Specifies the network type as point-to-point.
Description
Use the ospf network-type command to configure the network type for an interface.
Use the undo ospf network-type command to restore the default network type.
OSPF divides networks into four types based on link layer protocol:
l Broadcast: If Ethernet or FDDI is adopted, OSPF defaults the network type to broadcast.
l Non-Broadcast Multi-access (NBMA): If Frame Relay, ATM, HDLC or X.25 is adopted, OSPF defaults the network type to NBMA.
l Point-to-Multipoint (P2MP): OSPF will not default the network type of any link layer protocol to P2MP. The general undertaking is to change a partially connected NBMA network to P2MP network.
l Point-to-point (P2P): If PPP, LAPB or POS is adopted, OSPF defaults the network type to P2P.
If there is any router not supporting multicast addresses on a broadcast network, the network type of the interface can be changed to NBMA.
For a non-broadcast multi-accessible network to be of NBMA type, any two routers in the network must be directly reachable to each other through a virtual circuit. In other words, the network must be fully-meshed.
For a network not meeting this condition, the network type of the interface must be changed to point-to-multipoint. In this way, routing information can be exchanged between two routers not directly reachable to each other through another router that is directly reachable to the two routers.
If only two routers run OSPF in the same network segment, the network type of the interface can also be changed to point-to-point.
For a P2MP interface,
l If the unicast keyword is not specified, the interface sends packets to multicast addresses.
l If the unicast keyword is specified, the interface sends packets to unicast addresses. In this case, you must use the peer command to specify the neighbor.
Note that you must use the peer command to configure the peer if the network type of the interface is NBMA or manually changed to NBMA with the ospf network-type command.
Related commands: ospf dr-priority.
Examples
# Set the network type of the interface VLAN-interface 10 to NBMA.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 10
[Sysname-Vlan-interface10] ospf network-type nbma
ospf timer dead
Syntax
ospf timer dead seconds
undo ospf timer dead
View
Interface view
Parameters
seconds: Dead interval of the OSPF neighbor. It is in seconds and ranges from 1 to 65535.
Description
Use the ospf timer dead command to configure the dead interval of the OSPF neighbor.
Use the undo ospf timer dead command to restore the default.
By default, the dead interval is
l 40 seconds for the OSPF peers of p2p and broadcast interfaces
l 120 seconds for those of p2mp and nbma interfaces
The dead interval of OSPF peers means that, within this interval, if no Hello message is received from the peer, the peer will be considered to be invalid. The value of dead seconds should be at least four times of that of the Hello seconds. The dead seconds for the interfaces on the same network segment must be identical.
Related commands: ospf timer hello.
Examples
# Set the peer dead interval on the interface VLAN-interface 10 to 80 seconds.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 10
[Sysname-Vlan-interface10] ospf timer dead 80
ospf timer hello
Syntax
ospf timer hello seconds
undo ospf timer hello
View
Interface view
Parameters
seconds: Interval, in seconds, at which an interface transmits hello packet. It ranges from 1 to 255.
Description
Use the ospf timer hello command to configure the interval for transmitting Hello messages on an interface.
Use the undo ospf timer hello command to restore the interval to the default.
By default, the Hello interval is
l 10 seconds for an interface of p2p or broadcast
l 30 seconds for an interface of p2mp or nbma
Hello packets are periodically sent to find and maintain neighbors and used for DR/BDR election. The hello seconds value must be identical on interfaces attached to the same network segment. Otherwise, neighbor relationships cannot be established between routers.
Related commands: ospf timer dead.
Examples
# Configure the interval of transmitting Hello messages on the interface VLAN-interface 10 to 20 seconds.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 10
[Sysname-Vlan-interface10] ospf timer hello 20
ospf timer poll
Syntax
ospf timer poll seconds
undo ospf timer poll
View
Interface view
Parameters
seconds: Poll Hello interval in seconds. It ranges from 1 to 65535.
Description
Use the ospf timer poll command to configure the poll interval at which the interface sends hello packets to the neighbor in the Down state.
Use the undo ospf timer poll command to restore the default.
By default, the poll interval is 40 seconds.
On an NBMA network, if a neighbor becomes invalid, Hello packets will be transmitted at intervals of poll seconds. You can configure the poll seconds to specify how often the interface transmits Hello packets before it establishes neighbor relationship with the router. The poll interval should be no less than 4 times the Hello interval.
Examples
# Configure to transmit poll Hello packet through interface VLAN-interface 20 every 130 seconds.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 20
[Sysname-Vlan-interface20] ospf timer poll 130
ospf timer retransmit
Syntax
ospf timer retransmit interval
undo ospf timer retransmit
View
Interface view
Parameters
interval: Interval, in seconds, for retransmitting LSA on an interface. It ranges from 1 to 3600.
Description
Use the ospf timer retransmit command to configure the interval for retransmitting an LSA on an interface.
Use the undo ospf timer retransmit command to restore the default.
By default, the interval for retransmitting an LSA is 5 seconds.
If a router running OSPF transmits a link state advertisement (LSA) to the peer, it needs to wait for the acknowledgement packet from the peer. If no acknowledgement is received from the peer within the LSA retransmission interval, this LSA will be retransmitted.
The LSA retransmit between adjacent routers should not be set too short; otherwise, unexpected retransmission will occur (See RFC2328).
Examples
# Set the interval for retransmitting LSA between the interface VLAN-interface 10 and the adjacent routers to 12 seconds.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 10
[Sysname-Vlan-interface10] ospf timer retransmit 12
ospf trans-delay
Syntax
ospf trans-delay seconds
undo ospf trans-delay
View
Interface view
Parameters
seconds: LSA transmission delay in seconds on an interface. It ranges from 1 to 3600.
Description
Use the ospf trans-delay command to configure the LSA transmission delay on an interface.
Use the undo ospf trans-delay command to restore the default.
By default, the LSA transmission delay on an interface is 1 second.
Each LSA in the LSDB has an age that is incremented by 1 every second, but the age does not change during transmission. Therefore, it is necessary to add a transmission delay into its age time, which is important for low speed networks.
Examples
# Set the LSA transmission delay on the interface VLAN-interface 10 to 3 seconds.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 10
[Sysname-Vlan-interface10] ospf trans-delay 3
peer
Syntax
peer ip-address [ dr-priority dr-priority ]
undo peer ip-address
View
OSPF view
Parameters
ip-address: IP address of a neighbor router.
dr-priority: Value of the corresponding priority of a neighbor in the NBMA network. It ranges from 0 to 255 and defaults to 1.
Description
Use the peer command to specify a neighbor and its DR priority on an NBMA network.
Use the undo peer command to remove this configuration.
On an NBMA network, you can configure mappings to make the network fully meshed (any two routers have a direct link in between), so OSPF can handle DR/BDR election as it does on a broadcast network. However, since routers on the network cannot find neighbors via broadcasting hello packets, you need to specify neighbors and neighbor DR priorities on the routers.
Related commands: ospf dr-priority.
Examples
# Specify a neighbor with IP address 10.1.1.1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ospf 1
[Sysname-ospf-1] peer 10.1.1.1
preference
Syntax
preference [ ase ] value
undo preference [ ase ]
View
OSPF view
Parameters
value: OSPF protocol preference, in the range of 1 to 255.
ase: Indicates the preference of a redistributed external route of the AS.
Description
Use the preference command to configure the preference of the OSPF protocol.
Use the undo preference command to restore the default.
By default, the preference of an internal OSPF route is 10 and that of an external OSPF route is 150.
Because multiple dynamic routing protocols could be running on a router, there is the problem of routing information sharing among routing protocols and selection. Therefore, a default preference is specified for each routing protocol. When a route is identified by different protocols, the protocol with the highest preference selected for forwarding IP packets.
Examples
# Specify the preference of an imported external route of the AS as 160.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ospf 1
[Sysname-ospf-1] preference ase 160
reset ospf
Syntax
reset ospf { all | process-id }
View
User view
Parameters
all: Resets all OSPF processes.
process-id: OSPF process ID, in the range of 1 to 65535.
Description
Use the reset ospf command to reset OSPF process(es).
After you use this command to reset an OSPF process:
l Invalid LSA is cleared immediately before LSA times out.
l A new Router ID takes effect if the Router ID changes.
l DR and BDR are re-elected conveniently.
l OSPF configuration before the restart will not lose.
After this command is issued, the system will prompt you to confirm whether to re-enable OSPF.
Examples
# Reset all the OSPF processes.
<Sysname> reset ospf all
# Reset OSPF process 200.
<Sysname> reset ospf 200
reset ospf statistics
Syntax
reset ospf statistics { all | process-id }
View
User view
Parameters
all: Clears the statistics of all OSPF processes.
process-id: OSPF process ID, in the range of 1 to 65535.
Description
Use the reset ospf statistics command to clear the statistic of OSPF process(es).
Examples
# Clear the statistics of all OSPF processes.
<Sysname> reset ospf statistics all
router id
Syntax
router id router-id
undo router id
View
System view
Parameters
router-id: Router ID, in dotted decimal notation.
Description
Use the router id command to configure the ID of a router running the OSPF protocol.
Use the undo router id command to cancel the router ID that has been set.
If the router-id command is not used, a router ID is set following these rules:
l If loopback interfaces configured with IP addresses exist, the greatest loopback interface IP address will be used as the router ID.
l If no loopback interface IP address exists, the greatest IP address of other interfaces will be used as the router ID, regardless of whether the interfaces are up or down.
l A new router ID is selected only after the existing router ID is deleted or modified. Other cases, for example, when the interface with the router ID goes down, when a loopback interface address is configured after a non-loopback interface address is selected as the router ID, or when a greater interface IP address is configured, cannot trigger a new router ID selection process,
l To validate a new router ID, you need to execute the reset command.
Related commands: ospf.
Examples
# Set the router ID to 10.1.1.3.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] router id 10.1.1.3
silent-interface
Syntax
silent-interface silent-interface-type silent-interface-number
undo silent-interface silent-interface-type silent-interface-number
View
OSPF view
Parameters
silent-interface-type: Interface type
silent-interface-number: Interface number.
Description
Use the silent-interface command to disable an interface from transmitting OSPF packet.
Use the undo silent-interface command to restore the default.
By default, the interface is enabled to transmit OSPF packet.
To prevent the router on some network from receiving the OSPF routing information, you can use this command to disable this interface from transmitting OSPF packet. On the switch, this command can be used to enable/disable OSPF packet transmission through the specified VLAN interface.
Examples
# Disable interface VLAN-interface 20 from transmitting OSPF packet.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ospf 1
[Sysname-ospf-1] silent-interface Vlan-interface 20
snmp-agent trap enable ospf
Syntax
undo snmp-agent trap enable ospf [ process-id ] [ ifauthfail | ifcfgerror | ifrxbadpkt | ifstatechange | iftxretransmit | lsdbapproachoverflow | lsdboverflow | maxagelsa | nbrstatechange | originatelsa | virifauthfail | virifcfgerror | virifrxbadpkt | virifstatechange | viriftxretransmit | virnbrstatechange ] *
View
System view
Parameters
process-id: OSPF process ID, in the range of 1 to 65535. If you do not specify a process ID, this command applies to all current OSPF processes.
ifstatechange, virifstatechange, nbrstatechange, virnbrstatechange, ifcfgerror, virifcfgerror, ifauthfail, virifauthfail, ifrxbadpkt, virifrxbadpkt, iftxretransmit, viriftxretransmit, originatelsa, maxagelsa, lsdboverflow, lsdbapproachoverflow: Types of TRAP packets that the switch produces in case of OSPF anomalies.
Description
Use the snmp-agent trap enable ospf command to enable the OSPF TRAP function.
Use the undo snmp-agent trap enable ospf command to disable the OSPF TRAP function.
This command does not apply to the OSPF processes that are started after the command is executed.
By default, the switch does not send TRAP packets in case of OSPF anomalies.
For detailed configuration of SNMP TRAP, refer to the SNMP-RMON part in this manual.
Examples
# Enable the TRAP function for OSPF process 100.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] snmp-agent trap enable ospf 100
spf-schedule-interval
Syntax
spf-schedule-interval interval
undo spf-schedule-interval
View
OSPF view
Parameters
interval: SPF calculation interval of OSPF, in seconds. It ranges from 1 to 10.
Description
Use the spf-schedule-interval command to configure the SPF calculation interval of OSPF.
Use the undo spf-schedule-interval command to restore the default.
By default, the SPF calculation interval of OSPF is 5 seconds.
According to the link state database (LSDB), the router running OSPF can calculate the shortest path tree taking itself as the root and determine the next hop to the destination network according to the shortest path tree. Adjusting SPF calculation interval restrains frequent network changes, which may occupy too many bandwidth resources and router resources.
Examples
# Set the OSPF route calculation interval of H3C to 6 seconds.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ospf 1
[Sysname-ospf-1] spf-schedule-interval 6
stub
Syntax
stub [ no-summary ]
undo stub
View
OSPF area view
Parameters
no-summary: Disables an ABR from transmitting Type-3 LSAs to a Stub area.
Description
Use the stub command to configure the type of an OSPF area as "Stub".
Use the undo stub command to restore the default.
By default, no area is set to a Stub area.
To configure an area as a stub area, all routers attached to it must be configured with this command. If the router is an ABR, it will send a default route to the connected Stub area. Use the default-cost command to configure the default route cost. In addition, you can specify the no-summary argument in the stub command to disable the receiving of Type-3 LSAs by the Stub area connected to the ABR (such a stub area is known as a totally stub area).
Note the following when configuring a (totally) stub area:
l The backbone area cannot be a (totally) stub area.
l To configure an area as a stub area, the stub command must be configured on routers in the area.
l A (totally) stub area cannot have an ASBR because AS external routes cannot be distributed into the stub area.
l Virtual links cannot transit (totally) stub areas.
Related commands: default-cost.
Examples
# Set OSPF area 1 to a Stub area.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ospf 1
[Sysname-ospf-1] area 1
[Sysname-ospf-1-area-0.0.0.1] stub
vlink-peer
Syntax
vlink-peer router-id [ hello seconds | retransmit seconds | trans-delay seconds | dead seconds | simple password | md5 keyid key ] *
undo vlink-peer router-id
View
OSPF area view
Parameters
route-id: Router ID of virtual link peer.
hello seconds: Specifies the interval, in seconds, at which the router transmits hello packet. It ranges from 1 to 8192 and defaults to 10. This value must equal the hello seconds value of the router virtually linked to the interface.
retransmit seconds: Specifies the interval, in seconds, for retransmitting the LSA packets on an interface. It ranges from 1 to 3600 and defaults to 5.
trans-delay seconds: Specifies the delay, in seconds, for transmitting LSA packets on an interface. It ranges from 1 to 3600 and defaults to 1.
dead seconds: Specifies the interval, in seconds, of death timer. It ranges from 1 to 8192 and defaults to 40. This value must equal the dead seconds of the router virtually linked to it and must be at least four times of the hello seconds.
simple password: Specifies the simple text authentication password, which contains up to eight characters, of the interface. This value must equal the authentication key of the virtually linked peer.
keyid: MD5 authentication key ID. It ranges from 1 to 255. It must be equal to the authentication key ID of the virtually linked peer.
key: MD5 authentication key. If you use simple text authentication key, you can input a string containing 1 to 16 characters. When you use the display current-configuration command to display system information, the MD5 authentication key is displayed in the form of cipher text with a length of 24 characters. Inputting the key in the form of cipher text with a length of 24 characters is also supported.
Description
Use the vlink-peer command to create and configure a virtual link.
Use the undo vlink-peer command to cancel an existing virtual link.
According to RFC2328, an OSPF area must be connected to the backbone network. You can use the vlink-peer command to keep the connectivity. Virtual link can be regarded as a common interface that uses OSPF because the principle for configuring the parameters such as hello, retransmit, and trans-delay on it is similar.
Considerations on parameters:
l The smaller the hello interval is, the faster the network converges and the more network resources are consumed.
l A too small retransmission interval will lead to unnecessary retransmissions. A big value is appropriate for a low speed link.
l You need to specify an appropriate transmission delay with the trans-delay keyword.
Note that, virtual link authentication adopts the MD5 cipher text or simple text authentication mode set with the authentication-mode command for Area 0. Therefore, you need to specify the authentication mode for Area 0 on both ABRs interconnected by the virtual link.
Related commands: authentication-mode, display ospf.
Examples
# Create a virtual link between Router A and Router B and use the MD5 cipher authentication mode (The router ID of Router A is 10.1.1.1 and that of Router B is 10.1.1.2).
l Configure Router A
<RouterA> system-view
System View: return to User View with Ctrl+Z.
[RouterA] ospf 1
[RouterA-ospf-1-area-0.0.0.0] authentication-mode md5
[RouterA-ospf-1-area-0.0.0.0] quit
[RouterA-ospf-1] area 10.0.0.0
[RouterA-ospf-1-area-10.0.0.0] vlink-peer 10.1.1.2 md5 3 345
l Configure RouterB
<RouterB> system-view
System View: return to User View with Ctrl+Z.
[RouterB] ospf 1
[RouterB-ospf-1-area-0.0.0.0] authentication-mode md5
[RouterB-ospf-1-area-0.0.0.0] quit
[RouterB-ospf-1] area 10.0.0.0
[RouterB-ospf-1-area-10.0.0.0] vlink-peer 10.1.1.1 md5 3 345
The term router in this chapter refers to a router in a generic sense or an Ethernet switch running a routing protocol.
IP Routing Policy Configuration Commands
apply cost
Syntax
apply cost value
undo apply cost
View
Route policy view
Parameters
value: Cost for matched routes, in the range of 0 to 4294967295.
Description
Use the apply cost command to apply a cost to routes satisfying matching rules.
Use the undo apply cost command to remove the configuration.
By default, no cost is applied to routes satisfying matching rules.
The apply clause is one that sets a cost for the routes satisfying matching rules in a routing policy.
Related commands: if-match interface, if-match acl, if-match ip-prefix, if-match ip next-hop, if-match cost, if-match tag, route-policy, apply tag.
Examples
# Create a routing policy named policy and node 1 with the matching mode being permit. Apply the cost 120 to routes matching ACL 2000.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] route-policy policy permit node 1
%New sequence of this list
[Sysname-route-policy] if-match acl 2000
[Sysname-route-policy] apply cost 120
apply tag
Syntax
apply tag value
undo apply tag
View
Route policy view
Parameters
value: Tag value of a route, in the range of 0 to 4294967295.
Description
Use the apply tag command to configure a tag for a route.
Use the undo apply tag command to remove the configuration.
By default, no tag is configured for a route.
Related commands: if-match interface, if-match acl, if-match ip-prefix, if-match ip next-hop, if-match cost, if-match tag, route-policy, apply cost.
Examples
# Create a routing policy named policy and node 1 with the matching mode being permit. Apply the tag 100 to routes matching ACL 2000.
System View: return to User View with Ctrl+Z.
[Sysname] route-policy policy permit node 1
%New sequence of this list
[Sysname-route-policy] if-match acl 2000
[Sysname-route-policy] apply tag 100
display ip ip-prefix
Syntax
display ip ip-prefix [ ip-prefix-name ]
View
Any view
Parameters
ip-prefix-name: Name of an IP-prefix, a string of up to 19 characters.
Description
Use the display ip ip-prefix command to display information about an IP-prefix(es).
When ip-prefix-name is not specified, information about all the configured IP-prefixes is displayed.
Related commands: ip ip-prefix.
Examples
# Display the information about the address prefix list named p1.
<Sysname> display ip ip-prefix p1
name index conditions ip-prefix / mask GE LE
p1 10 permit 10.1.0.0/16 17 18
Table 5-1 Description on the fields of the display ip ip-prefix command
Field |
Description |
name |
Name of an IP-prefix |
index |
Internal sequence number of an IP-prefix |
conditions |
Matching mode, including permit deny |
ip-prefix / mask |
IP prefix/mask length for matching IP prefixes |
GE |
Greater-equal, that is, lower limit of subnet mask length of the matched IP address |
LE |
Less-equal, that is upper limit of subnet mask length of the matched IP address |
display route-policy
Syntax
display route-policy [ route-policy-name ]
View
Parameters
route-policy-name: Name of a routing policy, a string of up to 19 characters.
Description
Use the display route-policy command to display information about routing policies.
If you do not specify a route policy name, this command displays all route-policies configured.
Related commands: route-policy.
Examples
# Display information about routing policy named policy1.
<Sysname> display route-policy policy1
Route-policy : policy1
Permit 10 : if-match (ip-prefix) p1
apply cost 100
Table 5-2 Description on the fields of the display route-policy command
Field |
Description |
|
Route-policy |
Name of a routing policy |
|
Permit 10 |
Information about the routing policy with the matching mode configured as permit and the node as 10. |
|
if-match (ip-prefix) p1 |
Matching conditions |
|
apply cost 100 |
Apply the cost 100 to the routes satisfying the matching conditions. |
if-match { acl | ip-prefix }
Syntax
if-match { acl acl-number | ip-prefix ip-prefix-name }
undo if-match { acl | ip-prefix }
View
Route policy view
Parameters
acl-number: Number of the ACL used for filtering, in the range of 2000 to 3999.
ip-prefix-name: Name of the IP prefix list used for filtering, a string of up to 19 characters.
Description
Use the if-match command to match routes permitted by an ACL or IP prefix list.
Use the undo if-match command to remove the configuration.
By default, the if-match clause is not configured.
Related commands: if-match interface, if-match ip next-hop, if-match cost, if-match tag, route-policy, apply cost, apply tag.
Examples
# Define an if-match clause to match routing information permitted by IP-prefix p1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] route-policy policy permit node 1
%New sequence of this list
[Sysname-route-policy] if-match ip-prefix p1
if-match cost
Syntax
if-match cost value
undo if-match cost
View
Route policy view
Parameters
value: Route cost, in the range of 0 to 4294967295.
Description
Use the if-match cost command to configure a cost matching rule for routing information.
Use the undo if-match cost command to remove the configuration.
By default, no cost matching rule is defined.
Related commands: if-match interface, if-match acl, if-match ip-prefix, if-match ip next-hop, if-match tag, route-policy, apply cost, apply tag.
Examples
# Define an if-match clause to match routes with the cost of 8.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] route-policy policy permit node 1
%New sequence of this list
[Sysname-route-policy] if-match cost 8
if-match interface
Syntax
if-match interface interface-type interface-number
undo if-match interface
View
Route policy view
Parameters
interface-type interface-number: Specifies the interface type and interface number.
Description
Use the if-match interface command to match routes having the specified outgoing interface.
Use the undo if-match interface command to remove the match rule.
By default, no such a matching rule is configured.
This command matches routes having next hops pass through the specified interface.
Related commands: if-match acl, if-match ip-prefix, if-match ip next-hop, if-match cost, if-match tag, route-policy, apply cost, apply tag.
Examples
# Define an if-match clause to match routes with the outbound interface VLAN-interface 1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] route-policy policy permit node 1
%New sequence of this list
[Sysname-route-policy] if-match interface Vlan-interface 1
if-match ip next-hop
Syntax
if-match ip next-hop { acl acl-number | ip-prefix ip-prefix-name }
undo if-match ip next-hop [ ip-prefix ]
View
Route policy view
Parameters
acl acl-number: Number of a basic ACL used for filtering, in the range of 2000 to 2999.
ip-prefix ip-prefix-name: Name of the IP address prefix list used for filtering, a string of 1 to 19 characters.
Description
Use the if-match ip next-hop command to match routes with next hops specified in an ACL or IP prefix list.
Use the undo if-match ip next-hop command to remove the matching rule with an ACL.
Use the undo if-match ip next-hop ip-prefix command to remove the matching rule with an IP prefix list.
By default, no next hop matching rule is defined.
Related commands: if-match interface, if-match acl, if-match ip-prefix, if-match cost, if-match tag, route-policy, apply cost, apply tag.
Examples
# Define an if-match clause to match routes with next hops specified in the IP address prefix list p1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] route-policy policy permit node 1
%New sequence of this list
[Sysname-route-policy] if-match ip next-hop ip-prefix p1
if-match tag
Syntax
if-match tag value
undo if-match tag
View
Route policy view
Parameters
value: Tag value, in the range of 0 to 4294967295.
Description
Use the if-match tag command to configure the tag matching rule for routing information.
Use the undo if-match tag command to remove the matching rule.
By default, no the tag matching rule for routing information is defined.
Related commands: if-match interface, if-match acl, if-match ip-prefix, if-match ip next-hop, if-match cost, route-policy, apply cost, apply tag.
Examples
# Define an if-match clause to match OSPF routes having the tag value 8.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] route-policy policy permit node 1
%New sequence of this list
[Sysname-route-policy] if-match tag 8
ip ip-prefix
Syntax
ip ip-prefix ip-prefix-name [ index index-number ] { permit | deny } network len [ greater-equal greater-equal | less-equal less-equal ] *
undo ip ip-prefix ip-prefix-name [ index index-number | permit | deny ]
View
System view
Parameters
ip-prefix-name: Name of an IP-prefix, a string of up to 19 characters. It identifies an address prefix list uniquely.
index-number: Identifier of an entry in the IP address prefix list, in the range 1 to 2047. The entry with a smaller index-number will be tested first.
permit: Specifies the match mode of the defined IP-prefix entries as permit mode. If the permit mode is specified and the IP address to be filtered is in the ip-prefix range specified by the entry, the entry is filtered through and the next entry is not tested. If the IP address to be filtered is not in the ip-prefix range specified by the entry, the next entry is tested
deny: Specifies the match mode of the defined IP-prefix entries as deny mode. If the deny mode is specified and the IP address to be filtered is in the ip-prefix range specified by the entry, the entry is not filtered through and the next entry is not tested; otherwise, the next entry is tested.
network: IP address prefix (IP address), in dotted decimal notation.
len: IP address prefix length (mask length), in the range of 0 to 32.
greater-equal, less-equal: Address prefix range [greater-equal, less-equal] to be matched after the address prefix network len has been matched. The meaning of greater-equal is "greater than or equal to", and the meaning of less-equal is "less than or equal to". The range is len <= greater-equal <= less-equal <= 32. When only greater-equal is used, it denotes the prefix range [greater-equal, 32]. When only less-equal is used, it denotes the prefix range [len, less-equal]. When both greater-equal and less-equal are specified, the prefix range is [ less-equal,greater-equal ].
Description
Use the ip ip-prefix command to configure an IP-prefix list or one of its entries.
Use the undo ip ip-prefix command to delete an IP-prefix list or one of its entries.
By default, no IP-prefix list is configured.
An IP-prefix list is used for IP address filtering. An IP prefix list may contain several entries, and each entry specifies one address prefix range. The inter-entry filtering relation is OR. That is, passing an entry means filtering through this address prefix list. Not filtering through any entry means not filtering through this IP-prefix.
The address prefix range may contain two parts, which are determined by len and [greater-equal, less-equal], respectively. If the prefix ranges of these two parts are both specified, the IP to be filtered must match the prefix ranges of these two parts.
If you specify network len as 0.0.0.0 0, it matches the default route only.
To match all the routes, use 0.0.0.0 0 less-equal 32.
Examples
# Define an ip-prefix named p1 to permit only the routes whose mask lengths are 17 or 18 on network segment 10.0.192.0/8 to pass.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ip ip-prefix p1 permit 10.0.192.0 8 greater-equal 17 less-equal 18
route-policy
Syntax
route-policy route-policy-name { permit | deny } node node-number
undo route-policy route-policy-name [ permit | deny | node node-number ]
View
System view
Parameters
route-policy-name: Name of a routing policy, a string of 19 characters. This argument identifies a routing policy uniquely.
permit: Specifies the match mode of the defined routing policy node as permit. When a route entry meets all the if-match clauses of the node, the entry is permitted to filter through the node and the apply clause of the node will be performed. If a route entry does not meet the if-match clause of the node, the next node of the route-policy will be tested.
deny: Specifies the match mode of the defined Route-policy node as deny mode. When a route entry meets all the if-match clauses of the node, the entry is prohibited from filtering through the node and the next node will not be tested.
node: Specifies a node index in a routing policy.
node-number: Index of the node in a routing policy, in the range 0 to 2047. When this routing policy is used, the node with smaller node-number will be matched first.
Description
Use the route-policy command to create a routing policy or enter the Route-policy view.
Use the undo route-policy command to delete the created Route-policy.
By default, no Route-policy is defined.
Route-policy is used for route information filter. A Route-policy comprises some nodes and each node comprises some if-match clauses and apply clauses.
An if-match clause defines the match rules of this node. An apply clause defines the actions after filtering through this node. The filtering relationship between the if-match clauses of the node is AND. That is, all if-match clauses of the node must be met.
The filtering relation between Route-policy nodes is OR. That is, filtering through one node means filtering through this Route-policy. If the information does not filter through any node, it cannot filter through this Route-policy.
Related commands: if-match interface, if-match acl, if-match ip-prefix, if-match ip next-hop, if-match cost, if-match tag, apply cost, apply tag.
Examples
# Configure Route-policy policy1, with the node number of 10 and the match mode of permit, and enter Route policy view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] route-policy policy1 permit node 10
%New sequence of this list
[Sysname-route-policy]
l The term router in this chapter refers to a router in a generic sense or an Ethernet switch running a routing protocol.
l The S3600-SI series do not support route capacity configuration.
Route Capacity Configuration Commands
display memory
Syntax
display memory [ unit unit-id ]
Mode
Any view
Parameters
unit-id: Unit ID.
Description
Use the display memory command to display the memory usage.
Examples
# Display the current memory usage of the switch.
<Sysname> display memory
Unit 1
System Available Memory(bytes): 33631488
System Used Memory(bytes): 16122304
Used Rate: 47%
The following table describes the fields of the command:
Table 6-1 Description on the fields of the display memory command
Field |
Description |
Unit |
Specifies a Unit ID |
System Available Memory(bytes) |
Free memory size, in bytes, of the switch |
System Used Memory(bytes) |
Occupied memory size, in bytes, of the switch |
Used Rate |
Memory occupation rate |
display memory limit
Syntax
display memory limit
Mode
Any view
Parameters
None
Description
Use the display memory limit command to display the memory setting and state information of the switch.
This command displays the current memory limit configuration, free memory, and state information about connections, such as times of disconnection, times of reconnection, and whether the current state is normal.
Examples
# Display the current memory setting and state information.
<Sysname> display memory limit
Current memory limit configuration information:
system memory safety: 5 (MBytes)
system memory limit: 4 (MBytes)
auto-establish enabled
Free Memory: 17506496 (Bytes)
The state information about connection:
The times of disconnect: 0
The times of reconnect: 0
The current state: Normal
Table 6-2 Description on the fields of the display memory limit command
Description |
|
system memory safety |
|
system memory limit |
Lower limit of the switch memory. |
auto-establish enabled |
Automatic connection is enabled (If automatic connection is disabled, auto-establish disabled is displayed). |
Free Memory |
Size of the current free memory in bytes |
The times of disconnect: |
Number of disconnections of the routing protocol |
The times of reconnect |
Number of reconnections of the routing protocol |
The current state |
Current memory state, including Normal Exigence |
memory
Syntax
memory { safety safety-value | limit limit-value }*
undo memory [ safety | limit ]
View
System view
Parameters
safety-value: Safety free memory of the switch , in Mbytes. Its value range depends on the free memory of the current switch. This value defaults to 5.
limit-value: Lower limit of the switch free memory, in Mbytes. Its value range depends on the free memory of the current switch. This value defaults to 4.
Description
Use the memory limit limit-value command to configure the lower limit of the switch free memory.
When the free memory of the switch is less than the limit-value, all the routing protocol connections will be disconnected forcibly.
Use the memory safety safety-value command to configure the safety value of the switch free memory.
If you use the memory auto-establish enable command (the default configuration), the routing protocol connection that is forcibly disconnected automatically recovers when the free memory of the switch reaches the safety-value.
Use the memory safety safety-value limit limit-value command to change both the safety value and lower limit of the switch free memory.
Use the undo memory command to restore the default safety value and lower limit of the switch free memory.
Related commands: memory auto-establish disable, memory auto-establish enable, display memory limit.
When you configure the memory command, the safety-value argument in the command must be greater than the limit-value argument; otherwise, the configuration will fail.
Examples
# Set the lower limit of the switch free memory to 1 MB and the safety value to 3 MB.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] memory safety 3 limit 1
memory auto-establish disable
Syntax
memory auto-establish disable
View
System view
Parameters
None
Description
Use the memory auto-establish disable command to disable the automatic restoration of routing protocol connection (even if the free memory recovers to a safety value).
By default, when the free memory of the switch recovers to a safety value, connections of all the routing protocols will always recover (when the free memory of the switch decreases to a lower limit, the connection will be disconnected forcibly).
After this command is used, connections of all the routing protocols will not recover when the free memory of the switch recovers to a safety value. In this case, you need to restart the routing protocol to recover the connections.
Use this command with caution.
Related commands: memory auto-establish enable, memory, display memory limit.
Examples
# Disable automatic restoration of the routing protocol connections when the free memory of the current switch recovers.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] memory auto-establish disable
memory auto-establish enable
Syntax
memory auto-establish enable
View
System view
Parameters
None
Description
Use the memory auto-establish enable command to enable automatic connections of routing protocols when the free memory of the switch recovers to the specified value.
Use the memory auto-establish disable command to disable this function.
By default, when the free memory of the switch recovers to a safety value, connections of all the routing protocols will always recover (when the free memory of the switch decreases to a lower limit, the connection will be disconnected forcibly).
By default, this function is enabled.
Related commands: memory auto-establish disable, memory, display memory limit.
Examples
# Enable automatic connections of all routing protocols when the free memory of the current switch recovers.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] memory auto-establish enable