dhcp/dhclient with a vlan trunk or multiple nics tweaks

Having a vlan trunk or multiple nics that use dhcp, poses it's own set of problems.

  • Your default gateway can bounce around with each interface you add or drop, this gets rather anonying , so in redhat/centos in /etc/sysconfig/network you need to add a line:

    GATEWAYDEV=eth0.xxx

  • I also find a changing search path just as anonying, so add

    SEARCH="subdomain1.wustl.edu subdoman2.wustl.edu wustl.edu"

  • I prefer use specific dns servers so dhclient.conf gets the following:

    supersede domain-name-servers 128.252.0.100, 128.252.0.1;

  • last but not least it can be handy to use dynamic updates

    interface "eth0.xxx" { send host-name "me-xxx"; }

    interface "eth0.yyy" { send host-name "me-yyy"; }

    interface "eth0.zzz" { send host-name "me-zzz"; }