• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

H3C WX3000系列有线无线一体化交换机交换引擎 命令手册-6PW103

33-HWPing命令

本章节下载 33-HWPing命令  (253.95 KB)

docurl=/cn/Service/Document_Software/Document_Center/Wlan/WX/H3C_WX3000/Command/Command_Manual/H3C_WX3000_CM-6PW103/200907/643036_30005_0.htm

33-HWPing命令


1 HWPing命令

1.1  HWPing客户端命令

1.1.1  count

【命令】

count times

undo count

【视图】

HWPing测试组视图

【参数】

times:一次测试进行探测的次数。取值范围为1~15。

【描述】

count命令用来配置一次测试进行探测的次数。undo count命令用来恢复缺省情况。

在进行除Jitter以外的测试时,一次探测只发送一个测试报文。Jitter测试中一次探测发送的测试报文个数可以通过jitter-packetnum进行设置。

缺省情况下,探测的次数为1。

相关配置可参考命令frequency

【举例】

# 设置ICMP测试一次测试包含10次探测。

<device> system-view

System View: return to User View with Ctrl+Z

[device] hwping administrator icmp

[device-hwping-administrator-icmp] test-type icmp

[device-hwping-administrator-icmp] count 10

1.1.2  datasize

【命令】

datasize size

undo datasize

【视图】

HWPing测试组视图

【参数】

size:测试报文的大小,单位为字节,取值范围与测试类型有关:

表1-1 HWPing发送的测试报文的取值范围

测试类型

取值范围

缺省值

Jitter

68~8100

68

ICMP

4~8100

56

Udpprivate

4~8100

100

Udppublic

4~8100

100

 

只有ICMP、UDP和jitter测试支持配置报文的大小,此配置对于其它测试类型无效。

【描述】

datasize命令用来配置测试操作所用的数据报文的大小。undo datasize命令用来恢复缺省情况。

【举例】

# 设置ICMP测试数据报文的大小为50字节。

<device> system-view

System View: return to User View with Ctrl+Z

[device] hwping administrator icmp

[device-hwping-administrator-icmp] test-type icmp

[device-hwping-administrator-icmp] datasize 50

1.1.3  destination-ip

【命令】

destination-ip ip-address

undo destination-ip

【视图】

HWPing测试组视图

【参数】

ip-address:测试操作的目的地址。

【描述】

destination-ip命令用来配置测试操作的目的地址。undo destination-ip命令用来删除已配置的目的地址。

缺省情况下,未配置测试操作的目的地址。

相关配置可参考命令destination-port

当进行HTTP测试时,目的地址可以设置为IP地址和主机名两种形式,如果是其它类型的测试,只能设置为IP地址形式。

 

【举例】

# 设置ICMP测试的目的IP地址为169.254.10.3。

<device> system-view

System View: return to User View with Ctrl+Z

[device] hwping administrator icmp

[device-hwping-administrator-icmp] test-type icmp

[device-hwping-administrator-icmp] destination-ip 169.254.10.3

1.1.4  destination-port

【命令】

destination-port port-number

undo destination-port

【视图】

HWPing测试组视图

【参数】

port-number:测试操作的目的端口,取值范围为1~50000。

【描述】

destination-port命令用来配置测试操作的目的端口。undo destination-port 用来删除已配置的目的端口。

缺省情况下,未配置测试操作的目的端口。

相关配置可参考命令destination-ip

l    destination-port命令仅对Jitter、TCP-Private和UDP-Private测试有效。

l    建议不要对1~1023之间的端口(知名端口)进行TCP、UDP和Jitter测试,否则可能导致HWPing探测失败或该知名端口对应的服务不可用。

 

【举例】

# 设置tcpprivate测试的目的端口为9000

<device> system-view

System View: return to User View with Ctrl+Z

[device] hwping administrator tcp

[device-hwping-administrator-tcp] test-type tcpprivate

[device-hwping-administrator-tcp] destination-port 9000

1.1.5  display hwping

【命令】

display hwping { results | history } [ administrator-name operation-tag ]

【视图】

任意视图

【参数】

results:显示最近一次测试的结果。

history:显示测试的历史记录。

administrator-name:指定创建操作的管理员名字,取值范围为1~32个字符的字符串。

operation-tag:指定测试操作的标签,取值范围为1~32个字符的字符串。

【描述】

display hwping命令用来显示测试操作的结果。

如果不指定测试组参数(administrator-nametest-operation-tag),将显示所有测试组的信息,否则只显示指定测试组操作信息。

相关配置可参考命令test-enable

【举例】

# 查看管理员名称为administrator,标签为icmp的测试组的结果。

