소개
이 문서에서는 iPerf on Catalyst 9000 Series 스위치를 사용하여 대역폭 테스트를 수행하는 방법에 대해 설명합니다.
사전 요구 사항
요구 사항
다음 주제에 대한 지식을 보유하고 있으면 유용합니다.
- Catalyst 9000 Series 스위치에서 애플리케이션 호스팅
- Linux
사용되는 구성 요소
이 문서의 정보는 다음 소프트웨어 및 하드웨어 버전을 기반으로 합니다.
- C9300
- Cisco IOS XE 17.3.5
- Cisco IOS XE 17.6.4
참고: 다른 Cisco 플랫폼에서 이러한 기능을 활성화하는 데 사용되는 명령에 대해서는 해당 컨피그레이션 가이드를 참조하십시오.
이 문서의 정보는 특정 랩 환경의 디바이스를 토대로 작성되었습니다. 이 문서에 사용된 모든 디바이스는 초기화된(기본) 컨피그레이션으로 시작되었습니다. 현재 네트워크가 작동 중인 경우 모든 명령의 잠재적인 영향을 미리 숙지하시기 바랍니다.
관련 제품
이 문서는 다음과 같은 하드웨어 및 소프트웨어 버전에서도 사용할 수 있습니다.
배경 정보
iPerf3은 IP 네트워크에서 실현 가능한 최대 대역폭을 능동적으로 측정하기 위한 도구입니다. iPerf는 TCP와 UDP의 다양한 용량을 사용하여 대역폭에 대한 통계를 제공합니다.
참고: 이 툴과 관련된 자세한 내용은 iPerf 공식 설명서를 참조하십시오.
비디오
성능 설치
제한 사항
- 애플리케이션 호스팅은 가상 라우팅 및 포워딩 인식(VRF 인식)이 아닙니다.
- Cisco IOS XE Amsterdam 17.3.3 이전 릴리스에서는 애플리케이션 호스팅을 위해 전용 스토리지 할당이 필요하며 부트플래시에서 비활성화됩니다.
- Cisco IOS XE Amsterdam 17.3.3 이상 릴리스에서는 부트플래시에서 애플리케이션 호스팅이 활성화되지만 Cisco 서명 애플리케이션만 호스팅됩니다.
- 전면 패널 USB(Universal Serial Bus) 스틱은 지원되지 않습니다.
- Cisco Catalyst 9300 Series 스위치는 후면 패널 Cisco 인증 USB만 지원합니다.
- Cisco Catalyst 9500-High Performance Series 스위치 및 Cisco Catalyst 9600 Series 스위치는 애플리케이션 호스팅을 위한 전면 패널 USB를 지원하지 않습니다.
- Cisco Catalyst 9500 및 9500-High Performance Series 스위치와 Cisco Catalyst 9600 Series 스위치는 AppGigabitEthernet 인터페이스를 지원하지 않습니다.
- Cisco Catalyst 9410R 스위치는 Cisco IOS XE Bengaluru 17.5.1 이전 릴리스에서 애플리케이션 호스팅을 지원하지 않습니다.
- AppGigabitEthernet 인터페이스에서 enable 명령을 구성하여 Cisco Catalyst 9410R 스위치에서 애플리케이션 호스팅을 활성화합니다.
설치 단계
- 최신 iPerf 이미지를 다운로드하고 USB SSD에 저장되어 있는지 확인합니다.
C9300-AC1#dir usbflash1:/
Directory of usbflash1:/
12 -rw- 6043136 Jan 26 2023 21:55:35 +00:00 iPerf.tar
2 . VLAN을 선택하거나 iPerf 연결에 대해 새 VLAN을 구성합니다.
C9300-AC1(config)#interface vlan 10
C9300-AC1(config-if)#ip add 192.168.10.11 255.255.255.0
3 . AppGigabitEthernet 인터페이스를 구성합니다.
C9300-AC1(config)#int Ap1/0/1
C9300-AC1(config-if)#switchport mode trunk
4. iPerf Docker를 구성하고 VLAN에 연결합니다.
C9300-AC1(config)#app-hosting appid iPerf
C9300-AC1(config-app-hosting)#app-vnic AppGigabitEthernet trunk
C9300-AC1(config-config-app-hosting-trunk)#vlan 10 guest-interface 0
C9300-AC1(config-config-app-hosting-vlan-access-ip)#guest-ipaddress 192.168.10.21 netmask 255.255.255.0
5. iPerf 연결을 위해 선택한 SVI의 IP를 애플리케이션의 기본 게이트웨이로 구성합니다.
C9300-AC1(config)#app-hosting appid iPerf
C9300-AC1(config-app-hosting)#app-default-gateway 192.168.10.11 guest-int
6. IOX 서비스를 시작하고 서비스가 running
상태 show iox-service
특권 EXEC 명령:
C9300-AC1(config)#iox
C9300-AC1(config)#do show iox-service
IOx Infrastructure Summary:
---------------------------
IOx service (CAF) : Running
IOx service (HA) : Running
IOx service (IOxman) : Not Ready
IOx service (Sec storage) : Not Running
Libvirtd 5.5.0 : Running
Dockerd 18.03.0 : Running
Sync Status : Disabled
7. SSD에서 iPerf 응용 프로그램을 설치하고 배포되었는지 확인합니다.
C9300-AC1#app-hosting install appid iPerf package usbflash1:iPerf.tar
Installing package 'usbflash1:iPerf.tar' for 'iPerf'. Use 'show app-hosting list' for progress.
C9300-AC1#show app-hosting list
App id State
---------------------------------------------------------
iPerf DEPLOYED
8. iPerf 응용 프로그램 활성화 및 시작:
C9300-AC1#app-hosting activate appid iPerf
iPerf activated successfully
Current state is: ACTIVATED
C9300-AC1#show app-hosting list
App id State
---------------------------------------------------------
iPerf ACTIVATED
C9300-AC1#app-hosting start appid iPerf
iPerf started successfully
Current state is: RUNNING
C9300-AC1#
C9300-AC1#show app-hosting list
App id State
---------------------------------------------------------
iPerf RUNNING
참고: iPerf가 running
state는 기본적으로 서버로 실행됩니다.
확인
애플리케이션 세부사항을 확인하려면 show app-hosting utilization appid [app-name]
특권 EXEC 명령:
C9300-AC1#show app-hosting detail appid iPerf
App id : iPerf
Owner : iox
State : RUNNING
Application
Type : docker
Name : mlabbe/iperf3
Version : latest
Description :
Author :
Path : usbflash1:iPerf.tar
URL Path :
Activated profile name : default
Resource reservation
Memory : 409 MB
Disk : 10 MB
CPU : 1480 units
CPU-percent : 20 %
VCPU : 1
Platform resource profiles
Profile Name CPU(unit) Memory(MB) Disk(MB)
--------------------------------------------------------------
Attached devices
Type Name Alias
---------------------------------------------
serial/shell iox_console_shell serial0
serial/aux iox_console_aux serial1
serial/syslog iox_syslog serial2
serial/trace iox_trace serial3
Network interfaces
---------------------------------------
eth0:
MAC address : 52:54:dd:d2:df:af
IPv4 address : 192.168.10.21
IPv6 address : ::
Network name : mgmt-bridge-v10
Docker
------
Run-time information
Command :
Entry-point : iperf3 -s
Run options in use :
Package run options :
Application health information
Status : 0
Last probe error :
Last probe output :
애플리케이션 사용률을 확인하려면 show app-hosting utilization appid [app-name]
특권 EXEC 명령:
C9300-AC1# show app-hosting utilization appid iPerf
Application: iPerf
CPU Utilization:
CPU Allocation: 1480 units
CPU Used: 0.00 %
CPU Cores:
Memory Utilization:
Memory Allocation: 409 MB
Memory Used: 1064 KB
Disk Utilization:
Disk Allocation: 10 MB
Disk Used: 0.00 MB
애플리케이션 컨테이너에서 세부 정보를 확인하려면 app-hosting connect appid [app-name] session
특권 EXEC 명령:
C9300-AC1#app-hosting connect appid iPerf session
/ $
/ $ #Verify IP address assigned
/ $
/ $ ifconfig
eth0
inet addr:192.168.10.21 Bcast:0.0.0.0 Mask:255.255.255.0
/ $ / $ #Verify iPerf is running as server / $ / $ ps PID USER TIME COMMAND 1 iperf 0:00 iperf3 -s 390 iperf 0:00 /bin/sh 398 iperf 0:00 ps / $
대역폭 테스트
네트워크 다이어그램
이 문서에 설명된 대역폭 테스트를 수행하는 방법은 아래 네트워크 다이어그램을 기반으로 합니다.
참고: iPerf 설치 섹션의 컨피그레이션 예는 동일한 랩 환경에서 가져왔습니다.
위의 디바이스에 대한 IP 주소 할당:
C9300-AC1 |
C9300-AC2 |
SVI 192.168.10.11 iPerf 192.168.10.21 |
SVI 192.168.10.12 성능 192.168.10.22 |
참고: 이 예에서 사용되는 모든 디바이스는 동일한 VLAN 도메인인 VLAN 10에 있습니다.
방법 1: 클라이언트로 전환
이 예에서는 C9300-AC1에서 C9300-AC2까지의 대역폭이 측정됩니다. C9300-AC1이 클라이언트입니다.
1. 명령 실행 app-hosting connect appid iPerf session
애플리케이션 컨테이너 프롬프트를 입력하려면
C9300-AC1#app-hosting connect appid iPerf session
/ $
2 . 애플리케이션 컨테이너 프롬프트에 들어가면 iperf3 -c
명령을 사용하여 대역폭 테스트를 시작합니다.
/ $ iperf3 -c 192.168.10.22
Connecting to host 192.168.10.22, port 5201
[ 5] local 192.168.10.21 port 34906 connected to 192.168.10.22 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 114 MBytes 955 Mbits/sec 2 833 KBytes
[ 5] 1.00-2.00 sec 113 MBytes 947 Mbits/sec 3 923 KBytes
[ 5] 2.00-3.00 sec 111 MBytes 934 Mbits/sec 77 974 KBytes
[ 5] 3.00-4.00 sec 113 MBytes 945 Mbits/sec 1 1.03 MBytes
[ 5] 4.00-5.00 sec 112 MBytes 940 Mbits/sec 109 1.08 MBytes
[ 5] 5.00-6.00 sec 111 MBytes 931 Mbits/sec 395 820 KBytes
[ 5] 6.00-7.00 sec 111 MBytes 933 Mbits/sec 198 882 KBytes
[ 5] 7.00-8.00 sec 112 MBytes 944 Mbits/sec 2 970 KBytes
[ 5] 8.00-9.00 sec 111 MBytes 933 Mbits/sec 9 1.02 MBytes
[ 5] 9.00-10.00 sec 111 MBytes 933 Mbits/sec 524 1.04 MBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 1.09 GBytes 940 Mbits/sec 1320 sender
[ 5] 0.00-10.01 sec 1.09 GBytes 937 Mbits/sec receiver
iperf Done.
/ $
3. 테스트가 끝나면 다음을 입력합니다 exit
스위치 CLI로 돌아갑니다.
참고: iPerf는 기본적으로 서버로 실행되므로 서버측에 추가 명령이 필요하지 않습니다.
방법 2: 클라이언트로서의 PC
이 예에서는 Host-A에서 C9300-AC2(iPerf 서버)로의 대역폭이 측정됩니다.
- iPerf를 PC에 다운로드했는지 확인합니다.
- PC에 iPerf를 저장한 경우 명령 프롬프트에서 iperf3.exe로 이동합니다.
C:\Users\user\Downloads\iperf-3.1.3-win64\iperf-3.1.3-win64>iperf3.exe
3 . PC에서 use -c 옵션. 이는 PC가 클라이언트임을 나타냅니다.
C:\Users\user\Downloads\iperf-3.1.3-win64\iperf-3.1.3-win64>iperf3.exe -c 192.168.10.22
Connecting to host 192.168.10.22, port 5201
[ 4] local 192.168.10.2 port 56009 connected to 192.168.10.22 port 5201
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-1.00 sec 109 MBytes 916 Mbits/sec
[ 4] 1.00-2.00 sec 0.00 Bytes 0.00 bits/sec
[ 4] 2.00-3.00 sec 0.00 Bytes 0.00 bits/sec
[ 4] 3.00-4.00 sec 93.6 MBytes 786 Mbits/sec
[ 4] 4.00-5.00 sec 15.1 MBytes 127 Mbits/sec
[ 4] 5.00-6.02 sec 0.00 Bytes 0.00 bits/sec
[ 4] 6.02-7.00 sec 78.2 MBytes 666 Mbits/sec
[ 4] 7.00-8.00 sec 42.9 MBytes 360 Mbits/sec
[ 4] 8.00-9.00 sec 0.00 Bytes 0.00 bits/sec
[ 4] 9.00-10.00 sec 49.4 MBytes 414 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-10.00 sec 388 MBytes 326 Mbits/sec sender
[ 4] 0.00-10.00 sec 388 MBytes 326 Mbits/sec receiver
iperf Done.
팁: 기존 방식에서는 PC 2대를 사용해야 하는데, 하나는 서버로, 다른 하나는 클라이언트로 사용해야 합니다. 서버 역할을 하는 PC의 경우 iperf3.exe -s
명령을 실행합니다.
관련 정보