Displaying and Maintaining a Routing Table
Context
You can view routing table information to learn about the network topology and locate routing faults. The following describes the commands used to display and maintain routing table information.
The display commands can be used in all views. The reset commands are used in the user view.
If the router imports a large number of routes, system performance may be affected when services are being processed because the routes consume a lot of system resources. To improve system security and reliability, configure a limit on the number of public route prefixes. When the number of public route prefixes exceeds the limit, an alarm is generated, prompting you to check whether unnecessary public route prefixes exist.
Procedure
- Run the display ip routing-table command to check brief information about the active routes in the IPv4 routing table.
- Run the display ip routing-table verbose command to check detailed information about the IPv4 routing table.
- Run the display ip routing-table ip-address [ mask | mask-length ] [ longer-match ] [ verbose ] command to check detailed information about the routes with the specified destination address in the IPv4 routing table.
- Run the display ip routing-table ip-address1 { mask1 | mask-length1 } ip-address2 { mask2 | mask-length2 } [ verbose ] command to check detailed information about the routes within the specified destination address range in the IPv4 routing table.
- Run the display ip routing-table acl { acl-number | acl-name } [ verbose ] command to check detailed information about the routes that match the specified basic ACL in the IPv4 routing table.
- Run the display ip routing-table ip-prefix ip-prefix-name [ verbose ] command to check detailed information about the routes that match the specified IP prefix list in the IPv4 routing table.
- Run the display ip routing-table protocol protocol [ inactive | verbose ] command to check detailed information about the routes discovered by the specified routing protocol in the IPv4 routing table.
- Run the display ip routing-table statistics command to check route statistics in the IPv4 routing table.
- Run the display ipv6 routing-table command to check brief information about the active routes in the IPv6 routing table.
- Run the display ipv6 routing-table verbose command to check detailed information about the IPv6 routing table.
- Run the display ipv6 routing-table protocol [ inactive | verbose ] command to check detailed information about the routes discovered by the specified routing protocol in the IPv6 routing table.
- Run the display ipv6 routing-table statistics command to check route statistics in the IPv6 routing table.
- Run the reset ip routing-table statistics protocol { all | protocol } command to clear route statistics in the IPv4 routing table.
- Run the reset ipv6 routing-table statistics protocol { all | protocol } command to clear route statistics in the IPv6 routing table.
- Run the ip prefix-limit number { alert-percent [ route-unchanged ] | simply-alert } command in the system view to set a limit on the number of IPv4 public route prefixes.
- Run the ip prefix-limit log-interval interval command in the system view to set an interval at which the system generates logs after the number of IPv4 public route prefixes exceeds the limit.
- Run the ipv6 prefix-limit number { alert-percent [ route-unchanged ] | simply-alert } command in the system view to set a limit on the number of IPv6 public route prefixes.
- Run the ipv6 prefix-limit log-interval interval command in the system view to set an interval at which the system generates logs after the number of IPv6 public route prefixes exceeds the limit.