はじめに
このドキュメントでは、Catalyst 9000シリーズスイッチでiPerfを使用して帯域幅テストを実行する方法について説明します。
前提条件
要件
次の項目に関する知識があることが推奨されます。
- Catalyst 9000シリーズスイッチでのアプリケーションホスティング
- Linux
使用するコンポーネント
このドキュメントの情報は、次のソフトウェアとハードウェアのバージョンに基づいています。
- C9300
- Cisco IOS® XE 17.3.5
- Cisco IOS® XE 17.6.4
注:他のシスコプラットフォームでこれらの機能を有効にするために使用されるコマンドについては、該当するコンフィギュレーションガイドを参照してください。
このドキュメントの情報は、特定のラボ環境にあるデバイスに基づいて作成されました。このドキュメントで使用するすべてのデバイスは、クリアな(デフォルト)設定で作業を開始しています。本稼働中のネットワークでは、各コマンドによって起こる可能性がある影響を十分確認してください。
関連製品
このドキュメントは、次のバージョンのハードウェアとソフトウェアにも使用できます。
背景説明
iPerf3は、IPネットワークで達成可能な最大帯域幅をアクティブに測定するためのツールです。iPerfは、TCPとUDPのさまざまな容量を使用して、帯域幅に関する統計情報を提供します。
注:このツールの詳細については、iPerfの公式ドキュメントを参照してください。
ビデオ
iPerfのインストール
制約事項
- アプリケーションホスティングは、Virtual Routing and Forwarding(VRF)に対応していません。
- Cisco IOS® XE Amsterdam 17.3.3より前のリリースでは、アプリケーションホスティングには専用のストレージ割り当てが必要で、ブートフラッシュでは無効になっています。
- Cisco IOS® XE Amsterdam 17.3.3以降のリリースでは、アプリケーションホスティングはブートフラッシュで有効になりますが、シスコによって署名されたアプリケーションのみがホストされます。
- 前面パネルのUniversal Serial Bus(USB)スティックはサポートされていません。
- Cisco Catalyst 9300シリーズスイッチは、バックパネルのシスコ認定USBのみをサポートしています。
- Cisco Catalyst 9500-High PerformanceシリーズスイッチおよびCisco Catalyst 9600シリーズスイッチは、アプリケーションホスティング用の前面パネルUSBをサポートしていません。
- Cisco Catalyst 9500および9500-High PerformanceシリーズスイッチとCisco Catalyst 9600シリーズスイッチは、AppGigabitEthernetインターフェイスをサポートしていません。
- Cisco Catalyst 9410Rスイッチは、Cisco IOS® XEベンガルール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. iPerf接続用のVLANを選択するか、新しい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サービスを開始し、show iox-service
特権EXECコマンドを使用してrunning
状態であることを確認します。
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. iPerfアプリケーションをSSDからインストールし、展開されていることを確認します。
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
状態が終了すると、デフォルトでサーバとして実行されます。
検証
アプリケーションの詳細を確認するには、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 installationの設定例は同じラボ環境から取得しました。
上記デバイスのIPアドレス割り当て:
C9300-AC1
|
C9300-AC2
|
SVI 192.168.10.11
iPerf 192.168.10.21
|
SVI 192.168.10.12
iPerf 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
この例では、ホストA(iPerfサーバ)からC9300-AC2(iPerfサーバ)までの帯域幅が測定されます。
- PCにiPerfがダウンロードされていることを確認します。
- PCにiPerfを保存したら、コマンドプロンプトからiperf3.exeに移動します。
C:\Users\user\Downloads\iperf-3.1.3-win64\iperf-3.1.3-win64>iperf3.exe
3. PCから-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.
ヒント:従来の方法では、サーバとクライアントの2台のPCを使用する必要があります。サーバとして動作しているPCに対しては、iperf3.exe -s
コマンドを使用します。
関連情報