OpenWrt Forum Archive

Topic: WIFI Link Help

The content of this topic has been archived on 5 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

http://img.photobucket.com/albums/v496/ScarEye/WIFI_Link.jpg



Instead of me explaining everything, I thought a visual description of what I have done would help.

I am going to start off with a simple question first and work my way up.  Hopefully, this will help others.

First,  If you look at the WIFI IP's of Router A and Router B you will see two different subnets. My question is
it is possible to be able to ping from Router A to Router B even thought they are not on the same subnet ?

If so how can I do this.  If there are any documentation please let me know.

I *WAS* able to ping Router A to Router B and vise versa BUT they were on the same subnet.  However, I would like to seperate them if
possible.

Thanks In Advance
ScarEye

(Last edited by ScarEye on 3 Oct 2007, 01:04)

Your network looks misconfigured. The two wireless interfaces should be on the same subnet if they are to pass traffic
(at least if they are to pass at the IP layer).

In my network I use /30 subnets for the situation you have there.

dboreham, 

    Thanks for your response. I was hoping to be able to pass traffic with the wifi links on two seperate subnets.  I thought there might be a way, but it seems like there isn't.  So my next questions is.  Lets say

Router A = 10.1.1.1/24
Router B = 10.1.1.2/24

I need to use a 24 bit mask because I will also have people connecting to the wireless link. 

I need to pass traffic from PC 192.168.1.2 to PC 192.168.2.2 would I just have to add route on
both routers or would I also need some firewall rules ?

If you have a setup would you mind sharing your config files.  Change the values of your ip's/passwords for security
of course.

Thanks again
ScarEye

Or anyone else ?  Please.

Well...really I think you should do some reading on IP and static routing.
It's not that complex to learn and you'd have a much better time
with a grasp of the basics rather than trying to copy someone else's configuration blind.

One thing I will say is this : the wireless network is a mac or link layer network -- it doesn't care itself
about IP address nor subnets. IP addresses are a property of the OS network layer on each node, specifically
each interface (ath0, ath1, etc) has an IP address.  For two interfaces to communicate over the wireless
network they must be assigned IP addresses on the same subnet. That's a 'rule' smile

Therefore you can if you wish have more than one subnet on the same wireless network, provided
you don't need to exchange traffic between nodes on different subnets (directly).

You can use routing to exchange traffic between nodes not on the same subnet, even when they
are on the same wireless network.

dboreham,

     As far as IP (IPv4)/Staic Routing is concerned I am proficient in this area.  However, I am not proficient with linux/iptables.  And I thought maybe I am missing something in this area.

What I did do was install tcpdump and send a icmp request from one subnet to the other and the request does get to the other side. But it does't get a response back.  Maybe I am missing something really simple.  I will look over everything and see if I can come up with something.

Thanks
ScarEye

Okay,

   So I figured out what the problem was.  For some reason when I add my static route to /etc/config/network restart the interface
or even reboot the router the route wasn't being added.  So I manually added the static route and BAM!! I can talk between the two
subnets.  I have added static routes in /etc/config/network in 7.06 and it's worked with with no problem.  I guess I will try to figure out
why this is not working or just create a script that will add the routes for me.

Thanks
ScarEye

The discussion might have continued from here.