04/03/15

How to disable gateway and dns entries from dhcp in Ubuntu

Hi,

If you have a server with two network cards and on all card are configured with dhcp protcol there is a possibility that only one default gateway will be setup on one of these cards.

On Ubuntu, for resolve this problem you can install ifmetric packages

#sudo apt-get install ifmetric

then setup the metric for you network card in your /etc/network/interfaces file (or similary in interfaces.d)...

# The primary network interface
allow-hotplug eth0
auto eth0
iface eth0 inet dhcp
   metric 200
allow-hotplug eth1
# The secondary network interface
auto eth1
iface eth1 inet dhcp

Ref: http://serverfault.com/questions/29394/debian-interfaces-file-ignore-gateway-and-dns-entries-from-dhcp

Nessun commento:

Posta un commento