[device-hwping-administrator-icmp] display hwping results administrator icmp

  HWPing entry(admin administrator, tag icmp) test result:

      Destinationip address:10.2.2.2

      Send operation times: 10             Receive response times: 10

      Min/Max/Average Round Trip Time: 1/2/1

      Square-Sum of Round Trip Time: 13

      Last succeeded test time: 2004-11-25 16:28:55.0

    Extend result:

      SD Maximal delay: 0                  DS Maximal delay: 0

      Packet lost in test: 0%

      Disconnect operation number:0        Operation timeout number:0

      System busy operation number:0       Connection fail number:0

      Operation sequence errors:0          Drop operation number:0

      Other operation errors:0

表1-2 display hwping results命令输出信息描述

主要字段

描述

Destion ip address

目的IP地址

Send operation times

发送探测次数

Receive respondse times

成功探测次数

Min/Max/Average Round Trip Time

最小/最大/平均往返时间

Square-Sum of Round Trip Time

往返时间平方和

Last succeeded test time

上次成功测试完成的时间

SD Maximal delay

源到目的最大时延

DS Maximal delay

目的到源的最大时延

Packet lost in test

测试的报文丢失率

Disconnect operation number

对方强制断开连接的次数

System busy operation number

因系统忙测试失败的次数

Operation sequence errors

收到的失序报文数

Other operation errors

其它错误数

Operation timeout number

测试过程中超时的次数

Connection fail number

和对方建立连接失败的次数

Drop operation number

分配系统资源失败的次数

 

# 查看历史记录。

[device-hwping-administrator-icmp] display hwping history administrator icmp

  HWPing entry(admin administrator, tag icmp) history record:

    Index     Response    Status      LasrRC      Time

        1            1         1           0    2004-11-25 16:28:55.0

        2            1         1           0    2004-11-25 16:28:55.0

        3            1         1           0    2004-11-25 16:28:55.0

        4            1         1           0    2004-11-25 16:28:55.0

        5            1         1           0    2004-11-25 16:28:55.0

        6            2         1           0    2004-11-25 16:28:55.0

        7            1         1           0    2004-11-25 16:28:55.0

        8            1         1           0    2004-11-25 16:28:55.0

        9            1         1           0    2004-11-25 16:28:55.9

       10            1         1           0    2004-11-25 16:28:55.9

表1-3 display hwping history命令输出信息描述

主要字段

描述

Response

往返测试毫秒级时间,或超时时间,当不能完成测试时为0

Status

测试结果值,具体含义如下:

1:responseReceived,接收到响应报文

2:unknown,未知错误

3:internalError,内部错误

4:requestTimedOut,响应超时

5:unknownDestinationAddress,目的地址未知

6:noRouteToTarget,没有去往目的地址的路由

7:interfaceInactiveToTarget,去往目的地址的接口没有激活

8:arpFailure,ARP运行失败

9:maxConcurrentLimitReached,达到最大并发接入限制

10:unableToResolveDnsName,不能解析DNS域名

11:invalidHostAddress,无效的主机地址

LasrRC

接收到最后一个基于实现方法的应答编码。在启用ICMP Echo功能的情况下,如果收到包含ICMP_ECHOREPLY(0)的ICMP应答就说明探测成功。ICMP应答通常在包含ip_icmp的文件中定义

Time

测试完成时间

 

# 查看管理员名称为administrator,标签为http的测试组的测试结果。

[device-hwping-administrator-http] display hwping results administrator http

  HWPing entry(admin administrator, tag http) test result:

      Destination ip address:10.2.2.2

      Send operation times: 10              Receive response times: 10

      Min/Max/Average Round Trip Time: 47/87/74

      Square-Sum of Round Trip Time: 57044

      Last succeeded test time: 2000-4-2 20:41:50.4

  Extend result:

      SD Maximal delay: 0                   DS Maximal delay: 0

      Packet lost in test: 0%

      Disconnect operation number: 0        Operation timeout number: 0

      System busy operation number: 0       Connection fail number: 0

      Operation sequence errors: 0          Drop operation number: 0

      Other operation errors: 0

    Http result:

      DNS Resolve Time: 0                  HTTP Operation Time: 675

      DNS Resolve Min Time: 0              HTTP Test Total Time: 748

      DNS Resolve Max Time: 0              HTTP Transmission Successful Times: 10

      DNS Resolve Failed Times: 0          HTTP Transmission Failed Times: 0

      DNS Resolve Timeout Times: 0         HTTP Transmission Timeout Times: 0

      TCP Connect Time: 73                 HTTP Operation Min Time: 27

      TCP Connect Min Time: 5              HTTP Operation Max Time: 80

      TCP Connect Max Time: 20

      TCP Connect Timeout Times: 0                 

