Re: USB-net (was Re: Installation instruction issues)

From: Goetz Bock <bock_at_blacknet.de>
Date: Tue, 22 May 2001 01:20:39 +0200

On Wed, May 16 '01 at 23:23, Goetz Bock wrote:
>
> On Wed, May 16 '01 at 16:23, Matthew Harrell wrote:
> > : While ipchains/iptables work, I think they are overkill. I'd suggest to
> > : use proxy-arp for connecting the ipaq to a linux box. If there is
> > : interest for this, I'll try to find time to write a very short howto.
> > I would be interested in a brief list of things to do if you don't mind. I
sorry, but it took a little longer, but here is a short step by step how
to do proxy arp for an ipaq:

In this example, my workstation has the ip 192.168.0.2, the default
gateway is 192.168.0.254 and the ipaq should be 192.168.0.20. I'm
running mandrake with 2.4.3 kernel (which already comes with the needed
usbnet module, you can get it at: http://dredd.crimea.edu/ipaq/usbnet.c
or see the wiki:
http://www.handhelds.org/z/wiki/How%20do%20I%20setup%20USB%20networking
).

- remove ipaq from cradle
- load usb-eth module (on ipaq):
      # modprobe usb-eth
- configure ipaq for free ip on your subnet (on ipaq):
      # ifconfig usbf inet 192.168.0.20 up
- add default route (on ipaq):
      # route add default gw 192.168.0.254
- (btw the serial + usb combi cradel realy pays in this situation :-))
- load usbnet module (on pc):
> modprobe usbnet
- now put ipaq onto cradle, in the logs you should see something like
  (on pc: tail /var/log/messages):
      May 22 01:06:30 pc kernel: hub.c: USB new device connect on bus1/2,
      assigned device number 11
      May 22 01:06:30 pc kernel: usb0: register usbnet 001/011,
      Linux Device
- enable proxy arp on usb interface and required ethernet interface (on
  pc):
> echo 1 > /proc/sys/net/ipv4/conf/usb0/proxy_arp
> echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
- enable ip forwarding (on pc):
> echo 1 > /proc/sys/net/ipv4/ip_forward
- configure usb0 (on pc, use the same IP as on eth0):
> ifconifg usb0 inet 192.168.0.2 up
- remove routing entry for our net on usb0 (on pc):
> ip route del 192.168.0.0/24 dev usb0
- add routing entry for ipaq only (on pc):
> ip route add 192.168.0.20/24 dev usb0
- ping gateway (on ipaq):
      # ping 192.168.0.254
      PING 192.168.0.254 (192.168.0.254): 56 data bytes
      64 bytes from 192.168.0.254: icmp_seq=0 ttl=254 time=637.2 ms
      64 bytes from 192.168.0.254: icmp_seq=1 ttl=254 time=3.5 ms
      64 bytes from 192.168.0.254: icmp_seq=2 ttl=254 time=2.3 ms

      --- 192.168.0.254 ping statistics ---
      3 packets transmitted, 3 packets received, 0% packet loss
      round-trip min/avg/max = 2.3/214.3/637.2 ms
- you're done

If someone wants to add this to the wiki, feel free to do so (test it
first). I will not have time to do this till thursday or the weekend.

BTW: is there some thing like the hotplugging scripts for PCMCIA for
     USB???

Have fun,
    Goetz.

Received on Mon May 21 2001 - 16:19:54 EDT

This archive was generated by hypermail 2.2.0 : Mon Jul 25 2005 - 17:12:25 EDT