USB 以太网适配器已连接并在 ifconfig 中找到,但不工作

USB 以太网适配器已连接并在 ifconfig 中找到,但不工作

我为运行 Debian 的 ARM-Board 购买了一个 USB 以太网适配器,以便拥有第二个接口。我编译并加载了驱动程序/模块,设备正在被识别:

[    5.285487] usb 2-1.3.1: new high speed USB device number 5 using usb20_host
[    5.410218] usb 2-1.3.1: New USB device found, idVendor=0b95, idProduct=1790
[    5.415139] usb 2-1.3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    5.419292] usb 2-1.3.1: Product: AX88179
[    5.423656] usb 2-1.3.1: Manufacturer: ASIX Elec. Corp.
[    5.428398] usb 2-1.3.1: SerialNumber: 00803F5AF88883
[   38.570534] ax88179_178a 2-1.3.1:1.0: eth1: register 'ax88179_178a' at usb-usb20_host-1.3.1, ASIX AX88179 USB 3.0 Gigabit Ethernet, 80:4a:56:02:1e:84   

更多信息:

lsusb 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 002 Device 003: ID 0bda:0724 Realtek Semiconductor Corp. 
Bus 002 Device 004: ID 2109:2812  
Bus 002 Device 005: ID 0b95:1790 ASIX Electronics Corp. 

然后我就跑了

ifconfig eth1 up
ifconfig eth1 192.168.2.2 netmask 255.255.255.0

然后显示为:

ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 80:4a:56:02:1e:84  
          inet addr:192.168.2.2  Bcast:192.168.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING 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)

但是当连接到 ARM 板时,设备上的 LED(用于连接和活动)永远不会显示。因此,我检查了功耗(尽管 USB 以太网适配器是通过活动的 USB 集线器连接的):

 lsusb -s 002:005 -v | grep MaxPower
    MaxPower              248mA

此外,我无法从外部 ping 通 IP,也无法访问网络中的任何其他 PC 或网关。因此,似乎 I/O 根本不起作用。当连接到运行 OpenSUSE 13.1(附带驱动程序)的笔记本电脑时,适配器完全正常工作,并且闪烁。有什么想法可能导致此问题吗?

EDIT2:在当前设置中,两个接口都连接到同一个交换机,我也交换了电缆,并尝试了总共 5 种不同的电缆,当使用 USB 适配器将笔记本电脑连接到同一个交换机时,它们都可以工作:

# ethtool eth1
Settings for eth1:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Half 1000baseT/Full 
        Supported pause frame use: No
        Supports auto-negotiation: Yes
        Advertised link modes:  Not reported
        Advertised pause frame use: No
        Advertised auto-negotiation: No
        Speed: 10Mb/s
        Duplex: Half
        Port: MII
        PHYAD: 3
        Transceiver: internal
        Auto-negotiation: off
        Supports Wake-on: pg
        Wake-on: g
        Current message level: 0x00000007 (7)
                               drv probe link
        Link detected: no

# ethtool eth0                                                                                                                                                                                                       
Settings for eth0:                                                                                                                                                                                                               
        Supported ports: [ TP MII ]                                                                                                                                                                                              
        Supported link modes:   10baseT/Half 10baseT/Full                                                                                                                                                                        
                                100baseT/Half 100baseT/Full                                                                                                                                                                      
        Supported pause frame use: Symmetric Receive-only                                                                                                                                                                        
        Supports auto-negotiation: Yes                                                                                                                                                                                           
        Advertised link modes:  10baseT/Half 10baseT/Full                                                                                                                                                                        
                                100baseT/Half 100baseT/Full                                                                                                                                                                      
        Advertised pause frame use: Symmetric Receive-only                                                                                                                                                                       
        Advertised auto-negotiation: Yes                                                                                                                                                                                         
        Speed: 100Mb/s                                                                                                                                                                                                           
        Duplex: Full                                                                                                                                                                                                             
        Port: MII                                                                                                                                                                                                                
        PHYAD: 0                                                                                                                                                                                                                 
        Transceiver: external                                                                                                                                                                                                    
        Auto-negotiation: on                                                                                                                                                                                                     
        Link detected: yes

这里进一步介绍一下配置:

ifconfig 
eth0      Link encap:Ethernet  HWaddr de:ad:ff:ad:fe:ef  
          inet addr:192.168.178.3  Bcast:192.168.178.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1295 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1115 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:321305 (313.7 KiB)  TX bytes:184021 (179.7 KiB)
          Interrupt:51 

eth1      Link encap:Ethernet  HWaddr 80:4a:56:02:1e:84  
          inet addr:192.168.178.10  Bcast:192.168.178.255  Mask:255.255.255.0
          UP BROADCAST RUNNING 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)

# ip addr show
1: lo: <LOOPBACK> mtu 16436 qdisc noop state DOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether de:ad:ff:ad:fe:ef brd ff:ff:ff:ff:ff:ff
    inet 192.168.178.3/24 brd 192.168.178.255 scope global eth0
    inet 192.168.2.2/24 brd 192.168.2.255 scope global eth0
8: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
    link/ether 80:4a:56:02:1e:84   brd ff:ff:ff:ff:ff:ff
    inet 192.168.178.10/24 brd 192.168.178.255 scope global eth1

答案1

您应该确保路由表和 DNS 配置正确。要修复第一个问题,请执行以下操作:

  sudo ip route add 192.168.2.0/24 dev eth1
  sudo ip route add default via 192.168.2.1

其次,以 sudo 身份将以下两行添加到 /etc/resolv.conf

   nameserver 8.8.8.8
   nameserver 8.8.4.4

相关内容