Debian dhcpcd 和 wpa_supplicant 802.1X 有线,互联网在 dhcp 租用超时后停止工作

Debian dhcpcd 和 wpa_supplicant 802.1X 有线,互联网在 dhcp 租用超时后停止工作

我的大学最近开始使用 802.1X 有线身份验证,在树莓派上的 dhcp 租用超时后,我的互联网连接停止工作。

我正在使用预安装的 dhcpcd 和 wpa_supplicant 连接到网络。启动后,互联网工作正常,我从 dhcp 获取 IP,一切正常,但在 dhcp 租用时间耗尽后,互联网根本无法再工作。让互联网再次工作的唯一方法是再次禁用并启用接口(ifdown eth0 和 ifup eth0)。

我尝试过 raspbian jessie 和拉伸,没有任何改变,我也尝试过自己构建 dhcpcd,并且我也尝试过使用 dhclient 而不是 dhcpcd。

感谢帮助。

编辑

dhclient 未运行,但 dhcpcd 正在运行。

租约大多在 1 小时后到期。

另外,如果我将 Pi 连接到我的家庭网络,那么连接永远不会断开,因此重新验证此类内容可能会出现问题。

dhcpcd配置文件

# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.

# Allow users of this group to interact with dhcpcd via the control socket.
#controlgroup wheel

# Inform the DHCP server of our hostname for DDNS.
hostname

# Use the hardware address of the interface for the Client ID.
#clientid
# or
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
# Some non-RFC compliant DHCP servers do not reply with this set.
# In this case, comment out duid and enable clientid above.
duid

# Persist interface configuration when dhcpcd exits.
persistent

# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit

# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Most distributions have NTP support.
option ntp_servers
# Respect the network MTU. This is applied to DHCP routes.
option interface_mtu

# A ServerID is required by RFC2131.
require dhcp_server_identifier

# Generate Stable Private IPv6 Addresses instead of hardware based ones
slaac private

denyinterfaces wlan0

wpa_supplicant.conf

country=CZ
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
ap_scan=0

network={
    identity="identity@domain"
    password="password"
    eap=PEAP
    phase2="auth=MSCHAPV2"
    #auth_alg=OPEN
    #proto=WPA RSN
    #pairwise=CCMP
    key_mgmt=WPA-EAP IEEE8021X
    ca_cert="path/to/cert.pem"
}

日记ctl | grep dhcpcd

