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 to ip-address2 to display information about routes to a range of destination addresses.
Syntax
display ip routing-table [ vpn-instance vpn-instance-name ] ip-address [ mask-length | mask ] [ longer-match ] [ verbose ]
display ip routing-table [ vpn-instance vpn-instance-name ] ip-address1 to ip-address2 [ verbose ]
Views
Any view
Predefined user roles
network-admin
network-operator
Parameters
vpn-instance vpn-instance-name: Specifies an MPLS L3VPN instance by its name, a case-sensitive string of 1 to 31 characters. If you do not specify a VPN instance, the command displays routing information for the public network.
ip-address: Specifies a destination IP address in dotted decimal notation.
mask-length: Specifies the mask length, an integer in the range of 0 to 32.
mask: Specifies the IP address mask in dotted decimal notation.
longer-match: Displays the route entry with the longest mask.
ip-address1 to ip-address2: Specifies a destination IP address range.
verbose: Displays detailed routing table information, including information about both active and inactive routes. If you do not specify this keyword, the command displays brief information about active routes.
Usage guidelines
Executing the command with different parameters yields different outputs.
display ip routing-table ip-address
The system ANDs the entered destination IP address with the subnet mask in each active route entry.
The system ANDs the destination IP address in each active route entry with its own subnet mask.
If the two operations yield the same result for an entry, the entry is displayed.
display ip routing-table ip-address mask
The system ANDs the entered destination IP address with the entered subnet mask.
The system ANDs the destination IP address in each active route entry with the entered subnet mask.
If the two operations yield the same result for an entry with a subnet mask not greater than the entered subnet mask, the entry is displayed.
display ip routing-table ip-address longer-match
The system ANDs the entered destination IP address with the subnet mask in each active route entry.
The system ANDs the destination IP address in each active route entry with its own subnet mask.
If the two operations yield the same result for multiple entries, the entry with the longest mask length is displayed.
display ip routing-table ip-address mask longer-match
The system ANDs the entered destination IP address with the entered subnet mask.
The system ANDs the destination IP address in each active route entry with the entered subnet mask.
If the two operations yield the same result for multiple entries with a mask not greater than the entered subnet mask, the entry with the longest mask length is displayed.
display ip routing-table ip-address1 to ip-address2
The system displays active route entries with destinations in the range of ip-address1/32 to ip-address2/32.
Examples
# Display brief information about the routes to the destination IP address 11.0.0.1.
<Sysname> display ip routing-table 11.0.0.1 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 to the destination IP address 11.0.0.1 and mask length 20.
<Sysname> display ip routing-table 11.0.0.1 20 Summary count : 2 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
# Display brief information about the most specific route to the destination address 11.0.0.1.
<Sysname> display ip routing-table 11.0.0.1 longer-match 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 most specific route to the destination IP address 11.0.0.1 and mask length 20.
<Sysname> display ip routing-table 11.0.0.1 20 longer-match 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 to destination addresses in the range of 1.1.1.0 to 5.5.5.0.
<Sysname> display ip routing-table 1.1.1.0 to 5.5.5.0 Summary count : 4 Destination/Mask Proto Pre Cost NextHop Interface 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.1/32 Direct 0 0 127.0.0.1 InLoop0 4.4.4.1/32 Direct 0 0 127.0.0.1 InLoop0
# Display detailed information about the routes to the destination IP address 1.2.3.4.
<Sysname> display ip routing-table 1.2.3.4 verbose Summary count : 1 Destination: 1.2.3.4/32 Protocol: BGP instance test Process ID: 0 SubProtID: 0x1 Age: 00h00m37s Cost: 0 Preference: 255 IpPre: N/A QosLocalID: N/A Tag: 0 State: Active Adv OrigTblID: 0x0 OrigVrf: default-vrf TableID: 0x2 OrigAs: 200 NibID: 0x15000000 LastAs: 200 AttrID: 0x0 Neighbor: 192.168.47.2 Flags: 0x10060 OrigNextHop: 192.168.47.2 Label: NULL RealNextHop: 192.168.47.2 BkLabel: NULL BkNextHop: N/A Tunnel ID: Invalid Interface: Vlan-interface11 BkTunnel ID: Invalid BkInterface: N/A FtnIndex: 0x0 TrafficIndex: N/A Connector: N/A
For command output, see Table 2.