- Table of Contents
-
- H3C S3610[S5510] Series Ethernet Switches Command Manual-Release 5303(V1.01)
- 00-1Cover
- 01-Login Commands
- 02-VLAN Commands
- 03-IP Addressing and Performance Commands
- 04-QinQ-BPDU Tunneling Commands
- 05-Port Correlation Configuration Commands
- 06-Link Aggregation Commands
- 07-MAC Address Table Management Commands
- 08-IP Source Guard Commands
- 09-MSTP Commands
- 10-IPv6 Commands
- 11-Routing Overview Commands
- 12-IPv4 Routing Commands
- 13-BFD-GR Commands
- 14-IPv6 Routing Commands
- 15-Multicast Protocol Commands
- 16-802.1x-HABP-MAC Authentication Commands
- 17-AAA-RADIUS-HWTACACS Commands
- 18-ARP Commands
- 19-DHCP Commands
- 20-ACL Commands
- 21-QoS Commands
- 22-Port Mirroring Commands
- 23-Cluster Management Commands
- 24-UDP Helper Commands
- 25-SNMP-RMON Commands
- 26-NTP Commands
- 27-DNS Commands
- 28-File System Management Commands
- 29-Information Center Commands
- 30-System Maintaining and Debugging Commands
- 31-NQA Commands
- 32-VRRP Commands
- 33-SSH Commands
- 34-MCE Commands
- 35-OAM Commands
- 36-DLDP Commands
- 37-RRPP Commands
- 38-SSL-HTTPS Commands
- 39-PKI Commands
- 40-Appendix
- Related Documents
-
Title | Size | Download |
---|---|---|
12-IPv4 Routing Commands | 888.23 KB |
Table of Contents
Chapter 1 Static Routing Configuration Commands
1.1 Static Routing Configuration Commands
1.1.1 delete static-routes all
1.1.3 ip route-static default-preference
Chapter 2 RIP Configuration Commands
2.1 RIP Configuration Commands
2.1.18 rip authentication-mode
2.1.31 validate-source-address
Chapter 3 OSPF Configuration Commands
3.1 OSPF Configuration Commands
3.1.11 display ospf asbr-summary
3.1.13 display ospf cumulative
3.1.19 display ospf peer statistics
3.1.20 display ospf request-queue
3.1.21 display ospf retrans-queue
3.1.24 enable link-local-signaling
3.1.26 enable out-of-band-resynchronization
3.1.32 graceful-restart interval
3.1.37 lsa-generation-interval
3.1.43 opaque-capability enable
3.1.45 ospf authentication-mode
3.1.60 reset ospf redistribution
3.1.63 snmp-agent trap enable ospf
Chapter 4 IS-IS Configuration Commands
4.1 IS-IS Configuration Commands
4.1.1 area-authentication-mode
4.1.8 display isis graceful-restart status
4.1.12 display isis mesh-group
4.1.13 display isis name-table
4.1.17 display isis statistics
4.1.18 domain-authentication-mode
4.1.23 graceful-restart interval
4.1.24 graceful-restart suppress-sa
4.1.26 import-route isis level-2 into level-1
4.1.28 isis authentication-mode
4.1.40 isis timer holding-multiplier
Chapter 5 BGP Configuration Commands
5.1 BGP Configuration Commands
5.1.3 bestroute as-path-neglect
5.1.5 bestroute med-confederation
5.1.7 compare-different-as-med
5.1.9 confederation nonstandard
5.1.13 default local-preference
5.1.20 display bgp routing-table
5.1.21 display bgp routing-table as-path-acl
5.1.22 display bgp routing-table cidr
5.1.23 display bgp routing-table community
5.1.24 display bgp routing-table community-list
5.1.25 display bgp routing-table dampened
5.1.26 display bgp routing-table dampening parameter
5.1.27 display bgp routing-table different-origin-as
5.1.28 display bgp routing-table flap-info
5.1.29 display bgp routing-table peer
5.1.30 display bgp routing-table regular-expression
5.1.31 display bgp routing-table statistic
5.1.32 ebgp-interface-sensitive
5.1.36 graceful-restart timer restart
5.1.37 graceful-restart timer wait-for-rib
5.1.42 peer advertise-community
5.1.43 peer advertise-ext-community
5.1.47 peer capability-advertise conventional
5.1.48 peer capability-advertise route-refresh
5.1.50 peer default-route-advertise
5.1.68 peer route-update-interval
5.1.72 reflect between-clients
Chapter 6 Routing Policy Configuration Commands
6.1 Routing Policy Common Configuration Commands
6.1.14 display ip community-list
6.1.15 display ip extcommunity-list
6.2 IPv4 Routing Policy Configuration Commands
6.2.1 apply ip-address next-hop
Chapter 1 Static Routing Configuration Commands
& Note:
The term “router” in this document refers to a router in a generic sense or an Ethernet switch running routing protocols.
1.1 Static Routing Configuration Commands
1.1.1 delete static-routes all
Syntax
delete [ vpn-instance vpn-instance-name ] static-routes all
View
System view
Parameters
vpn-instance-name: Name of a VPN instance, a string of 1 to 31 characters. The support for this argument varies with devices.
Description
Use the delete static-routes all command to delete all static routes.
When you use this command to delete static routes, the system will prompt you to confirm the operation before deleting all the static routes.
Related commands: display ip routing-table, ip route-static.
Examples
# Delete all static routes on the router.
<Sysname> system-view
[Sysname] delete static-routes all
This will erase all ipv4 static routes and their configurations, you must reconf
igure all static routes
Are you sure?[Y/N]:Y
1.1.2 ip route-static
Syntax
ip route-static dest-address { mask | mask-length } { gateway-address [ bfd { control-packet | echo-packet } ] | interface-type interface-number [ gateway-address [ bfd { control-packet | echo-packet } ] ] | vpn-instance d-vpn-instance-name gateway-address [ bfd { control-packet | echo-packet } ] } [ preference preference-value ] [ tag tag-value ] [ description description-text ]
undo ip route-static dest-address { mask | mask-length } [ gateway-address | interface-type interface-number [ gateway-address ] | vpn-instance d-vpn-instance-name gateway-address ] [ preference preference-value ]
ip route-static vpn-instance s-vpn-instance-name&<1-6> dest-address { mask | mask-length } { gateway-address [ bfd { control-packet | echo-packet } ] [ public ] | interface-type interface-number [ gateway-address [ bfd { control-packet | echo-packet } ] ] | vpn-instance d-vpn-instance-name gateway-address [ bfd { control-packet | echo-packet } ] } [ preference preference-value ] [ tag tag-value ] [ description description-text ]
undo ip route-static vpn-instance s-vpn-instance-name&<1-6> dest-address { mask | mask-length } [ gateway-address [ public ] | interface-type interface-number [ gateway-address ] | vpn-instance d-vpn-instance-name gateway-address ] [ preference preference-value ]
View
System view
Parameters
vpn-instance s-vpn-instance-name&<1-6>: Specifies the VPN instance name, which is a string of 1 to 31 characters. &<1-6> indicates the argument before it can be entered up to 6 times. Each VPN instance has its own routing table, and the configured static route is installed in the routing tables of the specified VPN instances.
dest-address: Destination IP address of the static route, in dotted decimal notation.
mask: Mast of the IP address, in dotted decimal notation.
mask-length: Mask length, in the range 0 to 32.
gateway-address: IP address of the next hop, in dotted decimal notation.
vpn-instance d-vpn-instance-name: Name of the destination VPN instance. If a destination VPN instance name is specified, the router will search the output interface in the destination VPN instance based on the configured gateway-address.
gateway-address public: Indicates that the specified gateway-address is a public network address, rather than a VPN instance address.
preference preference-value : Specifies the preference of the static route, which is in the range of 1 to 255 and defaults to 60.
tag tag-value: Sets a tag value for the static route from 1 to 4294967295. The default is 0. Tags of routes are used in routing policies to control routing.
description description-text: Configures a description for the static route, which consists of 1 to 60 characters, including special characters like space, but excluding “?”.
bfd: Enable the BFD (bidirectional forwarding detection) function to detect reachability of the static route’s next hop. Once the next hop is unreachable, the system will switch to a backup route. Support for this key word varies by device.
control-packet: Implements BFD in the control packet mode.
echo-packet: Implements BFD in the echo packet mode.
Description
Use the ip route-static command to configure a unicast static route.
Use the undo ip route-static command to delete a unicast static route.
When configuring a unicast static route, note that:
1) If the destination IP address and the mask are both 0.0.0.0, the configured route is a default route. If routing table searching fails, the router will use the default route for packet forwarding.
2) Different route management policies can be implemented for different route preference configurations. For example, specifying the same preference for different routes to the same destination address enables load sharing, while specifying different preferences for these routes enables route backup.
3) When configuring a static route, you can specify the output interface or the next hop address based on the actual requirement. Note that the next hop address must not be the IP address of the local interface; otherwise, the route configuration will not take effect. For interfaces that support network address to link layer address resolution or point-to-point interfaces, you can specify the output interface or next hop address. When specifying the output interface, note that:
l For a NULL 0, if the output interface has already been configured, there is no need to configure the next hop address.
l For point-to-point interfaces, you can specify the output interface if you do not know the peer address. Thus, there is no need to change the router’s configuration even if the peer address is changed. A PPP interface obtains the peer’s IP address through PPP negotiation. In this case, you need only specify the output interface.
l For NBMA and P2MP interfaces, which support point-to-multipoint networks, the IP address to link layer address mapping must be established in addition to IP route configuration. In general, it is recommended to configure the next hop IP address when you configure the output interface.
l It is not recommended to specify a broadcast interface (such as an Ethernet interface, virtual template, or VLAN interface) as the output interface for a static route, because a broadcast interface may have multiple next hops. If you have to do so, you must specify the corresponding next hop of the interface at the same time.
l To implement BFD with the control-packet mode, the remote end must create a BFD session; otherwise the BFD function cannot work. To implement BFD with the echo-packet mode, the BFD function can work without the remote end needing to create any BFD session.
Related commands: display ip routing-table, ip route-static default-preference.
& Note:
Whether this command supports the VPN instance varies with devices.
& Note:
l The static route does not take effect if you specify its next hop address first and then configure the address as the IP address of a local interface, such as Ethernet interface and VLAN interface.
l If route oscillation occurs, enabling BFD may make the oscillation more severe. Be cautious for use of this feature.
Examples
# Configure a static route, whose destination address is 1.1.1.1/24, next hop address is 2.2.2.2, tag value is 45, and description information is for internet & intranet.
<Sysname> system-view
[Sysname] ip route-static 1.1.1.1 24 2.2.2.2 tag 45 description for internet & intranet
# Configure a static route for a VPN instance named vpn1: the destination address is 1.1.1.1/16 and the next hop address is 1.1.1.2, which is the address of this VPN instance.
<Sysname> system-view
[Sysname] ip route-static vpn-instance vpn1 1.1.1.1 16 vpn-instance vpn1 1.1.1.2
# Configure a static route: the destination address is 1.1.1.1/24 and the next hop address is 2.2.2.2, and enable BFD with the echo packet mode.
<Sysname> system-view
[Sysname] ip route-static 1.1.1.1 24 2.2.2.2 bfd echo-packet
1.1.3 ip route-static default-preference
Syntax
ip route-static default-preference default-preference-value
undo ip route-static default-preference
View
System view
Parameters
default-preference-value: Default preference for static routes, which is in the range of 1 to 255.
Description
Use the ip route-static default-preference command to configure the default preference for static routes.
Use the undo ip route-static default-preference command to restore the default.
By default, the default preference of static routes is 60.
Note that:
l If no preference is specified when configuring a static route, the default preference is used.
l When the default preference is re-configured, it applies to newly added static routes only.
Related commands: display ip routing-table, ip route-static.
Examples
# Set the default preference of static routes to 120.
<Sysname> system-view
[Sysname] ip route-static default-preference 120
Chapter 2 RIP Configuration Commands
& Note:
The term “router” in this document refers to a router in a generic sense or an Ethernet switch running routing protocols.
2.1 RIP Configuration Commands
2.1.1 checkzero
Syntax
checkzero
undo checkzero
View
RIP view
Parameters
None
Description
Use the checkzero command to enable the zero field check on RIPv1 messages.
Use the undo checkzero command to disable the zero field check.
The zero field check is enabled by default.
After the zero field check is enabled, the router discards RIPv1 messages in which zero fields are non-zero. If all messages are trusty, you can disable this feature to spare the processing time of the CPU.
Examples
# Disable the zero field check on RIPv1 messages for RIP process 100.
<Sysname> system-view
[Sysname] rip 100
[Sysname-rip-100] undo checkzero
2.1.2 default cost
Syntax
default cost value
undo default cost
View
RIP view
Parameters
value: Default metric of redistributed routes, in the range of 0 to 16.
Description
Use the default cost command to configure the default metric for redistributed routes.
Use the undo default cost command to restore the default.
By default, the default metric of redistributed routes is 0.
When you use the import-route command to redistribute routes from other protocols without specifying a metric, the metric specified by the default cost command applies.
Related command: import-route.
Examples
# Set the default metric for redistributed routes to 3.
<Sysname> system-view
[Sysname] rip 100
[Sysname-rip-100] default cost 3
2.1.3 default-route originate
Syntax
default-route originate cost value
undo default-route originate
View
RIP view
Parameters
value: Cost of the default route, in the range of 1 to 15.
Description
Use the default-route originate cost command to advertise a default route with the specified metric to RIP neighbors.
Use the undo default-route originate command to disable the sending of a default route.
By default, no default route is sent to RIP neighbors.
The RIP router with this feature configured will not receive any default routes from RIP neighbors.
Examples
# Send a default route with a metric of 2 to RIP neighbors.
<Sysname> system-view
[Sysname] rip 100
[Sysname-rip-100] default-route originate cost 2
# Disable default route sending.
[Sysname-rip-100] undo default-route originate
2.1.4 display rip
Syntax
display rip [ process-id | vpn-instance vpn-instance-name ]
View
Any view
Parameters
process-id: RIP process ID, in the range of 1 to 65535.
vpn-instance vpn-instance-name: Specifies a VPN instance name, a string of 1 to 31 characters. The support for vpn-instance vpn-instance-name depends on the device model.
Description
Use the display rip command to display the current status and configuration information of the specified RIP process.
l If process-id is not specified, information about all configured RIP processes is displayed.
l If vpn-instance-name is specified, the RIP configuration of the specified VPN instance is displayed.
Examples
# Display the current status and configuration information of all configured RIP processes.
<Sysname> display rip
Public VPN-instance name :
RIP process : 1
RIP version : 1
Preference : 100
Checkzero : Enabled
Default-cost : 0
Summary : Enabled
Hostroutes : Enabled
Maximum number of balanced paths : 4
Update time : 30 sec(s) Timeout time : 180 sec(s)
Suppress time : 120 sec(s) Garbage-collect time : 120 sec(s)
TRIP retransmit time : 5 sec(s)
TRIP response packets retransmit count : 36
Silent interfaces : None
Default routes : Disabled
Verify-source : Enabled
Networks :
192.168.1.0
Configured peers : None
Triggered updates sent : 0
Number of routes changes : 0
Number of replies to queries : 0
Table 2-1 Description on the fields of the display rip command
Field |
Description |
Public VPN-instance name (or Private VPN-instance name) |
The RIP process runs under a public VPN instance/The RIP process runs under a private VPN instance |
RIP process |
RIP process ID |
RIP version |
RIP version 1 or 2 |
Preference |
RIP route priority |
Checkzero |
Indicates whether the zero field check is enabled for RIPv1 messages. |
Default-cost |
Default cost of the redistributed routes |
Summary |
Indicates whether the routing summarization is enabled |
Hostroutes |
Indicates whether to receive host routes |
Maximum number of balanced paths |
Maximum number of load balanced routes |
Update time |
RIP update interval |
Timeout time |
RIP timeout time |
Suppress time |
RIP suppress interval |
Garbage-collect time |
RIP garbage collection interval |
TRIP retransmit time |
TRIP retransmit interval for sending update requests and responses. |
TRIP response packets retransmit count |
Maximum retransmit times for update requests and responses |
Silent interfaces |
Number of silent interfaces, which do not periodically send updates |
Default routes |
Indicates whether a default route is sent to RIP neighbors |
Verify-source |
Indicates whether the source IP address is checked on the received RIP routing updates |
Networks |
Networks enabled with RIP |
Configured peers |
Configured neighbors |
Triggered updates sent |
Number of sent triggered updates |
Number of routes changes |
Number of changed routes in the database |
Number of replies to queries |
Number of RIP responses |
2.1.5 display rip database
Syntax
display rip process-id database
View
Any view
Parameters
process-id: RIP process ID, in the range of 1 to 65535.
Description
Use the display rip database command to display the active routes in the RIP database, which are sent in normal RIP routing updates.
Examples
# Display the active routes in the database of RIP process 100.
<Sysname> display rip 100 database
10.0.0.0/8, cost 1, ClassfulSumm
10.0.0.0/24, cost 1, nexthop 10.0.0.1, Rip-interface
11.0.0.0/8, cost 1, ClassfulSumm
11.0.0.0/24, cost 1, nexthop 10.0.0.1, Imported
Table 2-2 Description on fields of the display rip database command
Field |
Description |
X.X.X.X/X |
Destination address and subnet mask |
cost |
Cost of the route |
classful-summ |
Indicates the route is a RIP summary route. |
Nexthop |
Address of the next hop |
Rip-interface |
Routes learnt from a RIP–enabled interface |
imported |
Routes redistributed from other routing protocols |
2.1.6 display rip interface
Syntax
display rip process-id interface [ interface-type interface-number ]
View
Any view
Parameters
process-id: RIP process ID, in the range of 1 to 65535.
interface-type interface-number: Specifies an interface.
Description
Use the display rip interface command to display the RIP interface information of the RIP process.
If no interface is specified, information about all RIP interfaces of the RIP process is displayed.
Examples
# Display all the interface information of RIP process 1.
<Sysname> display rip 1 interface
Interface-name: Vlan-interface1
Address/Mask:1.1.1.1/24 MetricIn/Out:0/1 Version: RIPv1
Split-horizon/Poison-reverse:on/off Input/Output:on/on
Current packets number/Maximum packets number: 234/2000
Table 2-3 Description on the fields of the display rip interface command
Field |
Description |
Interface-name |
The name of an interface running RIP. |
Address/Mask |
The IP address and Mask of the interface. |
MetricIn/Out |
Additional routing metric added to the incoming and outgoing routes |
Version |
RIP version running on the interface |
Split-horizon |
Indicates whether the split-horizon is enabled (ON: enabled, OFF: disabled). |
Poison-reverse |
Indicates whether the poison-reverse is enabled (ON: enabled, OFF: disabled) |
Input/Output |
Indicates if the interface is allowed to receive (Input) or send (Output) RIP messages (on is allowed, off is not allowed). |
Current packets number/Maximum packets number |
Packets to be sent/Maximum packets that can be sent on the interface |
2.1.7 display rip route
Syntax
display rip process-id route [ statistics | ip-address { mask | mask-length } | peer ip-address ]
View
Any view
Parameters
process-id: RIP process ID, in the range of 1 to 65535.
statistics: Displays the route statistics, including total number of routes and number of routes of each neighbor.
ip-address { mask | mask-length }: Displays route information about a specified IP address.
peer ip-address: Displays all routing information learned from a specified neighbor.
Description
Use the display rip route command to display the routing information of a specified RIP process.
Examples
# Display all routing information of RIP process 1.
<Sysname> display rip 1 route
Route Flags: R-RIP, T-TRIP
P-Permanent, A-Aging, S-Suppressed, G-Garbage-collect
Peer 21.0.0.23 on Vlan-interface1
Destination/Mask NextHop Cost Tag Flags Sec
56.0.0.0/8 21.0.0.23 1 0 RA 102
34.0.0.0/8 21.0.0.23 1 0 RA 23
Peer 21.0.0.12 on Vlan-interface1
Destination/Mask NextHop Cost Tag Flags Sec
56.0.0.0/8 21.0.0.12 1 0 RA 34
12.0.0.0/8 21.0.0.12 1 0 RA 12
# Display routing information for network 56.0.0.0/8 of RIP process 1.
<Sysname> display rip 1 route 56.0.0.0 8
Route Flags: R-RIP, T-TRIP
P-Permanent, A-Aging, S-Suppressed, G-Garbage-collect
Peer 21.0.0.23 on Vlan-interface1
Destination/Mask NextHop Cost Tag Flags Sec
56.0.0.0/8 21.0.0.23 1 0 RA 102
Peer 21.0.0.12 on Vlan-interface1
Destination/Mask NextHop Cost Tag Flags Sec
56.0.0.0/8 21.0.0.12 1 0 RA 34
# Display RIP process1 routing information learned from the specified neighbor.
<Sysname> display rip 1 route peer 21.0.0.23
Route Flags: R-RIP, T-TRIP
P-Permanent, A-Aging, S-Suppressed, G-Garbage-collect
Peer 21.0.0.23 on Vlan-interface1
Destination/Mask NextHop Cost Tag Flags Sec
56.0.0.0/8 21.0.0.23 1 0 RA 102
34.0.0.0/8 21.0.0.23 1 0 RA 23
Table 2-4 Description on the fields of the display rip route command
Field |
Description |
Route Flags |
R — RIP route T — TRIP route P — The route never expires A — The route is aging S — The route is suppressed G — The route is in Garbage-collect state |
Peer 21.0.0.23 on Vlan-interface1 |
Routing information learned on a RIP interface from the specified neighbor |
Destination/Mask |
Destination IP address and subnet mask |
Nexthop |
Next hop of the route |
Cost |
Cost of the route |
Tag |
Route tag |
Flags |
Indicates the route state |
Sec |
Remaining time of the timer corresponding to the route state |
# Display the routing statistics of RIP process 1.
<Sysname> display rip 1 route statistics
Peer Aging Permanent Garbage
21.0.0.23 2 0 3
21.0.0.12 2 0 4
Total 4 0 7
Table 2-5 Description on the fields of the display rip route statistics command
Field |
Description |
Peer |
IP address of a neighbor |
Aging |
Total number of aging routes learned from the specified neighbor |
Permanent |
Total number of permanent routes learned from the specified neighbor |
Garbage |
Total number of routes in the garbage-collection state learned from the specified neighbor |
Total |
Total number of routes learned from all RIP neighbors |
2.1.8 filter-policy export
Syntax
filter-policy { acl-number | ip-prefix ip-prefix-name } export [ protocol [ process-id ] | interface-type interface-number ]
undo filter-policy export [ protocol [ process-id ] | interface-type interface-number ]
View
RIP view
Parameters
acl-number: Number of an ACL used to filter outbound routes, in the range of 2000 to 3999.
ip-prefix ip-prefix-name: Name of an IP prefix list used to filter outbound routes, a string of 1 to 19 characters.
protocol: Filters outbound routes redistributed from a specified routing protocol, which can be bgp, direct, isis, ospf, rip, and static.
process-id: Process ID of the specified routing protocol, in the range of 1 to 65535. You need to specify a process ID when the routing protocol is rip, ospf, or isis.
interface-type interface-number: Specifies an interface.
Description
Use the filter-policy export command to configure the filtering of RIP outgoing routes. Only routes not filtered out can be advertised.
Use the undo filter-policy export command to remove the filtering.
By default, RIP does not filter outbound routes.
Note that:
l If protocol is specified, RIP filters only the outgoing routes redistributed from the specified routing protocol. Otherwise, RIP filters all routes to be advertised.
l If interface-type interface-number is specified, RIP filters only the routes advertised by the specified interface. Otherwise, RIP filters routes advertised by all RIP interfaces.
Related commands: acl, import-route, and ip ip-prefix.
Examples
# Reference ACL 2000 to filter outbound routes.
<Sysname> system-view
[Sysname] rip 1
[Sysname-rip-1] filter-policy 2000 export
# Reference IP prefix list abc to filter outbound routes on VLAN-interface 10.
[Sysname-rip-1] filter-policy ip-prefix abc export vlan-interface 10
2.1.9 filter-policy import
Syntax
filter-policy { acl-number | gateway ip-prefix-name | ip-prefix ip-prefix-name [ gateway ip-prefix-name ] } import [ interface-type interface-number ]
undo filter-policy import [ interface-type interface-number ]
View
RIP view
Parameters
acl-number: Number of the Access Control List (ACL) used for filtering incoming routes, in the range of 2000 to 3999.
ip-prefix ip-prefix-name: References an IP prefix list to filter incoming routes. The ip-prefix-name is a string of 1 to 19 characters.
gateway ip-prefix-name: References an IP prefix list to filter routes from the gateway.
interface-type interface-number: Specifies an interface.
Description
Use the filter-policy import command to filter the incoming routes.
Use the undo filter-policy import command to restore the default.
By default, RIP does not filter incoming routes.
Related commands: acl and ip ip-prefix.
Examples
# Reference ACL 2000 to filter incoming routes.
<Sysname> system-view
[Sysname] rip 1
[Sysname-rip-1] filter-policy 2000 import
# Reference IP prefix list abc on VLAN-interface 10 to filter all received RIP routes.
[Sysname-rip-1] filter-policy ip-prefix abc import vlan-interface 10
2.1.10 host-route
Syntax
host-route
undo host-route
View
RIP view
Parameters
None
Description
Use the host-route command to enable host route reception.
Use the undo host-route command to disable host route reception.
By default, receiving host routes is enabled.
In some cases, a router may receive many host routes from the same network segment. These routes are not helpful for routing and occupy a large amount of network resources. You can use the undo host-route command to disable receiving of host routes.
& Note:
RIPv2 can be disabled from receiving host routes, but RIPv1 cannot.
Examples
# Disable RIP from receiving host routes.
<Sysname> system-view
[Sysname] rip 1
[Sysname-rip-1] undo host-route
2.1.11 import-route
Syntax
import-route protocol [ process-id ] [ allow-jbgp ] [ cost cost | route-policy route-policy-name | tag tag ]*
undo import-route protocol [ process-id ]
View
RIP view
Parameters
protocol: Specify a routing protocol from which to redistribute routes, currently including bgp, direct, isis, ospf, rip, rip and static.
process-id: Process number of the routing protocol, in the range of 1 to 65535, used for isis, rip, and ospf.
cost: Cost for redistributed routes, in the range of 0 to 16. If cost is not specified, the default cost specified by the default cost command applies.
tag: Tag marking redistributed routes, in the range of 0 to 65,535. The default is 0.
route-policy route-policy-name: Specifies a routing policy with 1 to 19 characters.
allow-ibgp: When the protocol argument is set to bgp, allow-ibgp is an optional keyword. The import-route bgp command only redistributes EBGP routes, while the import-route bgp allow-ibgp command additionally redistributes IBGP routes, which may cause routing loops. Be cautious when using it.
Description
Use the import-route command to enable route redistribution from another routing protocol.
Use the undo import-route command to disable route redistribution.
By default, RIP does not redistribute routes from other routing protocols.
l You can specify a routing policy using keyword route-policy to redistribute only the specified routes.
l You can configure a cost for redistributed routes using keyword cost.
l You can configure a tag value for redistributed routes using keyword tag.
Related commands: default cost.
Examples
# Redistribute static routes, and set the cost to 4.
<Sysname> system-view
[Sysname] rip 1
[Sysname-rip-1] import-route static cost 4
# Set the default cost for redistributed routes to 3.
[Sysname-rip-1] default cost 3
# Redistribute OSPF routes with the cost being the default cost.
[Sysname-rip-1] import-route ospf
2.1.12 maximum load-balancing
Syntax
maximum load-balancing number
undo maximum load-balancing
View
RIP view
Parameters
number: Maximum number of load balanced routes. The number range is 1 to 4..
Description
Use the maximum load-balancing command to specify the maximum number of load balanced routes in load sharing mode.
Use the undo maximum load-balancing command to restore the default.
By default, the maximum number of load balanced routes is 4.
Examples
# Specify the maximum number of load balanced routes as 2.
<Sysname> system-view
[Sysname] rip
[Sysname-rip-1] maximum load-balancing 2
2.1.13 network
Syntax
network network-address
undo network network-address
View
RIP view
Parameters
network-address: IP address of a network segment, which can be the IP network address of any interface.
Description
Use the network command to enable RIP on the interface attached to the specified network.
Use the undo network command to disable RIP on the interface attached to the specified network.
RIP runs only on the interfaces attached to the specified network. For an interface not on the specified network, RIP neither receives/sends routes on it nor forwards interface route through it. Therefore, you need to specify the network after enabling RIP to validate RIP on a specific interface.
Use the network 0.0.0.0 command to enable RIP on all interfaces.
RIP is disabled on an interface by default.
Examples
# Enable RIP on the interface attached to the network 129.102.0.0.
<Sysname> system-view
[Sysname] rip 100
[Sysname-rip-100] network 129.102.0.0
2.1.14 peer
Syntax
peer ip-address
undo peer ip-address
View
RIP view
Parameters
ip-address: IP address of a RIP neighbor, in dotted decimal format.
Description
Use the peer command to specify the IP address of a neighbor in the non-broadcast multi-access (NBMA) network, where routing updates destined to the peer are unicast, rather than multicast or broadcast.
Use the undo peer command to remove the IP address of a neighbor.
By default, no neighbor is specified.
Note: you need not use the peer ip-address command when the neighbor is directly connected; otherwise the neighbor may receive both the unicast and multicast (or broadcast) of the same routing information.
Examples
# Specify to send unicast updates to peer 202.38.165.1.
<Sysname> system-view
[Sysname] rip 1
[Sysname-rip-1] peer 202.38.165.1
2.1.15 preference
Syntax
preference [ route-policy route-policy-name ] value
undo preference [ route-policy ]
View
RIP view
Parameters
route-policy-name: Routing policy name with 1 to 19 characters.
value: Priority for RIP route, in the range of 1 to 255. The smaller the value, the higher the priority.
Description
Use the preference command to specify the RIP route priority.
Use the undo preference route-policy command to restore the default.
By default, the priority of RIP route is 100.
You can specify a routing policy using keyword route-policy to set the specified priority to routes matching the routing policy.
l If a priority is set for matched routes in the routing policy, the priority applies to these routes. The priority of other routes is the one set by the preference command.
l If no priority is set for matched routes in the routing policy, the priority of all routes is the one set by the preference command.
Examples
# Set the RIP route priority to 120.
<Sysname> system-view
[Sysname] rip 1
[Sysname-rip-1] preference 120
2.1.16 reset rip statistics
Syntax
reset rip process-id statistics
View
User view
Parameters
process-id: RIP process ID, in the range of 1 to 65535.
Description
Use the reset rip statistics command to clear the statistics of the specified RIP process.
Examples
# Clear statistics in RIP process 100.
<Sysname> reset rip 100 statistics
2.1.17 rip
Syntax
rip [ process-id ] [ vpn-instance vpn-instance-name ]
undo rip [ process-id ] [ vpn-instance vpn-instance-name ]
View
System view
Parameters
process-id: RIP process ID, in the range of 1 to 65535. The default is 1.
vpn-instance vpn-instance-name: Specifies a VPN instance name, a string of 1 to 31 characters.
Description
Use the rip command to create a RIP process and enter RIP view.
Use the undo rip command to disable a RIP process.
By default, no RIP process runs.
Note that:
l If no VPN instance is specified, the RIP process will run under public network instance.
l You must create a VPN instance before you apply a RIP process to it. For related configuration, refer to the ip vpn-instance command.
l You must enable the RIP process before configuring the global parameters. This limitation is not for configuration of interface parameters.
l The configured interface parameters become invalid after you disable the RIP process.
Examples
# Create a RIP process and enter RIP process view.
<Sysname> system-view
[Sysname] rip
[Sysname-rip-1]
2.1.18 rip authentication-mode
Syntax
rip authentication-mode { md5 { rfc2082 key-string key-id | rfc2453 key-string } | simple password }
undo rip authentication-mode
View
Interface view
Parameters
md5: MD5 authentication mode.
rfc2453: Uses the message format defined in RFC 2453 (IETF standard).
rfc2082: Uses the message format defined in RFC 2082.
key-id: MD5 key number, in the range of 1 to 255.
key-string: MD5 key string with 1 to 16 characters in plain text format, or 24 characters in cipher text format. When the display current-configuration command is used to display system information, a 24-character cipher string is displayed as the MD5 key string.
simple: Plain text authentication mode.
password: Plain text authentication string with 1 to 16 characters.
Description
Use the rip authentication-mode command to configure RIPv2 authentication mode and parameters.
Use the undo rip authentication-mode command to cancel authentication.
Note that the key string you configured can overwrite the old one if there is any.
Related commands: rip version.
& Note:
With RIPv1, you can configure the authentication mode in interface view. However, the configuration will not take effect because RIPv1 does not support authentication.
Examples
# Configure MD5 authentication on VLAN-interface 10 with the key string being rose in the format defined in RFC 2453.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] rip version 2
[Sysname-Vlan-interface10] rip authentication-mode md5 rfc2453 rose
2.1.19 rip input
Syntax
rip input
undo rip input
View
Interface view
Parameters
None
Description
Use the rip input command to enable the interface to receive RIP messages.
Use the undo rip input command to disable the interface from receiving RIP messages.
By default, an interface is enabled to receive RIP messages.
Related commands: rip output.
Examples
# Disable VLAN-interface 10 from receiving RIP messages.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] undo rip input
2.1.20 rip metricin
Syntax
rip metricin value
undo rip metricin
View
Interface view
Parameters
value: Additional metric added to received routes, in the range of 0 to 16.
Description
Use the rip metricin command to add a metric to the received routes.
Use the undo rip metricin command to restore the default.
By default, the additional metric of a received route is 0.
When a valid RIP route is received, the system adds a metric to it and then installs it into the routing table. Therefore, the metric of routes received on the configured interface is increased.
Related commands: rip metricout.
Examples
# Configure an additional metric for routes received on VLAN-interface 10.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] rip metricin 2
2.1.21 rip metricout
Syntax
rip metricout value
undo rip metricout
View
Interface view
Parameters
value: Additional metric of sent routes, in the range of 1 to 16.
Description
Use the rip metricout command to add a metric to a sent route.
Use the undo rip metricout command to restore the default.
By default, the additional metric for sent routes is 1.
Before a RIP route is sent, a metric will be added to it. Therefore, when the metric is configured on an interface, the metric of RIP routes sent on the interface will be increased.
Related commands: rip metricin.
Examples
# Configure an additional metric of 12 for RIP routes sent on VLAN-interface 10.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] rip metricout 12
2.1.22 rip mib-binding
Syntax
rip mib-binding process-id
undo rip mib-binding
View
System view
Parameters
process-id: RIP process ID, in the range of 1 to 65535.
Description
Use the rip mib-binding command to bind MIB operations with a specified RIP process.
Use the undo rip mib-binding command to restore the default.
By default, MIB operations are bound to the RIP process with the smallest process ID.
Examples
# Configure RIP 100 to accept SNMP requests.
<Sysname> system-view
[Sysname] rip mib-binding 100
# Restore the default.
[Sysname] undo rip mib-binding
2.1.23 rip output
Syntax
rip output
undo rip output
View
Interface view
Parameters
None
Description
Use the rip output command to enable the interface to send RIP messages.
Use the undo rip output command to disable the interface from sending RIP messages.
Sending RIP messages is enabled on an interface by default.
Related commands: rip input.
Examples
# Disable VLAN-interface 10 from receiving RIP messages.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] undo rip output
2.1.24 rip poison-reverse
Syntax
rip poison-reverse
undo rip poison-reverse
View
Interface view
Parameters
None
Description
Use the rip poison-reverse command to enable the poison reverse function.
Use the undo rip poison-reverse command to disable the poison reverse function.
By default, the poison reverse function is disabled.
Examples
# Enable the poison reverse function for RIP routing updates on VLAN-interface 10.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] rip poison-reverse
2.1.25 rip split-horizon
Syntax
rip split-horizon
undo rip split-horizon
View
Interface view
Parameters
None
Description
Use the rip split-horizon command to enable the split horizon function.
Use the undo rip split-horizon command to disable the split horizon function.
The split horizon function is enabled by default.
l The split horizon function is necessary for preventing routing loops. Therefore, you are not recommended to disable it.
l In special cases, make sure it is necessary to disable the split horizon function.
& Note:
Only the poison reverse function takes effect if both the split horizon and poison reverse functions are enabled.
Examples
# Enable the split horizon function on VLAN-interface 10.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] rip split-horizon
2.1.26 rip summary-address
Syntax
rip summary-address ip-address { mask | mask-length }
undo rip summary-address ip-address { mask | mask-length }
View
Interface view
Parameters
ip-address: Summary IP address.
mask: Subnet mask in dotted decimal format.
mask-length: Subnet mask length, in the range 0 to 32.
Description
Use the rip summary-address command to configure RIPv2 to advertise a summary route through the interface.
Use the undo rip summary-address command to remove the configuration.
Note that the summary address is valid only when the automatic summarization is disabled.
Related commands: summary.
Examples
# Advertise a local summary address on VLAN-interface 10.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] rip summary-address 10.0.0.0 255.255.255.0
2.1.27 rip version
Syntax
rip version { 1 | 2 [ broadcast | multicast ] }
undo rip version
View
Interface view
Parameters
1: RIP version 1.
2: RIP version 2.
broadcast: Sends RIPv2 messages in broadcast mode.
multicast: Sends RIPv2 messages in multicast mode.
Description
Use the rip version command to specify a RIP version for the interface.
Use the undo rip version command to remove the specified RIP version.
By default, no RIP version is configured for an interface, which uses the global RIP version. If the global RIP version is not configured, the interface can only send RIPv1 broadcasts and can receive RIPv1 broadcasts and unicasts, and RIPv2 broadcasts, multicasts and unicasts.
If RIPv2 is specified with no sending mode configured, RIPv2 messages will be sent in multicast mode.
When RIPv1 runs on an interface, the interface will:
l Send RIPv1 broadcast messages
l Receive RIPv1 broadcast messages
l Receive RIPv1 unicast messages
When RIPv2 runs on the interface in broadcast mode, the interface will:
l Send RIPv2 broadcast messages
l Receive RIPv1 broadcast messages
l Receive RIPv1 unicast messages
l Receive RIPv2 broadcast messages
l Receive RIPv2 multicast messages
l Receive RIPv2 unicast messages
When RIPv2 runs on the interface in multicast mode, the interface will:
l Send RIPv2 multicast messages
l Receive RIPv2 broadcast messages
l Receive RIPv2 multicast messages
l Receive RIPv2 unicast messages
Examples
# Configure VLAN-interface 10 to broadcast RIPv2 messages.
<Sysname> system-view
[Sysname] interface Vlan-interface 10
[Sysname-Vlan-interface10] rip version 2 broadcast
2.1.28 silent-interface
Syntax
silent-interface { all | interface-type interface-number }
undo silent-interface { all | interface-type interface-number }
View
RIP view
Parameters
all: Silents all interfaces.
interface-type interface-number: Specifies an interface by its type and number.
Description
Use the silent-interface command to disable an interface or all interfaces from sending routing updates. That is, the interface only receives but does not send RIP messages.
Use the undo silent-interface command to restore the default.
By default, all interfaces are allowed to send routing updates.
Examples
# Configure all VLAN interfaces to work in the silent state, and activate VLAN-interface 10.
<Sysname> system-view
[Sysname] rip 100
[Sysname-rip-100] silent-interface all
[Sysname-rip-100] undo silent-interface vlan-interface 10
[Sysname-rip-100] network 131.108.0.0
2.1.29 summary
Syntax
summary
undo summary
View
RIP view
Parameters
None
Description
Use the summary command to enable automatic RIPv2 summarization. Natural masks are used to advertise summary routes so as to reduce the size of routing tables.
Use the undo summary command to disable automatic RIPv2 summarization so that all subnet routes can be broadcast.
By default, automatic RIPv2 summarization is enabled.
Enabling automatic RIPv2 summarization can reduce the size of the routing table to enhance the scalability and efficiency of large networks.
Related commands: rip version.
Examples
# Enable RIPv2 automatic summarization.
<Sysname> system-view
[Sysname] rip
[Sysname-rip-1] summary
2.1.30 timers
Syntax
timers { garbage-collect garbage-collect-value | suppress suppress-value | timeout timeout-value | update update-value }*
undo timers { garbage-collect | suppress | timeout | update } *
View
RIP view
Parameters
garbage-collect-value: Garbage-collect timer time in seconds, in the range of 1 to 3600.
suppress-value: Suppress timer time in seconds, in the range of 0 to 3600.
timeout-value: Timeout timer time in seconds, in the range of 1 to 3600.
update-value: Update timer time in seconds, in the range of 1 to 3600.
Description
Use the timers command to configure RIP timers. By adjusting RIP timers, you can improve network performance.
Use the undo timers command to restore the default.
By default, the garbage-collect timer is 120 seconds, the suppress timer 120 seconds, the timeout timer 180 seconds, and the update timer 30 seconds.
RIP is controlled by the above four timers.
l The update timer defines the interval between routing updates.
l The timeout timer defines the route aging time. If no routing update related to a route is received after the aging time, the metric of the route is set to 16 in the routing table.
l The suppress timer defines how long a RIP route stays in the suppressed state. When the metric of a route is 16, the route enters the suppressed state. In the suppressed state, only routes which come from the same neighbor and whose metric is less than 16 will be received by the router to replace unreachable routes.
l The garbage-collect timer defines the interval from when the metric of a route becomes 16 to when it is deleted from the routing table. During the Garbage-Collect timer length, RIP advertises the route with the routing metric set to 16. If no routing update is announced for that route after the Garbage-Collect timer expires, the route will be deleted from the routing table.
Note that:
l Generally, you are not recommended to change the default values of these timers.
l The time lengths of these timers must be kept consistent on all routers and access servers in the network.
Examples
# Specifies the update, timeout, suppress, and garbage-collect timers as 5, 15, 15 and 30 respectively.
<Sysname> system-view
[Sysname] rip 100
[Sysname-rip-100] timers update 5
[Sysname-rip-100] timers timeout 15
[Sysname-rip-100] timers suppress 15
[Sysname-rip-100] timers garbage-collect 30
2.1.31 validate-source-address
Syntax
validate-source-address
undo validate-source-address
View
RIP view
Parameters
None
Description
Use the validate-source-address command to enable the source IP address validation on incoming RIP routing updates.
Use the undo validate-source-address command to disable the source IP address validation.
The source IP address validation is enabled by default.
Generally, disabling the validation is not recommended.
Examples
# Enable the source IP address validation on incoming messages.
<Sysname> system-view
[Sysname-rip] rip 100
[Sysname-rip-100] validate-source-address
2.1.32 version
Syntax
version { 1 | 2 }
undo version
View
RIP view
Parameters
1: Specifies the RIP version as RIPv1.
2: Specifies the RIP version as RIPv2. RIPv2 messages are multicast.
Description
Use the version command to specify a global RIP version.
Use the undo version command to remove the configured global RIP version.
By default, if an interface has a RIP version specified, the RIP version takes effect; if it has no RIP version specified, it can send RIPv1 broadcasts, and receive RIPv1 broadcasts, RIPv1 unicasts, RIPv2 broadcasts, RIPv2 multicasts, and RIPv2 unicasts.
Note that:
l If an interface has an RIP version specified, the RIP version takes precedence over the global RIP version.
l If no RIP version is specified for the interface and the global version is RIPv1, the interface inherits RIPv1, and it can send RIPv1 broadcasts, and receive RIPv1 broadcasts and unicasts.
l If no RIP version is specified for the interface and the global version is RIPv2, the interface operates in the RIPv2 muticast mode, and it can send RIPv2 multicasts, and receive RIPv2 broadcasts, multicasts and unicasts.
Examples
# Specify RIPv2 as the global RIP version.
<Sysname> system-view
[Sysname] rip 100
[Sysname-rip-100] version 2
Chapter 3 OSPF Configuration Commands
& Note:
l The term “router” in this document refers to a router in a generic sense or an Ethernet switch running routing protocols.
l The value ranges of the parameters of the commands in this manual use the ranges assuming the switch operate in the default mode. When the switch operates in the IPv4/IPv6 dual-stack or the MCE mode, the value ranges of some parameters may vary. For the operating modes of the switch, refer to the parts discussing IPv6 configuration and MCE.
3.1 OSPF Configuration Commands
3.1.1 abr-summary
Syntax
abr-summary ip-address { mask | mask-length } [ advertise | not-advertise ] [ cost cost ]
undo abr-summary ip-address { mask | mask-length }
View
OSPF area view
Parameters
ip-address: Destination IP address of the summary route, in dotted decimal format.
mask: Mask of the IP address in dotted decimal format.
mask-length: Mask length, in the range 0 to 32 bits.
advertise | not-advertise: Advertises the summary route or not. By default, the summary route is advertised.
cost cost: Specifies the cost of the summary route, in the range 1 to 16777215. The default cost is the largest cost value among routes that are summarized.
Description
Use the abr-summary command to configure a summary route on the area border router.
Use the undo abr-summary command to remove a summary route.
By default, no route summarization is configured on an ABR.
You can enable advertising the summary route or not, and specify a route cost.
This command is usable only on an ABR. Multiple contiguous networks may be available in an area, where you can summarize them with one network on the ABR for advertisement. The ABR advertises only the summary route to other areas.
With the undo abr-summary command used, summarized routes will be advertised.
Examples
# Summarize networks 36.42.10.0/24 and 36.42.110.0/24 in Area 1 with 36.42.0.0/16.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] area 1
[Sysname-ospf-100-area-0.0.0.1] network 36.42.10.0 0.0.0.255
[Sysname-ospf-100-area-0.0.0.1] network 36.42.110.0 0.0.0.255
[Sysname-ospf-100-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
Parameters
area-id: ID of an area, a decimal integer in the range 0 to 4294967295 that is translated into the IP address format by the system, or an IP address.
Description
Use the area command to create an area and enter area view.
Use the undo area command to remove a specified area.
No OSPF area is created by default.
Examples
# Create Area 0 and enter Area 0 view
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] area 0
[Sysname-ospf-100-area-0.0.0.0]
3.1.3 asbr-summary
Syntax
asbr-summary ip-address { mask | mask-length } [ tag tag | not-advertise | cost cost ]*
undo asbr-summary ip-address { mask | mask-length }
View
OSPF view
Parameters
ip-address: IP address of the summary route in dotted decimal notation.
mask: IP address mask in dotted decimal notation.
mask-length: Mask length, in the range 0 to 32 bits.
not-advertise: Disables advertising the summary route. If the keyword is not specified, the route is advertised.
tag tag: Specifies a tag value for the summary route, used by a route policy to control route advertisement, in the range 0 to 4294967295. The default is 1.
cost cost: Specifies the cost of the summary route, in the range 1 to 16777214. For Type-1 external routes, the cost defaults to the largest cost among routes that are summarized. For Type-2 external routes, the cost defaults to the largest cost among routes that are summarized plus 1.
Description
Use the asbr-summary command to configure a summary route.
Use the undo asbr-summary command to remove a summary route.
No ASBR route summarization is configured by default.
With the asbr-summary command configured on an ASBR, it summarizes redistributed routes that fall into the specified address range with a single route. If the ASBR resides in an NSSA area, it advertises the summary route in a Type-7 LSA into the area.
With the asbr-summary command configured on an NSSA ABR, it summarizes routes described by Type-5 LSAs translated from Type-7 LSAs with a single route and advertises the summary route to other areas. This command does not take effect on non NSSA ABRs.
With the undo asbr-summary command used, summarized routes will be advertised.
Related command: display ospf asbr-summary.
Examples
# Summarize redistributed routes with a single route.
<Sysname> system-view
[Sysname] ip route-static 10.2.1.0 24 null 0
[Sysname] ip route-static 10.2.2.0 24 null 0
[Sysname] ospf 100
[Sysname-ospf-100] import-route static
[Sysname-ospf-100] asbr-summary 10.2.0.0 255.255.0.0 tag 2 cost 100
3.1.4 authentication-mode
Syntax
authentication-mode { simple | md5 }
undo authentication-mode
View
OSPF area view
Parameters
simple: Specifies the simple authentication mode.
md5: Specifies the MD5 ciphertext authentication mode.
Description
Use the authentication-mode command to specify an authentication mode for the OSPF area.
Use the undo authentication-mode command to remove the authentication mode.
By default, no authentication mode is configured for an OSPF area.
Routers that reside in the same area must have the same authentication mode: non-authentication, simple, or MD5.
Related commands: ospf authentication-mode.
Examples
# Specify the MD5 ciphertext authentication mode for OSPF area0.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] area 0
[Sysname-ospf-100-area-0.0.0.0] authentication-mode md5
3.1.5 bandwidth-reference
Syntax
bandwidth-reference value
undo bandwidth-reference
View
OSPF view
Parameters
value: Bandwidth reference value for link cost calculation, in the range 1 to 2147483648 Mbps.
Description
Use the bandwidth-reference command to specify a reference bandwidth value for link cost calculation.
Use the undo bandwidth-reference command to restore the default value.
The default value is 100 Mbps.
When links have no cost values configured, OSPF calculates their cost values: Cost=Reference bandwidth value / Link bandwidth. If the calculated cost is greater than 65535, the value of 65535 is used.
Examples
# Specify the reference bandwidth value as 1000 Mbps.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] bandwidth-reference 1000
3.1.6 default
Syntax
default { cost cost | limit limit | tag tag | type type } *
undo default { cost | limit | tag | type } *
View
OSPF view
Parameters
cost: Specifies the default cost for redistributed routes, in the range 0 to 16777214.
limit: Specifies the default upper limit of routes redistributed per time, in the range 1 to 2147483647.
tag: Specifies the default tag for redistributed routes, in the range 0 to 4294967295.
type: Specifies the default type for redistributed routes: 1 or 2.
Description
Use the default command to configure default parameters for redistributed routes.
Use the undo default command to restore default values.
The cost, route type, tag, and the upper limit are 1, 2, 1 and 1000 by default.
Related commands: import-route.
Examples
# Configure the default cost, upper limit, tag and type as 10, 20000, 100 and 2 respectively for redistributed external routes.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] default cost 10 limit 20000 tag 100 type 2
3.1.7 default-cost
Syntax
default-cost cost
undo default-cost
View
OSPF area view
Parameters
cost: Specifies a cost for the default route advertised to the Stub or NSSA area, in the range 0 to 16777214.
Description
Use the default-cost command to specify a cost for the default route advertised to the stub or NSSA area.
Use the undo default-cost command to restore the default value.
The cost defaults to 1.
This command is only applicable to the ABR of a stub area or the ABR/ASBR of an NSSA area.
Related commands: stub, nssa.
Examples
# Configure Area 1 as a stub area, and specify the cost of the default route advertised to the stub area as 20.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] area 1
[Sysname-ospf-100-area-0.0.0.1] stub
[Sysname-ospf-100-area-0.0.0.1] default-cost 20
3.1.8 default-route-advertise
Syntax
default-route-advertise [ [ always | cost cost | type type | route-policy route-policy-name ] * | summary cost cost ]
undo default-route-advertise
View
OSPF view
Parameters
always: If the local routing table has no default route, using this keyword generates a default route in an ASE LSA into the OSPF routing domain. Without this keyword used, the router can generate the default route only when the local routing table has a default route.
cost cost: Specifies a cost for the default route, in the range 0 to 16777214. The default is 1.
type type: Specifies a type for the ASE LSA: 1 or 2, which defaults to 2.
route-policy route-policy-name: Specifies a route policy name, a string of 1 to 19 characters. If the default route matches the specified route policy, the route policy modifies some values in the ASE LSA.
summary: Advertises the Type-3 summary LSA of the specified default route.
Description
Use the default-route-advertise command to generate a default route into the OSPF routing domain.
Use the undo default-route-advertise command to disable OSPF from distributing a default external route.
By default, no default route is distributed.
Using the import-route command cannot redistribute a default route. To do so, use the default-route-advertise command. If no default route is available in the local routing table, the always keyword should be included to generate a default route in a Type-5 LSA.
The default-route-advertise summary cost command is applicable only to VPNs, and the default route is redistributed in a Type-3 LSA. The PE router advertises the redistributed default route to the CE router. Currently, the switch does not support this command.
Related commands: import-route.
Examples
# Generate a default route in an ASE LSA into the OSPF routing domain (no default route is available in the local routing table).
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] default-route-advertise always
3.1.9 description
Syntax
description description
undo description
View
OSPF view/OSPF area view
Parameters
description: Configures a description for the OSPF process in OSPF view, or for the OSPF area in OSPF area view. description is a string of up to 80 characters.
Description
Use the description command to configure a description for an OSPF process or area.
Use the undo description command to remove the description.
No description is configured by default.
Use of this command is only for the identification of an OSPF process or area. The description has no special meaning.
Examples
# Describe the OSPF process 100 as abc.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] description abc
# Describe the OSPF area0 as bone area.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] area 0
[Sysname-ospf-100-area-0.0.0.0] description bone area
3.1.10 display ospf abr-asbr
Syntax
display ospf [ process-id ] abr-asbr
View
Any view
Parameters
process-id: OSPF process ID, in the range 1 to 65535.
Description
Use the display ospf abr-asbr command to display ABR/ASBR information.
If no process is specified, the ABR/ASBR information of all OSPF processes is displayed.
If you use this command on routers in a stub area, no ASBR information is displayed.
Examples
# Display ABR/ASBR information.
<Sysname> display ospf abr-asbr
OSPF Process 1 with Router ID 192.168.1.2
Routing Table to ABR and ASBR
Type Destination Area Cost Nexthop RtType
Inter 3.3.3.3 0.0.0.0 3124 10.1.1.2 ASBR
Intra 2.2.2.2 0.0.0.0 1562 10.1.1.2 ABR
Table 3-1 Description on the fields of the display ospf abr-asbr command
Field |
Description |
Type |
Intra-area router or Inter-area router |
Destination |
Router ID of an ABR/ASBR |
Area |
ID of the area of the next hop |
Cost |
Cost from the router to the ABR/ASBR |
Nexthop |
Next hop address |
RtType |
Router type: ABR, ASBR |
3.1.11 display ospf asbr-summary
Syntax
display ospf [ process-id ] asbr-summary [ ip-address { mask | mask-length } ]
View
Any view
Parameters
process-id: OSPF process ID, in the range 1 to 65535.
ip-address: IP address, in dotted decimal format.
mask: IP address mask, in dotted decimal format.
mask-length: Mask length, in the range 0 to 32 bits.
Description
Use the display ospf asbr-summary command to display information about the redistributed routes that are summarized.
If no OSPF process is specified, related information of all OSPF processes is displayed.
If no IP address is specified, information about all summarized redistributed routes will be displayed.
Related commands: asbr-summary.
Examples
# Display information about all summarized redistributed routes.
<Sysname> display ospf asbr-summary
OSPF Process 1 with Router ID 2.2.2.2
Summary Addresses
Total Summary Address Count: 1
Summary Address
Net : 30.1.0.0
Mask : 255.255.0.0
Tag : 20
Status : Advertise
Cost : 10 (Configured)
The Count of Route is : 2
Destination Net Mask Proto Process Type Metric
30.1.2.0 255.255.255.0 OSPF 1 2 1
30.1.1.0 255.255.255.0 OSPF 1 2 1
Table 3-2 Description on the fields of the display ospf asbr-summary command
Field |
Description |
Total Summary Address Count |
Total summary route number |
Net |
The address of the summary route |
Mask |
The mask of the summary route address |
Tag |
The tag of the summary route |
Status |
The advertisement status of the summary route |
Cost |
The cost to the summary net |
The Count of Route |
The count of routes that are summarized |
Destination |
Destination address of a summarized route |
Net Mask |
Network mask of a summarized route |
Proto |
Routing protocol |
Process |
Process ID of routing protocol |
Type |
Type of a summarized route |
Metric |
Metric of a summarized route |
3.1.12 display ospf brief
Syntax
display ospf [ process-id ] brief
View
Any view
Parameters
process-id: OSPF process ID, in the range 1 to 65535.
Description
Use the display ospf brief command to display OSPF brief information. If no OSPF process is specified, brief information about all OSPF processes is displayed.
Examples
# Display OSPF brief information.
<Sysname> display ospf brief
OSPF Process 1 with Router ID 192.168.1.2
OSPF Protocol Information
RouterID: 192.168.1.2 Border Router: NSSA
Route Tag: 0
Multi-VPN-Instance is not enabled
Applications Supported: MPLS Traffic-Engineering
SPF-schedule-interval: 5 0 5000
LSA generation interval: 5 0 5000
LSA arrival interval: 1000
Default ASE Parameter: Metric: 1 Tag: 1 Type: 2
Route Preference: 10
ASE Route Preference: 150
SPF Computation Count: 22
RFC 1583 Compatible
Graceful restart interval: 120
Area Count: 1 Nssa Area Count: 1
ExChange/Loading Neighbors: 0
Area: 0.0.0.1 (MPLS TE not enabled)
Authtype: None Area flag: NSSA
SPF Scheduled Count: 5
ExChange/Loading Neighbors: 0
Interface: 192.168.1.2 (Vlan-interface1)
Cost: 1 State: DR Type: Broadcast MTU: 1500
Priority: 1
Designated Router: 192.168.1.2
Backup Designated Router: 192.168.1.1
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 |
Border Router |
ABR, ASBR or NSSA ABR |
Route Tag |
The tag of redistributed routes |
Multi-VPN-Instance is not enabled |
The OSPF process does not support multi-VPN-instance. |
Applications Supported |
Applications supported |
SPF-schedule-interval |
Interval for SPF calculations |
LSA generation interval |
LSA generation interval |
LSA arrival interval |
Minimum LSA repeat arrival interval |
Default ASE Parameter |
Default ASE Parameters: metric, tag, route type. |
Route Preference |
Internal route priority |
ASE Route Preference |
External route priority |
SPF Computation count |
SPF computation count of the OSPF process |
RFC1583 Compatible |
Compatible with routing rules defined in RFC1583 |
Graceful restart interval |
Graceful restart interval |
Area Count |
Area number of the current process |
Nssa Area Count |
NSSA area number of the current process |
ExChange/Loading Neighbors |
Neighbors in ExChange/Loading state |
Area |
Area ID in the IP address format |
Authtype |
Authentication type of the area: Non-authentication, simple authentication, or MD5 authentication |
Area flag |
The type of the area |
SPF scheduled Count |
SPF calculation count in the OSPF area |
Interface |
IP address of the interface |
Cost |
Interface cost |
State |
Interface state |
Type |
Interface network type |
MTU |
Interface MTU |
Priority |
Router priority |
Designated Router |
The Designated Router |
Backup Designated Router |
The Backup Designated Router |
Timers |
Intervals of timers: hello, dead, poll, retransmit, and transmit delay |
3.1.13 display ospf cumulative
Syntax
display ospf [ process-id ] cumulative
View
Any view
Parameters
process-id: OSPF process ID, in the range 1 to 65535.
Description
Use the display ospf cumulative command to display OSPF statistics.
Use of this command is helpful for troubleshooting.
Examples
# Display OSPF statistics.
<Sysname> display ospf cumulative
OSPF Process 1 with Router ID 2.2.2.2
Cumulations
IO Statistics
Type Input Output
Hello 61 122
DB Description 2 3
Link-State Req 1 1
Link-State Update 3 3
Link-State Ack 3 2
LSAs originated by this router
Router: 4
Network: 0
Sum-Net: 0
Sum-Asbr: 0
External: 0
NSSA: 0
Opq-Link: 0
Opq-Area: 0
Opq-As: 0
LSAs Originated: 4 LSAs Received: 7
Routing Table:
Intra Area: 2 Inter Area: 3 ASE/NSSA: 0
Table 3-4 Description on the fields of the display ospf cumulative command
Field |
Description |
IO statistics |
Statistics about input/output packets and LSAs |
Type |
OSPF packet type |
Input |
Packets received |
Output |
Packets sent |
Hello |
Hell packet |
DB Description |
Database Description packet |
Link-State Req |
Link-State Request packet |
Link-State Update |
Link-State Update packet |
Link-State Ack |
Link-State Acknowledge packet |
LSAs originated by this router |
LSAs originated by this router |
Router |
Type-1 LSA |
Network |
Type-2 LSA |
Sum-Net |
Type-3 LSA |
Sum-Asbr |
Type-4 LSA |
External |
Type-5 LSA |
NSSA |
Type-7 LSA |
Opq-Link |
Type-9 LSA |
Opq-Area |
Type-10 LSA |
Opq-As |
Type-11 LSA |
LSAs originated |
LSAs originated |
LSAs Received |
LSAs received |
Routing Table |
Routing table |
Intra Area |
Intra-area route number |
Inter Area |
Inter-area route number |
ASE |
ASE route number |
3.1.14 display ospf error
Syntax
display ospf [ process-id ] error
View
Any view
Parameters
process-id: OSPF process ID, in the range 1 to 65535.
Description
Use the display ospf error command to display OSPF error information.
If no process is specified, the OSPF error information of all OSPF processes is displayed.
Examples
# Display OSPF error information.
<Sysname> display ospf error
OSPF Process 1 with Router ID 192.168.80.100
OSPF Packet Error Statistics
0 : OSPF Router ID confusion 0 : OSPF bad packet
0 : OSPF bad version 0 : OSPF bad checksum
0 : OSPF bad area ID 0 : OSPF drop on unnumber interface
0 : OSPF bad virtual link 0 : OSPF bad authentication type
0 : OSPF bad authentication key 0 : OSPF packet too small
0 : OSPF Neighbor state low 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: NBMA neighbor unknown 0 : DD: MTU option mismatch
0 : DD: Unknown LSA type 0 : DD: Extern option mismatch
0 : LS ACK: Bad ack 0 : LS ACK: Unknown LSA type
0 : LS REQ: Empty request 0 : LS REQ: Bad request
0 : LS UPD: LSA checksum bad 0 : LS UPD: Received less recent LSA
0 : LS UPD: Unknown LSA type
Table 3-5 Description on the fields of the display ospf error command
Field |
Description |
OSPF Router ID confusion |
Packets with duplicate route ID |
OSPF bad packet |
Packets illegal |
OSPF bad version |
Packets with wrong version |
OSPF bad checksum |
Packets with wrong checksum |
OSPF bad area ID |
Packets with invalid area ID |
OSPF drop on unnumber interface |
Packets dropped on the unnumbered interface |
OSPF bad virtual link |
Packets on wrong virtual links |
OSPF bad authentication type |
Packets with invalid authentication type |
OSPF bad authentication key |
Packets with invalid authentication key |
OSPF packet too small |
Packets too small in length |
OSPF Neighbor state low |
Packets received in low neighbor state |
OSPF transmit error |
Packets with error when being transmitted |
OSPF interface down |
Shutdown times of the interface |
OSPF unknown neighbor |
Packets received from unknown neighbors |
HELLO: Netmask mismatch |
Hello packets with mismatched mask |
HELLO: Hello timer mismatch |
Hello packets with mismatched hello timer |
HELLO: Dead timer mismatch |
Hello packets with mismatched dead timer |
HELLO: Extern option mismatch |
Hello packets with mismatched option field |
HELLO: NBMA neighbor unknown |
Hello packets received from unknown NBMA neighbors |
DD: MTU option mismatch |
DD packets with mismatched MTU |
DD: Unknown LSA type |
DD packets with unknown LSA type |
DD: Extern option mismatch |
DD packets with mismatched option field |
LS ACK: Bad ack |
Bad LSAck packets for LSU packets |
LS ACK: Unknown LSA type |
LSAck packets with unknown LSA type |
LS REQ: Empty request |
LSR packets with no request information |
LS REQ: Bad request |
Bad LSR packets |
LS UPD: LSA checksum bad |
LSU packets with wrong LSA checksum |
LS UPD: Received less recent LSA |
LSU packets without latest LSA |
LS UPD: Unknown LSA type |
LSU packets with unknown LSA type |
3.1.15 display ospf interface
Syntax
display ospf [ process-id ] interface [ all | interface-type interface-number ]
View
Any view
Parameters
process-id: OSPF process ID, in the range 1 to 65535.
all: Display the OSPF information of all interfaces.
interface-type interface-number: Interface type and interface number.
Description
Use the display ospf interface command to display OSPF interface information.
If no OSPF process is specified, the OSPF interface information of all OSPF processes is displayed.
Examples
# Display OSPF interface information.
<Sysname> display ospf interface
OSPF Process 1 with Router ID 192.168.1.1
Interfaces
Area: 0.0.0.0
IP Address Type State Cost Pri DR BDR
192.168.1.1 PTP P-2-P 1562 1 0.0.0.0 0.0.0.0
Area: 0.0.0.1
IP Address Type State Cost Pri DR BDR
172.16.0.1 Broadcast DR 1 1 172.16.0.1 0.0.0.0
Table 3-6 Description on the fields of the display ospf interface command
Field |
Description |
Area |
Area ID of the interface |
IP address |
Interface IP address (regardless of whether TE is enabled or not) |
Type |
Interface network type: PTP, PTMP, Broadcast, or NBMA |
State |
Interface state defined by interface state machine: DOWN, Waiting, p-2-p, DR, BDR, or DROther |
Cost |
Interface cost |
Pri |
Router priority |
DR |
The DR on the interface’s network segment |
BDR |
The BDR on the interface’s network segment |
3.1.16 display ospf lsdb
Syntax
display ospf [ process-id ] lsdb [ brief | [ { ase | router | network | summary | asbr | nssa | opaque-link | opaque-area | opaque-as } [ link-state-id ] ] [ originate-router advertising-router-id | self-originate ] ]
View
Any view
Parameters
process-id: OSPF process ID, in the range 1 to 65535.
brief: Displays brief LSDB information.
ase: Displays Type-5 LSA (AS External LSA) information in the LSDB.
router: Displays Type-1 LSA (Router LSA) information in the LSDB.
network: Displays Type-2 LSA (Network LSA) information in the LSDB.
summary: Displays Type-3 LSA (Network Summary LSA) information in the LSDB.
asbr: Displays Type-4 LSA (ASBR Summary LSA) information in the LSDB.
nssa: Displays Type-7 LSA (NSSA External LSA) information in the LSDB.
opaque-link: Displays Type-9 LSA (Opaque-link LSA) information in the LSDB.
opaque-area: Displays Type-10 LSA (Opaque-area LSA) information in the LSDB.
opaque-as: Displays Type-11 LSA (Opaque-AS LSA) information in the LSDB.
link-state-id: Link state ID, in the IP address format.
originate-router advertising-router-id: Displays information about LSAs originated by the specified router.
self-originate: Displays information about self-originated LSAs.
Description
Use the display ospf lsdb command to display LSDB information.
If no OSPF process is specified, LSDB information of all OSPF processes is displayed.
Examples
# Display OSPF LSDB information.
<Sysname> display ospf lsdb
OSPF Process 1 with Router ID 192.168.0.1
Link State Database
Area: 0.0.0.0
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 192.168.0.2 192.168.0.2 474 36 80000004 0
Router 192.168.0.1 192.168.0.1 21 36 80000009 0
Network 192.168.0.1 192.168.0.1 321 32 80000003 0
Sum-Net 192.168.1.0 192.168.0.1 321 28 80000002 1
Sum-Net 192.168.2.0 192.168.0.2 474 28 80000002 1
Area: 0.0.0.1
Type LinkState ID AdvRouter Age Len Sequence Metric
Router 192.168.0.1 192.168.0.1 21 36 80000005 0
Sum-Net 192.168.2.0 192.168.0.1 321 28 80000002 2
Sum-Net 192.168.0.0 192.168.0.1 321 28 80000002 1
Table 3-7 Description on the fields of the display ospf lsdb command
Field |
Description |
Area |
Area |
Type |
LSA type |
LinkState ID |
Linkstate ID |
AdvRouter |
The router that advertised the LSA |
Age |
Age of the LSA |
Len |
Length of the LSA |
Sequence |
Sequence number of the LSA |
Metric |
Cost of the LSA |
# Display Type2 LSA (Network LSA) information in the LSDB.
<Sysname> display ospf 1 lsdb network
OSPF Process 1 with Router ID 192.168.1.1
Area: 0.0.0.0
Link State Database
Type : Network
LS ID : 192.168.0.2
Adv Rtr : 192.168.2.1
LS Age : 922
Len : 32
Options : E
Seq# : 80000003
Chksum : 0x8d1b
Net Mask : 255.255.255.0
Attached Router 192.168.1.1
Attached Router 192.168.2.1
Table 3-8 Description on the fields of the display ospf 1 lsdb network command
Field |
Description |
Type |
LSA type |
LS ID |
DR IP address |
Adv Rtr |
Router that advertised the LSA |
LS Age |
LSA age time |
Len |
LSA length |
Options |
LSA options |
Seq# |
LSA sequence number |
Chksum |
LSA checksum |
Net Mask |
Network mask |
Attached Router |
ID of the router that established adjacency with the DR, and ID of the DR itself |
3.1.17 display ospf nexthop
Syntax
display ospf [ process-id ] nexthop
View
Any view
Parameters
process-id: OSPF process ID, in the range 1 to 65535.
Description
Use the display ospf nexthop command to display OSPF next hop information.
If no OSPF process is specified, the next hop information of all OSPF processes is displayed.
Examples
# Display OSPF next hop information.
<Sysname> display ospf nexthop
OSPF Process 1 with Router ID 192.168.0.1
Routing Nexthop Information
Next Hops:
Address Refcount IntfAddr Intf Name
----------------------------------------------------------------
192.168.0.1 1 192.168.0.1 Vlan-interface1
192.168.0.2 1 192.168.0.1 Vlan-interface1
192.168.1.1 1 192.168.1.1 Vlan-interface10
Table 3-9 Description on the fields of the display ospf nexthop command
Field |
Description |
Next hops |
Information about Next hops |
Address |
Next hop address |
Refcount |
Reference count, namely, routes that reference the next hop |
IntfAddr |
Outbound interface address |
Intf Name |
Outbound interface name |
3.1.18 display ospf peer
Syntax
display ospf [ process-id ] peer [ verbose | [ interface-type interface-number ] [ neighbor-id ] ]
View
Any view
Parameters
process-id: OSPF process ID, in the range 1 to 65535.
verbose: Displays detailed neighbor information.
interface-type interface-number: Interface type and interface number.
neighbor-id: Neighbor router ID.
Description
Use the display ospf peer command to display information about OSPF neighbors.
Note that:
If no OSPF process is specified, OSPF neighbor information of all OSPF processes is displayed.
If an interface is specified, the neighbor on the interface is displayed.
If a neighbor ID is specified, detailed information about the neighbor is displayed,
If neither interface nor neighbor ID is specified, brief information about neighbors of the specified OSPF process or all OSPF processes is displayed.
Examples
# Display detailed OSPF neighbor information.
<Sysname> display ospf peer verbose
OSPF Process 1 with Router ID 192.168.0.138
Neighbors
Area 0.0.0.1 interface 192.168.0.138(Vlan-interface1)'s neighbors
Router ID: 192.168.0.136 Address: 192.168.0.136 GR State: Normal
State: Full Mode: Nbr is Slave Priority: 1
DR: 192.168.0.138 BDR: 192.168.0.136 MTU: 0
Dead timer due in 40 sec
Neighbor is up for 00:12:59
Authentication Sequence: [ 0 ]
Neighbor state change count: 5
Table 3-10 Description on the fields of the display ospf peer verbose command
Field |
Description |
Router ID |
Neighbor router ID |
Address |
Neighbor router address |
GR State |
GR state |
State |
Neighbor state: Down, Init, Attempt, 2-Way, Exstart, Exchange, Loading or Full |
Mode |
Neighbor mode for DD exchange: master or slave |
Priority |
Router priority |
DR |
The DR on the interface’s network segment |
BDR |
The BDR on the interface’s network segment |
MTU |
Interface MTU |
Dead timer due in 40 sec |
Dead timer times out in 40 seconds |
Neighbor is up for 00:12:59 |
The neighbor has been up for 00:12:59 |
Authentication Sequence |
Authentication sequence number |
Neighbor state change count |
Count of neighbor state changes |
# Display brief OSPF neighbor information.
<Sysname> display ospf peer
OSPF Process 1 with Router ID 192.168.0.138
Neighbor Brief Information
Area: 0.0.0.1
Router ID Address Pri Dead-Time Interface State
192.168.0.136 192.168.0.136 1 37 Vlan1 Full/BDR
Table 3-11 Description on the fields of the display ospf peer command
Field |
Description |
Area |
Neighbor area |
Router ID |
Neighbor router ID |
Address |
Neighbor interface address |
Pri |
Router priority |
Dead time(s) |
Dead interval remained |
Interface |
Interface connected to the neighbor |
State |
Neighbor state: Down, Init, Attempt, 2-Way, Exstart, Exchange, Loading or Full |
3.1.19 display ospf peer statistics
Syntax
display ospf [ process-id ] peer statistics
View
Any view
Parameters
process-id: OSPF process ID, in the range 1 to 65535.
Description
Use the display ospf peer statistics command to display OSPF neighbor statistics.
If no OSPF process is specified, OSPF neighbor statistics of all OSPF processes is displayed.
Examples
# Display OSPF neighbor statistics.
<Sysname> display ospf peer statistics
OSPF Process 1 with Router ID 1.1.1.1
Neighbor Statistics
Area ID Down Attempt Init 2-Way ExStart Exchange Loading Full Total
0.0.0.1 0 0 0 0 0 0 0 1 1
Total 0 0 0 0 0 0 0 1 1
Table 3-12 Description on the fields of the display ospf peer statistics command
Field |
Description |
Area ID |
Area ID |
Down |
Under this state, neighbor initial state, the router has not received any information from a neighboring router for a period of time. |
Attempt |
Available only in an NBMA network, such as Frame Relay, X.25 or ATM. Under this state, the OSPF router has not received any information from a neighbor for a period but can send Hello packets with a longer interval to keep neighbor relationship. |
Init |
Under this state, the router has received a hello packet from a neighbor but the packet contains no IP address of itself, so mutual communication is not established. |
2-Way |
Indicates mutual communication between the router and its neighbor is established. DR/BDR election is finished under this state (or higher). |
ExStart |
Under this state, the router decides on sequence numbers for DD packets. |
Exchange |
Under this state, the router exchanges link state information with the neighbor. |
Loading |
Under this state, the router requests the neighbor for needed LSAs. |
Full |
Indicates LSDB synchronization has been accomplished between neighbors. |
Total |
Total number of neighbors under the same state |
3.1.20 display ospf request-queue
Syntax
display ospf [ process-id ] request-queue [ interface-type interface-number ] [ neighbor-id ]
View
Any view
Parameters
process-id: OSPF process ID, in the range 1 to 65535.
interface-type interface-number: Interface type and number.
neighbor-id: Neighbor’s router ID.
Description
Use the display ospf request-queue command to display OSPF request queue information.
If no OSPF process is specified, the OSPF request queue information of all OSPF processes is displayed.
Examples
# Display OSPF request queue information.
<Sysname> display ospf request-queue
OSPF Process 1 with Router ID 1.1.1.1
OSPF Request List
The Router's Neighbor is Router ID 2.2.2.2 Address 10.1.1.2
Interface 10.1.1.1 Area 0.0.0.0
Request list:
Type LinkState ID AdvRouter Sequence Age
Router 2.2.2.2 1.1.1.1 80000004 1
Network 192.168.0.1 1.1.1.1 80000003 1
Sum-Net 192.168.1.0 1.1.1.1 80000002 2
Table 3-13 Description on the fields of the display ospf request queue command
Field |
Description |
The Router's Neighbor is Router ID |
Neighbor router ID |
Address |
Neighbor interface IP address |
Interface |
Local interface IP address |
Area |
Area ID |
Request list |
Request list information |
Type |
LSA type |
LinkState ID |
Link state ID |
AdvRouter |
Advertising router |
Sequence |
LSA sequence number |
Age |
LSA age |
3.1.21 display ospf retrans-queue
Syntax
display ospf [ process-id ] retrans-queue [ interface-type interface-number ] [ neighbor-id ]
View
Any view
Parameters
process-id: OSPF process ID, in the range 1 to 65535.
interface-type interface-number: Interface type and interface number.
neighbor-id: Neighbor’s router ID.
Description
Use the display ospf retrans-queue command to display retransmission queue information.
If no OSPF process is specified, the retransmission queue information of all OSPF processes is displayed.
Examples
# Display OSPF retransmission queue information.
<Sysname> display ospf retrans-queue
OSPF Process 1 with Router ID 1.1.1.1
OSPF Retransmit List
The Router's Neighbor is Router ID 2.2.2.2 Address 10.1.1.2
Interface 10.1.1.1 Area 0.0.0.0
Retransmit list:
Type LinkState ID AdvRouter Sequence Age
Router 2.2.2.2 2.2.2.2 80000004 1
Network 12.18.0.1 2.2.2.2 80000003 1
Sum-Net 12.18.1.0 2.2.2.2 80000002 2
Table 3-14 Description on the fields of the display ospf retrans-queue command
Field |
Description |
The Router's Neighbor is Router ID |
Neighbor router ID |
Address |
Neighbor interface IP address |
Interface |
Interface address of the router |
Area |
Area ID |
Retrans list |
Retransmission list |
Type |
LSA type |
LinkState ID |
Link state ID |
AdvRouter |
Advertising router |
Sequence |
LSA sequence number |
Age |
LSA age |
3.1.22 display ospf routing
Syntax
display ospf [ process-id ] routing [ interface interface-type interface-number ] [ nexthop nexthop-address ]
View
Any view
Parameters
process-id: OSPF process ID, in the range 1 to 65535.
interface interface-type interface-number: Displays OSPF routing information advertised via the interface.
nexthop nexthop-address: Displays OSPF routing information with the specified next hop.
Description
Use the display ospf routing command to display OSPF routing information.
If no OSPF process is specified, the routing information of all OSPF processes is displayed.
Examples
# Display OSPF routing information.
<Sysname> display ospf routing
OSPF Process 1 with Router ID 192.168.1.2
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
192.168.1.0/24 1562 stub 192.168.1.2 192.168.1.2 0.0.0.0
172.16.0.0/16 1563 Inter 192.168.1.1 192.168.1.1 0.0.0.0
Total Nets: 2
Intra Area: 1 Inter Area: 1 ASE: 0 NSSA: 0
Table 3-15 Description on the fields of the display ospf routing command
Field |
Description |
Destination |
Destination network |
Cost |
Cost to destination |
Type |
Route type: intra-area, transit, stub, inter-area, type1 external, type2 external. |
NextHop |
Next hop address |
AdvRouter |
Advertising router |
Area |
Area ID |
Total Nets |
Total networks |
Intra Area |
Total intra-area routes |
Inter Area |
Total inter-area routes |
ASE |
Total ASE routes |
NSSA |
Total NSSA routes |
3.1.23 display ospf vlink
Syntax
display ospf [ process-id ] vlink
View
Any view
Parameters
process-id: OSPF process ID, in the range 1 to 65535.
Description
Use the display ospf vlink command to display OSPF virtual link information.
If no OSPF process is specified, the OSPF virtual link information of all OSPF processes is displayed.
Examples
# Display OSPF virtual link information.
<Sysname> display ospf vlink
OSPF Process 1 with Router ID 3.3.3.3
Virtual Links
Virtual-link Neighbor-ID -> 2.2.2.2, Neighbor-State: Full
Interface: 10.1.2.1 (Vlan-interface1)
Cost: 1 State: P-2-P Type: Virtual
Transit Area: 0.0.0.1
Timers: Hello 10 , Dead 40 , Retransmit 5 , Transmit Delay 1
Table 3-16 Description on the fields of the display ospf vlink command
Field |
Description |
Virtual-link Neighbor-id |
ID of the neighbor connected to the router via the virtual link |
Neighbor-State |
Neighbor State: Down, Attempt, Init, 2-Way, ExStart, Exchange, Loading, Full. |
Interface |
Local interface’s IP address and name of the virtual link |
Cost |
Interface route cost |
State |
Interface state |
Type |
Type: virtual link |
Transit Area |
Transit area ID |
Timers |
Values of timers: hello, dead, poll (NBMA), retransmit, and interface transmission delay |
3.1.24 enable link-local-signaling
Syntax
enable link-local-signaling
undo enable link-local-signaling
View
OSPF view
Parameters
None
Description
Use the enable link-local-signaling command to enable the OSPF link-local signaling (LLC) capability.
Use the undo enable link-local-signaling command to disable the OSPF link-local signaling capability.
By default, this capability is disabled.
Examples
# Enable link-local signaling for OSPF process 1.
<Sysname> system-view
[Sysname] ospf 1
[Sysname-ospf-1] enable link-local-signaling
3.1.25 enable log
Syntax
enable log [ config | error | state ]
undo enable log [ config | error | state ]
View
OSPF view
Parameters
config: Enables configuration logging.
error: Enables error logging.
state: Enables state logging.
Description
Use the enable command to enable specified OSPF logging.
Use the undo enable command to disable specified OSPF logging.
OSPF logging is disabled by default.
If no keyword is specified, all logging is enabled.
Examples
# Enable OSPF logging.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] enable log
3.1.26 enable out-of-band-resynchronization
Syntax
enable out-of-band-resynchronization
undo enable out-of-band-resynchronization
View
OSPF view
Parameters
None
Description
Use the enable out-of-band-resynchronization command to enable the OSPF out-of-band resynchronization (OOB-Resynch) capability.
Use the undo enable out-of-band-resynchronization command to disable the OSPF out-of-band resynchronization capability.
By default, the capability is disabled.
Examples
# Enable the out-of-band resynchronization capability for OSPF process 1.
<Sysname> system-view
[Sysname] ospf 1
[Sysname-ospf-1] enable link-local-signaling
[Sysname-ospf-1] enable out-of-band-resynchronization
3.1.27 filter
Syntax
filter { acl-number | ip-prefix ip-prefix-name } { import | export }
undo filter { import | export }
View
OSPF area view
Parameters
acl-number: ACL number, in the range 2000 to 3999.
ip-prefix-name: IP prefix list name, a string of up to 19 characters.
import: Filters incoming LSAs.
export: Filters outgoing LSAs.
Description
Use the filter command to configure incoming/outgoing summary LSAs filtering on an ABR.
Use the undo filter command to disable summary LSA filtering.
By default, summary LSAs filtering is disabled.
& Note:
This command is only available on an ABR.
Examples
# Apply IP prefix list my-prefix-list to filter inbound Type-3 LSAs, and apply ACL 2000 to filter outbound Type-3 LSAs in OSPF Area 1.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] area 1
[Sysname-ospf-100-area-0.0.0.1] filter ip-prefix my-prefix-list import
[Sysname-ospf-100-area-0.0.0.1] filter 2000 export
3.1.28 filter-policy export
Syntax
filter-policy { acl-number | ip-prefix ip-prefix-name } export [ protocol [ process-id ] ]
undo filter-policy export [ protocol [ process-id ] ]
View
OSPF view
Parameters
acl-number: Number of an ACL used to filter outgoing redistributed routes, in the range 2000 to 3999.
ip-prefix-name: Name of an IP prefix list used to filter outgoing redistributed routes, a string of up to 19 characters.
protocol: Specifies a protocol from which to filter redistributed routes. The protocol can be direct, static, rip, ospf, isis or bgp. If no protocol is specified, all redistributed routes are filtered.
process-id: Process ID, which is required when the protocol is rip, ospf or isis, in the range 1 to 65535.
Description
Use the filter-policy export command to configure the filtering of outgoing redistributed routes.
Use the undo filter-policy export command to disable the filtering.
By default, the filtering of outgoing redistributed routes is not configured.
You can use this command to filter outgoing redistributed routes as needed.
Related commands: import-route.
Examples
# Filter outgoing redistributed routes using ACL 2000.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] filter-policy 2000 export
3.1.29 filter-policy import
Syntax
filter-policy { acl-number | ip-prefix ip-prefix-name | gateway ip-prefix-name } import
undo filter-policy import
View
OSPF view
Parameters
acl-number: Number of an ACL used to filter incoming routes, in the range 2000 to 3999.
ip-prefix-name: Name of the IP prefix list used to filter routing information by destination address., a string of 1 to 19 characters.
gateway ip-prefix-name: Name of an IP address prefix list used to filter routes from the specified neighbors, a string of up to 19 characters.
Description
Use the filter-policy import command to configure the filtering of incoming routes.
Use the undo filter-policy import command to disable the filtering.
By default, no filtering of incoming routes is configured.
You can use the command to filter incoming routes as needed.
Examples
# Filter incoming routes using ACL 2000.
<Sysname> system-view
[Sysname] acl number 2000
[Sysname-acl-basic-2000] rule permit source 192.168.10.0 0.0.0.255
[Sysname-acl-basic-2000] quit
[Sysname] ospf 100
[Sysname-ospf-100] filter-policy 2000 import
3.1.30 graceful-restart
Syntax
graceful-restart [ nonstandard | ietf ]
undo graceful-restart
View
OSPF view
Parameters
nonstandard: Enables the non-IETF GR capability.
ietf: Enables the IETF GR capability.
Description
Use the graceful-restart command to enable OSPF Graceful Restart capability.
Use the undo graceful-restart command to disable OSPF Graceful Restart capability.
By default, OSPF Graceful Restart capability is disabled.
Note the following:
l Enable Opaque LSA advertisement and reception with the opaque-capability enable command before enabling the IETF GR capability for OSPF.
l Before enabling non-IETF GR capability for OSPF, enable OSPF LLS (link local signaling) with the enable link-local-signaling command and OOB (out of band resynchronization) with the enable out-of-band-resynchronization command.
l If the keywords nonstandard and ietf are not specified when OSPF GR is enabled, nonstandard is the default.
Related commands: enable link-local-signaling, enable out-of-band-resynchronization, opaque-capability enable.
Examples
# Enable IETF Graceful Restart for OSPF process 1.
<Sysname> system-view
[Sysname] ospf 1
[Sysname-ospf-1] opaque-capability enable
[Sysname-ospf-1] graceful-restart ietf
# Enable non-IETF Graceful Restart for OSPF process 1.
<Sysname> system-view
[Sysname] ospf 1
[Sysname-ospf-1] enable link-local-signaling
[Sysname-ospf-1] enable out-of-band-resynchronization
[Sysname-ospf-1] graceful-restart nonstandard
3.1.31 graceful-restart help
Syntax
graceful-restart help { acl-number | prefix prefix-list }
undo graceful-restart help
View
OSPF view
Parameters
acl-number: Basic or advanced ACL number, in the range 2000 to 3999.
prefix-list: Name of the specified IP prefix list, a string of 1 to 19 characters.
Description
Use the graceful-restart help command to configure for which OSPF neighbors the current router can serve as a GR Helper. (The neighbors are specified by the ACL or the IP prefix list.)
Use the undo graceful-restart help command to restore the default.
By default, the router can serve as a GR Helper for any OSPF neighbor.
Examples
# Configure the switch as a GR Helper for the OSPF neighbors defined in ACL 2001.
<Sysname> system-view
[Sysname] ospf 1
[Sysname-ospf-1] graceful-restart help 2001
3.1.32 graceful-restart interval
Syntax
graceful-restart interval interval-value
undo graceful-restart interval
View
OSPF view
Parameters
interval-value: Specifies the Graceful Restart interval, in the range 40 to 1,800 seconds.
Description
Use the graceful-restart interval command to configure the Graceful Restart interval.
Use the undo graceful-restart interval command to restore the default Graceful Restart interval.
By default, the Graceful Restart interval is 120 seconds.
Note that the Graceful Restart interval of OSPF cannot be less than the maximum value of dead intervals on all OSPF interfaces; otherwise, the Graceful Restart of OSPF may fail.
Related commands: ospf timer dead.
Examples
# Configure the Graceful Restart interval for OSPF process 1 as 100 seconds.
<Sysname> system-view
[Sysname] ospf 1
[Sysname-ospf-1] graceful-restart interval 100
3.1.33 host-advertise
Syntax
host-advertise ip-address cost
undo host-advertise ip-address
View
OSPF area view
Parameters
ip-address: IP address of a host
cost: Cost of the route, in the range 1 to 65535.
Description
Use the host-advertise command to advertise a host route.
Use the undo host-advertise command to remove a host route.
No host route is advertised by default.
Examples
# Advertise the host route 1.1.1.1 with a cost of 100.
<Sysname> system-view
[Sysname] ospf 100
[Sysname] area 0
[Sysname-ospf-100-area-0.0.0.0] host-advertise 1.1.1.1 100
3.1.34 import-route
Syntax
import-route protocol [ process-id | allow-ibgp ] [ cost cost | type type | tag tag | route-policy route-policy-name ]*
undo import-route protocol [ process-id ]
View
OSPF view
Parameters
protocol: Redistributes routes from the protocol, which can be direct, static, rip, ospf, isis or bgp.
process-id: Process ID, which is optional when the protocol is rip, ospf or isis, in the range 1 to 65535.
allow-ibgp: Allows IBGP routes redistribution. It is optional only when the protocol is bgp.
cost cost: Specifies a route cost, in the range 0 to 16777214. The default is 1.
type type: Specifies a cost type, 1 or 2. The default is 2.
tag tag : Specifies a tag for external LSAs. The default is 1.
route-policy route-policy-name: Specifies a route policy to redistribute qualified routes only. A Route policy name is a string of up to 19 characters.
Description
Use the import-route command to redistribute routes from another protocol.
Use the undo import-route command to disable route redistribution from a protocol.
Route redistribution from another protocol is not configured by default.
OSPF prioritize routes as follows:
l Intra-area route
l Inter-area route
l Type1 External route
l Type2 External route
An intra-area route is a route in an OSPF area. An inter-area route is between any two OSPF areas. Both of them are internal routes.
An external route is a route to a destination outside the OSPF AS.
A Type-1 external route is an IGP route, such as RIP or STATIC, which has high reliability and whose cost is comparable with the cost of OSPF internal routes. Therefore, the cost from an OSPF router to a Type-1 external route’s destination equals the cost from the router to the corresponding ASBR plus the cost from the ASBR to the external route’s destination.
A Type-2 external route is an EGP route, which has low credibility, so OSPF considers the cost from the ASBR to a Type-2 external route is much bigger than the cost from the ASBR to an OSPF internal router. Therefore, the cost from an internal router to a Type-2 external route’s destination equals the cost from the ASBR to the Type-2 external route’s destination.
Related commands: default-route-advertise.
& Note:
l The import-route command cannot redistribute default routes.
l Use the import-route bgp allow-ibgp command with care, because it redistributes both EBGP and IBGP routes that may cause routing loops.
Examples
# Redistribute routes from RIP process 40 and specify the type, tag, and cost as 2, 33 and 50 for redistributed routes.
<Sysname> system-view
[Sysname> ospf 100
[Sysname-ospf-100] import-route rip 40 type 2 tag 33 cost 50
3.1.35 log-peer-change
Syntax
log-peer-change
undo log-peer-change
View
OSPF view
Parameters
None
Description
Use the log-peer-change command to enable the logging of OSPF neighbor state changes.
Use the undo log-peer-change command to disable the logging.
The logging is enabled by default.
With this feature enabled, information about neighbor state changes is displayed on the terminal until the feature is disabled.
Examples
# Disable the logging of neighbor state changes for OSPF process 100.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] undo log-peer-change
3.1.36 lsa-arrival-interval
Syntax
lsa-arrival-interval interval
undo lsa-arrival-interval
View
OSPF view
Parameters
interval: Specifies the minimum LSA repeat arrival interval in milliseconds, in the range 0 to 60000.
Description
Use the lsa-arrival-interval command to specify the minimum LSA repeat arrival interval.
Use the undo lsa-arrival-interval command to restore the default.
The interval defaults to 1000 milliseconds.
If an LSA that has the same LSA type, LS ID, originating router ID with the previous LSA is received within the interval, the LSA will be discarded. This feature helps protect routers and bandwidth from being over-consumed due to frequent network changes.
It is recommended the interval set with the lsa-arrival-interval command is smaller or equal to the initial interval set with the lsa-generation-interval command.
Related commands: lsa-generation-interval.
Examples
# Set the LSA minimum repeat arrival interval to 200 milliseconds.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] lsa-arrival-interval 200
3.1.37 lsa-generation-interval
Syntax
lsa-generation-interval maximum-interval [ initial-interval [ incremental-interval ] ]
undo lsa-generation-interval
View
OSPF view
Parameters
maximum-interval: Maximum LSA generation interval in seconds, in the range 1 to 60.
initial-interval: Minimum LSA generation interval in milliseconds, in the range 10 to 60000. The default is 0.
incremental-interval: LSA generation incremental interval in milliseconds, in the range 10 to 60000. The default is 5000 milliseconds.
Description
Use the lsa-generation-interval command to configure the OSPF LSA generation interval.
Use the undo lsa-generation-interval command to restore the default.
The LSA generation interval defaults to 5 seconds.
With this command configured, when network changes are not frequent, LSAs are generated at the initial-interval. If network changes become frequent, LSA generation interval is incremented by a specified value each time a generation happens, up to the maximum-interval.
Related commands: lsa-arrival-interval.
Examples
# Configure the maximum LSA generation interval as 2 seconds, minimum interval as 100 milliseconds and incremental interval as 100 milliseconds.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] lsa-generation-interval 2 100 100
3.1.38 lsdb-overflow-limit
Syntax
lsdb-overflow-limit number
undo lsdb-overflow-limit
View
OSPF view
Parameters
number: Specifies the upper limit of external LSAs in the LSDB, in the range 1 to 1000000.
Description
Use the lsdb-overflow-limit command to specify the upper limit of external LSAs in the LSDB.
Use the undo lsdb-overflow-limit command to cancel the limitation.
External LSAs in the LSDB are unlimited by default.
Examples
# Specify the upper limit of external LSAs as 400000.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] lsdb-overflow-limit 400000
3.1.39 maximum load-balancing
Syntax
maximum load-balancing maximum
undo maximum load-balancing
View
OSPF view
Parameters
maximum: Maximum number of equal cost routes for load balancing, in the range 1 to 4. No load balancing is available when the number is set to 1.
Description
Use the maximum load-balancing command to specify the maximum number of equal cost routes for load balancing.
Use the undo maximum load-balancing command to restore the default.
By default, the maximum number of equal cost routes for load balancing is 4.
Examples
# Specify the maximum number of equal cost routes as 2.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] maximum load-balancing 2
3.1.40 maximum-routes
Syntax
maximum-routes { external | inter | intra } number
undo maximum-routes { external | inter | intra }
View
OSPF view
Parameters
external: Specifies the maximum number of external routes.
inter: Specifies the maximum number of inter-area routes.
intra: Specifies the maximum number of intra-area routes.
number: Maximum route number, in the range 0 to 15360.
Description
Use the maximum-routes command to specify the maximum route number of a specified type, inter-area, intra-area or external.
Use the undo maximum-routes command to restore the default route maximum value of a specified type.
By default, the maximum route number is 15360.
Examples
# Specify the maximum number of intra-area routes as 500.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] maximum-routes intra 500
3.1.41 network
Syntax
network ip-address wildcard-mask
undo network ip-address wildcard-mask
View
OSPF area view
Parameters
ip-address: IP address of a network.
wildcard-mask: Wildcard mask of the IP address. For example, the wildcard mask of mask 255.0.0.0 is 0.255.255.255.
Description
Use the network command to enable OSPF on the interface attached to the specified network in the area.
Use the undo network command to disable OSPF on an interface.
By default, an interface neither belongs to any area nor runs OSPF.
You can configure one or multiple interfaces in an area to run OSPF. Note that the interface’s primary IP address must fall into the specified network segment to make the interface run OSPF. If only the interface’s secondary IP address falls into the network segment, the interface cannot run OSPF.
Related commands: ospf.
Examples
# Specify the interface whose primary IP address falls into 131.108.20.0/24 to run OSPF in Area 2.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] area 2
[Sysname-ospf-100-area-0.0.0.2] network 131.108.20.0 0.0.0.255
3.1.42 nssa
Syntax
nssa [ default-route-advertise | no-import-route | no-summary ]*
undo nssa
View
OSPF area view
Parameters
default-route-advertise: Usable on an NSSA ABR or an ASBR only. If it is configured on an NSSA ABR, the ABR generates a default route in a Type-7 LSA into the NSSA regardless of whether the default route is available. If it is configured on an ASBR, only a default route is available on the ASBR can it generates the default route in a Type-7 LSA into the attached area.
no-import-route: Usable only on an NSSA ABR that is also the ASBR of the OSPF routing domain to disable redistributing routes in Type7 LSAs into the NSSA area, making sure that routes can be redistributed correctly.
no-summary: Usable only on an NSSA ABR to advertise only a default route in a Type-3 summary LSA into the NSSA area. In this way, all the other summary LSAs are not advertised into the area. Such an area is known as an NSSA totally stub area.
Description
Use the nssa command to configure the current area as an NSSA area.
Use the undo nssa command to restore the default.
By default, no NSSA area is configured.
All routers attached to an NSSA area must be configured with the nssa command in area view.
Related commands: default-cost.
Examples
# Configure Area 1 as an NSSA area.
[Sysname] ospf 100
[Sysname-ospf-100] area 1
[Sysname-ospf-100-area-0.0.0.1] nssa
3.1.43 opaque-capability enable
Syntax
opaque-capability enable
undo opaque-capability
View
OSPF view
Parameters
None
Description
Use the opaque-capability enable command to enable opaque LSA advertisement and reception. With the command configured, the OSPF device can receive and advertise the Type-9, Type-10 and Type-11 opaque LSAs.
Use the undo opaque-capability command to restore the default.
The feature is disabled by default.
Examples
# Enable advertising and receiving opaque LSAs.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100]opaque-capability enable
3.1.44 ospf
Syntax
ospf [ process-id | router-id router-id | vpn-instance instance-name ]*
undo ospf process-id
View
System view
Parameters
process-id: OSPF process ID, in the range 1 to 65535.
router-id: OSPF Router ID, in dotted decimal format.
instance-name: VPN instance name, a string of 1 to 31 case-insensitive characters.
Description
Use the ospf command to enable an OSPF process.
Use the undo ospf command to disable an OSPF process.
No OSPF process is enabled by default.
You can enable multiple OSPF processes on a router and specify different Router IDs for these processes.
When using OSPF as the IGP for VPN implementation, you need to bind the OSPF process with a VPN instance.
Enabling OSPF first is required before performing other tasks.
Examples
# Enable OSPF process 100 and specify Router ID 10.10.10.1.
<Sysname> system-view
[Sysname] ospf 100 router-id 10.10.10.1
[Sysname-ospf-100]
3.1.45 ospf authentication-mode
Syntax
For MD5/HMAC-MD5 authentication:
ospf authentication-mode { md5 | hmac-md5 } key-id [ plain | cipher ] password
undo ospf authentication-mode { md5 | hmac-md5 } key-id
For simple authentication:
ospf authentication-mode simple [ plain | cipher ] password
undo ospf authentication-mode simple
View
Interface view
Parameters
md5: MD5 authentication.
hmac-md5: HMAC-MD5 authentication.
simple: Simple authentication.
key-id: Authentication key ID, in the range 1 to 255.
plain | cipher: Plain or cipher password. If plain is specified, only plain password is supported and displayed upon displaying the configuration file. If cipher is specified, both plain and cipher are supported, but only cipher password is displayed when displaying the configuration file. If no keyword is specified, the cipher type is the default for the MD5/HMAC-MD5 authentication mode, and the plain type is the default for the simple authentication mode.
password: Password. Simple authentication: For plain type password, a plain password is a string of up to 8 characters; for cipher type password, a plain password is a string of up to 8 characters, and a cipher password is a string of up to 24 characters. MD5/HMAC-MD5 authentication: For plain type password, a plain password is a string of up to 16 characters; for cipher type password, a plain password is a string of up to 16 characters, and a cipher password is a string of up to 24 characters.
Description
Use the ospf authentication-mode command to set the authentication mode and key ID on an interface.
Use the undo ospf authentication-mode command to remove specified configuration.
By default, no authentication is available on an interface.
Interfaces attached to the same network segment must have the same authentication password and mode.
This configuration is not supported on the NULL interface.
Related commands: authentication-mode.
Examples
# Configure the network 131.119.0.0/16 in Area 1 to support MD5 cipher authentication, and set the interface key ID to 15, authentication password to abc, and password type to cipher.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] area 1
[Sysname-ospf-100-area-0.0.0.1] network 131.119.0.0 0.0.255.255
[Sysname-ospf-100-area-0.0.0.1] authentication-mode md5
[Sysname-ospf-100-area-0.0.0.1] quit
[Sysname-ospf-100] quit
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ospf authentication-mode md5 15 cipher abc
# Configure the network 131.119.0.0/16 in Area 1 to support simple authentication, and set for the interface the authentication password to abc, and password type to cipher.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] area 1
[Sysname-ospf-100-area-0.0.0.1] network 131.119.0.0 0.0.255.255
[Sysname-ospf-100-area-0.0.0.1] authentication-mode simple
[Sysname-ospf-100-area-0.0.0.1] quit
[Sysname-ospf-100] quit
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ospf authentication-mode simple cipher abc
3.1.46 ospf cost
Syntax
ospf cost value
undo ospf cost
View
Interface view
Parameters
value: OSPF cost, in the range 1 to 65535.
Description
Use the ospf cost command to set an OSPF cost for the interface.
Use the undo ospf cost command to restore the default OSPF cost for the interface.
By default, an OSPF interface calculates its cost with the formula: interface default OSPF cost=100 Mbps/interface bandwidth(Mbps). Default OSPF costs of some interfaces are:
l 1785 for the 56 kbps serial interface
l 1562 for the 64 kbps serial interface
l 48 for the E1 (2.048 Mbps) interface
l 1 for the Ethernet interface
You can use the ospf cost command to set an OSPF cost for an interface manually.
This configuration is not supported on the NULL interface.
Examples
# Set the OSPF cost for the interface to 65.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ospf cost 65
3.1.47 ospf dr-priority
Syntax
ospf dr-priority priority
undo ospf dr-priority
View
Interface view
Parameters
priority: DR Priority of the interface, in the range 0 to 255.
Description
Use the ospf dr-priority command to set the priority for DR/BDR election on an interface.
Use the undo ospf dr-priority command to restore the default value.
By default, the priority is 1.
The bigger the value, the higher the priority.
This configuration is not supported on the NULL interface.
Examples
# Set the DR priority on the current interface to 8.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ospf dr-priority 8
3.1.48 ospf mib-binding
Syntax
ospf mib-binding process-id
undo ospf mib-binding
View
System view
Parameters
process-id: OSPF process ID, in the range 1 to 65535.
Description
Use the ospf mib-binding command to bind an OSPF process to MIB operation.
Use the undo ospf mib-binding command to restore the default.
By default, MIB operation is bound to the first enabled OSPF process.
Examples
# Bind OSPF process 100 to MIB operation.
<Sysname> system-view
[Sysname] ospf mib-binding 100
# Bind the first enabled OSPF process to MIB operation.
<Sysname> system-view
[Sysname] undo ospf mib-binding
3.1.49 ospf mtu-enable
Syntax
ospf mtu-enable
undo ospf mtu-enable
View
Interface view
Parameters
None
Description
Use the ospf mtu-enable command to enable an interface to add the real MTU into DD packets.
Use the undo ospf mtu-enable command to restore the default.
By default, an interface adds a MTU of 0 into DD packets, that is, no real MTU is added.
Note that:
l After a virtual link is established through a Tunnel, two devices on the link from different vendors may have different MTU values. To make them consistent, set the attached interfaces’ default MTU to 0.
l This configuration is not supported on the NULL interface.
Examples
# Enable the interface to add the real MTU value into DD packets.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ospf mtu-enable
3.1.50 ospf network-type
Syntax
ospf network-type { broadcast | nbma | p2mp | p2p }
undo ospf network-type
View
Interface view
Parameters
broadcast: Specifies the network type as Broadcast.
nbma: Specifies the network type as NBMA.
p2mp: Specifies the network type as P2MP.
p2p: Specifies the network type as P2P.
Description
Use the ospf network-type command to set the network type for an interface.
Use the undo ospf network-type command to restore the default network type for an interface.
By default, the network type of an interface depends on its link layer protocol.
l For Ethernet, and FDDI, the default network type is broadcast.
l For ATM, FR, HDLC and X.25, the default network type is NBMA.
l For PPP, LAPB and POS, the default network type is P2P.
Note that:
l If a router on a broadcast network does not support multicast, you can configure the interface’s network type as NBMA.
l If any two routers on an NBMA network are directly connected via a virtual link, that is, the network is fully meshed, you can configure the network type as NBMA; otherwise you need to configure it as P2MP for two routers having no direct link to exchange routing information via another router.
l When the network type of an interface is NBMA, you need to use the peer command to specify a neighbor.
l If only two routers run OSPF on a network segment, you can configure associated interfaces’ network type as P2P.
Related commands: ospf dr-priority.
& Note:
This command is not supported on the NULL interface.
Examples
# Configure the interface’s network type as NBMA.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ospf network-type nbma
3.1.51 ospf timer dead
Syntax
ospf timer dead seconds
undo ospf timer dead
View
Interface view
Parameters
seconds: Dead interval in seconds, in the range 1 to 2147483647.
Description
Use the ospf timer dead command to set the dead interval.
Use the undo ospf timer dead command to restore the default.
The dead interval defaults to 40s for Broadcast, P2P interfaces and defaults to 120s for P2MP and NBMA interfaces.
If an interface receives no hello packet from the neighbor within the dead interval, the interface considers the neighbor down. The dead interval on an interface is at least four times the hello interval. Any two routers attached to the same segment must have the same dead interval.
This configuration is not supported on the NULL interface.
Related commands: ospf timer hello.
Examples
# Configure the dead interval on the current interface as 60 seconds.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ospf timer dead 60
3.1.52 ospf timer hello
Syntax
ospf timer hello seconds
undo ospf timer hello
View
Interface view
Parameters
seconds: Hello interval in seconds, in the range 1 to 65535.
Description
Use the ospf timer hello command to set the hello interval on an interface.
Use the undo ospf timer hello command to restore the default hello interval on an interface.
The hello interval defaults to 10s for P2P and Broadcast interfaces, and defaults to 30s for P2MP and NBMA interfaces.
The shorter the hello interval is, the faster the topology converges and the more resources are consumed. Make sure the hello interval on two neighboring interfaces is the same.
This configuration is not supported on the NULL interface.
Related commands: ospf timer dead.
Examples
# Configure the hello interval on the current interface as 20 seconds.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ospf timer hello 20
3.1.53 ospf timer poll
Syntax
ospf timer poll seconds
undo ospf timer poll
View
Interface view
Parameters
seconds: Poll interval in seconds, in the range 1 to 2147483647.
Description
Use the ospf timer poll command to set the poll interval on an NBMA interface.
Use the undo ospf timer poll command to restore the default value.
By default, the poll interval is 120s.
When an NBMA interface finds its neighbor is down, it will send hello packets at the poll interval. The poll interval is at least four times the hello interval.
This configuration is not supported on the NULL interface.
Related commands: ospf timer hello.
Examples
# Set the poll timer interval on the current interface to 130 seconds.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ospf timer poll 130
3.1.54 ospf timer retransmit
Syntax
ospf timer retransmit interval
undo ospf timer retransmit
View
Interface view
Parameters
interval: LSA retransmission interval in seconds, in the range 1 to 3600.
Description
Use the ospf timer retransmit command to set the LSA retransmission interval on an interface.
Use the undo ospf timer retransmit command to restore the default.
The interval defaults to 5s.
After sending an LSA, an interface waits for an acknowledgement packet. If the interface receives no acknowledgement within the retransmission interval, it will retransmit the LSA.
The retransmission interval should not be so small to avoid unnecessary retransmissions.
This configuration is not supported on the NULL interface.
Examples
# Set the LSA retransmission interval to 8 seconds.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ospf timer retransmit 8
3.1.55 ospf trans-delay
Syntax
ospf trans-delay seconds
undo ospf trans-delay
View
Interface view
Parameters
seconds: LSA transmission delay in seconds, in the range 1 to 3600.
Description
Use the ospf trans-delay command to set the LSA transmission delay on an interface.
Use the undo ospf trans-delay command to restore the default.
The delay defaults to 1s.
Each LSA in the LSDB has an age that is incremented by 1 every second, but the age does not change during transmission. It is necessary to add a transmission delay into its age time, which is important for low speed networks.
This configuration is not supported on the NULL interface.
Examples
# Set the LSA transmission delay to 3 seconds on the current interface.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] ospf trans-delay 3
3.1.56 peer
Syntax
peer ip-address [ dr-priority dr-priority ]
undo peer ip-address
View
OSPF view
Parameters
ip-address: Neighbor IP address.
dr-priority: Neighbor DR priority, in the range 0 to 255; the bigger the value, the higher the priority.
Description
Use the peer command to specify a neighbor, and the DR priority of the neighbor.
Use the undo peer command to remove the configuration.
On an X.25 or Frame Relay network, you can configure mappings to make the network fully meshed (any two routers have a direct link in between), so OSPF can handle DR/BDR election as it does on a broadcast network. However, since routers on the network cannot find neighbors via broadcasting hello packets, you need to specify neighbors and neighbor DR priorities on the routers.
After startup, a router sends a hello packet to neighbors with DR priorities higher than 0. When the DR and BDR are elected, the DR will send hello packets to all neighbors for adjacency establishment.
A router uses the priority set with the peer command to determine whether to send a hello packet to the neighbor rather than for DR election. The DR priority set with the ospf dr-priority command is used for DR election.
Related commands: ospf dr-priority.
Examples
# Specify the neighbor 1.1.1.1.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] peer 1.1.1.1
3.1.57 preference
Syntax
preference [ ase ] [ route-policy route-policy-name ] value
undo preference [ ase ]
View
OSPF view
Parameters
ase: Sets a priority for ASE routes. If the keyword is not specified, using the command sets a priority for OSPF internal routes.
route-policy: Applies a routing policy to set priorities for specified routes.
route-policy-name: Routing policy name, a string of 1 to 19 characters.
value: Priority value, in the range 1 to 255. A smaller value represents a higher priority.
Description
Use the preference command to set the priority of OSPF routes.
Use the undo preference command to restore the default.
The priority of OSPF internal routes defaults to 10, and the priority of OSPF external routes defaults to 150.
If a routing policy is specified, priorities defined by the routing policy will apply to matched routes, and the priorities set with the preference command apply to OSPF routes not matching the routing policy.
A router may run multiple routing protocols. When several routing protocols find routes to the same destination, the router uses the route found by the protocol with the highest priority.
Examples
# Set a priority of 150 for OSPF internal routes.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] preference 150
3.1.58 reset ospf counters
Syntax
reset ospf [ process-id ] counters [ neighbor [ interface-type interface-number ] [ router-id ] ]
View
User view
Parameters
process-id: OSPF process ID, in the range 1 to 65535.
neighbor: Clears neighbor statistics.
interface-type interface-number: Interface type and interface number.
router-id: Neighbor Router ID.
Description
Use the reset ospf counters command to reset OSPF counters. If no OSPF process is specified, counters of all OSPF processes are reset.
Examples
# Reset OSPF counters.
<Sysname> reset ospf counters
3.1.59 reset ospf process
Syntax
reset ospf [ process-id ] process [ graceful-restart ]
View
User view
Parameters
process-id: OSPF process ID, in the range 1 to 65535.
graceful-restart: Starts GR for the OSPF process.
Description
Use the reset ospf process command to reset all OSPF processes or a specified process.
Using the reset ospf process command will:
l Clear all invalid LSAs without waiting for their timeouts;
l Make a newly configured Router ID take effect;
l Start a new round of DR/BDR election;
l Not remove any previous OSPF configurations.
The system prompts whether to reset OSPF process upon execution of this command.
Examples
# Reset all OSPF processes.
<Sysname> reset ospf process
3.1.60 reset ospf redistribution
Syntax
reset ospf [ process-id ] redistribution
View
User view
Parameters
process-id: OSPF process ID, in the range 1 to 65535.
Description
Use the reset ospf redistribution command to restart route redistribution. If no process ID is specified, using the command restarts route redistribution for all OSPF processes.
Examples
# Restart route redistribution.
<Sysname> reset ospf redistribution
3.1.61 rfc1583 compatible
Syntax
rfc1583 compatible
undo rfc1583 compatible
View
OSPF view
Parameters
None
Description
Use the rfc1583 compatible command to make routing rules defined in RFC1583 compatible.
Use the undo rfc1583 compatible command to disable the function.
By default, RFC1583 routing rules are compatible.
RFC1583 and RFC2328 have different routing rules on selecting the best route when multiple AS external LSAs describe routes to the same destination. Using this command can make them compatible.
Examples
# Make RFC1583 routing rules compatible.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] rfc1583 compatible
3.1.62 silent-interface
Syntax
silent-interface { all | interface-type interface-number }
undo silent-interface { all | interface-type interface-number }
View
OSPF view
Parameters
all: Disables all interfaces from sending OSPF packets.
interface-type interface-number: Interface type and interface number.
Description
Use the silent-interface command to disable an interface or all interfaces from sending OSPF packets.
Use the undo silent-interface command to restore the default.
By default, an interface sends OSPF packets.
A disabled interface is a passive interface, which cannot send any hello packet.
To make no routing information obtained by other routers on a network segment, you can use this command to disable the interface from sending OSPF packets.
Examples
# Disable an interface from sending OSPF packets.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] silent-interface vlan-interface 10
3.1.63 snmp-agent trap enable ospf
Syntax
snmp-agent trap enable ospf [ process-id ] [ ifauthfail | ifcfgerror | ifrxbadpkt | ifstatechange | iftxretransmit | lsdbapproachoverflow | lsdboverflow | maxagelsa | nbrstatechange | originatelsa | vifcfgerror | virifauthfail | virifrxbadpkt | virifstatechange | viriftxretransmit | virnbrstatechange ] *
undo snmp-agent trap enable ospf [ process-id ] [ ifauthfail | ifcfgerror | ifrxbadpkt | ifstatechange | iftxretransmit | lsdbapproachoverflow | lsdboverflow | maxagelsa | nbrstatechange | originatelsa | vifcfgerror | virifauthfail | virifrxbadpkt | virifstatechange | viriftxretransmit | virnbrstatechange ] *
View
System view
Parameters
process-id: OSPF process ID, in the range 1 to 65535.
ifauthfail: Interface authentication failure information.
ifcfgerror: Interface configuration error information.
ifrxbadpkt: Information about error packets received.
ifstatechange: Interface state change information.
iftxretransmit: Packet receiving and forwarding information.
lsdbapproachoverflow: Information about cases approaching LSDB overflow.
lsdboverflow: LSDB overflow information.
maxagelsa: LSA max age information.
nbrstatechange: Neighbor state change information.
originatelsa: Information about LSAs originated locally.
vifauthfail: Virtual interface authentication failure information.
vifcfgerror: Virtual interface configuration error information.
virifauthfail: Virtual interface authentication failure information.
virifrxbadpkt: Information about error packets received by virtual interfaces.
virifstatechange: Virtual interface state change information.
viriftxretransmit: Virtual interface packet retransmission information.
virnbrstatechange: Virtual interface neighbor state change information.
Description
Use the snmp-agent trap enable ospf command to enable the sending of SNMP traps for a specified OSPF process. If no process is specified, the feature is enabled for all processes.
Use the undo snmp-agent trap enable ospf command to disable the feature.
By default, this feature is enabled.
Refer to SNMP-RMON Commands for related information.
Examples
# Enable the sending of SNMP traps for all OSPF processes.
<Sysname> system-view
[Sysname] snmp-agent trap enable ospf
3.1.64 spf-schedule-interval
Syntax
spf-schedule-interval maximum-interval [ minimum-interval [ incremental-interval ] ]
undo spf-schedule-interval
View
OSPF view
Parameters
maximum-interval: Maximum SPF calculation interval in seconds, in the range 1 to 60.
minimum-interval: Minimum SPF calculation interval in milliseconds, in the range 10 to 60000, which defaults to 0.
incremental-interval: Incremental value in milliseconds, in the range 10 to 60000, which defaults to 5000.
Description
Use the spf-schedule-interval command to set the OSPF SPF calculation interval.
Use the undo spf-schedule-interval command to restore the default.
The interval defaults to 5 seconds.
Based on its LSDB, an OSPF router calculates the shortest path tree with itself being the root, and uses it to determine the next hop to a destination. Through adjusting the SPF calculation interval, you can protect bandwidth and router resources from being over-consumed due to frequent network changes.
With this command configured, when network changes are not frequent, SPF calculation applies at the minimum-interval. If network changes become frequent, the SPF calculation interval is incremented by the incremental-interval each time a calculation happens, up to the maximum-interval.
Examples
# Configure the SPF calculation maximum interval as 10 seconds, minimum interval as 500 milliseconds and incremental interval as 200 milliseconds.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] spf-schedule-interval 10 500 200
3.1.65 stub
Syntax
stub [ no-summary ]
undo stub
View
OSPF area view
Parameters
no-summary: Usable only on a stub ABR. With it configured, the ABR advertises only a default route in a Summary LSA into the stub area (such a stub area is known as a totally stub area).
Description
Use the stub command to configure an area as a stub area.
Use the undo stub command to remove the configuration.
No area is stub area by default. To configure an area as a stub area, all routers attached to it must be configured with this command.
Related commands: default-cost.
Examples
# Configure Area1 as a stub area.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] area 1
[Sysname-ospf-100-area-0.0.0.1] stub
3.1.66 stub-router
Syntax
stub-router
undo stub-router
View
OSPF view
Parameters
None
Description
Use the stub-router command to configure the router as a stub router.
Use the undo stub-router command to restore the default.
By default, no router is configured as a stub router.
The router LSAs from the stub router may contain different link type values. A value of 3 means a link to the stub network, so the cost of the link remains unchanged. A value of 1, 2 or 4 means a point-to-point link, a link to a transit network or a virtual link; in such cases, a maximum cost value of 65535 is used. Thus, other neighbors find the links to the stub router have such big costs, they will not send packets to the stub router for forwarding as long as there is a route with a smaller cost.
Examples
# Configure a stub router.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] stub-router
3.1.67 vlink-peer
Syntax
vlink-peer router-id [ hello seconds | retransmit seconds | trans-delay seconds | dead seconds | simple [ plain | cipher ] password | { md5 | hmac-md5 } key-id [ plain | cipher ] password ]*
undo vlink-peer router-id [ hello | retransmit | trans-delay | dead | [ simple | { md5 | hmac-md5 } key-id ] ]*
View
OSPF area view
Parameters
router-id: Router ID of the neighbor on the virtual link.
hello seconds: Hello interval in seconds, in the range 1 to 8192. The default is 10. It must be identical to the hello interval on its virtual link neighbor.
retransmit seconds: Retransmission interval in seconds, in the range 1 to 3600, which defaults to 5.
trans-delay seconds: Transmission delay interval in seconds, in the range 1 to 3600, which defaults to 1.
dead seconds: Dead interval in seconds, in the range 1 to 32768, which defaults to 40 and is identical to the value on its virtual link neighbor. The dead interval is at least four times the hello interval.
md5: MD5 authentication.
hmac-md5: HMAC-MD5 authentication.
simple: Simple authentication.
key-id: Key ID for MD5 or HMAC-MD5 authentication, in the range 1 to 255.
plain | cipher: Plain or cipher type. If plain is specified, only plain password is supported and displayed upon displaying the configuration file. If cipher is specified, both plain and cipher are supported, but only cipher password is displayed when displaying the configuration file. By default, MD5 and HMAC-MD5 support cipher password, and simple authentication supports plain password.
password: Plain or cipher password. Simple authentication: For plain type, a plain password is a string of up to 8 characters. For cipher type, a plain password is a string of up to 8 characters, and a cipher password is a string of up to 24 characters. MD5/HMAC-MD5 authentication: For plain type, a plain password is a string of up to 16 characters. For cipher type, a plain password is a string of up to 16 characters, and a cipher password is a string of up to 24 characters.
Description
Use the vlink-peer command to configure a virtual link.
Use the undo vlink-peer command to remove a virtual link.
As defined in RFC2328, all non-backbone areas must maintain connectivity to the backbone. You can use the vlink-peer command to configure a virtual link to connect an area to the backbone.
Considerations on parameters:
l The smaller the hello interval is, the faster the network converges and the more network resources are consumed.
l A so small retransmission interval will lead to unnecessary retransmissions. A big value is appropriate for a low speed link.
l You need to specify an appropriate transmission delay with the trans-delay keyword.
The authentication mode at the non-backbone virtual link end follows the one at the backbone virtual link end. The two authentication modes (MD5 or Simple) are independent, and you can specify neither of them.
Related commands: authentication-mode, display ospf.
Examples
# Configure a virtual link to the neighbor with router ID 1.1.1.1.
<Sysname> system-view
[Sysname] ospf 100
[Sysname-ospf-100] area 2
[Sysname-ospf-100-area-0.0.0.2] vlink-peer 1.1.1.1
Chapter 4 IS-IS Configuration Commands
& Note:
l The term “router” in this document refers to a router in a generic sense or an Ethernet switch running routing protocols.
l The value ranges of the parameters of the commands in this manual use the ranges assuming the switch operate in the default mode. When the switch operates in the IPv4/IPv6 dual-stack or the MCE mode, the value ranges of some parameters may vary. For the operating modes of the switch, refer to the parts discussing IPv6 configuration and MCE.
4.1 IS-IS Configuration Commands
4.1.1 area-authentication-mode
Syntax
area-authentication-mode { simple | md5 } password [ ip | osi ]
View
IS-IS view
Parameters
simple: Specifies to send the password in plain text.
md5: Specifies to send the password encrypted with MD5.
password: Password to be set. For simple authentication mode, the password must be plain text. For md5 authentication mode, the password can be either plain text or ciphertext. A plaintext password can be a string of up to 16 characters, such as user918. A cipher password must be a ciphertext string of up to 24 characters, such as (TT8F]Y\5SQ=^Q`MAF4<1!!.
ip: Specifies the system to check the configuration for the corresponding field of IP in LSP.
osi: Specifies the system to check the configuration for the corresponding field of OSI in LSP.
& Note:
Whether a password should use ip or osi is not affected by the actual network environment.
Description
Use the area-authentication-mode command to specify the area authentication mode and a password. The password in the specified mode is inserted into all outgoing Level-1 packets (LSP, CSNP and PSNP) and is used for authenticating the incoming Level-1 packets.
Use the undo area-authentication-mode command to restore the default.
No area authentication mode is specified by default, that is, the system will neither authenticate incoming Level-1 packets nor set password for outgoing Level-1 packets.
With area authentication mode configured, the system will discard incoming routes from untrusted routers.
Related commands: reset isis all, domain-authentication-mode, isis authentication-mode
Examples
# Set the area authentication password to hello, and the authentication mode to simple.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1] area-authentication-mode simple hello
4.1.2 auto cost enable
Syntax
auto-cost enable
undo auto-cost enable
View
IS-IS view
Parameters
None
Description
Use the auto-cost enable command to enable interfaces of the current IS-IS process to calculate interface cost automatically.
Use the undo auto-cost enable command to disable the function.
This function is disabled by default.
The preference of interface cost set by the auto-cost command is lower than that set by the circuit-cost command. The preference from high to low is: the cost set by the isis cost command, the global cost set by the circuit cost command, the cost automatically calculated and the default cost.
When the cost-style is wide or wide-compatible, the cost value of an interface is calculated by using the following formula:
cost = (reference value/bandwidth)×10.
Related commands: bandwidth-reference, cost-style.
Examples
# Enable interfaces of IS-IS process 1 to calculate interface cost automatically.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1] auto-cost enable
4.1.3 bandwidth-reference
Syntax
bandwidth-reference value
undo bandwidth-reference
View
IS-IS view
Parameters
value: Bandwidth reference value in Mbps, ranging from 1 to 2147483648.
Description
Use the bandwidth-reference command to set the bandwidth reference value for calculating link cost.
Use the undo bandwidth-reference command to restore the default.
By default, the reference value is 100 Mbps.
In the case no interface cost is specified in interface view or system view and automatic cost calculation is enabled:
l When the cost style is wide or wide-compatible, IS-IS automatically calculates the interface cost based on the interface bandwidth, using the formula: interface cost = (bandwidth reference value/interface bandwidth) × 10, and the maximum calculated cost is 16777214.
l When the cost style is narrow, narrow-compatible, or compatible, if the interface is a loopback interface, the cost value is 0; otherwise, the cost value is automatically calculated as follows: if the interface bandwidth is in the range of 1 M to 10 M, the interface cost is 60; if the interface bandwidth is in the range of 11 M to 100 M, the interface cost is 50; if the interface bandwidth is in the range of 101 M to 155 M, the interface cost is 40; if the interface bandwidth is in the range of 156 M to 622 M, the interface cost is 30; if the interface bandwidth is in the range of 623 M to 2500 M, the interface cost is 20, and the default interface cost of 10 is used for any other bandwidths.
Related commands: auto-cost enable.
Examples
# Configure the bandwidth reference of IS-IS process 1 as 200 Mbps.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1] bandwidth-reference 200
4.1.4 circuit-cost
Syntax
circuit-cost value [ level-1 | level-2 ]
undo circuit-cost [ level-1 | level-2 ]
View
IS-IS view
Parameters
value: Specifies the global link cost value. The value range varies with cost types.
l For types narrow, narrow-compatible and compatible: The cost value ranges from 0 to 63.
l For types wide and wide-compatible: The cost value ranges from 0 to 16777215.
level-1: Applies the link cost to Level-1.
level-2: Applies the link cost to Level-2.
Description
Use the circuit-cost command to set a global link cost.
Use the undo circuit-cost command to restore the default.
By default, the global link cost is not configured.
If no keyword is specified, the specified cost applies to Level-1-2.
The preference of interface cost from high to low is: the cost set by the isis cost command, the global cost set by the circuit-cost command, the cost automatically calculated (auto-cost) and the default cost.
Related commands: isis cost, cost-style.
Examples
# Set the global Level-1 link cost of IS-IS process 1 to 11.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1] circuit-cost 11 level-1
4.1.5 cost-style
Syntax
cost-style { narrow | wide | wide-compatible | { compatible | narrow-compatible } [ relax-spf-limit ] }
undo cost-style
View
IS-IS view
Parameters
narrow: Specifies to receive and send only packets of narrow cost style (The narrow cost ranges from 0 to 63).
wide: Specifies to receive and send only packets of wide cost style (The wide cost ranges from 0 to 16777215).
compatible: Specifies to receive and send both wide and narrow style packets.
narrow-compatible: Specifies to receive both narrow and wide style packets, but send only narrow style packets.
wide-compatible: Specifies to receive both narrow and wide style packets, but send only wide style packets.
relax-spf-limit: Specifies to allow receiving routes with cost bigger than 1023. If this keyword is not configured, any route with cost bigger than 1023 will be discarded. This keyword is only available when keywords compatible and narrow-compatible are included.
Description
Use the cost-style command to set the cost style of packets.
Use the undo cost-style command to restore the default.
Only packets of narrow cost style can be received and sent by default.
Related commands: isis cost.
Examples
# Configure the router to send only packets of narrow cost style, but receive both narrow and wide cost style ones.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1] cost-style narrow-compatible
4.1.6 default-route-advertise
Syntax
default-route-advertise [ route-policy route-policy-name | [ level-1 | level-2 | level-1-2 ] ] *
undo default-route-advertise [ route-policy route-policy-name ]
View
IS-IS view
Parameters
route-policy-name: Specifies the name of a routing policy, a string of 1 to 19 characters.
level-1: Specifies the level of the default route as Level-1.
level-2: Specifies the level of the default route as Level-2.
level-1-2: Specifies the level of the default route as Level-1-2.
& Note:
If no level is specified, a Level-2 default route is generated.
Description
Use the default-route-advertise command to generate a Level-1 or Level-2 default route.
Use the undo default-route-advertise command to disable the function.
This function is disabled by default.
The Level-1 default route is advertised to other routers in the same area, while the Level-2 default route is advertised to all the Level-2 and Level-1-2 routers.
Using the apply isis level-1 command in routing policy view will generate a default route in L1 LSP. Using the apply isis level-2 command in routing policy view will generate a default route in L2 LSP. Using the apply isis level-1-2 command in routing policy view will generate a default route in L1 LSP and L2 LSP respectively.
Examples
# Generate a default route in L2 LSP.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1] default-route-advertise
4.1.7 display isis brief
Syntax
display isis brief [ process-id | vpn-instance vpn-instance-name ]
View
Any view
Parameters
process-id: IS-IS process ID, in the range of 1 to 65535.
vpn-instance vpn-instance-name: Specifies a VPN instance by its name, a string of 1 to 31 characters.
Description
Use the display isis brief command to view brief IS-IS configuration information.
Examples
# Display brief IS-IS configuration information.
<Sysname> display isis brief
ISIS (1) Protocol Brief Information :
network-entity:
10.0000.0000.0001.00
is-level :level-1-2
cost-style: narrow
preference : 15
Lsp-length receive : 1497
Lsp-length originate : level-1 1497
level-2 1497
Timers:
spf-slice-size: 0
lsp-max-age: 1200
lsp-refresh: 900
Interval between SPFs: 10
Table 4-1 Description on the fields of the display isis brief command
Field |
Description |
network-entity |
Network entity name |
is-level |
IS-IS Routing level |
cost-style |
Cost style |
preference |
Preference |
Lsp-length receive |
Maximum LSP that can be received |
Lsp-length originate |
Maximum LSP that can be generated |
Timers |
Timers |
spf-slice-size |
Time of each SPF calculation slice (0 means SPF calculation time is not split.) |
lsp-max-age |
Maximum life period of LSP |
lsp-refresh |
Refresh period of LSP |
Interval between SPFs |
Interval between SPF calculations |
4.1.8 display isis graceful-restart status
Syntax
display isis graceful-restart status [ level-1 | level-2 ] [ process-id | vpn-instance vpn-instance-name ]
View
Any view
Parameters
level-1: Displays the IS-IS Level-1 Graceful Restart state.
level-2: Displays the IS-IS Level-2 Graceful Restart state.
process-id: IS-IS Process ID, in the range 1 to 65535.
vpn-instance vpn-instance-name: Name of a VPN instance, a string of 1 to 31 characters.
Description
Use the display isis graceful-restart status command to display IS-IS Graceful Restart status.
Examples
# Display IS-IS Graceful Restart status.
<Sysname> display isis graceful-restart status
Restart information for ISIS(1)
-------------------------------
IS-IS(1) Level-1 Restart Status
Restart Interval: 300
SA Bit Supported
Total Number of Interfaces = 1
Restart Status: RESTARTING
T3 Timer Status:
Remaining Time: 65535
T2 Timer Status:
Remaining Time: 59
Interface Vlan1
T1 Timer Status:
Remaining Time: 1
RA Not Received
Complete CSNP Not Received
Number of T1 Pre Expiry: 0
IS-IS(1) Level-2 Restart Status
Restart Interval: 300
SA Bit Supported
Total Number of Interfaces = 1
Restart Status: RESTARTING
T3 Timer Status:
Remaining Time: 65535
T2 Timer Status:
Remaining Time: 59
Interface Vlan1
T1 Timer Status:
Remaining Time: 1
RA Not Received
Complete CSNP Not Received
Number of T1 Pre Expiry: 0
Table 4-2 Description on the fields of the display isis graceful-restart status command
Field |
Description |
Restart Interval |
Graceful Restart interval |
SA Bit Supported |
The SA bit is set |
Total Number of Interfaces = 1 |
The current IS-IS interface number |
Restart Status: |
Graceful Restart status |
T3 Timer Status |
Remaining time of T3 timer |
T2 Timer Status: |
Remaining time of T2 Timer |
Interface Vlan1 |
T1 timer of the interface |
T1 Timer Status |
Remaining time of T1 Timer |
RA Not Received |
No response is received from the GR Helper. |
Complete CSNP Not Received |
No complete CSNP packet is received from the GR Helper. |
Number of T1 Pre Expiry |
Number of T1 timer expiries |
4.1.9 display isis interface
Syntax
display isis interface [ verbose ] [ process-id | vpn-instance vpn-instance-name ]
View
Any view
Parameters
verbose: Displays IS-IS interface detail information.
process-id: IS-IS process ID, in the range of 1 to 65535.
vpn-instance-name: VPN instance name, a string of 1 to 31 characters.
Description
Use the display isis interface command to display IS-IS interface information.
The information displayed by this command includes interface name, interface IP address, interface link state and so on. Besides all the information displayed by display isis interface, using the display isis interface verbose command displays other interface related information, such as CSNP packets broadcast intervals, Hello packets broadcast intervals and the number of invalid Hello packets.
Examples
# Display IS-IS enabled interface information.
<Sysname> display isis interface
Interface information for ISIS(1)
---------------------------------
Interface: Vlan-interface1
Id IPV4.State IPV6.State MTU Type DIS
001 Up Down 1497 L1/L2 No/No
# Display detailed IS-IS enabled interface information.
<Sysname> display isis interface verbose
Interface information for ISIS(1)
---------------------------------
Interface: Vlan-interface1
Id IPV4.State IPV6.State MTU Type DIS
001 Up Down 1497 L1/L2 No/No
SNPA Address : 000f-e200-2201
IP Address : 192.168.0.136
Secondary IP Address(es) :
IPV6 Link Local Address :
IPV6 Global Address(es) :
Csnp Timer Value : L1 10 L2 10
Hello Timer Value : L1 10 L2 10
Hello Multiplier Value : L1 3 L2 3
Lsp Timer Value : L12 33
Cost : L1 10 L2 10
Priority : L1 64 L2 64
Retransmit Timer Value : L12 5
Table 4-3 Description on the fields of the display isis interface command
Field |
Description |
Interface |
Interface |
Id |
Circuit ID |
IPV4.State |
IPv4 state |
IPV6.State |
IPv6 state |
MTU |
Interface MTU |
Type |
Interface link type |
DIS |
Designated IS |
SNPA Address |
Subnet access point address |
IP Address |
Primary IP address |
Secondary IP Address(es) |
Secondary IP addresses |
IPV6 Link Local Address |
IPv6 link local address |
IPV6 Global Address(es) |
IPv6 global address |
Csnp Timer Value |
Interval for sending CSNP packets |
Hello Timer Value |
Interval for sending Hello packets |
Hello Multiplier Value |
Number of invalid Hello packets |
Lsp Timer Value |
Interval for sending LSP packets |
Cost |
Cost |
Priority |
Preference |
Retransmit Timer Value |
LSP retransmission interval over point-to-point link |
4.1.10 display isis license
Syntax
display isis license
View
Any view
Parameters
Description
Use the display isis license command to display the information of the IS-IS license.
Examples
# Display the information of the IS-IS license.
<Sysname> display isis license
ISIS Shell License Values
_________________________
Feature Name Active Controllable
ISIS Protocol YES NO
IPV6 NO NO
RESTART YES NO
TE NO NO
MI YES NO
Resource Name MinVal MaxVal CurrVal Controllable
Max Processes Resource 1 4 4 0
Max Paths Resource 1 4 4 0
Max IPv4 Rt Resource 15360 15360 15360 0
Max IPv6 Rt Resource 0 0 0 0
ISIS Core License Values
________________________
Feature Name Active
ISIS Protocol YES
IPV6 NO
RESTART YES
TE NO
MI YES
Resource Name Current Value
Max Processes Resource 4
Max Paths Resource 4
Max IPv4 Rt Resource 15360
Max IPv6 Rt Resource 0
Table 4-4 Description on the fields of the display isis license command
Field |
Description |
ISIS Shell License Values |
License values of ISIS shell |
Feature Name |
Feature name |
Active |
Whether the state is active. |
Controllable |
Whether support reading configuration through License file. |
ISIS Protocol |
IS-IS Protocol |
IPV6 |
Whether IPv6 is active or not. |
RESTART |
Graceful Restart (GR) |
TE |
Traffic Engineering |
MI |
Multi-instance |
Resource Name |
Resource name |
MinVal |
Minimum value |
MaxVal |
Maximum value |
CurrVal |
Current value |
ISIS Core License Values |
License values of ISIS Core |
Max Processes Resource |
Maximum number of processes supported |
Max Paths Resource |
Maximum equal cost paths |
Max IPv4 Rt Resource |
Maximum IPv4 routes supported |
Max IPv6 Rt Resource |
Maximum IPv6 routes supported |
4.1.11 display isis lsdb
Syntax
display isis lsdb [ [ l1 | l2 | level-1 | level-2 ] | [ lsp-id LSPID | lsp-name lspname ] | local | verbose ] * [ process-id | vpn-instance vpn-instance-name ]
View
Any view
Parameters
l1, level-1: Specifies level-1 LSDB.
l2, level-2: Specifies level-2 LSDB.
LSPID: LSP ID, in the form of sysid. Pseudo ID-fragment num.
lspname: LSP name, in the form of Symbolic name.[Pseudo ID]-fragment num.
local: Displays LSP information generated locally.
verbose: Displays LSDB detailed information.
process-id: IS-IS process ID, in the range of 1 to 65535.
vpn-instance-name: Specifies a VPN instance name, a string of 1 to 31 characters.
& Note:
If no level is specified, then both Level-1 and Level-2 (or Level-1-2) link state databases are displayed by default.
Description
Use the display isis lsdb command to display IS-IS link state database.
Examples
# Display Level-1 LSDB information.
<Sysname> dis isis lsdb level-1
Database information for ISIS(1)
--------------------------------
Level-1 Link State Database
LSPID Seq Num Checksum Holdtime Length ATT/P/OL
--------------------------------------------------------------------------
bbbb.cccc.dddd.00-00* 0x0000001d 0x165 820 36 1/0/0
*-Self LSP, +-Self LSP(Extended), ATT-Attached, P-Partition, OL-Overload
Table 4-5 Description on the fields of the display isis lsdb command
Field |
Description |
LSPID |
Link state packet ID |
Seq Num |
LSP sequence number |
Checksum |
LSP checksum |
Holdtime |
LSP holdtime |
Length |
LSP length |
ATT/P/OL |
Attach bit (ATT) Partition bit (P) Overload bit (OL) |
4.1.12 display isis mesh-group
Syntax
display isis mesh-group [ process-id | vpn-instance vpn-instance-name ]
View
Any view
Parameters
process-id: Specifies an IS-IS process ID, in the range of 1 to 65535.
vpn-instance-name: Specifies a VPN instance name, in the range of 1 to 31 characters.
Description
Use the display isis mesh-group command to display IS-IS mesh-group.
Examples
# Configure VLAN-interface 10 and VLAN-interface 20 on a switch to belong to mesh-group 100. (The process to establish VLAN-interface 10 and VLAN-interface 20 is omitted.)
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] isis mesh-group 100
[Sysname-Vlan-interface10] quit
[Sysname] interface vlan-interface 20
[Sysname-Vlan-interface20] isis mesh-group 100
# Display the configuration information of IS-IS mesh-group.
[Sysname-Vlan-interface20] display isis mesh-group
Mesh Group information for ISIS(1)
----------------------------------
Interface Status
Vlan10 100
Vlan20 100
Table 4-6 Description on the fields of the display isis mesh-group command
Field |
Description |
Interface |
Interface name |
Status |
Mesh-group number of the interface |
4.1.13 display isis name-table
Syntax
display isis name-table [ process-id | vpn-instance vpn-instance-name ]
View
Any view
Parameters
process-id: IS-IS process ID, in the range of 1 to 65535.
vpn-instance-name: VPN instance name, in the range of 1 to 31 characters.
Description
Use the display isis name-table command to display the host name-to-system ID mapping table.
Examples
# Configure a name for the local IS-IS system.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1] is-name RUTA
# Configure a static mapping for the remote IS-IS system (0000.0000.0041).
[Sysname-isis-1] is-name map 0000.0000.0041 RUTB
# Display the IS-IS host name-to-system ID mapping table.
[Sysname-isis-1] display isis name-table
Name table information for ISIS(1)
---------------------------------------------------------------
System ID Hostname Type
6789.0000.0001 RUTA DYNAMIC
0000.0000.0041 RUTB STATIC
Table 4-7 Description on the fields of the display isis name-table command
Field |
Description |
System ID |
System ID |
Hostname |
Hostname name of the system ID |
Type |
Mapping type of system ID to host name (static or dynamic) |
4.1.14 display isis peer
Syntax
display isis peer [ verbose ] [ process-id | vpn-instance vpn-instanc-name ]
View
Any view
Parameters
verbose: When this parameter is used, the area address advertised in a neighbor’s Hello packet will be displayed. Otherwise the system displays only the summary information.
process-id: Specifies an IS-IS process ID, in the range of 1 to 65535.
vpn-instance-name: Specifies a VPN instance name, in the range of 1 to 31 characters.
Description
Use the display isis peer command to display IS-IS neighbor information.
Examples
# Display detailed IS-IS neighbor information.
<Sysname> display isis peer verbose
Peer information for ISIS(1)
----------------------------
System Id: 1010.1020.1031
Interface: Vlan-interface1 Circuit Id: 1010.1020.1031.01
State: Up HoldTime: 7s Type: L1(L1L2) PRI: 64
Area Address(es):10.0001
Peer IP Address(es): 192.168.0.156
Uptime: 00:05:45
Adj Protocol: IPV4
System Id: 1010.1020.1031
Interface: Vlan-interface1 Circuit Id: 1010.1020.1031.01
State: Up HoldTime: 7s Type: L2(L1L2) PRI: 64
Area Address(es):10.0001
Peer IP Address(es): 192.168.0.156
Uptime: 00:05:45
Adj Protocol: IPV4
Table 4-8 Description on the fields of the display isis peer command
Field |
Description |
System Id |
System ID |
Interface |
Interface connecting to the neighbor |
Circuit Id |
Circuit ID |
State |
State |
HoldTime |
Holdtime |
Type |
Type of the neighbor |
PRI |
DIS Priority |
Area Address(es) |
The neighbor’s area address |
Peer IP Address(es) |
Interface IP address of the neighbor |
Uptime |
Time being up |
Adj Protocol |
Adjacency protocol |
4.1.15 display isis route
Syntax
display isis route [ ipv4 ] [ [ level-1 | level-2 ] | verbose ] * [ process-id | vpn-instance vpn-instance-name ]
View
Any view
Parameters
ipv4: Displays IS-IS IPv4 routing information (the default).
verbose: Displays IS-IS detailed IPv4 routing information.
process-id: Specifies an IS-IS process ID, in the range of 1 to 65535.
vpn-instance-name: Specifies a VPN instance name, in the range of 1 to 31 characters.
level-1: Displays Level-1 IS-IS routes.
level-2: Displays Level-2 IS-IS routes.
& Note:
If no level is specified, then both Level-1 and Level-2 (Level-1-2) routing information will be displayed.
Description
Use the display isis route command to display IS-IS IPv4 routing information.
Examples
# Display IS-IS IPv4 routing information
<Sysname> display isis route 1
Route information for ISIS(1)
-----------------------------
ISIS(1) IPv4 Level-1 Forwarding Table
-------------------------------------
IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags
--------------------------------------------------------------------------
192.168.0.0/24 10 NULL Vlan1 Direct D/L/-
Flags: D-Direct, R-Added to RM, L-Advertised in LSPs, U-Up/Down Bit Set
ISIS(1) IPv4 Level-2 Forwarding Table
-------------------------------------
IPV4 Destination IntCost ExtCost ExitInterface NextHop Flags
--------------------------------------------------------------------------
192.168.0.0/24 10 NULL Vlan1 Direct D/L/-
Flags: D-Direct, R-Added to RM, L-Advertised in LSPs, U-Up/Down Bit Set
Table 4-9 Description on the fields of the display isis route command
Field |
Description |
IPV4 Destination |
IPv4 destination address |
IntCost |
Interior routing cost |
ExtCost |
Exterior routing cost |
ExitInterface |
Exit interface |
NextHop |
Next hop |
Flags |
Routing state flag D: Direct route. R: The route has been added into the routing table. L: The route has been broadcasted. U: A route’s penetration flag. Setting it to UP can prevent an LSP sent from L2 to L1 from being sent back to L2. |
4.1.16 display isis spf-log
Syntax
display isis spf-log [ process-id | vpn-instance vpn-instance-name ]
View
Any view
Parameters
process-id: Specifies an IS-IS process ID, in the range of 1 to 65535.
vpn-instance-name: Specifies a VPN instance name, a string of 1 to 31 characters.
Description
Use the display isis spf-log command to display IS-IS SPF log record.
Examples
# Display IS-IS SPF log record.
<Sysname> display isis spf-log
SPF Log information for ISIS(1)
-------------------------------
Level Trig.Event No.Nodes Duration StartTime
L2 IS_SPFTRIG_PERIODIC 2 0 13:3:24
L1 IS_SPFTRIG_PERIODIC 2 0 13:18:8
L2 IS_SPFTRIG_PERIODIC 2 0 13:18:8
L1 IS_SPFTRIG_PERIODIC 2 0 13:32:28
L2 IS_SPFTRIG_PERIODIC 2 0 13:32:28
L1 IS_SPFTRIG_PERIODIC 2 0 13:44:0
L2 IS_SPFTRIG_PERIODIC 2 0 13:44:0
L1 IS_SPFTRIG_PERIODIC 2 0 13:55:43
-->L2 IS_SPFTRIG_PERIODIC 2 0 13:55:43
L1 IS_SPFTRIG_PERIODIC 2 0 11:54:12
L2 IS_SPFTRIG_PERIODIC 2 0 11:54:12
L1 IS_SPFTRIG_PERIODIC 2 0 12:7:24
L2 IS_SPFTRIG_PERIODIC 2 0 12:7:24
L1 IS_SPFTRIG_PERIODIC 2 0 12:21:24
L2 IS_SPFTRIG_PERIODIC 2 0 12:21:24
L1 IS_SPFTRIG_PERIODIC 2 0 12:35:24
L2 IS_SPFTRIG_PERIODIC 2 0 12:35:24
L1 IS_SPFTRIG_PERIODIC 2 0 12:49:24
L2 IS_SPFTRIG_PERIODIC 2 0 12:49:24
L1 IS_SPFTRIG_PERIODIC 2 0 13:3:24
Table 4-10 Description on the fields of the display isis spf-log command
Field |
Description |
Level |
SPF calculation level |
Trig.Event |
SPF triggered event |
No.Nodes |
Number of SPF calculation nodes |
Duration |
SPF calculation duration |
StartTime |
SPF calculation start time |
4.1.17 display isis statistics
Syntax
display isis statistics [ level-1 | level-2 | level-1-2 ] [ process-id | vpn-instance vpn-instance-name ]
View
Any view
Parameters
level-1: IS-IS Level-1 statistic information.
level-2: IS-IS Level-2 statistic information.
level-1-2: IS-IS Level-1-2 statistic information.
process-id: Specifies an IS-IS process ID, in the range of 1 to 65535.
vpn-instance-name: Specifies a VPN instance name, a string of 1 to 31 characters.
Description
Use the display isis statistics command to display the statistic information of IS-IS process, including the number of routes learned from other IS-IS routers, the number of routes redistributed from other protocols and the number of LSP generated locally.
Examples
# Display IS-IS statistics.
<Sysname> display isis statistics
Statistics information for ISIS(1)
----------------------------------
Level-1 Statistics
------------------
Learnt routes information:
Total IPv4 Learnt Destinations: 4
Total IPv6 Learnt Destinations: 0
Imported routes information:
IPv4 Imported Routes:
Static: 0 Direct: 0
ISIS: 0 BGP: 0
RIP: 0 OSPF: 0
IPv6 Imported Routes:
Static: 0 Direct: 0
ISISv6: 0 BGP4+: 0
RIPng: 0 OSPFv3: 0
Lsp information:
LSP Source ID: No. of used LSPs
0000.0000.0002 001
Table 4-11 Description on the fields of the display isis statistics command
Field |
Description |
|
Statistics information for ISIS(processid) |
Statistics for the ISIS process |
|
Level-1 Statistics |
Level-1 Statistics |
|
Level-2 Statistics |
Level-2 Statistics |
|
Learnt routes information |
Number of learnt IPv4 routes Number of learnt IPv6 routes |
|
Imported routes information |
IPv4 Imported Routes |
Redistributed IPv4 routes l Static l Direct l ISIS l BGP l RIP l OSPF |
IPv6 Imported Routes |
Redistributed IPv6 routes l Static l Direct l ISISv6 l BGP4+ l RIPng l OSPFv3 |
|
Lsp information |
LSP information l LSP Source ID: ID of the source system l No. of used LSPs: number of used LSPs |
4.1.18 domain-authentication-mode
Syntax
domain-authentication-mode { simple | md5 } password [ ip | osi ]
undo domain-authentication-mode
View
IS-IS view
Parameters
simple: Specifies to send the password in plain text.
md5: Specifies to send the password encrypted with MD5.
password: Specifies a password. For simple authentication mode, the password must be plain text. For md5 authentication mode, the password can be either plain text or cipher text. A plain text password is a string of up to 16 characters, such as user918. A cipher password must be a string of 24 characters, such as _(TT8F]Y\5SQ=^Q`MAF4<1!!.
ip: Specifies to check the IP related fields in a LSP.
osi: Specifies to check the OSI related fields in a LSP.
Whether a password should use ip or osi is not affected by the actual network environment.
Description
Use the domain-authentication-mode command to specify the routing domain authentication mode and a password. The password in the specified mode is inserted into all outgoing Level-2 packets (LSP, CSNP and PSNP) and is used for authenticating the incoming Level-2 packets.
Use the undo domain-authentication-mode command to disable the authentication.
No domain authentication mode is specified by default, that is, the system neither authenticates incoming Level-2 packets nor sets password for outgoing Level-2 packets.
Related commands: area-authentication-mode, isis authentication-mode.
Examples
# Use the simple mode and password 123456 to authenticate Level-2 routing packets.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1] domain-authentication-mode simple 123456
4.1.19 filter-policy export
Syntax
filter-policy { acl-number | ip-prefix ip-prefix-name | route-policy route-policy-name } export [ isis process-id | ospf process-id | rip process-id | bgp | direct | static]
undo filter-policy export [ isis process-id | ospf process-id | rip process-id | bgp | direct | static]
View
IS-IS view
Parameters
acl-number: Specifies the number of an ACL that is used to filter outgoing redistributed routes, ranging from 2000 to 3999.
ip-prefix ip-prefix-name: Specifies the name of an IP prefix list that is used to filter outgoing redistributed routes, a string of 1 to 19 characters.
route-policy route-policy-name: Specifies the name of a routing policy that is used to filter outgoing redistributed routes, a string of 1 to 19 characters.
isis process-id: Filters outgoing routes redistributed from an IS-IS process. The process ID is in the range of 1 to 65535.
ospf process-id: Filters outgoing routes redistributed from an OSPF process. The process ID is in the range of 1 to 65535.
rip process-id: Filters outgoing routes redistributed from a RIP process. The process ID is in the range of 1 to 65535.
bgp: Filters outgoing routes redistributed from BGP.
direct: Filters outgoing redistributed direct routes.
static: Filters outgoing redistributed static routes.
If no parameter is specified, the system will filter all outgoing redistributed routing information.
Description
Use the filter-policy export command to configure IS-IS to filter outgoing redistributed routes.
Use the undo filter-policy export command to disable IS-IS from filtering outgoing redistributed routes.
IS-IS does not filter outgoing redistributed routes by default.
In some cases, only redistributed routing information satisfying certain conditions can be advertised. You can use the filter-policy command to reference filtering conditions.
Related commands: filter-policy import.
Examples
# Reference ACL 2000 to filter outgoing redistributed routes.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1] filter-policy 2000 export
4.1.20 filter-policy import
Syntax
filter-policy { acl-number | ip-prefix ip-prefix-name | route-policy route-policy-name } import
undo filter-policy import
View
IS-IS view
Parameters
acl-number: Specifies the number of an ACL that is used to filter incoming routes, ranging from 2000 to 3999.
ip-prefix ip-prefix-name: Specifies the name of an IP prefix list that is used to filter incoming routes, a string of 1 to 19 characters.
route-policy route-policy-name: Specifies the name of a routing policy that is used to filter incoming routes, a string of 1 to 19 characters.
Description
Use the filter-policy import command to configure IS-IS to filter incoming routing information.
Use the undo filter-policy import command to disable IS-IS from filtering incoming routing information.
IS-IS does not filter incoming routing information by default.
In some cases, only the routing information satisfying certain conditions can be received. You can reference filtering conditions using the filter-policy command.
Related commands: filter-policy export.
Examples
# Reference ACL 2000 to filter incoming routing information.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1] filter-policy 2000 import
4.1.21 flash-flood
Syntax
flash-flood [ flood-count flooding-count | max-timer-interval flooding-interval | [ level-1 | level-2 ] ] *
undo flash-flood [ level-1 | level-2 ]
View
IS-IS view
Parameters
flood-count flooding-count: Specifies the maximum number of LSPs to be sent in the fast-flooding process, ranging from 1 to 15. The default is 5.
max-timer-interval flooding-interval: Specifies the delay interval (in milliseconds) between when it is enabled and when it begins, ranging from 10 to 50000. The default is 10.
level-1: Specifies to configure fast-flooding on level-1 only.
level-2: Specifies to configure fast-flooding on level-2 only. If no level is configured, the fast-flooding will be available on both level-1 and level-2 by default.
Description
Use the flash-flood command to enable IS-IS LSP fast flooding and configure related parameters, including the maximum number of LSPs to be sent and the delay time before flooding.
Use the undo flash-flood command to disable fast-flooding.
Fast flooding is disabled by default.
Using this command can speed up LSP flooding that is triggered by topology changes, so as to reduce LSDB convergence time.
Examples
# Enable fast flooding and configure the maximum LSPs be sent as 10 and the delay time as 100 milliseconds.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1] flash-flood flood-count 10 max-timer-interval 100
4.1.22 graceful-restart
Syntax
graceful-restart
undo graceful-restart
View
IS-IS view
Parameters
None
Description
Use the graceful-restart command to enable IS-IS Graceful Restart capability.
Use the undo graceful-restart command to disable IS-IS Graceful Restart capability.
By default, IS-IS Graceful Restart capability is disabled.
Examples
# Enable the Graceful Restart capability for IS-IS process 1.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] graceful-restart
4.1.23 graceful-restart interval
Syntax
graceful-restart interval interval-value
undo graceful-restart interval
View
IS-IS view
Parameters
interval-value: Graceful Restart interval, in the range 30 to 1800 seconds.
Description
Use the graceful-restart interval command to configure the Graceful Restart interval.
Use the undo graceful-restart interval command to restore the default Graceful Restart interval.
By default, the Graceful Restart interval is 300 seconds.
Examples
# Configure the Graceful Restart interval for IS-IS process 1 as 120 seconds.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] graceful-restart interval 120
4.1.24 graceful-restart suppress-sa
Syntax
graceful-restart suppress-sa
undo graceful-restart suppress-sa
View
IS-IS view
Parameters
None
Description
Use the graceful-restart suppress-sa command to set the SA (Suppress-Advertisement) bit during restart.
Use the undo graceful-restart suppress-sa command to clear the SA bit.
By default, the SA bit is cleared during restart.
Note that:
l For a router that has restarted IS-IS, copies of LSPs generated by this router during the previous incarnation may still exist in the lSP databases of other routers in the network.
l Copies of LSPs in the LSP databases in other routers which may look “newer” than LSPs generated by the restarting router after it initializes LSP fragment sequence numbers. This may result in temporary blackholes until subsequent LSPs with higher sequence numbers are regenerated.
l These blackholes can be avoided if the neighbors suppress advertising the previous adjacencies to the restarting router until the latter has flooded LSPs with higher sequence numbers.
Examples
# Set the SA bit during Graceful Restart.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] graceful-restart suppress-sa
4.1.25 import-route
Syntax
import-route { isis [ process-id ] | ospf [ process-id ] | rip [ process-id ] | bgp [ allow-ibgp ] | direct | static } [ cost cost | cost-type { external | internal } | [ level-1 | level-1-2 | level-2 ] | route-policy route-policy-name | tag tag ] *
undo import-route { isis [ process-id ] | ospf [ process-id ] | rip [ process-id ] | bgp | direct | static }
View
IS-IS view
Parameters
isis [ process-id ]: Redistributes routes from a specified ISIS process. process-id is in the range of 1 to 65535.
ospf [ process-id ]: Redistributes routes from a specified OSPF process. process-id is in the range of 1 to 65535.
rip [ process-id ]: Redistributes routes from a specified RIP process. process-id is in the range of 1 to 65535.
bgp: Redistributes BGP routes.
allow-ibgp: Redistributes IBGP routes.
direct: Redistributes direct routes.
static: Redistributes static routes.
cost: Specifies a cost for redistributed routes.
The range of the cost depends on it type:
l For the types of narrow, narrow-compatible and compatible, the cost ranges from 0 to 63.
l For the types of wide, wide-compatible, the cost ranges from 0 to 16777215.
cost-type { external | internal }: Specifies a cost type. The internal type indicates the cost of routes within an area; the external type indicates the cost of routes between areas. The type is external by default. The keywords are valid only when the cost type is narrow, narrow-compatible or compatible.
level-1: Redistributes routes into the Level-1 routing table.
level-2: Redistributes routes into the Level-2 routing table. If no level is specified, the routes are redistributed into the Level-2 routing table by default.
level-1-2: Redistributes routes into both Level-1 and Level-2 routing tables.
route-policy route-policy-name: Redistributes only routes satisfying the matching conditions of a routing policy, the name of which is a string of 1 to 19 characters.
tag tag: Specifies a tag value for redistributed routes from 1 to 4294967295.
Description
Use the import-route command to redistribute routes from other protocols.
Use the undo import-route command to disable route redistribution.
Route redistribution is not available by default.
IS-IS takes all the redistributed routes as external routes to destinations outside the IS-IS routing domain.
Related commands: import-route isis level-2 into level-1.
& Note:
Using the import-route bgp command redistributes only EBGP routes. Using the import-route bgp allow-ibgp command redistributes also IBGP routes, but this may cause routing loops. Be cautious with this command.
Examples
# Redistribute static routes and set the cost to 15.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1] import-route static cost 15
4.1.26 import-route isis level-2 into level-1
Syntax
import-route isis level-2 into level-1 [ filter-policy { acl-number | ip-prefix ip-prefix-name | route-policy route-policy-name } | tag tag ] *
undo import-route isis level-2 into level-1
View
IS-IS view
Parameters
acl-number: Specifies the number of an ACL that is used to filter redistributed routes, ranging from 2000 to 3999.
ip-prefix ip-prefix-name: Specifies the name of an IP prefix list that is used to filter redistributed routes, a string of 1 to 19 characters.
route-policy route-policy-name: Specifies the name of a routing policy that is used to filter redistributed routes, a string of 1 to 19 characters.
tag tag: Specifies a tag value from 1 to 4294967295 for redistributed routes.
Description
Use the import-route isis level-2 into level-1 command to redistribute routes from Level-2 to Level-1area.
Use the undo import-route isis level-2 into level-1 command to disable this redistribution.
The redistribution is not available by default.
Note that:
l You can specify a routing policy in the import-route isis level-2 into level-1 command to filter routes from Level-2 to Level-1. Other routing policies specified for route reception and redistribution does not affect the route leaking.
l If a filter policy is configured, only routes passing it can be advertised into the Level-1 area.
Related commands: import-route.
Examples
# Configure the router to redistribute routes from Level-2 to Level-1.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1] import-route isis level-2 into level-1
4.1.27 isis
Syntax
isis [ process-id ] [ vpn-instance vpn-instance-name ]
undo isis [ process-id ]
View
System view
Parameters
process-id: Process ID, ranging from 1 to 65535. The default is 1.
vpn-instance-name: VPN instance name, a string of 1 to 31 characters.
Description
Use the isis command to enable an IS-IS process and an associated VPN instance and enter IS-IS view.
To run IS-IS, you must first use the isis command to enable an IS-IS process, then use the network-entity command to configure a Network Entity Title (NET) for the router, and then use the isis enable command to enable IS-IS on each interface that needs to run the IS-IS process.
Related commands: isis enable, network-entity.
Examples
# Enable IS-IS routing process 1, with the system ID being 0000.0000.0002, and area ID being 01.0001.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1] network-entity 01.0001.0000.0000.0002.00
4.1.28 isis authentication-mode
Syntax
isis authentication-mode { simple | md5 } password [ level-1 | level-2 ] [ ip | osi ]
undo isis authentication-mode [ level-1 | level-2 ]
View
Interface view
Parameters
simple: Specifies to send the password in plain text.
md5: Specifies to send the password in ciphertext.
password: Specifies a password. For simple authentication mode, the password must be plain text. For md5 authentication mode, the password can be either plain text or ciphertext. A plain text password can be a string of up to 16 characters, such as user918. A cipher password must be a string of 24 characters, such as _(TT8F]Y\5SQ=^Q`MAF4<1!!.
level-1: Specifies to set the password for Level-1.
level-2: Specifies to set the password for Level-2.
ip: Specifies the system to check IP related fields in a LSP.
osi: Specifies the system to check OSI related fields in a LSP.
Whether a password should use ip or osi is not affected by the actual network environment.
& Note:
This command is not available in loopback interface view.
Description
Use the isis authentication-mode command to set the IS-IS authentication mode and password for an interface.
Use the undo isis authentication-mode command to disable the authentication and remove the password.
There is no password or authentication by default.
If you set a password without specifying any other parameter, the password applies to both Level-1 and Level-2, and the system checks the OSI related fields in a LSP.
Related commands: area-authentication-mode, domain authentication-mode.
& Note:
The level-1 and level-2 keywords are available only the VLAN interfaces of switches after IS-IS is enabled on the interface using the isis enable command.
Examples
# Set the plain text password tangshi for the VLAN-interface 10.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] isis authentication-mode simple tangshi level-1
4.1.29 isis circuit-level
Syntax
isis circuit-level [ level-1 | level-1-2 | level-2 ]
undo isis circuit-level
View
Interface view
Parameters
level-1: Specifies to set up only level-1 adjacency on the interface.
level-1-2: Specifies to set up level-1-2 adjacency on the interface.
level-2: Specifies to set up only level-2 adjacency on the interface.
Description
Use the isis circuit-level command to configure link adjacency level for an interface of a level-1-2 router.
Use the undo isis circuit-level command to restore the default.
An interface can establish level-1-2 adjacency by default.
This command is only available on a level-1-2 router. You can use it to configure an interface to establish the adjacency of a specified level (level-1 or level-2) with the neighbor, making the interface handle only the specified level hello packets. An interface can receive and send only one level hello packet on a point-to-point link. Using this command can reduce the router’s processing time and save bandwidth.
Related commands: is-level.
Examples
# Suppose VLAN-interface 10 is connected to a non backbone router in the same area. Configure the link adjacency level of VLAN-interface 10 as Level-1 to prevent sending and receiving Level-2 Hello packets.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] isis enable
[Sysname-Vlan-interface10] isis circuit-level level-1
4.1.30 isis circuit-type
Syntax
isis circuit-type p2p
undo isis circuit-type
View
Interface view
Parameters
p2p: Specifies the interface’s network type as P2P.
Description
Use the isis circuit-type command to configure the network type for an interface.
Use the undo isis circuit-type command to restore the default.
By default, the network type of a switch’s VLAN interface is broadcast.
& Note:
This command is not available in the loopback interface view.
Examples
# Configure the network type of VLAN-interface 10 as P2P.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] isis enable
[Sysname-Vlan-interface10] isis circuit-type p2p
4.1.31 isis cost
Syntax
isis cost value [ level-1 | level-2 ]
undo isis cost [ level-1 | level-2 ]
View
Interface view
Parameters
value: Specifies a cost for SPF calculation on a specified level. The default is 10. The range of cost value differs according to different cost types.
l For types narrow, narrow-compatible and compatible: The cost value ranges from 1 to 63.
l For types wide and wide-compatible: The cost value ranges from 1 to 16777215.
level-1: Applies the cost to Level-1.
level-2: Applies the cost to Level-2.
Description
Use the isis cost command to set the link cost of an interface for SPF calculation.
Use the undo isis cost command to restore the default.
No cost is configured by default.
If neither level-1 nor level-2 is included, the cost applies to both level-1 and level-2.
You are recommended to configure a proper link cost for each interface for optimal route selection.
Relate command: circuit-cost.
Examples
# Configure the Level-2 link cost as 5 for VLAN-interface 10.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] isis cost 5 level-2
4.1.32 isis dis-name
Syntax
isis dis-name symbolic-name
undo isis dis-name
View
Interface view
Parameters
symbolic-name: Specifies a name for the local LAN, a string of 1 to 64 characters.
Description
Use the isis dis-name command to configure a name for local LAN. If the local router is the DIS, the name will be advertised in a pseudonode LSP packet.
Use the undo isis dis-name command to disable this function.
No name is configured by default.
Note that this command takes effect only on a router with the dynamic hostname process enabled. This command is not supported on a Point-to-Point interface.
& Note:
This command is not available in the loopback interface view.
Examples
# Configure the name as LOCALAREA for the local LAN.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] isis dis-name LOCALAREA
4.1.33 isis dis-priority
Syntax
isis dis-priority value [ level-1 | level-2 ]
undo isis dis-priority [ level-1 | level-2 ]
View
Interface view
Parameters
value: Specifies a priority for DIS selection, ranging from 0 to 127.
level-1: Applies the DIS selection priority to Level-1.
level-2: Applies the DIS selection priority to level-2.
If neither level-1 nor level-2 is specified in this command, the DIS priority applies to both Level-1 and Level-2.
Description
Use the isis dis-priority command to specify a DIS selection priority on a specified level for an interface.
Use the undo isis dis-priority command to restore the default priority of 64.
There is no backup DIS in IS-IS and the router with the 0 priority can also participate in DIS selection.
& Note:
This command is not available in the loopback interface view.
Examples
# Configure the level-2 DIS priority as 127 for VLAN-interface 10.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] isis dis-priority 127 level-2
4.1.34 isis enable
Syntax
isis enable [ process-id ]
undo isis enable
View
Interface view
Parameters
process-id: Specifies a IS-IS process ID, ranging from 1 to 65535. The default is 1.
Description
Use the isis enable command to enable an IS-IS routing process on the interface.
Use the undo isis enable command to disable this configuration.
No IS-IS routing process is enabled on an interface by default.
To run IS-IS, you need to use the isis command to enable an IS-IS process, and use the network-entity command to configure a network entity title (NET) for the router, and then use the isis enable command to enable IS-IS on each interface that needs to run the IS-IS process.
Related commands: isis, network-entity.
Examples
# Create IS-IS routing process 1, and enable the IS-IS routing process on VLAN-interface 10.
<Sysname> system-view
[Sysname] isis 1
[Sysname-isis-1] network-entity 10.0001.1010.1020.1030.00
[Sysname-isis-1] quit
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] isis enable 1
4.1.35 isis mesh-group
Syntax
isis mesh-group { mesh-group-number | mesh-blocked }
undo isis mesh-group
View
Interface view
Parameters
mesh-group-number: Specifies a mesh group number, ranging from 1 to 4294967295.
mesh-blocked: Blocks the interface from flooding LSPs to make it send LSPs only after receiving requests.
Description
Use the isis mesh-group command to add the interface into a specified mesh group.
Use the undo isis mesh-group command to delete the interface from a mesh group.
An interface is not in any mesh group by default.
For an interface not in a mesh group, it follows the normal process to flood the received LSPs to other interfaces. For the NBMA network with high connectivity and multiple point-to-point links, this will cause repeated LSP flooding and bandwidth waste.
After an interface is added to a mesh group, it will only flood a received LSP to interfaces not belonging to the same mesh group.
When you add an interface to a mesh group or block the interface, make sure to retain some redundancy so that a link failure will not affect the normal LSP packet flooding.
& Note:
l A mesh-group is only available for a point-to-point link interface.
l This command is not available in loopback interface view.
Examples
# Add VLAN-interface10 to the mesh-group 3.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] isis mesh-group 3
4.1.36 isis silent
Syntax
isis silent
undo isis silent
View
Interface view
Parameters
None
Description
Use the isis silent command to disable the interface from sending and receiving IS-IS hello packets.
Use the undo isis silent command to restore the default.
By default, an interface is not disabled from sending and receiving hello packets.
& Note:
The feature is not supported on the loopback interface.
Examples
# Disable VLAN-interface 10 from neither sending nor receiving hello packets.
<Sysname> system-view
[Sysname] interface vlan-interface10
[Sysname-Vlan-interface10] isis silent
4.1.37 isis small-hello
Syntax
isis small-hello
undo isis small-hello
View
Interface view
Parameters
None
Description
Use the isis small-hello command to configure the interface to send small Hello packets without padding field.
Use the undo isis small-hello command to disable the feature.
An interface sends standard Hello packets by default.
& Note:
This command is not available in loopback interface view.
Examples
# Configure VLAN-interface 10 to send small Hello packets.
<Sysname> system-view
[Sysname] interface vlan-interface10
[Sysname-Vlan-interface10] isis small-hello
4.1.38 isis timer csnp
Syntax
isis timer csnp seconds [ level-1 | level-2 ]
undo isis timer csnp [ level-1 | level-2 ]
View
Interface view
Parameters
seconds: Specifies the interval in seconds for sending CSNP packets over broadcast network, ranging from 1 to 600.
level-1: Applies the interval to Level-1.
level-2: Applies the interval to Level-2.
Description
Use the isis timer csnp command to specify the interval for sending CSNP packets over broadcast network.
Use the undo isis timer csnp command to restore the default.
The default CSNP interval is 10 seconds.
& Note:
l If no level is specified, the CSNP interval applies to both Level-1 and Level-2 of the current ISIS process. If a level is specified, the interval applies to the level.
l This command is not supported on the loopback interface.
l This command only applies to the DIS router, which sends CSNP packets periodically.
Examples
# Configure Level-2 CSNP packets to be sent every 15 seconds over VLAN-interface 10.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] isis timer csnp 15 level-2
4.1.39 isis timer hello
Syntax
isis timer hello seconds [ level-1 | level-2 ]
undo isis timer hello [ level-1 | level-2 ]
View
Interface view
Parameters
seconds: Specifies the interval in seconds for sending Hello packets, ranging from 3 to 255.
level-1: Specifies the interval for sending Level-1 Hello packets.
level-2: Specifies the time interval for sending Level-2 Hello packets.
Description
Use the isis timer hello command to specify the interval for sending hello packets.
Use the undo isis timer hello command to restore the default.
The default hello interval is 10 seconds.
& Note:
l If no level is specified, the hello interval applies to both Level-1 and Level-2 of the current ISIS process. If a level is specified, the interval applies to the level.
l This command is not supported on the loopback interface.
l The broadcast link distinguishes between Level-1 and Level-2 packets, so you need specify intervals for the two levels respectively. The point-to-point link however does not distinguish, so you need not specify intervals respectively.
l As the shorter the interval is, the more system resources will be occupied, you should configure a proper interval as needed.
Related commands: isis timer holding-multiplier.
Examples
# Configure Level-2 Hello packets to be sent every 20 seconds over VLAN-interface 10.
<Sysname> system-view
[Sysname] interface Vlan-interface 10
[Sysname-Vlan-interface10] isis timer hello 20 level-2
4.1.40 isis timer holding-multiplier
Syntax
isis timer holding-multiplier value [ level-1 | level-2 ]
undo isis timer holding-multiplier [ level-1 | level-2 ]
View
Interface view
Parameters
value: Number of hello intervals, in the range of 3 to 1000.
level-1: Applies the number to the Level-1 IS-IS neighbor.
level-2: Applies the number to the Level-2 IS-IS neighbor.
& Note:
l If neither level-1 nor level-2 is specified in the command, the number applies to the current level IS-IS process.
l This command is not available in loopback interface view.
Description
Use the isis timer holding-multiplier command to configure the number of hello intervals, within which if the interface receive no hello packets, its neighbor is considered dead.
Use the undo isis timer holding-multiplier command to restore the default.
On an interface, the default number of hello intervals is three.
You can specify the number of hello intervals for Level-1 and Level-2 neighbors respectively on a broadcast network. For a point-to-point link, there is only one kind of Hello packet, so you need not specify Level-1 or Level-2.
The specified number of hello intervals is used to configure the Holddown time. If a router receives no Hello packets from a neighbor within Holddown time, it will take the neighbor as dead. The Holddown time can be configured differently for different routers within an area. You can adjust the Holddown time by changing either the hello interval or the number of Hello intervals on an interface.
Related commands: isis timer hello.
Examples
# Configure the number of Level-2 Hello intervals as 5 for interface VLAN-interface, that is, if no Hello packet is received from the interface within 5 hello intervals, the IS-IS neighbor is considered dead.
<Sysname> system-view
[Sysname] interface Vlan-interface 10
[Sysname-Vlan-interface10] isis timer holding-multiplier 5
4.1.41 isis timer lsp
Syntax
isis timer lsp time [ count count ]
undo isis timer lsp
View
Interface view
Parameters
time: Specifies the minimum interval in milliseconds for sending link-state packets, ranging from 1 to 1000.
count: Specifies the maximum number of link-state packets to be sent at one time, in the range of 1 to 1000. The default is 100 for the broadcast interface and 11 for point-to-point interface.
Description
Use the isis timer lsp command to configure the interval for sending link-state packets on the interface.
Use the undo isis timer lsp command to restore the default of 33 ms.
Related commands: isis timer retransmit.
& Note:
This command is not available in loopback interface view.
Examples
# Configure the interval as 500 milliseconds for sending LSPs on interface VLAN-interface 10.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] isis timer lsp 500
4.1.42 isis timer retransmit
Syntax
isis timer retransmit seconds
undo isis timer retransmit
View
Interface view
Parameters
seconds: Specifies the interval in seconds for retransmitting LSP packets, ranging from 1 to 300.
Description
Use the isis timer retransmit command to configure the interval for retransmitting LSP packets over point-to-point link.
Use the undo isis timer retransmit command to restore the default of 5s.
You need not use this command over a broadcast link where no LSP response is required.
Related commands: isis timer lsp.
& Note:
l This command is not available in loopback interface view.
l Configure a proper time to avoid unnecessary retransmissions.
Examples
# Configure the LSP retransmission interval as 10 seconds for VLAN-interface 10.
<Sysname> system-view
[Sysname] interface vlan-interface 10
[Sysname-Vlan-interface10] isis timer retransmit 10
4.1.43 is-level
Syntax
is-level { level-1 | level-1-2 | level-2 }
undo is-level
View
IS-IS view
Parameters
level-1: Configures the router to work on Level-1, which means it only calculates routes within the area, and maintains the L1 LSDB.
level-1-2: Configures the router to work on Level-1-2, which means it calculates routes and maintains the LSDBs for both L1 and L2.
level-2: Configures the router to work on Level-2, which means it calculates routes and maintains the LSDB for L2 only.
Description
Use the is-level command to configure IS-IS router type.
Use the undo is-level command to restore the default.
The default router type is level-1-2.
It is recommended to configure system level when you configure IS-IS.
Related commands: isis circuit-level.
Examples
# Configure the router to work in Level-1.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1] is-level level-1
4.1.44 is-name
Syntax
is-name sys-name
undo is-name
View
IS-IS view
Parameters
symbolic-name: Specifies a name for the local IS, a string of 1 to 64 characters.
Description
Use the is-name command to enable the dynamic hostname process and configure a name for the router.
Use the undo is-name command to remove the configuration.
No IS name is configured by default.
Examples
# Configure a name for the local IS.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1] is-name RUTA
4.1.45 is-name map
Syntax
is-name map sys-id map-sys-name
undo is-name map sys-id
View
IS-IS view
Parameters
sys-id: System ID or a pseudonode ID of a remote IS.
map-sys-name: Specifies a name for the remote IS, a string of 1 to 64 characters.
Description
Use the is-name map command to map a name to a remote IS. Each remote IS system ID corresponds to only one name.
Use the undo is-name map command to remove the configuration.
By default, no name is configured for a remote IS.
Examples
# Map the name RUTB to the remote IS 0000.0000.0041.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1] is-name map 0000.0000.0041 RUTB
4.1.46 is-snmp-traps enable
Syntax
is-snmp-traps enable
undo is-snmp-traps
View
IS-IS view
Parameters
None
Description
Use the is-snmp-traps enable command to enable the SNMP Trap function of IS-IS.
Use the undo is-snmp-traps command to disable this function.
SNMP Trap is enabled by default.
Examples
# Enable SNMP Trap.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1] is-snmp-traps enable
4.1.47 log-peer-change
Syntax
log-peer-change
undo log-peer-change
View
IS-IS view
Parameters
None
Description
Use the log-peer-change command to enable logging on IS-IS adjacency state changes.
Use the undo log-peer-change command to disable the logging.
The feature is enabled by default.
After the feature is enabled, information about IS-IS adjacency state changes is sent to the configuration terminal.
Examples
# Enable logging on the IS-IS adjacency state changes.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1] log-peer-change
4.1.48 lsp-fragments-extend
Syntax
lsp-fragments-extend [ [ level-1 | level-2 | level-1-2 ] | [ mode-1 | mode-2 ] ] *
undo lsp-fragments-extend
View
IS-IS view
Parameters
mode-1: Fragment extension mode 1, used on a network where some routers do not support LSP fragment extension.
mode-2: Fragment extension mode 2, used on a network where all routers support LSP fragment extension.
level-1: Applies the fragment extension mode to Level-1 LSPs.
level-2: Applies the fragment extension mode to Level-2 LSPs.
level-1-2: Applies the fragment extension mode to both Level-1 and Level-2 LSPs.
& Note:
The mode-1 and level-1-2 keywords are used by default.
Description
Use the lsp-fragments–extend command to enable LSP fragment extension in a specified mode and level.
Use the undo lsp-fragments–extend command to disable this feature.
The feature is disabled by default.
Note the following:
l After LSP fragment extension is enabled in an IS-IS process, the MTUs of all the interfaces on which this IS-IS process is enabled must not be less than 512; otherwise, LSP fragment extension will not take effect.
l At least one virtual system needs to be configured for the router to generate extended LSP fragments. An IS-IS process allows 50 virtual systems at most.
Examples
# Enable LSP fragment extension of mode-1 and Level-2.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1] lsp-fragments-extend mode-1 level-2
4.1.49 lsp-length originate
Syntax
lsp-length originate size [ level-1 | level-2 ]
undo lsp-length originate [ level-1 | level-2 ]
View
IS-IS view
Parameters
size: Specifies the maximum size in bytes of a LSP packet, ranging from 512 to 16384.
level-1: Applies the size to Level-1 LSP packets.
level-2: Applies the size to Level-2 LSP packets.
& Note:
If neither Level-1 nor Level-2 is specified in the command, the configured maximum size applies to the current IS-IS level.
Description
Use the lsp-length originate command to configure the maximum size of generated Level-1 or Level-2 LSPs.
Use the undo lsp-length originate command to restore the default.
The maximum size of 1497 bytes is the default.
Examples
# Configure the maximum size of the generated Level-2 LSPs as 1024 bytes.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1] lsp-length originate 1024 level-2
4.1.50 lsp-length receive
Syntax
lsp-length receive size
undo lsp-length receive
View
IS-IS view
Parameters
size: Maximum size of received LSPs, in the range of 512 to 16384 bytes.
Description
Use the lsp-length receive command to configure the maximum size of received LSPs.
Use the undo lsp-length receive command to restore the default.
By default, the maximum size of received LSPs is 1497 bytes.
Examples
# Configure the maximum size of received LSPs.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1] lsp-length receive 1024
4.1.51 maximum load-balancing
Syntax
maximum load-balancing number
undo maximum load-balancing
View
IS-IS view
Parameters
number: Maximum number of equal-cost load balanced routes, in the range 1 to 4.
Description
Use the maximum load-balancing command to configure the maximum number of equal-cost load balanced routes.
Use the undo maximum load-balancing command to restore the default.
By default, the maximum number of equal-cost load balanced routes is 4.
Examples
# Configure the maximum number of equal-cost load-balanced routes as 2.
<Sysname> system-view
[Sysname] isis 100
[Sysname-isis-100] maximum load-balancing 2
4.1.52 network-entity
Syntax
network-entity net
undo network-entity net
View
IS-IS view
Parameters
Description
Use the network-entity command to configure the Network Entity Title for an IS-IS routing process.
Use the undo network-entity command to delete a NET.
No NET is configured by default.
A NET is a network service access point (NSAP), and it is in the range of 8 to 20 bytes for IS-IS.
A NET has three parts: The first part is area ID, which ranges from 1 to 13 bytes. Routers in the same area must have the same area ID. The second part is the router’s 6-byte system ID, which is unique within the whole area and backbone area. The third part is the 1-byte SEL that must be 00. Generally, a router needs one NET. In the case of repartitioning an area, such as merging or splitting, you can configure multiple NETs beforehand for the router to ensure correct and continuous routing.
Related commands: isis, isis enable.
Examples
# Specify the NET as 10.0001.1010.1020.1030.00, of which 10.0001 is the area ID and 1010.1020.1030 is the system ID.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1] network-entity 10.0001.1010.1020.1030.00
4.1.53 preference
Syntax
preference { route-policy route-policy-name | preference } *
undo preference
View
IS-IS view
Parameters
preference: Specifies the preference for IS-IS protocol, ranging from 1 to 255.
route-policy-name: Routing policy name, a string of 1 to 19 characters. The preference applies to routes passing the routing policy.
Description
Use the preference command to configure the preference for IS-IS protocol.
Use the undo preference command to restore the default.
By default, the IS-IS protocol preference is 15.
If a routing policy is specified in this command, the preference (if any) set by the routing policy applies to those matched routes. Other routes use the preference set by the preference command.
When a router runs multiple routing protocols at the same time, the system will set a preference to each routing protocol. If several protocols find routes to the same destination, the route of the routing protocol with the highest preference is selected.
Examples
# Configure the preference of IS-IS protocol as 25.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1] preference 25
4.1.54 reset isis all
Syntax
reset isis all [ process-id | vpn-instance vpn-instance-name ]
View
User view
Parameters
process-id: Clears the data structure information of an IS-IS process numbered from 1 to 65535.
vpn-instance-name: Clears the data structure information of a VPN instance named with a string of 1 to 31 characters.
Description
Use the reset isis all command to clear all ISIS data structure information.
No data structure information is cleared by default.
Related commands: area-authentication-mode, domain authentication-mode.
Examples
# Clear all IS-IS data structure information.
<Sysname> reset isis all
4.1.55 reset isis peer
Syntax
reset isis peer system-id [ process-id | vpn-instance vpn-instance-name ]
View
User view
Parameters
system-id: Specifies the system ID of an IS-IS neighbor.
process-id: Specifies the ID of an IS-IS process, in the range of 1 to 65535.
vpn-instance-name: Specifies a VPN instance name, a string of 1 to 31 characters.
Description
Use the reset isis peer command to clear the data structure information of a specified IS-IS neighbor.
The command is disabled by default.
This command is used when you need to re-establish an IS-IS neighbor.
Examples
# Clear the data structure information of the neighbor with system ID being 0000.0c11.1111.
<Sysname> reset isis peer 0000.0c11.1111
4.1.56 set-overload
Syntax
set-overload [ on-startup start-from-nbr system-id [ timeout [ nbr-timeout ] ] ] [ allow { interlevel | external } * ]
undo set-overload
View
IS-IS view
Parameters
on-startup: Specifies to start the overload tag timeout timer upon system startup.
start-from-nbr system-id: Specifies to start the overload tag timeout timer when the router begins to establish the connection with a neighbor.
timeout: Specifies the overload tag timeout timer, with an interval from 5 to 86400 seconds. The timer is started after system startup. The default is 600 seconds.
nbr-timeout: Specifies the overload tag timeout timer that is started when the router begins to establish the connection with a neighbor after system startup. The time has an interval from 5 to 86400 seconds. The default is 1200 seconds.
allow: Specifies to allow advertising address prefixes. By default, no address prefixes are allowed to be advertised when the system is in overload state.
interlevel: Allows advertising IP address prefixes learnt from different IS-IS levels with the allow keyword specified.
external: Allows advertising IP address prefixes learnt from other routing protocols with the allow keyword specified.
Description
Use the set-overload command to set the overload tag for the current router.
Use the undo set-overload command to clear the overload tag.
No overload flag is set by default.
When a router is set overload tag, other routers will not send packets to the router for forwarding.
Examples
# Set overload flag on the current router.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1] set-overload
4.1.57 spf-slice-size
Syntax
spf-slice-size duration-time
undo spf-slice-size
View
IS-IS view
Parameters
duration-time: Specifies the duration in milliseconds of each sliced SPF calculation, ranging from 10 to 50000. Each sliced SPF calculation is ended when the duration time is reached. If the duration-time is set to 0, the entire SPF calculation will not be sliced.
Description
Use the spf-slice-size command to specify the duration for each sliced SPF calculation.
Use the undo spf-slice-size command to restore the default.
By default, the duration of each sliced SPF calculation is 10 milliseconds.
To prevent the SPF calculation from occupying the system resources for a long time, you can use this command to slice the whole SPF calculation into pieces.
You are not recommended to change the default setting.
Examples
# Set the duration of each sliced SPF calculation to 1 second.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1] spf-slice-size 1000
4.1.58 summary
Syntax
summary ip-address { mask | mask-length } [ avoid-feedback | generate_null0_route | tag tag | [ level-1 | level-1-2 | level-2 ] ] *
undo summary ip-address { mask | mask-length } [ level-1 | level-1-2 | level-2 ]
View
IS-IS view
Parameters
ip-address: Destination IP address of a summary route.
mask: Mask of the destination IP address, in dotted decimal format.
mask-length: Mask length, in the range of 0 to 32.
avoid-feedback: Specifies to avoid learning aggregate routes by routing calculation.
generate_null0_route: Specifies to generate the Null 0 route to avoid routing loops.
tag tag: Specifies a management tag, in the range of 1 to 4294967295.
level-1: Specifies to summarize only the routes redistributed to Level-1 area.
level-1-2: Specifies to summarize all the routes redistributed to the Level-1 and Level-2 areas.
level-2: Specifies to summarize only the routes redistributed to the Level-2 area.
Description
Use the summary command to configure a summary route.
Use the undo summary command to remove a summary route.
No summarization is configured by default.
If no level is specified, only the level-2 routes will be summarized by default.
You can summarize multiple contiguous networks with a summary network to reduce the size of the routing table, as well as that of LSP and LSDB generated by the router. It is allowed to summarize native IS-IS routes and redistributed routes. After summarization, the cost of the summary route is the smallest cost of those summarized routes.
Note that the router summarizes only routes in local LSPs.
Examples
# Configure a summary route of 202.0.0.0/8.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1] summary 202.0.0.0 255.0.0.0
4.1.59 timer isp-generation
Syntax
timer lsp-generation maximum-interval [ initial-interval [ incremental-interval ] ] [ level-1 | level-2 ]
undo timer lsp-generation [ level-1 | level-2 ]
View
IS-IS view
Parameters
maximum-interval: Maximum interval in seconds for generating ISIS LSPs, in the range 1 to 120.
initial-interval: Initial interval in milliseconds for generating ISIS LSPs, in the range 10 to 60000. The default is 0.
incremental-interval: Incremental interval (in milliseconds), in the range 10 to 60000. The default is 0.
level-1: Applies the specified intervals to generating level-1 LSPs.
level-2: Applies the specified intervals to generating level-1 LSPs.
Description
Use the timer lsp-generation command to specify intervals for ISIS LSP generation.
Use the undo timer isp-generation command to restore the default.
By default, the LSP generation interval is 2 seconds.
& Note:
l If only the maximum interval is specified, this maximum interval is the LSP generation interval.
l If both the maximum and initial intervals are specified, the system can adjust the LSP generation interval upon topology changes. When the topology is stable, the initial interval applies as the LSP generation interval. When topology changes become frequent, the LSP generation interval is the maximum or initial interval.
l If all the maximum, initial and incremental intervals are specified, the system will adjust the LSP generation interval upon topology changes in this way: when the network changes are infrequent, the initial interval applies as the LSP generation interval. When the network changes become frequent, the generation interval changes between the initial and maximum intervals based on the specified incremental interval.
By using this command to adjust the LSP generation interval, you can save the bandwidth and router resources that may be wasted due to frequent network changes.
Examples
# Set the maximum LSP generation interval to 10 seconds, initial interval to 100 milliseconds and the incremental interval to 200 milliseconds.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1]timer lsp-generation 10 100 200
# Set the maximum LSP generation interval to 15 seconds.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1]timer lsp-generation 15
4.1.60 timer lsp-max-age
Syntax
timer lsp-max-age seconds
undo timer lsp-max-age
View
IS-IS view
Parameters
seconds: Specifies the LSP maximum aging time in seconds, ranging from 1 to 65535.
Description
Use the timer lsp-max-age command to set the LSP maximum aging time for the current router.
Use the undo timer lsp-max-age command to restore the default.
The default is 1200 seconds.
A router puts the specified LSP maximum aging time into an LSP before advertisement. When the LSP is received by other routers, the aging time will decrease as the time goes by. If no update is received for the LSP after its aging time decreases to 0, the LSP will be deleted from the LSDB.
Related commands: timer lsp-refresh.
Examples
# Set the maximum LSP aging time to 1500 seconds.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1] timer lsp-max-age 1500
4.1.61 timer lsp-refresh
Syntax
timer lsp-refresh seconds
undo timer lsp-refresh
View
IS-IS view
Parameters
seconds: Specifies the LSP refresh interval in seconds, ranging from 1 to 65534.
Description
Use the timer lsp-refresh command to set the LSP refresh interval.
Use the undo timer lsp-refresh to restore the default.
The default is 900 seconds.
Using this feature, you can keep LSPs in synchronization for the whole area.
Related commands: timer lsp-max-age.
& Note:
To refresh LSPs before they are aged out, the interval set by the timer lsp-refresh command must be smaller than that set by the timer lsp-max-age command.
Examples
# Set the LSP refresh interval to 1500 seconds.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1] timer lsp-refresh 1500
4.1.62 timer spf
Syntax
timer spf maximum-interval [ minimum-interval [ incremental-interval ] ]
undo timer spf
View
IS-IS view
Parameters
maximum-interval: Specifies the maximum interval (in seconds) for SPF calculations, ranging from 1 to 120.
minimum-interval: Specifies the minimum interval (in milliseconds) for SPF calculations, ranging from 10 to 60000.
incremental-interval: Specifies the incremental interval (in milliseconds) for SPF calculations, ranging from 10 to 60000.
Description
Use the timer spf command to set the time intervals for ISIS routing calculation.
Use the undo timer spf command to restore the default.
The default IS-IS SPF calculation interval is 10 seconds.
When the network changes are infrequent, the SPF calculation interval decreases to the minimum interval. When the network changes become frequent, the calculation interval is increased by inc-interval*(2n-2), (n is the number of network changes that triggered SPF calculations) until the maximum interval is reached.
With this feature, you can prevent the router from over consumption due to frequent network changes.
Examples
# Set the maximum SPF calculation interval to 10 seconds, minimum interval to 100 milliseconds and the incremental interval to 200 milliseconds.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1]timer spf 10 100 200
# Set the maximum SPF calculation interval to 15 seconds.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1]timer spf 15
4.1.63 virtual-system
Syntax
virtual-system virtual-system-id
undo virtual-system virtual-system-id
View
IS-IS view
Parameters
virtual-system-id: Virtual system ID of the IS-IS process.
Description
Use the virtual-system command to configure a virtual system ID for the IS-IS process. No extended LSPs are generated without the virtual system ID.
Use the undo virtual-system command to remove the virtual system ID.
Examples
# Set a virtual system ID of 2222.2222.2222 for IS-IS process 1.
<Sysname> system-view
[Sysname] isis
[Sysname-isis-1] virtual-system 2222.2222.2222
Chapter 5 BGP Configuration Commands
l The term “router” in this document refers to a generic router or an Ethernet switch running routing protocols.
l The value ranges of the parameters of the commands in this manual use the ranges assuming the switch operate in the default mode. When the switch operates in the IPv4/IPv6 dual-stack or the MCE mode, the value ranges of some parameters may vary. For the operating modes of the switch, refer to the parts discussing IPv6 configuration and MCE.
5.1 BGP Configuration Commands
& Note:
For routing policy configuration commands, refer to Routing Policy Configuration Commands.
5.1.1 aggregate
Syntax
aggregate ip-address { mask | mask-length } [ as-set | attribute-policy route-policy-name | detail-suppressed | origin-policy route-policy-name | suppress-policy route-policy-name ] *
undo aggregate ip-address { mask | mask-length }
View
BGP view/BGP-VPN instance view
Parameters
ip-address: Summary address.
mask: Summary mask, in dotted decimal notation.
mask-length: Summary mask length, in the range 0 to 32.
as-set: Creates a summary with AS set.
attribute-policy route-policy-name: Sets the attributes of the summary route according to the routing policy, the name of which is a string of 1 to 19 characters.
detail-suppressed: Only advertises the summary route.
suppress-policy route-policy-name: Suppresses specific routes defined in the routing policy, the name of which is a string of 1 to 19 characters.
origin-policy route-policy-name: References the routing policy to specify routes for summarization. The policy name is a string of 1 to 19 characters.
The keywords of the command are described as follows:
Table 5-1 Functions of the keywords
Keywords |
Function |
as-set |
Used to create a summary route, whose AS path contains the AS path information of summarized routes. Use this keyword carefully when many AS paths need to be summarized, because the frequent changes of routes may lead to route oscillation. |
detail-suppressed |
This keyword does not suppress the summary route, but it suppresses the advertisement of all the more specific routes. To summarize only some specific routes, use the peer filter-policy command. |
suppress-policy |
Used to create a summary route and suppress the advertisement of some summarized routes. If you want to suppress some routes selectively and leave other routes still advertised, use the if-match clause of the route-policy command. |
origin-policy |
Selects only routes satisfying the routing policy for route summarization |
attribute-policy |
Sets attributes except the AS-PATH attribute for the summary route. The same work can be done by using the peer route-policy command. |
Description
Use the aggregate command to create a summary route in the BGP routing table.
Use the undo aggregate command to remove a summary route.
By default, no summary route is configured.
Examples
# In BGP view, create a summary of 192.213.0.0/16 in the BGP routing table.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] aggregate 192.213.0.0 255.255.0.0
# In BGP-VPN instance view, create a summary of 192.213.0.0/16 in BGP routing table (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] aggregate 192.213.0.0 255.255.0.0
5.1.2 balance
Syntax
balance number
undo balance
View
BGP view/VPN instance view
Parameters
number: Number of BGP routes for load balancing. Its range varies with devices. When it is set to 1, load balancing is disabled.
Description
Use the balance command to configure the number of BGP routes for load balancing.
Use the undo balance command to disable load balancing.
By default, no load balancing is configured.
Unlike IGP, BGP has no explicit metric for making load balancing decision. Instead, it implements load balancing using route selection rules.
Related commands: display bgp routing-table.
Examples
# In BGP view, set the number of routes participating in BGP load balancing to 2.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] balance 2
# In BGP-VPN instance view, set the number of routes participating in BGP load balancing to 2 (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] balance 2
5.1.3 bestroute as-path-neglect
Syntax
bestroute as-path-neglect
undo bestroute as-path-neglect
View
BGP view/BGP-VPN instance view
Parameters
None
Description
Use the bestroute as-path-neglect command to configure the BGP router to not evaluate the AS_PATH during best route selection.
Use the undo bestroute as-path-neglect command to configure the BGP router to take the AS_PATH as a factor during best route selection.
By default, the router takes AS_PATH as a factor when selecting the best route.
Examples
# In BGP view, ignore AS_PATH in route selection.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] bestroute as-path-neglect
# In BGP-VPN instance view, ignore AS_PATH in route selection (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] bestroute as-path-neglect
5.1.4 bestroute compare-med
Syntax
bestroute compare-med
undo bestroute compare-med
View
BGP view/BGP-VPN instance view
Parameters
None
Description
Use the bestroute compare-med command to enable the comparison of the MED for paths from each AS.
Use the undo bestroute compare-med command to disable this comparison.
This comparison is not enabled by default.
Caution:
After the bestroute compare-med command is executed, the balance command does not take effect.
Examples
# In BGP view, enable the comparison of MEDs for paths from each AS when selecting the best route.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] bestroute compare-med
# In BGP-VPN instance view, enable the comparison of MED for paths from each AS when selecting the best route. (The VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] bestroute compare-med
5.1.5 bestroute med-confederation
Syntax
bestroute med-confederation
undo bestroute med-confederation
View
BGP view/BGP-VPN instance view
Parameters
None
Description
Use the bestroute med-confederation command to enable the comparison of the MED for paths from confederation peers to select the optimal route.
Use the undo bestroute med-confederation command to disable the comparison.
The comparison is not enabled by default.
The system only compares MED values for paths from peers within the confederation. Paths from external ASs are advertised throughout the confederation without MED comparison.
Examples
# In BGP view, enable the comparison of the MED for paths from peers within the confederation.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] bestroute med-confederation
# In BGP-VPN instance view, enable the comparison of the MED for paths from peers within the confederation. (The VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] bestroute med-confederation
5.1.6 bgp
Syntax
bgp as-number
undo bgp [ as-number ]
View
System view
Parameters
as-number: Specifies the local AS number from 1 to 65535.
Description
Use the bgp command to enable BGP and enter the BGP view.
Use the undo bgp command to disable BGP.
By default, BGP is not enabled.
Examples
# Enable BGP and set local AS number to 100.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp]
5.1.7 compare-different-as-med
Syntax
compare-different-as-med
undo compare-different-as-med
View
BGP view/BGP-VPN instance view
Parameters
None
Description
Use the compare-different-as-med command to enable the comparison of the MED for paths from peers in different ASs.
Use the undo compare-different-as-med command to disable the comparison.
The comparison is disabled by default.
If there are several paths for one destination available, the path with the smallest MED is selected.
Do not use this command unless associated ASs adopt the same IGP protocol and routing selection method.
Examples
# In BGP view, enable to compare the MED for paths from peers in different ASs.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] compare-different-as-med
# In BGP-VPN instance view, enable to compare the MED for paths from peers in different ASs (The VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] compare-different-as-med
5.1.8 confederation id
Syntax
confederation id as-number
undo confederation id
View
BGP view
Parameters
as-number: Number of the AS that contains multiple sub-ASs, in the range 1 to 65535.
Description
Use the confederation id command to configure a confederation ID.
Use the undo confederation id command to remove a specified confederation.
By default, no confederation ID is configured.
Configuring a confederation can reduce IBGP connections in a large AS. You can split the AS into several sub-ASs, and each sub-AS remains fully meshed. These sub-ASs form a confederation. Key IGP attributes of a route, such as the next hop, MED, local preference, are not discarded when crossing each sub-AS. The sub-ASs still look like a whole from the perspective of other ASs. This can ensure the integrity of the former AS, and solve the problem of too many IBGP connections in the AS.
Related commands: confederation nonstandard and confederation peer-as.
Examples
# Confederation 9 consists of four sub-ASs, namely, 38, 39, 40 and 41. The peer 10.1.1.1 is a member of the confederation while the peer 200.1.1.1 is outside of the confederation. Take sub AS 41 as an example.
<Sysname> system-view
[Sysname] bgp 41
[Sysname-bgp] confederation id 9
[Sysname-bgp] confederation peer-as 38 39 40
[Sysname-bgp] group Confed38 external
[Sysname-bgp] peer Confed38 as-number 38
[Sysname-bgp] peer 10.1.1.1 group Confed38
[Sysname-bgp] group Remote98 external
[Sysname-bgp] peer Remote98 as-number 98
[Sysname-bgp] peer 200.1.1.1 group Remote98
5.1.9 confederation nonstandard
Syntax
confederation nonstandard
undo confederation nonstandard
View
BGP view
Parameters
None
Description
Use the confederation nonstandard command to make the router compatible with routers not compliant with RFC3065 in the confederation.
Use the undo confederation nonstandard command to restore the default.
By default, all routers in the confederation comply with RFC3065.
Related commands: confederation id and confederation peer-as.
Examples
# AS100 contains routers not compliant with RFC3065 and comprises two sub-ASs, 64000 and 65000.
<Sysname> system-view
[Sysname] bgp 64000
[Sysname-bgp] confederation id 100
[Sysname-bgp] confederation peer-as 65000
[Sysname-bgp] confederation nonstandard
5.1.10 confederation peer-as
Syntax
confederation peer-as as-number-list
undo confederation peer-as [ as-number-list ]
View
BGP view
Parameters
as-number-list: Sub-AS number list. Up to 32 sub-ASs can be configured in one command line. The expression is as-number-list = as-number &<1-32>, in which as-number specifies a sub-AS number, and &<1-32> indicates up to 32 numbers can be specified.
Description
Use the confederation peer-as command to specify confederation peer sub-ASs.
Use the undo confederation peer-as command to remove specified confederation peer sub-ASs.
By default, no confederation peer sub-ASs are configured.
Before this configuration, the confederation id command must be used to specify the confederation for the sub-ASs.
If the undo confederation peer-as command without the as-number-list argument is used, all confederation peer sub-ASs are removed.
Related commands: confederation nonstandard and confederation id.
Examples
# Specify confederation peer sub ASs 2000 and 2001.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] confederation id 10
[Sysname-bgp] confederation peer-as 2000 2001
5.1.11 dampening
Syntax
dampening [ half-life-reachable half-life-unreachable reuse suppress ceiling | route-policy route-policy-name ] *
undo dampening
View
BGP view/BGP-VPN instance view
Parameters
half-life-reachable: Specifies a half-life for active routes from 1 to 45 minutes. By default, the value is 15 minutes.
half-life-unreachable: Specifies a half-life for suppressed routes from 1 to 45 minutes. By default, the value is 15 minutes.
reuse: Specifies a reuse threshold value for suppressed routes from 1 to 20000. A suppressed route whose penalty value decreases under the value is reused. By default, the reuse value is 750.
suppress: Specifies a suppression threshold from 1 to 20000. The route with a penalty value higher than the threshold is suppressed. The default value is 2000.
ceiling: Specifies a ceiling penalty value from 1001 to 20000. The value must be bigger than the suppress value. By default, the value is 16000.
route-policy-name: Routing policy name, a string of 1 to 19 characters.
half-life-reachable, half-life-unreachable, reuse, suppress and ceiling are mutually dependent. Once any one is configured, all the others should also be specified accordingly.
Description
Use the dampening command to enable BGP route dampening and/or configure dampening parameters.
Use the undo dampening command to disable route dampening.
By default, no route dampening is configured.
The command dampens only EBGP routes rather than IBGP routes.
Related commands: reset bgp dampening, reset bgp flap-info, display bgp routing-table dampened, display bgp routing-table dampening parameter and display bgp routing-table flap-info.
Examples
# In BGP view, configure BGP route dampening.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] dampening 15 15 1000 2000 10000
# In BGP-VPN instance view, configure BGP route dampening (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] dampening 15 15 1000 2000 10000
5.1.12 default ipv4-unicast
Syntax
default ipv4-unicast
undo default ipv4-unicast
View
BGP view
Parameters
None
Description
Use the default ipv4-unicast command to enable the use of IPv4 unicast address family for all peers.
Use the undo default ipv4-unicast command to disable the use of IPv4 unicast address family for all peers.
The use of IPv4 unicast address family is enabled by default.
Examples
# Enable IPv4 unicast address family for all neighbors.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] default ipv4-unicast
5.1.13 default local-preference
Syntax
default local-preference value
undo default local-preference
View
BGP view/BGP-VPN instance view
Parameters
value: Default local preference, in the range 0 to 4294967295. The larger the value is, the higher the preference is.
Description
Use the default local-preference command to configure the default local preference.
Use the undo default local-preference command to restore the default value.
By default, the default local preference is 100.
Using this command can affect BGP route selection.
Examples
# In BGP view, set the default local preference to 180.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] default local-preference 180
# In BGP-VPN instance view, set the default local preference to 180 (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] default local-preference 180
5.1.14 default med
Syntax
default med med-value
undo default med
View
BGP view/BGP-VPN instance view
Parameters
med-value: Default MED value, in the range 0 to 4294967295.
Description
Use the default med command to specify a default MED value.
Use the undo default med command to restore the default.
By default, the default med-value is 0.
Multi-exit discriminator (MED) is an external metric for routes. Different from local preference, MED is exchanged between ASs and will stay in the AS once it enters the AS. The route with a lower MED is preferred. When a router running BGP obtains several routes with an identical destination but different next-hops from various external peers, it will select the best route depending on the MED value. In the case that all other conditions are the same, the system first selects the route with the smallest MED as the best external route.
Examples
# In BGP view, configure the default MED as 25.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] default med 25
# In BGP-VPN instance view, configure the default MED as 25 (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] default med 25
5.1.15 default-route imported
Syntax
default-route imported
undo default-route imported
View
BGP view/BGP-VPN instance view
Parameters
None
Description
Use the default-route imported command to allow default route redistribution into the BGP routing table.
Use the undo default-route imported command to disallow the redistribution.
By default, default route redistribution is not allowed.
Using the default-route imported command cannot redistribute default routes. To do so, use the import-route command.
Related commands: import-route.
Examples
# In BGP view, allow default route redistribution from OSPF into BGP.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] default-route imported
[Sysname-bgp] import-route ospf 1
# In BGP-VPN instance view, enable redistributing default route from OSPF into BGP (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] default-route imported
[Sysname-bgp-vpn1] import-route ospf 1
5.1.16 display bgp group
Syntax
display bgp group [ group-name ]
View
Any view
Parameters
group-name: Peer group name, a string of 1 to 47 characters.
Description
Use the display bgp group command to display the information of the peer group.
Examples
# Display the information of the peer group aaa.
<Sysname> display bgp group aaa
BGP peer-group is aaa
remote AS 200
Type : external
Maximum allowed prefix number: 4294967295
Threshold: 75%
Configured hold timer value: 180
Keepalive timer value: 60
Minimum time between advertisement runs is 30 seconds
Peer Preferred Value: 0
No routing policy is configured
Members:
Peer V AS MsgRcvd MsgSent OutQ PrefRcv Up/Down State
2.2.2.1 4 200 0 0 0 0 00:00:35 Active
Table 5-2 Description on the fields of the display bgp group command
Field |
Description |
BGP peer-group |
Name of the BGP peer group |
remote AS |
AS number of peer group |
type |
Type of the BGP peer group: IBGP or EBGP |
Maximum allowed prefix number |
Maximum allowed prefix number |
Threshold |
Threshold value |
Configured hold timer value |
Holdtime interval |
Keepalive timer value |
Keepalive interval |
Minimum time between advertisement runs |
Minimum time between advertisement runs |
Peer Preferred Value |
Preferred value of the routes from the peer |
No routing policy is configured |
No routing policy is configured for the peer |
Members |
Detailed information of the members in the peer group |
Peer |
IPv4 address of the peer |
V |
BGP version running on peers |
AS |
AS number of the peers |
MsgRcvd |
Number of messages received |
MsgSent |
Number of messages sent |
OutQ |
Number of messages to be sent |
PrefRcv |
Number of prefixes received |
Up/Down |
The lasting time of a session/the lasting time of present state (when no session is established) |
State |
State machine of peer |
5.1.17 display bgp network
Syntax
display bgp network
View
Any view
Parameters
None
Description
Use the display bgp network command to display routing information that has been advertised.
Examples
# Display routing information that has been advertised.
<Sysname> display bgp network
BGP Local Router ID is 10.1.4.2.
Local AS Number is 400.
Network Mask Route-policy Short-cut
100.1.2.0 255.255.255.0
100.1.1.0 255.255.255.0 Short-cut
Table 5-3 Description on the fields of the display bgp network command
Field |
Description |
BGP Local Router ID |
BGP Local Router ID |
Local AS Number |
Local AS Number |
Network |
Network address |
Mask |
Mask |
Route-policy |
Routing policy |
Short-cut |
Short-cut route |
5.1.18 display bgp paths
Syntax
display bgp paths [as-regular-expression]
View
Any view
Parameters
as-regular-expression: AS path regular expression.
Description
Use the display bgp paths command to display information about BGP paths.
Examples
# Display information about BGP paths matching the AS path regular expression.
<Sysname> display bgp paths ^200
Address Hash Refcount MED Path/Origin
0x5917100 11 1 200 300i
Table 5-4 Description on the fields of the display bgp paths command
Field |
Description |
|
Address |
Route address in local database, in dotted hexadecimal notation |
|
Hash |
Hash index |
|
Refcount |
Count of routes that referenced the path |
|
MED |
MED of the path |
|
Path |
AS_PATH attribute of the path, recording the ASs it has passed, for avoiding routing loops |
|
Origin |
Origin attribute of the route: |
|
i |
Indicates the route is interior to the AS. Summary routes and routes defined using the network command are considered IGP routes. |
|
e |
Indicates that a route is learned from the exterior gateway protocol (EGP). |
|
? |
Short for INCOMPLETE. It indicates that the origin of a route is unknown and the route is learned by other means. |
5.1.19 display bgp peer
Syntax
display bgp peer [ ip-address { log-info | verbose } | group-name log-info | verbose ]
View
Any view
Parameters
ip-address: IP address of an peer to be displayed, in dotted decimal notation.
group-name: Name of a peer group to be displayed, a string of 1 to 47 characters.
log-info: Displays the log information of the specified peer.
verbose: Displays the detailed information of the peer/peer group.
Description
Use the display bgp peer command to display peer/peer group information.
Examples
# Display the detailed information of the peer 10.110.25.20.
<Sysname> display bgp peer 10.110.25.20 verbose
Peer: 10.110.25.20 Local: 2.2.2.2
Type: EBGP link
BGP version 4, remote router ID 1.1.1.1
BGP current state: Established, Up for 00h01m51s
BGP current event: RecvKeepalive
BGP last state: OpenConfirm
Port: Local - 1029 Remote - 179
Configured: Active Hold Time: 180 sec Keepalive Time: 60 sec
Received : Active Hold Time: 180 sec
Negotiated: Active Hold Time: 180 sec
Peer optional capabilities:
Peer support bgp multi-protocol extended
Peer support bgp route refresh capability
Address family IPv4 Unicast: advertised and received
Received: Total 5 messages, Update messages 1
Sent: Total 4 messages, Update messages 0
Maximum allowed prefix number: 4294967295
Threshold: 75%
Minimum time between advertisement runs is 30 seconds
Optional capabilities:
Route refresh capability has been enabled
Peer Preferred Value: 0
Routing policy configured:
No routing policy is configured
Table 5-5 Description on the fields of the display bgp peer command
Field |
Description |
Peer |
IP address of the peer |
Local |
Local router ID |
Type |
Peer type: Internal as IBGP peers and External as EBGP peers. |
BGP version |
BGP protocol version |
remote router ID |
Router ID of the peer |
BGP current state |
Current state of the peer |
BGP current event |
Current event of the peer |
BGP last state |
Last state of the peer |
Port |
Port number of local router and its peer |
Configured: Active Hold Time |
Local holdtime interval |
Keepalive Time |
Local keepalive interval |
Received: Active Hold Time |
Remote holdtime interval |
Negotiated: Active Hold Time |
Negotiated holdtime interval |
Peer optional capabilities |
Optional capabilities supported by the peer, including BGP multiple extension and routing refresh. |
Address family IPv4 Unicast |
Routes are advertised and received in the form of IPv4 unicast |
Received |
Total numbers of received packets and updates |
Sent |
Total numbers of sent packets and updates |
Maximum allowed prefix number |
Maximum allowed prefix number |
Threshold |
Threshold value |
Minimum time between advertisement runs |
Minimum time between route advertisements |
Optional capabilities |
Optional capabilities enabled by the peer |
Peer Preferred Value |
Preferred value specified for the routes from the peer |
Routing policy configured |
Local routing policy |
5.1.20 display bgp routing-table
Syntax
display bgp routing-table [ ip-address [ { mask | mask-length } [ longer-prefixes ] ] ]
View
Any view
Parameters
ip-address: Destination IP address.
mask: Network mask, in dotted decimal notation.
mask-length: Mask length, in the range 0 to 32.
longer-prefixes: Matches the longest prefix.
Description
Use the display bgp routing-table command to display specified BGP routing information in the BGP routing table.
Examples
# Display BGP routing table information.
<Sysname> display bgp routing-table
Total Number of Routes: 1
BGP Local router ID is 10.10.10.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 40.40.40.0/24 20.20.20.1 0 200 300i
Table 5-6 Description on the fields of the display bgp routing command
Field |
Description |
|
Total Number of Routes |
Total Number of Routes |
|
BGP Local router ID |
BGP Local router ID |
|
Status codes |
Status codes: * – valid > – best d – damped h – history i – internal (IGP) s – summary suppressed (suppressed) S – Stale |
|
Origin |
i – IGP (originated in the AS) e – EGP (learned through EGP) ? – incomplete (learned by other means) |
|
Network |
Destination network address |
|
Next Hop |
Next hop IP address |
|
MED |
MULTI_EXIT_DISC attribute |
|
LocPrf |
Local preference value |
|
PrefVal |
Preferred value of the route |
|
Path |
AS_PATH attribute, recording the ASs the packet has passed to avoid routing loops |
|
PrefVal |
Preferred value |
|
Ogn |
Origin attribute of the route, one of the following values: |
|
i |
Indicates that the route is interior to the AS. Summary routes and the routes configured using the network command are considered IGP routes. |
|
e |
Indicates that the route is learned via the exterior gateway protocol (EGP). |
|
? |
Short for INCOMPLETE. It indicates that the origin of the route is unknown and the route is learned by other means. |
5.1.21 display bgp routing-table as-path-acl
Syntax
display bgp routing-table as-path-acl as-path-acl-number
View
Any view
Parameters
as-path-acl-number: Displays routing information permitted by the AS path ACL, which is specifies with a number from 1 to 256.
Description
Use the display bgp routing as-path-acl command to display BGP routes permitted by an as-path ACL.
Examples
# Display BGP routes permitted by AS path ACL 1.
<Sysname> display bgp routing-table as-path-acl 1
BGP Local router ID is 20.20.20.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 40.40.40.0/24 30.30.30.1 0 0 300i
Refer to Table 5-6 for description on the fields above.
5.1.22 display bgp routing-table cidr
Syntax
display bgp routing-table cidr
View
Any view
Parameters
None
Description
Use the display bgp routing-table cidr command to display BGP CIDR (Classless Inter-Domain Routing) routing information.
Examples
# Display BGP CIDR routing information.
<Sysname> display bgp routing-table cidr
BGP Local router ID is 20.20.20.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 40.40.40.0/24 30.30.30.1 0 0 300i
Refer to Table 5-6 for description on the above fields.
5.1.23 display bgp routing-table community
Syntax
display bgp routing-table community [ aa:nn&<1-13> ] [ no-advertise | no-export | no-export-subconfed ] * [ whole-match ]
View
Any view
Parameters
aa:nn: Community number. Both aa and nn are in the range 0 to 65535.
&<1-13>: Argument before it can be entered up to 13 times.
no-advertise: Displays BGP routes that are not advertised to any peer.
no-export: Displays routes that are not advertised outside the AS. With a confederation configured, it displays routes that are not advertised outside the confederation, but can be advertised to other sub ASs in the confederation.
no-export-subconfed: Displays routes that are neither advertised outside the AS nor to other sub ASs in a configured confederation.
whole-match: Displays the exactly matched routes.
Description
Use the display bgp routing community command to display BGP routing information with the specified BGP community.
Examples
# Display routing information with the specified BGP community.
<Sysname> display bgp routing-table community 11:22
BGP Local router ID is 10.10.10.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 10.10.10.0/24 0.0.0.0 0 0 i
*> 40.40.40.0/24 20.20.20.1 0 200 300i
Refer to Table 5-6 for description on the fields above.
5.1.24 display bgp routing-table community-list
Syntax
display bgp routing-table community-list { basic-community-list-number [ whole-match ] | adv-community-list-number }&<1-16>
View
Any view
Parameters
basic-community-list-number: Specifies a basic community-list number from 1 to 99.
adv-community-list-number: Specifies an advanced community-list number from 100 to 199.
whole-match: Displays routes exactly matching the specified basic-community-list.
&<1-16>: Specifies the argument before it can be entered up to 16 times.
Description
Use the display bgp routing-table community-list command to display BGP routing information matching the specified BGP community list.
Examples
# Display BGP routing information matching BGP community list 100.
<Sysname> display bgp routing-table community-list 100
BGP Local router ID is 30.30.30.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 30.30.30.0/24 0.0.0.0 0 0 i
*> 40.40.40.0/24 0.0.0.0 0 0 i
Refer to Table 5-6 for description on the fields above.
5.1.25 display bgp routing-table dampened
Syntax
display bgp routing-table dampened
View
Any view
Parameters
None
Description
Use the display bgp routing-table dampened command to display dampened BGP routes.
Examples
# Display dampened BGP routes.
<Sysname> display bgp routing-table dampened
BGP Local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network From Reuse Path/Origin
*d 77.0.0.0 12.1.1.1 00:29:20 100?
Table 5-7 Description on the fields of the display bgp routing-table dampened command
Field |
Description |
From |
IP address from which the route was received |
Reuse |
Reuse time of the route |
Refer to Table 5-6 for description on the other fields above.
5.1.26 display bgp routing-table dampening parameter
Syntax
display bgp routing-table dampening parameter
View
Any view
Parameters
None
Description
Use the display bgp routing-table dampening parameter command to display BGP route dampening parameters.
Related commands: dampening.
Examples
# Display BGP route dampening parameters.
<Sysname> display bgp routing-table dampening parameter
Maximum Suppress Time(in second) : 3069
Ceiling Value : 16000
Reuse Value : 750
HalfLife Time(in second) : 900
Suppress-Limit : 2000
Table 5-8 Description on the fields of the display bgp routing-table dampening parameter command
Field |
Description |
Maximum Suppress Time |
Maximum Suppress Time |
Ceiling Value |
Upper limit of penalty value |
Reuse Value |
Limit for a route to be desuppressed |
HalfLife Time |
Half-life time of active routes |
Suppress-Limit |
Limit for a route to be suppressed |
5.1.27 display bgp routing-table different-origin-as
Syntax
display bgp routing-table different-origin-as
View
Any view
Parameters
None
Description
Use the display bgp routing-table different-origin-as command to display BGP routes originating from different autonomous systems.
Examples
# Display BGP routes originating from different ASs.
<Sysname> display bgp routing-table different-origin-as
BGP Local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 55.0.0.0 12.1.1.1 0 0 100?
* 14.1.1.2 0 0 300?
Refer to Table 5-6 for description on the fields above.
5.1.28 display bgp routing-table flap-info
Syntax
display bgp routing-table flap-info [ regular-expression as-regular-expression | as-path-acl as-path-acl-number | ip-address [ { mask | mask-length } [ longer-match ] ] ]
View
Any view
Parameters
as-regular-expression: Displays route flap information that matches the AS path regular expression.
as-path-acl-number: Displays route flap information matching the AS path ACL. The number is in the range 1 to 256.
ip-address: Destination IP address.
mask: Mask, in dotted decimal notation.
mask-length: Mask length, in the range 0 to 32.
longer-match: Matches the longest prefix.
Description
Use the display bgp routing-table flap-info command to display BGP route flap statistics. If no parameter is specified, this command displays all BGP route flap statistics.
Examples
# Display BGP route flap statistics.
<Sysname> display bgp routing-table flap-info
BGP Local router ID is 2.2.2.2
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network From Flaps Duration Reuse Path/Origin
*> 55.0.0.0 12.1.1.1 2 00:00:16 100?
*d 77.0.0.0 12.1.1.1 5 00:34:02 00:27:08 100?
Table 5-9 Description on the fields of the display bgp routing flap-info command
Field |
Description |
From |
Source IP address of the route |
Flaps |
Number of routing flaps |
Duration |
Duration time of the flap route |
Reuse |
Reuse time of the flap route |
Refer to Table 5-6 for description on the other fields above.
5.1.29 display bgp routing-table peer
Syntax
display bgp routing-table peer ip-address { advertised-routes | received-routes } [ network-address [ mask | mask-length ] | statistic ]
View
Any view
Parameters
ip-address: IP address of a peer.
advertised-routes: Displays routing information advertised to the specified peer.
received-routes: Displays routing information received from the specified peer.
network-address: IP address of the destination network.
mask: Mask of the destination network, in dotted decimal notation.
mask-length: Mask length, in the range 0 to 32.
statistic: Displays route statistics.
Description
Use the display bgp routing-table peer command to display BGP routing information advertised to or received from the specified BGP peer.
Related commands: display bgp peer.
Examples
# Display BGP routing information advertised to BGP peer 20.20.20.1.
<Sysname> display bgp routing-table peer 20.20.20.1 advertised-routes
Total Number of Routes: 2
BGP Local router ID is 30.30.30.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 30.30.30.0/24 0.0.0.0 0 0 i
*> 40.40.40.0/24 0.0.0.0 0 0 i
Refer to Table 5-6 for description on the fields above.
5.1.30 display bgp routing-table regular-expression
Syntax
display bgp routing-table regular-expression as-regular-expression
View
Any view
Parameters
as-regular-expression: AS regular expression.
Description
Use the display bgp routing-table regular-expression command to display BGP routing information matching the specified AS regular expression.
Examples
# Display BGP routing information matching AS regular expression 300$.
<Sysname> display bgp routing-table regular-expression 300$
BGP Local router ID is 20.20.20.1
Status codes: * - valid, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal Path/Ogn
*> 40.40.40.0/24 30.30.30.1 0 0 300i
Refer to Table 5-6 for description on the fields above.
5.1.31 display bgp routing-table statistic
Syntax
display bgp routing-table statistic
View
Any view
Parameters
None
Description
Use the display bgp routing-table statistic command to display BGP routing statistics.
Examples
# Display BGP routing statistics.
<Sysname> display bgp routing-table statistic
Total Number of Routes: 4
Table 5-10 Description on the fields of the display bgp routing-table statistic command
Field |
Description |
Total number of routes |
Total number of routes |
5.1.32 ebgp-interface-sensitive
Syntax
ebgp-interface-sensitive
undo ebgp-interface-sensitive
View
BGP view/BGP-VPN instance view
Parameters
None
Description
Use the ebgp-interface-sensitive command to enable the clearing of EBGP session on any interface that becomes down.
Use the undo ebgp-interface-sensitive command to disable the function.
This function is enabled by default.
Examples
# In BGP view, enable the clearing of EBGP session on any interface that becomes down.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ebgp-interface-sensitive
# In BGP-VPN instance view, enable the clearing of EBGP session on any interface that becomes down (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] ebgp-interface-sensitive
5.1.33 filter-policy export
Syntax
filter-policy { acl-number | ip-prefix ip-prefix-name } export [ direct | isis process-id | ospf process-id | rip process-id | static ]
undo filter-policy export [ direct | isis process-id | ospf process-id | rip process-id | static ]
View
BGP view/BGP-VPN instance view
Parameters
acl-number: Number of an ACL used to filter outgoing redistributed routing information, ranging from 2000 to 3999.
ip-prefix-name: Name of an IP prefix list used to filter outgoing redistributed routing information, a string of 1 to 19 characters.
direct: Filters direct routes.
isis process-id: Filters outgoing routes redistributed from an ISIS process. The ID is in the range 1 to 65535.
ospf process-id: Filters outgoing routes redistributed from the OSPF process with an ID from 1 to 65535.
rip process-id: Filters outgoing routes redistributed from a RIP process. The ID is in the range 1 to 65535.
static: Filters static routes.
If no routing protocol is specified, all outgoing routes are filtered.
Description
Use the filter-policy export command to filter outgoing redistributed routes and only the routes permitted by the specified filter can be advertised.
Use the undo filter-policy export command to remove the filtering.
If no routing protocol is specified, the filtering applies to all outgoing redistributed routes.
By default, the filtering is not configured.
Examples
# In BGP view, reference ACL 2000 to filter all outgoing redistributed routes.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] filter-policy 2000 export
# In BGP-VPN instance view, reference ACL 2000 to filter all outgoing redistributed routes (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] filter-policy 2000 export
5.1.34 filter-policy import
Syntax
filter-policy { acl-number | ip-prefix ip-prefix-name } import
undo filter-policy import
View
BGP view/BGP-VPN instance view
Parameters
acl-number: Number of an ACL used to filter incoming routing information, ranging from 2000 to 3999.
ip-prefix-name: Name of an IP prefix list used to filter incoming routing information, a string of 1 to 19 characters.
Description
Use the filter-policy import command to configure the filtering of incoming routing information.
Use the undo filter-policy import command to disable the filtering.
By default, incoming routing information is not filtered.
Examples
# In BGP view, reference ACL 2000 to filter incoming routing information.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] filter-policy 2000 import
# In BGP-VPN instance view, reference ACL 2000 to filter incoming routing information (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] filter-policy 2000 import
5.1.35 graceful-restart
Syntax
graceful-restart
undo graceful-restart
View
BGP view
Parameters
None
Description
Use the graceful-restart command to enable BGP Graceful Restart capability.
Use the undo graceful-restart command to disable BGP Graceful Restart capability.
By default, BGP Graceful Restart capability is disabled.
& Note:
When configured with BGP GR, the switch can only act as a GR Helper.
Examples
# Enable the Graceful Restart capability for BGP process 100.
<Sysname> system-view
[Sysname] bgp 100
++
5.1.36 graceful-restart timer restart
Syntax
graceful-restart timer restart timer
undo graceful-restart timer restart
View
BGP view
Parameters
timer: Maximum time for a peer to reestablish a BGP session, in the range 3 to 600 seconds.
Description
Use the graceful-restart timer restart command to configure the maximum time for a peer to reestablish a BGP session.
Use the undo graceful-restart timer restart command to restore the default.
By default, the maximum time for a peer to reestablish a BGP session is 150 seconds.
Examples
# Configure the maximum time for a peer to reestablish a BGP session as 300 seconds.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] graceful-restart timer restart 300
5.1.37 graceful-restart timer wait-for-rib
Syntax
graceful-restart timer wait-for-rib timer
undo graceful-restart timer wait-for-rib
View
BGP view
Parameters
timer: Time to wait for the End-of-RIB marker, in the range 3 to 300 seconds.
Description
Use the graceful-restart timer wait-for-rib command to configure the time to wait for the End-of-RIB marker.
Use the undo graceful-restart timer wait-for-rib command to restore the default.
By default, the time to wait for the End-of-RIB marker is 180 seconds.
& Note:
l After a BGP session has been successfully (re)established, the End-of-RIB marker must be received within the time specified with this command.
l Using this command can speed up route convergence.
Examples
# Set the time to wait for the End-of-RIB marker to 100 seconds.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] graceful-restart timer wait-for-rib 100
5.1.38 group
Syntax
group group-name [ external | internal ]
undo group group-name
View
BGP view/BGP-VPN instance view
Parameters
group-name: Name of a peer group, a string of 1 to 47 characters.
external: Creates an EBGP peer group, which can be the group of another sub AS in a confederation.
internal: Creates an IBGP peer group; not supported in BGP-VPN instance view.
Description
Use the group command to create a peer group.
Use the undo group command to delete a peer group.
An IBGP peer group is created if neither internal nor external is specified.
Examples
# In BGP view, create an EBGP peer group test with AS number 200, and add EBGP peers 10.1.1.1 and 10.1.2.1 into the group.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] group test external
[Sysname-bgp] peer test as-number 200
[Sysname-bgp] peer 10.1.1.1 group test
[Sysname-bgp] peer 10.1.2.1 group test
# In BGP-VPN instance view, create an EBGP peer group test with AS number 200, and add EBGP peers 10.1.1.1 and 10.1.2.1 into the group (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] group test external
[Sysname-bgp-vpn1] peer test as-number 200
[Sysname-bgp-vpn1] peer 10.1.1.1 group test
[Sysname-bgp-vpn1] peer 10.1.2.1 group test
5.1.39 import-route
Syntax
import-route protocol [ process-id [ med med-value | route-policy route-policy-name ] * ]
undo import-route protocol [ process-id ]
View
BGP view/BGP-VPN instance view
Parameters
protocol: Redistributes routes from the routing protocol, which can be direct, isis, ospf, rip and static at present.
process-id: Process ID, in the range 1 to 65535. It is available only when the protocol is isis, ospf or rip.
med-value: Specifies the MED value to be applied to redistributed routes, ranging from 0 to 4294967295. If the argument is not specified, the cost of the redistributed route is used as its MED in the BGP routing domain.
route-policy-name: Name of a routing policy used to filter redistributed routes, a string of 1 to 19 characters.
Description
Use the import-route command to configure BGP to redistribute routes from a specified routing protocol and advertise redistributed routes.
Use the undo import-route command to disable route redistribution from a routing protocol.
By default, BGP does not redistribute routes from other protocols.
The ORIGIN attribute of routes redistributed with the import-route command is incomplete.
Examples
# In BGP view, redistribute routes from RIP.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] import-route rip
# In BGP-VPN instance view, redistribute routes from RIP (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] import-route rip
5.1.40 log-peer-change
Syntax
log-peer-change
undo log-peer-change
View
BGP view
Parameters
None
Description
Use the log-peer-change command to enable the global BGP logging on peers going up and down.
Use the undo log-peer-change command to disable the function.
By default, the function is enabled.
Examples
# Enable BGP logging on peers going up and down.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] log-peer-change
5.1.41 network
Syntax
network ip-address [ mask | mask-length ] [ short-cut | route-policy route-policy-name ]
undo network ip-address [ mask | mask-length ] [ short-cut ]
View
BGP view/BGP-VPN instance view
Parameters
ip-address: Destination IP address.
mask: Mask of the network address, in dotted decimal notation.
mask-length: Mask length, in the range 0 to 32.
short-cut: Specifies the route to use the local preference. If the route is an EBGP route whose preference is higher than the local one, using this keyword can configure the EBGP route to use the local preference, so the route is hard to become the optimal route.
route-policy-name: Routing policy applied to the route. The name is a string of 1 to 19 characters.
Description
Use the network command to advertise a network to the BGP routing table.
Use the undo network command to remove a network from the routing table.
By default, no network route is advertised.
Note that:
l The network route must be in the local IP routing table, and using a routing policy makes route management more flexible.
l The route advertised to the BGP routing table using the network command has the ORIGIN attribute as IGP.
Examples
# In BGP view, advertise the network segment 10.0.0.0/16.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] network 10.0.0.0 255.255.0.0
# In BGP-VPN instance view, advertise the network segment 10.0.0.0/16 (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] network 10.0.0.0 255.255.0.0
5.1.42 peer advertise-community
Syntax
peer { group-name | ip-address } advertise-community
undo peer { group-name | ip-address } advertise-community
View
BGP view/BGP-VPN instance view
Parameters
group-name: Name of a peer group, a string of 1 to 47 characters.
ip-address: IP address of a peer.
Description
Use the peer advertise-community command to advertise the community attribute to a peer/peer group.
Use the undo peer advertise-community command to disable the community attribute advertisement to a peer/peer group.
By default, no community attribute is advertised to any peer group/peer.
Related commands: ip community-list, if-match community, apply community (refer to Routing Policy Commands in the IP Routing Volume).
Examples
# In BGP view, advertise the community attribute to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test advertise-community
# In BGP-VPN instance view, advertise the community attribute to peer group test (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test advertise-community
5.1.43 peer advertise-ext-community
Syntax
peer { group-name | ip-address } advertise-ext-community
undo peer { group-name | ip-address } advertise-ext-community
View
BGP view/BGP-VPN instance view
Parameters
group-name: Name of a peer group, a string of 1 to 47 characters.
ip-address: IP address of a peer.
Description
Use the peer advertise-ext-community command to advertise the extended community attribute to a peer/peer group.
Use the undo peer advertise-ext-community command to disable the advertisement.
By default, no extended community attribute is advertised to a peer/peer group.
Related commands: ip extcommunity-list, if-match extcommunity, apply extcommunity.
Examples
# In BGP view, advertise the extended community attribute to the peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test advertise-ext-community
# In BGP-VPN view, advertise the extended community attribute to the peer group test (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test advertise-ext-community
5.1.44 peer allow-as-loop
Syntax
peer { group-name | ip-address } allow-as-loop [ number ]
undo peer { group-name | ip-address } allow-as-loop
View
BGP view/BGP-VPN instance view
Parameters
group-name: Name of a peer group, a string of 1 to 47 characters.
ip-address: IP address of a peer.
number: Specifies the repeating times of the local AS number, in the range 1 to 10. The default number is 1.
Description
Use the peer allow-as-loop command to allow the local AS number to exist in the AS_PATH attribute of routes from a peer/peer group, and to configure the repeating times of the local AS number.
Use the undo peer allow-as-loop command to remove the configuration.
By default, the local AS number is not allowed.
Related commands: display bgp routing-table peer.
Examples
# In BGP view, configure the repeating times of the local AS number as 2 for routes from peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer 1.1.1.1 allow-as-loop 2
# In BGP-VPN instance view, configure the repeating times of the local AS number as 2 for routes from peer 1.1.1.1 (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer 1.1.1.1 allow-as-loop 2
5.1.45 peer as-number
Syntax
peer { group-name | ip-address } as-number as-number
undo peer group-name as-number
undo peer ip-address
View
BGP view/BGP-VPN instance view
Parameters
group-name: Name of a peer group, a string of 1 to 47 characters.
ip-address: IP address of a peer.
as-number: AS number of the peer or peer group, in the range 1 to 65535.
Description
Use the peer as-number command to specify the AS number for a peer/peer group.
Use the undo peer as-number command to delete the AS number of a peer group.
Use the undo peer command to delete a peer.
By default, no AS number is configured for a peer/peer group.
Examples
# In BGP view, specify the AS number of the peer group test as 100.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test as-number 100
# In BGP-VPN instance view, specify the AS number of the peer group test as 100 (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test as-number 100
5.1.46 peer as-path-acl
Syntax
peer { group-name | ip-address } as-path-acl as-path-acl-number { export | import }
undo peer { group-name | ip-address } as-path-acl as-path-acl-number { export | import }
View
BGP view/BGP-VPN instance view
Parameters
group-name: Name of a peer group, a string of 1 to 47 characters.
ip-address: IP address of a peer.
as-path-acl-number: AS path ACL number, in the range 1 to 256.
export: Filters outgoing routes.
import: Filters incoming routes.
Description
Use the peer as-path-acl command to configure the filtering of routes incoming from or outgoing to a peer/peer group based on a specified AS path ACL.
Use the undo peer as-path-acl command to remove the configuration.
By default, no AS path ACL filtering is configured.
Related commands: ip as-path-acl, if-match as-path, apply as-path.
Examples
# In BGP view, reference the AS path ACL 1 to filter routes outgoing to the peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test as-path-acl 1 export
# In BGP-VPN instance view, reference the AS path ACL 1 to filter routes outgoing to the peer group test (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test as-path-acl 1 export
5.1.47 peer capability-advertise conventional
Syntax
peer { group-name | ip-address } capability-advertise conventional
undo peer { group-name | ip-address } capability-advertise conventional
View
BGP view
Parameters
group-name: Name of a peer group, a string of 1 to 47 characters.
ip-address: IP address of a peer.
Description
Use the peer capability-advertise conventional command to disable BGP multi-protocol extension and route refresh for a peer/peer group.
Use the undo peer capability-advertise conventional command to enable BGP multi-protocol extension and route refresh for a peer/peer group.
By default, BGP multi-protocol extension and route refresh are enabled.
Examples
# In BGP view, disable multi-protocol extension and route refresh for peer 160.89.2.33.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer 160.89.2.33 as-number 100
[Sysname-bgp] peer 160.89.2.33 capability-advertise conventional
5.1.48 peer capability-advertise route-refresh
Syntax
peer { group-name | ip-address } capability-advertise route-refresh
undo peer { group-name | ip-address } capability-advertise route-refresh
View
BGP view/BGP-VPN instance view
Parameters
group-name: Name of a peer group, a string of 1 to 47 characters.
ip-address: IP address of a peer.
Description
Use the peer capability-advertise route-refresh command to enable the BGP route refresh capability.
Use the undo peer capability-advertise route-refresh command to disable the capability.
The capability is enabled by default.
Examples
# In BGP view, enable BGP route refresh for peer 160.89.2.33.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer 160.89.2.33 as-number 100
[Sysname-bgp] peer 160.89.2.33 capability-advertise route-refresh
# In BGP-VPN instance view, enable BGP route refresh for peer 160.89.2.33 (The VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer 160.89.2.33 as-number 100
[Sysname-bgp-vpn1] peer 160.89.2.33 capability-advertise route-refresh
5.1.49 peer connect-interface
Syntax
peer { group-name | ip-address } connect-interface interface-type interface-number
undo peer { group-name | ip-address } connect-interface
View
BGP view/BGP-VPN instance view
Parameters
group-name: Name of a peer group, a string 1 to 47 characters.
ip-address: IP address of a peer.
interface-type interface-number: Specifies the type and number of the interface.
Description
Use the peer connect-interface command to specify the source interface for establishing TCP connections to a peer/peer group.
Use the undo peer connect-interface command to restore the default.
Note that:
To establish multiple BGP connections to another BGP router, you need to specify on the local router the respective source interfaces for establishing TCP connections to the peers on the peering BGP router; otherwise, the local BGP router may fail to establish TCP connections to the peers when using the outbound interfaces of the best routes as the source interfaces.
Examples
# In BGP view, specify loopback 0 as the source interface for routing updates to the peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test connect-interface loopback 0
# In BGP-VPN instance view, specify loopback 0 as the source interface for routing updates to the peer group test (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test connect-interface loopback 0
5.1.50 peer default-route-advertise
Syntax
peer { group-name | ip-address } default-route-advertise [ route-policy route-policy-name ]
undo peer { group-name | ip-address } default-route-advertise
View
BGP view/BGP-VPN instance view
Parameters
group-name: Name of a peer group, a string of 1 to 47 characters.
ip-address: IP address of a peer.
route-policy-name: Routing policy name, a string of 1 to 19 characters.
Description
Use the peer default-route-advertise command to advertise a default route to a peer/peer group.
Use the undo peer default-route-advertise command to disable default route advertisement to a peer/peer group.
By default, no default route is advertised to a peer/peer group.
With this command used, the router unconditionally sends a default route with the next hop being itself to the peer/peer group regardless of whether the default route is available in the routing table.
Examples
# In BGP view, advertise a default route to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test default-route-advertise
# In BGP-VPN instance view, advertise a default route to peer group test (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test default-route-advertise
5.1.51 peer description
Syntax
peer { group-name | ip-address } description description-text
undo peer { group-name | ip-address } description
View
BGP view/BGP-VPN instance view
Parameters
group-name: Name of a peer group, a string of 1 to 47 characters.
ip-address: IP address of a peer.
description-text: Description information for the peer/peer group, a string of 1 to 79 characters.
Description
Use the peer description command to configure the description information for a peer/peer group.
Use the undo peer description command to remove the description information of a peer/peer group.
By default, no description information is configured for a peer/peer group.
Create a peer/peer group before configuring a description for it.
Related commands: display bgp peer.
Examples
# In BGP view, configure the description information of the peer group test as ISP1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test description ISP1
# In BGP-VPN instance view, configure the description information of the peer group test as ISP1(the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test description ISP1
5.1.52 peer ebgp-max-hop
Syntax
peer { group-name | ip-address } ebgp-max-hop [ hop-count ]
undo peer { group-name | ip-address } ebgp-max-hop
View
BGP view/BGP-VPN instance view
Parameters
group-name: Name of a peer group, a string of 1 to 47 characters.
ip-address: IP address of a peer.
hop-count: Maximum hop count, in the range 1 to 255. The default is 64.
Description
Use the peer ebgp-max-hop command to allow establishing an EBGP connection with a peer/peer group that is on an indirectly connected network.
Use the undo peer ebgp-max-hop command to restore the default.
By default, this feature is disabled.
You can use the argument hop-count to specify the maximum route hop count of the EBGP connection.
Examples
# In BGP view, allow establishing the EBGP connection with the peer group test that is on an indirectly connected network.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test ebgp-max-hop
# In BGP-VPN instance view, allow establishing the EBGP connection with the peer group test that is on an indirectly connected network (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test ebgp-max-hop
5.1.53 peer enable
Syntax
undo peer ip-address enable
View
BGP view
Parameters
ip-address: IP address of a peer.
Description
Use the peer enable command to enable the specified peer.
Use the undo peer enable command to disable the specified peer.
By default, the BGP peer is enabled.
If a peer is disabled, the router will not exchange routing information with the peer.
Examples
# Disable peer 18.10.0.9.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer 18.10.0.9 group group1
[Sysname-bgp] undo peer 18.10.0.9 enable
5.1.54 peer fake-as
Syntax
peer { group-name | ip-address } fake-as as-number
undo peer { group-name | ip-address } fake-as
View
BGP view/BGP-VPN instance view
Parameters
group-name: Name of a peer group, a string of 1 to 47 characters.
ip-address: IP address of a peer.
as-number: Local autonomous system number, in the range 1 to 65535.
Description
Use the peer fake-as command to configure a fake local AS number for a peer or peer group.
Use the undo peer fake-as command to remove the configuration.
By default, no fake local AS number is configured for a peer or peer group.
& Note:
The peer fake-as command is only applicable to an EBGP peer or peer group.
Examples
# In BGP view, configure a fake AS number of 200 for the peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test fake-as 200
# In BGP-VPN instance view, configure a fake AS number of 200 for the peer group test (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test fake-as 200
5.1.55 peer filter-policy
Syntax
peer { group-name | ip-address } filter-policy acl-number { export | import }
undo peer { group-name | ip-address } filter-policy [ acl-number ] { export | import }
View
BGP view/BGP-VPN instance view
Parameters
group-name: Name of a peer group, a string of 1 to 47 characters.
ip-address: IP address of a peer.
acl-number: ACL number, in the range 2000 to 3999.
export: Applies the filter-policy to routes advertised to the peer/peer group.
import: Applies the filter-policy to routes received from the peer/peer group.
Description
Use the peer filter-policy command to configure an ACL-based filter policy for a peer or peer group.
Use the undo peer filter-policy command to remove the configuration.
By default, no ACL-based filter policy is configured for a peer or peer group.
Related commands: peer as-path-acl.
Examples
# In BGP view, apply the ACL 2000 to filter routes advertised to the peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test filter-policy 2000 export
# In BGP-VPN instance view, apply the ACL 2000 to filter routes advertised to the peer group test (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test filter-policy 2000 export
5.1.56 peer group
Syntax
peer ip-address group group-name [ as-number as-number ]
undo peer ip-address group group-name
View
BGP view/BGP-VPN instance view
Parameters
group-name: Name of a peer group, a string of 1 to 47 characters.
ip-address: IP address of a peer.
as-number: AS number of the peer, in the range 1 to 65535.
Description
Use the peer group command to add a peer to a peer group.
Use the undo peer group command to delete a specified peer from a peer group.
By default, no peer is added into a peer group.
Examples
# In BGP view, add the peer 10.1.1.1 to the EBGP peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] group test external
[Sysname-bgp] peer test as-number 2004
[Sysname-bgp] peer 10.1.1.1 group test
# In BGP-VPN view, add the peer 10.1.1.1 to the EBGP peer group test (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] group test external
[Sysname-bgp-vpn1] peer test as-number 2004
[Sysname-bgp-vpn1] peer 10.1.1.1 group test
5.1.57 peer ignore
Syntax
peer { group-name | ip-address } ignore
undo peer { group-name | ip-address } ignore
View
BGP view/BGP-VPN instance view
Parameters
group-name: Name of a peer group, a string of 1 to 47 characters.
ip-address: IP address of a peer.
Description
Use the peer ignore command to disable session establishment with a peer or peer group.
Use the undo peer ignore command to remove the configuration.
By default, session establishment with a peer or peer group is allowed.
After the peer ignore command is executed, the system disables the session with the specified peer or peer group and clears all the related routing information. For a peer group, this means all sessions with the peer group will be tore down.
Examples
# In BGP view, disable session establishment with peer 10.10.10.10.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer 10.10.10.10 ignore
# In BGP-VPN instance view, disable session establishment with peer 10.10.10.10 (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer 10.10.10.10 ignore
5.1.58 peer ip-prefix
Syntax
peer { group-name | ip-address } ip-prefix ip-prefix-name { export | import }
undo peer { group-name | ip-address } ip-prefix { export | import }
View
BGP view/BGP-VPN instance view
Parameters
group-name: Name of a peer group, a string of 1 to 47 characters.
ip-address: IP address of a peer.
ip-prefix-name: IP prefix list name, a string of 1 to 19 characters.
export: Applies the filter to routes advertised to the specified peer/peer group.
import: Applies the filter to routes received from the specified peer/peer group.
Description
Use the peer ip-prefix command to reference an IP prefix list to filter routes received from or advertised to a peer or peer group.
Use the undo peer ip-prefix command to remove the configuration.
By default, no IP prefix list is specified.
Examples
# In BGP view, use the IP prefix list list 1 to filter routes advertised to the peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test ip-prefix list1 export
# In BGP-VPN view, use the IP prefix list list 1 to filter routes advertised to the peer group test (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test ip-prefix list1 export
5.1.59 peer keep-all-routes
Syntax
peer { group-name | ip-address } keep-all-routes
undo peer { group-name | ip-address } keep-all-routes
View
BGP view/BGP-VPN instance view
Parameters
group-name: Name of a peer group, a string of 1 to 47 characters.
ip-address: IP address of a peer.
Description
Use the peer keep-all-routes command to save original routing information from a peer or peer group, even routes that failed to pass the inbound policy (if configured).
Use the undo peer keep-all-routes command to disable this function.
By default, the function is not enabled.
Examples
# In BGP view, save routing information from peer 131.100.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer 131.100.1.1 as-number 200
[Sysname-bgp] peer 131.100.1.1 keep-all-routes
# In BGP-VPN instance view, save routing information from peer 131.100.1.1(the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer 131.100.1.1 as-number 200
[Sysname-bgp-vpn1] peer 131.100.1.1 keep-all-routes
5.1.60 peer log-change
Syntax
peer { group-name | ip-address } log-change
undo peer { group-name | ip-address } log-change
View
BGP view/BGP-VPN instance view
Parameters
group-name: Name of a peer group, a string of 1 to 47 characters.
ip-address: IP address of a peer.
Description
Use the peer log-change command to enable the logging of session state and event information for a specified peer or peer group.
Use the undo peer log-change command to remove the configuration.
The logging is enabled by default.
Examples
# In BGP view, enable the logging of session state and event information for peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test log-change
# In BGP-VPN instance view, enable the logging of session state and event information for peer group test (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test log-change
5.1.61 peer next-hop-local
Syntax
peer { group-name | ip-address } next-hop-local
undo peer { group-name | ip-address } next-hop-local
View
BGP view /BGP-VPN instance view
Parameters
group-name: Name of a peer group, a string of 1 to 47 characters.
ip-address: IP address of a peer.
Description
Use the peer next-hop-local command to specify the router as the next hop for routes to a peer/peer group.
Use the undo peer next-hop-local command to remove the configuration.
By default, routes advertised to an EBGP peer/peer group take the local router as the next hop, while routes to an IBGP peer/peer group do not take the local router as the next hop.
Examples
# In BGP view, set the next hop of routes advertised to peer group test to the router itself.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test next-hop-local
# In BGP-VPN instance view, set the next hop of routes advertised to peer group test to the router itself (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test next-hop-local
5.1.62 peer password
Syntax
peer { group-name | ip-address } password { cipher | simple } password
undo peer { group-name | ip-address } password
View
BGP view/BGP-VPN instance view
Parameters
group-name: Name of a peer group, a string of 1 to 47 characters.
ip-address: IP address of a peer.
cipher: Displays the configured password in cipher text format.
simple: Displays the configured password in plain text format.
password: Password, a string of 1 to 80 characters when the simple keyword is used, or when the cipher keyword and plain text password are used; a string of 108 characters when the cipher text password and the cipher keyword are used.
Description
Use the peer password command to configure BGP to perform MD5 authentication when a TCP connection is being established with a peer/peer group.
Use the undo peer password command to disable the function.
By default, no MD5 authentication is performed for TCP connection establishment.
Once MD5 authentication is enabled, both parties must be configured with the same authentication mode and password. Otherwise, the TCP connection will not be set up.
Examples
# In BGP view, perform MD5 authentication on the TCP connection set up between the local router 10.1.100.1 and the peer router 10.1.100.2.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer 10.1.100.2 password simple aabbcc
# Perform the similar configuration on the peer.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer 10.1.100.1 password simple aabbcc
# In BGP-VPN instance view, perform MD5 authentication on the TCP connection set up between the local router 10.1.100.1 and the peer router 10.1.100.2(the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer 10.1.100.2 password simple aabbcc
# Perform the similar configuration on the peer.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer 10.1.100.1 password simple aabbcc
5.1.63 peer preferred-value
Syntax
peer { group-name | ip-address } preferred-value value
undo peer { group-name | ip-address } preferred-value
View
BGP view/BGP-VPN instance view
Parameters
group-name: Name of a peer group, a string of 1 to 47 characters.
ip-address: IP address of a peer.
value: Preferred value, in the range 0 to 65535.
Description
Use the peer preferred-value command to assign a preferred value to routes received from a peer or peer group.
Use the undo peer preferred-value command to restore the default value.
The default preferred value is 0.
Routes learned from a peer have an initial preferred value.
Among multiple routes that have the same destination/mask and are learned from different peers, the one with the biggest preferred value is selected as the route to the network.
Note that:
If you both reference a routing policy and use the peer { group-name | ip-address } preferred-value value command to set a preferred value for routes from a peer, the routing policy sets a specified non-zero preferred value for routes matching it. Other routes not matching the routing policy uses the value set with the command. If the preferred value specified in the routing policy is zero, the routes matching it will also use the value set with the command. For information about using a routing policy to set a preferred value, refer to the peer { group-name | ip-address } route-policy route-policy-name { export | import }, command and the apply preferred-value preferred-value. command.
Examples
# In BGP view, configure the preferred value as 50 for routes from peer 131.108.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer 131.108.1.1 preferred-value 50
# In BGP-VPN instance view, configure the preferred value as 50 for routes from peer 131.108.1.1 (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer 131.108.1.1 preferred-value 50
5.1.64 peer public-as-only
Syntax
peer { group-name | ip-address } public-as-only
undo peer { group-name | ip-address } public-as-only
View
BGP view/BGP-VPN instance view
Parameters
group-name: Name of a peer group, a string of 1 to 47 characters.
ip-address: IP address of a peer.
Description
Use the peer public-as-only command to not keep private AS numbers in BGP updates sent to a peer/peer group.
Use the undo peer public-as-only command to keep private AS numbers in BGP updates sent to a peer/peer group.
By default, BGP updates carry private AS numbers.
The command does not take effect if the BGP update has both public and private AS numbers. The range of private AS number is from 64512 to 65535.
Examples
# In BGP view, carry no private AS number in BGP updates sent to the peer test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test public-as-only
# In BGP-VPN instance view, carry no private AS number in BGP updates sent to the peer test (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test public-as-only
5.1.65 peer reflect-client
Syntax
peer { group-name | ip-address } reflect-client
undo peer { group-name | ip-address } reflect-client
View
BGP view
Parameters
group-name: Name of a peer group, a string of 1 to 47 characters.
ip-address: IP address of a peer.
Description
Use the peer reflect-client command to configure the router as a route reflector and specify a peer/peer group as a client.
Use the undo peer reflect-client command to remove the configuration.
By default, neither route reflector nor client is configured.
Related commands: reflect between-clients and reflect cluster-id.
Examples
# In BGP view, configure the local device as a route reflector and specify the IBGP peer group test as a client.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test reflect-client
5.1.66 peer route-limit
Syntax
peer { group-name | ip-address } route-limit limit [ percentage ]
undo peer { group-name | ip-address } route-limit
View
BGP view/BGP-VPN instance view
Parameters
group-name: Name of a peer group, a string of 1 to 47 characters.
ip-address: IP address of a peer.
limit: Upper limit of IP prefixes that can be received from the peer or peer group, in the range 1 to 15360.
percentage: If the number of received routes reaches the specified percentage of the upper limit, the system will generate alarm information. The percentage is in the range from 1 to 100. The default is 75.
Description
Use the peer route-limit command to set the maximum number of routes that can be received from a peer/peer group.
Use the undo peer route-limit command to restore the default.
The number is unlimited by default.
Examples
# In BGP view, set the number of routes that can be received from peer 129.140.6.6 to 10000.
<Sysname> system-view
[Sysname] bgp 109
[Sysname-bgp] peer 129.140.6.6 as-number 110
[Sysname-bgp] peer 129.140.6.6 route-limit 10000
# In BGP-VPN instance view, set the maximum number of routes that can be received from peer 129.140.6.6 to 10000 (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 109
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer 129.140.6.6 as-number 110
[Sysname-bgp-vpn1] peer 129.140.6.6 route-limit 10000
5.1.67 peer route-policy
Syntax
peer { group-name | ip-address } route-policy route-policy-name { export | import }
undo peer { group-name | ip-address } route-policy route-policy-name { export | import }
View
BGP view/BGP-VPN instance view
Parameters
group-name: Name of a peer group, a string of 1 to 47 characters.
ip-address: IP address of a peer.
route-policy-name: Routing policy name, a string of 1 to 19 characters.
export: Applies the routing policy to routes outgoing to the peer (or peer group).
import: Applies the routing policy to routes incoming from the peer (or peer group).
Description
Use the peer route-policy command to apply a routing policy to routes incoming from or outgoing to a peer or peer group.
Use the undo peer route-policy command to remove the configuration.
By default, no inbound/outbound routing policy is configured for the peer/peer group.
The peer route-policy command does not apply the if-match interface clause in the referenced routing policy. Refer to Routing Policy Configuration Commands for related commands.
Examples
# In BGP view, apply routing policy test-policy to routes outgoing to peer group test.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test route-policy test-policy export
# In BGP-VPN instance view, apply routing policy test-policy to routes outgoing to the peer group test (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test route-policy test-policy export
5.1.68 peer route-update-interval
Syntax
peer { group-name | ip-address } route-update-interval seconds
undo peer { group-name | ip-address } route-update-interval
View
BGP view/BGP-VPN instance view
Parameters
group-name: Name of a peer group, a sting of 1 to 47 characters.
ip-address: IP address of a peer.
seconds: Minimum interval for sending the same update message. The range is 5 to 600 seconds.
Description
Use the peer route-update-interval command to specify the interval for sending the same update to a peer/peer group.
Use the undo peer route-update-interval command to restore the default value.
By default, the interval is 5 seconds for IBGP peers, and 30 seconds for EBGP peers.
Examples
# In BGP view, specify the interval for sending the same update to peer group test as 10 seconds.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test as-number 100
[Sysname-bgp] peer test route-update-interval 10
# In BGP-VPN instance view, specify the interval for sending the same update to peer group test as 10 seconds (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test as-number 100
[Sysname-bgp-vpn1] peer test route-update-interval 10
5.1.69 peer substitute-as
Syntax
peer { group-name | ip-address } substitute-as
undo peer { group-name | ip-address } substitute-as
View
BGP view/BGP-VPN instance view
Parameters
group-name: Name of a peer group, a sting of 1 to 47 characters.
ip-address: IP address of a peer.
Description
Use the peer substitute-as command to replace the AS number of a peer/peer group in the AS_PATH attribute with the local AS number.
Use the undo peer substitute-as command to remove the configuration.
No AS number is replaced by default.
Examples
# In BGP view, substitute local AS number for AS number of peer 1.1.1.1.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer 1.1.1.1 substitute-as
# In BGP-VPN instance view, substitute local AS number for AS number of peer 1.1.1.1 (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer 1.1.1.1 substitute-as
5.1.70 peer timer
Syntax
peer { group-name | ip-address } timer keepalive keepalive hold holdtime
undo peer { group-name | ip-address } timer
View
BGP view/BGP-VPN instance view
Parameters
group-name: Name of a peer group, a sting of 1 to 47 characters.
ip-address: IP address of a peer.
keepalive: Keepalive interval in seconds, ranging from 1 to 21845.
holdtime: Holdtime interval in seconds, ranging from 3 to 65535.
Description
Use the undo peer timer command to restore the default.
By default, the keepalive and holdtime are 60s and 180s respectively.
Note that:
l The timer configured with this command is preferred to the timer configured with the timer command.
l The holdtime interval must be at least three times the keepalive interval.
Related commands: timer.
Examples
# In BGP view, configure the keepalive interval and holdtime interval for peer group test as 40 seconds and 120 seconds.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] peer test timer keepalive 40 hold 120
# In BGP-VPN instance view, configure the keepalive interval and holdtime interval for peer group test as 40 seconds and 120 seconds (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] peer test timer keepalive 40 hold 120
5.1.71 preference
Syntax
preference { external-preference internal-preference local-preference | route-policy route-policy-name }
undo preference
View
BGP view/BGP-VPN instance view
Parameters
external-preference: Preference of EBGP routes, in the range 1 to 255.
internal-preference: Preference of IBGP routes, in the range 1 to 255.
local-preference: Preference of local routes, in the range 1 to 255.
route-policy-name: Routing policy name, a string of 1 to 19 characters. Using the routing policy can set a preference for routes passing through it. The default value applies to routes filtered out.
Description
Use the preference command to configure preferences for external, internal, and local routes.
Use the undo preference command to restore the default.
For external-preference, internal-preference and local-preference, the bigger the preference value is, the lower the preference is, and the default values are 255, 255, 130 respectively.
Examples
# In BGP view, configure preferences for EBGP, IBGP and local routes as 20, 20 and 200.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] preference 20 20 200
# In BGP-VPN instance view, configure preferences for EBGP, IBGP and local routes as 20, 20 and 200 (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] preference 20 20 200
5.1.72 reflect between-clients
Syntax
reflect between-clients
undo reflect between-clients
View
BGP view
Parameters
None
Description
Use the reflect between-clients command to enable route reflection between clients.
Use the undo reflect between-clients command to disable this function.
By default, route reflection between clients is enabled.
After a route reflector is configured, it reflects the routes of a client to other clients. If the clients of a route reflector are fully meshed, you need disable route reflection between clients to reduce routing costs.
Related commands: reflector cluster-id and peer reflect-client.
Examples
# Disable route reflection between clients.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] undo reflect between-clients
5.1.73 reflector cluster-id
Syntax
reflector cluster-id cluster-id
undo reflector cluster-id
View
BGP view
Parameters
cluster-id: Cluster ID of the route reflector, an integer from 1 to 4294967295 (the integer is translated into an IP address by the system) or an IP address.
Description
Use the reflector cluster-id command to configure the cluster ID of the route reflector.
Use the undo reflector cluster-id command to remove the configured cluster ID.
By default, each route reflector uses its router ID as the cluster ID.
Usually, there is only one route reflector in a cluster. The router ID of the route reflector is the ID of the cluster. You can configure multiple route reflectors to improve the stability of the network. In this case, using this command can configure the identical cluster ID for all the route reflectors to avoid routing loops.
Related commands: reflect between-clients and peer reflect-client.
Examples
# Set the cluster ID to 80.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] reflector cluster-id 80
5.1.74 refresh bgp
Syntax
refresh bgp { all | ip-address | group group-name | external | internal } { export | import }
View
User view
Parameters
all: Soft-resets all BGP connections.
ip-address: Soft-resets the BGP connection to a peer.
group-name: Soft-resets connections to a peer group, name of which is a sting of 1 to 47 characters.
external: EBGP connection.
internal: IBGP connection.
export: Outbound soft reset.
import: Inbound soft reset.
Description
Use the refresh bgp command to perform soft reset on specified BGP connections. Using this function can refresh the BGP routing table without tearing down BGP connections and apply a newly configured routing policy.
To perform BGP soft reset, all routers in the network must support route-refresh. If a router not supporting route-refresh exists in the network, you need to configure the peer keep-all-routes command to save all routing updates before performing soft reset.
Examples
# Perform inbound BGP soft reset.
<Sysname> refresh bgp all import
5.1.75 reset bgp
Syntax
reset bgp { all | as-number | ip-address [ flap-info ] | group group-name | external | internal }
View
User view
Parameters
all: Resets all BGP connections.
as-number: Resets BGP connections to peers in the AS.
ip-address: Specifies the IP address of a peer with which to reset the connection.
flap-info: Clears history information of routing flap.
group group-name: Specifies to reset connections with the specified BGP peer group.
external: Resets all the EBGP connections.
internal: Resets all the IBGP connections.
Description
Use the reset bgp command to reset specified BGP connections.
Examples
# Reset all the BGP connections.
<Sysname> reset bgp all
5.1.76 reset bgp dampening
Syntax
reset bgp dampening [ ip-address [ mask | mask-length ] ]
View
User view
Parameters
ip-address: Destination IP address of a route.
mask: Mask, in dotted decimal notation.
mask-length: Mask length, in the range 0 to 32.
Description
Use the reset bgp dampening command to clear route dampening information and release suppressed routes.
Related commands: dampening, display bgp routing-table dampened.
Examples
# Clear damping information of route 20.1.0.0/16 and release suppressed route.
<Sysname> reset bgp dampening 20.1.0.0 255.255.0.0
5.1.77 reset bgp flap-info
Syntax
reset bgp flap-info [ regexp as-path-regexp | as-path-acl as-path-acl-number | ip-address [ mask | mask-length ] ]
View
User view
Parameters
as-path-regexp: Clears the flap statistics of routes matching the AS path regular expression.
as-path-acl-number: Clears the flap statistics of routes matching an AS path ACL, number of which is in the range 1 to 256.
ip-address: Clears the flap statistics of a route.
mask: Network mask, in dotted decimal notation.
mask-length: Mask length, in the range 0 to 32.
Description
Use the reset bgp flap-info command to clear the flap statistics of routes matching the specified filter.
The flap statistics of all the routes will be cleared if no parameter is specified.
Examples
# Clear the flap statistics of all routes matching AS path ACL 10.
<Sysname> reset bgp flap-info as-path-acl 10
5.1.78 reset bgp ipv4 all
Syntax
reset bgp ipv4 all
View
User view
Parameters
None
Description
Use the reset bgp ipv4 all command to reset all the BGP connections of IPv4 unicast address family.
Examples
# Reset all the BGP connections of IPv4 unicast address family.
<Sysname> reset bgp ipv4 all
5.1.79 router-id
Syntax
router-id router-id
undo router-id
View
BGP view
Parameters
router-id: Router ID in IP address format.
Description
Use the router-id command to specify a router ID.
Use the undo router-id command to remove the router ID.
To run BGP protocol, a router must have a router ID, which is an unsigned 32-bit integer, the unique ID of the router in the AS.
You can specify a router ID manually. If not, the system selects an IP address as the router ID. The selection sequence is the highest IP address among loopback interface addresses; if not available, then the highest IP address of interfaces. It is recommended to specify a loopback interface address as the router ID to enhance network reliability.
Only when the interface with the selected Router ID or the manual Router ID is deleted will the system select another ID for the router.
Examples
# Specifies the Router ID as 10.18.4.221.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] router-id 10.18.4.221
5.1.80 summary automatic
Syntax
summary automatic
undo summary automatic
View
BGP view/BGP-VPN instance view
Parameters
None
Description
Use the summary automatic command to enable automatic summarization for redistributed subnets.
Use the undo summary automatic command to disable automatic summarization.
By default, automatic summarization is disabled.
Note that:
l Neither the default route nor the routes imported using the network command can be summarized automatically.
l With this feature enabled, BGP limits the subnets redistribution from IGP to reduce the size of routing table.
Examples
# In BGP view, enable automatic summarization.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] summary automatic
# In BGP-VPN instance view, enable automatic summarization (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] summary automatic
5.1.81 synchronization
Syntax
synchronization
undo synchronization
View
BGP view
Parameters
None
Description
Use the synchronization command to enable the synchronization between the BGP and IGP routes.
Use the undo synchronization command to disable the synchronization.
The feature is disabled by default.
With this feature enabled and when a non-BGP router is responsible for forwarding packets in an AS, BGP speakers in the AS cannot advertise routing information to other ASs unless all routers in the AS know the latest routing information.
When a BGP router receives an IBGP route, it checks only whether the next hop is reachable by default. If the synchronization is enabled, the IBGP route is synchronized and advertised to EBGP peers only when the route is also advertised by IGP. Otherwise, the IBGP route cannot be advertised to EBGP peers.
Examples
# Enable the synchronization between BGP and IGP routes.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] synchronization
5.1.82 timer
Syntax
timer keepalive keepalive hold holdtime
undo timer
View
BGP view/BGP-VPN instance view
Parameters
keepalive: Keepalive interval in seconds, ranging from 1 to 21845.
holdtime: Holdtime interval in seconds, ranging from 3 to 65535.
Description
Use the timer command to configure BGP keepalive interval and holdtime interval.
Use the undo timer command to restore the default.
By default, BGP keepalive and holdtime intervals are 60s and 180s.
Note that:
l Timer configured using the peer timer command is preferred to the timer configured using this command.
l The holdtime interval must be at least three times the keepalive interval.
l The configured timer applies to all the BGP peers, while it becomes valid only after the corresponding BGP connections are reset.
Related commands: peer timer.
Examples
# Configure keepalive interval and holdtime interval as 40 seconds and 120 seconds.
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] timer keepalive 40 hold 120
# In BGP-VPN instance view, configure keepalive interval and holdtime interval as 40 seconds and 120 seconds (the VPN has been created).
<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp] ipv4-family vpn-instance vpn1
[Sysname-bgp-vpn1] timer keepalive 40 hold 120
Chapter 6 Routing Policy Configuration Commands
& Note:
l The term “router” in this document refers to a router in a generic sense or an Ethernet switch running routing protocols.
l Routing Policy Common Configuration Commands are applicable to both IPv4 and IPv6.
6.1 Routing Policy Common Configuration Commands
6.1.1 apply as-path
Syntax
apply as-path as-number&<1-10> [ replace ]
undo apply as-path
View
Routing policy view
Parameters
as-number: Autonomous system number, in the range of 1 to 65535.
&<1-10>: Indicates you can enter as-number up to 10 times.
replace: Replaces the original AS number.
Description
Use the apply as-path command to apply the specified AS numbers to BGP routes.
Use the undo apply as-path command to remove the clause configuration.
No AS_PATH attribute is set by default.
With the replace keyword, using the apply as-path command replaces the original AS_PATH attribute with specified AS numbers. Without the replace keyword, using this command adds the specified AS numbers before the original AS_PATH attribute.
Examples
# Create routing policy policy1 with node 10, matching mode as permit. If BGP routing information matches AS-path-ACL 1, add AS number 200 before the original AS_PATH attribute.
<Sysname> system-view
[Sysname] route-policy policy1 permit node 10
[Sysname-route-policy] if-match as-path 1
[Sysname-route-policy] apply as-path 200
6.1.2 apply comm-list delete
Syntax
apply comm-list comm-list-number delete
undo apply comm-list
View
Routing policy view
Parameters
comm-list-number: Community list number. The basic community list number ranges from 1 to 99. The advanced community list number ranges from 100 to 199.
Description
Use the apply comm-list delete command to remove community attributes in BGP routing information specified by the community list.
Use the undo apply comm-list command to remove the clause configuration.
No community attributes are removed by default.
Examples
# Create routing policy policy1 with node 10, matching mode as permit. If BGP routing information matches AS-path-ACL 1, remove community attributes specified in community list 1.
<Sysname> system-view
[Sysname] route-policy policy1 permit node 10
[Sysname-route-policy] if-match as-path 1
[Sysname-route-policy] apply comm-list 1 delete
6.1.3 apply community
Syntax
apply community { none | additive | { community-number&<1-16> | aa:nn&<1-16> | internet | no-export-subconfed | no-export | no-advertise } * [ additive ] }
undo apply community
View
Routing policy view
Parameters
none: Removes community attributes of BGP routes.
community-number: Community sequence number, in the range 1 to 4294967295.
aa:nn: Community number; both aa and nn are in the range 0 to 65535.
&<1-16>: Indicates the argument before it can be entered up to 16 times.
internet: Sets the internet community attribute for matched BGP routes. Routes with this attribute are advertised to all BGP peers.
no-export-subconfed: Sets the no-export-subconfed community attribute for matched BGP routes. Routes with this attribute are not advertised out the sub autonomous system.
no-advertise: Sets the no-advertise community attribute for matched BGP routes. Routes with this attribute are not advertised to any peers.
no-export: Sets the no-export community attribute for matched BGP routes. Routes with this attribute are not advertised out the autonomous system or confederation, but can be advertised to other sub ASs in the confederation.
additive: Adds the specified community attribute to the original community attribute of a matched BGP route.
Description
Use the apply community command to set the specified community attribute for BGP routes.
Use the undo apply community command to remove the apply clause.
No community attribute is set by default.
Related commands: ip community-list, if-match community, route-policy.
Examples
# Create routing policy setcommunity with node 16 and matching mode as permit. Set the no-export community attribute for BGP routes passing AS-path-ACL 8.
<Sysname> system-view
[Sysname] route-policy setcommunity permit node 16
[Sysname-route-policy] if-match as-path 8
[Sysname-route-policy] apply community no-export
6.1.4 apply cost
Syntax
apply cost [ + | - ] value
undo apply cost
View
Routing policy view
Parameters
+: Increases cost value.
+: Decreases cost value.
cost: Specifies a cost from 0 to 4294967295.
Description
Use the apply cost command to set a cost for routing information.
Use the undo apply cost command to remove the clause configuration.
No cost is set for routing information by default.
Related commands: if-match interface, if-match acl, if-match ip-prefix, if-match ip next-hop, if-match cost, if-match tag, route-policy, apply ip-address next-hop, apply local-preference, apply origin, apply tag.
Examples
# Create routing policy policy1 with node 10, matching mode as permit. If a route matches the outbound interface VLAN-interface 10, set the cost for the route to 120.
<Sysname> system-view
[Sysname] route-policy policy1 permit node 10
[Sysname-route-policy] if-match interface vlan-interface 10
[Sysname-route-policy] apply cost 120
6.1.5 apply cost-type
Syntax
apply cost-type { external | internal | type-1 | type-2 }
undo apply cost-type
View
Routing policy view
Parameters
external: IS-IS external route.
internal: IS-IS internal route.
type-1: Type-1 external route of OSPF.
type-2: Type-2 external route of OSPF.
Description
Use the apply cost-type command to set a cost type for routing information.
Use the undo apply cost-type command to remove the clause configuration.
No cost type is set for routing information by default.
Examples
# Create routing policy policy1 with node 10, matching mode as permit. If a route matches tag 8, set the cost type for the route to IS-IS internal route.
<Sysname> system-view
[Sysname] route-policy policy1 permit node 10
[Sysname-route-policy] if-match tag 8
[Sysname-route-policy] apply cost-type internal
6.1.6 apply extcommunity
Syntax
apply extcommunity { rt route-target }&<1-16> [ additive ]
undo apply extcommunity
View
Routing policy view
Parameters
rt route-target: Sets the route target extended community attribute, which is a string of 3 to 21 characters. route-target has two forms:
16-bit AS number: 32-bit self-defined number, for example, 101:3;
32-bit IP address: 16-bit self-defined number, for example, 192.168.122.15:1.
&<1-16>: Indicates the argument before it can be entered up to 16 times.
additive: Adds to the original community attribute of a route..
Description
Use the apply extcommunity command to apply the specified extended community attribute to BGP routes.
Use the undo apply extcommunity command to remove the clause configuration.
No extended community attribute is set for routing information by default.
Examples
# Create routing policy policy1 with node 10, matching mode as permit. If a BGP route matches AS-path-ACL 1, add the RT extended community attribute 100:2 to the route.
<Sysname> system-view
[Sysname] route-policy policy1 permit node 10
[Sysname-route-policy] if-match as-path 1
[Sysname-route-policy] apply extcommunity rt 100:2 additive
6.1.7 apply isis
Syntax
apply isis { level-1 | level-1-2 | level-2 }
undo apply isis
View
Routing policy view
Parameters
level-1: Redistributes routes into IS-IS level-1 area.
level-2: Redistributes routes into IS-IS level-2 area.
level-1-2: Redistributes routes into both IS-IS level-1 and level-2 areas.
Description
Use the apply isis command to redistribute routes into a specified ISIS level.
Use the undo apply isis command to remove the clause configuration.
No level is set by default.
Related commands: if-match interface, if-match acl, if-match ip-prefix, if-match ip next-hop, if-match cost, if-match tag, route-policy, apply cost, apply origin, apply tag.
Examples
# Create routing policy policy1 with node 10, matching mode as permit. If a route matches tag 8, redistribute the route to IS-IS level-2 area.
<Sysname> system-view
[Sysname] route-policy policy1 permit node 10
[Sysname-route-policy] if-match tag 8
[Sysname-route-policy] apply isis level-2
6.1.8 apply local-preference
Syntax
apply local-preference preference
undo apply local-preference
View
Routing policy view
Parameters
preference: BGP local preference, in the range 0 to 4294967295.
Description
Use the apply local-preference command to apply the specified local preference to BGP routes.
Use the undo apply local-preference command to remove the clause configuration.
No local preference is set for BGP routing information by default.
Related commands: route-policy.
Examples
# Create routing policy policy1 with node 10, matching mode as permit. If a route matches AS-path-ACL 1, set the local preference for the route to 130.
<Sysname> system-view
[Sysname] route-policy policy1 permit node 10
[Sysname-route-policy] if-match as-path 1
[Sysname-route-policy] apply local-preference 130
6.1.9 apply origin
Syntax
apply origin { igp | egp as-number | incomplete }
undo apply origin
View
Routing policy view
Parameters
igp: Sets the origin of BGP routing information to IGP.
egp: Sets the origin of BGP routing information to EGP.
as-number: Autonomous system number for EGP routes, in the range of 1 to 65535.
incomplete: Sets the origin of BGP routing information to unknown.
Description
Use the apply origin command to apply the specified origin attribute to BGP routes.
Use the undo apply origin command to remove the clause configuration.
No origin attribute is set for routing information by default.
Related commands: if-match interface, if-match acl, if-match ip-prefix, if-match ip next-hop, if-match cost, if-match tag, route-policy, apply ip-address next-hop, apply local-preference, apply cost, apply tag.
Examples
# Create routing policy policy1 with node 10, matching mode as permit. If a route matches AS-path-ACL 1, set the origin for the route to IGP.
<Sysname> system-view
[Sysname] route-policy policy1 permit node 10
[Sysname-route-policy] if-match as-path 1
[Sysname-route-policy] apply origin igp
6.1.10 apply preference
Syntax
apply preference preference
undo apply preference
View
Routing policy view
Parameters
preference: Routing preference, in the range of 1 to 255.
Description
Use the apply preference command to set a preference for a routing protocol.
Use the undo apply preference command to remove the clause configuration.
No preference is set for a routing protocol by default.
If you set preferences for routing protocols with the preference command, using the apply preference command will set a new preference for a matched routing protocol. Other routing protocols not satisfying criteria still use the preferences set by the preference command.
Examples
# Create routing policy policy1 with node 10, matching mode as permit. If a route matches OSPF external route type, set the preference for the routing protocol to 90.
<Sysname> system-view
[Sysname] route-policy policy1 permit node 10
[Sysname-route-policy] if-match route-type external-type1or2
[Sysname-route-policy] apply preference 90
6.1.11 apply preferred-value
Syntax
apply preferred-value preferred-value
undo apply preferred-value
View
Routing policy view
Parameters
preferred-value: Preferred value, in the range of 0 to 65535.
Description
Use the apply preferred-value command to apply a preferred value to BGP routes.
Use the undo apply preferred-value command to remove the clause configuration.
No preferred value is set for BGP routes by default.
Examples
# Create routing policy policy1 with node 10, matching mode as permit. If a BGP route matches AS-path-ACL 1, set the preferred value 66 for the BGP route.
<Sysname> system-view
[Sysname] route-policy policy1 permit node 10
[Sysname-route-policy] if-match as-path 1
[Sysname-route-policy] apply preferred-value 66
6.1.12 apply tag
Syntax
apply tag value
undo apply tag
View
Routing policy view
Parameters
value: Tag value, in the range 0 to 4294967295.
Description
Use the apply tag command to set a specified tag value for RIP, OSPF or IS-IS routing information.
Use the undo apply tag command to remove the clause configuration.
No routing tag is set for RIP, OSPF or IS-IS routing information by default.
Related commands: if-match interface, if-match acl, if-match ip-prefix, if-match ip next-hop, if-match cost, if-match tag, route-policy, apply ip-address next-hop, apply local-preference, apply cost, apply origin.
Examples
# Create routing policy policy1 with node 10, matching mode as permit. If a route matches OSPF external route type 1, set the tag of the route to 100.
<Sysname> system-view
[Sysname] route-policy policy1 permit node 10
[Sysname-route-policy] if-match route-type external-type1
[Sysname-route-policy] apply tag 100
6.1.13 display ip as-path
Syntax
display ip as-path [ as-path-number ]
View
Any view
Parameters
as-path-number: AS path ACL number, in the range of 1 to 256.
Description
Use the display ip as-path command to display BGP AS path ACL information.
Information about all BGP AS path lists will be displayed if no as-path-number is specified.
Related commands: ip as-path, if-match as-path, apply as-path.
Examples
# Display the information of BGP AS path list 1.
<Sysname> display ip as-path 1
ListID Mode Expression
1 permit 2
Table 6-1 Description on the fields of the display ip as-path command
Field |
Description |
ListID |
AS path ACL ID |
Mode |
Matching mode: permit, deny |
Expression |
Regular expression for matching |
6.1.14 display ip community-list
Syntax
display ip community-list [ basic-community-list-number | adv-community-list-number ]
View
Any view
Parameters
basic-community-list-number: Basic community list number, in the range of 1 to 99.
adv-community-list-number: Advanced community list number, in the range of 100 to 199.
Description
Use the display ip community-list command to display BGP community list information.
All BGP community list information will be displayed if no basic-community-list-number or adv-community-list-number is specified.
Related commands: ip community-list, if-match community, apply community.
Examples
# Display the information of the BGP community list 1.
<Sysname> display ip community-list 1
Community List Number 1
permit 1:1 1:2 2:2
6.1.15 display ip extcommunity-list
Syntax
display ip extcommunity-list [ ext-comm-list-number ]
View
Any view
Parameters
ext-comm-list-number: Extended community list number, in the range of 1 to 199.
Description
Use the display ip extcommunity-list command to display BGP extended community list information.
All BGP extended community list information will be displayed if no ext-comm-list-number is specified.
Related commands: ip extcommunity-list, if-match extcommunity, apply extcommunity.
Examples
# Display the information of BGP extended community list 1.
<Sysname> display ip extcommunity-list 1
Extended Community List Number 1
permit rt : 9:6
6.1.16 display route-policy
Syntax
display route-policy [ route-policy-name ]
View
Parameters
route-policy-name: Routing policy name, a string of 1 to 19 characters.
Description
Use the display route-policy command to display routing policy information.
All routing policy information will be displayed if no route-policy-name is specified.
Related commands: route-policy.
Examples
# Display the information of routing policy 1.
<Sysname> display route-policy policy1
Route-policy : policy1
permit : 10
if-match ip-prefix abc
apply cost 120
Table 6-2 Description on the fields of the display route-policy command.
Field |
Description |
Route-policy |
Routing policy name |
Permit |
permit mode: permit, deny |
if-match ip-prefix abc |
Match criterion |
apply cost 120 |
If the match criterion is satisfied, set the route cost to 120. |
6.1.17 if-match as-path
Syntax
if-match as-path as-path-number&<1-16>
undo if-match as-path [ as-path-number&<1-16> ]
View
Routing policy view
Parameters
as-path-number: AS path list number, in the range of 1 to 256.
&<1-16>: Indicates the argument before it can be entered up to 16 times.
Description
Use the if-match as-path command to specify AS path list (s) for matching against the AS path attribute of BGP routing information.
Use the undo if-match as-path command to remove the match criterion.
The match criterion is not configured by default.
This command is one of the if-match clauses of a route policy, used for filtering BGP routing information and specifying match criteria according to the AS path attribute of routing information.
Related commands: route-policy, ip as-path-acl.
Examples
# Define as-path list 2, allowing routing information containing AS 200 or 300 to pass. Define routing policy test with node 10, and set an if-match clause using the as-path list for matching.
<Sysname> system-view
[Sysname] ip as-path 2 permit _*200.*300
[Sysname] route-policy test permit node 10
[Sysname-route-policy] if-match as-path 2
6.1.18 if-match community
Syntax
if-match community { basic-community-list-number [ whole-match ] | adv-community-list-number }&<1-16>
undo if-match community [ basic-community-list-number | adv-community-list-number ]&<1-16>
View
Routing policy view
Parameters
basic-community-list-number: Basic community list number, in the range of 1 to 99.
adv-community-list-number: Advanced community list number, in the range of 100 to 199.
whole-match: Specifies the exact match. All and only the specified communities must be present.
&<1-16>: Indicates the argument before it can be entered up to 16 times.
Description
Use the if-match community command to specify community list(s) for matching against the community attribute of BGP routing information.
Use the undo if-match community command to remove the match criterion.
The match criterion is not configured by default.
This command is one of the if-match clauses of route policy, used for filtering BGP routing information and specifying match criterion according to the community attribute of BGP routing information.
Related commands: route-policy, ip community-list.
Examples
# Define community-list 1, allowing routing information with community number 100 or 200 to pass. Then define a routing policy named test, whose node 10 is defined with an if-match clause to reference the community-list for matching.
[Sysname] ip community-list 1 permit 100 200
[Sysname] route-policy test permit node 10
[Sysname-route-policy] if-match community 1
6.1.19 if-match cost
Syntax
if-match cost value
undo if-match cost
View
Routing policy view
Parameters
cost: Specifies the cost to match, ranging from 0 to 4294967295.
Description
Use the if-match cost command to specify a cost for matching against the cost of a route.
Use the undo if-match cost command to remove the match criterion.
The match criterion is not configured by default.
This command is one of the if-match clauses of routing policy, used for matching routes with the specified route cost.
Related commands: if-match interface, if-match acl, if-match ip-prefix, if-match ip next-hop, if-match tag, route-policy, apply ip-address next-hop, apply cost, apply local-preference, apply origin, apply tag.
Examples
# Create routing policy policy1 with node 10, matching mode as permit. Define an if-match clause to permit routing information with a cost of 8.
<Sysname> system-view
[Sysname] route-policy policy1 permit node 10
[Sysname-route-policy] if-match cost 8
6.1.20 if-match extcommunity
Syntax
if-match extcommunity ext-comm-list-number&<1-16>
undo if-match extcommunity [ ext-comm-list-number&<1-16> ]
View
Routing policy view
Parameters
ext-comm-list-number: Extended community list number, in the range of 1 to 199.
&<1-16>: Indicates the argument before it can be entered up to 16 times.
Description
Use the if-match extcommunity command to specify extended community list(s) for matching against the extended community attribute of routing information.
Use the undo if-match extcommunity command to remove the match criterion.
The match criterion is not configured by default.
Examples
# Create a routing policy named policy1 with node 10, matching mode as permit. Match the extended community attribute of routes against extended community lists 100 and 150.
<Sysname> system-view
[Sysname] route-policy policy1 permit node 10
[Sysname-route-policy] if-match extcommunity 100 150
6.1.21 if-match interface
Syntax
if-match interface { interface-type interface-number }&<1-16>
undo if-match interface [ interface-type interface-number ]&<1-16>
View
Routing policy view
Parameters
interface-type: Interface type
interface-number: Interface number
&<1-16>: Indicates the argument before it can be entered up to 16 times.
Description
Use the if-match interface command to specify interface(s) for matching against the outbound interfaces of routing information.
Use the undo if-match interface command to remove the match criterion.
The match criterion is not configured by default.
Related commands: if-match acl, if-match ip-prefix, if-match ip next-hop, if-match cost, if-match tag, route-policy, apply ip-address next-hop, apply cost, apply local-preference, apply origin, apply tag.
Examples
# Create a routing policy named policy1 with node 10, matching mode as permit. Define an if-match clause to permit the routing information with the outbound interface as VLAN-interface 1.
[Sysname] route-policy policy1 permit node 10
[Sysname-route-policy] if-match interface vlan-interface 1
6.1.22 if-match route-type
Syntax
if-match route-type { internal | external-type1 | external-type2 | external-type1or2 | is-is-level-1 | is-is-level-2 | nssa-external-type1 | nssa-external-type2 | nssa-external-type1or2 } *
undo if-match route-type [ internal | external-type1 | external-type2 | external-type1or2 | is-is-level-1 | is-is-level-2 | nssa-external-type1 | nssa-external-type2 | nssa-external-type1or2 ] *
View
Routing policy view
Parameters
internal: Internal routes (OSPF intra-area and inter-area routes).
external-type1: OSPF Type 1 external routes.
external-type2: OSPF Type 2 external routes.
external-type1or2: OSPF Type 1 or 2 external routes.
is-is-level-1: IS-IS Level-1 routes.
is-is-level-2: IS-IS Level-2 routes.
nssa-external-type1: OSPF NSSA Type 1 external routes.
nssa-external-type2: OSPF NSSA Type 2 external routes.
nssa-external-type1or2: OSPF NSSA Type 1 or 2 external routes.
Description
Use the if-match route-type command to configure a route type match criterion.
Use the undo if-match route-type command to remove the match criterion.
The match criterion is not configured by default.
Examples
# Create a routing policy named policy1 with node 10, matching mode as permit. Define an if-match clause to match internal routes.
<Sysname> system-view
[Sysname] route-policy policy1 permit node 10
[Sysname-route-policy] if-match route-type internal
6.1.23 if-match tag
Syntax
if-match tag value
undo if-match tag
View
Routing policy view
Parameters
value: Specifies a tag value, ranging from 0 to 4294967295.
Description
Use the if-match tag command to match routing information having the specified tag.
Use the undo if-match tag command to remove the match criterion.
The match criterion is not configured by default.
Related commands: if-match interface, if-match acl, if-match ip-prefix, if-match ip next-hop, if-match cost, route-policy, apply ip-address next-hop, apply cost, apply local-preference, apply origin, apply tag.
Examples
# Create a routing policy named policy1 with node 10, matching mode as permit. Define an if-match clause to permit RIP, OSPF and IS-IS routing information with the tag as 8.
<Sysname> system-view
[Sysname] route-policy policy1 permit node 10
[Sysname-route-policy] if-match tag 8
6.1.24 ip as-path
Syntax
ip as-path as-path-number { deny | permit } regular-expression
undo ip as-path as-path-number
View
System view
Parameters
as-path-number: AS path ACL number, in the range of 1 to 256.
deny: Specifies the matching mode for the AS path ACL as deny.
permit: Specifies the matching mode for the AS path ACL as permit.
regular-expression: Regular expression of AS path, a string of 1 to 50 characters.
BGP routing information contains the AS path attribute field that identifies the autonomous systems through which routing information has passed. Used to compare with the AS path attribute, a regular expression is a formula comprised of characters, for example, ^200. *100$, which matches AS path attribute fields that start with AS200 and end with AS100.
The meanings of special characters used in regular expressions are shown below:
Character |
Meaning |
. |
Matches any single character, including blank space. |
* |
Matches 0 or more patterns. |
+ |
Matches 1 or more patterns. |
^ |
Matches the beginning of an input string. |
$ |
Matches the end of an input string. |
_ |
Matches a comma, left brace, right brace, left parenthesis, right parenthesis, the beginning of an input string, the end of an input string, or a space. |
[ range ] |
Means the range of single-character patterns. |
- |
Separates the ending points of a range. |
Description
Use the ip as-path command to create an AS path ACL.
Use the undo ip as-path command to remove an AS path ACL.
No AS path ACL is created by default.
Examples
# Create an AS path ACL numbered 1, permitting routing information whose AS_PATH starts with 10.
<Sysname> system-view
[Sysname] ip as-path-acl 1 permit ^10
6.1.25 ip community-list
Syntax
ip community-list basic-comm-list-num { deny | permit } [ community-number-list ] [ internet | no-advertise | no-export | no-export-subconfed ] *
undo ip community-list basic-comm-list-num [ community-number-list ] [ internet | no-advertise | no-export | no-export-subconfed ] *
ip community-list adv-comm-list-num { deny | permit } regular-expression
undo ip community-list adv-comm-list-num [ regular-expression ]
View
System view
Parameters
basic-comm-list-num: Basic community list number, in the range 1 to 99.
adv-comm-list-num: Advanced community list number, in the range 100 to 199.
regular-expression: Regular expression of advanced community attribute, a string of 1 to 50 characters.
deny: Specifies the matching mode of the community list as deny.
permit: Specifies the matching mode of the community list as permit.
community-number-list: Community number list, in the community number or aa:nn format, with community number in the range 1 to 4294967295 and aa and nn in the range 0 to 65535. Each format can be entered up to 16 times.
internet: Routes with this attribute can be advertised to all the BGP peers. By default, all routes have this attribute.
no-advertise: Routes with this attribute will not be advertised to other BGP peers.
no-export: Routes with this attribute will not be advertised out the local AS, or the confederation but can be advertised to other ASs in the confederation.
no-export-subconfed: Routes with this attribute can not be advertised out the local AS, or to other sub ASs in the confederation.
Description
Use the ip community-list to define a community list entry.
Use the undo ip community-list command to remove a community list or entry.
No community list is defined by default.
Examples
# Define basic community list 1 to permit routing information with the internet community attribute.
<Sysname> system-view
[Sysname] ip community-list 1 permit internet
# Define advanced community list 100 to permit routing information with the community attribute starting with 10.
<Sysname> system-view
[Sysname] ip community-list 100 permit ^10
6.1.26 ip extcommunity-list
Syntax
ip extcommunity-list ext-comm-list-number { deny | permit } { rt route-target }&<1-16>
undo ip extcommunity-list ext-comm-list-number
View
System view
Parameters
ext-comm-list-number: Extended community list number, in the range 1 to 199.
permit: Specifies the matching mode for the extended community list as permit.
deny: Specifies the matching mode for the extended community list as deny.
rt route-target: Specifies route target extended community attribute, which is a string of 3 to 21 characters. route-target has two forms:
A 16-bit AS number: a 32-bit self-defined number, for example, 101:3;
A 32-bit IP address: a 16-bit self-defined number, for example, 192.168.122.15:1.
&<1-16>: Indicates the argument before it can be entered up to 16 times.
Description
Use the ip extcommunity-list to define an extended community list entry.
Use the undo ip extcommunity-list command to remove an extended community list.
No extended community list is defined by default.
Examples
# Define extended community list 1 to permit routing information with RT 200:200.
<Sysname> system-view
[Sysname] ip extcommunity-list 1 permit rt 200:200
6.1.27 route-policy
Syntax
route-policy route-policy-name { permit | deny } node node-number
undo route-policy route-policy-name [ node node-number ]
View
System view
Parameters
route-policy-name: Routing policy name, a string of 1 to 19 characters.
permit: Specifies the matching mode of the routing policy node as permit. If a route satisfies all the if-match clauses of the node, it passes through the filtering of the node and then is executed with the apply clauses of the node. If not, it goes to the next node of the routing policy.
deny: Specifies the matching mode of the routing policy node as deny. If a route satisfies all the if-match clauses of the node, it does not pass the filtering of the node and will not go to the next node.
node node-number: Node number, in the range 0 to 65535. The node with a smaller node-number will be tested first when the routing policy is used for filtering routing information.
Description
Use the route-policy command to create a routing policy and enter its view.
Use the undo route-policy command to remove a routing policy.
No routing policy is created by default.
A routing policy is used for routing information filtering or policy routing. It contains several nodes and each node comprises some if-match and apply clauses. The if-match clauses define the matching criteria of the node and the apply clauses define the actions performed after a packet passes the filtering of the node. The relation among the if-match clauses of a node is logic AND, namely all the if-match clauses must be satisfied. The filter relation among different route-policy nodes is logic OR, namely a packet passing a node passes the routing policy.
Related commands: if-match interface, if-match acl, if-match ip-prefix, if-match ip next-hop, if-match cost, if-match tag, apply ip-address next-hop, apply local-preference, apply cost, apply origin, apply tag.
Examples
# Create routing policy 1 with node 10 and matching mode as permit, and then enter routing policy view.
<Sysname> system-view
[Sysname] route-policy policy1 permit node 10
[Sysname-route-policy]
6.2 IPv4 Routing Policy Configuration Commands
6.2.1 apply ip-address next-hop
Syntax
apply ip-address next-hop ip-address
undo apply ip-address next-hop
View
Routing policy view
Parameters
ip-address: IP address of the next hop.
Description
Use the apply ip-address next-hop command to set a next hop for IPv4 routing information.
Use the undo apply ip-address next-hop command to remove the clause configuration.
No next hop address is set for IPv4 routing information by default.
It is invalid to use the apply ip-address next-hop command to set a next hop when redistributing routes.
Related commands: if-match interface, if-match acl, if-match ip-prefix, if-match ip next-hop, if-match cost, if-match tag, route-policy, apply local-preference, apply cost, apply origin, apply tag.
Examples
# Create routing policy policy1 with node 10, matching mode permit. If passing AS path ACL 1, a route‘s next hop is set to 193.1.1.8.
<Sysname> system-view
[Sysname] route-policy policy1 permit node 10
[Sysname-route-policy] if-match as-path 1
[Sysname-route-policy] apply ip-address next-hop 193.1.1.8
6.2.2 display ip ip-prefix
Syntax
display ip ip-prefix [ ip-prefix-name ]
View
Any view
Parameters
ip-prefix-name: IP prefix list name, a string of 1 to 19 characters.
Description
Use the display ip ip-prefix command to display the statistics of an IPv4 prefix list. If no ip-prefix-name is specified, statistics for all IPv4 prefix lists will be displayed.
Related commands: ip ip-prefix.
Examples
# Display the statistics of IPv4 prefix list abc.
<Sysname> display ip ip-prefix abc
Prefix-list abc
Permitted 0
Denied 0
index: 10 permit 1.0.0.0/11 ge 22 le 32
Table 6-3 Description on the fields of the display ip ip-prefix command.
Field |
Description |
Prefix-list |
Name of the IPv4 prefix list |
Permitted |
Number of routes satisfying the match criterion |
Denied |
Number of routes not satisfying the match criterion |
index |
Internal serial number of the IPv4 prefix list |
permit |
Matching mode: permit or deny |
1.0.0.0/11 |
Match IP address and mask |
ge |
greater-equal, the lower limit mask |
le |
less-equal, the upper limit mask |
6.2.3 if-match acl
Syntax
if-match acl acl-number
undo if-match acl
View
Routing policy view
Parameters
acl-number: ACL number from 2000 to 3999.
Description
Use the if-match acl command to configure an ACL match criterion.
Use the undo if-match acl command to remove the match criterion.
No ACL match criterion is configured by default.
Related commands: if-match interface, if-match ip next-hop, if-match cost, if-match tag, route-policy, apply ip-address next-hop, apply cost, apply local-preference, apply origin, apply tag.
Examples
# Create routing policy policy1 with node 10, matching mode as permit. Define an if-match clause to permit routes matching ACL 2000.
<Sysname> system-view
[Sysname] route-policy policy1 permit node 10
[Sysname-route-policy] if-match acl 2000
6.2.4 if-match ip
Syntax
if-match ip { next-hop | route-source } { acl acl-number | ip-prefix ip-prefix-name }
undo if-match ip { next-hop | route-source } [ acl | ip-prefix ]
View
Routing policy view
Parameters
next-hop: Matches next hop.
route-source: Matches source address.
acl acl-number: Matches an ACL with a number from 2000 to 2999.
ip-prefix ip-prefix-name: Matches an IP prefix list with a name being a string of 1 to 19 characters.
Description
Use the if-match ip command to configure a next hop or source address match criterion for IPv4 routes.
Use the undo if-match ip command to remove the match criterion.
The match criterion is not configured by default.
Related commands: route-policy.
Examples
# Create routing policy policy1 with node 10, matching mode permit. Define an if-match clause to permit routing information whose next hop address matches IP prefix list p1.
<Sysname> system-view
[Sysname] route-policy policy1 permit node 10
[Sysname-route-policy] if-match ip next-hop ip-prefix p1
6.2.5 if-match ip-prefix
Syntax
if-match ip-prefix ip-prefix-name
undo if-match ip-prefix
View
Routing policy view
Parameters
ip-prefix-name: Matches an IP prefix list with a name being a string of 1 to 19 characters.
Description
Use the if-match ip-prefix command to configure an IP prefix list based match criterion.
Use the undo if-match ip-prefix command to remove the match criterion.
No IP prefix list based match criterion is configured by default.
Related commands: if-match interface, if-match ip next-hop, if-match cost, if-match tag, route-policy, apply ip-address next-hop, apply cost, apply local-preference, apply origin, apply tag.
Examples
# Create routing policy policy1 with node 10, matching mode as permit. Define an if-match clause to permit a route whose destination address matches IP prefix list p1.
<Sysname> system-view
[Sysname] route-policy policy1 permit node 10
[Sysname-route-policy] if-match ip-prefix p1
6.2.6 ip ip-prefix
Syntax
ip ip-prefix ip-prefix-name [ index index-number ] { permit | deny } ip-address mask-length [ greater-equal min-mask-length ] [ less-equal max-mask-length ]
undo ip ip-prefix ip-prefix-name [ index index-number ]
View
System view
Parameters
ip-prefix-name: IPv4 prefix list name, a string of 1 to 19 characters.
index-number: Index number, in the range 1 to 65535, for uniquely specifying an item of the IPv4 prefix list. The index with a smaller number is tested first.
permit: Specifies the matching mode for the IPv4 prefix list as permit, that is, when a route to be filtered is in the range of the IPv4 prefix list, the route passes the IPv4 prefix list without needing to enter the next item for testing. If the route to be filtered is not in the prefix range, it will enter the next item test.
deny: Specifies the matching mode for the IPv4 prefix list as deny, that is, when a route to be filtered is in the IPv4 prefix list range, the route neither passes the filter nor enters the next node for testing. If not in the range, the route will enter the next item test.
ip-address mask-length: Specifies an IPv4 address prefix and mask length. The mask-length is in the range 0 to 32.
min-mask-length, max-mask-length: Specifies the range for prefix if the IPv4 address and prefix length are matched. greater-equal means “greater than or equal to” and less-equal means “less than or equal to”. The range relation is mask-length <= min-mask-length <= max-mask-length <= 32. If only min-mask-length is specified, the prefix length range is [ min-mask-length, 32 ]. If only max-mask-length is specified, the prefix length range is [mask-length, max-mask-length ]. If both min-mask-length and max-mask-length are specified, the prefix length range is [ min-mask-length, max-mask-length ].
Description
Use the ip ip-prefix command to configure an IPv4 prefix list item.
Use the undo ip ip-prefix command to remove an IPv4 prefix list or an item.
No IPv4 prefix list is configured by default.
An IPv4 prefix list is used to filter IPv4 addresses. It may have multiple items, each of which specifies a range of IPv4 prefix. The filtering relation among items is logic OR, namely, passing any item means the IPv4 prefix list is passed. If no item is passed, the IP prefix list cannot be passed.
The IP prefix range is determined by mask-length and [ min-mask-length, max-mask-length ]. If both mask-length and [ min-mask-length, max-mask-length ] are specified, then the IP address to be filtered must satisfy both of them.
If ip-address mask-length is specified as 0.0.0.0 0, then only the default routes will be matched.
To match all the routes, configure ip-address mask-length as 0.0.0.0 0 and specify less-equal 32.
Examples
# Create a routing policy named policy1 with node 10, matching mode as permit. Define an IP prefix list named p1 to permit only the routes in the network segment 10.0.192.0/8 and with mask length 17 or 18.
<Sysname> system-view
[Sysname] ip ip-prefix p1 permit 10.0.192.0 8 greater-equal 17 less-equal 18
6.2.7 reset ip ip-prefix
Syntax
reset ip ip-prefix [ ip-prefix-name ]
View
User view
Parameters
ip-prefix-name: IP prefix list name, a string of 1 to 19 characters.
Description
Use the reset ip ip-prefix command to clear the statistics of a specified IPv4 prefix list. If no ip-prefix-name is specified, the statistics of all the IPv4 prefix lists will be cleared.
Examples
# Clear the statistics of IPv4 prefix list abc.
<Sysname> reset ip ip-prefix abc