Avatar of Dragon0x40
Dragon0x40
 asked on

IP routing table

A routing table matches route prefixes and if a match is found determines the next hop ip address.

Sometimes that next hop ip address is an ip address located on the same router?

So in addition to determining a next hop ip address you also need to determine an exit interface on that router?

Even if that exit interface is null0 the bit bucket?

I have encountered where I do a "show ip route x.x.x.x" and it shows me a next hop ip address of y.y.y.y

So I run "show ip route y.y.y.y" and it tells me directly connected via vlan z.

I have not encountered a well written explanation of how to use sh ip route to do what I am explaining above. Maybe it is assumed to be so basic that it does not need any explanation.

Could you have a situation where it takes 3 or 4 lookups in the route table before you can determine an exit interface? For example you have to sequentially look up 3 or 4 addresses before you get a next hop ip address and an exit interface?
RoutersSwitches / HubsNetwork Architecture

Avatar of undefined
Last Comment
Dragon0x40

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
fgasimzade

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Dragon0x40

ASKER
Do static routes make for additional lookups to find an exit interface?
fgasimzade

What do you mean by additional lookups?

Dragon0x40

ASKER
If a static route to x.x.x.x points to next hop ip address of y.y.y.y then you have to look up y.y.y.y to get an exit interface or vlan or maybe even another next hop ip address of z.z.z.z?

If you don't have a static route but  used a dynamic routing protocol then the route for x.x.x.x would be shown as z.z.z.z without the additional lookup of y.y.y.y?
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Don Johnston

>Sometimes that next hop ip address is an ip address located on the same router?

I don't believe I've ever seen this before. Do you have an example?
fgasimzade

If you don't have a static route but  used a dynamic routing protocol then the route for x.x.x.x would be shown as z.z.z.z without the additional lookup of y.y.y.y?


No, the existence of the exit interface in route lookup does not depend on the type of routing (static or dynamic)
Ernie Beek

Could you post the routing table so we can see what you're talking about?
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Dragon0x40

ASKER
I will try to find an example but does everyone at least agree that if I do a "show ip route x.x.x.x" I may get route via another ip address say y.y.y.y and to find out where the packet will go I have to do a "show ip route y.y.y.y" to find the exit/egress interface?

This is something that I have not seen explained very well anywhere. But maybe i am not doing something correctly.
Don Johnston

>I will try to find an example but does everyone at least agree that if I do a "show ip route x.x.x.x" I may get route via another ip address say y.y.y.y and to find out where the packet will go I have to do a "show ip route y.y.y.y" to find the exit/egress interface?

I don't agree. Every route I've seen always has a next hop address that is on a directly connected network. That doesn't mean you couldn't create one, but with dynamic routing protocols, the next hop will be directly connected.
Dragon0x40

ASKER
What if you have static routes?
Your help has saved me hundreds of hours of internet surfing.
fblack61
SOLUTION
fgasimzade

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Dragon0x40

ASKER
switch#sh ip route 192.168.32.0
Routing entry for 192.168.32.0/24
  Known via "static", distance 1, metric 0
  Routing Descriptor Blocks:
  * 192.168.254.14
      Route metric is 0, traffic share count is 1

So if you run "sh ip route 192.168.254.14" then you will get an egress interface hopefully a connected route?
fgasimzade

Yes, you are correct
Dragon0x40

ASKER
I think we are talking about recursive lookups not recursive routing. From what I read on the web.

https://learningnetwork.cisco.com/thread/11843 

I would like a basic article on how to use a Routing table along with recursive lookp and how to determine what interfaces the router will send a prefix out of?
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.