Tuesday, November 11, 2014

Kiểm tra mạng sử dụng IPERF

Iperf là tool kiểm tra link bandwidth , quality (latency , jitter , packet loss)


#cài iperf
$sudo apt-get install iperf

#Mặc định thì iperf client kết nối tới iperf server qua port TCP 5001 và BW hiển thị là BW từ client đến server .

#Xì tạt
#Client:
$ iperf -c 182.158.25.159
------------------------------------------------------------
Client connecting to 182.158.25.159, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[ 3] local 182.158.25.186 port 33180 connected with 182.158.25.159 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 114 MBytes 95.0 Mbits/sec

# server:
$ iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[ 4] local 182.158.25.159 port 5001 connected with 182.158.25.186 port 33180
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-10.1 sec 114 MBytes 94.2 Mbits/sec


# Test iperf với uni-directional , bi-directional link + linux congestion control.
- Mặc định : TCP và link là uni-directional
- Để test bi-directional : dùng thêm -r
- Để test UDP: dùng -u
- Thêm congestion control : dùng -Z, --linux-congestion
# Test trên Ubuntu 10.04 using kernel 2.6.32-46-generic-pae
# sysctl net.ipv4.tcp_available_congestion_control net.ipv4.tcp_available_congestion_control = cubic, reno

# Test 01, 02: TCP uni-directional and bi-directional bandwidth checking


# Test 03, 04: UDP uni-directional and bi-directional bandwidth checking


# Test 05: iperf testcases using congestion control reno, cubic (default algorithms in kernel 2.6)


No comments:

Post a Comment