![是什么原因导致““lo”不支持设备类型 772”?](https://linux22.com/image/123906/%E6%98%AF%E4%BB%80%E4%B9%88%E5%8E%9F%E5%9B%A0%E5%AF%BC%E8%87%B4%E2%80%9C%E2%80%9Clo%E2%80%9D%E4%B8%8D%E6%94%AF%E6%8C%81%E8%AE%BE%E5%A4%87%E7%B1%BB%E5%9E%8B%20772%E2%80%9D%EF%BC%9F.png)
重新启动 RPi,返回后,我无法访问设备的静态 IP。原因是Unsupported device type 772 for "lo"
。
michael@pi3:~ $ sudo journalctl -u networking
[sudo] password for michael:
-- Logs begin at Sat 2016-05-21 22:31:29 UTC, end at Sun 2017-12-17 15:14:04 UTC. --
Dec 17 15:13:00 pi3 systemd[1]: Starting Raise network interfaces...
Dec 17 15:13:01 pi3 dhclient[1053]: Internet Systems Consortium DHCP Client 4.3.1
Dec 17 15:13:01 pi3 ifup[838]: Internet Systems Consortium DHCP Client 4.3.1
Dec 17 15:13:01 pi3 ifup[838]: Copyright 2004-2014 Internet Systems Consortium.
Dec 17 15:13:01 pi3 ifup[838]: All rights reserved.
Dec 17 15:13:01 pi3 ifup[838]: For info, please visit https://www.isc.org/software/dhcp/
Dec 17 15:13:01 pi3 dhclient[1053]: Copyright 2004-2014 Internet Systems Consortium.
Dec 17 15:13:01 pi3 dhclient[1053]: All rights reserved.
Dec 17 15:13:01 pi3 dhclient[1053]: For info, please visit https://www.isc.org/software/dhcp/
Dec 17 15:13:01 pi3 dhclient[1053]:
Dec 17 15:13:02 pi3 ifup[838]: Unsupported device type 772 for "lo"
Dec 17 15:13:02 pi3 ifup[838]: If you think you have received this message due to a bug rather
Dec 17 15:13:02 pi3 ifup[838]: than a configuration issue please read the section on submitting
Dec 17 15:13:02 pi3 ifup[838]: bugs on either our web page at www.isc.org or in the README file
Dec 17 15:13:02 pi3 ifup[838]: before submitting a bug. These pages explain the proper
Dec 17 15:13:02 pi3 ifup[838]: process and the information we find helpful for debugging..
Dec 17 15:13:02 pi3 ifup[838]: exiting.
Dec 17 15:13:02 pi3 ifup[838]: Failed to bring up lo.
Dec 17 15:13:02 pi3 systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Dec 17 15:13:02 pi3 systemd[1]: Failed to start Raise network interfaces.
Dec 17 15:13:02 pi3 systemd[1]: networking.service: Unit entered failed state.
Dec 17 15:13:02 pi3 systemd[1]: networking.service: Failed with result 'exit-code'.
据我所知,我没有做任何事情来造成这种情况。最近,我执行了以下操作:
sudo vi /etc/apt/sources.list # Added: deb http://deb.debian.org/debian jessie-backports main contrib non-free
sudo apt-get update -y && sudo apt-get -t jessie-backports install systemd-journal-remote
它给出了一些关于软件不稳定的警告,但是,我没有处理这些警告。
此后我重新启动了几次,编辑了/etc/dhcpcd
and /etc/network/interfaces
,删除systemd-journal-remote
并执行了apt-get update
and apt-get dist-upgrade
。
该设备现在正在连接到网络,但使用的是我的路由器分配的 DHCP IP。我不确定删除是否systemd-journal-remote
允许我连接到 DHCP IP,或者在删除它之前我是否能够这样做,但我没有尝试,因为我当时不知道它正在这样做。
michael@pi3:~ $ ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enxb827ebb47748: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether b8:27:eb:b4:77:48 brd ff:ff:ff:ff:ff:ff
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DORMANT group default qlen 1000
link/ether b8:27:eb:e1:22:1d brd ff:ff:ff:ff:ff:ff
michael@pi3:~ $ netstat -i
Kernel Interface table
Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
enxb827ebb47748 1500 0 1207 0 0 0 633 0 0 0 BMRU
lo 65536 0 0 0 0 0 0 0 0 0 LRU
wlan0 1500 0 0 0 0 0 0 0 0 0 BMU
michael@pi3:~ $ /sbin/ifconfig -a
enxb827ebb47748 Link encap:Ethernet HWaddr b8:27:eb:b4:77:48
inet addr:10.120.11.100 Bcast:10.120.11.255 Mask:255.255.255.0
inet6 addr: fe80::ba10:beb8:89b0:6514/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1224 errors:0 dropped:0 overruns:0 frame:0
TX packets:647 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:120044 (117.2 KiB) TX bytes:105208 (102.7 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wlan0 Link encap:Ethernet HWaddr b8:27:eb:e1:22:1d
inet6 addr: fe80::f371:f1a7:b477:5ece/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
/etc/network/interfaces
有iface eth0 inet manual
,/etc/dhcpcd.conf
如下所示,看起来不错,我应该使用静态 IP。虽然我不知道如何强制我的路由器释放客户端,但我确实更改了 ip 池范围,导致它被释放,但它只是获取了另一个动态 IP。
michael@pi3:~ $ cat /etc/dhcpcd.conf
# 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.
#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.
# Some interface drivers reset when changing the MTU so disabled by default.
#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
# A hook script is provided to lookup the hostname if not set by the DHCP
# server, but it should not be run by default.
nohook lookup-hostname
interface eth0
static ip_address=10.120.11.30/24
static routers=10.120.11.1
static domain_name_servers=10.120.11.1
然后我/etc/network/interfaces
如下所示进行编辑,并dhcpcd
使用 systemctl 停止并禁用。请注意,禁用dhcpcd
会引发一些警告,如下所示。
michael@pi3:~ $ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto lo
iface lo inet dhcp
iface eth0 inet static
address 10.120.11.30
netmask 255.255.0.0
gateway 10.120.11.1
dns-nameservers 10.120.11.1
allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
michael@pi3:~ $ sudo systemctl status dhcpcd.service
● dhcpcd.service - dhcpcd on all interfaces
Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/dhcpcd.service.d
└─wait.conf
Active: active (running) since Sun 2017-12-17 18:34:10 UTC; 5s ago
Process: 2460 ExecStart=/sbin/dhcpcd -q -w (code=exited, status=0/SUCCESS)
Main PID: 2513 (dhcpcd)
CGroup: /system.slice/dhcpcd.service
└─2513 /sbin/dhcpcd -q -w
Dec 17 18:34:09 pi3 dhcpcd[2460]: version 6.7.1 starting
Dec 17 18:34:09 pi3 dhcpcd[2460]: dev: loaded udev
Dec 17 18:34:10 pi3 dhcpcd[2460]: DUID 00:01:00:01:20:4c:53:e5:b8:27:eb:e2:72:ec
Dec 17 18:34:10 pi3 dhcpcd[2460]: enxb827ebb47748: IAID eb:b4:77:48
Dec 17 18:34:10 pi3 dhcpcd[2460]: wlan0: waiting for carrier
Dec 17 18:34:10 pi3 dhcpcd[2460]: enxb827ebb47748: rebinding lease of 10.120.11.101
Dec 17 18:34:10 pi3 dhcpcd[2460]: enxb827ebb47748: changing route to 10.120.11.0/24
Dec 17 18:34:10 pi3 dhcpcd[2460]: enxb827ebb47748: changing default route via 10.120.11.1
Dec 17 18:34:10 pi3 systemd[1]: Started dhcpcd on all interfaces.
Dec 17 18:34:10 pi3 dhcpcd[2513]: enxb827ebb47748: soliciting an IPv6 router
michael@pi3:~ $ sudo systemctl stop dhcpcd.service
michael@pi3:~ $ sudo systemctl status networking.service
● networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
Drop-In: /run/systemd/generator/networking.service.d
└─50-insserv.conf-$network.conf
Active: active (exited) since Sun 2017-12-17 18:06:35 UTC; 28min ago
Docs: man:interfaces(5)
Main PID: 808 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/networking.service
Dec 17 18:06:33 pi3 systemd[1]: Starting Raise network interfaces...
Dec 17 18:06:35 pi3 systemd[1]: Started Raise network interfaces.
michael@pi3:~ $ sudo systemctl status dhcpcd.service
● dhcpcd.service - dhcpcd on all interfaces
Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/dhcpcd.service.d
└─wait.conf
Active: failed (Result: exit-code) since Sun 2017-12-17 18:34:33 UTC; 15s ago
Main PID: 2513 (code=exited, status=1/FAILURE)
Dec 17 18:34:33 pi3 dhcpcd[2541]: dhcpcd[2541]: waiting for pid 2513 to exit
Dec 17 18:34:33 pi3 dhcpcd[2541]: sending signal TERM to pid 2513
Dec 17 18:34:33 pi3 dhcpcd[2541]: waiting for pid 2513 to exit
Dec 17 18:34:33 pi3 dhcpcd[2513]: received signal TERM from PID 2541, stopping
Dec 17 18:34:33 pi3 dhcpcd[2513]: wlan0: removing interface
Dec 17 18:34:33 pi3 dhcpcd[2513]: enxb827ebb47748: removing interface
Dec 17 18:34:33 pi3 systemd[1]: dhcpcd.service: Main process exited, code=exited, status=1/FAILURE
Dec 17 18:34:33 pi3 systemd[1]: Stopped dhcpcd on all interfaces.
Dec 17 18:34:33 pi3 systemd[1]: dhcpcd.service: Unit entered failed state.
Dec 17 18:34:33 pi3 systemd[1]: dhcpcd.service: Failed with result 'exit-code'.
michael@pi3:~ $ sudo systemctl is-enabled dhcpcd; echo $?
enabled
0
michael@pi3:~ $ sudo systemctl disable dhcpcd.service
Synchronizing state of dhcpcd.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable dhcpcd
insserv: warning: current start runlevel(s) (empty) of script `dhcpcd' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `dhcpcd' overrides LSB defaults (0 1 6).
insserv: warning: current start runlevel(s) (empty) of script `dhcpcd' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `dhcpcd' overrides LSB defaults (0 1 6).
michael@pi3:~ $
重新启动后,我没有连接。
michael@pi3:~ $ sudo systemctl status dhcpcd.service
● dhcpcd.service - dhcpcd on all interfaces
Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/dhcpcd.service.d
└─wait.conf
Active: inactive (dead)
michael@pi3:~ $ ifconfig -a
enxb827ebb47748 Link encap:Ethernet HWaddr b8:27:eb:b4:77:48
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wlan0 Link encap:Ethernet HWaddr b8:27:eb:e1:22:1d
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
michael@pi3:~ $ cat netstat.txt
Kernel Interface table
Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
lo 65536 0 0 0 0 0 0 0 0 0 LRU
wlan0 1500 0 0 0 0 0 0 0 0 0 BMU
michael@pi3:~ $ cat link.txt
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enxb827ebb47748: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether b8:27:eb:b4:77:48 brd ff:ff:ff:ff:ff:ff
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DORMANT group default qlen 1000
link/ether b8:27:eb:e1:22:1d brd ff:ff:ff:ff:ff:ff
michael@pi3:~ $ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enxb827ebb47748: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether b8:27:eb:b4:77:48 brd ff:ff:ff:ff:ff:ff
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether b8:27:eb:e1:22:1d brd ff:ff:ff:ff:ff:ff
michael@pi3:~ $ ip route # no returned text
michael@pi3:~ $ systemctl status networking
● networking.service - Raise network interfaces
Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
Drop-In: /run/systemd/generator/networking.service.d
└─50-insserv.conf-$network.conf
Active: active (exited) since Sun 2017-12-17 17:15:44 UTC; 29s ago
Docs: man:interfaces(5)
Main PID: 1347 (code=exited, status=0/SUCCESS)
Dec 17 17:15:44 pi3 systemd[1]: Starting Raise network interfaces...
Dec 17 17:15:44 pi3 systemd[1]: Started Raise network interfaces.
michael@pi3:~ $
会引起什么Unsupported device type 772 for "lo"
?是否是由于systemd-journal-remote
从向后移植安装造成的?这是否也会导致无法分配静态IP?