wds_forwarding routing probs.

michael schatz thevedado
Tue Oct 26 19:00:48 PDT 2004


kc-

(new message at bottom)


<quote who="michael schatz">
> kc-
>
> thanks for your posting on the host ap listserv.
> the error you pointed out was actually a typo
> in my posting---i do have the IP and BROADCAST
> matching exactly as you suggest.....my difficulty is
> that i can't get my AP-B (and my net B)
>  to see anything except
> AP-A across the the WDS link  (see sketch below for
> architecture).   do you have any suggestions?
> (in particular, i'm not sure how to use the
> NETWORK=192.168.1.252 in your earlier posting.
>
>
> thanks!
> mike
>
>
> <wired net A  192.168.0.X>
> |
> |
> eth0 (192.168.0.7): AP-A :wlan0 -- <wireless net A>
>  (all hosts on net A (inc. wireless) see the
internet)
>
> |
> |
> WDS
> |
> |
> AP-B:wlan0---<Wireless net B>

>OK. As for NETWORK=192.168.1.252 it was a reference
to the actual network
>address used in your ifcfg-wlan0.  Assuming you have
IP running correctly
>(e.g. ping works) then the next step is to determine
"how" you want AP-A
>to pass traffic from AP-A{wlan0} to AP-A{eth0}. Your
options are bridging
>or routing.  Since you've configured 2 separate IP
segments I'll assume
you want to route traffic.  I think I remember you
wanted to use IPMASQ as
well so you'll need to setup the kernel to do so.

#!/bin/bash

#CRITICAL:  Enable IP forwarding since it is disabled
by default
echo "  - Enabling packet forwarding in the kernel"
echo "1" > /proc/sys/net/ipv4/ip_forward

# Enable simple IP forwarding and Masquerading
echo "  - Enabling SourceNAT (IPMASQ) functionality on
eth0"
/sbin/iptables -t nat -A POSTROUTING -o eth0 -j
MASQUERADE

*****************************

all traffic on net A already is set up precisely
the way you suggest, kc....and it works fine: the AP-A
and all wireless connections to it send and receive
traffic to/from the internet.  the problem is
that while AP-B can ping AP-A----(and vice versa)
nothing on net B (AP-B or attached wireless clients)
can see anything else on net A or the internet.
below i'm attaching my rc.local files for 
both AP-A and AP-B  as described by the architecture
sketch given above.....i hope this shows clearly
where i'm stuck---any suggestions would be
welcome.

mike


FIRST THE rc.local SCRIPT FOR AP-A

#!/bin/sh
#
# This script will be executed *after* all the other
init scripts.
# You can put your own initialization stuff in here if
you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
echo "Local wlan0 config. stuff"
/sbin/iwconfig wlan0 channel 1 ESSID "Vedado" txpower
15 

echo "setup WDS static link"
#MAC address for wireless card on AP-B
iwpriv wlan0 wds_add bb:bb:bb:bb:bb:bb
ip addr add 192.168.1.254/30 broadcast 192.168.1.255
dev wlan0wds0
ip link set wlan0wds0 up

echo "Enabling IP Masquerading"
/sbin/iptables -t nat -A POSTROUTING -o eth0 -j
MASQUERADE
/sbin/iptables -t nat -A POSTROUTING -o wlan0 -j
MASQUERADE
/sbin/iptables -t nat -A POSTROUTING -o wlan0wds0 -j
MASQUERADE
echo "1" >/proc/sys/net/ipv4/ip_forward





NOW THE rc.local SCRIPT FOR AP-B

#!/bin/sh
#
# This script will be executed *after* all the other
init scripts.
# You can put your own initialization stuff in here if
you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
echo "Local wlan0 config. stuff"
/sbin/iwconfig wlan0 channel 1 ESSID "Vedado" txpower
15

echo "set up WDS static link"
#MAC address for wireless card on AP-A
iwpriv wlan0 wds_add aa:aa:aa:aa:aa:aa
ip addr add 192.168.1.253/30 broadcast 192.168.1.255
dev wlan0wds0
ip link set wlan0wds0 up

echo "Enabling IP Masquerading"
/sbin/iptables -t nat -A POSTROUTING -o wlan0 -j
MASQUERADE
/sbin/iptables -t nat -A POSTROUTING -o wlan0wds0 -j
MASQUERADE

echo "1" >/proc/sys/net/ipv4/ip_forward












		
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 




More information about the Hostap mailing list