LinuxQuestions.org
Review your favorite Linux distribution.
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-28-2014, 09:12 PM   #1
usao
Member
 
Registered: Dec 2011
Location: Chandler, AZ
Posts: 286

Rep: Reputation: Disabled
How to build a ethernet switch


Im interested in working with 10GBit Ethernet, specifically with the idea of an iSCSI server.
However, 10GBit switches are extremely expensive.
I have found several PCIe cards which aren't going to break my budget though, and I thought perhaps I could build my own switch out of a linux box and a few 10GBit PCIE ports.

Does anyone know where to start with the OS layer to build the switch software?
Oh, I did think about just doing point-to-point directly from the iSCSI server, but I was hoping to have something more scalable, but still not break the bank like an actual switch would.
I have a HP 2U rackmount box which holds 25 of the 2.5 inch drives, which will be the iSCSI server. I can easily add 2x 10GBit ports for just a few hundred.

Last edited by usao; 11-28-2014 at 09:13 PM.
 
Old 11-29-2014, 08:12 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,179

Rep: Reputation: 1272Reputation: 1272Reputation: 1272Reputation: 1272Reputation: 1272Reputation: 1272Reputation: 1272Reputation: 1272Reputation: 1272
If you are hoping for 10g performance you may be disappointed. You can't do in software what the switch does in hardware. Running at line rate would be well over 100M interrupts per second per pair of active ports.
 
1 members found this post helpful.
Old 11-29-2014, 10:58 AM   #3
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
What you will end up with is a router rather than a switch.

A switch only handles the IP header - and then uses electronic switches to connect the output to the input, thus avoiding having to handle the data. MUCH faster than the usual router.

A router has to receive the input packet, then output the packet to the destination interface - thus requiring two copy operations, one input, one output.

In the base throughput, a router is less than 1/2 the switch throughput for two ports. Added ports do degrade the same with independent messages - but merging two inputs to one output is even slower.

That said, a router is completely doable - and is MUCH cheaper than a switch.
 
1 members found this post helpful.
Old 11-29-2014, 08:42 PM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
You're not going to get anywhere near 10Gb performance out of a computer acting as a switch, sorry. 10Gb switches use dedicated hardware for switching (ASICs) that are MUCH faster at that job than any general purpose CPU could ever hope for.

That said, I don't know why you think they're so expensive. You can pick up a Netgear XS708E 8 port 10GbE switch (just as an example) for just over $800. I have its big brother (712T) running in the server room at my office, and it hits 10Gb without issue. I can't really comment on the long term reliability since I've only had it for ~7 months, but that's been 7 months without a single hiccup.

Last edited by suicidaleggroll; 11-29-2014 at 08:44 PM.
 
2 members found this post helpful.
Old 11-29-2014, 10:06 PM   #5
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,461
Blog Entries: 28

Rep: Reputation: 6176Reputation: 6176Reputation: 6176Reputation: 6176Reputation: 6176Reputation: 6176Reputation: 6176Reputation: 6176Reputation: 6176Reputation: 6176Reputation: 6176
I did some searching about this last night. All I could find about a DIY switch, as opposed to a router, that seemed reasonable concerned building a switch using Arduino.

That is something that might be doable at a reasonable cost.
 
1 members found this post helpful.
Old 12-06-2014, 09:57 AM   #6
usao
Member
 
Registered: Dec 2011
Location: Chandler, AZ
Posts: 286

Original Poster
Rep: Reputation: Disabled
Thanks for all the input. The Netgear switches are just barely affordable, and I may have to go that route.
The 8-port I can afford, but the 12-port doesn't fit my budget.
A pair of 8-port switches (multipathing) would work for the short term, but if this does grow in scale, I will likely need to sell the 8-port as used and get a 12 or 16 port.
 
  


Reply


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
loop back on marvell ethernet switch anjana General 1 04-06-2008 01:56 AM
Ethernet switch sandeepagrawal80 Linux - Networking 1 04-04-2008 04:17 AM
How to detect Ethernet switch loops tlemons Linux - Networking 2 08-15-2007 01:14 PM
Switch ethernet- to wireles - to ethernet? pterandon Linux - Networking 0 05-06-2005 04:28 PM
get all web pages from an ethernet switch powah Programming 2 03-29-2005 02:01 PM

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

All times are GMT -5. The time now is 02:15 AM.

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