Linux - Networking This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
05-18-2010, 10:24 AM
|
#1
|
|
LQ Newbie
Registered: Mar 2006
Location: Italy
Distribution: Ubuntu 10.04
Posts: 19
Rep:
|
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 10:52 AM.
|
|
|
|
05-19-2010, 03:20 AM
|
#2
|
|
Member
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806
Rep:
|
You can use VLAN's or your can use normal ethernet with alias interfaces on the linux box.
|
|
|
|
05-19-2010, 03:22 AM
|
#3
|
|
LQ Newbie
Registered: Mar 2006
Location: Italy
Distribution: Ubuntu 10.04
Posts: 19
Original Poster
Rep:
|
Quote:
Originally Posted by datopdog
You can use VLAN's or your can use normal ethernet with alias interfaces on the linux box.
|
Do you mean IP aliases?
|
|
|
|
05-19-2010, 03:24 AM
|
#4
|
|
Member
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806
Rep:
|
Quote:
Originally Posted by axelgenus
Do you mean IP aliases?
|
Yes
|
|
|
|
05-19-2010, 03:42 AM
|
#5
|
|
LQ Newbie
Registered: Mar 2006
Location: Italy
Distribution: Ubuntu 10.04
Posts: 19
Original Poster
Rep:
|
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?
|
|
|
|
05-19-2010, 04:24 AM
|
#6
|
|
Member
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806
Rep:
|
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.
|
|
|
|
05-19-2010, 12:14 PM
|
#7
|
|
Member
Registered: Mar 2009
Posts: 245
Rep:
|
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.
|
|
|
|
05-19-2010, 12:28 PM
|
#8
|
|
LQ Newbie
Registered: Mar 2006
Location: Italy
Distribution: Ubuntu 10.04
Posts: 19
Original Poster
Rep:
|
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 12:36 PM.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:52 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|