表1-4 display hwping results命令输出信息描述

字段

描述

DNS Resolve Time

DNS解析时间

HTTP Operation Time

HTTP操作时间

DNS Resolve Min Time

DNS解析最小时间

HTTP Test Total Time

HTTP测试总时间

DNS Resolve Max Time

DNS解析最大时间

HTTP Transmission Successful Times

HTTP传输成功次数

DNS Resolve Failed Times

DNS解析失败次数

HTTP Transmission Failed Times

HTTP传输失败次数

DNS Resolve Timeout Times

DNS解析超时次数

HTTP Transmission Timeout Times

HTTP传输超时次数

TCP Connect Time:

TCP连接时间

HTTP Operation Min Time

HTTP操作最小时间

TCP Connect Min Time

TCP连接最小时间

HTTP Operation Max Time

HTTP操作最大时间

TCP Connect Max Time:

TCP连接最大时间

TCP Connect Timeout Times

TCP连接超时次数

 

# 查看管理员名称为administrator,标签为Jitter的测试组的测试结果。

[device-hwping-administrator-Jitter] display hwping results administrator Jitter

HWPing entry(admin administrator, tag Jitter) test result:

      Destination ip address:10.2.2.2

      Send operation times: 100             Receive response times: 100

      Min/Max/Average Round Trip Time: 9/21/13

      Square-Sum of Round Trip Time: 18623

      Last succeeded test time: 2000-4-2 8:14:58.2

  Extend result:

      SD Maximal delay: 10                  DS Maximal delay: 10

      Packet lost in test: 0%

      Disconnect operation number: 0        Operation timeout number: 0

      System busy operation number: 0       Connection fail number: 0

      Operation sequence errors: 0          Drop operation number: 0

      Other operation errors: 0

    Jitter result:

      RTT Number:100

      Min Positive SD:1                    Min Positive DS:1

      Max Positive SD:6                    Max Positive DS:8

      Positive SD Number:38                Positive DS Number:25

      Positive SD Sum:85                   Positive DS Sum:42

      Positive SD average:2                Positive DS average:1

      Positive SD Square Sum:267           Positive DS Square Sum:162

      Min Negative SD:1                    Min Negative DS:1

      Max Negative SD:6                    Max Negative DS:8

      Negative SD Number:30                Negative DS Number:24

      Negative SD Sum:64                   Negative DS Sum: 41

      Negative SD average:2                Negative DS average:1

      Negative SD Square Sum:200           Negative DS Square Sum:161

      SD lost packets number:0             DS lost packet number:0

      Unkown result lost packet number:0           

表1-5 display hwping results命令输出信息描述

字段

描述

RTT Number

收到的响应报文数

Min Positive SD

源到目的方向抖动时延为正值的最小值

Min Positive DS

目的到源方向抖动时延为正值的最小值

Max Positive SD

源到目的方向抖动时延为正值的最大值

Max Positive DS

目的到源方向抖动时延为正值的最大值

Positive SD Number

源到目的方向抖动时延为正值的数目

Positive DS Number

目的到源方向抖动时延为正值的数目

Positive SD Sum

源到目的方向抖动时延为正值的和

Positive DS Sum

目的到源方向抖动时延为正值的和

Positive SD average

源到目的方向抖动时延为正值的平均值

Positive DS average

目的到源方向抖动时延为正值的平均值

Positive SD Square Sum

源到目的方向抖动时延为正值的平方和

Positive DS Square Sum

目的到源方向抖动时延为正值的平方和

Min Negative SD

源到目的方向抖动时延为负值的最小绝对值

Min Negative DS

目的到源方向抖动时延为负值的最小绝对值

Max Negative SD

源到目的方向抖动时延为负值的最大绝对值

Max Negative DS

目的到源方向抖动时延为负值的最大绝对值

Negative SD Number

源到目的方向抖动时延为负值的数目

Negative DS Number

目的到源方向抖动时延为负值的数目

Negative SD Sum

源到目的方向抖动时延为负值的绝对值和

Negative DS Sum

目的到源方向抖动时延为负值的绝对值和

Negative SD average

源到目的方向抖动时延为负值的平均值

Negative DS average

目的到源方向抖动时延为负值的平均值

Negative SD Square Sum

源到目的方向抖动时延为负值的平方和

Negative DS Square Sum

目的到源方向抖动时延为负值的平方和

SD lost packets number

源到目的方向丢失的报文个数

DS lost packet number

目的到源方向丢失的报文个数

Unknown result lost packet number

不能确定原因丢失的报文个数

 

