02-29-2008 03:27 AM - edited 03-05-2019 09:27 PM
I have a router which is to connect to an ISP via DHCP. I'm needing to configure the default static route to exit the DHCP interface. The online help appears to indicate that I can specify this by:
# ip route 0.0.0.0 0.0.0.0 fa0/0
...where fa0/0 is configured to be a DHCP client interface, or:
# ip route 0.0.0.0 0.0.0.0 dhcp
Is one form any better than the other?
Thanks for any insight shared.
02-29-2008 04:17 AM
Hi:
The first one is the one you would use to create a static default route
Read this link:
http://cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094374.shtml#route0.0
HTH
Victor
02-29-2008 12:28 PM
Victor
It is an interesting link that you posted but it seems to me that it does not address the essential question here about what impact is there that the interface is learning its IP address via DHCP.
And there are several aspects of a static route pointed out a LAN interface that are problematic. First, the operation of the static route is dependent on the neighbor router enabling proxy arp. And increasingly ISP are not wanting to enable proxy arp. Second, if the neighbor router does enable proxy arp then this router must arp for every destination address (since it needs to learn what MAC address to use for each individual address that it forwards). This generates extra traffic over the link to the ISP and potentially becomes a bottleneck. Add to this the fact that the ARP table becomes very large consuming more memory and more CPU cycles to maintain it.
A static route pointed out a point to point serial interface works very well. But a static route pointed out a LAN interface is problematic.
So it seems to me that for this situation the second option:
ip route 0.0.0.0 0.0.0.0 dhcp
is the preferable choice.
HTH
Rick
02-29-2008 12:57 PM
Thank you for your comments. Granted, your description is much more articulate than my rationalization, but I had also decided to go with:
ip route 0.0.0.0 0.0.0.0 dhcp
Not to get mired down into hypotheticals, but am I correct in thinking that this solution doesn't address multiple interfaces configured as DHCP clients? eg. given a router with two interfaces fa0/0 & fa0/1 both receiving their configurations from upstream, would a default static route have to be defined as:
ip route 0.0.0.0 0.0.0.0 fa0/0
...if this is the desired interface defining the default static route?
Thanks to both of you for responding.
02-29-2008 01:17 PM
James
You raise an interesting question. And I do not know what would happen if a router had 2 interfaces learning addresses via DHCP. I have not seen anything in the documentation that addresses this aspect. And I do not have any real experience with it to go by. But I would guess that if you had 2 interfaces learning addresses via DHCP and if both ISPs included a default route in their DHCP information that the router would accept both and there would be 2 default routes in the routing table (similar to the result of having 2 static default routes configured).
As I indicated in my previous response there are issues with ip route 0.0.0.0 0.0.0.0 fa0/0 and I would look for a different alternative.
HTH
Rick
02-29-2008 02:07 PM
Thanks for your candor!
03-01-2008 01:51 PM
Rick:
Point well taken.
Victor
07-11-2012 07:54 AM
This should answer your questions about multiple dhcp interfaces:
http://www.cisco.com/en/US/docs/ios/12_3t/12_3t8/feature/guide/gtddgtwy.html
08-06-2024 05:04 AM
use the following commands:
*******************************************************************
ip route 0.0.0.0 0.0.0.0 fa0/0 dhcp
ip route 0.0.0.0 0.0.0.0 fa0/1 dhcp
********************************************************************************
05-31-2024 07:50 PM
Hi,
Just curios, if the interface in the router not getting any IP from DHCP Sever, the routing will not work right ? Because currently i facing an issues where my router Cisco ISR4321, not getting any IP from the DHCP Server. When i show dhcp lease, the state show Requesting & Purging and it keep repeating. Anyone one can assist me on this ?
TQ
06-01-2024 03:09 AM
make new post it better
MHM
08-06-2024 05:06 AM
routing will show in the routing table as it is a static route but will not work because there is no upstream reachability.
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