Apr 02 23:12:30 raspberrypi dhcpcd[398]: eth0: waiting for carrier
Apr 02 23:12:31 raspberrypi dhcpcd[398]: eth0: carrier acquired
Apr 02 23:12:31 raspberrypi dhcpcd[398]: eth0: adding address fe80::666d:9cb2:9035:c937
Apr 02 23:12:31 raspberrypi dhcpcd[398]: DUID 00:01:00:01:20:4c:53:e2:b8:27:eb:53:ae:55
Apr 02 23:12:31 raspberrypi dhcpcd[398]: eth0: IAID eb:53:ae:55
Apr 02 23:12:32 raspberrypi dhcpcd[398]: eth0: rebinding lease of 158.196.42.184
Apr 02 23:12:32 raspberrypi dhcpcd[398]: eth0: probing address 158.196.42.184/24
Apr 02 23:12:32 raspberrypi dhcpcd[398]: eth0: soliciting an IPv6 router
Apr 02 23:12:33 raspberrypi dhcpcd[398]: eth0: Router Advertisement from fe80::215:c7ff:fe27:e100
Apr 02 23:12:33 raspberrypi dhcpcd[398]: eth0: adding address 2001:718:1001:693:aab9:5e4c:7412:6fb7/64
Apr 02 23:12:33 raspberrypi dhcpcd[398]: eth0: adding route to 2001:718:1001:693::/64
Apr 02 23:12:33 raspberrypi dhcpcd[398]: eth0: adding default route via fe80::215:c7ff:fe27:e100
Apr 02 23:12:37 raspberrypi dhcpcd[398]: eth0: leased 158.196.42.184 for 3600 seconds
Apr 02 23:12:37 raspberrypi dhcpcd[398]: eth0: adding route to 158.196.42.0/24
Apr 02 23:12:37 raspberrypi dhcpcd[398]: eth0: adding default route via 158.196.42.1
Apr 02 23:12:37 raspberrypi dhcpcd[398]: Too few arguments.
Apr 02 23:12:37 raspberrypi dhcpcd[398]: Too few arguments.
Apr 02 23:12:37 raspberrypi dhcpcd[398]: Failed to get unit file state for ntpd.service: No such file or directory
Apr 02 23:12:37 raspberrypi dhcpcd[398]: forked to background, child pid 838
Apr 03 00:15:47 raspberrypi dhcpcd[838]: eth0: fe80::215:c7ff:fe27:e100 is unreachable, expiring it
Apr 03 00:29:29 raspberrypi dhcpcd[838]: eth0: carrier lost
Apr 03 00:29:29 raspberrypi dhcpcd[838]: eth0: deleting address 2001:718:1001:693:aab9:5e4c:7412:6fb7/64
Apr 03 00:29:29 raspberrypi dhcpcd[838]: eth0: deleting default route via fe80::215:c7ff:fe27:e100
Apr 03 00:29:29 raspberrypi dhcpcd[838]: eth0: deleting route to 2001:718:1001:693::/64
Apr 03 00:29:29 raspberrypi dhcpcd[838]: eth0: deleting address fe80::666d:9cb2:9035:c937
Apr 03 00:29:29 raspberrypi dhcpcd[838]: eth0: deleting route to 158.196.42.0/24
Apr 03 00:29:29 raspberrypi dhcpcd[838]: eth0: deleting default route via 158.196.42.1
Apr 03 00:29:30 raspberrypi dhcpcd[838]: eth0: carrier acquired
Apr 03 00:29:30 raspberrypi dhcpcd[838]: eth0: adding address fe80::ea91:85c:bd9b:85ce
Apr 03 00:29:30 raspberrypi dhcpcd[838]: eth0: IAID eb:53:ae:55
Apr 03 00:29:30 raspberrypi dhcpcd[838]: eth0: rebinding lease of 158.196.42.184
Apr 03 00:29:30 raspberrypi dhcpcd[838]: eth0: soliciting an IPv6 router
Apr 03 00:29:32 raspberrypi dhcpcd[838]: eth0: Router Advertisement from fe80::215:c7ff:fe27:e100
Apr 03 00:29:32 raspberrypi dhcpcd[838]: eth0: adding address 2001:718:1001:693:aab9:5e4c:7412:6fb7/64
Apr 03 00:29:32 raspberrypi dhcpcd[838]: eth0: adding route to 2001:718:1001:693::/64
Apr 03 00:29:32 raspberrypi dhcpcd[838]: eth0: adding default route via fe80::215:c7ff:fe27:e100
Apr 03 00:29:35 raspberrypi dhcpcd[838]: eth0: probing address 158.196.42.184/24
Apr 03 00:29:40 raspberrypi dhcpcd[838]: eth0: leased 158.196.42.184 for 3600 seconds
Apr 03 00:29:40 raspberrypi dhcpcd[838]: eth0: adding route to 158.196.42.0/24
Apr 03 00:29:40 raspberrypi dhcpcd[838]: eth0: adding default route via 158.196.42.1
Apr 03 00:29:40 raspberrypi dhcpcd[838]: eth0: removing route to 158.196.42.0/24
Apr 03 00:59:40 raspberrypi dhcpcd[838]: eth0: adding route to 158.196.42.0/24
Apr 03 01:31:40 raspberrypi dhcpcd[838]: eth0: fe80::215:c7ff:fe27:e100 is unreachable, expiring it
Apr 03 01:32:42 raspberrypi dhcpcd[838]: eth0: carrier lost
Apr 03 01:32:42 raspberrypi dhcpcd[838]: eth0: deleting address 2001:718:1001:693:aab9:5e4c:7412:6fb7/64
Apr 03 01:32:42 raspberrypi dhcpcd[838]: eth0: deleting default route via fe80::215:c7ff:fe27:e100
Apr 03 01:32:42 raspberrypi dhcpcd[838]: eth0: deleting route to 2001:718:1001:693::/64
Apr 03 01:32:42 raspberrypi dhcpcd[838]: eth0: deleting address fe80::ea91:85c:bd9b:85ce
Apr 03 01:32:42 raspberrypi dhcpcd[838]: eth0: deleting route to 158.196.42.0/24
Apr 03 01:32:42 raspberrypi dhcpcd[838]: eth0: deleting default route via 158.196.42.1
Apr 03 01:32:42 raspberrypi dhcpcd[838]: eth0: carrier acquired
Apr 03 01:32:42 raspberrypi dhcpcd[838]: eth0: adding address fe80::ea91:85c:bd9b:85ce
Apr 03 01:32:42 raspberrypi dhcpcd[838]: eth0: IAID eb:53:ae:55
Apr 03 01:32:42 raspberrypi dhcpcd[838]: eth0: soliciting an IPv6 router
Apr 03 01:32:43 raspberrypi dhcpcd[838]: eth0: rebinding lease of 158.196.42.184
Apr 03 01:32:48 raspberrypi dhcpcd[838]: eth0: probing for an IPv4LL address
Apr 03 01:32:48 raspberrypi dhcpcd[838]: eth0: DHCP lease expired
Apr 03 01:32:48 raspberrypi dhcpcd[838]: eth0: soliciting a DHCP lease
Apr 03 01:32:52 raspberrypi dhcpcd[838]: eth0: Router Advertisement from fe80::215:c7ff:fe27:e100
Apr 03 01:32:52 raspberrypi dhcpcd[838]: eth0: adding address 2001:718:1001:693:aab9:5e4c:7412:6fb7/64
Apr 03 01:32:52 raspberrypi dhcpcd[838]: eth0: adding route to 2001:718:1001:693::/64
Apr 03 01:32:52 raspberrypi dhcpcd[838]: eth0: adding default route via fe80::215:c7ff:fe27:e100
Apr 03 01:32:52 raspberrypi dhcpcd[838]: eth0: using IPv4LL address 169.254.174.198
Apr 03 01:32:52 raspberrypi dhcpcd[838]: eth0: adding route to 169.254.0.0/16
Apr 03 01:32:52 raspberrypi dhcpcd[838]: eth0: adding default route
Apr 03 01:32:53 raspberrypi dhcpcd[838]: eth0: removing route to 169.254.0.0/16
Apr 03 01:32:54 raspberrypi dhcpcd[838]: eth0: offered 158.196.42.184 from 158.196.149.9
Apr 03 01:32:54 raspberrypi dhcpcd[838]: eth0: ignoring offer of 158.196.42.184 from 158.196.162.8
Apr 03 01:32:54 raspberrypi dhcpcd[838]: eth0: probing address 158.196.42.184/24
Apr 03 01:32:59 raspberrypi dhcpcd[838]: eth0: leased 158.196.42.184 for 3600 seconds
Apr 03 01:32:59 raspberrypi dhcpcd[838]: eth0: adding route to 169.254.0.0/16
Apr 03 01:32:59 raspberrypi dhcpcd[838]: eth0: adding route to 158.196.42.0/24
Apr 03 01:32:59 raspberrypi dhcpcd[838]: eth0: changing default route via 158.196.42.1
Apr 03 01:32:59 raspberrypi dhcpcd[838]: eth0: deleting route to 169.254.0.0/16
Apr 03 01:32:59 raspberrypi dhcpcd[838]: eth0: removing route to 158.196.42.0/24
Apr 03 01:32:59 raspberrypi dhcpcd[838]: eth0: removing default route via 158.196.42.1
Apr 03 01:33:00 raspberrypi dhcpcd[838]: eth0: carrier lost
Apr 03 01:33:00 raspberrypi dhcpcd[838]: eth0: deleting address 2001:718:1001:693:aab9:5e4c:7412:6fb7/64
Apr 03 01:33:00 raspberrypi dhcpcd[838]: eth0: deleting default route via fe80::215:c7ff:fe27:e100
Apr 03 01:33:00 raspberrypi dhcpcd[838]: eth0: deleting route to 2001:718:1001:693::/64
Apr 03 01:33:01 raspberrypi dhcpcd[838]: eth0: deleting address fe80::ea91:85c:bd9b:85ce
Apr 03 01:33:01 raspberrypi dhcpcd[838]: eth0: carrier acquired
Apr 03 01:33:01 raspberrypi dhcpcd[838]: eth0: adding address fe80::ea91:85c:bd9b:85ce
Apr 03 01:33:01 raspberrypi dhcpcd[838]: eth0: IAID eb:53:ae:55
Apr 03 01:33:01 raspberrypi dhcpcd[838]: eth0: carrier lost
Apr 03 01:33:01 raspberrypi dhcpcd[838]: eth0: deleting address fe80::ea91:85c:bd9b:85ce
Apr 03 01:33:01 raspberrypi dhcpcd[838]: eth0: carrier acquired
Apr 03 01:33:01 raspberrypi dhcpcd[838]: eth0: adding address fe80::ea91:85c:bd9b:85ce
Apr 03 01:33:01 raspberrypi dhcpcd[838]: eth0: IAID eb:53:ae:55
Apr 03 01:33:01 raspberrypi dhcpcd[838]: eth0: rebinding lease of 158.196.42.184
Apr 03 01:33:02 raspberrypi dhcpcd[838]: eth0: soliciting an IPv6 router
Apr 03 01:33:06 raspberrypi dhcpcd[838]: eth0: probing address 158.196.42.184/24
Apr 03 01:33:06 raspberrypi dhcpcd[838]: eth0: Router Advertisement from fe80::215:c7ff:fe27:e100
Apr 03 01:33:06 raspberrypi dhcpcd[838]: eth0: adding address 2001:718:1001:693:aab9:5e4c:7412:6fb7/64
Apr 03 01:33:06 raspberrypi dhcpcd[838]: eth0: adding route to 2001:718:1001:693::/64
Apr 03 01:33:06 raspberrypi dhcpcd[838]: eth0: adding default route via fe80::215:c7ff:fe27:e100
Apr 03 01:33:11 raspberrypi dhcpcd[838]: eth0: leased 158.196.42.184 for 3600 seconds
Apr 03 01:33:11 raspberrypi dhcpcd[838]: eth0: adding route to 158.196.42.0/24
Apr 03 01:33:11 raspberrypi dhcpcd[838]: eth0: adding default route via 158.196.42.1
Apr 03 01:33:11 raspberrypi dhcpcd[838]: eth0: removing route to 158.196.42.0/24
Apr 03 02:03:11 raspberrypi dhcpcd[838]: eth0: adding route to 158.196.42.0/24
Apr 03 02:40:00 raspberrypi dhcpcd[838]: eth0: fe80::215:c7ff:fe27:e100 is unreachable, expiring it
Apr 03 03:25:41 raspberrypi dhcpcd[838]: eth0: failed to renew DHCP, rebinding
Apr 03 03:33:11 raspberrypi dhcpcd[838]: eth0: DHCP lease expired
Apr 03 03:33:11 raspberrypi dhcpcd[838]: eth0: deleting route to 158.196.42.0/24
Apr 03 03:33:11 raspberrypi dhcpcd[838]: eth0: deleting default route via 158.196.42.1
Apr 03 03:33:11 raspberrypi dhcpcd[838]: eth0: soliciting a DHCP lease
Apr 03 03:33:12 raspberrypi dhcpcd[838]: eth0: offered 10.5.26.243 from 10.0.0.1
Apr 03 03:33:12 raspberrypi dhcpcd[838]: eth0: probing address 10.5.26.243/24
Apr 03 03:33:17 raspberrypi dhcpcd[838]: eth0: leased 10.5.26.243 for 3600 seconds
Apr 03 03:33:17 raspberrypi dhcpcd[838]: eth0: adding route to 10.5.26.0/24
Apr 03 03:33:17 raspberrypi dhcpcd[838]: eth0: adding default route via 10.5.26.1
Apr 03 03:33:17 raspberrypi dhcpcd[838]: eth0: removing route to 10.5.26.0/24
Apr 03 04:03:17 raspberrypi dhcpcd[838]: eth0: adding route to 10.5.26.0/24
Apr 03 11:36:30 raspberrypi dhcpcd[838]: eth0: carrier lost
Apr 03 11:36:30 raspberrypi dhcpcd[838]: eth0: deleting address 2001:718:1001:693:aab9:5e4c:7412:6fb7/64
Apr 03 11:36:30 raspberrypi dhcpcd[838]: eth0: deleting default route via fe80::215:c7ff:fe27:e100
Apr 03 11:36:30 raspberrypi dhcpcd[838]: eth0: deleting route to 2001:718:1001:693::/64
Apr 03 11:36:30 raspberrypi dhcpcd[838]: eth0: deleting address fe80::ea91:85c:bd9b:85ce
Apr 03 11:36:30 raspberrypi dhcpcd[838]: eth0: deleting route to 10.5.26.0/24
Apr 03 11:36:30 raspberrypi dhcpcd[838]: eth0: deleting default route via 10.5.26.1
Apr 03 11:36:31 raspberrypi dhcpcd[838]: eth0: carrier acquired
Apr 03 11:36:31 raspberrypi dhcpcd[838]: eth0: adding address fe80::ea91:85c:bd9b:85ce
Apr 03 11:36:31 raspberrypi dhcpcd[838]: eth0: IAID eb:53:ae:55
Apr 03 11:36:31 raspberrypi dhcpcd[838]: eth0: soliciting an IPv6 router
Apr 03 11:36:31 raspberrypi dhcpcd[838]: eth0: rebinding lease of 10.5.26.243
Apr 03 11:36:35 raspberrypi dhcpcd[838]: eth0: NAK: requested address not available from 158.196.162.8
Apr 03 11:36:35 raspberrypi dhcpcd[838]: eth0: message: requested address not available
Apr 03 11:36:35 raspberrypi dhcpcd[838]: eth0: soliciting a DHCP lease
Apr 03 11:36:36 raspberrypi dhcpcd[838]: eth0: offered 158.196.42.184 from 158.196.149.9
Apr 03 11:36:36 raspberrypi dhcpcd[838]: eth0: probing address 158.196.42.184/24
Apr 03 11:36:36 raspberrypi dhcpcd[838]: eth0: Router Advertisement from fe80::215:c7ff:fe27:e100
Apr 03 11:36:36 raspberrypi dhcpcd[838]: eth0: adding address 2001:718:1001:693:aab9:5e4c:7412:6fb7/64
Apr 03 11:36:36 raspberrypi dhcpcd[838]: eth0: adding route to 2001:718:1001:693::/64
Apr 03 11:36:36 raspberrypi dhcpcd[838]: eth0: adding default route via fe80::215:c7ff:fe27:e100
Apr 03 11:36:40 raspberrypi dhcpcd[838]: eth0: leased 158.196.42.184 for 3600 seconds
Apr 03 11:36:40 raspberrypi dhcpcd[838]: eth0: adding route to 158.196.42.0/24
Apr 03 11:36:40 raspberrypi dhcpcd[838]: eth0: adding default route via 158.196.42.1
Apr 03 11:36:41 raspberrypi dhcpcd[838]: eth0: removing route to 158.196.42.0/24
Apr 03 12:06:40 raspberrypi dhcpcd[838]: eth0: adding route to 158.196.42.0/24
Apr 03 12:38:20 raspberrypi dhcpcd[838]: eth0: fe80::215:c7ff:fe27:e100 is unreachable, expiring it
Apr 03 12:58:26 raspberrypi dhcpcd[838]: eth0: carrier lost
Apr 03 12:58:26 raspberrypi dhcpcd[838]: eth0: deleting address 2001:718:1001:693:aab9:5e4c:7412:6fb7/64
Apr 03 12:58:26 raspberrypi dhcpcd[838]: eth0: deleting default route via fe80::215:c7ff:fe27:e100
Apr 03 12:58:26 raspberrypi dhcpcd[838]: eth0: deleting route to 2001:718:1001:693::/64
Apr 03 12:58:26 raspberrypi dhcpcd[838]: eth0: deleting address fe80::ea91:85c:bd9b:85ce
Apr 03 12:58:26 raspberrypi dhcpcd[838]: eth0: deleting route to 158.196.42.0/24
Apr 03 12:58:26 raspberrypi dhcpcd[838]: eth0: deleting default route via 158.196.42.1
Apr 03 12:58:27 raspberrypi dhcpcd[838]: eth0: carrier acquired
Apr 03 12:58:27 raspberrypi dhcpcd[838]: eth0: adding address fe80::ea91:85c:bd9b:85ce
Apr 03 12:58:27 raspberrypi dhcpcd[838]: eth0: IAID eb:53:ae:55
Apr 03 12:58:27 raspberrypi dhcpcd[838]: eth0: soliciting an IPv6 router
Apr 03 12:58:27 raspberrypi dhcpcd[838]: eth0: rebinding lease of 158.196.42.184
Apr 03 12:58:30 raspberrypi dhcpcd[838]: eth0: probing address 158.196.42.184/24
Apr 03 12:58:31 raspberrypi dhcpcd[838]: eth0: Router Advertisement from fe80::215:c7ff:fe27:e100
Apr 03 12:58:31 raspberrypi dhcpcd[838]: eth0: adding address 2001:718:1001:693:aab9:5e4c:7412:6fb7/64
Apr 03 12:58:31 raspberrypi dhcpcd[838]: eth0: adding route to 2001:718:1001:693::/64
Apr 03 12:58:31 raspberrypi dhcpcd[838]: eth0: adding default route via fe80::215:c7ff:fe27:e100
Apr 03 12:58:35 raspberrypi dhcpcd[838]: eth0: leased 158.196.42.184 for 3600 seconds
Apr 03 12:58:35 raspberrypi dhcpcd[838]: eth0: adding route to 158.196.42.0/24
Apr 03 12:58:35 raspberrypi dhcpcd[838]: eth0: adding default route via 158.196.42.1
Apr 03 12:58:36 raspberrypi dhcpcd[838]: eth0: removing route to 158.196.42.0/24
Apr 03 13:28:35 raspberrypi dhcpcd[838]: eth0: adding route to 158.196.42.0/24

相关内容