• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 关于我们

21-网络管理与监控命令参考

目录

06-iPerf命令

本章节下载 06-iPerf命令  (188.51 KB)

06-iPerf命令


1 iPerf

1.1  iPerf配置命令

1.1.1  iperf

iperf命令用来测试设备到iPerf服务器的网络带宽。

【命令】

iperf [ ipv6 ][ host host [ port port-number ] ] [ interface interface-type interface-number | vpn-instance vpn-instance-name ] *

【视图】

用户视图

【缺省用户角色】

network-admin

【参数】

ipv6:表示在IPv6网络中,测试设备到iPerf服务器的网络带宽。不指定该参数时,表示在IPv4网络中,测试设备到iPerf服务器的网络带宽。

host host:iPerf服务器的IP地址或主机名。其中,主机名为1~253个字符的字符串,不区分大小写,字符串仅可包含字母、数字、“-”、“_”或“.”。不指定该参数时,表示使用缺省iPerf服务器。

port port-number:iPerf服务器提供iPerf服务的端口号,取值范围为1~65535,缺省值为5201。该参数需要和iPerf服务器上的配置一致,否则,会导致测试失败。

interface interface-type interface-number:指定发送iPerf报文的接口的类型和编号。不指定该参数时,将根据目的IP查找路由表或者转发表来确定发送iPerf报文的接口。

vpn-instance vpn-instance-name:指定iPerf服务器所属的VPN实例。vpn-instance-name表示MPLS L3VPN的VPN实例名称,为1~31个字符的字符串,区分大小写。如果未指定本参数,则表示iPerf服务器位于公网中。

【使用指导】

应用场景

本命令用来测试设备到iPerf服务器的网络带宽,以协助用户判断网络带宽是否满足业务要求。

工作机制

配置本命令后,设备会和iPerf服务器建立TCP连接,以1秒为周期测试1秒内的平均带宽,连续测试10次,并显示这10次测试中每次测试出方向发送的字节数以及平均带宽、10秒出方向的平均带宽和入方向的平均带宽。

如果不指定iPerf服务器地址或主机名,设备会使用缺省iPerf服务器进行网络带宽测试。设备先对这些缺省iPerf服务器执行ping操作,并优先选择跳数最小的缺省iPerf服务器进行网络带宽测试。如果对选中的缺省iPerf服务器测试失败,设备会从缺省iPerf服务器列表中选择其他服务器进行测试,直到测试成功或者尝试所有服务器测试失败。

设备支持的缺省iPerf服务器为世界上开放使用的公共iPerf服务器,其信息如下(含区域划分、域名和服务端口号范围):

·     亚洲区域的iPerf服务器:

¡     iperf.biznetnetworks.com,端口号范围为5201~5203。

¡     speedtest.uztelecom.uz,端口号范围为5200~5209。

·     美洲区域的iPerf服务器:iperf.he.net,端口号为5201。

·     欧洲区域的iPerf服务器:

¡     ping.online.net,端口号范围为5200~5209。

¡     iperf.astra.in.ua,端口号范围为5201~5206。

·     大洋洲区域的iPerf服务器:speedtest-iperf-akl.vetta.online,端口号范围为5200~5209。

注意事项

指定的iPerf服务器需要支持iPerf协议,否则,会导致测试失败。

如果要使用服务器的主机名执行iPerf测试,事先必须在设备上配置DNS(Domain Name System,域名系统)功能,否则会iPerf测试失败。

【举例】

# 在IPv4网络中,测试设备到iPerf服务器10.1.1.2的网络带宽,iPerf服务器位于VPN实例vpn1中。

<Sysname> iperf host 10.1.1.2 vpn-instance vpn1

Press CTRL_C to break

Connecting to host 10.1.1.2, port 5201

Local 10.1.1.1 port 64065 connected to 10.1.1.2 port 5201

Interval(sec)   Transfer      Bitrate

 0.00-1.00      12.6 MBytes    106 Mbps

 1.00-2.00      16.1 MBytes    135 Mbps

 2.00-3.00      11.6 MBytes   97.0 Mbps

 3.00-4.00       8.92 MBytes  74.8 Mbps

 4.00-5.00      11.4 MBytes   95.8 Mbps

 5.00-6.00      13.7 MBytes    115 Mbps

 6.00-7.00       9.32 MBytes  78.2 Mbps

 7.00-8.00      13.6 MBytes    114 Mbps

 8.00-9.00      11.5 MBytes   96.2 Mbps

 9.00-10.00     11.4 MBytes   95.5 Mbps

Summary:

Interval(sec)    Transfer      Bitrate       Direction

 0.00-10.00       120 MBytes    101 Mbps     Outbound

 0.00-10.00       120 MBytes    101 Mbps     Inbound

# 在IPv4网络中,测试到缺省iPerf服务器的网络带宽。

<Sysname> iperf vpn-instance vpn1

Press CTRL_C to break

Selecting the best server based on ping...

Trying to start a bandwidth test with server speedtest.uztelecom.uz on port 5200...

Failed to run iperf client: error - unable to connect to server: Connection refused

Trying to start a bandwidth test with server speedtest.uztelecom.uz on port 5201...

Connecting to host 10.1.1.2, port 5201

Local 10.1.1.1 port 64070 connected to 10.1.1.2 port 5201

Interval(sec)   Transfer      Bitrate

 0.00-1.00      12.8 MBytes    108 Mbps

 1.00-2.00      14.7 MBytes    123 Mbps

 2.00-3.00      12.0 MBytes    101 Mbps

 3.00-4.00      10.6 MBytes   88.6 Mbps

 4.00-5.00      12.3 MBytes    103 Mbps

 5.00-6.00      10.8 MBytes   90.3 Mbps

 6.00-7.00      12.0 MBytes    101 Mbps

 7.00-8.00       9.83 MBytes   82.4 Mbps

 8.00-9.00      10.9 MBytes   91.8 Mbps

 9.00-10.00     13.4 MBytes    113 Mbps

