Inleiding
Dit document beschrijft hoe u iPerf op Catalyst 9000 Series switches kunt gebruiken om bandbreedtetests uit te voeren.
Voorwaarden
Vereisten
Cisco raadt kennis van de volgende onderwerpen aan:
- Application Hosting op Catalyst 9000 Series switches
- Linux
Gebruikte componenten
De informatie in dit document is gebaseerd op de volgende software- en hardware-versies:
- C9300
- Cisco IOS XE 17.3.5
- Cisco IOS XE 17.6.4
Opmerking: raadpleeg de juiste configuratiehandleiding voor de opdrachten die worden gebruikt om deze functies op andere Cisco-platforms in te schakelen.
De informatie in dit document is gebaseerd op de apparaten in een specifieke laboratoriumomgeving. Alle apparaten die in dit document worden beschreven, hadden een opgeschoonde (standaard)configuratie. Als uw netwerk live is, moet u zorgen dat u de potentiële impact van elke opdracht begrijpt.
Verwante producten
Dit document kan ook worden gebruikt voor de volgende hardware- en softwareversies:
Achtergrondinformatie
iPerf3 is een tool voor actieve metingen van de maximaal haalbare bandbreedte op IP-netwerken. iPerf gebruikt de verschillende capaciteiten van TCP en UDP om statistieken over bandbreedte te leveren.
Opmerking: raadpleeg de officiële documentatie van iPerf voor meer informatie over deze tool.
Video
Installatie vooraf
Beperkingen
- Toepassingshosting is niet bewust van virtuele routing en doorsturen (VRF-bewust).
- In releases voorafgaand aan Cisco IOS XE Amsterdam 17.3.3, vereist applicatiehosting specifieke opslagtoewijzingen en is uitgeschakeld op de bootflash.
- In Cisco IOS XE Amsterdam 17.3.3 en latere releases, is het hosten van toepassingen ingeschakeld op de bootflash, maar alleen door Cisco ondertekende toepassingen worden gehost.
- De USB-stick (Universal Serial Bus) aan het voorpaneel wordt niet ondersteund.
- Cisco Catalyst 9300 Series Switches ondersteunen alleen backpanel Cisco-gecertificeerde USB.
- Cisco Catalyst 9500-X Series-Switches met hoge prestaties en Cisco Catalyst 9600 Series-Switches ondersteunen geen USB-poorten op het voorpaneel voor toepassingshosting.
- Cisco Catalyst 9500 en 9500 Series Switches met hoogwaardige services en Cisco Catalyst 9600 Series Switches ondersteunen AppGigabit Ethernet-interfaces niet.
- Cisco Catalyst 9410R Switches ondersteunen applicatiehosting niet voordat Cisco IOS XE Bengaluru 17.5.1 wordt gestart.
- Configureer de opdracht Enable op de AppGigabit Ethernet-interfaces om het hosten van toepassingen op Cisco Catalyst 9410R-Switches mogelijk te maken.
Installatiestappen
- Download de nieuwste iPerf-afbeelding en controleer of deze is opgeslagen in de USB SSD:
C9300-AC1#dir usbflash1:/
Directory of usbflash1:/
12 -rw- 6043136 Jan 26 2023 21:55:35 +00:00 iPerf.tar
2. Kies een VLAN of configureer een nieuwe voor iPerf-connectiviteit:
C9300-AC1(config)#interface vlan 10
C9300-AC1(config-if)#ip add 192.168.10.11 255.255.255.0
3. De AppGigabit Ethernet-interface configureren:
C9300-AC1(config)#int Ap1/0/1
C9300-AC1(config-if)#switchport mode trunk
4. Configureer Perf-docker en koppel deze aan een 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. Configureer als standaardgateway voor de toepassing de IP van de SVI die u hebt gekozen voor iPerf-connectiviteit:
C9300-AC1(config)#app-hosting appid iPerf
C9300-AC1(config-app-hosting)#app-default-gateway 192.168.10.11 guest-int
6. Start de IOX-service en controleer of deze in running
toestand met show iox-service
geprivilegieerde EXEC-opdracht:
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. Installeer de iPerf-toepassing vanaf SSD en controleer of deze is geïmplementeerd:
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-toepassing activeren en starten:
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
Opmerking: zodra iPerf is ingeschakeld running
staat, het draait als een server standaard.
Verificatie
Om de toepassingsgegevens te controleren, kunt u show app-hosting utilization appid [app-name]
geprivilegieerde EXEC-opdracht:
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 :
Om het gebruik van de applicatie te controleren, kunt u show app-hosting utilization appid [app-name]
geprivilegieerde EXEC-opdracht:
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
Om de details in de toepassingscontainer te verifiëren, kunt u app-hosting connect appid [app-name] session
geprivilegieerde EXEC-opdracht:
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 / $
Bandbreedtetests
Netwerkdiagram
De methoden om bandbreedtetests uit te voeren die in dit document worden uitgelegd, zijn gebaseerd op het onderstaande netwerkdiagram:
Opmerking: Configuratievoorbeelden van iPerf-installatie zijn afkomstig uit dezelfde laboratoriumomgeving.
IP-adrestoewijzing voor bovenstaande apparaten:
C930-AC1 switch |
C930-AC2 switch |
SVI 192.168.10.11 Perf 192.168.10.21 |
SVI 192.168.10.12 Perf 192.168.10.22 |
Opmerking: alle apparaten die in deze voorbeelden worden gebruikt, bevinden zich in hetzelfde VLAN-domein, VLAN 10.
Methode 1: Switch als client
In dit voorbeeld wordt de bandbreedte van C9300-AC1 tot C9300-AC2 gemeten. C930-AC1 is de client.
1. Uitvoeren, opdracht app-hosting connect appid iPerf session
om de prompt van de toepassingscontainer in te voeren:
C9300-AC1#app-hosting connect appid iPerf session
/ $
2. Zodra u in de toepassingscontainer-prompt bent, gebruik iperf3 -c
bevel om de bandbreedtetest te beginnen:
/ $ 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. Nadat de test is beëindigd, typt u exit
om terug te keren naar switch CLI.
Opmerking: omdat iPerf standaard als server draait, is er geen verdere opdracht aan de serverkant nodig.
Methode 2: PC als client
In dit voorbeeld wordt de bandbreedte van Host-A naar C9300-AC2 (Perf-server) gemeten.
- Zorg ervoor dat u iPerf hebt gedownload op uw PC.
- Zodra u iPerf hebt opgeslagen in uw PC, navigeer naar iperf3.exe van uw opdrachtprompt:
C:\Users\user\Downloads\iperf-3.1.3-win64\iperf-3.1.3-win64>iperf3.exe
3. Van uw PC gebruik -c optie. Dit geeft aan dat de pc de client is:
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.
Tip: voor de traditionele methode moet je 2 PC's gebruiken, een als server en een als client. Voor een PC die als server fungeert, gebruikt u iperf3.exe -s
uit.
Gerelateerde informatie