cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
zprime
New Contributor II

DHCP WAN interface - how to set default route?

Jump to solution

Subject says it all... On a 3120 with a WAN interface doing DHCP (cable modem in this case), what are the config directives to set the default gateway?  Or does the DHCP client handle that automatically when the system gets a lease?  I have a system that seems to be in a permanent DHCP state of "selecting" -- it shows a "temp IP address" but never gets a final one and the Lease is showing "4 seconds."

If the DHCP client is supposed to automatically set the default route, is there any way to override this behavior if needed?  (Currently I don't need it, but I can see possibilities for when it would be useful.)

0 Kudos
1 Solution

Accepted Solutions
vmaxdawg05
Contributor III
Contributor III

Re: DHCP WAN interface - how to set default route?

Jump to solution

The DHCP client will add the default route unless you specify no-default-route in your configuration.  You can also specify the administrative distance.  Doing so will allow you to have another static route that could take priority over the DHCP assigned route.  See the list of DHCP client options below.

I hope this helps.

class-id               - Configure DHCP vendor class identifier

client-id              - Configure DHCP client identifier

hostname               - Configure DHCP client host name

no-default-route       - Do not install the default-route obtained via DHCP

no-domain-name         - Do not install the domain-name obtained via DHCP

no-nameservers         - Do not install the DNS servers obtained via DHCP

track                  - Make dhcp dependent upon a track

<1-255>                - Administrative distance

View solution in original post

3 Replies
cj_
Valued Contributor
Valued Contributor

Re: DHCP WAN interface - how to set default route?

Jump to solution

Hi zprime:

Thanks for posting!  You might consider marking your discussion a question for better visibility.

DHCP client on the WAN will add a default route.  You may also use static routes, but I'm not sure you can avoid the default route given in DHCP.  You could, however, leverage Policy Based Routing (PBR) to override the route table, depending on your scenario.  Check out and let us know if you have any more questions (and how it goes)!

Best,

Chris

vmaxdawg05
Contributor III
Contributor III

Re: DHCP WAN interface - how to set default route?

Jump to solution

The DHCP client will add the default route unless you specify no-default-route in your configuration.  You can also specify the administrative distance.  Doing so will allow you to have another static route that could take priority over the DHCP assigned route.  See the list of DHCP client options below.

I hope this helps.

class-id               - Configure DHCP vendor class identifier

client-id              - Configure DHCP client identifier

hostname               - Configure DHCP client host name

no-default-route       - Do not install the default-route obtained via DHCP

no-domain-name         - Do not install the domain-name obtained via DHCP

no-nameservers         - Do not install the DNS servers obtained via DHCP

track                  - Make dhcp dependent upon a track

<1-255>                - Administrative distance

View solution in original post

cj_
Valued Contributor
Valued Contributor

Re: DHCP WAN interface - how to set default route?

Jump to solution

Good to know!