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

Notices


Reply
  Search this Thread
Old 02-22-2016, 10:10 PM   #1
mfoley
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 192.168.0.1 with a netmask of 255.255.255.0 (which, right there is probably wrong given the rest ...) It had a DHCP server range of 192.168.0.100-192.168.0.150, but I've altered the top address to be 192.168.0.128.

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 192.168.0.146.

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

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 192.168.0.128. 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
Emerson
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
jefro
Moderator
 
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
jmoore@thebank.com
LQ Newbie
 
Registered: Mar 2012
Posts: 3

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

Linksys

IP address 192.168.0.1 netmask 255.255.255.128

DHCP scope 192.168.0.100-192.168.0.126

You can drop the starting address of the DHCP scope but DO NOT raise the upper address. The 192.168.0.0 network with a mask of 255.255.255.128 has a network broadcast address of 192.168.0.127, so you don't want to pass that out to a client. Furthermore, the address 192.168.0.128 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 192.168.0.100 and 192.168.0.126. Likewise for all your other clients that are getting addresses from the Linksys.

Wireless Interface

IP address 192.168.0.129 255.255.255.128

DHCP Scope 192.168.0.130-192.168.0.254 (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 jmoore@thebank.com; 02-24-2016 at 12:24 PM.
 
1 members found this post helpful.
Old 02-28-2016, 10:48 AM   #5
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,546

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


Reply

Tags
dhcp


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

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