← Back to team overview

touch-packages team mailing list archive

[Bug 1524093] Re: dhclient operates on incorrect interface

 

FYI if anyone is also affected by this bug, I was able to find a
workaround. See the last comment by idallen here:

http://ubuntuforums.org/showthread.php?t=1431860&p=12313662#post12313662

Essentially you want to do this:

* Remove all references to interfaces from the /etc/dhcp/dhclient.conf file
* Create separate configuration files for each interface with the options specific to each interface
* In the /etc/network/interfaces file, mark all DHCP interfaces as "manual" instead of "dhcp"
* Add a line to /etc/network/interfaces for each DHCP interface to manually bring it up using a command line that explicitly specifies its config file

For example, this is one of the stanzas in my /e/n/i file:

allow-hotplug lte0
iface lte0 inet manual
up dhclient -1 -v -cf /etc/dhcp/dhclient-lte0.conf -pf /run/dhclient.lte0.pid -lf /var/lib/dhcp/dhclient.lte0.leases lte0
down dhclient -r -cf /etc/dhcp/dhclient-lte0.conf -lf /var/lib/dhcp/dhclient.lte0.leases lte0

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to isc-dhcp in Ubuntu.
https://bugs.launchpad.net/bugs/1524093

Title:
  dhclient operates on incorrect interface

Status in isc-dhcp package in Ubuntu:
  Confirmed

Bug description:
  I have a system with two internet connections, both configured using
  DHCP. They are specified in /etc/network/interfaces roughly as
  follows:

  iface lte0 inet dhcp
  iface wlan0 inet dhcp
      wpa-ssid XXXX
      wpa-psk XXXX

  I also have defined custom options for each interface in the
  /etc/dhcp/dhclient.conf file:

  interface "lte0" {
    send host-name "hostA";
  }
  interface "wlan0" {
    send host-name "hostB";
  }

  When I do "ifup wlan0", the wrong interface is brought up:

  Listening on LPF/lte0/94:b9:b4:18:e5:ce
  Sending on   LPF/lte0/94:b9:b4:18:e5:ce
  Listening on LPF/wlan0/00:26:b6:e1:7c:64
  Sending on   LPF/wlan0/00:26:b6:e1:7c:64
  Sending on   Socket/fallback
  DHCPDISCOVER on lte0 to 255.255.255.255 port 67 interval 3 (xid=0xbb4b7c57)
  DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 3 (xid=0xbf50be57)
  DHCPREQUEST of 100.70.63.250 on lte0 to 255.255.255.255 port 67 (xid=0x577c4bbb)
  DHCPOFFER of 100.70.63.250 from 100.70.63.1
  DHCPACK of 100.70.63.250 from 100.70.63.1
  bound to 100.70.63.250 -- renewal in 270090 seconds.

  Similarly, if I do "ifdown wlan0", both interfaces are released:

  Listening on LPF/lte0/94:b9:b4:18:e5:ce
  Sending on   LPF/lte0/94:b9:b4:18:e5:ce
  Listening on LPF/wlan0/00:26:b6:e1:7c:64
  Sending on   LPF/wlan0/00:26:b6:e1:7c:64
  Sending on   Socket/fallback
  DHCPRELEASE on lte0 to 100.70.63.1 port 67 (xid=0x2f4f2125)
  DHCPRELEASE on wlan0 to 10.78.56.254 port 67 (xid=0x15a5a)

  I expect that ifup/ifdown only operates on the interface specified on
  the command line. Instead they are operating on other interfaces that
  I did not want them to touch.

  I believe the problem is related to this statement in the dhclient man page:
         It is also possible to specify interfaces by name in the dhclient.conf file.   If interfaces are  specified  in  this  way,
         then  the client will only configure interfaces that are either specified in the configuration file or on the command line,
         and will ignore all other interfaces.

  So it's reading all interfaces from the configuration file and adding
  them to the command line interfaces, and operating on all such
  interfaces. If I remove the interface stanzas from the
  /etc/dhcp/dhclient.conf file, then everything works as expected.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/1524093/+subscriptions


References