Debian

dhclient:未找到廣播介面,但 eth0 已啟動並廣播

  • October 5, 2017

我在使用 dhclient 時遇到了一個常見問題。但是我無法找到解決此問題的明確方法。

系統:

  • ReadyNas RN104
  • 用於 armhf 的庫存 Debian
  • 剛剛升級到 Debian Jessie
  • 自建單片(即無模組)核心 4.0.5

如果我sudo dhclient eth0手動呼叫一切正常。

如何告訴 dhclient 自動使用 eth0?

$ ifconfig eth0
eth0  Link encap:Ethernet  HWaddr 72:84:91:48:ff:51  
     inet6 addr: fe80::7084:91ff:fe48:ff51/64 Scope:Link
     UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
     RX packets:63 errors:0 dropped:0 overruns:0 frame:0
     TX packets:75 errors:0 dropped:0 overruns:0 carrier:0
     collisions:0 txqueuelen:532 
     RX bytes:6743 (6.5 KiB)  TX bytes:26010 (25.4 KiB)
     Interrupt:26 

$ sudo dhclient -v
Internet Systems Consortium DHCP Client 4.3.1
...
No broadcast interfaces found - exiting.

$ cat /etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

# max address from uboot printenv ethaddr, eth1addr
pre-up ip link set dev eth0 address 28:XX:XX:XX:XX:X4
pre-up ip link set dev eth1 address 28:XX:XX:XX:XX:X5

$ dmesg |grep eth
mvneta d0070000.ethernet eth0: Using random mac address 72:84:91:48:XX:XX
mvneta d0074000.ethernet eth1: Using random mac address f2:0c:25:7d:XX:XX
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
mvneta d0070000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
mvneta d0070000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

$cat ./devices/platform/soc/soc:internal-regs/d0070000.ethernet/net/eth0/flags
0x1003

我遇到了同樣的問題,我最近將 Raspberry PI 1 Model B 從 Raspian Wheezy 升級到了 Jessie。啟動後,介面 eth0 已啟動,但未分配 DHCP 地址。不帶參數執行dhclient導致No broadcast interfaces found - exitingdhclient eth0正常執行。

我的解決方案是添加auto eth0到*/etc/network/interfaces*(雖然不知道為什麼):

auto lo
auto eth0

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

引用自:https://serverfault.com/questions/714938