Wednesday, February 23, 2011

Using the "longer-prefixes" keyword of the "show ip route" EXEC command

The longer-prefixes keyword display routes that matched by the net-addr and net-mask.

Below shows some sample outputs of the show ip route EXEC command along with the longer-prefixes keyword:

Router#sh ip route 10.10.0.0 255.255.0.0 longer-prefixes

Gateway of last resort is not set

     10.0.0.0/30 is subnetted, 10 subnets
C       10.10.10.0 is directly connected, Loopback101
C       10.10.10.4 is directly connected, Loopback105
C       10.10.10.8 is directly connected, Loopback109
C       10.10.10.12 is directly connected, Loopback1013
C       10.10.10.16 is directly connected, Loopback1017
C       10.10.11.0 is directly connected, Loopback111
C       10.10.11.4 is directly connected, Loopback115
C       10.10.11.8 is directly connected, Loopback119
C       10.10.11.12 is directly connected, Loopback1113
C       10.10.11.16 is directly connected, Loopback1117
Router#
Router#sh ip route 10.10.10.0 255.255.255.0 longer-prefixes

Gateway of last resort is not set

     10.0.0.0/30 is subnetted, 10 subnets
C       10.10.10.0 is directly connected, Loopback101
C       10.10.10.4 is directly connected, Loopback105
C       10.10.10.8 is directly connected, Loopback109
C       10.10.10.12 is directly connected, Loopback1013
C       10.10.10.16 is directly connected, Loopback1017
Router#

No comments:

Post a Comment