Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k
New Member

use of longer-prefixes in show ip route command

I'm baffled why the url

http://www.cisco.com/en/US/docs/ios/12_2/iproute/command/reference/1rfindp2.html#wp1022511

shows network 10.134.0.0 for instance

as a result of the command

Router# show ip route 128.0.0.0 128.0.0.0 longer-prefixes

2 REPLIES
Hall of Fame Super Silver

Re: use of longer-prefixes in show ip route command

Hello,

the text says

The following is sample output using the longer-prefixes keyword. When the longer-prefixes keyword is included, the address and mask pair becomes the prefix, and any address that matches that prefix is displayed. Therefore, multiple addresses are displayed.

In the following example, the logical AND operation is performed on the source address 128.0.0.0 and the mask 128.0.0.0, resulting in 128.0.0.0. Each destination in the routing table is also logically ANDed with the mask and compared to that result of 128.0.0.0. Any destinations that fall into that range are displayed in the output.

I tried on my router and actually it shows prefixes despite the first byte value

if I use 255.255.255.0 255.255.255.0 I see nothing for example.

if I use 64.0.0.0 64.0.0.0 I see some routes only a few in comparison with 128.0.0.0 128.0.0.0

This command in this way doesn't look like immediate.

Hope to help

Giuseppe

New Member

Re: use of longer-prefixes in show ip route command

thanks for reply Giuseppe

I can understand the command in circumstances say where you have a number of routes of longer prefixes to the network and mask listed

e.g.

sh ip ro 172.30.80.0 255.255.240.0 lo giving say

172.30.80.0/24

172.30.81.0/24

172.30.88.16/28

However I can't see how 10.134.0.0 results from sh ip ro 120.0.0.0 128.0.0.0 lo

It is also possible to use non-contiguous masks such as

sh ip ro 10.0.0.0 12.0.0.0 lo

and get routes listed

Can you make any sense of it?

417
Views
0
Helpful
2
Replies
CreatePlease to create content