YUMSERV
Published 2019. 6. 1. 14:07
iperf 사용법 LINUX/BASIC
반응형

1. iperf란

클라이언트와 서버와의 네트워크 대역폭을 측정하는 프로그램입니다.

iperf 다운로드 : https://iperf.fr/iperf-download.php

 

 

2. iperf 설치

※ centos 7 환경에서 진행하였습니다.

 

설치 되어있는지 확인 후 설치가 안되어있을 경우 yum으로 설치해줍니다.


# rpm -qa | grep iperf

# yum -y install iperf3*

# rpm -qa |grep iperf

iperf3-devel-3.1.7-2.el7.x86_64

iperf3-3.1.7-2.el7.x86_64


iperf3 버전으로 설치를 진행해주었습니다.

서버의 iperf버전와 client의 버전이 다를경우 확인이 안되기때문에 버전을 맞춰줘야합니다.

 

 

3. iperf 테스트

서버측에서 포트를 열어주어야 합니다.

iperf2에서 default 포트는 5001번입니다.

iperf3에서 default 포트는 5201번입니다.


vi /etc/sysconfig/iptables

-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 5001 -j ACCEPT

service iptables restart

# iptables -nL |grep 5001

ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:5001

 

서버측에서는 iperf3 -s 를 실행하여 클라이언트를 기다립니다.

라이언트측에서는 iperf3 -c serverIP를 실행하여 두 iperf가 통신하면서 네트워크를 측정합니다

 

# iperf3 -s

-----------------------------------------------------------

Server listening on 5201

-----------------------------------------------------------

Accepted connection from clientIP, port 42446

[ 5] local serverIP port 5201 connected to clientIP port 42448

[ ID] Interval Transfer Bandwidth

[ 5] 0.00-1.00 sec 256 MBytes 2.15 Gbits/sec

[ 5] 1.00-2.00 sec 493 MBytes 4.13 Gbits/sec

[ 5] 2.00-3.00 sec 566 MBytes 4.75 Gbits/sec

[ 5] 3.00-4.00 sec 687 MBytes 5.76 Gbits/sec

[ 5] 4.00-5.00 sec 794 MBytes 6.66 Gbits/sec

[ 5] 5.00-6.00 sec 798 MBytes 6.69 Gbits/sec

[ 5] 6.00-7.00 sec 803 MBytes 6.74 Gbits/sec

[ 5] 7.00-8.00 sec 613 MBytes 5.14 Gbits/sec

[ 5] 8.00-9.00 sec 634 MBytes 5.32 Gbits/sec

[ 5] 9.00-10.00 sec 683 MBytes 5.73 Gbits/sec

[ 5] 10.00-10.04 sec 29.7 MBytes 6.35 Gbits/sec

- - - - - - - - - - - - - - - - - - - - - - - - -

[ ID] Interval Transfer Bandwidth

[ 5] 0.00-10.04 sec 0.00 Bytes 0.00 bits/sec sender

[ 5] 0.00-10.04 sec 6.21 GBytes 5.31 Gbits/sec receiver

 

# iperf3 -c 서버 IP

Connecting to host serverIP port 5201

[ 4] local clientIP port 42448 connected to serverIP port 5201

[ ID] Interval Transfer Bandwidth Retr Cwnd

[ 4] 0.00-1.00 sec 275 MBytes 2.31 Gbits/sec 10 541 KBytes

[ 4] 1.00-2.00 sec 498 MBytes 4.18 Gbits/sec 9 908 KBytes

[ 4] 2.00-3.00 sec 565 MBytes 4.74 Gbits/sec 21 1.12 MBytes

[ 4] 3.00-4.00 sec 698 MBytes 5.85 Gbits/sec 20 1.36 MBytes

[ 4] 4.00-5.00 sec 794 MBytes 6.66 Gbits/sec 35 1.50 MBytes

[ 4] 5.00-6.00 sec 802 MBytes 6.73 Gbits/sec 38 1.63 MBytes

[ 4] 6.00-7.00 sec 791 MBytes 6.64 Gbits/sec 471 907 KBytes

[ 4] 7.00-8.00 sec 615 MBytes 5.16 Gbits/sec 25 1.07 MBytes

[ 4] 8.00-9.00 sec 632 MBytes 5.31 Gbits/sec 48 971 KBytes

[ 4] 9.00-10.00 sec 689 MBytes 5.78 Gbits/sec 13 1.26 MBytes

- - - - - - - - - - - - - - - - - - - - - - - - -

[ ID] Interval Transfer Bandwidth Retr

[ 4] 0.00-10.00 sec 6.21 GBytes 5.33 Gbits/sec 690 sender

[ 4] 0.00-10.00 sec 6.21 GBytes 5.33 Gbits/sec receiver

 

iperf Done


반응형

'LINUX > BASIC' 카테고리의 다른 글

Openssl 소스설치  (0) 2019.06.01
Curl 소스설치  (0) 2019.06.01
SSH 에러  (1) 2019.06.01
Quota  (0) 2019.06.01
MRTG 설치 및 설정  (0) 2019.06.01
profile

YUMSERV

@lena04301

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!