3

I'm using Ubuntu 12.04 LTS with isc dhclient version 4.1.

My goal is to use DHCP to get IP addresses for multiple sub-interfaces on eth0. I have three stanzas configured for that in my /etc/network/interfaces file. And I can get it to work if I specify the hwaddress option to be different for each interface. However I would prefer to use the client option rather than change the MAC address. The problem is dhclient isn't sending the client-identifier when I specify the client option in /etc/network/interfaces. I captured the DHCP traffic on ifup and verified that the client-identifier was not being sent.

Is there a way (maybe in dhclient.conf?) to have dhclient get the client-identifier from the interfaces file and actually send it in the DHCP request when ifup is called? Or is there a better way to do this altogether?

Here's an example of my interfaces file attempting to use the client option:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp
  client testiface0

auto eth0:2
iface eth0:2 inet dhcp
  client testiface1

auto eth0:3
iface eth0:3 inet dhcp
  client testiface2

My dhclient.conf file has this line in it: send host-name "<hostname>"; If there's an equivalent for client-identifier, I think that would work but I couldn't find anything about it in the man pages.

user533150
  • 31
  • 3

0 Answers0