# 查看管理员名称为administrator,标签为dns的测试组的测试结果。

[device] display hwping results administrator dns

HWPing entry(admin administrator, tag dns) test result:

      Destination ip address:10.2.2.2

      Send operation times: 10              Receive response times: 10

      Min/Max/Average Round Trip Time: 6/10/8

      Square-Sum of Round Trip Time: 756

      Last succeeded test time: 2006-11-28 11:50:40.9

  Extend result:

      SD Maximal delay: 0                   DS Maximal delay: 0

      Packet lost in test: 0%

      Disconnect operation number: 0        Operation timeout number: 0

      System busy operation number: 0       Connection fail number: 0

      Operation sequence errors: 0          Drop operation number: 0

      Other operation errors: 0

    Dns result:

      DNS Resolve Current Time: 10         DNS Resolve Min Time: 6

      DNS Resolve Times: 10                DNS Resolve Max Time: 10

      DNS Resolve Timeout Times: 0         DNS Resolve Failed Times: 0

表1-6 display hwping results命令输出信息描述

字段

描述

DNS Resolve Current Time

DNS解析默认时间

DNS Resolve Min Time

DNS解析最小时间

DNS Resolve Times

DNS解析次数

DNS Resolve Max Time

DNS解析最大时间

DNS Resolve Timeout Times

DNS解析超时次数

DNS Resolve Failed Times

DNS解析失败次数

 

在使用display命令查看测试结果的输出信息时,不同的测试类型的测试结果输出信息可能包含相同的“字段”,相同字段的“描述”相同,故在此处并未对所有测试类型的测试结果输出信息进行解释。

 

1.1.6  dns-server

【命令】

dns-server ip-address

undo dns-server

【视图】

HWPing测试组视图

【参数】

ip-address:指定的域名解析服务器的IP地址。

【描述】

dns-server命令用来设置域名解析服务器的IP地址。undo dns-server命令用来取消域名解析服务器的IP地址。

缺省情况下,未设置域名解析服务器的IP地址。

l    该命令仅对DNS测试和HTTP测试适用。

l    在进行HTTP测试时,如果指定目的地址为主机名称,则必须配置DNS服务器的IP地址,该DNS服务器用于将主机名称解析为IP地址,解析出的IP地址将作为本次测试的目的IP地址。

 

【举例】

# 配置DNS测试中域名解析服务器的IP地址为192.168.1.1

<device> system-view

System View: return to User View with Ctrl+Z

[device] hwping administrator dns

[device-hwping-administrator-dns] test-type dns

[device-hwping-administrator-dns] dns-server 192.168.1.1

1.1.7  dns resolve-target

【命令】

dns resolve-target domain-name

undo dns resolve-target

【视图】

HWPing测试组视图

【参数】

domain-name:域名。取值范围为1~60个字符。

【描述】

dns resolve-target命令用来设置dns测试要解析的域名。undo resolve-target命令用来取消要解析的域名。

缺省情况下,未设置dns resolve-target信息。

该命令仅对DNS测试适用。

 

【举例】

# 配置要解析的域名为www.test.com

<device> system-view

System View: return to User View with Ctrl+Z

[device] hwping administrator dns

[device-hwping-administrator-dns] test-type dns

[device-hwping-administrator-dns] dns resolve-target www.test.com

1.1.8  filename

【命令】

filename file-name

undo filename

【视图】

HWPing测试组视图

【参数】

file-name:和FTP服务器之间待传送文件的文件名,为1~230个字符的字符串。

【描述】

filename命令用来配置和FTP服务器之间待传送文件的文件名。undo filename命令取消已配置的文件名。

缺省情况下,未配置和FTP服务器之间待传送文件的文件名。

相关配置可参考命令usernamepasswordftp-operation

该命令仅对FTP测试适用。

 

【举例】

# 配置在FTP测试中HWPing客户端和FTP服务器之间要传送文件的文件名为“config.txt”

<device> system-view

System View: return to User View with Ctrl+Z

[device] hwping administrator ftp

[device-hwping-administrator-ftp] test-type ftp

[device-hwping-administrator-ftp] filename config.txt

1.1.9  frequency

【命令】

frequency interval

undo frequency

【视图】

HWPing测试组视图

【参数】

interval:自动测试的时间间隔,以秒为单位,取值范围为0~65535,单位为秒。

【描述】

frequency命令用来配置自动测试的时间间隔。undo frequency命令用来恢复缺省情况。

配置自动测试的间隔时间大于0时,系统会自动的每隔这个时间就进行一次测试。

缺省情况下,自动测试的时间间隔为0,即不进行自动测试。

相关配置可参考命令count

该命令对DHCP测试无效。

 

