[pkg-dhcp-devel] Bug#819860: [dhclient] can not obtain one dhcp lease on TAP device connected to 802.1q vlan interface via one bridge

LACROIX Jean Marc jeanmarc.lacroix at free.fr
Sun Apr 3 07:43:43 UTC 2016


Package: isc-dhcp-client
Version: 4.3.1-6+deb8u2
Severity: serious


Dear maintainers,

On recent Debian Kernel (3.16.7-ckt25-1) based on Jessie 8.4, i try to
setup one bridge (br-admin) with 2 externals devices.

The  first one device is a  Vlan 802.1Q interface attached to physical
eth0 interface with vlan 9 (eth0.9).

The second one device is a tuntap device (eth-admin)

I create with  success all objects, but if  a setup the tap  interface
with DHCP capabilities, it is not possible  for me to  have a lease on
the tap device.

If if try instead to setup dhcp on bridge or on eth0.9 vlan interface,
then, i have always one IP addr from external DHCP server.

It   seems that dhcp  client capabilities  is  not possible on one tap
device connected to local bridge, for unknown reasons ?


-0- global informations
-----------------------

admlocal at syspeo:~$ uname -a
Linux syspeo 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-1 (2016-03-06) 
x86_64 GNU/Linux
admlocal at syspeo:~$ cat /etc/debian_version
8.4

admlocal at syspeo:~$ dpkg -l |grep isc-
ii  isc-dhcp-client    4.3.1-6+deb8u2        amd64   DHCP client for 
automatically obtaining an IP address
ii  isc-dhcp-common    4.3.1-6+deb8u2        amd64   common files used 
by all of the isc-dhcp packages
ii  libisc-export95    1:9.9.5.dfsg-9+deb8u6 amd64   Exported ISC Shared 
Library

admlocal at syspeo:~$ sudo modinfo tun
filename:       /lib/modules/3.16.0-4-amd64/kernel/drivers/net/tun.ko
alias:          devname:net/tun
alias:          char-major-10-200
license:        GPL
author:         (C) 1999-2004 Max Krasnyansky <maxk at qualcomm.com>
description:    Universal TUN/TAP device driver
depends:
intree:         Y
vermagic:       3.16.0-4-amd64 SMP mod_unload modversions

admlocal at syspeo:~$ dpkg -l |grep bridge
ii  bridge-utils   1.5-9    amd64        Utilities for configuring the 
Linux Ethernet bridge



-1- Initial conditions:
-----------------------
admlocal at syspeo:~$ ip link ls
1: lo: <LOOPBACK> mtu 65536 qdisc noqueue state DOWN mode DEFAULT group 
default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP 
mode DEFAULT group default qlen 1000
link/ether f4:ce:46:b8:cd:dc brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP 
mode DEFAULT group default qlen 1000
link/ether f4:ce:46:b8:cd:de brd ff:ff:ff:ff:ff:ff

admlocal at syspeo:~$ sudo brctl show
bridge name bridge id STP enabled interfaces

-2- create interfaces and briges
--------------------------------

# create bridge
sudo brctl addbr br-admin
# create interface with Vlan 802.1q
sudo vconfig add eth0 9
# create logical interface type tap
sudo ip tuntap add mode tap eth-admin
# add previous interface t othe bridge
sudo brctl addif br-admin eth-admin
sudo brctl addif br-admin eth0.9

admlocal at syspeo:~$ sudo brctl show

bridge   name bridge id      STP   enabled interfaces
br-admin 8000.420fd80e4f32    no    eth-admin
                                     eth0.9

admlocal at syspeo:~$ ip link ls
1: lo: <LOOPBACK> mtu 65536 qdisc noqueue state DOWN mode DEFAULT group 
default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP 
mode DEFAULT group default qlen 1000
link/ether f4:ce:46:b8:cd:dc brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP 
mode DEFAULT group default qlen 1000
link/ether f4:ce:46:b8:cd:de brd ff:ff:ff:ff:ff:ff
50: br-admin: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode 
DEFAULT group default
link/ether 42:0f:d8:0e:4f:32 brd ff:ff:ff:ff:ff:ff
51: eth0.9 at eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop master 
br-admin state DOWN mode DEFAULT group default
link/ether f4:ce:46:b8:cd:dc brd ff:ff:ff:ff:ff:ff
52: eth-admin: <BROADCAST,MULTICAST> mtu 1500 qdisc noop master br-admin 
state DOWN mode DEFAULT group default qlen 500
link/ether 42:0f:d8:0e:4f:32 brd ff:ff:ff:ff:ff:ff

test 1: dhclient on eth0.9
--------------------------

