3 Replies Latest reply on Aug 8, 2014 6:04 AM by cj! Branched to a new discussion.

    DHCP WAN interface - how to set default route?

    zprime New Member

      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.)

        • Re: DHCP WAN interface - how to set default route?
          cj! Beta_User

          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 Configuring Policy Based Routing in AOS and let us know if you have any more questions (and how it goes)!




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

            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