LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 05-18-2010, 11:24 AM   #1
axelgenus
LQ Newbie
 
Registered: Mar 2006
Location: Italy
Distribution: Ubuntu 10.04
Posts: 19

Rep: Reputation: 0
Complex routing


Hi guys,

I have to develop a project for the university. It has to do with complex routing.

I have one linux box with one Ethernet interface, a Layer 2 switch with 801.1q (VLAN) support and four routers. Each router has four Ethernet ports. The Linux box and the routers are connected to the switch.

Is it possible to route traffic from the linux box interface to a specific router interface and vice-versa only by configuring the linux box and the switch? What is the best way to achieve this purpose?

I thought about using VLANs (one for each router interface) but I have some doubts...

Thank you,
Axel.

Last edited by axelgenus; 05-18-2010 at 11:52 AM.
 
Old 05-19-2010, 04:20 AM   #2
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
You can use VLAN's or your can use normal ethernet with alias interfaces on the linux box.
 
Old 05-19-2010, 04:22 AM   #3
axelgenus
LQ Newbie
 
Registered: Mar 2006
Location: Italy
Distribution: Ubuntu 10.04
Posts: 19

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by datopdog View Post
You can use VLAN's or your can use normal ethernet with alias interfaces on the linux box.
Do you mean IP aliases?
 
Old 05-19-2010, 04:24 AM   #4
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
Quote:
Originally Posted by axelgenus View Post
Do you mean IP aliases?
Yes
 
Old 05-19-2010, 04:42 AM   #5
axelgenus
LQ Newbie
 
Registered: Mar 2006
Location: Italy
Distribution: Ubuntu 10.04
Posts: 19

Original Poster
Rep: Reputation: 0
Ok, so, correct me if I'm wrong, I enable different aliases on the interface and then I configure the switch to route the traffic based on the source IP address (in case of packets coming from the linux box) or the port (in case of packets coming from one of the routers' interfaces).

Which method do you recommend?
 
Old 05-19-2010, 05:24 AM   #6
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
Switches do not perform routing as they operate at layer 2 (apart from layer3 switches) in your case the linux box will be able to get to all the routers as it will have an ip address in all of the router ranges.
 
Old 05-19-2010, 01:14 PM   #7
TimothyEBaldwin
Member
 
Registered: Mar 2009
Posts: 249

Rep: Reputation: 27
Just using a suitable route table may work, however if routers are running Linux it may reach the wrong interface of the correct router. Static neighbour (ARP) cache entries will solve that.

Using VLANs is a robust solution given a suitable switch, and will work even if the routers misbehave.
 
Old 05-19-2010, 01:28 PM   #8
axelgenus
LQ Newbie
 
Registered: Mar 2006
Location: Italy
Distribution: Ubuntu 10.04
Posts: 19

Original Poster
Rep: Reputation: 0
The routers are the question mark: the project is somewhat generic about the router specs. The whitepaper only says it has an integrated 4-port switch (not VLAN-aware) and a WAN Ethernet port. All four ports are connected to the main switch (VLAN-aware).

I was thinking about pros and cons of the two approaches and the subtle questions I may be facing during the exam... something like this: "suppose all four routers are of the same subnet: how can I route packets?"

I guess the best way is to create sixteen VLANs, one for each router interface (4 routers, 4 ports each). Both the linux box and the main switch are VLAN-aware so I can send traffic over the unique interface I have available on the linux box. I should statically bind sixteen ports on the switch to the router interfaces so that each router interface gets bounded to a specific VLAN. Packets routing between VLANs should be managed on the routers' switches. Unfortunately this way I can route traffic only for groups of four interfaces...

Thank you both for your help!

Last edited by axelgenus; 05-19-2010 at 01:36 PM.
 
  


Reply

Tags
routing, switch


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
Dynamic routing isn't done; static routing works for about 2 seconds for wireless gregorian Linux - Networking 7 02-19-2010 07:43 AM
pre routing , post routing and qos support msridhar87 Linux - Networking 0 02-13-2009 06:37 AM
Complex OpenVPN setup and routing joadoor Linux - Networking 2 08-05-2008 09:28 PM
complex password sachin1361 Linux - Enterprise 2 04-01-2008 03:46 AM
gsl_complex vs <complex> darknails Programming 0 02-27-2005 11:24 AM


All times are GMT -5. The time now is 04:54 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration