DHCP-based static routes
If you have configured your router as a DHCP client, you can use the default router option received in a DHCP reply as the next-hop for a static route. For example:
You can also use this feature to change the administrative distance of the DHCP-based default route (or you could use the ip dhcp-client default-router distance value configuration command that one of the readers described in a comment to a previous DHCP-related post).
Any other good ideas where this might come handy? Post them as comments ...
ip route 10.0.0.0 255.0.0.0 dhcpYou could use this functionality in scenarios where your core network uses DHCP (for example, in metropolitan networks using layer-2 Ethernet transport from an ISP), but your router needs a different default route.
You can also use this feature to change the administrative distance of the DHCP-based default route (or you could use the ip dhcp-client default-router distance value configuration command that one of the readers described in a comment to a previous DHCP-related post).
Any other good ideas where this might come handy? Post them as comments ...
If I have two ISP with DHCP(that means two default routes) and I want to make one of those the Active ISP and another being the backup ISP, how can I achive that?
Because "ip dhcp-client default-router distance value" changes the metric of ALL dhcp routes, so they both have the same metric, additionally using route-maps you cannot use "set ip next-hop verify-availability" because it is dynamic so you have to use set interface, and there is no Verify-availability for that.
Any ideas?