cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
820
Views
10
Helpful
11
Replies

Static Default Route Pointing to Non-Adjacent IP

MattMH
Level 1
Level 1

I am getting ready to lab this up, but I do not understand how this works (but is). Thought I'd seek some opinions first.

I have a router (a bunch of them) that has a static default route to an IP in a subnet that it is not connected (8 hops away). There is no ARP entry for the configured default route IP address. We are running EIGRP, fyi, with no redistribution of any default routes. Everything is static. 

I am new at my current company, so reluctant to change anything yet, but I had an opportunity, when trying to resolve some issues to remove that static route (thinking that maybe there was static route redistribution happening). After I removed it, as expected, it did not learn any default route and I coudn't get to the Internet. I could get to LAN/WAN resources, but nothing off the network. I added the static route back in (the IP 8 hops away), and Internet access was restored. No VPN's. Simple WAN network design. When tracerouting, I see the path I'd expect to see as far as the first few hops, but I am not sure how it learns what IP to route through considering the default route IP has to be learned from the routing table, unless that is how it works. Does it somehow figure out that the static default route is learned via EIGRP on X interface and then routes in that direction (just thought this through typing it out)?

Thanks!

11 Replies 11

Seb Rupik
VIP Alumni
VIP Alumni

Hi there,

What you describe is caused by recursive routing. Typically a static route would have a next-hop specified that is on a directly connected subnet, typically resolved with ARP. However you can specify a next-hop that is not directly connected. The router will then have to perform a route look-up to reach this next-hop, this process is called recursion. Incidentally, this is default behaviour in IOS, but on a juniper you must explicitly enable it.

 

cheers,

Seb.

Thank you. If that is the default behavior of IOS, which I never knew, that must be the case. 

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello @MattMH ,

from what you have described your network is using routing recursion : all devices  in the path to the next hop have the same static default route configured and the next hop is advertised in an EIGRP route.

This is not best practice, it would be better to inject a default route in the EIGRP domain on the router(s) that are L2 adjacent to the device that connects to the internet and that performs NAT.

All devices in the EIGRP domain should have the same default static route to work.

Hope to help

Giuseppe

 

I would agree this is not best practice. I'll be working to change this routing setup, but I wanted to understand how this was working. Thanks for the feedback.

EIGRP will make router learn path to next-hop of default route. 
router will forward traffic using default-route, 
the router then check how reach the next-hop, and it learn next-hop via EIGRP so it use EIGRP to reach next-hop. 

Question, with recursive routing, can you "steer" traffic with that default route. For example, the current default route is pointing to a firewall in Data Center "A". If I changed that default route to a static IP in Data Center "B", would it then know to prefer that path?

if router learn next hop via eigrp, then you must adjust the eigrp not default route.

That's what makes logical sense to me. So once the traffic learns its default route from the recursive lookup and it is routed out the correct interface, that traffic then follows the routing of all the hops from that point. It's not "steering" at all to data center A, to confirm, correct?

You are correct, and to be sure I will run lab share result with you.

I will share lab one hour later.

rais
Level 7
Level 7

This is a default behavior for BGP routes. eBGP routes received with external next-hops are advertised as-is into iBGP. 

this simple lab, 
case1 
config default route toward 210.0.0.2 <<- this interface IP of R2
this  recursive next-hop is reachable via EIGRP via 200.0.0.4 (R4), 

hjhjhjhjhjhjhjh1.png
case2
config default route toward 110.0.0.2 <<- this interface IP of R2
this  recursive next-hop is reachable via EIGRP via 200.0.0.4 (R4), 

 

 

kjkjkjkjkjkj2.png

both above cases is show that even if we change the next-hop the egress interface is F1/1 (toward R4), WHY?
because both next-hop of default route is reachable via EIGRP from same router. 

so return to your case, even if you change the next-hop there is chance that the egress interface (and path) is same. 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card