私たちの大学は最近802.1X有線認証を使用し始め、ラズベリーパイでdhcpリースがタイムアウトした後、インターネット接続が機能しなくなりました。
プリインストールされているdhcpcdとwpa_supplicantを使用してネットワークに接続しています。ブート後、インターネットはうまく機能し、dhcpからIPを取得し、すべてがうまく機能しますが、dhcpのリース時間が経過すると、インターネットは機能しなくなります。インターネットを再起動する唯一の方法は、インターフェイスを無効にして再度有効にすることです(ifdown eth0とifup eth0)。
私はraspbian jessieとStretchを試しましたが、何も変わりませんでした。また、dhcpcdを直接構築してみて、dhcpcdの代わりにdhclientを使ってみました。
助けてくれてありがとう。
編集する
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