Realtek 8139 以太网接口正在运行但未连接

Realtek 8139 以太网接口正在运行但未连接

我有一台运行 Lubuntu 18.04 的旧 SONY Vaio PCG-FR285E 笔记本电脑。我认为我快要让网络接口正常工作了,但我找不到缺少什么(我的网络设置能力接近于零!)。

网络接口是:

$ lspci | grep Ethernet
00:0c.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8100/8101L/8139 PCI Fast Ethernet Adapter (rev 10)

我知道硬件没有问题,因为我已经通过从 FOG 服务器的 PXE 网络启动安装了 Lubuntu。

我必须将 8139cp 列入黑名单,以便内核可以声明它:

$ lsmod | grep 8139
8139too                32768  0
mii                    16384  2 usbnet,8139too

(usbnet 已启用,因为我使用智能手机通过 usb 共享互联网)

$ sudo lshw -C network
  *-network                 
       description: Ethernet interface
       product: RTL-8100/8101L/8139 PCI Fast Ethernet Adapter
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: c
       bus info: pci@0000:00:0c.0
       logical name: enp0s12
       version: 10
       serial: 08:00:46:b0:25:03
       size: 100Mbit/s
       capacity: 100Mbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=8139too driverversion=0.9.28 duplex=full latency=64 link=yes maxlatency=64 mingnt=32 multicast=yes port=MII speed=100Mbit/s
       resources: irq:9 ioport:1400(size=256) memory:e0000000-e00001ff
  *-network
       description: Ethernet interface
       physical id: 1
       logical name: enp0s16f3u1
       serial: 06:b4:5a:78:a4:fa
       capabilities: ethernet physical
       configuration: broadcast=yes driver=rndis_host driverversion=22-Aug-2005 firmware=RNDIS device ip=192.168.42.159 link=yes multicast=yes

我必须在启动后手动启用该接口:

$ ifconfig
enp0s16f3u1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.42.159  netmask 255.255.255.0  broadcast 192.168.42.255
        inet6 fe80::dd47:b63a:8e94:7e71  prefixlen 64  scopeid 0x20<link>
        ether 06:b4:5a:78:a4:fa  txqueuelen 1000  (Ethernet)
        RX packets 131  bytes 11200 (11.2 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 154  bytes 20243 (20.2 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 116  bytes 9194 (9.1 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 116  bytes 9194 (9.1 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
$ sudo ifconfig enp0s12 up
[sudo] password for vaio: 
$ ifconfig
enp0s12: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::a00:46ff:feb0:2503  prefixlen 64  scopeid 0x20<link>
        ether 08:00:46:b0:25:03  txqueuelen 1000  (Ethernet)
        RX packets 4  bytes 240 (240.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3  bytes 266 (266.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp0s16f3u1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.42.159  netmask 255.255.255.0  broadcast 192.168.42.255
        inet6 fe80::dd47:b63a:8e94:7e71  prefixlen 64  scopeid 0x20<link>
        ether 06:b4:5a:78:a4:fa  txqueuelen 1000  (Ethernet)
        RX packets 131  bytes 11200 (11.2 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 156  bytes 20505 (20.5 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 118  bytes 9318 (9.3 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 118  bytes 9318 (9.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

但是,网络管理器显示“设备未管理”,而且肯定无法连接。我检查了电缆和宽带路由器是否正常,因为另一台笔记本电脑确实可以顺利连接。

更多信息:

$ dmesg | grep -e eth0 -e 8139
[    0.048233] pci 0000:00:0c.0: [10ec:8139] type 00 class 0x020000
[    3.549707] 8139too: 8139too Fast Ethernet driver 0.9.28
[    3.550558] 8139too 0000:00:0c.0 eth0: RealTek RTL8139 at 0x(ptrval), 08:00:46:b0:25:03, IRQ 9
[    3.761694] 8139too 0000:00:0c.0 enp0s12: renamed from eth0
[ 2570.826291] 8139too 0000:00:0c.0 enp0s12: link up, 100Mbps, full-duplex, lpa 0xC5E1
$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto enp0s12
iface enp0s12 inet manual

我希望它能够工作,如果可能的话,可以在启动时自动运行。

非常感谢您的帮助!

答案1

成立。

只需编辑 /etc/NetworkManager/NetworkManager.conf,在“[ifupdown]”部分中设置“managed=true”。

然后重新启动。

相关内容