【举例】

# 设置ICMP测试中自动测试的时间间隔为10秒。

<device> system-view

System View: return to User View with Ctrl+Z

[device] hwping administrator icmp

[device-hwping-administrator-icmp] test-type icmp

[device-hwping-administrator-icmp] frequency 10

1.1.10  ftp-operation

【命令】

ftp-operation { get | put }

【视图】

HWPing测试组视图

【参数】

get:从FTP服务器获取文件。

put:向FTP服务器传送文件。

【描述】

ftp-operation命令用来配置FTP的操作方式。

缺省情况下的操作方式为get

相关配置可参考命令usernamepassword

该命令仅对FTP测试适用。

 

【举例】

# 配置FTP测试中FTP的操作方式为put

<device> system-view

System View: return to User View with Ctrl+Z

[device] hwping administrator ftp

[device-hwping-administrator-ftp] test-type ftp

[device-hwping-administrator-ftp] ftp-operation put

1.1.11  history-records

【命令】

history-records number

undo history-records

【视图】

HWPing测试组视图

【参数】

number:一个测试组中能够保存的历史记录的最大数目,取值范围为0~50,缺省值为50。

【描述】

history-records命令用来配置在一个测试组中能够保存的历史记录的最大数目,undo history-records命令用来恢复缺省情况。

缺省情况下,一个测试组中保存的历史记录的最大数目为50。

【举例】

# 配置保存历史记录的最大数目为10

<device> system-view

System View: return to User View with Ctrl+Z

[device] hwping administrator icmp

[device-hwping-administrator-icmp] test-type icmp

[device-hwping-administrator-icmp] history-records 10

1.1.12  http-operation

【命令】

http-operation { get | post }

【视图】

HWPing测试组视图

【参数】

get:从HTTP服务器获取数据。

post:向HTTP服务器传送数据。

【描述】

http-operation命令用来配置HTTP的操作方式。

缺省情况下的操作方式为get

该命令仅对HTTP测试适用。

 

【举例】

# 配置在HTTP测试中HTTP的操作方式为post

<device> system-view

System View: return to User View with Ctrl+Z

[device] hwping administrator http

[device-hwping-administrator-http] test-type http

[device-hwping-administrator-http] http-operation post

1.1.13  hwping

【命令】

hwping administrator-name operation-tag

undo hwping administrator-name operation-tag

【视图】

系统视图

【参数】

administrator-name:指定创建操作的管理员名字,取值范围为1~32个字符的字符串。

operation-tag:指定测试操作的标签,取值范围为1~32个字符的字符串。

【描述】

hwping 命令用来创建一个HWPing测试组,并进入HWPing测试组视图。如果测试组已经存在,则直接进入该测试组视图。undo HWPing命令用来删除指定测试组。

【举例】

# 创建一个管理员名为administrator,测试操作标签为ICMP的HWPing测试组。

<device> system-view

System View: return to User View with Ctrl+Z

[device] hwping administrator icmp

[device-hwping-administrator-icmp]

1.1.14  hwping-agent enable

【命令】

hwping-agent enable

undo hwping-agent enable

【视图】

系统视图

【参数】

【描述】

hwping-agent enable命令用来开启HWPing客户端功能。undo hwping-agent enable命令用来关闭HWPing客户端功能。

缺省情况下,HWPing客户端功能处于关闭状态。

只有开启了HWPing客户端功能,才能进行各类测试操作。

相关配置可参考命令hwping-server enable

【举例】

# 使能HWPing客户端。

<device> system-view

System View: return to User View with Ctrl+Z

[device] hwping-agent enable

1.1.15  jitter-interval

【命令】

jitter-interval interval

undo jitter-interval

【视图】

HWPing测试组视图

【参数】

interval:测试抖动时间时发送测试报文的时间间隔,单位为毫秒。取值范围为10~1000。

【描述】

jitter-interval命令用来配置Jitter测试时发送测试报文的时间间隔。undo jitter-interval用来恢复缺省情况。

缺省情况下,发送测试报文的时间间隔为20毫秒。

相关配置可参考命令jitter-packetnum

该命令仅对Jitter测试适用。

 

【举例】

# 配置Jitter测试中发送测试报文的时间间隔为30毫秒

<device> system-view

System View: return to User View with Ctrl+Z

[device] hwping administrator jitter

[device-hwping-administrator-jitter] test-type jitter

[device-hwping-administrator-jitter] jitter-interval 30

1.1.16  jitter-packetnum

【命令】

jitter-packetnum number

undo jitter-packetnum

【视图】

HWPing测试组视图

【参数】

number:Jitter测试时一次探测发送测试报文的个数。当进行jitter测试时,取值范围是10~1000。

