06-22-2009 09:49 AM - edited 03-04-2019 05:12 AM
Hi,
If I have an Ethernet interface, that connects to the Internet and acquires its IP address via DHCP, is it possible to have the router set its default route via DHCP?
Solved! Go to Solution.
06-22-2009 10:39 AM
Within later IOSs, there's "ip route 0.0.0.0 0.0.0.0 dhcp", but don't recall caveats using it.
06-22-2009 10:15 AM
Hello Kelvin,
in this case you can try to use
ip route 0.0.0.0 0.0.0.0 fasx/y
where fasx/y is the "WAN" interface that gets an ip address via DHCP.
This can work if the ISP gateway has IP proxy ARP enabled
Hope to help
Giuseppe
06-22-2009 10:30 AM
I know I can set it using the interface or by using a laptop to find what it is and set it to that, I'm just curious if there is anyway the router can do it.
06-22-2009 10:36 AM
Hello Kelvin,
you may be interested in the following commands
router(config-if)#ip dhcp client request static-route ?
dns-nameserver DNS nameserver (6)
domain-name Domain name (15)
netbios-nameserver NETBIOS nameserver (44)
router Default router option (3)
tftp-server-address TFTP server address (150)
vendor-specific Vendor specific option (43)
this should allow to ask for a default route or gateway in DHCP.
edit:
this is from a C2800
with
c2800nm-spservicesk9-mz.124-3i.bin
Hope to help
Giuseppe
06-22-2009 10:39 AM
Within later IOSs, there's "ip route 0.0.0.0 0.0.0.0 dhcp", but don't recall caveats using it.
06-22-2009 10:47 AM
unfortunately c1841-advsecurityk9-mz.124-3i.bin does not support but it does support the option for ip route. that was so simple thanks Joseph and Giuseppe.
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: