Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 10.0.1.0 * 255.255.255.0 U 0 0 0 usb0 default 10.0.1.1 0.0.0.0 UG 0 0 0 usb0
host PC
当板子上的虚拟网卡成功配置后,hostPC的log中会有相应的信息:
1 2 3 4 5 6
kernel: [1638241.377831] usb 1-4.4.2: new high speed USB device using ehci_hcd and address 47 kernel: [1638241.510787] cdc_subset: probe of 1-4.4.2:1.0 failed with error -22 kernel: [1638241.513437] cdc_subset 1-4.4.2:1.1: usb0: register 'cdc_subset' at usb-0000:00:02.1-4.4.2, Linux Device, 82:13:56:20:b4:cb kernel: [1638241.513490] usbcore: registered new interface driver cdc_subset kernel: [1638241.533442] cdc_ether: probe of 1-4.4.2:1.0 failed with error -16 kernel: [1638241.533619] usbcore: registered new interface driver cdc_ether
也能看到相应的网卡信息:
1 2 3 4 5 6 7 8 9
ifconfig usb0
usb0 Link encap:Ethernet HWaddr 82:13:56:20:b4:cb inet6 addr: fe80::8013:56ff:fe20:b4cb/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:1 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:78 (78.0 B)