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

DHCP and IP routing



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: