tabush
asked on
Simulate low bandwidth/high latency - ET
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?
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?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
ASKER
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?
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?
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.
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.
ASKER
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."
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."
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.
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.
ASKER
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.
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.
Try issing the command:
ifconfig
on the Linux machine. You should see the br0 interface, and both Ethernet interfaces up.
ifconfig
on the Linux machine. You should see the br0 interface, and both Ethernet interfaces up.
ASKER
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,RU NNING,MULT ICAST> 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,RU NNING,MULT ICAST> 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,RUNNI NG> 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,RU NNING,MULT ICAST> 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
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,RU
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,RU
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,RUNNI
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,RU
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
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
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
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.
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.
ASKER
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.
Now i will work on the rest of configuration.
ASKER
Should all 3 files be placed in /var/www/html/ ?
Yes.
ASKER
thanks. Can you also post how to make the bridge permanent (wont delete on reboot)?
What Linux distribution are you using?
ASKER
Fedora release 20 (Heisenbug)
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.
So I don't have to retype it, here is a link.
Basically in /etc/sysconfig/network-scr ipts 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/
Basically in /etc/sysconfig/network-scr
http://acidborg.wordpress.com/2010/01/20/how-to-configure-a-network-bridge-in-red-hat-fedora/
http://www.gl.com/ipnetsim.html
http://www.freebsd.org/doc/en/articles/filtering-bridges/article.html