Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linux Network Switch

Status
Not open for further replies.

SirNuke

Technical User
Mar 5, 2004
58
US
I would like to setup a linux box as a network switch (not router). Would simply turning on ip forwarding do the job? Any tutorials/howtos that anyone knows about would be nice.

Thanks in advance,
SirNuke
 
I think there is some VLAN stuff you can compile into the kernel.
There's also a fair bit of QoS that would apply to running a proper, managed switch.
I cannot speak to how you'd get enough port volume to justify the box. I'm only aware of 4port 10/100 Ethernet PCI cards for density. Maybe 3-4 of those cards makes 12-16 Ports. Is that the cost/benefit you were looking for?



Surfinbox.com Business Internet Services - National Dialup, DSL, T-1 and more.
 

No, IP-forwarding is a routing thing. Also, OSes can really be switches since it's a hardware thing but they can act a bridges which is basically the same.

Do a Google for "Linux ethernet bridge"

Cheers
 
Thanks.

For starters, I 100% sure that I am getting enough traffic to justify this, (this will be used at lan partys, should you ever go to them. It will be replacing a cheap switch). It seems that bridging would work, but I have a question about how it works. If the bridge recieves a packet it is going to forward, does it forward it out all bridge interfaces (besides the one it came in) like a more traditional bridge, or does it act more like a switch?

SirNuke
 
I understand this. (I am about get my CCNA, so I understand how a switch works, how it is different than a bridge, and the technical aspects of all of this). My questsions are still based upon a tradition bridge. A tradition bridge blocks packets that have a desination MAC address that is on the same port as the packet came in. If not it outputs it on the other port (s) (I have seen three port bridges), and does not specifically check which port to forward, herby reducing latency to check, and cost of building the bridge so it can 'direct' traffic. Hardware versus software beside (it makes very little difference. My diffenition of the two devices is which makes intellegent decisions on where the packet goes) is Linux bridging itellegent and makes forwading decisions (if it knows where the end host is) or does it act more like hub if does block, forwarding out all bridge interfaces?

SirNuke
 
SirNuke:
If you're running a version of the Linux kernel capable of bridging (2.4.x requires patching. 2.6.x has it available as a standard module), then you can use a cognate of iptables to do pretty much anything you want to with packets.



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
You people are killing me. I know about this, for the last time. I understand the diference between a switch and bridge. As I have asked with the last posts, does a linux bridge make forwarding decisions, or simply output the packet on all bridge interfaces. Please DO NOT post if you are not answering this question.


SirNuke
 

Jesus, did you even look at the link I posted? It answers your question and explains how to implement what you are trying to do.

I guess Cisco certification doesn't require the ability to use Google or read documentation.
 
For the last time, I am NOT ASKING HOW TO SETUP THIS UP. I NEVER ASKED HOW TO SET BRIDGING UP. I am asking how this works. Does Linux Bridging forward the packets out the destionation card or out all other cards? That is not on the howto or faq.

SirNuke
 
I am not thanking you but I guess that they do forward them. The answer to this (or proof, simply forward delay is not good enough for me) was hidden in the STP section. I guess that maybe you have enough time to read sections that do not even protray to what you are trying to due.
 
My 2 cents..

Who in their right mind would implement a linux based "switch" in a production environment? To my knowledge its a software based switch. The cost associated with building a PC and putting multiple NICs in it is definately more than a cheapo netgear anymore. Even Netgears have ASICs anymore that let them do wire speed switching.. In my mind this is another thing that the linux kernel "can do" but shouldn't. They should spend their time doing other tasks and progressing other features besides wasting time on things like this.. (and yes I know the kernel has been able to do this for many years now)


BuckWeet
 
SirNuke:
You're going to have to repost that last one. Your grammar, spelling and usage mistakes make the post nearly ujnintelligible.


BuckWeet:
It can be useful when you need to put a little intelligence somewhere. You're right -- there is probably very little call for using Linux as a switch.

But SirNuke's original question was about bridging. A brigde invisibly connects two networks. An intelligent bridge invisibly and selectively connects two networks.



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top