Solved

Simulate low bandwidth/high latency - ET

Posted on 2014-02-20
20
767 Views
Last Modified: 2014-03-18
I am doing testing for a virtual desktop environment. I have a few Zero clients and i want to test them in low bandwidth and/or high latency environments.
Someone told me about a device often used by VoiP technicians that goes between ethernet cable and switch that can simulate either low bandwidth, high latency, etc (and you can adjust the levels). I searched online but cannot find anything of this sort. All i am finding is software that does this.
Anyone know of such devices?
0
Comment
Question by:tabush
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 8
  • 2
20 Comments
 
LVL 19

Expert Comment

by:regmigrant
ID: 39876330
Our lab here use IPNetSIm - link below - which is great but pricey for a one off. You might consider using an old desktop with a couple of NiCs and some of the open source software. There's a howto link below.

http://www.gl.com/ipnetsim.html
http://www.freebsd.org/doc/en/articles/filtering-bridges/article.html
0
 
LVL 57

Accepted Solution

by:
giltjr earned 500 total points
ID: 39876609
I would also suggest using a old PC with a couple of NIC's.

I use Linux with netem (network emulation).  netem can do a ton of stuff, but what I mainly use it for is to:

simulate various network bandwidth
simulate various levels of latency
simulate various levels of packet drops

I setup a  Linux box with Apache and PHP, created a web page where you can enter the IP address of the host you want to communicate and then select from a list pre-set bandwidth and latency options.  Click and off you go.

My company bought a device that cost over USD $2K and it didn't support some of what my setup did.  The only advantage it had was that it was a very small physical foot print, about 4"x4"x3/4" versus  old Dell tower.  Of course you can always use one of the newer smaller PC's as long as you can get two NIC's in it.

I lend out my box to our application development QA team so they can test what our customer will see.
0
 
LVL 19

Expert Comment

by:regmigrant
ID: 39876616
If you want something portable a laptop with an extra NIC via USB or PC Card would work if you can get Linux drivers for the extra network connectors
0
Don't Miss ATEN at InfoComm 2017!

Visit booth #2167 to see the  new ATEN VM3200 32 x 32 Modular Matrix Switch. Other highlights include the VE8950 4K HDMI Over IP Extender, VS1912 12-Port DP Video Wall Media Player  and VK2100 ATEN Control System. Register now with Free Pass Code ATEN288!

 
LVL 2

Author Comment

by:tabush
ID: 39877568
Thanks giltjr,
Which linux OS would you recommend? All of these are supported: Fedora, OpenSuse, Gentoo, Debian, Mandriva, Ubuntu

I have very little experience with linux so which would be the most simple to use?
0
 
LVL 57

Expert Comment

by:giltjr
ID: 39877655
I use Fedora, only because I started out using Red Hat Linux.  I have used OpenSuse before also, but only because we have one product that uses SuSE Enterprise and i needed something to test on.

I have not used the others, but for the most part Linux is Linux.

Doing this is kind of a one of.  Even people that manage Linux would have some difficulty doing this only because in involves using netem which probably 90% of Linux admins have never touched, even if they have heard of it.   I'll try to write up what I did and also post my scripts over the next couple of days.
0
 
LVL 2

Author Comment