【描述】

jitter-packetnum命令用来配置Jitter测试时一次探测发送测试报文的个数。undo jitter-packetnum命令用来恢复缺省情况。

缺省情况下,jitter测试时一次探测发送测试报文的个数为10。

相关配置可参考命令jitter-interval

该命令仅对Jitter测试适用。

 

【举例】

# 配置jitter测试中一次探测发送测试报文的个数为30

<device> system-view

System View: return to User View with Ctrl+Z

[device] hwping administrator jitter

[device-hwping-administrator-jitter] test-type jitter

[device-hwping-administrator-jitter] jitter-packetnum 30

1.1.17  password

【命令】

password password

undo password

【视图】

HWPing测试组视图

【参数】

password:登录FTP服务器时所需的密码,取值范围为1~32个字符。

【描述】

password命令用来配置登录FTP服务器时所需的密码。undo password命令用来取消已配置的密码。

缺省情况下,未配置登录FTP服务器时客户端需要输入的密码。

相关配置可参考命令usernameftp-operation

l    配置的密码必须和服务器端配置的FTP用户的密码一致,否则将导致FTP测试的失败

l    该命令仅对FTP测试适用。

 

【举例】

# 配置FTP测试中登录FTP服务器的密码为“hwping”

<device> system-view

System View: return to User View with Ctrl+Z

[device] hwping administrator ftp

[device-hwping-administrator-ftp] test-type ftp

[device-hwping-administrator-ftp] password hwping

1.1.18  probe-failtimes

【命令】

probe-failtimes times

undo probe-failtimes

【视图】

HWPing测试组视图

【参数】

times:连续探测失败的次数,取值范围1~15。

【描述】

probe-failtimes命令用来设置HWPing测试连续多少次探测失败之后向外发送Trap信息。undo probe-failtimes 命令用来恢复缺省情况。

缺省情况下,一次测试中探测失败1次,就发送探测失败的Trap消息。

【举例】

# 设置ICMP测试中连续探测失败3次之后发送Trap。

<device> system-view

System View: return to User View with Ctrl+Z

[device] hwping administrator icmp

[device-hwping-administrator-icmp] test-type icmp

[device-hwping-administrator-icmp] probe-failtimes 3

1.1.19  send-trap

【命令】

send-trap { all | { probefailure | testcomplete | testfailure }* }

undo send-trap { all | { probefailure | testcomplete | testfailure }* }

【视图】

HWPing测试组视图

【参数】

probefailure:当探测失败时发送trap。

testcomplete:当测试完成时发送trap。

testfailure:当测试失败时发送trap。

all:上面任何一种情况发生时都发送trap。

【描述】

send-trap命令用来打开Trap开关,输出Trap信息。undo send-trap命令用来关闭Trap开关,即不输出Trap信息。

缺省情况下,不输出Trap信息。

【举例】

# 配置ICMP测试中当测试完成时发送Trap信息。

<device> system-view

System View: return to User View with Ctrl+Z

[device] hwping administrator icmp

[device-hwping-administrator-icmp] test-type icmp

[device-hwping-administrator-icmp] send-trap testcomplete

1.1.20  source-interface

【命令】

source-interface interface-type interface-number

undo source-interface

【视图】

HWPing测试组视图

【参数】

interface-type interface-number:接口类型和接口编号。

【描述】

对于ICMP测试,source-interface用来指定发送请求报文的源接口,ICMP测试将使用此源接口所对应的IP地址作为ICMP测试请求报文的源IP地址;对于DHCP测试,source-interface用来指定进行DHCP探测的接口。对于ICMP测试,undo source-interface命令用来取消已配置的源接口,此源接口所对应的IP地址将不再作为ICMP测试请求报文的源IP地址;对于DHCP测试,undo source-interface用来取消已配置的DHCP探测接口。

缺省情况下,对于ICMP测试,没有配置源接口;对于DHCP测试,没有指定DHCP探测的接口。

l    该命令对于DHCP测试为必选,对于ICMP测试为可选,对于其它测试无效。

l    对于ICMP测试,如果指定的源接口上没有配置IP地址,则测试不能被执行;如果已经通过source-ip命令配置了源IP地址,则source-interface配置无效。

l    该命令指定的接口只能是VLAN接口。

l    该命令指定的接口必须为up状态,否则会导致测试失败。

 

【举例】

# 配置DHCP测试中发送测试报文的源接口为Vlan-interface 1

<device> system-view

System View: return to User View with Ctrl+Z

[device] hwping administrator dhcp

[device-hwping-administrator-dhcp] test-type dhcp

[device-hwping-administrator-dhcp] source-interface Vlan-interface 1

