Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 02-22-2016, 10:10 PM   #1
Senior Member
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,546

Rep: Reputation: 177Reputation: 177
Need help figuring out netmask with 2 wireless routers.

I have two wireless routers. I've been trying to figure out my netmasks but it's hurting my head. Maybe someone can help me out.

I have what is currently my main router which is a Linksys E900 serving DHCP. It has a LAN address of with a netmask of (which, right there is probably wrong given the rest ...) It had a DHCP server range of, but I've altered the top address to be

I have a Linux host with a wired LAN interface and a wireless Master. The wired interface (eth0) is a DHCP client to the Linksys and currently has the IP

The wireless is a DHCP server configured with static IP (probably wrong) netmask

The setup actually works -- I can connect to the 2nd wireless' SSID, but there is obviously subnet overlap. Indeed, when I fire up dhcpd I get the messages:

Multiple interfaces match the same subnet: eth0 wlan1
Multiple interfaces match the same shared network: eth0 wlan1

What is my solution? Can I simply set the Linksys netmask to 255.255.128? I do have devices to which the linksys has already handed addresses above Is that a problem? Which these devices just "correct themselves" the next time they request a DHCP IP address?
Old 02-22-2016, 11:02 PM   #2
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
What are you trying to do? You probably do not need the router function, so use them as access points.
Old 02-23-2016, 05:19 PM   #3
Registered: Mar 2008
Posts: 21,963

Rep: Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622Reputation: 3622
There are web pages that calculate subnet masks but I'll agree that the configuration is confusing.

Maybe moving one lan to 192.168.2.x or 10.10.10.x
Old 02-24-2016, 12:22 PM   #4
LQ Newbie
Registered: Mar 2012
Posts: 3

Rep: Reputation: Disabled
If you want to contiguous networks, configure like so:


IP address netmask

DHCP scope

You can drop the starting address of the DHCP scope but DO NOT raise the upper address. The network with a mask of has a network broadcast address of, so you don't want to pass that out to a client. Furthermore, the address would be the network address of the contiguous subnet, so you don't want a client to get that address either.

Linux Wireless Router

Restart the network on the Linux wireless router and the wired interface should now get an address between and Likewise for all your other clients that are getting addresses from the Linksys.

Wireless Interface

IP address

DHCP Scope (or whatever addresses w/in that range you want to serve out).

If you want the clients in these two networks to be able to talk to each other and you haven't done it yet, turn on IP forwarding in the Linux router like so:

sysctl -w net.ipv4.ip_forward=1

Then you want to add the line net.ipv4.ip_forward=1 to the file /etc/sysctl.conf or some file in /etc/sysctl.d to make the change permanent.

Last edited by; 02-24-2016 at 12:24 PM.
1 members found this post helpful.
Old 02-28-2016, 10:48 AM   #5
Senior Member
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,546

Original Poster
Rep: Reputation: 177Reputation: 177 Your configuration is exactly what I did and it seems to work just fine! Thanks



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
wireless modem routers ronlau9 Linux - Wireless Networking 7 01-14-2008 09:29 PM
problem figuring out the Edimax wireless hi-gain USB Adapter glasgow SUSE / openSUSE 1 02-11-2007 09:22 AM
Question regarding diff between Wireless Access Pt and Wireless Routers stardotstar Linux - Wireless Networking 1 01-22-2006 08:58 PM
2 wireless routers, 2 wireless devices installed joltz Linux - Wireless Networking 1 11-16-2005 04:51 AM
Wireless and routers Alex_jacobson Linux - Wireless Networking 11 07-09-2003 08:47 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:38 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration