LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 08-21-2006, 03:02 PM   #1
pnellesen
Member
 
Registered: Oct 2004
Location: Missouri, USA
Distribution: Slackware 12.2, Xubuntu 9.10
Posts: 371

Rep: Reputation: 31
Subnetting question


Here's my configuration:

Code:
ISP --> Router 1 (192.168.1.1, netmask 255.255.255.0)
                        |
                        V
         3 computers, 192.168.1.1xx (DHCP)
         Router 2 (Static IP - 192.168.1.135, netmask 255.255.255.0)
                                       |
                                       V
               1 computer, 192.168.2.xxx (via DHCP)
This arrangement allows computer(s) on router 2 to access the internet with no problems. However, ideally I'd like to prevent any computers being fed from Router 2 from seeing or interacting with any computers on the network supplied by Router 1. I'm thinking this would be done by setting the LAN netmask on router 2 to something other than 255.255.255.0? I've been reading up on subnetting, but I'm not sure this is exactly the ideal solution? Any insights appreciated.
 
Old 08-21-2006, 03:20 PM   #2
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
You have both router on the same subnet 192.168.1. You should configure your second router to be on another subnet like 192.168.2. You'll need to setup a firewall between the routers to allow and disallow access from one network to the other.
 
Old 08-21-2006, 04:24 PM   #3
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
You need to add a third router. You have the main router then connect the other two routers wan side to the lan side of the main router. So you have the main router then the only connections on the lan side are the wan connections of the two routers. One for each network.

Brian1
 
Old 08-23-2006, 09:53 AM   #4
pnellesen
Member
 
Registered: Oct 2004
Location: Missouri, USA
Distribution: Slackware 12.2, Xubuntu 9.10
Posts: 371

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by ramram29
You have both router on the same subnet 192.168.1. You should configure your second router to be on another subnet like 192.168.2. You'll need to setup a firewall between the routers to allow and disallow access from one network to the other.
Ok, the first router here is a Linksys wrt54g. One of the admin screens is "Advanced Routing", in which you can specify a "Destination LAN IP". So in this scenario, the destination IP would be "192.168.2.(whatever)", correct? And then on the 2nd router, I would set it's LAN IP address to be 192.168.2.(whatever)? There is also a "Default Gateway" IP on the "Advanced Routing" screen - not sure what IP to use there?

Thanks for the help!
 
Old 08-23-2006, 10:20 AM   #5
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
From what I see you are connecting one router to the other via a daisy chain. You can do that and you can even specify in the firewall rules which addresses to access. Below may be what you need.

router1 WAN ip address
router1 WAN netmask
router1 WAN gateway
router1 LAN ip address 192.168.2.1
router1 LAN netmask (usually 255.255.255.0)
router1 DHCP 192.168.2.10 - 192.168.2.254

router 2 WAN ip address 192.168.2.2
router2 LAN ip address 192.168.3.1
router2 LAN netmask (255.255.255.0)
router2 LAN gateway 192.168.2.1
router2 DHCP 192.168.3.10 - 192.168.3.254
 
Old 08-23-2006, 10:23 AM   #6
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
Corrected:

router1 WAN ip address 64.78.92.13
router1 WAN netmask (255.255.255.252)
router1 WAN gateway 64.78.92.1
router1 LAN ip address 192.168.2.1
router1 LAN netmask (usually 255.255.255.0)
router1 DHCP 192.168.2.10 - 192.168.2.254

router2 WAN ip address 192.168.2.2
router2 WAN netmask (255.255.255.0)
router2 WAN gateway 192.168.2.1
router2 LAN ip address 192.168.3.1
router2 LAN netmask (255.255.255.0)
router2 DHCP 192.168.3.10 - 192.168.3.254
 
Old 08-23-2006, 12:10 PM   #7
Takezo
LQ Newbie
 
Registered: Nov 2004
Distribution: SUSE 10.1
Posts: 25

Rep: Reputation: 15
Quote:
Originally Posted by pnellesen
Here's my configuration:

Code:
ISP --> Router 1 (192.168.1.1, netmask 255.255.255.0)
                        |
                        V
         3 computers, 192.168.1.1xx (DHCP)
         Router 2 (Static IP - 192.168.1.135, netmask 255.255.255.0)
                                       |
                                       V
               1 computer, 192.168.2.xxx (via DHCP)
