插上网卡不用插网线,先识别一下

1、lsusb 可以看到三块USB网卡识别出来了 Realtek ASIX 

root@gangwan-nas:~# lsusb
|__usb1          1d6b:0002:0404 09  2.00  480MBit/s 0mA 1IF  (Linux 4.4.302+ xhci-hcd xHCI Host Controller 0000:00:14.0) hub
  |__1-2         f400:f400:0100 00  2.00  480MBit/s 200mA 1IF  (SanDisk' Cruzer Fit 02000602112921021907)
  |__1-5         0bda:8156:3104 00  2.10  480MBit/s 200mA 1IF  (Realtek USB 10/100/1G/2.5G LAN 4013000001)
  |__1-9         0b95:1790:0300 ff  2.10  480MBit/s 100mA 1IF  (ASIX AX88772D 00320763)
  |__1-10        8087:0029:0001 e0  2.01   12MBit/s 100mA 2IFs ( ffffffd1ffffffb2ffffffdbffffffad)
|__usb2          1d6b:0003:0404 09  3.00 5000MBit/s 0mA 1IF  (Linux 4.4.302+ xhci-hcd xHCI Host Controller 0000:00:14.0) hub
  |__2-6         0b95:1790:0100 ff  3.00 5000MBit/s 496mA 1IF  (ASIX Elec. Corp. AX88179 000000000005D2)

2、ls -l /sys/class/net eth1 -3都是USB网卡

lrwxrwxrwx 1 root root    0 Jun  1 21:50 docker0 -> ../../devices/virtual/net/docker0
lrwxrwxrwx 1 root root    0 Jun  1 21:41 eth0 -> ../../devices/pci0000:00/0000:00:1c.3/0000:03:00.0/net/eth0
lrwxrwxrwx 1 root root    0 Jun  1 21:46 eth1 -> ../../devices/pci0000:00/0000:00:14.0/usb2/2-6/2-6:1.0/net/eth1
lrwxrwxrwx 1 root root    0 Jun  1 21:46 eth2 -> ../../devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0/net/eth2
lrwxrwxrwx 1 root root    0 Jun  1 21:50 eth3 -> ../../devices/pci0000:00/0000:00:14.0/usb1/1-9/1-9:1.0/net/eth3
lrwxrwxrwx 1 root root    0 Jun  1 21:41 lo -> ../../devices/virtual/net/lo
lrwxrwxrwx 1 root root    0 Jun  1 21:42 ovs_eth0 -> ../../devices/virtual/net/ovs_eth0
lrwxrwxrwx 1 root root    0 Jun  1 21:42 ovs-system -> ../../devices/virtual/net/ovs-system
lrwxrwxrwx 1 root root    0 Jun  1 21:41 sit0 -> ../../devices/virtual/net/sit0
-rw-r--r-- 1 root root 4096 Jun  1 21:42 syno_ovs_bonds

3、udevadm info /sys/class/net/eth1 驱动和位置全都识别出来了

E: INTERFACE=eth1
E: PHYSDEVBUS=usb
E: PHYSDEVDRIVER=ax88179_178a
E: PHYSDEVPATH=/devices/pci0000:00/0000:00:14.0/usb2/2-6/2-6:1.0

4、ip link set eth1 up 直接启动网卡,界面上就出现新的网卡了

  • 无标签