- Table of Contents
-
- 04-Layer 3 Command Reference
- 00-Preface
- 01-ARP Commands
- 02-IP Addressing Commands
- 03-DHCP Commands
- 04-DHCPv6 Commands
- 05-DNS Commands
- 06-IPv6 DNS Commands
- 07-NAT Commands
- 08-Adjacency Table Commands
- 09-Flow Classification Commands
- 10-IPv6 Basics Commands
- 11-IP Performance Optimization Commands
- 12-Basic IP Routing Commands
- 13-Static Routing Commands
- 14-IPv6 Static Routing Commands
- 15-GRE Commands
- 16-RIP Commands
- 17-RIPng Commands
- 18-Policy-Based Routing Commands
- Related Documents
-
Title | Size | Download |
---|---|---|
12-Basic IP Routing Commands | 105.50 KB |
display ip routing-table ip-address
display ip routing-table protocol
display ip routing-table statistics
display ipv6 routing-table ipv6-address
display ipv6 routing-table protocol
display ipv6 routing-table statistics
reset ip routing-table statistics protocol
reset ipv6 routing-table statistics
Basic IP routing commands
display ip routing-table
Use display ip routing-table to display brief information about active routes in the routing table.
Use display ip routing-table verbose to display detailed information about all routes in the routing table.
Syntax
display ip routing-table [ verbose ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
verbose: Displays detailed information about all routes, including both active and inactive routes. Without this keyword, the command displays only brief information about active routes.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
The display ip routing-table command displays brief information about a routing table, with a routing entry contained in one line. The information displayed includes destination IP address/mask length, protocol, priority, cost, next hop and output interface. The display ip routing-table command displays only the optimal routes in use.
The display ip routing-table verbose command displays detailed information about all active and inactive routes, including the statistics of the entire routing table and information for each route.
Examples
# Display brief information about active routes in the routing table.
<Sysname> display ip routing-table
Routing Tables: Public
Destinations : 7 Routes : 7
Destination/Mask Proto Pre Cost NextHop Interface
1.1.2.0/24 Direct 0 0 1.1.2.1 Vlan1
1.1.2.1/32 Direct 0 0 127.0.0.1 InLoop0
2.2.2.0/24 OSPF 10 2 1.1.2.2 InLoop0
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
192.168.0.0/24 Direct 0 0 192.168.0.1 VT1
192.168.0.1/32 Direct 0 0 127.0.0.1 InLoop0
Field |
Description |
Destinations |
Number of destination addresses. |
Routes |
Number of routes. |
Destination/Mask |
Destination address/mask length. |
Proto |
Protocol that installed the route. |
Pre |
Preference of the route. |
Cost |
Cost of the route. |
NextHop |
Next hop address of the route. |
Interface |
Output interface for packets to be forwarded along the route. |
# Display detailed information about all routes in the routing table.
<Sysname> display ip routing-table verbose
Routing Tables: Public
Destinations : 6 Routes : 6
Destination: 1.1.2.0/24
Protocol: Direct Process ID: 0
Preference: 0 Cost: 0
IpPrecedence: QosLcId:
NextHop: 1.1.2.1 Interface: Vlan-interface1
BkNextHop: 0.0.0.0 BkInterface:
RelyNextHop: 0.0.0.0 Neighbor : 0.0.0.0
Tunnel ID: 0x0 Label: NULL
BKTunnel ID: 0x0 BKLabel: NULL
State: Active Adv Age: 06h46m22s
Tag: 0
Destination: 1.1.2.1/32
Protocol: Direct Process ID: 0
Preference: 0 Cost: 0
IpPrecedence: QosLcId:
NextHop: 127.0.0.1 Interface: InLoopBack0
BkNextHop: 0.0.0.0 BkInterface:
RelyNextHop: 0.0.0.0 Neighbor : 0.0.0.0
Tunnel ID: 0x0 Label: NULL
BKTunnel ID: 0x0 BKLabel: NULL
State: Active NoAdv Age: 06h46m22s
Tag: 0
Destination: 127.0.0.0/8
Protocol: Direct Process ID: 0
Preference: 0 Cost: 0
IpPrecedence: QosLcId:
NextHop: 127.0.0.1 Interface: InLoopBack0
BkNextHop: 0.0.0.0 BkInterface:
RelyNextHop: 0.0.0.0 Neighbor : 0.0.0.0
Tunnel ID: 0x0 Label: NULL
BKTunnel ID: 0x0 BKLabel: NULL
State: Active NoAdv Age: 06h46m36s
Tag: 0
Destination: 127.0.0.1/32
Protocol: Direct Process ID: 0
Preference: 0 Cost: 0
IpPrecedence: QosLcId:
NextHop: 127.0.0.1 Interface: InLoopBack0
BkNextHop: 0.0.0.0 BkInterface:
RelyNextHop: 0.0.0.0 Neighbor : 0.0.0.0
Tunnel ID: 0x0 Label: NULL
BKTunnel ID: 0x0 BKLabel: NULL
State: Active NoAdv Age: 06h46m37s
Tag: 0
Destination: 192.168.0.0/24
Protocol: Direct Process ID: 0
Preference: 0 Cost: 0
IpPrecedence: QosLcId:
NextHop: 192.168.0.1 Interface: Virtual-Template1
BkNextHop: 0.0.0.0 BkInterface:
RelyNextHop: 0.0.0.0 Neighbor : 0.0.0.0
Tunnel ID: 0x0 Label: NULL
BKTunnel ID: 0x0 BKLabel: NULL
State: Active Adv Age: 06h46m35s
Tag: 0
Destination: 192.168.0.1/32
Protocol: Direct Process ID: 0
Preference: 0 Cost: 0
IpPrecedence: QosLcId:
NextHop: 127.0.0.1 Interface: InLoopBack0
BkNextHop: 0.0.0.0 BkInterface:
RelyNextHop: 0.0.0.0 Neighbor : 0.0.0.0
Tunnel ID: 0x0 Label: NULL
BKTunnel ID: 0x0 BKLabel: NULL
State: Active NoAdv Age: 06h46m35s
Tag: 0
Statistics for the entire routing table are displayed first, followed by detailed description of each route (in sequence).
Field |
Description |
Destination |
Destination address/mask length. |
Protocol |
Protocol that installed the route. |
Preference |
Preference of the route. |
Cost |
Cost of the route. |
IpPrecedence |
IP precedence. |
QosLcId |
Local QoS ID. |
NextHop |
Next hop address of the route. |
Interface |
Output interface for packets to be forwarded along the route. |
BkNextHop |
Backup next hop. |
BkInterface |
Backup output interface. |
RelyNextHop |
Next hop address obtained through routing recursion. |
Neighbor |
Neighboring address determined by the routing protocol. |
BKTunnel ID |
Backup tunnel ID. |
BKLabel |
Backup label. |
State |
Route status: · Active—This is an active unicast route. · Adv—This route can be advertised. · Delete—This route is deleted. · Gateway—This is an indirect route. · Holddown—Number of holddown routes. Holddown is a route advertisement policy used in some routing protocols, such as RIP, to avoid the propagation of incorrect routes. It distributes a Holddown route during a period regardless of whether a new route to the same destination is found. For more information, refer to relevant routing protocols. · Int—The route was discovered by an Interior Gateway Protocol (IGP). · NoAdv—The route is not advertised when the router advertises routes based on policies. · NotInstall—The route with the highest priority among the routes to a destination is installed into the core routing table and advertised. A NotInstall route cannot be installed into the core routing table but can be advertised. · Reject—The packets matching a Reject route are dropped. The router sends ICMP unreachable messages to the sources of the dropped packets. The Reject routes are typically used for network testing. · Static—A static route is not lost when you perform the save operation and then restart the router. Routes configured manually are marked as static. · Unicast—Unicast routes. · Inactive—Inactive routes. · Invalid—Invalid routes. · WaitQ—The route is the WaitQ during route recursion. · TunE—Tunnel. · GotQ—The route is in the GotQ during route recursion. |
Age |
Time for which the route has been in the routing table, in the sequence of hour, minute, and second from left to right. |
Tag |
Route tag. |
display ip routing-table ip-address
Use display ip routing-table ip-address to display information about routes to a specific destination address.
Use display ip routing-table ip-address1 { mask-length | mask } ip-address2 { mask-length | mask } to display information about active routes whose destinations and masks fall into the specified address range.
Syntax
display ip routing-table ip-address [ mask | mask-length ] [ longer-match ] [ verbose ] [ | { begin | exclude | include } regular-expression ]
display ip routing-table ip-address1 { mask | mask-length } ip-address2 { mask | mask-length } [ verbose ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
ip-address: Specifies a destination IP address, in dotted decimal notation.
mask: Specifies the mask length, in dotted decimal notation.
mask-length: Specifies the mask length, an integer in the range of 0 to 32.
longer-match: Displays the route with the longest mask.
verbose: Displays detailed information about all routes. Without this argument, the command displays only brief information about active routes.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
Executing the command with different parameters yields the following results:
· display ip routing-table ip-address:
¡ The system ANDs the input destination IP address with the subnet mask in each route entry.
¡ The system ANDs the destination IP address in each route entry with its own subnet mask.
If the two operations yield the same result for an entry and this entry is active, the entry is displayed.
· display ip routing-table ip-address mask:
¡ The system ANDs the input destination IP address with the input subnet mask.
¡ The system ANDs the destination IP address in each route entry with the input subnet mask.
If the two operations yield the same result for an entry and the entry is active with a subnet mask less than or equal to the input subnet mask, the entry is displayed.
· display ip routing-table ip-address longer-match:
¡ The system ANDs the input destination IP address with the subnet mask in each route entry.
¡ The system ANDs the destination IP address in each route entry with its own subnet mask.
If the two operations yield the same result for multiple entries that are active, the entry with the longest mask length is displayed.
· display ip routing-table ip-address mask longer-match:
¡ The system ANDs the input destination IP address with the input subnet mask.
¡ The system ANDs the destination IP address in each route entry with the input subnet mask.
If the two operations yield the same result for multiple entries with a mask less than or equal to the input subnet mask, the entry that is active with the longest mask length is displayed.
Examples
# Display brief information about the routes with destination IP address 11.0.0.1.
<Sysname> display ip routing-table 11.0.0.1
Routing Table : Public
Summary Count : 3
Destination/Mask Proto Pre Cost NextHop Interface
11.0.0.0/8 Static 60 0 0.0.0.0 NULL0
11.0.0.0/16 Static 60 0 0.0.0.0 NULL0
11.0.0.0/24 Static 60 0 0.0.0.0 NULL0
# Display brief information about the routes with destination IP address 11.0.0.1 and mask length 20.
<Sysname> display ip routing-table 11.0.0.1 20
Routing Table : Public
Summary Count : 3
Destination/Mask Proto Pre Cost NextHop Interface
11.0.0.0/8 Static 60 0 0.0.0.0 NULL0
11.1.0.0/16 Static 60 0 0.0.0.0 NULL0
# Display brief information about the routes with destination IP address 11.0.0.1 and the longest mask length.
<Sysname> display ip routing-table 11.0.0.1 longer-match
Routing Table : Public
Summary Count : 1
Destination/Mask Proto Pre Cost NextHop Interface
11.0.0.0/24 Static 60 0 0.0.0.0 NULL0
# Display brief information about the routes with destination IP address 11.0.0.1, mask length 20, and the longest mask length.
<Sysname> display ip routing-table 11.0.0.1 20 longer-match
Routing Table : Public
Summary Count : 1
Destination/Mask Proto Pre Cost NextHop Interface
11.0.0.0/16 Static 60 0 0.0.0.0 NULL0
# Display brief information about the routes with destination addresses in the range of 1.1.1.0 to 5.5.5.0.
<Sysname> display ip routing-table 1.1.1.0 24 5.5.5.0 24
Routing Table : Public
Destination/Mask Proto Pre Cost NextHop Interface
1.1.1.0/24 Direct 0 0 1.1.1.1 Vlan1
1.1.1.1/32 Direct 0 0 127.0.0.1 InLoop0
2.2.2.0/24 Direct 0 0 2.2.2.1 Vlan2
3.3.3.0/24 Direct 0 0 3.3.3.1 Vlan3
3.3.3.1/32 Direct 0 0 127.0.0.1 InLoop0
4.4.4.0/24 Direct 0 0 4.4.4.1 Vlan4
4.4.4.1/32 Direct 0 0 127.0.0.1 InLoop0
For command output, see Table 1.
display ip routing-table protocol
Use display ip routing-table protocol to display information about routes installed by a routing protocol.
Syntax
display ip routing-table protocol protocol [ inactive | verbose ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
protocol: Specifies a routing protocol. It can be direct or static.
inactive: Displays information about only inactive routes. Without this argument, the command displays information about all routes.
verbose: Displays detailed routing table information. Without this argument, the command displays brief routing table information.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display brief information about direct routes.
<Sysname> display ip routing-table protocol direct
Public Routing Table : Direct
Summary Count : 6
Direct Routing Table Status : <Active>
Summary Count : 6
Destination/Mask Proto Pre Cost NextHop Interface
2.2.2.0/24 Direct 0 0 2.2.2.1 Vlan2
2.2.2.2/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
192.168.80.0/24 Direct 0 0 192.168.80.10 Vlan3
192.168.80.10/32 Direct 0 0 127.0.0.1 InLoop0
Direct Routing Table Status : <Inactive>
Summary Count : 0
# Display brief information about static routes.
<Sysname> display ip routing-table protocol static
Public Routing Table : Static
Summary Count : 2
Static Routing Table Status : <Active>
Summary Count : 0
Static Routing Table Status : <Inactive>
Summary Count : 2
Destination/Mask Proto Pre Cost NextHop Interface
1.2.3.0/24 Static 60 0 1.2.4.5 Vlan10
3.0.0.0/8 Static 60 0 2.2.2.2 Vlan3
For command output, see Table 1.
display ip routing-table statistics
Use display ip routing-table statistics to display IPv4 route statistics.
Syntax
display ip routing-table statistics [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display IPv4 route statistics for the public network.
<Sysname> display ip routing-table statistics
Proto route active added deleted freed
DIRECT 4 4 6 2 2
STATIC 1 0 1 0 0
Total 5 4 7 2 2
Table 3 Command output
Field |
Description |
Proto |
Routing protocol that installed the route. |
route |
Number of routes installed by the protocol. |
active |
Number of active routes. |
added |
Number of routes added into the routing table since the router started up or the routing table was most recently cleared. |
deleted |
Number of routes marked as deleted, which will be cleared after a period. |
freed |
Number of routes that were permanently removed. |
Total |
Total number of routes. |
display ipv6 routing-table
Use display ipv6 routing-table to display brief IPv6 routing table information, including destination IP address and prefix, protocol type, priority, metric, next hop and output interface.
Use display ipv6 routing-table verbose to display detailed information about all IPv6 routes, including both active and inactive routes.
Syntax
display ipv6 routing-table [ verbose ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
verbose: Displays detailed information about all IPv6 routes, including both active and inactive routes. Without this keyword, the command displays only brief information about active routes.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
The display ipv6 routing-table command displays brief information about only active routes.
The display ipv6 routing-table verbose command displays statistics about the entire routing table, and detailed information about each route.
Examples
# Display brief routing table information.
<Sysname> display ipv6 routing-table
Routing Table : Public
Destinations : 1 Routes : 1
Destination: ::1/128 Protocol : Direct
NextHop : ::1 Preference: 0
Interface : InLoop0 Cost : 0
Field |
Description |
Destination |
IPv6 address of the destination network/host. |
NextHop |
Next hop address of the route. |
Preference |
Preference of the route. |
Interface |
Output interface. |
Protocol |
Protocol that installed the route. |
Cost |
Cost of the route. |
# Display detailed routing table information.
<Sysname> display ipv6 routing-table verbose
Routing Table : Public
Destinations : 1 Routes : 1
Destination : ::1 PrefixLength : 128
NextHop : ::1 Preference : 0
IpPrecedence : QosLcId :
RelayNextHop : :: Tag : 0H
Neighbor : :: ProcessID : 0
Interface : InLoopBack0 Protocol : Direct
State : Active NoAdv Cost : 0
Tunnel ID : 0x0 Label : NULL
Age : 22161sec
Table 5 Command output
Field |
Description |
Destination |
IPv6 address of the destination network/host. |
PrefixLength |
Prefix length of the address. |
NextHop |
Next hop address of the route. |
Preference |
Preference of the route. |
IpPrecedence |
IP precedence. |
QosLcId |
Local QoS ID. |
RelayNextHop |
Recursive next hop. |
Tag |
Tag of the route. |
Neighbor |
Address of the neighbor determined by the routing protocol. |
Interface |
Output interface. |
Protocol |
Routing protocol. |
State |
State of the route: · Active. · Inactive. · Adv (advertised). · NoAdv (not advertised). |
Cost |
Cost of the route. |
Age |
Time that has elapsed since the route was generated. |
display ipv6 routing-table ipv6-address
Use display ipv6 routing-table ipv6-address to display information about routes to an IPv6 destination address.
Use display ipv6 routing-table ipv6-address1 ipv6-address2 to display information about routes to a range of IPv6 destination addresses.
Syntax
display ipv6 routing-table ipv6-address [ prefix-length ] [ longer-match ] [ verbose ] [ | { begin | exclude | include } regular-expression ]
display ipv6 routing-table ipv6-address1 prefix-length1 ipv6-address2 prefix-length2 [ verbose ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
ipv6-address: Specifies an IPv6 destination address.
prefix-length: Specifies the prefix length in the range of 0 to 128.
longer-match: Displays the matched route entry with the longest prefix length.
ipv6-address1/ipv6-address2: Specifies an IPv6 destination address range.
prefix-length1/prefix-length2: Specifies the prefix length in the range of 0 to 128.
verbose: Displays detailed information about all routes. Without this keyword, the command displays only brief information about active routes.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Usage guidelines
Executing the command with different parameters yields the following results:
· display ipv6 routing-table ipv6-address:
¡ The system ANDs the input destination IPv6 address with the prefix length in each route entry.
¡ The system ANDs the destination IPv6 address in each route entry with the prefix length in each entry.
If the two operations yield the same result for an entry and this entry is active, the entry is displayed.
· display ipv6 routing-table ipv6-address prefix-length:
¡ The system ANDs the input destination IPv6 address with the input prefix length.
¡ The system ANDs the destination IPv6 address in each route entry with the input prefix length.
If the two operations yield the same result for an entry and the entry is active with a prefix length less than or equal to the input prefix length, the entry is displayed.
Only route entries that exactly match the input destination address and prefix length are displayed.
· display ipv6 routing-table ipv6-address longer-match:
¡ The system ANDs the input destination IPv6 address with the prefix length in each route entry.
¡ The system ANDs the destination IPv6 address in each route entry with the prefix length in each entry.
If the two operations yield the same result for multiple entries, the entry that is active with the longest prefix length is displayed.
· display ipv6 routing-table ipv6-address prefix-length longer-match:
¡ The system ANDs the input destination IPv6 address with the input prefix length.
¡ The system ANDs the destination IPv6 address in each route entry with the input prefix length.
If the two operations yield the same result for multiple entries with a prefix length less than or equal to the input prefix length, the entry that is active with the longest prefix length is displayed.
Examples
# Display brief information about the routes with destination IPv6 address 10::1.
<Sysname> display ipv6 routing-table 10::1
Routing Table: Public
Summary Count: 3
Destination: 10::/64 Protocol : Static
NextHop : :: Preference: 60
Interface : NULL0 Cost : 0
Destination: 10::/68 Protocol : Static
NextHop : :: Preference: 60
Interface : NULL0 Cost : 0
Destination: 10::/120 Protocol : Static
NextHop : :: Preference: 60
Interface : NULL0 Cost : 0
# Display brief information about the routes with destination IPv6 address 10::1 and prefix length 100.
<Sysname> display ipv6 routing-table 10::1 100
Routing Table: Public
Summary Count: 2
Destination: 10::/64 Protocol : Static
NextHop : :: Preference: 60
Interface : NULL0 Cost : 0
Destination: 10::/68 Protocol : Static
NextHop : :: Preference: 60
Interface : NULL0 Cost : 0
# Display brief information about the routes with destination IPv6 address 10::1 and the longest prefix length.
<Sysname> display ipv6 routing-table 10::1 longer-match
Routing Tables: Public
Summary Count : 1
Destination: 10::/120 Protocol : Static
NextHop : :: Preference: 60
Interface : NULL0 Cost : 0
# Display brief information about the routes with destination IPv6 address 10::1, prefix length 100, and the longest prefix length.
<Sysname> display ipv6 routing-table 10::1 100 longer-match
Routing Table: Public
Summary Count: 1
Destination: 10::/68 Protocol : Static
NextHop : :: Preference: 60
Interface : NULL0 Cost : 0
# Display brief information about the routes with destination IPv6 addresses in the range of 100::/64 to 300::/64.
<Sysname> display ipv6 routing-table 100:: 64 300:: 64
Routing Table : Public
Summary Count : 3
Destination: 100::/64 Protocol : Static
NextHop : :: Preference: 60
Interface : NULL0 Cost : 0
Destination: 200::/64 Protocol : Static
NextHop : :: Preference: 60
Interface : NULL0 Cost : 0
Destination: 300::/64 Protocol : Static
NextHop : :: Preference: 60
Interface : NULL0 Cost : 0
Cost : 0
For command output, see Table 4.
display ipv6 routing-table protocol
Use display ipv6 routing-table protocol to display IPv6 routes installed by a routing protocol.
Syntax
display ipv6 routing-table protocol protocol [ inactive | verbose ] [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
protocol: Specifies a routing protocol. The protocol can be direct or static.
inactive: Displays information about inactive routes. Without the keyword, the command displays information about all routes.
verbose: Displays detailed information about all routes. Without this keyword, the command displays only brief information about active routes.
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display brief information about all direct routes.
<Sysname> display ipv6 routing-table protocol direct
Public Routing Table : Direct
Summary Count : 1
Direct Routing Table Status : <Active>
Summary Count : 1
Destination: ::1/128 Protocol : Direct
NextHop : ::1 Preference: 0
Interface : InLoop0 Cost : 0
Direct Routing Table Status : <Inactive>
Summary Count : 0
For command output, see Table 4.
display ipv6 routing-table statistics
Use display ipv6 routing-table statistics to display IPv6 route statistics.
Syntax
display ipv6 routing-table statistics [ | { begin | exclude | include } regular-expression ]
Views
Any view
Default command level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Examples
# Display IPv6 route statistics for the public network.
<Sysname> display ipv6 routing-table statistics
Protocol route active added deleted freed
DIRECT 1 1 1 0 0
STATIC 0 0 0 0 0
Total 1 1 1 0 0
Table 6 Command output
Field |
Description |
Protocol |
Routing protocol that installed the route. |
route |
Number of routes installed by the protocol. |
active |
Number of active routes. |
added |
Number of routes added to the routing table after the router started up or the routing table was most recently cleared. |
deleted |
Number of routes marked as deleted, which will be cleared after a period. |
freed |
Number of routes that were permanently removed. |
Total |
Total number of routes. |
reset ip routing-table statistics protocol
Use reset ip routing-table statistics protocol to clear IPv4 route statistics.
Syntax
reset ip routing-table statistics protocol { protocol | all }
Views
User view
Default command level
2: System level
Parameters
protocol: Clears route statistics for the IPv4 routing protocol. It can be direct or static.
all: Clears route statistics for all IPv4 routing protocols.
Examples
# Clear route statistics for all routing protocols.
<Sysname> reset ip routing-table statistics protocol all
reset ipv6 routing-table statistics
Use reset ipv6 routing-table statistics to clear IPv6 route statistics.
Syntax
reset ipv6 routing-table statistics protocol { protocol | all }
Views
User view
Default command level
2: System level
Parameters
protocol: Clears route statistics for an IPv6 routing protocol. It can be direct or static.
all: Clears route statistics for all IPv6 routing protocols.
Examples
# Clear route statistics for the public network.
<Sysname> reset ipv6 routing-table statistics protocol all