Summary:

Interval(sec)   Transfer      Bitrate       Direction

 0.00-10.00      119 MBytes    100 Mbps     Outbound

 0.00-10.00      119 MBytes    100 Mbps     Inbound

表1-1 iperf命令显示信息描述表

字段

描述

Press CTRL_C to break

按组合键Ctrl+C可以终止iPerf测试

Selecting best server based on ping...

对设备缺省携带的公共iPerf服务器列表执行ping操作,并优先选择跳数小的公共iPerf服务器

Trying to start a bandwidth test with server speedtest.uztelecom.uz on port 5200...

尝试对选中的公共iPerf服务器进行网络带宽测试

Connecting to host 10.1.1.2, port 5201

网络带宽测试连接的服务器地址为10.1.1.2,iPerf服务器端口号为5201。

Local 10.1.1.1 port 64065 connected to 10.1.1.2 port 5201

网络带宽测试连接建立,客户端与服务器的地址和端口号信息。

Interval

测试周期的起始时间和结束时间。

Transfer

传输的报文字节数,单位为:Bytes、KBytes、MBytes、GBytes、Tbytes,设备会根据测试结果的数量级自动修改单位

Bitrate

传输的报文速率,单位为:bps、Kbps、Mbps、Gbps、Tbps,设备会根据测试结果的数量级自动修改单位

Direction

统计的报文收发方向:

·     Outbound:发送方向

·     Inbound:接收方向

Summary

测试周期的汇总信息

 

# 在IPv6网络中,测试设备到iPerf服务器10:1::1:2的网络带宽。

<Sysname> iperf ipv6 host 10:1::1:2 vpn-instance vpn1

Press CTRL_C to break

Connecting to host 10:1::1:2, port 5201

Local 10:1::1:1 port 64065 connected to 10:1::1:2 port 5201

Interval(sec)   Transfer      Bitrate

 0.00-1.00      12.6 MBytes    106 Mbps

 1.00-2.00      16.1 MBytes    135 Mbps

 2.00-3.00      11.6 MBytes   97.0 Mbps

 3.00-4.00       8.92 MBytes  74.8 Mbps

 4.00-5.00      11.4 MBytes   95.8 Mbps

 5.00-6.00      13.7 MBytes    115 Mbps

 6.00-7.00       9.32 MBytes  78.2 Mbps

 7.00-8.00      13.6 MBytes    114 Mbps

 8.00-9.00      11.5 MBytes   96.2 Mbps

 9.00-10.00     11.4 MBytes   95.5 Mbps

Summary:

Interval(sec)   Transfer      Bitrate       Direction

 0.00-10.00      120 MBytes    101 Mbps     Outbound

 0.00-10.00      120 MBytes    101 Mbps     Inbound

# 在IPv6网络中,测试设备到缺省iPerf服务器的网络带宽。

<Sysname> iperf ipv6 vpn-instance vpn1

Press CTRL_C to break

Selecting the best server based on ping...

Trying to start a bandwidth test with server speedtest.uztelecom.uz on port 5200...

Failed to run iperf client: error - unable to connect to server: Connection refused

Trying to start a bandwidth test with server speedtest.uztelecom.uz on port 5201...

Connecting to host 10:1::1:2, port 5201

Local 10:1::1:1 port 64070 connected to 10:1::1:2 port 5201

Interval(sec)   Transfer      Bitrate

 0.00-1.00      12.8 MBytes    108 Mbps

 1.00-2.00      14.7 MBytes    123 Mbps

 2.00-3.00      12.0 MBytes    101 Mbps

 3.00-4.00      10.6 MBytes   88.6 Mbps

 4.00-5.00      12.3 MBytes    103 Mbps

 5.00-6.00      10.8 MBytes   90.3 Mbps

 6.00-7.00      12.0 MBytes    101 Mbps

 7.00-8.00       9.83 MBytes  82.4 Mbps

 8.00-9.00      10.9 MBytes   91.8 Mbps

 9.00-10.00     13.4 MBytes    113 Mbps

Summary:

Interval(sec)   Transfer      Bitrate       Direction

 0.00-10.00      119 MBytes    100 Mbps     Outbound

 0.00-10.00      119 MBytes    100 Mbps     Inbound

表1-2 iperf ipv6命令显示信息描述表

字段

描述

Press CTRL_C to break

按组合键Ctrl+C可以终止iPerf测试

Selecting best server based on ping...

对设备缺省携带的公共iPerf服务器列表执行ping操作,并优先选择跳数小的公共iPerf服务器

Trying to start a bandwidth test with server speedtest.uztelecom.uz on port 5200...

尝试对选中的公共iPerf服务器进行网络带宽测试

Connecting to host 10:1::1:2, port 5201

网络带宽测试连接的服务器地址为10:1::1:2,iPerf服务器端口号为5201

Local 10:1::1:1 port 64065 connected to 10:1::1:2 port 5201

网络带宽测试连接建立,客户端与服务器的地址和端口号信息

Interval

测试周期的起始时间和结束时间

Transfer

传输的报文字节数,单位为:Bytes、KBytes、MBytes、GBytes、Tbytes,设备会根据测试结果的数量级自动修改单位

Bitrate

传输的报文速率,单位为:bps、Kbps、Mbps、Gbps、Tbps,设备会根据测试结果的数量级自动修改单位

Direction

统计的报文收发方向:

·     Outbound:发送方向

·     Inbound:接收方向

Summary

测试周期的汇总信息

 

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们