المقدمة
يصف هذا المستند كيفية إستخدام ميزة iPerf على محولات Catalyst 9000 Series Switches لإجراء إختبارات النطاق الترددي.
المتطلبات الأساسية
المتطلبات
توصي Cisco بأن تكون لديك معرفة بالمواضيع التالية:
- إستضافة التطبيق على محولات Catalyst 9000 Series Switches
- لينكس
المكونات المستخدمة
تستند المعلومات الواردة في هذا المستند إلى إصدارات البرامج والمكونات المادية التالية:
- C9300
- Cisco IOS® XE 17.3.5
- Cisco IOS® XE 17.6.4
ملاحظة: راجع دليل التكوين المناسب للأوامر التي يتم إستخدامها لتمكين هذه الميزات على منصات Cisco الأخرى.
تم إنشاء المعلومات الواردة في هذا المستند من الأجهزة الموجودة في بيئة معملية خاصة. بدأت جميع الأجهزة المُستخدمة في هذا المستند بتكوين ممسوح (افتراضي). إذا كانت شبكتك قيد التشغيل، فتأكد من فهمك للتأثير المحتمل لأي أمر.
المنتجات ذات الصلة
هذا وثيقة يستطيع أيضا كنت استعملت مع هذا جهاز وبرمجية صيغة:
معلومات أساسية
Perf3 هو أداة للقياسات النشطة للحد الأقصى من النطاق الترددي القابل للإنجاز على شبكات IP. تستخدم iPerf القدرات المختلفة لبروتوكول TCP و UDP لتوفير إحصائيات حول النطاق الترددي.
ملاحظة: راجع وثائق Perf الرسمية للحصول على مزيد من المعلومات المتعلقة بهذه الأداة.
الفيديو
تثبيت iPerf
قيود
- إستضافة التطبيقات ليست على دراية بالتوجيه وإعادة التوجيه الظاهري (VRF-aware).
- في الإصدارات السابقة ل Cisco IOS® XE Amsterdam، الإصدار 17.3.3، يتطلب إستضافة التطبيقات تخصيص تخزين مخصص، ويتم تعطيله على ذاكرة Bootflash.
- في الإصدار 17.3.3 من Cisco IOS® XE Amsterdam والإصدارات الأحدث، يتم تمكين إستضافة التطبيقات على ذاكرة التمهيد، ومع ذلك، يتم إستضافة التطبيقات الموقعة من Cisco فقط.
- لا يتم دعم عصا ناقل تسلسلي عالمي (USB) باللوحة الأمامية.
- المحولات Cisco Catalyst 9300 Series Switches تدعم فقط اللوحة الخلفية Cisco-Certified USB.
- لا تدعم المحولات Cisco Catalyst 9500-High Performance Series Switches ومحولات Cisco Catalyst 9600 Series Switches USB باللوحة الأمامية لاستضافة التطبيق.
- لا تدعم المحولات Cisco Catalyst 9500 و 9500-High Performance Series Switches ومحولات Cisco Catalyst 9600 Series Switches واجهات AppGigabitEthernet.
- لا تدعم المحولات Cisco Catalyst 9410R switches إستضافة التطبيقات في الإصدار قبل Cisco IOS® XE Bengaluru 17.5.1.
- قم بتكوين الأمر enable على واجهات AppGigabitEthernet لتمكين إستضافة التطبيقات على محولات Cisco Catalyst 9410R switches.
خطوات التثبيت
- قم بتنزيل أحدث صورة من iPerf وتأكد من تخزينها في محرك أقراص SSD عبر منفذ USB:
C9300-AC1#dir usbflash1:/
Directory of usbflash1:/
12 -rw- 6043136 Jan 26 2023 21:55:35 +00:00 iPerf.tar
2. أختر شبكة VLAN أو قم بتكوين شبكة جديدة لاتصال Perf:
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 وربطه بشبكة 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. قم بتكوين IP الخاص ب SVI الذي إخترته لاتصال iPerf كبوابة افتراضية للتطبيق:
C9300-AC1(config)#app-hosting appid iPerf
C9300-AC1(config-app-hosting)#app-default-gateway 192.168.10.11 guest-int
6. بدء تشغيل خدمة IOx والتحقق من أنها فيrunning
الحالة باستخدام أمر EXEC ذي show iox-service
الامتيازات:
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 من محرك أقراص مزود بذاكرة مصنوعة من مكونات صلبة وتحقق من نشره:
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 :
للتحقق من إستخدام التطبيق، يمكنك إستخدام أمر EXECshow app-hosting utilization appid [app-name]
ذي الامتيازات:
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
للتحقق من التفاصيل في حاوية التطبيق، يمكنك إستخدام أمر EXECapp-hosting connect appid [app-name] session
ذي الامتيازات:
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
Perf 192.168.10.21
|
SVI 192٫168٫10٫12
Perf 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: الكمبيوتر كعميل
في هذا المثال، يتم قياس النطاق الترددي من المضيف-A إلى C9300-AC2 (خادم iPerf).
- تأكد من تنزيل iPerf في الكمبيوتر.
- بمجرد تخزين iPerf في الكمبيوتر، انتقل إلى iPerf3.exe من موجه الأوامر:
C:\Users\user\Downloads\iperf-3.1.3-win64\iperf-3.1.3-win64>iperf3.exe
3. من خيار إستخدام -c على الكمبيوتر الشخصي. وهذا يشير إلى أن الكمبيوتر هو العميل:
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.
تلميح: للطريقة التقليدية، تحتاج إلى إستخدام إثنين من أجهزة الكمبيوتر، واحد كخادم وواحد كعميل. بالنسبة للكمبيوتر الذي يعمل كخادم، أستخدمiperf3.exe -s
الأمر.
معلومات ذات صلة