DHCP and mulitple default gateways - Networking

This is a discussion on DHCP and mulitple default gateways - Networking ; I just got this gripe... a user occasionally connects an Ethernet interface on one or more of his hosts to a switch that's part of some goofy private network. He has to connect to this network to access some equipment ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: DHCP and mulitple default gateways

  1. DHCP and mulitple default gateways

    I just got this gripe... a user occasionally connects an Ethernet
    interface on one or more of his hosts to a switch that's part of some
    goofy private network. He has to connect to this network to access some
    equipment that lives there, but he doesn't have a static IP. So, he
    uses DHCP... and the DHCP server on that network hands out a default
    gateway, which is major-stupid, because there's no router on that
    network. I could start tilting at that windmill... or, I hope, find a
    way to make sure that the default gateway assignment cannot clobber
    existing settings.

    Is there a way to "lock" a default gateway? Or specify that a default
    gateway being assigned on an interface other than eth0 should be
    ignored?

    --
    * John Oliver http://www.john-oliver.net/ *

  2. Re: DHCP and mulitple default gateways

    On 08/22/2008 02:36 AM, John Oliver wrote:
    > I just got this gripe... a user occasionally connects an Ethernet
    > interface on one or more of his hosts to a switch that's part of some
    > goofy private network. He has to connect to this network to access some
    > equipment that lives there, but he doesn't have a static IP. So, he
    > uses DHCP... and the DHCP server on that network hands out a default
    > gateway, which is major-stupid, because there's no router on that
    > network. I could start tilting at that windmill... or, I hope, find a
    > way to make sure that the default gateway assignment cannot clobber
    > existing settings.
    >
    > Is there a way to "lock" a default gateway? Or specify that a default
    > gateway being assigned on an interface other than eth0 should be
    > ignored?


    I think, the appropriate answer to your question depends very much on
    the DHCP Client in use on the said hosts e.g. I use isc-dhclient on
    Debian/Ubuntu machines and shall edit the /etc/dhcp3/dhclient.conf
    client configuration file.

    --
    Dr Balwinder S "bsd" Dheeman Registered Linux User: #229709
    Anu'z Linux@HOME (Unix Shoppe) Machines: #168573, 170593, 259192
    Chandigarh, UT, 160062, India Gentoo, Fedora, Debian/FreeBSD/XP
    Home: http://cto.homelinux.net/~bsd/ Visit: http://counter.li.org/

  3. Re: DHCP and mulitple default gateways

    John Oliver wrote:
    > He [the user] has to connect to this network to access some
    > equipment that lives there, but he doesn't have a static IP. So, he
    > uses DHCP... and the DHCP server on that network hands out a default
    > gateway, which is major-stupid, because there's no router on that
    > network.


    Seems to me that the best solution is to fix the problem not the symptom.


    > Is there a way to "lock" a default gateway? Or specify that a default
    > gateway being assigned on an interface other than eth0 should be
    > ignored?


    You can tell your DHCP client (I use dhclient3) to ignore certain
    settings. See dhclient.conf(5) and the "supersede" directive.

    Chris

+ Reply to Thread