Ubuntu 17.04. 安装 USB 以太网适配器驱动程序

Ubuntu 17.04. 安装 USB 以太网适配器驱动程序

需要安装 USB 以太网适配器(下面的 lsusb 字符串)

总线 003 设备 005:ID 0bda:8152 Realtek Semiconductor Corp.

我获得了制造商的四个文件:

/home/sergey/Downloads/RTL8152/LINUX And​​riod/50-usb-realtek-net.rules /home/sergey/Downloads/RTL8152/LINUX And​​riod/compatibility.h /home/sergey/Downloads/RTL8152/LINUX And​​riod/Makefile /home/sergey/Downloads/RTL8152/LINUX And​​riod/r8152.c

问题 1:我是否需要以某种方式安装上述这些文件?

问题2:如果 Q1 为负,如何检查适配器/使其工作?

笔记:主要目的是通过上述适配器连接 Wi-Fi 集线器 (Zyxell KEENETIC)。集线器上的指示显示没有通过适配器建立网络连接。

请指教。SK

编辑@chili555

感谢您的及时回答。请参阅以下结果。

sergey@home-X200CA:~$ lsmod | grep r8152
r8152                  49152  0
mii                    16384  2 usbnet,r8152
sergey@home-X200CA:~$ ifconfig
enp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::da50:e6ff:fe9e:f905  prefixlen 64  scopeid 0x20<link>
        ether d8:50:e6:9e:f9:05  txqueuelen 1000  (Ethernet)
        RX packets 618782  bytes 742610979 (742.6 MB)
        RX errors 0  dropped 1787  overruns 0  frame 0
        TX packets 441907  bytes 64009887 (64.0 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 19  
enx00e04c362984: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 00:e0:4c:36:29:84  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        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 6098  bytes 2693946 (2.6 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6098  bytes 2693946 (2.6 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
ppp0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1492
        inet 5.35.51.212  netmask 255.255.255.255  destination 5.35.0.1
        ppp  txqueuelen 3  (Point-to-Point Protocol)
        RX packets 458293  bytes 537885941 (537.8 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 337967  bytes 41480878 (41.4 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
sergey@home-X200CA:~$ dmesg | grep r8152
[   16.811429] usbcore: registered new interface driver r8152
[   17.019410] r8152 3-1.3:1.0 eth0: v1.08.8
[   19.889560] r8152 3-1.3:1.0 enx00e04c362984: renamed from eth0
sergey@home-X200CA:~$ dmesg | grep inp350
sergey@home-X200CA:~$ 
sergey@home-X200CA:~$ dmesg | grep inp3s0
sergey@home-X200CA:~$

假设我使用了错误的接口。请指教。

答案1

A1:不,您不需要安装驱动程序。它已包含在 Ubuntu 17.04 中。r8152. 从模块别名:

filename:       /lib/modules/4.10.0-28-generic/kernel/drivers/net/usb/r8152.ko
version:        v1.08.8
license:        GPL
description:    Realtek RTL8152/RTL8153 Based USB Ethernet Adapters
author:         Realtek linux nic maintainers <[email protected]>
srcversion:     382765E0356A7F7FA08EF4C
<snip>
alias:          usb:v0BDAp8152d*dc*dsc*dp*ic02isc06ip00in*
alias:          usb:v0BDAp8152d*dc*dsc*dp*icFFisc*ip*in*
<snip>

A2:插入设备。检查驱动程序是否已加载:

lsmod | grep r8152

检查接口是否创建:

ifconfig

查看日志中是否有线索:

dmesg | grep r8152
dmesg | grep <interface_you_found>

例如,ifconfig我的以太网接口是 enp0s25。因此,为了寻找线索,我会检查:

dmesg | grep enp0s25

在对问题的编辑中发布您的发现,我将编辑此答案以添加故障排除步骤。

答案2

根据建议研究信息后,我决定检查集线器和适配器之间的以太网连接。问题出在电缆上。现在集线器正在响应。感谢您的帮助。

最好的,SK

相关内容