by:tabush
ID: 39882949
Thanks giltjr,
Can you also share the commands to bridge the two adapters? I was going to follow these directions (http://tdistler.com/2011/06/10/netem-wan-emulation-how-to-setup-a-netem-box) however someone wrote in the comments that when they brought "bridge adapter up it caused a loop killing the entire office network connection."
0
 
LVL 57

Expert Comment

by:giltjr
ID: 39883243
The site you referenced has the instruction you need to bridge the network adapters.

The only thing you will need to check is how your Linux distribution names network interfaces.  The site uses the "old" eth0, eth1 type names.  New Linux distributions names the network interfaces based on if the are on the mother board (em1, em2, ect.) or in PCI adapter cards where the name is based on what PCI slot the card is in and how many ports are on the card.

The other thing will need to do is add something so that when you reboot the computer the bridge is setup again.  I don't see where his instructions are doing that so if you were to reboot the PC the bridge would be "gone".

I need to clean up some stuff in my files, they have some internal documentation that is unique to my company and I can let that out.
0
 
LVL 2

Author Comment

by:tabush
ID: 39884058
I followed his instructions and everything looks to be setup correctly however the "bridged" computer (wyse zero client) is not getting a connection.
The linux machine has internet connection and i confirmed bridge is setup by running "brctl show br0"
I also ran the command to remove any filtering that may be in place.
0
 
LVL 57

Expert Comment

by:giltjr
ID: 39884467
Try issing the command:

ifconfig

on the Linux machine. You should see the br0 interface, and both Ethernet interfaces up.
0
 
LVL 2

Author Comment

by:tabush
ID: 39886557
Everything looks good. Do you see anything wrong here.
Network cable is plugged into p3p1 and cable from em1 goes to my zero client.
Note, right now p3p1 has an IP however i tried the command that sets IP of both nics to 0.0.0.0 and that didnt do it either.

[root@localhost ~]# ifconfig
br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::223:aeff:feb0:f21b  prefixlen 64  scopeid 0x20<link>
        ether 00:23:ae:b0:f2:1b  txqueuelen 0  (Ethernet)
        RX packets 548  bytes 41010 (40.0 KiB)
        RX errors 0  dropped 1  overruns 0  frame 0
        TX packets 8  bytes 648 (648.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

em1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::223:aeff:feb0:f21b  prefixlen 64  scopeid 0x20<link>
        ether 00:23:ae:b0:f2:1b  txqueuelen 1000  (Ethernet)
        RX packets 33  bytes 6194 (6.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 338  bytes 23761 (23.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 21  memory 0xfe6e0000-fe700000  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 207  bytes 18954 (18.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 207  bytes 18954 (18.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

p3p1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.37.164  netmask 255.255.255.0  broadcast 192.168.37.255
        inet6 fe80::2c0:ddff:fe10:f4f8  prefixlen 64  scopeid 0x20<link>
        ether 00:c0:dd:10:f4:f8  txqueuelen 256  (Ethernet)
        RX packets 12427  bytes 6354365 (6.0 MiB)
        RX errors 0  dropped 3  overruns 0  frame 0
        TX packets 4309  bytes 443748 (433.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 18  
[root@localhost ~]# brctl show br0
bridge name    bridge id        STP enabled    interfaces
br0        8000.0023aeb0f21b       no                 em1
                                                                         p3p1
0
 
LVL 57

Expert Comment

by:giltjr
ID: 39886651
You need Apache and PHP installed and Apache needs to be configured to support server side installs.

You can remotely manage the "network emulation" box by giving interface br0 an IP address that is valid for your subnet.  Otherwise you need to access the box physically.

You will need to change the nic names in setib.html and setib.php.  On my PC em1 is the server side interface and p3p1 is the client side.  Make sure you know which NIC you want on which side.  The commands are interface and direction unique.  If you connect the network cables in correctly, then you get "normal" traffic bandwidth and latency.

I have it setup to simulate 2% packet loss and 0.4%  duplicate packets.  You can change this by adjusting the number in the setib.php file.

Three files here.  Once you download them rename them by removing the ".txt"

setib.shtml: main web page.  When you want to set the bandwidth you point your browser to the IP address or host name of the "bandwidth emulation box" with the url /setib.shtm, like http://localhost/setib.shtml.   On that page you enter the IP address of the sever you want to test with and then select one of the options from the pull down list.

setib.php: php file to issue the command to set or clear bandwidth emulation settings.

bandwidth.html: file that gets included in setib.shmtl that has a list of pre-set bandwidth and latency options.  You can add or modify as you see fit.
bandwidth.html.txt
setib.php.txt
setib.shtml.txt
0
 
LVL 57

Expert Comment

by:giltjr
ID: 39886657
Just saw your other post.

I would suggest you run tcpdump against em1 and p3p1.

tcpdump -s0 -i em1 -w tdem1.cap &
tcpdump -s0 -i p3p1 -w tdp3p1.cap &

try to access something from the workstation.  Then kill both of the tcpdump commands and look at with wireshark.

I would also (as I sated in my prior post) but the IP address on the br0 interface.
0
 
LVL 2

Author Comment

by:tabush
ID: 39934255
Finally got the bridge up and working. Think i was using a bad nic card originally.

Now i will work on the rest of configuration.
0
 
LVL 2

Author Comment

by:tabush
ID: 39934309
Should all 3 files be placed in /var/www/html/  ?
0
 
LVL 57

Expert Comment

by:giltjr
ID: 39934527
Yes.
0
 
LVL 2

Author Comment

by:tabush
ID: 39934709
thanks. Can you also post how to make the bridge permanent (wont delete on reboot)?
0
 
LVL 57

Expert Comment

by:giltjr
ID: 39934985
What Linux distribution are you using?
0
 
LVL 2

Author Comment

by:tabush
ID: 39935038
Fedora release 20 (Heisenbug)
0
 
LVL 57

Expert Comment

by:giltjr
ID: 39935092
I'm working from home today and don't have access to my system.  I get it to you tomorrow, I'm running an older level of  Fedora.
0
 
LVL 57

Expert Comment

by:giltjr
ID: 39938015
So I don't have to retype it, here is a link.

Basically in /etc/sysconfig/network-scripts you setup the ifcfg-xxx files as needed.  

http://acidborg.wordpress.com/2010/01/20/how-to-configure-a-network-bridge-in-red-hat-fedora/
0

Featured Post

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
eigrp routing loop 5 95
VLAN Overused monitor 4 60
Why isn't my network passing a certain vlan. 24 75
HP ProCurve Switches - Monitor and Configure 3 38
Both MMF (multi-mode fiber) and SMF (single-mode fiber) are types of optical fiber that can aid in communication applications. These thin strands of silica or glass will allow communication to occur between devices. The transmission of light between…
This article was originally published on Monitis Blog, you can check it here .   Some years back, I worked as the CTO.  During my tenure, I had a head of IT support reporting to me.  He did his job quite well and had a commendable sense of duty …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question