From owner-freebsd-net@FreeBSD.ORG Mon Apr 5 19:43:59 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23959106564A for ; Mon, 5 Apr 2010 19:43:59 +0000 (UTC) (envelope-from andrey.kosachenko@gmail.com) Received: from mail-gw0-f54.google.com (mail-gw0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id D14808FC13 for ; Mon, 5 Apr 2010 19:43:58 +0000 (UTC) Received: by gwj15 with SMTP id 15so152837gwj.13 for ; Mon, 05 Apr 2010 12:43:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=EsqDz6H2MwI8tEbXf01GsrGAYudKmaBEjjn1wjedJ9w=; b=trhv2gjnGuOkqC6qQPqFX1uOeB63TzX/5+h2p+TXvF0+usw6RnP6zWFj3zJLKaUY63 3b1HF24B9NStWJcTF0CnxJYniE9AFoWZ9Lq7C7SiEgO/+OQcZwN0Nv89/ezVRw1JLDcZ 5cd52bWV9j8KL56ZCsn8q8QE2k0myCOJYLQV0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=UhJ+XFkRDpGsCxyz2VwGEDTs36t0YBfUuLEj6qzl6u9CQaZaagQBSjJMHs4w7qXBTm IkWeVsDP02jTvjXHp9yiAah4k7/vmqbI28oDuPzynfvJhnCLlMU0uL6o4yfDMSDWkjcD q2eDydhoYKcRpAUw15V0oDAZXHkiFrhdSVk58= Received: by 10.151.55.1 with SMTP id h1mr765448ybk.16.1270495150665; Mon, 05 Apr 2010 12:19:10 -0700 (PDT) Received: from beastie.lan ([72.14.241.35]) by mx.google.com with ESMTPS id 16sm8176876gxk.5.2010.04.05.12.19.07 (version=SSLv3 cipher=RC4-MD5); Mon, 05 Apr 2010 12:19:08 -0700 (PDT) Message-ID: <4BBA37A1.1070609@gmail.com> Date: Mon, 05 Apr 2010 22:18:57 +0300 From: Andrey Kosachenko User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.9) Gecko/20100402 Thunderbird/3.0.4 MIME-Version: 1.0 To: freebsd-net@freebsd.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [if_cdce][ue] can't setup network communication via usb network interface X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 19:43:59 -0000 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: 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: at usbus6, cfg=1 md=HOST spd=HIGH (480Mbps) pwr=ON # dmesg ... cdce0: on usbus6 cdce0: No valid alternate setting found device_attach: cdce0 attach returned 6 cdce0: on usbus6 cdce0: No valid alternate setting found device_attach: cdce0 attach returned 6 cdce0: on usbus6 cdce0: faking MAC address ue0: 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 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: 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