1.1.21  source-ip

【命令】

source-ip ip-address

undo source-ip

【视图】

HWPing测试组视图

【参数】

ip-address:测试的源IP地址。

【描述】

source-ip命令用来配置本次测试的源IP地址。undo source-ip命令取消已配置的源地址。

缺省情况下,使用发送测试报文的接口的IP地址作为源IP地址。

l    该命令对于FTP测试为必选,对于DHCP测试无效,对于其它测试均为可选。

l    该命令指定的源IP地址必须是本设备上接口的IP,且接口为up状态,否则测试将会失败。

 

【举例】

# 配置ICMP测试中本次测试的源IP地址为169.254.10.2

<device> system-view

System View: return to User View with Ctrl+Z

[device] hwping administrator icmp

[device-hwping-administrator-icmp] test-type icmp

[device-hwping-administrator-icmp] source-ip 169.254.10.2

1.1.22  source-port

【命令】

source-port port-number

undo source-port

【视图】

HWPing测试组视图

【参数】

port-number:测试的源端口号,取值范围为1~65535。

【描述】

source-port命令用来配置本次测试的源端口号。undo source-port命令取消已配置的端口号。

该命令对ICMP、DHCP和DNS测试无效。

 

【举例】

# 配置ICMP测试中本次测试的源端口号为8000

<device> system-view

System View: return to User View with Ctrl+Z

[device] hwping administrator icmp

[device-hwping-administrator-icmp] test-type icmp

[device-hwping-administrator-icmp] source-port 8000

1.1.23  test-type

【命令】

test-type type

【视图】

HWPing测试组视图

【参数】

type:测试的类型,可以为以下关键字:

dhcp:DHCP测试。

dns:DNS测试。

ftp:FTP连接测试。

http:HTTP连接测试。

icmp:ICMP测试。

jitter:对UDP报文传输的延时的变化进行分析。

snmpquery:SNMP测试。

tcpprivate:指定端口(非知名端口)的TCP连接测试。

tcppublic:对7号端口的TCP连接测试。

udpprivate:指定端口(非知名端口)的UDP连接测试。

udppublic:对7号端口的UDP连接测试。

缺省的类型为icmp

【描述】

test-type命令用来配置测试的类型。

【举例】

# 设置测试的类型为FTP。

<device> system-view

System View: return to User View with Ctrl+Z

[device] hwping administrator ftp

[device-hwping-administrator-ftp] test-type ftp

1.1.24  test-enable

【命令】

test-enable

undo test-enable

【视图】

HWPing测试组视图

【参数】

【描述】

test-enable命令用来启动HWPing测试。undo test-enable命令用来关闭HWPing测试。

相关配置可参考命令display hwping

执行HWPing测试后不能自动显示测试结果,需要使用display hwping命令来显示测试结果。

 

【举例】

# 在管理员名称为administrator,操作标签为icmp的ICMP测试组中执行HWPing测试。

<device> system-view

System View: return to User View with Ctrl+Z

[device] hwping administrator icmp

[device-hwping-administrator-icmp] test-type icmp

[device-hwping-administrator-icmp] destination-ip 169.254.10.3

[device-hwping-administrator-icmp] test-enable

1.1.25  test-failtimes

【命令】

test-failtimes times

undo test-failtimes

【视图】

HWPing测试组视图

【参数】

times:连续测试失败的次数,取值范围1~15。

【描述】

test-failtimes命令用来设置HWPing测试连续多少次测试失败之后向外发送Trap。undo test-failtimes命令用来恢复连续测试失败的次数的缺省值。

缺省情况下,测试失败1次就发送Trap信息。

【举例】

# 设置ICMP测试连续失败3次后,向网管发送Trap。

<device> system-view

System View: return to User View with Ctrl+Z

[device] hwping administrator icmp

[device-hwping-administrator-icmp] test-type icmp

[device-hwping-administrator-icmp]test-failtimes 3

1.1.26  timeout

【命令】

timeout time

undo timeout

【视图】

HWPing测试组视图

【参数】

time:探测的超时时间,取值范围为1~60,单位为秒。

【描述】

timeout命令用来配置探测的超时时间,即HWPing客户端发送一个测试报文后启动的定时器的值。undo timeout命令用来将超时时间恢复到缺省值。

缺省情况下,探测的超时时间为3秒。

【举例】

# 设置ICMP测试中探测的超时时间为10秒。

<device> system-view

System View: return to User View with Ctrl+Z

[device] hwping administrator icmp

[device-hwping-administrator-icmp] test-type icmp

[device-hwping-administrator-icmp] timeout 10

1.1.27  tos

【命令】

