Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have been looking around on how to divide my LAN into different subnets using 2 routers (BEFSR41 V3 and a WGR614 v4). Basically I wanted to have the wgr614 (netgear) give a connection to the internet, where the BEFSR41 (linksys) would in turn serve two other computers the internet while routing between them.
It's not clear to me either (?).
In other words, I want two different networks to seperate one group of computers from another (having one group being accessed by others remotely, while another group being the home LAN). I was thinking of having the netgear (with the wireless serving the home LAN) in turn serve the internet to the linksys. The linksys would in turn be on a differente IP group (ie. the netgear would serve the home/wireless LAN with 192.168.0.x while the linksys would have the computers connected to it being within 192.168.1.x).
ASCII pictures for those unable to decipher my ramblings:
Code:
internet --> netgear --> linksys --> |
| | | | | = PC 1
~~~~~ |
wireless lan = PC 2
--------------------------------------------------------------------------
192.168.0.1 - .20 | 192.168.1.1 - .20
--------------------------------------------------------------------------
^(bah with monospaced font)
What I have done (but clearly is not what I was thinking I had done), is to have the linksys connect to the netgear by having it set its ip within the netgear range and same netmask, thus just having it serve computers with the range 192.168.0.100 - .149.
Am I making this too complicated? Should I just get a hub and have both routers connect through it, rather than daisychaining them?
Am I making any sense?
Edits by suggestion of archtoad (oh, it's been quite a while since I last posted!)
Yeah, you are hurting my head with this one, let me see if I get this right.
You want one subnet to be the local network, and the second subnet be just for (I assume) servers. Probably want the second subnet in a DMZ, or at least setup with forwarding.
So, if that is correct, I would do the following.
I would use the Linksys as the primary router myself, unless it is very old. From my experience, the Linksys products perform better hardware and firmware wise.
So saying the Linksys is the primary router with DHCP serving your LAN.
From there, you would connect the second router to the Linksys. Ideally you would have a dedicated uplink port on the Linksys, but the newer ones don't have them. No matter, you can use any port on the switch.
You would run a patch cable from one of the ports on the Linksys's switch to the WAN port on the Netgear. You would then give the Netgear the IP of 192.168.1.2, and in the Linksys config, place 192.168.1.2 in the DMZ.
If the Netgear supports it, activate automatic routing on it, and on the Linksys, that should keep you from having to manually modify the routing tables (if it works anyway, I have had mixed experiences).
Now, on the setup for the Netgear, you would make it's LAN side be 192.168.2.x, and either setup DHCP for that range (if it will let you, some will not let you setup DHCP for a subnet other than the router's default) or use static IP.
You would then want to look into disabling NAT on the second router, or using port forwarding to get the servers on that subnet visible to the internet.
By the way, check for any firmware updates on both routers, a buggy firmware can cause a very hard to diagnose problem, especially when using these devices in a configuration they were really never designed for.
Few do it, but we all should provide such links when asking Q's that involve hardware. It's just a question of finding them (you need them anyway, after all you own the stuff) & then learning to use the forum's "http://" button.
Your ASCII art must be put in a "Code" block to show up as you intended it. (You could do that w/ an "edit").
What are trying to accomplish? -- i.e. why are you doing this?[list=1][*]To create a DMZ? (as suggested above)[*]To provide extra security to the boxen behind the 2nd router?[*]Because you have both routers & can try this?[/list=1] All are valid, but the A would help to give you advice.
Here is a chart of my understading of your set up.
Code:
Name netgear linksys
Model WGR614 v4 BEFSR41 V3
Wireless yes no
Function Internet Local
LAN 192.168.0.0* 192.168.1.0*
LAN IP 192.168.0.1 192.168.1.1
WAN IP** ISP DHCP netgear DHCP or static in 192.168.0.x
* .0 is the whole network i.e. your ".x"
** This is where your confusion/problems may be
archtoad6:
Corrected! Though I think I fudged the spacing a bit (fonts are different between the textbox and the actual post), but I guess it's lightyears ahead of my drawing skills!
Beyond the typical late-night excuses, the rambling really equates for my desire to encapsulate an openMosix cluster being (ab)used by a few users I knew (and probably eventually some I don't entirely). Beyond the constant vigil upon the security front within the boxes, I'd like to keep any sight of systems used around the home out of clear view.
MS3FGX:
I will try it out (bar some random changes dues to sysop quirks and PEBCAK issues), and post the results as soon as possible.
Your ASCII art is still not perfect on my copy of Konqueror, but much better than before -- I think get the picture now (pun intentionly not resisted ).
Is this more like what you intended?
Code:
internet --> netgear --> linksys --> |
| | | | = PC 1
~~~~~~~ |
wireless lan = PC 2
----------------------------------------------------------
192.168.0.1 - .20 | 192.168.1.1 - .20
----------------------------------------------------------
Sometimes it's a bitch to get these things looking right. The problem is even the "Code" blocks aren't monspaced in the text composing box, but they are in the final display. This can lead to unending "Preview Reply" iteration. When it's complicated, I open a monospaced editor, get it the way I want it, then paste the whole thing into the "Code" block, & hopefully never forget to double-check w/ the "Preview Reply" button.
BTW, we should all try to limit the column width of our "Code" blocks, they can throw Konqueror (& who knows what other browsers) into a nasty horizontal scroll mode. -- Why I still keep a copy of Opera (my favorite browser in my Winders days) around.
Quote:
Should I just get a hub and have both routers connect through it, rather than daisychaining them?
Not unless your ISP provides more than 1 IP address.
Quote:
encapsulate an openMosix cluster being (ab)used by a few users I knew
May I take it that the A (post #3) is "2" (not "42" ). In which case I think you're on the right track. Particularly the order of the daisy chain. Your problem becomes simple: Get the netgear to treat the linksys as just another box to share the 'Net with. Simple, as long as you don't run into any double NAT'ing problems. It ought to go like this:[list=1][*]Plug the WAN port of the linksys into one of the LAN ports of the netgear.[*]Decide if the netgear should serve DHCP to the LAN. I assume yes.[*]Tell the linsys to be a DHCP client on its WAN side, or set the appropriate WAN IP.[/list=1]I think I have done this have done this before successfully, but so seldom & so long ago I'm not sure,
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.