12-02-2017 01:28 PM - edited 03-05-2019 09:34 AM
I expect to have a small router which will have two DHCP assigned internet connections, let's say Gi0/6 and Gi0/7. Either or both may be available, or down (no IP assigned).
I can easily tell which is up with an SLA using a source interface, and set a preference with a metric on an IP ROUTE - TRACK statement. If they were static IP's this would be easy, but they are both dynamic.
I can easily set the default route using IP ROUTE 0.0.0.0 0.0.0.0 DHCP, though I do not see how to control which I get if both are up and giving out an address (and even if I see a pattern, I cannot find any documentation that is specific to which it chooses as opposed to accidental, which I do not want to count on).
While I can do the SLA and ROUTE-TRACK with an interface as the source, to tell which is up, I do not know what to do with that object to force a specific route.
What I want is to use Int Gi0/7 if it's got connectivity, and if not use Gi0/6 (or of course neither if neither is up). I do not want Int Gi0/6 to be used if Gi0/7 is up, as it will be a metered connection.
I feel like I'm just missing a syntax or a connection of some sort, but I keep following threads and doc that leads either to ROUTE...DHCP or ROUTE..TRACK but no way to tie them together.
Is there a way?
Thanks.
Linwood
PS. The issue is on this router, by the way -- for distributing these out via EIGRP (which I actually am not doing anyway) I realize I could do some kind of filter or offset, but I don't see a way to apply that in this router to a static route (from DHCP) selectively.
12-03-2017 09:38 AM - edited 12-03-2017 10:25 AM
I POSTED THIS AS WORKING BUT IT DOES NOT. Actually the below works but is inadequate due to the cheat in the SLA:
track 6 ip sla 6 reachability track 7 ip sla 7 reachability interface GigabitEthernet0/6 description Secondary ip dhcp client default-router distance 200 ip dhcp client route track 6 ip address dhcp interface GigabitEthernet0/7 description Primary ip dhcp client default-router distance 100 ip dhcp client route track 7 ip address dhcp ip sla 6 icmp-echo 6.6.6.6 source-interface GigabitEthernet0/6 frequency 10 ip sla schedule 6 life forever start-time now ip sla 7 icmp-echo 7.7.7.7 source-interface GigabitEthernet0/7 frequency 10 ip sla schedule 7 life forever start-time now
But I had cheated on the SLA as I didn't have GNS3 (where I was simulating this) set up for internet routing, so I had it pinging the next hop, but in reality the next hop is provided by DHCP and not known, so I can't use that. When I changed it around to put a non-interface-subnet address in the SLA (e.g. 75.75.75.75), it would not come up, as the SLA was not up, because it didn't yet have a default route. Chicken and egg problem.
I'm still missing something. Continuing to experiment.
12-09-2017 11:15 AM
This didn't get much attention here, so I posted over on stackexchange. Also not much traffic but in the meantime I worked out a solution that SEEMS to work in GSM3 simulation, but is convoluted. It also does not work well in terms of routing inside traffic to the proper DHCP connection if one goes down (and attempts to fix that break the solution that picked it).
Again -- this is easy if the next hop address is known. And this is easy if the failure anticipated takes down the interface, or causes failure to pull an IP address. What I am trying to solve is a failure where both DHCP interfaces are up, both pulled and address and default route, but one is not passing traffic.
Anyway, I would still appreciate feedback as what I am doing is a poor kludge at best, perhaps better discussed now here:
Though of course I will watch here if someone prefers to discuss here.
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