Simple Design for a Controllable Ethernet Switch / Router

I want to be able to interrupt an Ethernet link with controllable-length interruptions of perhaps 1msec to a few seconds.  The objective is to get an empirical measure of what interruptions do to various communication links.

I suppose one could do this with a couple of quad 2-input AND gates and a one-shot.  But that seems too clunky and not very flexible should other ideas for applications come to mind.

It occurs to me that an ethernet switch or a router (which includes a switching function of course) might be an ideal platform.  Maybe the interruption control could be from a laptop.  Then the entire implementation might be in software.  

I don't really want to mess with the hardware too much and I probably can't write the code either in any reasonable amount of time.  So, I'm looking for clever ideas that might work and that aren't too demanding of time and energy.  But, of course, a WRT54G with suitably modified DD-WRT does come to mind - but I've never worked on the code even to the point of doing a build.  So, the learning curve seems more demanding than I'd like to invest.

Or maybe a dual NIC PC?  Now, I *can* write batch files.

Ideas?  Maybe a good student project?
LVL 27
Fred MarshallPrincipalAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
The NAND gate idea won't work at all.  Network interfaces are much more complicated than that.  There are however, manual switches for network cables.  This Amazon search brings up a few:  http://www.amazon.com/s/ref=nb_sb_ss_i_1_15?url=search-alias%3Dcomputers&field-keywords=manual+network+switch&sprefix=manual+network+%2Caps%2C271
0
blytkerchanCommented:
If you want to interrupt for just a millisecond and want it to be reliable, a software-only implementation running on a laptop probably won't do (but it depends on your requirements).

If you get a bit of hardware into the mix, you could put an FPGA on a board with two (or more) Ethernet ports and an RS-232 or USB link for commands and firmware updates, and have that handle your interruptions...
0
Dave BaldwinFixer of ProblemsCommented:
Network interfaces for common networks using RJ45 connectors and CAT5 cabling are basically modems.  A 100Mbps connection runs at 25MHz with 4-bit symbols per cycle.  The network cards have to encode and decode these signals.  This page describes the signalling:  http://en.wikipedia.org/wiki/Ethernet_physical_layer   I couldn't find a picture to describe it at the moment.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Fred MarshallPrincipalAuthor Commented:
My assumption regarding the symbols was bogus.  Thanks.

So an array of 8 analog switches then I suppose would do the trick.  Then it wouldn't matter what the symbols are like.  That is if one wanted to go in that direction....

I don't care so much about getting down to 1msec but 10msec maybe.  I have no idea what results might look like and what times are critical.
0
Dave BaldwinFixer of ProblemsCommented:
The network signals are transformer isolated (to prevent ground loops) and expecting a defined impedance, 100 ohms I believe.  The signal level is +-2.5V but that is floating, not ground referenced.  The hardware for passing and blocking a 25MHz signal is non-trivial.
0
Dave BaldwinFixer of ProblemsCommented:
This article although it is 18 years old (so is 100-BaseT networking), has some good info.
0
Fred MarshallPrincipalAuthor Commented:
Well my diagonal pliers will do it but the time span control is poor.  :-)

But decent analog switches don't fall off from -60dB until one hits 100MHz.  I'm not sure that this application demands even that good of a switch.  Maybe -20dB would be good enough in the OFF or OPEN state.

What article is that?
0
Dave BaldwinFixer of ProblemsCommented:
0
Fred MarshallPrincipalAuthor Commented:
I'd still like to have an idea how one might use a PC for an interruptor (with 2 NICs)
0
JohnBusiness Consultant (Owner)Commented:
What about building an interrupter switch inside an inexpensive Ethernet switch (along the lines of what blytkerchan was suggesting).

I would worry about discontinuities caused by analog switches. Ethernet signals are fast enough that they work like transmission lines.

So then if you could trap an inbound signal in software in the switch and have the signal (or lack of it) out an outbound port, that might work.

So Ethernet in LAN 1 and Ethernet out LAN 2 and a digital switch inside (additional circuit board) to turn the signal off and on.

