06-02-2013 09:26 AM - edited 03-07-2019 01:41 PM
Hi,
I need to parse the output of "show ip route" to create a list of Destination , next hop and outgoing interface. After looking at few output it looks Static routes and BGP routes can have entries with no outgoing interface resolved . Is there any other protocol which will not have a outgoing interface resolved?
thanks.
06-02-2013 09:50 AM
Hi,
You are correct about BGP, but static routes do have a next-hop or interface associated with them
here is an example:
100.0.0.0/24 is subnetted, 1 subnets
S 100.100.100.0 [1/0] via 192.168.1.1
HTH
06-02-2013 12:39 PM
Hi,
The static route you mentioned does not have a outgoing interface right ? we need to resolve it.
also there are other protocols for which outgoing interface is not specified as in case of BGP and static routes ?
06-02-2013 02:13 PM
Hi,
Is this case the outgoing interface is the next-hop IP, but it could also be a physical interface or vlan interface
S 100.100.100.0 [1/0] via 192.168.1.1
is directly connected, Vlan1
HTH
06-02-2013 09:15 PM
Hi Jiten
You are right in case of BGP and Static routing we see the next hop IP and not the exit interface. I think it follows recurssive method to find the exit interface.
- But if you are using the exit interface in place of next hop ip in static route command it will show you the exit interface.
whereas Ospf, EIgrp and RIP protocols have the details of exit interface.with the next hop ip address.,
thanks & Regards
Sandeep
06-03-2013 08:36 AM
thankyou Sandeep and Reza.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide