cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1259
Views
0
Helpful
5
Replies

Router Command for a route to specific host or network

Faresnani
Level 1
Level 1

Hello Cisco Community 

 

I have a 300 Subnet in our enterprise network and there is a complex routing table for OSPF protocol, so for faster troubleshooting of the network connectivity and routing table, I want to show is there any route for a specific subnet or a host  with a single command or maybe filtering the output of routing table

 

if there are any commands please replay 

2 Accepted Solutions

Accepted Solutions

Show ip route 

Display all route table (300 subnet)

Show ip route x.x.x.x

Display the route use to forward this exactly ip (x.x.x.x)

Show ip route x.x.x.x longest-prefix 

Display all route can use to forward this prefix (x.x.x.x)

View solution in original post

Faresnani
Level 1
Level 1

The Solution from Command Reference https://www.cisco.com/E-Learning/bulk/public/tac/cim/cib/using_cisco_ios_software/cmdrefs/show_ip_route.htm

 

 

 

 

When you specify that you want information about a specific network displayed, more detailed statistics are shown. The following is sample output from the 

show ip route

 command when entered with the address 131.119.0.0.

Router# show ip route 131.119.0.0

Routing entry for 131.119.0.0 (mask 255.255.0.0)

            Known via "igrp 109", distance 100, metric 10989

            Tag 0

            Redistributing via igrp 109

            Last update from 131.108.35.13 on TokenRing0, 0:00:58 ago

            Routing Descriptor Blocks:

            * 131.108.35.13, from 131.108.35.13, 0:00:58 ago, via TokenRing0

                        Route metric is 10989, traffic share count is 1

                        Total delay is 45130 microseconds, minimum bandwidth is 1544 Kbit

                        Reliability 255/255, minimum MTU 1500 bytes

                        Loading 2/255, Hops 4


Table 69 describes significant fields shown in the display.


Table 69: Show IP Route with Address Field Descriptions (Continued)

Field

Description

Routing entry for 131.119.0.0 (mask 255.255.0.0)

Network number and mask.

Known via "igrp 109"

Indicates how the route was derived.

distance 100

Administrative distance of the information source.

Tag 0

Integer that is used to implement the route.

Redistributing via igrp 109

Indicates redistribution protocol.

Last update from 131.108.35.13 on TokenRing0

Indicates the IP address of a router that is the next hop to the remote network and the router interface on which the last update arrived.

0:00:58 ago

Specifies the last time the route was updated in hours:minutes:seconds.

131.108.35.13, from 131.108.35.13, 0:00:58 ago

Indicates the next hop address, the address of the gateway that sent the update, and the time that has elapsed since this update was received in hours:minutes:seconds.

via TokenRing0

Interface for this route.

Route metric is 10989

This value is the best metric for this routing descriptor block.

traffic share count is 1

Number of uses for this routing descriptor block.

Total delay is 45130 microseconds

Total propagation delay in microseconds.

minimum bandwidth is 1544 Kbit

Minimum bandwidth encountered when transmitting data along this route.

Reliability 255/255

Likelihood of successful packet transmission expressed as a number between 0 and 255 (255 is 100 percent reliability).

minimum MTU 1500 bytes

Smallest MTU along the path.

Loading 2/255

Effective bandwidth of the route in kilobits per second/255 is saturation.

Hops 4

Hops to the destination or to the router where the route first enters IGRP.

 

View solution in original post

5 Replies 5

Richard Burts
Hall of Fame
Hall of Fame

I do not believe that there is any single command or any filtering of the output of the routing table that will give you what you want. When forwarding an IP packet the logic for searching the routing table is complex, starting with looking for a /32 specific match and successively looking for less specific matches (is there a /28 subnet that matches, is there a /24 network that matches, is there a /16 that matches, is there a /0 that matches). I do not know of any single command that could give you that answer.

HTH

Rick

Thank you for your reply, I actually tried this way first and I saw this as not an ideal way to find the route to a network from 300 subnets, and it may be a bit stressful and I may make mistakes.

 

Regards

Faresnani

Show ip route 

Display all route table (300 subnet)

Show ip route x.x.x.x

Display the route use to forward this exactly ip (x.x.x.x)

Show ip route x.x.x.x longest-prefix 

Display all route can use to forward this prefix (x.x.x.x)

Thank you for your reply and it was really helpful and handy to minimize the probabilities and make it easier too thanks 

 

 

Regards

Faresnani

Faresnani
Level 1
Level 1

The Solution from Command Reference https://www.cisco.com/E-Learning/bulk/public/tac/cim/cib/using_cisco_ios_software/cmdrefs/show_ip_route.htm

 

 

 

 

When you specify that you want information about a specific network displayed, more detailed statistics are shown. The following is sample output from the 

show ip route

 command when entered with the address 131.119.0.0.

Router# show ip route 131.119.0.0

Routing entry for 131.119.0.0 (mask 255.255.0.0)

            Known via "igrp 109", distance 100, metric 10989

            Tag 0

            Redistributing via igrp 109

            Last update from 131.108.35.13 on TokenRing0, 0:00:58 ago

            Routing Descriptor Blocks:

            * 131.108.35.13, from 131.108.35.13, 0:00:58 ago, via TokenRing0

                        Route metric is 10989, traffic share count is 1

                        Total delay is 45130 microseconds, minimum bandwidth is 1544 Kbit

                        Reliability 255/255, minimum MTU 1500 bytes

                        Loading 2/255, Hops 4


Table 69 describes significant fields shown in the display.


Table 69: Show IP Route with Address Field Descriptions (Continued)

Field

Description

Routing entry for 131.119.0.0 (mask 255.255.0.0)

Network number and mask.

Known via "igrp 109"

Indicates how the route was derived.

distance 100

Administrative distance of the information source.

Tag 0

Integer that is used to implement the route.

Redistributing via igrp 109

Indicates redistribution protocol.

Last update from 131.108.35.13 on TokenRing0

Indicates the IP address of a router that is the next hop to the remote network and the router interface on which the last update arrived.

0:00:58 ago

Specifies the last time the route was updated in hours:minutes:seconds.

131.108.35.13, from 131.108.35.13, 0:00:58 ago

Indicates the next hop address, the address of the gateway that sent the update, and the time that has elapsed since this update was received in hours:minutes:seconds.

via TokenRing0

Interface for this route.

Route metric is 10989

This value is the best metric for this routing descriptor block.

traffic share count is 1

Number of uses for this routing descriptor block.

Total delay is 45130 microseconds

Total propagation delay in microseconds.

minimum bandwidth is 1544 Kbit

Minimum bandwidth encountered when transmitting data along this route.

Reliability 255/255

Likelihood of successful packet transmission expressed as a number between 0 and 255 (255 is 100 percent reliability).

minimum MTU 1500 bytes

Smallest MTU along the path.

Loading 2/255

Effective bandwidth of the route in kilobits per second/255 is saturation.

Hops 4

Hops to the destination or to the router where the route first enters IGRP.