LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 11-17-2006, 01:44 AM   #1
MetaTechi3
LQ Newbie
 
Registered: Nov 2006
Posts: 2

Rep: Reputation: 0
Linux setup as router / DHCP w/3+ NICs, separate but shared connectivity - question


I've been looking in several forums and doing some searching for information relating to a possible setup of a Linux box either as a router / or at least a DHCP server which could maintain 3 separate networks but still have them interconnected.

Basically, for each of the three NIC connections, each would be given a different range of IPs (ex. NIC 1: 192.168.10.*, NIC 2: 192.168.20.*, NIC 3: 192.168.30.) including other computers/ equipment connected to them(some through DHCP client requests / others through mac address assignment). Each of the three NIC 'networks' still need to be able to inter-communicate as with a switch, but still be administered IPs as though separate.

The reason for the three IP ranges is, at the base, there are three different connection locations, and based on the IP - a webserver will distribute an html page of varying configurations - one type for each location. So if a computer were connected to one NIC, type A page is served based on IP *.*.*.*, but if the same computer is moved to NIC 3 (or whichever), type C page is served because of...

I have seen several places say that it is not possible to do DHCP like this across multiple NICs. Aside from having to get 3 separate 'physical' routers to do the job, is this even possible or are there other options with the penguin that could do this?

Last edited by MetaTechi3; 11-17-2006 at 02:01 AM.
 
Old 11-17-2006, 02:21 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
to server multiple subnets with dhcp it seems as simple as
Code:
shared-network Inside {
 subnet 10.10.10.0 netmask 255.255.255.0 {
  range 10.10.10.128 10.10.10.254;
  option routers 10.10.10.1;
 }
 subnet 192.168.2.0 netmask 255.255.255.0 {
  range 192.168.2.10 192.168.2.254;
  option routers 192.168.2.1;
 }
}
but i'm not sure you need to do this at all if this is just for a seperate webpage... firstly you could simply use three ip's on the one box, but even more just configure apache correctly to use virtualhosts. you can use dns entries for site1, site2 and site3 to all point to the same ip address and let apache deal with it. you should never build your architecture around a specific application requirement.
 
Old 11-17-2006, 08:14 AM   #3
amitsharma_26
Member
 
Registered: Sep 2005
Location: New delhi
Distribution: RHEL 3.0/4.0
Posts: 777

Rep: Reputation: 31
Quote:
Originally Posted by MetaTechi3
I've been looking in several forums and doing some searching for information relating to a possible setup of a Linux box either as a router / or at least a DHCP server which could maintain 3 separate networks but still have them interconnected.
Routing tables will keep them interconnected & iptables can do the maintainence part.

Quote:
Originally Posted by MetaTechi3
Basically, for each of the three NIC connections, each would be given a different range of IPs (ex. NIC 1: 192.168.10.*, NIC 2: 192.168.20.*, NIC 3: 192.168.30.) including other computers/ equipment connected to them(some through DHCP client requests / others through mac address assignment). Each of the three NIC 'networks' still need to be able to inter-communicate as with a switch, but still be administered IPs as though separate.
Nos of switches involved b/w this router & end machine really doesnt matter. You can hop in all three different networks into a single switch & it will still work.
Practically,
All you need is properly configured routing tables & packet forwarding ON at this box. Thats it. You got to understand one more thing that if you bring more routers b/w this router & end-users; then it got to be those IN-b/w-router's duty as well to traverse packet appropriately.

e.g.
Code:
LANA--> ROUTER A|----> TOP ROUTER
LANB--> ROUTER B/
IN the first case(your case);
Client A(under lanA) has Router A as its gateway & thereafter ROUTER A got to reroute requests(because of its own routing tables) over to TOP ROUTER--> which will further traverse them back to LANB via ROUTERB(according to its routing tables). And hence if we have got routing tables configured properly at all routers involved during packet traversing... it will work.

Lets go practical;
ClientA pings CLientB
As this local box wont see any routing table for these clientB packets; it will forward them to their default gateway, i.e. ROUTER A & as per its routing tables,i.e. LANB/MASK VIA TOP ROUTER will pass it onto TOP ROUTER & now here as per its routing tables, i.e. LANB/MASK VIA ROUTERB will send them back to ROUTERB, now ROUTERB will look for its own routing tables & finally these packets will reach LANB--> CLIENTB.. but let me tell you this is a half way & now packets got to go back following the same route & then only we are going to get pong packets at clientA. Now our packet being at CLIENTB box, will look its routin g tables & hence as not found anything will look for Default gateway.

Under second case;
Code:
LANA--> BACKBONE SWITCH --> TOP ROUTER
LANB-->/
Client A would have got TOP router as its gateway & thereafter routing tables will confirm you a way out back to LANB.

Hope this clears the basic routing procedure. During the whole reply i did not get into your dhcp or webserver problem.
 
Old 11-17-2006, 11:41 AM   #4
MetaTechi3
LQ Newbie
 
Registered: Nov 2006
Posts: 2

Original Poster
Rep: Reputation: 0
Hmm, Well, there's a bit more to the setup that I'll try to include...I see what you're saying, and it makes sense, but I'm not quite sure this fits the situation.

The setup is in three rooms (already apparent), which are side-by-side, and the equipment consists of projectors, a sound system, and A/V feedthrough connections. Each setup can be used individually, or all together as one setup- displaying and playing back A/V media from one of the three sources.

The projectors and the A/V media(switching through a matrix switcher) have their appropriate function commands relayed to them via an ethernet-to-RS232 IP capable server. A separate IP compatible box contains the command codes for the appropriate equipment, which can be selected from just a simple HTMl page which has appropriate links to the right command wanted, and in turn sends the command through ethernet to the E-S server, to the right object.
This setup is isolated from our internet and internal network as it would not be good to allow access to everyone to turn things on and off and change A/V routings from anywhere.

Now, the room computers, which are media sources, can be disconnected from one room, and connected to another but would only have the HTMl page (which is stored locally) for the first room to which it had been connected. I'm tring to figure out a way to determine which isolated network connection goes to which room (and be able to identify the computer connectd to it as being in room 1, but not permanently assigned to room 1), from the equipments standpoint, and move away from having a static copy of the HTMl document and move to a system that can serve up the correct command HTMl pages with corresponding links for the right room equipment, and not bother about accidentally turning things on and off in the other rooms.

Labelling of the computers to rooms has been done, but does not directly solve the issue. There are others who have to move the equipment around that do not pay attention to those details. So, this would address that issue altogether, and from a general users standpoint - they wouldn't have to bother about it.

That's it for the most part...
 
  


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
Separate router and modem: 2 DHCP servers and wierdness jago25_98 Linux - Networking 1 09-30-2006 05:24 AM
Linux router/firewall box for shared Internet access from 3 separate LANs? dan.patton Linux - Networking 4 04-15-2006 05:37 PM
Advanced Router setup / MAX # of NICs DrAxeman Linux - Networking 1 03-30-2005 07:08 PM
Router/firewall/webserver 2 nics dsl question don_from_wi Linux - Networking 2 03-29-2005 06:02 PM
router/firewall/nat/dhcp with 5 NICs? nicedreams Linux - Networking 13 06-21-2003 02:26 PM

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

All times are GMT -5. The time now is 02:50 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