[if_cdce][ue] can't setup network communication via usb network interface

Andrey Kosachenko andrey.kosachenko at gmail.com
Mon Apr 5 19:43:59 UTC 2010


Hi,

there is a mobile device attached to laptop (with FreeBSD 9-Current) via 
USB cable.

The goal is to provide access to internet for mobile device via laptop.

device is recognized as ue0 (but seems requires an additional quirk to 
function properly)
# usbconfig -u 6 -a 2
ugen6.2: <RNDIS/Ethernet Gadget Linux 2.6.28-omap1 with musb_hdrc> at 
usbus6, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON
# usbconfig -u 6 -a 2 set_config 1
# usbconfig -u 6 -a 2
ugen6.2: <RNDIS/Ethernet Gadget Linux 2.6.28-omap1 with musb_hdrc> at 
usbus6, cfg=1 md=HOST spd=HIGH (480Mbps) pwr=ON

# dmesg
...
cdce0: <CDC Ethernet Control Model (ECM)> on usbus6
cdce0: No valid alternate setting found
device_attach: cdce0 attach returned 6
cdce0: <CDC Ethernet Control Model (ECM)> on usbus6
cdce0: No valid alternate setting found
device_attach: cdce0 attach returned 6
cdce0: <Linux 2.6.28-omap1 with musb_hdrc RNDIS/Ethernet Gadget, class 
2/0, rev 2.00/3.16, addr 2> on usbus6
cdce0: faking MAC address
ue0: <USB Ethernet> on cdce0
ue0: Ethernet address: 2a:ec:22:0b:00:00
...

Mobile device settings: 192.168.2.15/24 (gw: 192.168.2.14)
BSD box's settings: 192.168.2.14/24 (iface: ue0)

# ifconfig -m ue0
ue0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 
mtu 1500
         ether 2a:ec:22:0b:00:00
         inet 192.168.2.14 netmask 0xffffff00 broadcast 192.168.2.255

The issue is that for some reason network connection is not established 
(neither mobile device nor BSD box see each other).
The only strange thing that tcpdump (launched on BSD box (192.168.2.14)) 
exposed the folowing (while BSD box is ping'ed from mobile device):

# tcpdump -n -i ue0
21:55:45.781154 IP 192.168.2.15 > 192.168.2.14: ICMP echo request, id 
14361, seq 0, length 64
21:55:46.781660 IP 192.168.2.15 > 192.168.2.14: ICMP echo request, id 
14361, seq 1, length 64
21:55:47.782218 IP 192.168.2.15 > 192.168.2.14: ICMP echo request, id 
14361, seq 2, length 64
21:55:48.782530 IP 192.168.2.15 > 192.168.2.14: ICMP echo request, id 
14361, seq 3, length 64
21:55:49.782905 IP 192.168.2.15 > 192.168.2.14: ICMP echo request, id 
14361, seq 4, length 64
21:55:50.781029 ARP, Request who-has 192.168.2.14 tell 192.168.2.15, 
length 28
21:55:50.781049 ARP, Reply 192.168.2.14 is-at 2a:ec:22:0b:00:00 (oui 
Unknown), length 28
21:55:50.783263 IP 192.168.2.15 > 192.168.2.14: ICMP echo request, id 
14361, seq 5, length 64
21:55:51.783656 IP 192.168.2.15 > 192.168.2.14: ICMP echo request, id 
14361, seq 6, length 64

attempt to ping mobile device (192.168.2.14) from BSD box outputs the 
following:
# ping 192.168.2.15
PING 192.168.2.15 (192.168.2.15): 56 data bytes
ping: sendto: No route to host
ping: sendto: No route to host

whereas everything seems to be OK with routing:
# route get 192.168.2.15
    route to: 192.168.2.15
destination: 192.168.2.0
        mask: 255.255.255.0
   interface: ue0
       flags: <UP,DONE>
  recvpipe  sendpipe  ssthresh  rtt,msec    mtu        weight    expire
        0         0         0         0      1500         1         0

There have already been tried many means (more or less relevant) to 
combat this issue... however still no luck.
Could smb., please, suggest how to deal with it.

Thanks!

--
WBR,
Andrey Kosachenko


More information about the freebsd-net mailing list