Link to home
Create AccountLog in
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?
ASKER CERTIFIED SOLUTION
Avatar of fgasimzade
fgasimzade
Flag of Azerbaijan image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Dragon0x40
Dragon0x40

ASKER

Do static routes make for additional lookups to find an exit interface?
What do you mean by additional lookups?

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?
>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?
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)
Could you post the routing table so we can see what you're talking about?
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.
>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.
What if you have static routes?
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
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?
Yes, you are correct
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?