On Fri, 20 Jun 2003, Wolfgang Bornath wrote:

> I have a small problem with routing.
> 
> 1. Connection to Internet via router --> 192.168.0.1
> 
> 2. MDK 9.1 with               eth0   --> 192.168.0.3
>                               usb0   --> 192.168.1.1
> 
> 3. Linux PDA with             usbf   --> 192.168.1.2
> 
> Internet connection via eth0 via router is ok
> Telnet/ftp connection from usb0 to usbf is ok
> I can ping the pda from desktop and vice versa
> 
> Internet access from pda via usbf - usb0 - eth0 - router is not working 
> (no DNS prob because when I ping an IP I get "Network not reachable". 
> In my gkrellm I see that the packets go from the pda via usbf, usb0 to 
> eth0 and out to the router. The packets come back from internet via 
> router and eth0 but don't go further to usb0 to get to usbf.
> 
> In /etc/sysctl.conf:
> --------------------
> # Controls IP packet forwarding
> net.ipv4.ip_forward = 1  # I tried '0' before, no success.
> 
> route on MDK shows:
> ---------------------
> Destination  Gateway        Genmask         Flags Metric Ref  Use Iface
> 192.168.1.0  *              255.255.255.0   U     0      0    0   usb0
> 192.168.0.0  *              255.255.255.0   U     0      0    0   eth0
> 127.0.0.0    *              255.0.0.0       U     0      0    0   lo
> default      192.168.0.1    0.0.0.0         UG    0      0    0   eth0
> 
> route on pda shows:
> -------------------
> Destination  Gateway        Genmask         Flags Metric Ref  Use Iface
> 192.168.1.0  *              255.255.255.0   U     0      0    0   usbf
> 127.0.0.0    *              255.0.0.0       U     0      0    0   lo
> default      192.168.1.1    0.0.0.0         UG    0      0    0   usbf
> 
> When I try to set 192.168.0.1 (Router) as gw for the pda I get a 
> "Network not reachable" message.

OK, wobo, let's see what we can do here ... :)

I'd recommend putting them on the same subnet, using "Proxy ARP with 
Subnetting". See the HOWTO at:

http://www.linux.org/docs/ldp/howto/mini/Proxy-ARP-Subnet/index.html

To do this, you need to adjust the netmask of the usb0 interface, so that 
the range it covers is a *subset* of the range that eth0 uses, like so:

Int.    Network         Netmask         Broadcast

eth0    192.168.0.0     255.255.255.0   192.168.0.255
usb0    192.168.0.128   255.255.255.128 192.168.0.255

The IP of usb0 should be 192.168.0.129, and the PDA's can be anything from 
192.168.0.130 to 192.168.0.254. 


In /etc/sysctl.conf, you'll probably need:

net.ipv4.ip_forward = 1
net.ipv4.conf.default.rp_filter = 0
net.ipv4.conf.all.proxy_arp = 1

And in /etc/sysconfig/network:

FORWARD_IPV4=true

HTH!

-- 
Bill Mullen   [EMAIL PROTECTED]   MA, USA   RLU #270075   MDK 8.1 & 9.0
The engineer is neither optimist nor pessimist. He sees the proverbial
half-full/empty glass and says, "The glass is twice as big as there is
any need for it to be."

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to