[Gllug] Wireless to wired LAN router

Mike Brodbelt mike at coruscant.demon.co.uk
Sat Nov 16 00:45:19 UTC 2002


On Sat, 2002-11-16 at 00:08, Simon Stewart wrote:
> Right, I'm obviously missing something obvious, so I thought that it's 
> best to ask the experts. Apologies if this is something of a rather 
> long email, but I'll try and put enough information in.
> 
> At home I have a wired LAN already, and I'm keen to set up a wireless 
> LAN too. Addresses on the wired LAN (on which my ADSL router sits at 
> 192.168.1.2) are in the range 192.168.1.0/24. Wireless clients are 
> allocated IPs in the range 10.1.0.0/24.
> 
> Obviously, I need to set up a machine that sits between the two 
> networks and acts as a router. This has got two NICs in, one of which 
> is wireless, one of which is not. The network config looks likes this 
> (internally)
> 
> NET -> 192.168.1.2 -> 192.168.1.20 -> bix -> 10.1.0.1 -> 10.1.0.2
>         Net GW         Wired NIC      router  Wireless    Wireless
>                                                 NIC       clients
> 
> Bix is the machine that I'm setting up as a router. It's running Debian 
> 2.4.19 and its routing table looks like:
> 
> Destination     Gateway         Genmask         Flags   MSS Window  
> irtt Iface
> 192.168.1.16    0.0.0.0         255.255.255.255 UH       40 0          
> 0 eth0

Why a host route to 192.168.1.16? The network route to 192.168.1.0/24
should suffice.

> The wireless interface is in Ad-Hoc mode. From my iBook (10.1.0.2), 
> which is the only wireless client I have atm, I can ping as far as the 
> wired NIC on the router (that is, 192.168.1.20) and no further.

Hmmm. So from the wireless client, you can ping IP addresses only on
bix? If so, it sounds as though you should check the routing table on
the wireless client. You may have route to 10.0.0.0/8 and 192.168.1.20,
but no default route with 10.1.0.1 set as gateway.

> From 
> the Net GW I can ping as far as 10.1.0.1. Bix can ping every host on 
> both networks, so it's not that something is running a firewall that 
> doesn't let me ping anything. :)

OK. All the hosts on your wired LAN will need a default route to
192.168.1.2, and also a network route to 10.0.0.0/8 which uses
192.168.1.20 as the gateway. To avoid having to set up longer routing
tables on all your hosts, you could consider running a routing daemon,
like Zebra.
 
> The same behaviour is seen when /proc/sys/net/ip_forward is either 1 or 
> 0 on the router, and the kernel has been compiled with support for 
> being an advanced router enabled.

The advanced router stuff isn't necessary, but you definitely need
/proc/sys/net/ip_forward to be 1 for any of this to work.
 
> What I really want to do is to allow all the hosts on both networks to 
> see each other, so I'm not keen on setting up ip masquerading in order 
> to get this working (where's the challenge in that?)

You might find it easier (as John suggests) to just set up bridging.

HTH,

Mike.


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list