The MAC addr port eth0.9 (f4:ce:46:b8:cd:dc) is setup to external dhcp
server, so if i setup interface eth0.9 with  dhclient, then of course,
i expect to have immediatly one IP addr

admlocal at syspeo:~$ sudo dhclient eth0.9 -v
Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0.9/f4:ce:46:b8:cd:dc
Sending on LPF/eth0.9/f4:ce:46:b8:cd:dc
Sending on Socket/fallback
DHCPDISCOVER on eth0.9 to 255.255.255.255 port 67 interval 1
DHCPREQUEST on eth0.9 to 255.255.255.255 port 67
DHCPOFFER from 192.168.9.7
DHCPACK from 192.168.9.7
bound to 192.168.9.26 -- renewal in 26 seconds.

Now,  i stop dhcp client  and setup down eth0.9 in  order to forget IP
addr lease.

sudo killall dhclient && sudo ip link set dev eth0.9 down

admlocal at syspeo:~$ ip link ls
1: lo: <LOOPBACK> mtu 65536 qdisc noqueue state DOWN mode DEFAULT group 
default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP 
mode DEFAULT group default qlen 1000
link/ether f4:ce:46:b8:cd:dc brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP 
mode DEFAULT group default qlen 1000
link/ether f4:ce:46:b8:cd:de brd ff:ff:ff:ff:ff:ff
50: br-admin: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode 
DEFAULT group default
link/ether 42:0f:d8:0e:4f:32 brd ff:ff:ff:ff:ff:ff
51: eth0.9 at eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noqueue master 
br-admin state DOWN mode DEFAULT group default
link/ether f4:ce:46:b8:cd:dc brd ff:ff:ff:ff:ff:ff
52: eth-admin: <BROADCAST,MULTICAST> mtu 1500 qdisc noop master br-admin 
state DOWN mode DEFAULT group default qlen 500
link/ether 42:0f:d8:0e:4f:32 brd ff:ff:ff:ff:ff:ff

All tests are OK !

test 1: dhclient on bridge (br-admin)
-------------------------------------

On the  bridge, the MAC addr port  (random ?)   (42:0f:d8:0e:4f:32) is
setup to external dhcp server instead of previous for eth0.9 (for test
only), so if i setup  interface with dhclient, then  of course, i have
immediatly one IP  addr (same case than  for eth0.9, but with MAC addr
different)

admlocal at syspeo:~$ sudo dhclient -v br-admin
Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/br-admin/42:0f:d8:0e:4f:32
Sending on LPF/br-admin/42:0f:d8:0e:4f:32
Sending on Socket/fallback
DHCPDISCOVER on br-admin to 255.255.255.255 port 67 interval 1
DHCPREQUEST on br-admin to 255.255.255.255 port 67
DHCPOFFER from 192.168.9.7
DHCPACK from 192.168.9.7
bound to 192.168.9.26 -- renewal in 25 seconds.

All tests are OK !


test 2: dhclient on tap device
------------------------------

I try the  same behaviour on tap  interface, and it seems not possible
to allocate one IP addr on this interface.

sudo ip link set dev br-admin up

admlocal at syspeo:~$ ip link ls

1: lo: <LOOPBACK> mtu 65536 qdisc noqueue state DOWN mode DEFAULT group 
default
     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP 
mode DEFAULT group default qlen 1000
     link/ether f4:ce:46:b8:cd:dc brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP 
mode DEFAULT group default qlen 1000
     link/ether f4:ce:46:b8:cd:de brd ff:ff:ff:ff:ff:ff
52: eth-admin: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master 
br-admin state DOWN mode DEFAULT group default qlen 500
     link/ether 42:0f:d8:0e:4f:32 brd ff:ff:ff:ff:ff:ff
55: br-admin: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue 
state UP mode DEFAULT group default
     link/ether 42:0f:d8:0e:4f:32 brd ff:ff:ff:ff:ff:ff
56: eth0.9 at eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc 
noqueue master br-admin state UP mode DEFAULT group default
     link/ether f4:ce:46:b8:cd:dc brd ff:ff:ff:ff:ff:ff


I try at the same time to record all dhcp traffic, but without success.

sudo tcpdump -i eth0.9 port bootpc or port bootps&

My conclusions  (!)

It seems not  possible  to have a  dhclient  process binded to  a  tap
device and connected at the same time to one internal bridge with 802.1q

Thanks in advance for your help.

Best regards


-- 
--------------------------------------
  -- Jean-Marc LACROIX                 --
   -- mailto : jeanmarc.lacroix at free.fr --
     ---------------------------------------



More information about the pkg-dhcp-devel mailing list