Bug 218191

Summary: It does not work to obtain an IP address via DHCP simultaneously for multiple interfaces
Product: Base System Reporter: Vladislav V. Prodan <admin>
Component: binAssignee: freebsd-bugs mailing list <bugs>
Status: New ---    
Severity: Affects Only Me CC: rodrigo
Priority: ---    
Version: 11.0-STABLE   
Hardware: amd64   
OS: Any   

Description Vladislav V. Prodan 2017-03-28 19:12:42 UTC
It does not work to obtain an IP address via DHCP simultaneously for multiple interfaces

FreeBSD 11.0-STABLE #0 r314635: Sat Mar  4 02:12:23 EET 2017

# dhclient vtnet3
DHCPDISCOVER on vtnet3 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on vtnet3 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on vtnet3 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on vtnet3 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on vtnet3 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on vtnet3 to 255.255.255.255 port 67 interval 9
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

# dhclient vtnet1
ifconfig: ioctl (SIOCAIFADDR): File exists
vtnet1: not found
exiting.

# ps -auxww | grep dhc
root    885   0,0  0,0  10604  1808  -  Is   18:58     0:00,07 dhclient: vtnet2 [priv] (dhclient)
_dhcp   932   0,0  0,0  10604  1848  -  Is   18:58     0:00,01 dhclient: vtnet2 (dhclient)
root   2829   0,0  0,1  10604  2472  -  Is   22:05     0:00,00 dhclient: vtnet3 [priv] (dhclient)
_dhcp  2837   0,0  0,1  10604  2484  -  Is   22:06     0:00,00 dhclient: vtnet3 (dhclient)

# ifconfig | egrep -A 6 'vtnet[0-9]'
vtnet0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000
        options=6c07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        ether d2:2d:72:9f:19:f4
        inet6 fe80::d02d:72ff:fe9f:19f4%vtnet0 prefixlen 64 scopeid 0x1
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
        media: Ethernet 10Gbase-T <full-duplex>
        status: active
vtnet1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000
        options=6c07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        ether 6e:16:cc:eb:22:43
        inet6 fe80::6c16:ccff:feeb:2243%vtnet1 prefixlen 64 scopeid 0x2
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
        media: Ethernet 10Gbase-T <full-duplex>
        status: active
vtnet2: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000
        options=6c07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        ether c2:6c:17:7c:72:0f
        inet6 fe80::c06c:17ff:fe7c:720f%vtnet2 prefixlen 64 scopeid 0x3
        inet 10.10.1.37 netmask 0xffffff00 broadcast 10.10.1.255
        nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
        media: Ethernet 10Gbase-T <full-duplex>
        status: active
vtnet3: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=6c07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        ether 52:32:a8:cd:d5:03
        inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet 10Gbase-T <full-duplex>
        status: active
Comment 1 Vladislav V. Prodan 2017-03-28 19:15:13 UTC
(In reply to Vladislav V. Prodan from comment #0)

# netstat -4rn
Routing tables

Internet:
Destination        Gateway            Flags     Netif Expire
0.0.0.0/8          link#4             U        vtnet3
default            10.10.1.1          UGS      vtnet2
10.10.1.0/24       link#3             U        vtnet2
10.10.1.37         link#3             UHS         lo0
127.0.0.1          link#5             UH          lo0

# grep -v ^# /etc/dhclient.conf

require subnet-mask, domain-name-servers;
Comment 2 Rodrigo Osorio freebsd_committer 2017-03-29 12:22:13 UTC
You can use 'fstat /var/run/dhclient.*' to see is someone owns the lock files or if the files was forgotten by a previous dhclient instance who crash