If you are willing, get a copy of Comm View (tamosoft.net) and look at the packet retransmissions that go on at the best of times.
0
DavidPresidentCommented:
Something like a $29 raspberry pi would be an ideal way to do this.  Here is an article about how to add a precision timer with 30 microsecond precision that includes the code to do it. Since the pi has an Ethernet port and runs Linux you can Use it in a variety of ways to deal with this problem.   Heck the pic can take its own Ethernet offline or inject frames, whatever
0
Aaron TomoskySD-WAN SimplifiedCommented:
If you want to mess with the network, dummynet does a lot in Linux. Pfsense and monowall both play nice with dummynet to make a router. Only downside to a pi is one nic so you would need a Usb nic or something.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Dave BaldwinFixer of ProblemsCommented:
The problem with any of these approaches that uses a NIC is that the NIC sends and receives complete packets in hardware where you can't interrupt them  You might be able to stop the transmissions in between packets... but modern NICs also have buffer memory to speed up the network so it might be difficult to even do that.  I also can't find any Ethernet test equipment that will interrupt the signals.  They are usually trying to make sure they're not interrupted.
0
DavidPresidentCommented:
Use the pi as a precision switch that disconnects one half of the tx and rx twisted pairs at the desired intervals.  There are plenty of I/o lines that can do this.
0
Fred MarshallPrincipalAuthor Commented:
dlethe: article?
0
DavidPresidentCommented:
Sorry on the road now just google "raspbery pi precision timer" and you'll find numerous how-to articles.
0
DavidPresidentCommented:
check out the ethos switch for the pi.   Looks like this is what you want.  Here is a video.    This may be more of a turnkey for you because it should be programmable via the realtime precision timer capability so you can turn ports on/off at 100ms intervals.  Call them.   the website is gadgetsmyth.com

https://www.youtube.com/watch?v=yVmD66hDRmQ
0
JohnBusiness Consultant (Owner)Commented:
".... but modern NICs also have buffer memory to speed up the network so it might be difficult to even do that....."

I also think, if you open the circuit, that the signals will double back (reflection at the impedance change) leaving unpredictable results.

If you try interrupting at the PC once received in the PC, that is the same as a failed acknowledgement. Maybe that is what you are trying to do.
0
Fred MarshallPrincipalAuthor Commented:
Aaron Tomosky:
Pfsense and monowall both play nice with dummynet to make a router.
Well, I guess this will mean my next 3-5 year foray into Linux.  Always before it's been "too much work to do simple things".  Maybe it's better now.  I don't want to spend all my time making the OS and the tools work - which is what seemed to happen in the past.  But, the idea is intriguing.
What distribution would you recommend for those tools?
0
Dave BaldwinFixer of ProblemsCommented:
Since more and more is being integrated into the hardware, you may find it progressively more difficult to get to low level functions.
0
Aaron TomoskySD-WAN SimplifiedCommented:
0
Fred MarshallPrincipalAuthor Commented:
Aaron:  OK.  I've got it running.  Now all I have to do is figure out how to use dummynet.  It appears it's not in the packages with pfsense....

In the mean time, I also have Ethernet dumb switches and routers lying around.  
I looked at a couple of the switches and can figure out what the chips are in one of them.  
But the switches don't have a software interface - so even if I can figure out how to use one of the controls, getting to those controls in a convenient way is going to be tough I think.  e.g. PowerDown per port looks like a good candidate.

But, I also have DD-WRT compatible routers.  Maybe I could control the switch inside a router (like WRT54G) with software and one of the management interfaces?
0
Aaron TomoskySD-WAN SimplifiedCommented:
From what I can read it is already installed and you use it with ipfw rules
http://info.iet.unipi.it/~luigi/dummynet/

Most people use it anytime they do rate limiting in the gui
http://www.squidworks.net/2012/08/pfsense-2-0-limiting-users-upload-and-download-speeds-by-limiting-bandwidth/
0
Fred MarshallPrincipalAuthor Commented:
A little patience please.  It takes a few days to get back and try things....
0
Fred MarshallPrincipalAuthor Commented:
On reflection, it appears that my best bet it to configure pfsense on a computer with 3 NICs.
One NIC for general purposes.
Two NICs for passthrough and introducing packet drops.

I have pfsense running but I'm unclear as to how to proceed with the implementation for packet dropping.
A bit of help would be appreciated on this part.
0
Fred MarshallPrincipalAuthor Commented:
Thanks all!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Switches / Hubs

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.