您好,登錄后才能下訂單哦!
中興MF825C電信版
插上usb網卡后
#lsusb
19d2:1225 (bus 1, device 3)
0000:0000 (bus 1, device 1)
網卡會自動模式轉換
#lsusb
19d2:1405 (bus 1, device 3)
0000:0000 (bus 1, device 1)
在內核上選擇支持它的驅動模塊
確保這三個模塊都有rndis_host.ko,cdc_ether.ko,usbnet.ko然后添加驅動
#modprobe rndis_host
會根據依賴關系掛載相應的模塊
rndis_host 6048 0
cdc_ether 4992 1 rndis_host
usbnet 14160 2 rndis_host,cdc_ether
#ifconfig -a
usb0 Link encap:Ethernet HWaddr 36:4B:50:B7:EF:61
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4923 errors:0 dropped:0 overruns:0 frame:0
TX packets:6229 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1287334 (1.2 MiB) TX bytes:1315840 (1.2 MiB)
如果驅動沒問題就會看到usb0的虛擬網卡
#ifconfig usb0 up
#udhcpc -i usb0 -s /sbin/udhcpc.sh -p /var/run/udhcpc.pid
udhcpc (v1.12.1) started
Sending select for 192.168.0.133...
Lease of 192.168.0.133 obtained, lease time 86400
deleting routers
route: ioctl 0x890c failed: No such process
adding dns 192.168.0.1
igmpproxy, Version 0.1 beta2, Build 160601
Copyright 2005 by Johnny Egeland <johnny@rlo.org>
#ifconfig usb0
usb0 Link encap:Ethernet HWaddr 36:4B:50:B7:EF:61
inet addr:192.168.0.133 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:24 errors:0 dropped:0 overruns:0 frame:0
TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4726 (4.6 KiB) TX bytes:5766 (5.6 KiB)
#ping www.baidu.com
PING www.baidu.com (220.181.112.244): 56 data bytes
64 bytes from 220.181.112.244: seq=0 ttl=52 time=57.345 ms
64 bytes from 220.181.112.244: seq=1 ttl=52 time=53.074 ms
64 bytes from 220.181.112.244: seq=2 ttl=52 time=49.176 ms
到此OK。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。