我有4g调制解调器,应该通过rndis工作。在usb中插入它之后,我得到以下网络接口:
但是,我不能配置它。
在执行eject -t cdrom之后,我得到了另一个接口: enp0s29f2u2。还有那个我可以配置的。
所以现在我有:
[root@nethvo ~]# ifconfig enp0s29f2u2
enp0s29f2u2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.0.2 netmask 255.255.255.0 broadcast 10.0.0.255
inet6 fe80::ae50:43ff:fe6f:d8eb prefixlen 64 scopeid 0x20<link>
ether ac:50:43:6f:d8:eb txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 3593027 dropped 0 overruns 0 frame 3593027
TX packets 2126 bytes 212899 (207.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@nethvo ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 84.204.31.121 0.0.0.0 UG 0 0 0 enp2s0
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 enp0s29f2u2
10.0.0.1 0.0.0.0 255.255.255.255 UH 0 0 0 enp0s29f2u2
84.204.31.120 0.0.0.0 255.255.255.248 U 0 0 0 enp2s0
84.204.31.121 0.0.0.0 255.255.255.255 UH 0 0 0 enp2s0
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 enp1s9
169.254.0.0 0.0.0.0 255.255.0.0 U 1003 0 0 enp2s0
169.254.0.0 0.0.0.0 255.255.0.0 U 1005 0 0 wlp1s10
169.254.0.0 0.0.0.0 255.255.0.0 U 1010 0 0 enp0s29f2u2
192.168.46.0 0.0.0.0 255.255.255.0 U 0 0 0 enp1s9
192.168.47.0 0.0.0.0 255.255.255.0 U 0 0 0 wlp1s10
192.168.140.0 0.0.0.0 255.255.255.0 U 0 0 0 enp2s0
[root@nethvo ~]# ping -c 2 10.0.0.1
PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data.
From 10.0.0.2 icmp_seq=1 Destination Host Unreachable
From 10.0.0.2 icmp_seq=2 Destination Host Unreachable
--- 10.0.0.1 ping statistics ---
2 packets transmitted, 0 received, +2 errors, 100% packet loss, time 1001ms
pipe 2
[root@nethvo ~]# telnet 10.0.0.1 80
Trying 10.0.0.1...
telnet: connect to address 10.0.0.1: No route to host少了什么?
upd。来自日志消息:
Jun 26 15:51:10 nethvo kernel: rndis_host 3-2:1.0 enp0s29f2u2: unregister 'rndis_host' usb-0000:00:1d.2-2, RNDIS device
Jun 26 15:51:10 nethvo avahi-daemon[642]: Withdrawing workstation service for enp0s29f2u2.
Jun 26 15:51:10 nethvo kernel: usb 3-2: reset full-speed USB device number 4 using uhci_hcd
Jun 26 15:51:10 nethvo kernel: rndis_host 3-2:1.0: RNDIS init failed, -71
Jun 26 15:51:10 nethvo kernel: rndis_host: probe of 3-2:1.0 failed with error -71发布于 2018-08-20 22:01:09
rndis只适用于Windows,因为它是MSFT专有驱动程序。您将无法轻松地在Centos上配置它,除非您运气好,并设法从ASIX或等效程序中找到一个通用芯片组驱动程序,该驱动程序非常接近于将其视为"usbnet“设备。在我的经验中,这也经常失败,但至少会让您使用ethtool和ifconfig获得更多细节,即使您无法使用tcpdump对其进行ping或跟踪。
https://serverfault.com/questions/918236
复制相似问题