[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: DHCP and IP routing



Hi, I'm not sure how to have dhcpd ignore the setting altogether, but in my experience, at least leaving the nameserver entries undefined causes the subsequent dhcp clients to use their static defaults.

The config statement for setting the default route is "option routers <ip-addr>", and is, I believe usually scoped to within individual subnet declarations.

I personally dislike having to manage static configs.

For more on dhcpd.conf commands, you can always "man 5 dhcpd.conf"

-John


Urs Thuermann wrote:

How can I ignore or change the default route that I get from a DHCP
server?  For example, on a DHCP client running Debian testing using
the dhclient from the dhcp-client package, I get

   IP address   10.1.2.3
   netmask      255.255.255.0
   router       10.1.2.254

which causes the foloowing routing table to be set up:

   10.1.2.0/24  dev eth0  proto kernel  scope link  src 10.1.2.3
   default      via 10.1.2.254  dev eth0

However, I want to use another default route which I set statically in
/etc/network/interfaces.  So I'd like to ignore the default route
offered by the DHCP server.  Even better would be to install a route
for the subnet using the router given in the DHCP reply, i.e.

   10.0.0.0/8  via 10.1.2.254  dev eth0

How can I configure this is /etc/network/interfaces and/or
/etc/dhclient.conf?


urs





Reply to: