[RndTbl] IP Masquerading for USB ethernet

Bill Reid billreid at shaw.ca
Sun Dec 21 12:53:31 CST 2003


Brian,

Sorry I missed your comments on setting up the usb point. Since it is 
defined as a point to point you do not need multiple subnets and NAT is 
not necessary.

For point-to-point I usually define the local address to be the same as 
eth0. That is with pppd but I think it would apply here as well.

Apologies for missing the obvious,
Bill

Bill Reid wrote:
> dhcp-relay will forward dhcp requests between subnets but you do not 
> have multiple subnets defined.
> 
> I am missing something in how the iPaq is connected. Is it connected by 
> an Ethernet cable to the USB adaptor?
> 
> It would seem to me that you have to have 2 subnets.
> 
> If you defined the netmask as 255.255.255.128 then eth0 and usb0 would 
> be on different subnets.  I am assuming the router would have an address 
> in the 192.168.1.2-127 range.
> 
> 
> Brian Doob wrote:
> 
>>     I have a Compaq iPaq with Linux installed on it (see
>> http://opie.handhelds.org/), and it is connected to my Gentoo Linux box
>> with USB ethernet.  The Gentoo box is connected to an Ovislink router
>> (with a DHCP server) via regular ethernet.  I want the hanheld to be
>> able to talk to the net via the Gentoo box.  I have not been able to get
>> IP masquerading to work under Gentoo.  I would prefer to have the
>> handheld get its IP address from the router (and have the Gentoo box
>> just forward the packets).  Does anyone know how to get this working? 
>> Here is some info about my situation:
>>
>> # ifconfig eth0
>> eth0      Link encap:Ethernet  HWaddr 00:20:ED:B8:91:55            
>> inet addr:192.168.1.1  Bcast:255.255.255.255 Mask:255.255.255.0
>>           UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
>>           RX packets:3340 errors:0 dropped:0 overruns:0 frame:0
>>           TX packets:3557 errors:0 dropped:0 overruns:0 carrier:0
>>           collisions:0 txqueuelen:1000           RX bytes:3330687 (3.1 
>> Mb)  TX bytes:448922 (438.4 Kb)
>>           Interrupt:11
>> # ifconfig usb0
>> usb0      Link encap:Ethernet  HWaddr 4E:DC:69:01:CA:EF            
>> inet addr:192.168.1.200  Bcast:192.168.1.255 Mask:255.255.255.0
>>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>>           RX packets:25 errors:0 dropped:0 overruns:0 frame:0
>>           TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
>>           collisions:0 txqueuelen:1000           RX bytes:980 (980.0 
>> b)  TX bytes:574 (574.0 b)
>>
>> # iptables -t nat -I POSTROUTING -j MASQUERAQDE -s 192.168.1.3/16
>> iptables v1.2.8: Couldn't load target
>> `MASQUERAQDE':/lib/iptables/libipt_MASQUERAQDE.so: cannot open shared
>> object file: No such file or directory
>>
>> # uname -a
>> Linux proton 2.4.23-ck1 #1 Thu Dec 4 19:21:52 CST 2003 i686 AMD
>> Athlon(tm) XP 1800+ AuthenticAMD GNU/Linux
>>
>> This is how I bring up the network to the PDA:
>> modprobe uhci
>> sleep 1
>> insmod usbnet
>> ifconfig usb0 192.168.1.200 netmask 255.255.255.0 pointopoint
>> 192.168.1.3 up
>> route add -host 192.168.1.3 usb0
>>
>> If anyone is interested in the really gritty details, I have attached
>> the config file for my kernel.
>>
>> Does anyone know what I need to do?  Thanks.
>>
>>
>>             -Brian
> 
> 
> _______________________________________________
> Roundtable mailing list
> Roundtable at muug.mb.ca
> http://www.muug.mb.ca/mailman/listinfo/roundtable
> 




More information about the Roundtable mailing list