This arrangement allows computer(s) on router 2 to access the internet with no problems. However, ideally I'd like to prevent any computers being fed from Router 2 from seeing or interacting with any computers on the network supplied by Router 1. I'm thinking this would be done by setting the LAN netmask on router 2 to something other than 255.255.255.0? I've been reading up on subnetting, but I'm not sure this is exactly the ideal solution? Any insights appreciated.
Your using internet sharing router (Linksys, Netgear, D-Link, etc..., In this case Linsys, The 4 ethernet ports are NOT indivitual interfaces. It's just one ethernet interface integrated into a built in switch. Switches don't route packets as they are layer 2 on OSI model and IP and subnetting is Layer 3 of OSI. In short you can't prevent router 2 from talking to the computers of router 1, the way you got it physically set up now.

The reason why your idea will not work is simply because Internet sharing routers only route packets from LAN (the devices connected to 4 port switch) to WAN and vice versa.

It's much easier to visualize a router with one WAN interface and One ethernet interface with one ethernet port. The way it's set up now, is like having a basic switch hooked to the ethernet IF. Now put two computers and a second router on the swtich. Obviously the router will not be involved when router 2 talks to the two computers.
 
Old 08-23-2006, 12:50 PM   #8
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
You need to setup your firewall to allow outgoing http port 80 from the 192.168.2 network on to everything but to not allow everything else. Most routers have a basic firewall.
 
Old 08-23-2006, 10:55 PM   #9
pnellesen
Member
 
Registered: Oct 2004
Location: Missouri, USA
Distribution: Slackware 12.2, Xubuntu 9.10
Posts: 371

Original Poster
Rep: Reputation: 31
Thanks for the info, guys. I think I understand what's going on, and why I can't get exactly what I want here. It IS possible, I believe, to isolate LAN 2 from LAN 1 but not vice versa (meaning, computers on LAN 2 could see computers on LAN 1, but computers on LAN 1 could NOT see computers on LAN 2) and in fact that's what I've noticed while playing with this.

In case you were wondering, the whole reason I've been playing with this is that I've got an OLD laptop (Slackware runs just fine on it ) with an OLD Orinoco Silver wireless card (WEP, "40" bit encryption only) and I've also got an older (crappy) D-Link wireless router I wanted to use JUST for this laptop (my current network is the Linksys with 128 bit WPA) It's more of a learning exercise than anything, since I only use this particular laptop maybe once every 2 months and wouldn't even have the D-Link router on unless I wanted to use that laptop...
 
Old 08-25-2006, 05:55 PM   #10
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
I see what you are doing. You just what to stop someone from cracking your 40bit wep lan2 and then they could gain access to your lan1 section. Is this what you are thinking.

This is a thought if the wireless link on the dlink can be turned off. Use the Dlink first as lan 1 and then move everything from lan1 to lan2. Then when you need wireless 40bit, turn on the wireless access portion and then if someone gets in then all they can do is go out the internet side and not back into the lan2 side. Same thing you were seeing in your earlier testing not being able to see lan 2 from lan1. When done turn off the wireless side. Only other thing one can add if supported is mac and IP filtering. Only set for 2 IP. One for the laptop and one for the wan side of the linksys router. Then only allow the 2 mac addresses.

Brian1
 
Old 08-29-2006, 03:46 PM   #11
pnellesen
Member
 
Registered: Oct 2004
Location: Missouri, USA
Distribution: Slackware 12.2, Xubuntu 9.10
Posts: 371

Original Poster
Rep: Reputation: 31
Yeah, I finally figured out that's the way to do it, but the DLink has a nasty habit of locking up at unpredictable intervals, so I can't use it as my main router, since my wife probably wouldn't understand when she couldn't get her email
 
Old 08-30-2006, 03:19 PM   #12
pnellesen
Member
 
Registered: Oct 2004
Location: Missouri, USA
Distribution: Slackware 12.2, Xubuntu 9.10
Posts: 371

Original Poster
Rep: Reputation: 31
So this brings up another (hypothetical) question: Is is possible to attach a switch to the DSL modem (a SpeedStream with just one Ethernet port) then attach the Linksys and D-link routers to THAT? I assume this would work, except I wonder about getting both routers to connect to the internet at the same time? Somehow I don't think that will work very well (or at all), would it?
 
  


Reply



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
subnetting: how it works.. kool124 Linux - General 1 10-02-2005 01:49 PM
subnetting juanb Linux - Networking 1 06-30-2004 10:23 AM
subnetting samba question odious1 Linux - Networking 1 10-31-2003 01:16 PM
subnetting Fabian030 General 4 09-11-2003 03:11 AM
subnetting juanb Linux - Networking 3 08-26-2003 10:56 AM

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

All times are GMT -5. The time now is 07:48 PM.

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