====== Network Testing ====== ===== Route Tracing ===== ==== Using TCP ==== :!: May require ''sudo''... * Requires something listening on the port you specify * For example a web server listening on port 443 (SSL) * Use ''-n'' to eliminate name resolution * Faster * Uses TCP SYN and ACK instead of ICMP Using port 443: traceroute -T -O info -p 443 hostname.domain.tld tcptraceroute hostname.domain.tld 443 This will also illuminate **asymmetrical routing**: tracepath hostname.domain.tld ===== Latency Testing ===== ==== Linux ==== **SmokePing**: https://oss.oetiker.ch/smokeping/index.en.html ==== Windows ==== :!: Tools must be run with **admin privileges**. **GPing**: https://sourceforge.net/projects/gping/ * Runs in memory **PingLogger**: http://pinglogger.co.uk/ * Creates database in same folder * Doesn't log actual time ===== Throughput Testing with Iperf ===== Windows: http://linhost.info/2010/02/iperf-on-windows/ Download: http://iperf.fr/ What's Happening: http://www.es.net/assets/Uploads/201007-JTIperf.pdf More Under the Hood: http://www.nanog.org/meetings/nanog43/presentations/Dugan_Iperf_N43.pdf Examples: http://www.enterprisenetworkingplanet.com/netos/article.php/3657236/Measure-Network-Performance-with-iperf.htm * Command line only * Requires an Iperf client and an Iperf server * Server listens on port 5001 by default * It may be necessary to open this port on the firewall * Run tests multiple times and average * Adjust settings up and down, then run test again * TCP window size (TCP) * Buffer size (TCP) * Bandwidth (UDP) * Use the UDP test below as a quickie starting point ==== Server ==== Start the ''iperf'' server: iperf -s Windows firewall: New-NetFirewallRule -DisplayName 'iPerf-Server-Inbound-TCP' -Direction Inbound -Protocol TCP -LocalPort 5201 -Action Allow | Enable-NetFirewallRule New-NetFirewallRule -DisplayName 'iPerf-Server-Inbound-UDP' -Direction Inbound -Protocol UDP -LocalPort 5201 -Action Allow | Enable-NetFirewallRule ==== Client ==== Start the ''iperf'' client and point it at the IP address of the ''iperf'' server: iperf -c 192.168.1.70 Sample results: ------------------------------------------------------------ Client connecting to 192.168.1.70, TCP port 5001 TCP window size: 64.0 KByte (default) ------------------------------------------------------------ [ 3] local 192.168.0.201 port 49269 connected with 192.168.1.70 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0-10.1 sec 25.5 MBytes 21.2 Mbits/sec ==== Options ==== :!: Changing the ''iperf'' options will modify the parameters of the testing. For help on options type: iperf --help This is an example of options that fully test a Gigabit network by changing: * TCP window size * Length of buffer to read or write * The default is 8 KB * Using 5 parallel threads * The default is 1 === Client === iperf -c 192.168.1.2 -w 512k -l 512k -P 5 === Server === iperf -s -w 512k -l 512k Sample results: ------------------------------------------------------------ Server listening on TCP port 5000 TCP window size: 256 KByte (WARNING: requested 512 KByte) ------------------------------------------------------------ [ 7] local 192.168.1.2 port 5000 connected with 192.168.1.3 port 1499 [ 4] local 192.168.1.2 port 5000 connected with 192.168.1.3 port 1500 [ 5] local 192.168.1.2 port 5000 connected with 192.168.1.3 port 1501 [ 6] local 192.168.1.2 port 5000 connected with 192.168.1.3 port 1502 [ 8] local 192.168.1.2 port 5000 connected with 192.168.1.3 port 1503 [ 6] 0.0-10.0 sec 221 MBytes 185 Mbits/sec [ 7] 0.0-10.0 sec 227 MBytes 190 Mbits/sec [ 8] 0.0-10.0 sec 226 MBytes 189 Mbits/sec [ 4] 0.0-10.1 sec 222 MBytes 186 Mbits/sec [ 5] 0.0-10.1 sec 225 MBytes 188 Mbits/sec [SUM] 0.0-10.1 sec 1.10 GBytes 935 Mbits/sec :!: Make sure your testing client and server have Gigabit NICs (don't ask me how I know). ==== UDP Test ==== * UDP * Send at 1Gbps * Adjust for your network * Use something just over your physical connection rate * Use 10 threads Server: iperf -su Client: iperf -c 192.168.2.50 -u -b 1G -P 10 ===== Switch Testing ====== Switch testing with Iperf ===== 10Gb Network testing with NTttcp ===== https://www.smallnetbuilder.com/archives/lanwan/lanwan-features/32345-confessions-of-a-10-gbe-network-newbie-part-2-test-toolkit https://gallery.technet.microsoft.com/NTttcp-Version-528-Now-f8b12769 :!:**Note** Unless you have a large RAID array hard disks will not fill a 10Gb pipe. For complete testing a RAMDisk formatted for 12GB is necessary. * Download NTttcp Utility and copy to 2 Windows PCs on the network. * Make sure the NTttcp traffic can pass the firewall on both PCs. Specify a firewall exception for the program name. * Run this command **First** on the **Receiver** ntttcp.exe -r -m 16,*,192.168.0.140 -l 128k -a 2 -t 20 * Run this command **Second** on the **Server** ntttcp.exe -s -m 16,*,192.168.0.140 -l 128k -a 2 -t 20 :!:**Note** The receiver machine in this case has an IP address of 192.168.0.140. You must specify the receiver’s IP address on the server instance.