tos value

undo tos

【视图】

HWPing测试组视图

【参数】

value:HWPing测试报文头中的ToS域值,取值范围0~255。

【描述】

tos命令用来配置HWPing测试报文头中的ToS域值。undo tos命令用来取消HWPing测试报文头中的ToS域值。

缺省情况下,未设置tos值

该命令对于DHCP测试无效。

 

【举例】

# 配置ICMP测试中发送的测试报文头的ToS域值为1。

<device> system-view

System View: return to User View with Ctrl+Z

[device] hwping administrator icmp

[device-hwping-administrator-icmp] test-type icmp

[device-hwping-administrator-icmp] tos 1

1.1.28  username

【命令】

username name

undo username

【视图】

HWPing测试组视图

【参数】

name:登录FTP服务器时所需的用户名。取值范围为1~32个字符的字符串。

【描述】

username命令用来配置登录FTP服务器时所需的用户名。undo username命令用来取消已配置的用户名。

缺省情况下,未配置登录FTP服务器时所需的用户名。

相关配置可参考命令passwordftp-operation

l    配置的用户名必须和服务器端配置的用户名一致,否则将导致FTP测试失败。

l    该命令仅对FTP测试适用。

 

【举例】

# 配置FTP测试中登录FTP服务器的用户名为“administrator”

<device> system-view

System View: return to User View with Ctrl+Z

[device] hwping administrator ftp

[device-hwping-administrator-ftp] test-type ftp

[device-hwping-administrator-ftp] username administrator

1.2  HWPing服务器端命令

l    只有在测试类型为Jitter、TCP和UDP时,才需要配置HWPing服务器端。

l    建议HWPing Jitter/UDP/TCP服务器配置不要针对1~1023之间的端口(知名端口),否则可能导致HWPing探测失败或该知名端口对应的服务不可用。

 

1.2.1  hwping-server enable

【命令】

hwping-server enable

undo hwping-server enable

【视图】

系统视图

【参数】

【描述】

hwping-server enable命令用来使能HWPing服务器功能。undo hwping-server enable用来关闭HWPing 服务器功能。

缺省情况下,HWPing 服务器处于关闭状态。

相关配置可参考命令hwping-agent enablehwping-server tcpconnecthwping-server udpconnet

【举例】

# 使能HWPing服务器。

<device> system-view

System View: return to User View with Ctrl+Z

[device] hwping-server enable

1.2.2  hwping-server tcpconnect

【命令】

hwping-server tcpconnect ip-address port-number

undo hwping-server tcpconnect ip-address port-number

【视图】

系统视图

【参数】

ip-address:HWPing服务器TCP监听服务的IP地址。

port-number:HWPing服务器TCP监听服务的端口号。取值1~50000。

【描述】

hwping-server tcpconnect命令用来创建TCP监听服务。undo hwping-server tcpconnect 命令用来删除已建立的TCP监听服务。

当HWPing客户端进行指定端口的TCP连接测试时,如果设备作为HWPing测试的服务器,则必须在服务器上创建TCP监听服务,测试才能完成。

相关配置可参考命令hwping-server enable

对于HWPing服务器TCP监听服务的端口号port-number,某些特殊端口(指被固定了功能不能被随便使用的一些端口,如端口1701)不能配置。

 

【举例】

# 创建IP地址为169.254.10.2,端口号为9000的TCP监听服务。

<device> system-view

System View: return to User View with Ctrl+Z

[device] hwping-server tcpconnect 169.254.10.2 9000

1.2.3  hwping-server udpecho

【命令】

hwping-server udpecho ip-address port-number

undo hwping-server udpecho ip-address port-number

【视图】

系统视图

【参数】

ip-address:HWPing服务器UDP监听服务的IP地址。

port-number:HWPing服务器UDP监听服务的端口号。取值范围为1~49999。

【描述】

hwping-server udpecho命令用来创建HWPing服务器UDP监听服务。undo hwping-server udpecho命令用来删除已建立的HWPing服务器UDP监听服务。

当HWPing客户端进行Jitter测试或指定端口的UDP测试时,如果将本公司设备作为HWPing测试的服务器,则必须在服务器上创建UDP监听服务,测试才能完成。

相关配置可参考命令hwping-server enable

对于HWPing服务器UDP监听服务的端口号port-number,某些特殊端口(指被固定了功能不能被随便使用的一些端口,如端口1701)不能配置。

 

【举例】

# 创建IP地址为10.10.10.2,端口号为9000的UDP监听服务。

<device> system-view

System View: return to User View with Ctrl+Z

[device] hwping-server udpecho 10.10.10.2 9000

 

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

新华三官网
联系我们