How to test network
Method 1
Network quality between to points can be tested by using iperf tool.
On client site:
iperf -c SERVER_IP -u -b 10m
On server side:
iperf -s -u -i 1
"Datagrams" column should be checked in server side. High percents means network problems.
More information: http://openmaniak.com/iperf.php
Example
For testing you can use one of our servers. In order to test your connection run this command:
iperf -c 91.121.143.102 -u -b 10m
You will get a similar result:
[mindaugasm@quad ~]$ iperf -c 91.121.143.102 -u -b 10m
------------------------------------------------------------ Client connecting to 91.121.143.102, UDP port 5001 Sending 1470 byte datagrams UDP buffer size: 122 KByte (default) ------------------------------------------------------------ [ 3] local 192.168.0.104 port 36208 connected with 91.121.143.102 port 5001
[ ID] Interval Transfer Bandwidth [ 3] 0.0-10.0 sec 11.9 MBytes 10.0 Mbits/sec [ 3] Sent 8505 datagrams [ 3] Server Report: [ 3] 0.0-10.9 sec 3.72 MBytes 2.86 Mbits/sec 4.202 ms 5852/ 8504 (69%) [ 3] 0.0-10.9 sec 68 datagrams received out-of-order
69% is a very bad result here, the closer this result is to 0 - the better the situation with our network is.
Method 2
In most cases it is not possible to run iperf on both sides and this method shows how in can be tested by using MOR server only.
We will use Wireshark to capture some calls where problem is active.
If Wireshark is not installed on server run following command to install:
yum -y install wireshark
Now you need to capture call or few calls which are affected by network problem:
tethereal -i eth0 -w /home/siptrace.pcap
Change eth0 to interface which is used for SIP trafic.
Once command is entered it will start capturing all network packets going through specified network interface, so at this time it needs to place calls.
When calls are completed we can stop packets capturing by pressing CTRL+Z.
Now you need to copy /home/siptrace.pcap to your PC and open it by using graphical version of Wireshark which can be downloaded from http://www.wireshark.org
In the Wireshark go to Telephony > RTP > Show All Streams. It will give analysis of all captured calls.
High percent of packets loss causes quality problems during the call.