Networking Forums

Networking Forums > Computer Networking > Linux Networking > DHCP and mulitple default gateways

Reply
Thread Tools Display Modes

DHCP and mulitple default gateways

 
 
John Oliver
Guest
Posts: n/a

 
      08-21-2008, 09:06 PM
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/ *
 
Reply With Quote
 
 
 
 
Balwinder S Dheeman
Guest
Posts: n/a

 
      08-21-2008, 10:07 PM
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/
 
Reply With Quote
 
Chris Davies
Guest
Posts: n/a

 
      08-21-2008, 10:09 PM
John Oliver <(E-Mail Removed)> 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 With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Two default gateways in one subnet tree leafs Windows Networking 7 10-26-2007 01:42 AM
Two Default Gateways Steve Martin Windows Networking 10 03-09-2007 01:58 PM
Two NIC cards with different default gateways? Andrew Windows Networking 1 09-09-2006 04:40 AM
Multpile Default Gateways Todd Varriano Windows Networking 6 09-01-2005 04:10 PM
Two default gateways , one doesn't work right. Alex Windows Networking 3 07-30-2003 08:15 AM



1 2 3 4 5 6 7 8 9 10 11