- Table of Contents
-
- H3C S3600 Series Ethernet Switches Command Manual-Release 1510(V1.04)
- 00-1Cover
- 01-CLI Command
- 02-Login Command
- 03-Configuration File Management Command
- 04-VLAN Command
- 05-IP Address and Performance Configuration Command
- 06-Management VLAN Command
- 07-Voice VLAN Command
- 08-GVRP Command
- 09-Port Basic Configuration Command
- 10-Link Aggregation Command
- 11-Port Isolation Command
- 12-Port Security-Port Binding Command
- 13-DLDP Command
- 14-MAC Address Table Command
- 15-Auto Detect Command
- 16-MSTP Command
- 17-Routing Protocol Command
- 18-Multicast Command
- 19-802.1x Command
- 20-AAA-RADIUS-HWTACACS-EAD Command
- 21-VRRP Command
- 22-Centralized MAC Address Authentication 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 Terminal Service Command
- 36-File System Management Command
- 37-FTP and TFTP Command
- 38-Information Center Command
- 39-System Maintenance and Debugging Command
- 40-VLAN-VPN Command
- 41-HWPing Command
- 42-DNS Command
- 43-Access Management Command
- 44-Appendix
- Related Documents
-
Title | Size | Download |
---|---|---|
17-Routing Protocol Command | 376 KB |
Table of Contents
Chapter 1 Static Route Configuration Commands
1.1 Routing Table Monitoring Commands
1.1.1 display ip routing-table
1.1.2 display ip routing-table ip-address
1.1.3 display ip routing-table ip-address1 ip-address2
1.1.4 display ip routing-table protocol
1.1.5 display ip routing-table radix
1.1.6 display ip routing-table statistics
1.1.7 display ip routing-table verbose
1.2 Static Route Configuration Commands
1.2.1 delete static-routes all
Chapter 2 RIP Configuration Commands
2.1 RIP Configuration Commands
2.1.15 rip authentication-mode
2.1.25 traffic-share-across-interface
Chapter 3 OSPF Configuration Commands
3.1 OSPF Configuration Commands
3.1.11 default-route-advertise
3.1.13 display ospf asbr-summary
3.1.15 display ospf cumulative
3.1.21 display ospf request-queue
3.1.22 display ospf retrans-queue
3.1.33 ospf authentication-mode
3.1.49 snmp-agent trap enable ospf
Chapter 4 IP Routing Policy Configuration Commands
4.1 IP Routing Policy Configuration Commands
Chapter 5 Route Capacity Configuration Commands
5.1 Route Capacity Configuration Commands
5.1.4 memory auto-establish disable
5.1.5 memory auto-establish enable
Chapter 1 Static Route Configuration Commands
& Note:
When running a routing protocol, the Ethernet switch also functions as a router. The words “router” and the router icons covered in the following text represent routers in common sense and Ethernet switches running a routing protocol.
This manual deals with the S3600-EI series switches. The ospf, ospf-ase, and ospf-nssa commands are supported by the S3600-EI series, but not supported by any other S3600 Ethernet switch. This will not be mentioned again in this manual.
1.1 Routing Table Monitoring Commands
1.1.1 display ip routing-table
Syntax
display ip routing-table
View
Any view
Parameter
None
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.
Example
# Display the summary of the current routing table.
<H3C> 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
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 |
1.1.2 display ip routing-table ip-address
Syntax
display ip routing-table ip-address [ mask ] [ longer-match ] [ verbose ]
View
Any view
Parameter
ip-address: Destination IP address, in dotted decimal notation.
mask: IP address mask, length in dotted decimal notation or expressed as an integer. It ranges from 0 to 32 when expressed as an integer.
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: With the verbose argument specified, this command displays the verbose information of both the active and inactive routes. Without the argument specified, this command only displays the summary of active 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.
Example
# There is a corresponding route in the natural mask range. Display the summary.
<H3C> 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 detailed description of the output information, see Table 1-1.
# There is no corresponding route (only the longest matching route is displayed) in the natural mask range. Display the summary.
<H3C> display ip routing-table 169.253.0.0
Destination/Mask Protocol Pre Cost Nexthop Interface
169.0.0.0/8 Static 60 0 2.1.1.1 LoopBack1
# There are corresponding routes in the natural mask range. Display detailed information.
<H3C> display ip routing-table 169.0.0.0 verbose
Routing tables:
+ = Active Route, - = Last Active, # = Both * = Next hop in use
Summary count: 1
**Destination: 169.0.0.0 Mask: 255.255.255.0
Protocol: #STATIC Preference: 60
*NextHop: 2.1.1.1 Interface: 2.1.1.1(LoopBack1)
Vlinkindex: 0
State: <Int ActiveU Gateway Static Unicast>
Age: 4:49 Cost: 0/0 Tag: 0
# There is no corresponding route in the natural mask range (only the longest matched route is displayed). Display the detailed information.
<H3C> 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)
Vlinkindex: 0
State: <Int ActiveU Static Unicast>
Age: 3:47 Cost: 0/0 Tag: 0
Table 1-2 Description on the fields of the display ip routing-table command
Field |
Description |
|
Destination |
Destination address |
|
Mask |
Mask |
|
Protocol |
Routing protocol |
|
Preference |
Routing preference |
|
Nexthop |
Next hop address |
|
Interface |
Output interface, through which the data packets destined for the destination network segment are sent |
|
State |
Route state description: |
|
ActiveU |
This is an active unicast route. "U" means "unicast". |
|
Blackhole |
Blackhole route is similar to Reject route, except that a Blackhole route sends no ICMP unreachable message to the source end. |
|
Delete |
The route is deleted |
|
Gateway |
The route is not directly reachable. |
|
Hidden |
The route is hidden. That is, the route exists, but it is hidden because it is unavailable for the moment due to some reason (e.g., a configured policy or a down interface) and is not expected to be deleted, and it can be restored later. |
|
Holddown |
Holddown is a route redistribution policy adopted by some distance-vector (D-V) routing protocols such as RIP. Through Holddown, a routing protocol can avoid the flooding of error routes and deliver route unreachable messages accurately. It redistributes a certain route every a period of time regardless of whether the actually found routes destined for the same destination change. For more details, refer to the specific routing protocols. |
|
Int |
The route is discovered by interior gateway protocol (IGP). |
|
NoAdvise |
The routing protocol does not redistribute NoAdvise route when it redistributes routes based on the policy. |
|
NotInstall |
Normally, the routing protocol selects the route with the highest preference from its routing table, places it in its core routing table, and redistributes it. Although the NotInstall route cannot be placed in the core routing table, it is possibly that it is selected and redistributed. |
|
Reject |
Unlike the normal routes, the Reject route will discard the packets that select it as their route, and the router will send ICMP unreachable messages to the source end. Reject route is usually used for the network test |
|
Retain |
When the routes from the routing table are deleted, the routes with Retain flag will not be deleted. Using this function you can set Retain flag for some static routes, so that they can exist in the core routing table. |
|
Static |
The route with Static flag will not be cleared from the routing table after you save it and reboot the router. Generally, the static route configured manually in the router belongs to a Static route. |
|
Unicast |
Unicast route |
|
Age |
Time to live, in the format of hour/minute/second (hh:mm:ss). |
|
Cost |
Value of the cost |
1.1.3 display ip routing-table ip-address1 ip-address2
Syntax
display ip routing-table ip-address1 mask1 ip-address2 mask2 [ verbose ]
View
Any view
Parameter
ip-address1, ip-address2: Destination IP address in dotted decimal notation. ip-address1, mask1 and ip-address2, mask2 determine one address range together. ip-address1 ANDed with mask1 specifies the start of the range, while ip-address2 ANDed with mask2 specifies the end. This command displays the route in this address range.
mask1, mask2: IP address mask, length in dotted decimal notation or expressed as an integer. It ranges from 0 to 32 when expressed as an integer.
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.
Example
# Display the routing information of destination addresses ranging from 1.1.1.0 to 2.2.2.0.
<H3C>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 detailed description of the output information, see Table 1-1.
1.1.4 display ip routing-table protocol
Syntax
display ip routing-table protocol protocol [ inactive | verbose ]
View
Any view
Parameter
protocol: You can provide one of the following values for this argument.
l direct: Displays direct-connect route information
l static: Displays static route information.
l ospf: Displays OSPF route information.
l ospf-ase: Displays OSPF ASE route information.
l ospf-nssa: Displays OSPF NSSA route information.
l rip: Displays RIP 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 argument provided, this command displays the verbose route information. Without this argument provided, this command displays route summary only.
Description
Use the display ip routing-table protocol command to display the route information of a specific protocol.
Example
# Display the summary of all direct-connect routes.
<H3C> 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
# Display the static routing table.
<H3C> display ip routing-table protocol static
STATIC Routing tables:
Summary count: 1
STATIC Routing tables status:<active>:
Summary count: 0
STATIC Routing tables status:<inactive>:
Summary count: 1
Destination/Mask Protocol Pre Cost Nexthop Interface
1.2.3.0/24 STATIC 60 0 1.2.4.5 Vlan-interface10
For detailed description of the output information, see Table 1-1.
1.1.5 display ip routing-table radix
Syntax
display ip routing-table radix
View
Any view
Parameter
None
Description
Use the display ip routing-table radix command to display the route information in a tree structure.
Example
<H3C> 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 |
1.1.6 display ip routing-table statistics
Syntax
display ip routing-table statistics
View
Any view
Parameter
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.
Example
# Display the integrated route information.
<H3C> 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. O_ASE stands for OSPF_ASE routes; O_NSSA stands for OSPF NSSA routes; AGGRE stands for aggregated routes. |
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 |
1.1.7 display ip routing-table verbose
Syntax
display ip routing-table verbose
View
Any view
Parameter
None
Description
Use the display ip routing-table verbose command to display the verbose routing table information.
With the verbose argument provided, this command displays the verbose routing table information. The descriptor describing the route state will be displayed first. Then, the statistics of the entire routing table will be output. Finally, the verbose description of each route will be output.
The display ip routing-table verbose command can display all current routes, including inactive routes and invalid routes.
Example
# Display the verbose routing table information.
<H3C> 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
First, display statistics of the whole routing table. Then, output detailed information of every route entry in turn. Table 1-2 shows the meaning of route status. Table 1-5 shows routing table statistics.
Table 1-5 Description on the fields of the display ip routing-table verbose command
Field |
Description |
Holddown |
Number of held-down routes |
Delete |
Number of deleted routes |
Hidden |
Number of hidden routes |
1.2 Static Route Configuration Commands
1.2.1 delete static-routes all
Syntax
delete static-routes all
View
System view
Parameter
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 command: ip route-static and display ip routing-table.
Example
# Delete all the static routes in the router.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] delete static-routes all
Are you sure to delete all the unicast static routes?[Y/N]y
1.2.2 ip route-static
Syntax
ip route-static ip-address { mask | mask-length } { interface-type interface-number | next-hop } [ preference preference-value ] [ reject | blackhole ] [ description text | detect-group group number ]*
undo ip route-static ip-address { mask | mask-length } [ interface-type interface-number | next-hop ] [ preference preference-value ] [ reject | blackhole ] [ description text | detect-group group number ]*
View
System view
Parameter
ip-address: Destination IP address, in dotted decimal notation.
mask: Mask.
mask-length: Mask length. Since 1s in a 32-bit mask must be consecutive, a mask in dotted decimal notation can be replaced by mask-length, which is the number of the consecutive 1s in the mask.
interface-type interface-number: Next-hop outgoing interface. The packets sent to a null interface, which is a virtual interface, will be discarded immediately. This can decrease the system load.
next-hop: Next hop IP address of the route, in dotted decimal notation.
preference-value: Preference level of the route, in the range from 1 to 255. The default preference is 60.
reject: Indicates an unreachable route. If a static route to a destination has the "reject" attribute, all the 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 has the “blackhole” attribute, the outgoing 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: Provides a description for the current route.
detect-group: Specifies a detect group.
Description
Use the ip route-static command to configure a static route.
Use the undo ip route-static command to delete a manually configured 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 command: display ip routing-table.
Example
# Configure the next hop of the default route as 129.102.0.2.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ip route-static 0.0.0.0 0.0.0.0 129.102.0.2
Chapter 2 RIP Configuration Commands
& Note:
When running a routing protocol, the Ethernet switch also functions as a router. The word “router” and the router icons covered in the following text represent routers in common sense and Ethernet switches running a routing protocol.
2.1 RIP Configuration Commands
2.1.1 checkzero
Syntax
checkzero
undo checkzero
View
RIP view
Parameter
None
Description
Use the checkzero command to enable zero field check of RIP-1 packets.
Use the undo checkzero command to disable zero field check.
By default, RIP-1 performs 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 zero field check of RIP-1 packets. When zero field check is enabled, if an incoming RIP-1 packet has a non-zero zero field, the packet will be rejected.
This command does not apply to RIP-2 packets because they have no zero fields.
Example
# Disable zero field check on RIP-1 packets.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] rip
[H3C-rip] undo checkzero
2.1.2 default cost
Syntax
default cost value
undo default cost
View
RIP view
Parameter
value: Default routing cost to be set, ranging from 1 to 16. It is 1 by default.
Description
Use the default cost command to set the default routing cost of imported routes.
Use the undo default cost command to restore the default value.
If no routing cost is specified when you use the import-route command to import routes from another routing protocol, the routes will be imported with the default routing cost specified with the default cost command.
Related command: import-route.
Example
# Set the default routing cost of the routes imported from other routing protocols to 3.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] rip
[H3C-rip] default cost 3
2.1.3 display rip
Syntax
display rip
View
Any view
Parameter
None
Description
Use the display rip command to display the current RIP operation state and RIP configuration.
Example
# Display the current RIP operation state and configuration.
<H3C> 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 2-1 Description on the fields of the display rip command
Field |
Description |
RIP is running |
RIP is active. |
Checkzero is on |
Zero field checking is enabled. |
Default cost : 1 |
The default route cost is 1 |
Summary is on |
Routes are aggregated automatically |
Preference : 100 |
The preference of RIP is 100 |
Period update timer : 30 Timeout timer : 180 Garbage-collection timer : 120 |
Settings of the three timers of RIP |
No peer router |
No destination address of a transmission is specified |
Network :202.38.168.0 |
RIP is enabled on network segment 202.38.168.0 |
Traffic-share-across-interface is off |
Traffic is shared across equivalent routes. |
2.1.4 display rip interface
Syntax
display rip interface
View
Any view
Parameter
None
Description
Use the display rip interface command to display RIP interface information.
Example
# Display RIP interface information.
<H3C> 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 2-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 routing 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) |
2.1.5 display rip routing
Syntax
display rip routing
View
Any view
Parameter
None
Description
Use the display rip routing command to display RIP routing information.
Example
# Display RIP routing table information.
<H3C> 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 2-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 |
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) |
2.1.6 filter-policy export
Syntax
filter-policy { acl-number | ip-prefix ip-prefix-name } export [ routing-protocol ]
filter-policy route-policy route-policy-name export
undo filter-policy { acl-number | ip-prefix ip-prefix-name } export [ routing-protocol ]
undo filter-policy route-policy route-policy-name export
View
RIP view
Parameter
acl-number: Number of the basic or advanced ACL used to filter routing information by destination address.
ip-prefix-name: Name of the address ip-prefix list used to filter routing information by destination address.
route-policy-name: Name of the route-policy used to filter routing information. A route-policy can enable RIP to determine which routes are to be sent/received based on such fields as acl/cost/interface/ip/ip-prefix/tag.
routing-protocol: Routing protocol whose routing information is to be filtered. Currently, this can be direct, ospf, ospf-ase, ospf-nssa, or static.
Description
Use the filter-policy export command to enable RIP to filter the routing information to be advertised.
Use the undo filter-policy export command to cancel the filtering of the routing information to be advertised.
By default, RIP does not filter advertised routing information.
Related command: acl, filter-policy import, and ip ip-prefix.
Example
# Configure to filter route information by ACL 2000 before the information is advertised.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] rip
[H3C-rip] filter-policy 2000 export
2.1.7 filter-policy import
Syntax
filter-policy gateway ip-prefix-name import
undo filter-policy gateway ip-prefix-name import
filter-policy { acl-number | ip-prefix ip-prefix-name [ gateway ip-prefix-name ] | 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
View
RIP view
Parameter
acl-number: Number of the ACL used to filter routing information by destination address.
ip-prefix-name: Name of the address prefix list used to filter routing information by destination address.
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.
route-policy-name: Name of the route-policy that filters routing information. A route-policy can enable RIP to determine which routes are to be sent/received based on such fields as acl/cost/interface/ip/ip-prefix/tag.
Description
Use the filter-policy gateway command to enable RIP to filter received routing information by a specified address so that the routing information advertised by the address can pass the filter.
Use the undo filter-policy gateway command to disable the above filtering.
Use the filter-policy import command to enable RIP to filter the received global routing information.
Use the undo filter-policy import command to disable the above filtering.
By default, RIP does not filter the received routing information.
You can control the range of routes received by RIP by specifying an ACL and ip-prefix list.
Related command: acl, filter-policy export, and ip ip-prefix.
Example
# Configure to filter global routing information by acl 2000.
<H3C>system-view
System View: return to User View with Ctrl+Z.
[H3C] rip
[H3C-rip] filter-policy 2000 import
2.1.8 host-route
Syntax
host-route
undo host-route
View
RIP view
Parameter
None
Description
Use the host-route command to enable RIP to accept host routes.
Use the undo host-route command to reject host routes.
By default, RIP accepts 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 path searching and occupy a lot of resources. In this case, the undo host-route command can be used to reject host routes.
Example
# Enable RIP to reject host routes.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] rip
[H3C-rip] undo host-route
2.1.9 import-route
Syntax
import-route protocol [process-id ] [ cost value | route-policy route-policy-name ]*
undo import-route protocol
View
RIP view
Parameter
protocol: Source routing protocol whose routes will be imported by RIP. At present, RIP can import the following types of routes: direct, ospf, ospf-ase, ospf-nssa and static.
Process-id: Specifies a process ID, ranging from 1 to 65,535. You can use this argument only when importing OSPF.
value: Cost value of the route to be imported.
Description
Use the import-route command to import the routes of another protocol into RIP.
Use the undo import-route command to cancel the routes imported from another protocol.
By default, RIP does not import routes from other protocols.
The import-route command is used to import the routes of another protocol with a specified cost. RIP regards the imported routes as its own routes and transmits them with the specified cost. This command can greatly enhance the capability of RIP to obtain routes, thereby improving RIP performance.
If the cost value is not specified, routes will be imported with the default routing cost (set by the default cost command, ranging from 1 to 16). If the cost of an imported route is 16, RIP marks the route as HOLD DOWN (however, the route can still be used to forward packets), and continues to announce the route with this cost to other routers running RIP until the Garbage Collection timer times out (the timeout time defaults to 120 seconds).
Related command: default cost.
Example
# Import static routes with the cost of 4.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] rip
[H3C-rip] import-route static cost 4
# Set the default cost and import OSPF routes with the default cost.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] rip
[H3C-rip] default cost 3
[H3C-rip] import-route ospf
2.1.10 network
Syntax
network network-address
undo network network-address
View
RIP view
Parameter
network-address: Address of the network for which RIP is enabled/disabled. It can be the IP network address of any interface.
Description
Use the network command to enable RIP on a specified interface.
Use the undo network command to disable RIP on the interface.
By default, RIP is disabled on any interface.
After a RIP routing process is started, it is disabled on any interface. To enable RIP routing on an interface, you must use the network command.
The undo network command is similar to the undo rip work command in function. But they are not identical.
Their similarity is that the interface using either command will not receive/transmit RIP routes any more.
The difference between them is that, in the case of undo rip work, other interfaces will still forward the routes of the interface on which the undo rip work command is executed. In the case of undo network, other interfaces will not forward the routes of the interface on which the undo network command is executed and it seems that the interface disappeared.
When the network command is used on an address, the effect is that the interface on the network segment at this address is enabled. For example, the results of viewing the network 129.102.1.1 with both the display current-configuration command and the display rip command are shown as network 129.102.0.0.
Related command: rip work.
Example
# Enable RIP on the interface with the network address 129.102.0.0.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] rip
[H3C-rip] network 129.102.0.0
2.1.11 peer
Syntax
peer ip-address
undo peer ip-address
View
RIP view
Parameter
ip-address: IP address of the interface on the peer router with which routing information needs to be exchanged, in dotted decimal notation.
Description
Use the peer command to configure the destination address of the peer device with which routing information should be exchanged in unicast mode.
Use the undo peer command to cancel a unicast address.
By default, RIP does not send packets to any address in unicast mode.
This command is used to for non-broadcast networks to which protocol packets cannot be sent in broadcast mode. Generally you are not recommended to use this command.
Example
# Specify a unicast destination address of 202.38.165.1.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] rip
[H3C-rip] peer 202.38.165.1
2.1.12 preference
Syntax
preference value
undo preference
View
RIP view
Parameter
value: Preference level, ranging from 1 to 255. By default, the value is 100.
Description
Use the preference command to configure the route preference of RIP.
Use the undo preference command to restore the default preference.
Every routing protocol has its own preference. Its default value is determined by the specific routing policy. The 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 this command to modify the RIP preference manually.
Example
# Specify the RIP preference as 20.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] rip
[H3C-rip] preference 20
2.1.13 reset
Syntax
reset
View
RIP view
Parameter
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 setting.
Example
# Reset the RIP system configuration.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] rip
[H3C-rip] reset
% Reset RIP's configuration and restart RIP? [Y/N]y
2.1.14 rip
Syntax
rip
undo rip
View
System view
Parameter
None
Description
Use the rip command to enable RIP and enter RIP view.
Use the undo rip command to disable RIP.
By default, the system does not run RIP.
RIP must be enabled before you can enter the RIP view and configure various RIP global parameters. You can, however, configure the interface-based parameters regardless of whether RIP is enabled.
& Note:
Note that the interface parameters configured previously would be invalid when RIP is disabled.
Example
# Enable RIP and enter RIP view.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] rip
[H3C-rip]
2.1.15 rip authentication-mode
Syntax
rip authentication-mode { simple password | md5 { rfc2453 key-string | rfc2082 key-string key-id } }
undo rip authentication-mode
View
Interface view
Parameter
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.
rfc2453: Specifies that MD5 cipher text authentication packets will use a packet format (IETF standard) stipulated by RFC2453.
rfc2082: Specifies that MD5 cipher text authentication packets will use a packet format stipulated by RFC2082.
key-string: MD5 cipher text authentication key. If it is input in a plain text form, MD5 key is a character string not exceeding 16 characters. And it will be displayed in a cipher text form in a length of 24 characters when you use the display current-configuration command. You can also input the MD5 key in a cipher text form with a length of 24 characters.
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 cancel all authentication.
Only one authentication key is supported each time authentication is performed. An authentication key newly input overwrites an old one.
Related command: rip version.
Example
# Specify the interface VLAN-interface10 to use the simple authentication with the authentication key of aaa.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface Vlan-interface 10
[H3C-Vlan-interface10] rip version 2
[H3C-Vlan-interface10] rip authentication-mode simple aaa
# Specify VLAN-interface10 to use the MD5 cipher text authentication, with the authentication key of aaa and the packet format of rfc2453.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface Vlan-interface 10
[H3C-Vlan-interface10] rip version 2
[H3C-Vlan-interface10] rip authentication-mode md5 rfc2453 aaa
2.1.16 rip input
Syntax
rip input
undo rip input
View
Interface view
Parameter
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.
This command is used in cooperation with another two commands: rip output and rip work. Functionally, rip work is equivalent to rip input & rip output. The latter two control the receipt and the transmission of RIP packets respectively on an interface. The former command equals the functional combination of the latter two commands.
Related command: rip output, rip work.
Example
# Configure the interface VLAN-interface10 not to receive RIP packets.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C]interface Vlan-interface 10
[H3C-Vlan-interface10] undo rip input
2.1.17 rip metricin
Syntax
rip metricin value
undo rip metricin
View
Interface view
Parameter
value: Additional route metric added when receiving a RIP route, ranging from 0 to 16. By default, the value is 0.
Description
Use the rip metricin command to configure the additional route metric added to the RIP routes received on an interface.
Use the undo rip metricin command to restore the default value of this additional route metric.
Related command: rip metricout.
Example
# Set the additional route metric added to RIP routes received on VLAN-interface10 to 2.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface Vlan-interface 10
[H3C-Vlan-interface10] rip metricin 2
2.1.18 rip metricout
Syntax
rip metricout value
undo rip metricout
View
Interface view
Parameter
value: Additional route metric added when transmitting a RIP route, ranging from 1 to 16. By default, the value is 1.
Description
Use the rip metricout command to configure the additional route metric added to the RIP routes to be transmitted on an interface.
Use the undo rip metricout command to restore the default value of this additional route metric.
& Note:
The metricout configuration only applies to the RIP routes learnt by the router and those generated by the router itself. It does not apply to any route imported to RIP by any other routing protocol.
Related command: rip metricin.
Example
# Set the additional route metric added to the RIP routes to be transmitted on VLAN-interface10 to 2.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface Vlan-interface 10
[H3C-Vlan-interface10] rip metricout 2
2.1.19 rip output
Syntax
rip output
undo rip output
View
Interface view
Parameter
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.
This command is used in cooperation with another two commands: rip input and rip work . Functionally, rip work is equivalent to rip input & rip output. The latter two control the receipt and the transmission of RIP packets respectively on an interface. The former command equals the functional combination of the latter two commands.
Related command: rip input, rip work.
Example
# Disable the interface VLAN-interface10 from transmitting RIP packets.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface Vlan-interface 10
[H3C-Vlan-interface10] undo rip output
2.1.20 rip split-horizon
Syntax
rip split-horizon
undo rip split-horizon
View
Interface view
Parameter
None
Description
Use the rip split-horizon command to configure an interface to use split horizon when transmitting RIP packets.
Use the undo rip split-horizon command to configure an interface not to use split horizon when transmitting RIP packets.
By default, an interface is enabled to use split horizon when transmitting RIP packets.
Normally, split horizon is necessary for avoiding route loop. Only in some special cases does split horizon need to be disabled to ensure the correct execution of the protocol. So, disable split horizon only when necessary.
Example
# Specify the interface VLAN-interface10 not to use split horizon when processing RIP packets.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface Vlan-interface 10
[H3C-Vlan-interface10] undo rip split-horizon
2.1.21 rip version
Syntax
rip version { 1 | 2 [ broadcast | multicast ] }
undo rip version
View
Interface view
Parameter
1: Interface version is RIP-1.
2: Interface version is RIP-2.
broadcast: Transmission mode of RIP-2 packets is broadcast.
multicast: Transmission mode of RIP-2 packets is multicast.
Description
Use the rip version command to specify the version of RIP packets on an interface.
Use the undo rip version command to restore the default RIP packet version on the interface.
By default, the interface RIP version is RIP-1. RIP-1 transmits packets in broadcast mode, while RIP-2 transmits packets in multicast mode by default.
When running RIP-1, the interface only receives and transmits RIP-1 broadcast packets, and receives RIP-2 broadcast packets, but does not receive RIP-2 multicast packets. When running RIP-2 in broadcast mode, the interface receives and transmits RIP-2 broadcast packets. It also receives RIP-1 broadcast packets. When running RIP-2 in multicast mode, the interface only receives and transmits RIP-2 multicast packets, receives RIP-2 broadcast packets, but does not receive RIP-1 broadcast packets.
Example
# Configure the interface VLAN-interface10 as RIP-2 broadcast mode.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface Vlan-interface 10
[H3C-Vlan-interface10] rip version 2 broadcast
2.1.22 rip work
Syntax
rip work
undo rip work
View
Interface view
Parameter
None
Description
Use the rip work command to enable RIP on an interface.
Use the undo rip work command to disable RIP on an interface.
By default, RIP is enabled on an interface.
This command is used in cooperation with rip input, rip output and network commands.
Related command: network, rip input, and rip output.
Example
# Disable RIP on the interface VLAN-interface10.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface Vlan-interface 10
[H3C-Vlan-interface10] undo rip work
2.1.23 summary
Syntax
summary
undo summary
View
RIP view
Parameter
None
Description
Use the summary command to enable RIP-2 automatic route aggregation.
Use the undo summary command to disable RIP-2 automatic route aggregation.
By default, RIP-2 route aggregation is enabled.
Route aggregation can be used to reduce the routing traffic on the network as well as to reduce the size of the routing table. If RIP-2 is used, route aggregation function can be disabled with the undo summary command when it is necessary to broadcast subnet routes.
RIP-1 does not support subnet mask. Forwarding subnet routes may cause ambiguity. Therefore, RIP-1always uses route aggregation. The undo summary command is invalid for RIP-1.
Related command: rip version.
Example
# Set RIP version on the interface VLAN-interface10 as RIP-2 and disable route aggregation.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface Vlan-interface 10
[H3C-Vlan-interface10] rip version 2
[H3C-Vlan-interface10] quit
[H3C] rip
[H3C-rip] undo summary
2.1.24 timers
Syntax
timers { update update-timer | timeout timeout-timer } *
undo timers { update | timeout } *
View
RIP view
Parameter
update-timer: Value of the Period Update timer, ranging from 1 to 3,600 seconds. By default, it is 30 seconds.
timeout-timer: Value of the Timeout timer, ranging from 1 to 3,600 seconds. By default, it is 180 seconds.
Description
Use the timers command to modify the values of the three RIP timers: Period Update, Timeout, and Garbage-collection (which is usually set to a value four times that of the Period Update timer).
Use the undo timers command to restore the default settings.
By default, 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.
Related command: display rip.
Example
# Set the values of the Period Update timer and the Timeout timer of RIP to 10 seconds and 30 seconds respectively.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] rip
[H3C-rip] timers update 10 timeout 30
2.1.25 traffic-share-across-interface
Syntax
traffic-share-across-interface
undo traffic-share-across-interface
View
RIP view
Parameter
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:
If this function is enabled, the newly learned equivalent route replaces the existing equivalent route in the routing table.
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.
Example
# Enable traffic to be forwarded along multiple equivalent RIP routes.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] rip
[H3C-rip] traffic-share-across-interface
Chapter 3 OSPF Configuration Commands
& Note:
When running a routing protocol, the Ethernet switch also functions as a router. The words “router” and the router icons covered in the following text represent routers in common sense and Ethernet switches running a routing protocol.
Among S3600 Series Ethernet Switches, only S3600-EI series support OSPF protocol.
3.1 OSPF Configuration Commands
3.1.1 abr-summary
Syntax
abr-summary ip-address mask [ advertise | not-advertise ]
undo abr-summary ip-address mask
View
OSPF Area view
Parameter
ip-address: Network segment address.
mask: Network mask.
advertise: Specifies to advertise the aggregated route that match a specific IP address and mask.
not-advertise: Specifies not to advertise the aggregated route that match a specific IP address and mask.
Description
Use the abr-summary command to enable route aggregation on an area border router (ABR).
Use the undo abr-summary command to disable route aggregation on an ABR.
By default, an ABR does not aggregate routes.
This command is applicable to ABRs only and is used for route aggregation in an area. It allows the ABR to transmit an aggregated route to other areas.
Route aggregation means that routing information is processed by an ABR, which transmits only one route to other areas for each network segment configured with route aggregation. You can configure multiple aggregation routes in an area so that OSPF can aggregate multiple network segments.
Example
# Aggregate the routes in the two network segments, 36.42.10.0 and 36.42.110.0, in OSPF area 1 into one summary route 36.42.0.0 and transmit it to other areas.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ospf 1
[H3C-ospf-1] area 1
[H3C-ospf-1-area-0.0.0.1] network 36.42.10.0 0.0.0.255
[H3C-ospf-1-area-0.0.0.1] network 36.42.110.0 0.0.0.255
[H3C-ospf-1-area-0.0.0.1] abr-summary 36.42.0.0 255.255.0.0
3.1.2 area
Syntax
area area-id
undo area area-id
View
OSPF view
Parameter
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.
Example
# Enter OSPF area 0 view.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ospf 1
[H3C-ospf-1] area 0
[H3C-ospf-1-area-0.0.0.0]
3.1.3 asbr-summary
Syntax
asbr-summary ip-address mask [ not-advertise | tag value ]
undo asbr-summary ip-address mask
View
OSPF view
Parameter
ip-address: IP address to be matched, in dotted decimal notation.
mask: IP address mask, in dotted decimal notation.
not-advertise: Specifies not to advertise the aggregated route matching the specified IP address and mask. If this argument is not provided, the aggregated route will be advertised.
tag value: Tag value, which is mainly used to control route advertisement via route-policy. It ranges from 0 to 4294967295 and defaults to 1.
Description
Use the asbr-summary command to configure the aggregation of imported routes by OSPF.
Use the undo asbr-summary command to cancel the aggregation.
By default, imported routes are not aggregated.
After the aggregation of imported routes is configured, if the local router is an autonomous system border router (ASBR), this command aggregates the imported Type-5 LSAs in the aggregation address range. If an NSSA is configured, this command also aggregates the imported Type-7 LSAs in the summary address range.
If the local router acts as both an ABR and a transit router in the NSSA, this command aggregates Type-5 LSAs transformed from Type-7 LSAs. If the router is not the router in the NSSA, the aggregation is disabled.
Related command: display ospf asbr-summary.
Example
# Set aggregation of routes imported by the router H3C.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ospf 1
[H3C-ospf-1] asbr-summary 10.2.0.0 255.255.0.0 not-advertise
3.1.4 authentication-mode
Syntax
authentication-mode { simple | md5 }
undo authentication-mode
View
OSPF Area view
Parameter
simple: Uses simple text authentication mode.
md5: Uses 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.
Related command: ospf authentication-mode.
Example
# Enter area 0 view.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ospf 1
[H3C-ospf-1] area 0
# Specify the OSPF area 0 to support MD5 cipher text authentication.
[H3C-ospf-1-area-0.0.0.0] authentication-mode md5
3.1.5 default cost
Syntax
default cost value
undo default cost
View
OSPF view
Parameter
value: Default routing cost of external route imported by OSPF, ranging from 0 to 16,777,214. By default, its value is 1.
Description
Use the default cost command to configure the default cost for OSPF to import external routes.
Use the undo default cost command to restore the default routing cost of external routes to its default value.
Since OSPF can import external routing information and propagate the information to the entire autonomous system, routing cost of external routes can influence route selection and calculation. Therefore, it is necessary to specify the default routing cost for the protocol to import external routes.
Example
# Specify the default routing cost for OSPF to import external routes as 10.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ospf 1
[H3C-ospf-1] default cost 10
3.1.6 default interval
Syntax
default interval seconds
undo default interval
View
OSPF view
Parameter
seconds: Default interval, in seconds, of importing external routes. It ranges from 1 to 2147483647 and defaults to 1.
Description
Use the default interval command to configure the default interval for OSPF to import external routes.
Use the undo default interval command to restore the default value of the default interval of importing external routes.
OSPF can import external routing information and propagate it to the entire autonomous system. However, importing routes too often greatly affects the performance of the device. Therefore, it is necessary to specify the default interval for the protocol to import external routes.
Example
# Specify the default interval for OSPF to import external routes as 10 seconds.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ospf 1
[H3C-ospf-1] default interval 10
3.1.7 default limit
Syntax
default limit routes
undo default limit
View
OSPF view
Parameter
routes: Default limit on the number of external routes imported in a unit time. It ranges from 200 to 2147483647 and defaults to1000.
Description
Use the default limit command to configure the default limit on the number of routes imported by OSPF in a unit time.
Use the undo default limit command to restore the default value.
OSPF can import external routing information and advertise them to the whole AS. Importing too many external routes at a time greatly affects the performance of the device. Therefore, it is necessary to limit the number of external routes imported during each import interval.
Related command: default interval.
Example
# Specify the default limit on the number of external routes imported by OSPF in each import interval as 200.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ospf 1
[H3C-ospf-1] default limit 200
3.1.8 default tag
Syntax
default tag tag
undo default tag
View
OSPF view
Parameter
tag: Default tag, ranging from 0 to 4294967295.
Description
Use the default tag command to configure the default tag of OSPF when it imports an external route.
Use the undo default tag command to restore the default tag of OSPF when it imports the external route.
When OSPF imports a route found by another routing protocol in the router and uses it as the external routing information of its own autonomous system, some additional parameters are required, including the default cost and the default tag of the route.
Related command: default type.
Example
# Set the default tag of OSPF imported external route of the autonomous system as 10.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ospf 1
[H3C-ospf-1] default tag 10
3.1.9 default type
Syntax
default type { 1 | 2 }
undo default type
View
OSPF view
Parameter
type 1: External routes of type 1.
type 2: External routes of type 2.
Description
Use the default type command to configure the default type when OSPF imports external routes.
Use the undo default type command to restore the default type when OSPF imports external routes.
By default, the external routes of type 2 are imported.
OSPF specifies the two types of external routing information. You can use the command described in this section to specify the default type when external routes are imported.
Related command: default tag.
Example
# Configure OSPF to import external routes of type 1 by default.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ospf 1
[H3C-ospf-1] default type 1
3.1.10 default-cost
Syntax
default-cost value
undo default-cost
View
OSPF Area view
Parameter
value: Cost value of the default route transmitted by OSPF to the STUB or NSSA area. It ranges from 0 to 16,777,214 and defaults to 1.
Description
Use the default-cost command to configure the cost of the default route transmitted by OSPF to the STUB or NSSA area.
Use the undo default-cost command to restore the default cost of the default route transmitted by OSPF to the STUB or NSSA area.
This command only applies to an ABR in a STUB area or NSSA area.
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 transmitted by an ABR to the STUB area or NSSA area.
Related command: stub, nssa.
Example
# Set area 1 as the STUB area and the cost of the default route transmitted to this STUB area to 60.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ospf 1
[H3C-ospf-1] area 1
[H3C-ospf-1-area-0.0.0.1] network 20.0.0.0 0.255.255.255
[H3C-ospf-1-area-0.0.0.1] stub
[H3C-ospf-1-area-0.0.0.1] default-cost 60
3.1.11 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
Parameter
always: Generates an ase lsa describing the default route and advertises it if the local router is not configured with the default route. If this keyword is not provided, the local router must be configured with the default route before it can import the ase lsa, which generates the default route.
cost value: Specifies the cost value of this ase lsa. The value of value ranges from 0 to 16777214 and defaults to 1.
type type-value: Specifies the cost type of this ase lsa. The value of type-value ranges from 1 to 2 and defaults 2.
route-policy route-policy-name: If the default route matches the route-policy specified by route-policy-name, the route-policy will affect the value in ase lsa. The route-policy-name argument is a string containing 1 to 19 characters.
Description
Use the default-route-advertise command to import the default route to OSPF route area.
Use the undo default-route-advertise command to cancel the import of the default route.
By default, OSPF does not import the default route.
The import-route command cannot import the default route. To import the default route to the route area, the default-route-advertise command must be used. If the local router is not configured with the default route, the keyword always should be specified so that ase lsa of the default route is generated.
Related command: import-route.
Example
# The ase lsa of the default route is generated only if the local router has the default route.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ospf 1
[H3C-ospf-1] default-route-advertise
# The ase lsa of default route will be generated and advertised to OSPF route area even the local router has no default route.
[H3C-ospf-1] default-route-advertise always
3.1.12 display ospf abr-asbr
Syntax
display ospf [ process-id ] abr-asbr
View
Any view
Parameter
process-id: OSPF Process ID. 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.
Example
# Display the information about the OSPF ABRs and ASBRs.
<H3C> 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 3-1 Description on the fields of the display ospf abr-asbr command
Field |
Description |
Destination |
Router ID of the ABR or ASBR |
Area |
Area where the router is connected to the ABR or ASBR |
Cost |
Routing cost value of the route |
Nexthop |
Nexthop address to the destination |
Interface |
Local output interface |
3.1.13 display ospf asbr-summary
Syntax
display ospf [ process-id ] asbr-summary [ ip-address mask ]
View
Any view
Parameter
process-id: OSPF Process ID. 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: IP address mask, in dotted decimal notation.
Description
Use the display ospf asbr-summary command to display the summary information of OSPF imported route.
If you do not specify an IP address or mask, the summary information of all OSPF imported routes will be displayed.
Related command: asbr-summary .
Example
# Display the summary information of all OSPF imported routes.
<H3C> 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 3-2 Description on the fields of the display ospf asbr-summary command.
Field |
Description |
|
net |
Destination network segment |
|
mask |
Mask |
|
tag |
Tag |
|
status |
Status information, which takes one of the following two values: |
|
DoNotAdvertise |
The summary routing information to the network segment will not be advertised. |
|
Advertise |
The summary routing information to the network segment will be advertised. |
3.1.14 display ospf brief
Syntax
display ospf [ process-id ] brief
View
Any view
Parameter
process-id: OSPF Process ID. 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.
Example
# Display brief OSPF information.
<H3C> display ospf brief
OSPF Process 1 with Router ID 10.110.95.189
OSPF Protocol Information
RouterID: 10.110.95.189 Border Router: 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: 16
Area Count: 1 Nssa Area Count: 0
Area 0.0.0.0:
Authtype: none Flags: <>
SPF scheduled: <>
Interface: 201.1.1.4 (Vlan-interface1)
Cost: 1 State: DR Type: Broadcast
Priority: 1
Designated Router: 201.1.1.4
Backup Designated Router: 201.1.1.3
Timers: Hello 10, Dead 40, Poll 40, Retransmit 5, Transmit Delay 1
Table 3-3 Description on the fields of the display ospf brief command
Field |
Description |
|
RouterID |
Router ID of the router |
|
Border Router |
Border routers for connection to the area, including ASBRs and ABRs |
|
spf-schedule-interval |
Interval of SPF schedule |
|
Authtype |
Authentication type of OSPF |
|
Routing preference |
Routing preference of OSPF. The internal route of OSPF includes intra/inter area route, and its default routing preference is 10, while that of the external route of OSPF is 150 by default |
|
Default ASE parameters |
Default ASE parameters used by OSPF to import external routes, including metric, type and tag |
|
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 |
|
SPF scheduled |
SPF scheduled (flag) |
|
Interface |
Name of interface belonging to this area |
|
Cost |
Cost of routes |
|
State |
State information |
|
Type |
Network type of OSPF interface |
|
Priority |
Priority |
|
Designated Router |
IP address of designated router (DR) |
|
Backup Designated Router |
IP address of backup designated router (BDR) |
|
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 |
3.1.15 display ospf cumulative
Syntax
display ospf [ process-id ] cumulative
View
Any view
Parameter
process-id: OSPF Process ID. 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.
Example
# Display cumulative OSPF statistics.
<H3C> display ospf cumulative
OSPF Process 1 with Router ID 1.1.1.1
Cumulations
IO Statistics
Type Input Output
Hello 225 437
DB Description 78 86
Link-State Req 18 18
Link-State Update 48 53
Link-State Ack 25 21
ASE: 1 Checksum Sum: FCAF
LSAs originated by this router
Router: 50 SumNet: 40 SumASB: 2
LSAs Originated: 92 LSAs Received: 33
Area 0.0.0.0:
Neighbors: 1 Interfaces: 1
Spf: 54 Checksum Sum F020
rtr: 2 net: 0 sumasb: 0 sumnet: 1
Area 0.0.0.1:
Neighbors: 0 Interfaces: 1
Spf: 19 Checksum Sum 14EAD
rtr: 1 net: 0 sumasb: 1 sumnet: 1
Routing Table:
Intra Area: 2 Inter Area: 0 ASE: 1
Table 3-4 Description on the fields of the display ospf cumulative command
Field |
Description |
|
IO Statistics |
Type |
Type of input/output OSPF 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 |
3.1.16 display ospf error
Syntax
display ospf [ process-id ] error
View
Any view
Parameter
process-id: OSPF Process ID. 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.
Example
# Display the OSPF error information.
<H3C> display ospf error
OSPF Process 1 with Router ID 1.1.1.1
OSPF packet error statistics:
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 1: LS ACK: duplicate ack
0: LS ACK: unknown LSA type 0: LS REQ: neighbor state low
0: LS REQ: empty request 0: LS REQ: wrong request
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 3-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: unknown LSA type |
DD packet: unknown LSA type |
DD: router id confusion |
DD packet: router id unidentifiable |
DD: extern option mismatch |
DD packet: external route flag error |
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 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 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 |
LS UPD: LSA length wrong |
Link state update packet: LSA length error |
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 |
3.1.17 display ospf interface
Syntax
display ospf [ process-id ] interface [ interface-type interface-number ]
View
Any view
Parameter
process-id: OSPF Process ID. 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.
Example
# Display the OSPF interface information of Vlan-interface1.
<H3C> 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 3-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 |
|
Type |
Network type of OSPF |
|
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 |
3.1.18 display ospf lsdb
Syntax
display ospf [ process-id [ area-id ] ] lsdb [ brief | [ [ asbr | ase | network | nssa | router | summary ] [ ip-address ] ] [ originate-router ip-address | self-originate ] ]
View
Any view
Parameter
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) advertised by ASBR routers.
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.
Example
# Display the database information about OSPF connection state.
<H3C> display ospf lsdb
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 3-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 |
<H3C> display ospf lsdb ase
OSPF Process 1 with Router ID 1.1.1.1
Link State Data Base
type: ASE
ls id : 2.2.0.0
adv rtr: 1.1.1.1
ls age: 349
len: 36
seq#: 80000001
chksum: 0xfcaf
Options: (DC)
Net mask:255.255.0.0
Tos 0 metric: 1
E type : 2
Forwarding Address: 0.0.0.0
Tag: 1
Table 3-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 |
Net mask |
Network mask |
E type |
Type of external route |
Forwarding Address |
Forwarding address |
Tag |
Tag |
3.1.19 display ospf nexthop
Syntax
display ospf [ process-id ] nexthop
View
Any view
Parameter
process-id: OSPF Process ID. 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.
Example
# Display the OSPF next-hop information.
<H3C> 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 3-9 Description on the fields of the display ospf nexthop command
Field |
Description |
Address |
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 |
Interface to the next hop |
nexthop |
Detailed information of the next hop |
3.1.20 display ospf peer
Syntax
display ospf [ process-id ] peer [ brief | statistics ]
View
Any view
Parameter
process-id: OSPF Process ID. If you do not specify a process ID, this command applies to all current OSPF processes.
Description
Use the display ospf peer command to display the information about OSPF peer.
Use the display ospf peer brief command to display the brief information, including router ID, interface, and state, about every OSPF peer.
Use the display ospf peer statistics command to display the statistics of every OSPF peer, namely, the number of peers in various states in every area.
Example
# Display the information about OSPF peer.
<H3C> display ospf peer
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 3-10 Description on the fields of the display ospf peer command
Field |
Description |
RouterID |
Router ID of neighbor router |
Address |
Address of the interface, through which neighbor router communicates with the router |
State |
State of adjacency relation |
Mode |
Master/Slave mode formed by negotiation in exchanging DD packet |
Priority |
Priority of DR/BDR for neighbor election |
DR |
IP address of the interface of elected DR |
BDR |
IP address of the interface of elected BDR |
Dead timer expires in 31s |
If no hello packet is received from the peer within this interval, the peer will be considered to be invalid. |
Neighbor has been up for 01:14:14 |
Time of neighbor connection |
# Display the brief information about every peer.
<H3C> 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 3-11 Description on the fields of the display ospf peer brief command
Field |
Description |
Router ID |
Router ID of neighbor router |
Address |
Address of the interface adjacent to the neighbor router |
Pri |
Priority of 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 |
Neighbor router states: If the neighbor router is a designated router, its state is displayed as "state/DR"; If the neighbor router is a backup designated router, its state is displayed as "state/BDR". |
# Display OSPF peer statistics.
<H3C> 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 3-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 |
3.1.21 display ospf request-queue
Syntax
display ospf [ process-id ] request-queue
View
Any view
Parameter
process-id: OSPF Process ID. 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.
Example
# Display the information about the OSPF request-queue.
<H3C> 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 3-13 Description on the fields of the display ospf request-queue command
Field |
Description |
RouterID |
Router ID of neighbor router |
Address |
Address of the interface, through which neighbor routers communicate with the router |
Interface |
Address of the interface on the network segment |
Area |
Area number of OSPF |
LSID:1.1.1.3 |
Link State ID of 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 |
3.1.22 display ospf retrans-queue
Syntax
display ospf [ process-id ] retrans-queue
View
Any view
Parameter
process-id: OSPF Process ID. 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.
Example
# Display the information about the OSPF retransmission queue.
<H3C> 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 3-14 Description on the fields of the display ospf retrans-queue command
Field |
Description |
RouterID |
Router ID of neighbor router |
Address |
Address of the interface, through which neighbor routers communicate with the router |
Interface |
Address of the interface on the network segment |
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 |
3.1.23 display ospf routing
Syntax
display ospf [ process-id ] routing
View
Any view
Parameter
process-id: OSPF Process ID. 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.
Example
# Display OSPF routing information.
<H3C> 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 3-15 Description on the fields of the display ospf routing command
Field |
Description |
Destination |
Destination network segment |
Cost |
Cost of route |
Type |
Type of route |
NextHop |
Next hop of route |
AdvRouter |
ID of the router that advertises the route |
Area |
Area ID |
Intra Area |
Number of intra-area routes |
Inter Area |
Number of inter-area routes |
ASE |
Number of external routes |
NSSA |
Number of NSSA routes |
3.1.24 display ospf vlink
Syntax
display ospf [ process-id ] vlink
View
Any view
Parameter
process-id: OSPF Process ID. 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.
Example
# Display OSPF virtual link information.
<H3C> display ospf vlink
OSPF Process 1 with Router ID 1.1.1.1
Virtual Links
Virtual-link Neighbor-id -> 2.2.2.2, State: Full
Cost: 0 State: Full Type: Virtual
Transit Area: 0.0.0.2
Timers: Hello 10, Dead 40, Poll 0, Retransmit 5, Transmit Delay 1
Table 3-16 Description on the fields of the display ospf vlink command
Field |
Description |
|
Virtual-link Neighbor-id |
Router ID of virtual-link neighbor router |
|
State |
State |
|
Cost |
Route cost of the interface |
|
Type |
Type: virtual link |
|
Transit Area |
ID of transit area that the virtual link passes, and it cannot be backbone area, STUB area, or NSSA area |
|
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 |
3.1.25 filter-policy export
Syntax
filter-policy { acl-number | ip-prefix ip-prefix-name } export [ routing-protocol ]
undo filter-policy { acl-number | ip-prefix ip-prefix-name} export [ routing-protocol ]
View
OSPF view
Parameter
acl-number: Basic or advanced ACL number.
ip-prefix-name: Name of the address prefix list.
routing-protocol: Routing protocol advertising the routing information. At present, it can be direct, rip, or static.
Description
Use the filter-policy export command to configure the rule for filtering the advertised routing information by OSPF.
Use the undo filter-policy export command to cancel the filtering rule configured.
By default, no filtering of the advertised routing information is performed.
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 affects the external routes imported (with the import-route command) by OSPF. If the routing-protocol argument is specified, this command filters only the imported routes generated by the specified protocol, not affecting the routes generated by any other protocol. If the routing-protocol argument is not specified, the imported routes generated by any protocol will be filtered.
Related command: acl, ip ip-prefix.
Example
# Configure OSPF to advertise only the routing information permitted by acl 2000.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] acl number 2000
[H3C-acl-basic-2000] rule permit source 11.0.0.0 0.255.255.255
[H3C-acl-basic-2000] rule deny source any
[H3C-ospf-1] filter-policy 2000 export
3.1.26 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
Parameter
acl-number: Basic or advanced Access control list used for filtering the destination addresses of the routing information.
ip-prefix-name: Name of the address prefix list used for filtering the destination addresses of the routing information.
gateway ip-prefix-name: Specifies the name of the address prefix list used for filtering the addresses of the neighbor routers advertising the routing information.
Description
Use the filter-policy import command to configure the OSPF rules for filtering the routing information received.
Use the undo filter-policy import command to cancel the filtering of the routing information received.
By default, no filtering of the received routing information is performed.
In some cases, it may be required that only the routing information meeting some conditions can be received. You can use the filter-policy command to set the filtering conditions for the routing information to be received. Only the routing information passing the filter can be received.
The filter-policy import command filters the routes calculated by OSPF. Only the routes passing the filter can be added to the routing table. The routes can be filtered based on next hop and destination address.
OSPF is a dynamic routing protocol based on link state, with routing information hidden in LSAs. Therefore, OSPF cannot filter any advertised or received LSA. This command is used much less in OSPF than in distance-vector routing protocols.
Example
# Filter the received routing information according to the rule defined by ACL 2000.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] acl number 2000
[H3C-acl-basic-2000] rule permit source 20.0.0.0 0.255.255.255
[H3C-acl-basic-2000] rule deny source any
[H3C-ospf-1] filter-policy 2000 import
3.1.27 import-route
Syntax
import-route protocol [ cost value | type value | tag value | route-policy route-policy-name ]*
undo import-route protocol
View
OSPF view
Parameter
protocol: Source routing protocol whose routes will be imported. At present, it can be direct, mip, rip, static, ospf, ospf-ase, and ospf-nssa.
route-policy route-policy-name: Imports only the routes matching the specified route-policy.
cost value: Specifies the cost of imported external routes.
type value: Specifies the cost type of imported external routes. The value ranges from 1 to 2.
tag value: Specifies the tag of imported external routes.
Use the import-route command to import external routes.
Use the undo import-route command to cancel the importing of external routes.
& Note:
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, the routing information of other protocols is not imported.
Example
# Configure to import RIP routes as type-2 routes, with the route tag of 33 and the route cost of 50.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ospf 1
[H3C-ospf-1] import-route rip type 2 tag 33 cost 50
3.1.28 log-peer-change
Syntax
log-peer-change
undo log-peer-change
View
OSPF view
Parameter
None
Description
Use the log-peer-change command to enable OSPF to log OSPF peer status changes.
Use the undo log-peer-change command to disable OSPF from logging OSPF peer status changes.
Example
# Enable OSPF to log peer status changes.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ospf 1
[H3C-ospf-1] log-peer-change
3.1.29 multi-path-number
Syntax
multi-path-number value
undo multi-path-number
View
OSPF view
Parameter
value: Number of equivalent routes, ranging from 1 to 3. The default value is 3
Description
Use the multi-path-number command to set the number of OSPF equivalent routes.
Use the undo multi-path-number command to restore the default value.
Example
# Set the number of OSPF equivalent routes to 2.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ospf 1
[H3C-ospf-1] multi-path-number 2
3.1.30 network
Syntax
network ip-address ip-mask
undo network ip-address ip-mask
View
OSPF Area view
Parameter
ip-address: Address of the network segment where the interface resides.
ip-mask: IP address wildcard mask.
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 command: ospf.
Example
# Specify the interfaces whose master IP addresses are in the segment range of 10.110.36.0 to run OSPF and specify the number of the OSPF area (where these interfaces reside) as 6.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ospf 1
[H3C-ospf-1] area 6
[H3C-ospf-1-area-0.0.0.6] network 10.110.36.0 0.0.0.255
3.1.31 nssa
Syntax
nssa [ default-route-advertise | no-import-route | no-summary ]*
undo nssa
View
OSPF Area view
Parameter
default-route-advertise: Imports the default route to the NSSA area.
no-import-route: Specifies not to import route to the NSSA area.
no-summary: An ABR is disabled from transmitting summary_net LSAs to the 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 the NSSA attribute.
The default-route-advertise argument is used to generate the default type-7 LSA. No matter whether the route 0.0.0.0 exists in the routing table on the ABR, the type-7 LSA default route will always be generated. The type-7 LSA default route is generated only when the route 0.0.0.0 exists in the routing table on the ASBR.
On the ASBR, if the no-import-route argument is provided, the external route imported by OSPF with the import-route command will not be advertised to NSSA area.
Example
# Configure area 1 as NSSA area.
System View: return to User View with Ctrl+Z.
[H3C] ospf 1
[H3C-ospf-1] area 1
[H3C-ospf-1-area-0.0.0.1] network 36.0.0.0 0.255.255.255
[H3C-ospf-1-area-0.0.0.1] nssa
3.1.32 ospf
Syntax
ospf [ process-id [ router-id router-id ] ]
undo ospf [ process-id ]
View
System view
Parameter
process-id: OSPF Process ID, ranging from 1 to 65535. By default, the process ID is 1. process-id is locally significant.
router-id: Router ID used by an OSPF process, in dotted decimal notation.
Description
Use the ospf command to enable OSPF
Use the undo ospf command to disable OSPF
After OSPF is enabled, you can perform the related configuration in OSPF view.
By default, the system does not run OSPF.
Related command: network.
Example
# Enable OSPF.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] router id 10.110.1.8
[H3C] ospf
[H3C-ospf-1]
# Enable the running of the OSPF protocol with process ID specified as 120.
[H3C] router id 10.110.1.8
[H3C] ospf 120
[H3C-ospf-120]
3.1.33 ospf authentication-mode
Syntax
ospf authentication-mode { simple password | md5 key-id key }
undo ospf authentication-mode { simple | md5 }
View
Interface view
Parameter
simple password: Uses plain text authentication. 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 command: authentication-mode.
Example
# 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.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ospf 1
[H3C-ospf-1] area 1
[H3C-ospf-1-area-0.0.0.1] network 131.119.0.0 0.0.255.255
[H3C-ospf-1-area-0.0.0.1] authentication-mode md5
[H3C-ospf-1-area-0.0.0.1] quit
[H3C-ospf-1] quit
[H3C] interface Vlan-interface 10
[H3C-Vlan-interface10] ospf authentication-mode md5 15 abc
3.1.34 ospf cost
Syntax
ospf cost value
undo ospf cost
View
Interface view
Parameter
value: Cost for running OSPF protocol, ranging from 1 to 65,535.
Description
Use the ospf cost command to configure different packets sending costs so as to send packets from different interfaces.
Use the undo ospf cost command to restore the default costs.
For the switch, the default cost for running OSPF protocol on a VLAN interface is 10.
Example
# Specify the cost spent when an interface runs OSPF as 33.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface Vlan-interface 10
[H3C-Vlan-interface10] ospf cost 33
3.1.35 ospf dr-priority
Syntax
ospf dr-priority priority
undo ospf dr-priority
View
Interface view
Parameter
priority: Interface priority for electing the "designated router", ranging from 0 to 255. The default value is 1.
Description
Use the ospf dr-priority command to configure the priority for electing the "designated router" on an interface.
Use the undo ospf dr-priority command to restore the default value.
The priority of the interface determines the qualification of the interface when the "designated router" is elected. The interface with higher priority will be preferred when the election conflict occurs.
Example
# Set the priority of the interface Vlan-interface 10 to 8 during DR election.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface Vlan-interface 10
[H3C-Vlan-interface10] ospf dr-priority 8
3.1.36 ospf mib-binding
Syntax
ospf mib-binding process-id
undo ospf mib-binding
View
System view
Parameter
process-id: OSPF Process ID. It ranges from 1 to 65535 and defaults to 1.
Description
Use the ospf mib-binding command to bind MIB operation to the specified OSPF process.
Use the undo ospf mib-binding command to restore the default settings.
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.
By default, MIB operation is bound to the OSPF process enabled first.
Example
# Bind MIB operation to OSPF process 100.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ospf mib-binding 100
# Bind MIB operation to OSPF process 200.
[H3C] ospf mib-binding 200
# Cancel the binding of MIB operation.
[H3C] undo ospf mib-binding
3.1.37 ospf mtu-enable
Syntax
ospf mtu-enable
undo ospf mtu-enable
View
Interface view
Parameter
None.
Description
Use the ospf mtu-enable command to enable the interface to write MTU value when sending DD packets.
Use the undo ospf mtu-enable command to restore the default settings.
By default, the MTU value is 0 when sending DD packets. That is, the actual MTU value of the interface is not written.
Database Description (DD) packets are used to describe its own LSDB when the router running OSPF protocol is synchronizing the database.
The default MTU value of DD packet is 0. You can use this command to configure the specified interface manually to write the MTU value field in DD packets when sending DD packets. That is, the actual MTU value of the interface is written in.
Example
# Configure interface Vlan-interface 3 to write MTU value area when sending DD packets.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface Vlan-interface 3
[H3C-Vlan-interface3] ospf mtu-enable
3.1.38 ospf network-type
Syntax
ospf network-type { broadcast | nbma | p2mp | p2p }
undo ospf network-type
View
Interface view
Parameter
broadcast: Changes the interface network type to broadcast.
nbma: Changes the interface network type to NBMA.
p2mp: Changes the interface network type to point-to-multipoint.
p2p: Changes the interface network type to point-to-point.
Description
Use the ospf network-type command to configure the network type of OSPF interface.
Use the undo ospf network-type command to restore the default network type of the OSPF interface.
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 if the NBMA network is not fully-meshed.
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. Alternatively, the network type of the interface can be changed from NBMA to broadcast.
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.
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 command: ospf dr-priority.
Example
# Set the interface Vlan-interface 10 to NBMA type.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface Vlan-interface 10
[H3C-Vlan-interface10] ospf network-type nbma
3.1.39 ospf timer dead
Syntax
ospf timer dead seconds
undo ospf timer dead
View
Interface view
Parameter
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 peer.
Use the undo ospf timer dead command to restore the default value of the dead interval of the peer.
By default, the dead interval is 40 seconds for the OSPF peers of p2p and broadcast interfaces and is 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 routers on the same network segment must be identical.
Related command: ospf timer hello.
Example
# Set the peer dead interval on the interface Vlan-interface 10 to 80 seconds.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface Vlan-interface 10
[H3C-Vlan-interface10] ospf timer dead 80
3.1.40 ospf timer hello
Syntax
ospf timer hello seconds
undo ospf timer hello
View
Interface view
Parameter
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 value.
By default, the interval is 10 seconds for an interface of p2p or broadcast type to transmit Hello messages, and 30 seconds for an interface of p2mp or nbma type.
Related command: ospf timer dead.
Example
# Configure the interval of transmitting Hello messages on the interface Vlan-interface 10 to 20 seconds.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface Vlan-interface 10
[H3C-Vlan-interface10] ospf timer hello 20
3.1.41 ospf timer poll
Syntax
ospf timer poll seconds
undo ospf timer poll
View
Interface view
Parameter
seconds: Poll Hello interval in seconds. It ranges from 1 to 65535 and defaults to 40.
Description
Use the ospf timer poll command to configure the poll Hello packet interval on NBMA and p2mp network.
Use the undo ospf timer poll command to restore the default poll interval.
On an NBMA or p2mp network, if a neighbor becomes invalid, Hello packet will be transmitted at the interval of poll seconds. You can configure the poll seconds to specify how often the interface transmits Hello packet before it establishes adjacency with the adjacent router. Poll seconds should be no less than 3 times of Hello.
Example
# Configure to transmit poll Hello packet through interface Vlan-interface 20 every 130 seconds.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface Vlan-interface 20
[H3C-Vlan-interface20] ospf timer poll 130
3.1.42 ospf timer retransmit
Syntax
ospf timer retransmit interval
undo ospf timer retransmit
View
Interface view
Parameter
interval: Interval, in seconds, for retransmitting LSA on an interface. It ranges from 1 to 3600 and defaults to 5.
Description
Use the ospf timer retransmit command to configure the interval for LSA retransmission on an interface.
Use the undo ospf timer retransmit command to restore the default interval value for LSA retransmission on the interface.
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).
Example
# Specify the retransmit for LSA transmission between the interface Vlan-interface 10 and the adjacent routers to 12 seconds.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface Vlan-interface 10
[H3C-Vlan-interface10] ospf timer retransmit 12
3.1.43 ospf trans-delay
Syntax
ospf trans-delay seconds
undo ospf trans-delay
View
Interface view
Parameter
seconds: LSA transmission delay on an interface. It ranges from 1 to 3,600 and defaults to 1 (in seconds).
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 LSA transmission delay on an interface.
LSA ages in the "link state database" (LSDB) of the router as time goes by (1 added every second), but it does not age during network transmission. Therefore, it is necessary to add a period of time set by this command to the aging time of LSA before transmitting it.
Example
# Specify the trans-delay of transmitting LSA on the interface Vlan-interface 10 as 3 seconds.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] interface Vlan-interface 10
[H3C-Vlan-interface10] ospf trans-delay 3
3.1.44 peer
Syntax
peer ip-address [ dr-priority dr-priority ]
undo peer ip-address
View
OSPF view
Parameter
ip-address: IP address of the peer.
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 configure the IP address of the neighbor router and specify DR priority on an NBMA network.
Use the undo peer command to cancel this configuration.
Example
# Configure the IP address of the neighbor router as 10.1.1.1.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ospf 1
[H3C-ospf-1] peer 10.1.1.1
3.1.45 preference
Syntax
preference [ ase ] value
undo preference [ ase ]
View
OSPF view
Parameter
value: OSPF protocol route preference, ranging from 1 to 255.
ase: Indicates the preference of an imported external route of the AS.
Description
Use the preference command to configure the preference of an OSPF protocol route.
Use the undo preference command to restore the default value of the OSPF protocol route.
By default, the preference of an OSPF protocol internal route is 10 and the preference of an external 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.
Example
# Specify the preference of an imported external route of the AS as 160.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ospf 1
[H3C-ospf-1] preference ase 160
3.1.46 reset ospf
Syntax
reset ospf [ statistics ] { all | process-id }
View
User view
Parameter
all: Resets all OSPF processes.
process-id: OSPF Process ID, ranging from 1 to 65535. If this argument is not specified, all OSPF processes will be reset.
statistics: Resets OSPF statistics.
Description
Use the reset ospf all command to reset all OSPF processes.
Use the reset ospf process-id command to reset the specified OSPF process and clear the statistics.
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.
Example
# Reset all the OSPF processes.
<H3C> reset ospf all
# Reset OSPF process 200.
<H3C> reset ospf 200
3.1.47 router id
Syntax
router id router-id
undo router id
View
System view
Parameter
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.
Related command: ospf.
Example
# Set the router ID to 10.1.1.3.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] router id 10.1.1.3
3.1.48 silent-interface
Syntax
silent-interface silent-interface-type silent-interface-number
undo silent-interface silent-interface-type silent-interface-number
View
OSPF view
Parameter
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 setting.
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.
Example
# Disable interface Vlan-interface 20 from transmitting OSPF packet.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ospf 1
[H3C-ospf-1] silent-interface Vlan-interface 20
3.1.49 snmp-agent trap enable ospf
Syntax
undo snmp-agent trap enable ospf [ process-id ] [ ifstatechange | iftxretransmit | virifstatechange | nbrstatechange | virnbrstatechange | ifcfgerror | virifcfgerror | ifauthfail | virifauthfail | ifrxbadpkt | virifrxbadpkt | viriftxretransmit | originatelsa | maxagelsa | lsdboverflow | lsdbapproachoverflow ]*
View
System view
Parameter
process-id: OSPF Process ID. 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 section "System Management" in this manual.
Example
# Enable the TRAP function for OSPF process 100.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] snmp-agent trap enable ospf 100
3.1.50 spf-schedule-interval
Syntax
spf-schedule-interval interval
undo spf-schedule-interval
View
OSPF view
Parameter
interval: SPF calculation interval of OSPF, in seconds. It ranges from 1 to 10 and defaults to 5.
Description
Use the spf-schedule-interval command to configure the route calculation interval of OSPF.
Use the undo spf-schedule-interval command to restore the default setting.
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.
Example
# Set the OSPF route calculation interval of H3C to 6 seconds.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ospf 1
[H3C-ospf-1] spf-schedule-interval 6
3.1.51 stub
Syntax
stub [ no-summary ]
undo stub
View
OSPF Area view
Parameter
no-summary: Disables an ABR from transmitting Summary LSAs to the STUB area.
Description
Use the stub command to configure the type of an OSPF area as "stub".
Use the undo stub command to cancel the settings.
By default, no area is set to be the STUB area.
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.
Related command: default-cost.
Example
# Set the type of OSPF area 1 to STUB.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ospf 1
[H3C-ospf-1] area 1
[H3C-ospf-1-area-0.0.0.1] stub
3.1.52 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
Parameter
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.
Note that, when configuring virtual link authentication, you use the authentication-mode command to specify the authentication mode as MD5 cipher text or simple text on the backbone network.
Related command: authentication-mode, display ospf.
Example
# Create a virtual link to 10.110.0.3 and use the MD5 cipher authentication mode.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ospf 1
[H3C-ospf-1] area 10.0.0.0
[H3C-ospf-1-area-10.0.0.0] vlink-peer 10.110.0.3 md5 3 345
Chapter 4 IP Routing Policy Configuration Commands
& Note:
When running a routing protocol, the Ethernet switch also functions as a router. The word “router” and the router icons covered in the following text represent routers in common sense and Ethernet switches running a routing protocol.
4.1 IP Routing Policy Configuration Commands
4.1.1 apply cost
Syntax
apply cost value
undo apply cost
View
Route policy view
Parameter
value: Route cost value of route information. The value ranges from 0 to 4294967295.
Description
Use the apply cost command to configure the route cost value of route information.
Use the undo apply cost command to cancel the apply clause.
By default, no apply clause is defined.
An apply clause of Route-policy sets the cost of the routes passing the filtering.
Related command: if-match interface, if-match acl, if-match ip-prefix, if-match ip next-hop, if-match cost, if-match tag, route-policy, and apply tag.
Example
# Define an apply clause. When it is used for setting route information attribute, it sets the route cost value of route information as 120.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] route-policy policy permit node 1
%New sequence of this list
[H3C-route-policy] apply cost 120
4.1.2 apply tag
Syntax
apply tag value
undo apply tag
View
Route policy view
Parameter
value: Tag value of route information. The value ranges from 0 to 4294967295.
Description
Use the apply tag command to configure to set the tag area of route information.
Use the undo apply tag command to cancel the apply clause.
Related command: if-match interface, if-match acl, if-match ip-prefix, if-match ip next-hop, if-match cost, if-match tag, route-policy, and apply cost.
Example
# Define an apply clause. When it is used for setting route information attribute, it sets the tag area of route information as 100.
System View: return to User View with Ctrl+Z.
[H3C] route-policy policy permit node 1
%New sequence of this list
[H3C-route-policy] apply tag 100
4.1.3 display ip ip-prefix
Syntax
display ip ip-prefix [ ip-prefix-name ]
View
Any view
Parameter
ip-prefix-name: Name of the address prefix list to be displayed.
Description
Use the display ip ip-prefix command to display an address prefix list.
When ip-prefix-name is not specified, all the configured address prefix lists are displayed.
Related command: ip ip-prefix.
Example
# Display the information about the address prefix list named p1.
<H3C> display ip ip-prefix p1
name index conditions ip-prefix / mask GE LE
p1 10 permit 10.1.0.0/16 17 18
Table 4-1 Description on the fields of the display ip ip-prefix command
Field |
Description |
name |
Name of ip-prefix |
index |
Internal sequence number of ip-prefix |
conditions |
Mode: permit or deny |
ip-prefix / mask |
Address and network segment length of ip-prefix |
GE |
Greater-equal value of ip-prefix network segment length |
LE |
Less-equal value of ip-prefix network segment length |
4.1.4 display route-policy
Syntax
display route-policy [ route-policy-name ]
View
Parameter
route-policy-name: Name of the route-policy .to be displayed.
Description
Use the display route-policy command to display the configured Route-policy.
If you do not specify a route policy name, this command displays all route-policies configured.
Related command: route-policy.
Example
# Display the information about Route-policy named policy1.
<H3C> display route-policy policy1
Route-policy : policy1
Permit 10 : if-match (ip-prefix) p1
apply cost 100
matched : 0 denied : 0
Table 4-2 Description on the fields of the display route-policy command
Field |
Description |
|
Route-policy |
Name of the configured routing policy |
|
Permit 10 |
Information about the route-policy with the mode configured as permit and the node as 10: |
|
if-match (prefixlist) p1 |
if-match clause configured |
|
apply cost 100 |
Apply routing cost 100 to the routes matching the conditions defined by if-match clause |
|
matched |
Number of routes matching the conditions set by if-match clause |
|
denied |
Number of routes not matching the conditions set by if-match clause |
4.1.5 if-match
Syntax
if-match { acl acl-number | ip-prefix ip-prefix-name }
undo if-match { acl | ip-prefix }
View
Route policy view
Parameter
acl-number: Number of the ACL used for filter
ip-prefix-name: Name of the prefix address list used for filter
Description
Use the if-match { acl | ip-prefix } command to configure a rule for the route-policy and specify an matching IP address range.
Use the undo if-match { acl | ip-prefix } command to cancel the setting of the rule.
The if-match { acl | ip-prefix } command implements a filter by referencing an ACL or a prefix address list.
Related command: if-match interface, if-match ip next-hop, if-match cost, if-match tag, route-policy, apply cost, and apply tag.
Example
# Define an if-match clause. When the clause is used for filtering route information, the route information filtered by route destination address through address prefix list p1 is permitted to pass the if-match clause.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] route-policy policy permit node 1
%New sequence of this list
[H3C-route-policy] if-match ip-prefix p1
4.1.6 if-match cost
Syntax
if-match cost value
undo if-match cost
View
Route policy view
Parameter
value: Route cost value, ranging from 0 to 4,294,967,295.
Description
Use the if-match cost command to configure one of the match rules of the route-policy to match the cost of routing information.
Use the undo if-match cost command to cancel the configuration of the match rule.
By default, no if-match clause is defined.
An if-match clause of the route-policy specifies the route cost of the routing information meeting the condition.
Related command: if-match interface, if-match acl, if-match ip-prefix, if-match ip next-hop, if-match tag, route-policy, apply cost, and apply tag.
Example
# Define an if-match clause and allow the routing information with a routing cost of 8 to pass this if-match clause.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] route-policy policy permit node 1
%New sequence of this list
[H3C-route-policy] if-match cost 8
4.1.7 if-match interface
Syntax
if-match interface interface-type interface-number
undo if-match interface
View
Route policy view
Parameter
interface-type: Interface type.
interface-number: Interface number.
Description
Use the if-match interface command to configure to match the route whose next hop is the designated interface.
Use the undo if-match interface command to cancel the setting of matching condition.
By default, no if-match clause is defined.
As an if-match clause of route-policy, it matches the corresponding interface of route next hop when filtering route.
Related command: if-match acl, if-match ip-prefix, if-match ip next-hop, if-match cost, if-match tag, route-policy, apply cost, and apply tag.
Example
# Define an if-match clause to match the route whose next hop interface is Vlan-interface 1
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] route-policy policy permit node 1
%New sequence of this list
[H3C-route-policy] if-match interface Vlan-interface 1
4.1.8 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
Parameter
acl-number: Number of the ACL used for filter. It ranges from 2,000 to 2,999.
ip-prefix-name: Name of the prefix address list used for filter. It contains 1 to 19 characters.
Description
Use the if-match ip next-hop command to configure one of the match rules of route-policy on the next hop address of the routing information.
Use the undo if-match ip next-hop command to cancel the setting of ACL matching condition.
Use the undo if-match ip next-hop ip-prefix command to cancel the setting of address prefix list matching condition.
By default, no if-match clause is defined.
An if-match clause of route-policy is used to specify the next hop matching the routing information when filtering the routes. It performs filter by referencing an ACL or an address prefix list.
Related command: if-match interface, if-match acl, if-match ip-prefix, if-match cost, if-match tag, route-policy, apply cost, and apply tag.
Example
# Define an if-match clause. It permits the routing information whose route next hop address filtered through prefix address list p1 to pass this if-match clause.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] route-policy policy permit node 1
%New sequence of this list
[H3C-route-policy] if-match ip next-hop ip-prefix p1
4.1.9 if-match tag
Syntax
if-match tag value
undo if-match tag
View
Route policy view
Parameter
value: Tag field value.
Description
Use the if-match tag command to configure to match the tag field of route information.
Use the undo if-match tag command to cancel the existing matching rules.
Related command: if-match interface, if-match acl, if-match ip-prefix, if-match ip next-hop, if-match cost, route-policy, apply cost, and apply tag.
Example
# Define an if-match clause to permit the OSPF route information whose tag value is 8 to pass the if-match clause.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] route-policy policy permit node 1
%New sequence of this list
[H3C-route-policy] if-match tag 8
4.1.10 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
Parameter
ip-prefix-name: Name of address prefix list. It identifies an address prefix list uniquely.
index-number: Identifier of an item in the prefix address list. The item with a smaller index-number will be tested first.
permit: Specifies the match mode of the defined address prefix list items 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 item, the item is filtered through and the next item is not tested. If the IP address to be filtered is not in the ip-prefix range specified by the item, the next item is tested
deny: Specifies the match mode of the defined address prefix list items 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 item, the item is not filtered through and the next item is not tested; otherwise, the next item is tested.
network: IP address prefix range (IP address).
len: IP address prefix range (mask length).
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].
Description
Use the ip ip-prefix command to configure an address prefix list or one of its items. Use the undo ip ip-prefix command to delete an address prefix list or one of its items.
An address prefix list is used for IP address filtering. An address prefix list may contain several items, and each item specifies one address prefix range. The inter-item filtering relation is "OR". That is, passing an item means filtering through this address prefix list. Not filtering through any item means not filtering through this prefix address list.
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.
Example
# 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.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] ip ip-prefix p1 permit 10.0.192.0 8 greater-equal 17 less-equal 18
4.1.11 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
Parameter
route-policy-name: Name of the Route-policy that identifies a Route-policy uniquely.
permit: Specifies the match mode of the defined Route-policy node as permit mode. 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 the node of the route policy.
node-number: Index of the node in the route-policy. When this route-policy is used for routing information filter, the node with smaller node-number will be matched first.
Description
Use the route-policy command to 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 command: if-match interface, if-match acl, if-match ip-prefix, if-match ip next-hop, if-match cost, if-match tag, apply cost, and apply tag.
Example
# Configure Route-policy policy1, with the node number of 10 and the match mode of permit, and enter Route policy view.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] route-policy policy1 permit node 10
%New sequence of this list
[H3C-route-policy]
Chapter 5 Route Capacity Configuration Commands
& Note:
When running a routing protocol, the Ethernet switch also functions as a router. The word “router” and the router icons covered in the following text represent routers in common sense and Ethernet switches running a routing protocol.
Among S3600 series, only S3600-EI series Ethernet switches support route capacity configuration.
5.1 Route Capacity Configuration Commands
5.1.1 display memory
Syntax
display memory [ unit unit-id ]
Mode
Any view
Parameter
unit-id: Unit ID.
Description
Use the display memory command to display the memory setting.
Example
# Display the current memory setting of the switch.
<H3C> display memory
Unit 1
System Available Memory(bytes): 33631488
System Used Memory(bytes): 16122304
Used Rate: 47%
The following table shows describes the fields of the command:
Table 5-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 |
5.1.2 display memory limit
Syntax
display memory limit
Mode
Any view
Parameter
None
Description
Use the display memory limit command to display the memory setting and state information related to route capacity.
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.
Example
# Display the current memory setting and state information.
<H3C> 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
The information displayed by this command includes Ethernet switch memory limit, size of free memory, times of disconnection, times of reconnection, and the current state.
The following table describes the fields of the command:
Table 5-2 Description on the fields of the display memory limit command
Description |
|
memory safety |
|
memory limit |
Lower limit of the switch memory. |
memory auto-establish enabled |
Automatic connection restoration is enabled (If automatic connection restoration is disabled, "auto-establish disabled" is displayed). |
Free Memory |
Size of the current free memory in bytes |
The times of disconnect: 0 |
The times of the disconnection of the routing protocol is 0. |
The times of reconnect: 0 |
The times of reconnection of the routing protocol is 0. |
The current state: Normal |
The current state is normal (If the current state is emergent, "Exigence" is displayed). |
5.1.3 memory
Syntax
memory { safety safety-value | limit limit-value }*
undo memory [ safety | limit ]
View
System view
Parameter
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 command: memory auto-establish disable, memory auto-establish enable, and display memory limit.
& Note:
When you configure the memory limit command, the safety-value argument in the command must be greater than the limit-value argument; otherwise, the configuration will fail.
Example
# Set the lower limit of the switch free memory to 1 MB and the safety value to 3 MB.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] memory safety 3 limit 1
5.1.4 memory auto-establish disable
Syntax
memory auto-establish disable
View
System view
Parameter
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 command: memory auto-establish enable, memory { safety | limit }, display memory limit.
Example
# Disable automatic restoration of the routing protocol connections when the free memory of the current switch recovers.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] memory auto-establish disable
5.1.5 memory auto-establish enable
Syntax
memory auto-establish enable
View
System view
Parameter
None
Description
Use the memory auto-establish enable command to enable automatic restoration of routing protocol connections 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 command: memory auto-establish disable, memory { safety | limit }, display memory limit.
Example
# Enable automatic restoration of the connections of all the routing protocols when the free memory of the current switch recovers.
<H3C> system-view
System View: return to User View with Ctrl+Z.
[H3C] memory auto-establish enable