OpenWrt Forum Archive

Topic: Two routers wireless roaming, or something

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

Hi.
I'm trying to do this on my house. The router A is for the 1st floor and router B for the 2nd floor.
I'm doing this because no matter what I do, from 1st to 2nd floor the wireless signal is terrible.

The two routers are Netgear WNDR3700 (i only have one ATM, but since I like them I think I'll buy a second one - or anything else advised?)

I made a small image that helps to understand what I want to do:

http://dl.dropbox.com/u/1174918/ark/router.jpg

Questions are:
1) How to configure router B for this?
2) router A to B connects from LAN port from router A to WAN port of router B, right?
3) Is wireless roaming possible with this configuration?

Thank you.

connect the ethernet cable from a LAN-port of routerA to a LAN-port of routerB  (just bridge the router together, no need for routing!)
to disable firewall and the dhcp server just run

/etc/init.d/firewall disable
/etc/init.d/dnsmasq disable

open /etc/config/network and set the LAN-Interface to dhcp or set a static IP in the same subnet as RouterA and add the IP of RouterA as DNS-Server and Gateway
like that:

#### LAN configuration
config interface lan
    option type     bridge
    option ifname    "eth0.0"
    option proto    static
    option ipaddr    192.168.23.201
    option netmask    255.255.255.0
    option gateway    192.168.23.200
    option dns    192.168.23.200

if you want to use the WAN-port as 5th LAN-Port you have to change the VLAN config in /etc/config/network

Regarding wireless roaming: I'm not sure if you really need it. If you have the same SSID and WPA-password the client will connect to the strongest signal, or reconnect to the strongest if the connect is lost. So if you don't move your client up/down-stairs while it's online there shouldn't be a problem.
Some chipsets (wifi-client) have some features which allow some kind of "roaming". madwifi-driver can do "background-scanning" to find the same SSID on different channels, and switch to the better signal before the connection is lost. But the client has to authenticate on the new AP again, so it not really roaming. 
If you really want to try roaming install wpad (not wpad-mini) and try configuring IAAP (Inter Access Point Protocol) in hostapd.conf but I'm not sure how it should work, and if it's implemented on openwrt.

Thank you for your help.
I've configured lan for DHCP, bridge magic happened.
Disabled WAN.

Now, how do I connect to router B using SSH our luci?
I can't do it. :-O

just connect to the IP of routerB. If you are not sure which IP routerB got assigned by the DHCP-Server running on routerA
run on routerA

cat /tmp/dhcp.leases

and look for something that could be routerB.
and btw. that's why I prefer setting static IPs for my network-infrastructure smile

Ok I made it!

For everyone who wants to know how how I did it is was:

1) Completely disabled DHCP on Router B. This can be done by ssh or by luci.
Final configuration is:

config 'dnsmasq'
        option 'domainneeded' '1'
        option 'boguspriv' '1'
        option 'filterwin2k' '0'
        option 'localise_queries' '1'
        option 'rebind_protection' '1'
        option 'rebind_localhost' '0'
        option 'local' '/lan/'
        option 'domain' 'lan'
        option 'expandhosts' '1'
        option 'nonegcache' '0'
        option 'authoritative' '1'
        option 'readethers' '1'
        option 'leasefile' '/tmp/dhcp.leases'
        option 'resolvfile' '/tmp/resolv.conf.auto'

2) Disable Firewall and DNSMASQ. This can be done via luci-app-initmgr or by ssh
root@OpenWrt2:~# /etc/init.d/dnsmasq disable
root@OpenWrt2:~# /etc/init.d/firewall disable

3) configure LAN for DHCP and configure default dns server (for internet access directly on router B, for example: opkg update)
The dns server ip is the ip of router A

config 'interface' 'lan'
        option 'ifname' 'eth0.1'
        option 'type' 'bridge'
        option 'defaultroute' '0'
        option 'peerdns' '0'
        option 'dns' '192.168.1.1'
        option 'proto' 'dhcp'

And now Router B is ready.
Bridge Magic will happen and all packets will be directly send to router A. Everything. Just like you're directly connected to router A-

Now, on router A I did the following:

A) Make a DHCP reservation for router B

/etc/config/dhcp

config 'host'
        option 'name' 'OpenWrt2'
        option 'mac' '94:0c:6d:ee:80:1e'
        option 'ip' '192.168.1.2'

This is easier to do with luci.

B) Configure everything else on Router A like it is your only router.

C) Router A in this example is 192.168.1.1, router B is 192.168.1.2 and the wired/wireless clients are from 192.168.1.100 (default config on openwrt)

This learned and notes:
- LAN bridge is *faster* than creating a wan to lan bridge on router B. And simpler to do
- Configuring time, hostname, luci, etc and extra packages or features of OpenWRT is omitted here
- Everything works very easily by this way. Almost no configuration needed.
- Both routers have same SSID on different channels. This makes roaming possible if client/server supports it and its simpler for clients to connect automatically to strongest router

Hi Guys,

Nice setup. Has anyone done this w/o bridging the wired and the wireless?

I have now the two separated in router 1 (192.168.5.* wired and `192.168.6.* wireless) and want to install router 2.
Router 2 gets 192.168.5.10 as wan IP. For its wifi I want to use the 192.168.6.* network and share it with the router 1.

Has anyone done something like this?

(Last edited by bugfunder on 15 Feb 2011, 09:46)

bugfunder wrote:

Nice setup. Has anyone done this w/o bridging the wired and the wireless?

I have now the two separated in router 1 (192.168.5.* wired and `192.168.6.* wireless) and want to install router 2.
Router 2 gets 192.168.5.10 as wan IP. For its wifi I want to use the 192.168.6.* network and share it with the router 1.

I think it can be done with vlan.

/etc/config/network:

config interface lan
        option ifname   eth0.1
        option proto    static
        option ipaddr   192.168.5.1
        option netmask  255.255.255.0

config interface lan2
        option ifname   eth0.2
        option type     bridge
        option proto    static
        option ipaddr   192.168.6.1
        option netmask  255.255.255.0

config switch eth0
        option enable   1
        option reset    1
        option enable_vlan 1

config switch_vlan
        option device   eth0
        option vlan     1
        option ports    '0t 1 2 3 5*'

config switch_vlan
        option device   eth0
        option vlan     2
        option ports    '0t 5t' #connect port0 of the two routers.

Hi, thanks for the reply. Sounds interesting.

Is it the config for router 1 or 2, or both?

I'm trying to understand how it works, perhaps should read some docs on vlan?

You should modify ipaddr for router 2.

It seems that I made it work, but with a few additions to the presented setup.
The main are:
- bridging wireless wl0 interface with eth0.2 (on both routers)
- not tagging the vlan1 network at all (no idea if it still works with tagging).

It looks like everything is working fine, but I wonder if the bridge/vlan tagging construction actially works.
Are there any tools to check that (see the ethernet traffic?)?

I also get  every now and then the following message (on both routers):

Mar  6 10:15:44 OpenWrt user.warn kernel: wl0: received packet with  own address as source address

Anyone a clue why?

The discussion might have continued from here.