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

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

05-自动侦测命令

本章节下载 05-自动侦测命令  (124.25 KB)

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

05-自动侦测命令


1 自动侦测配置命令

1.1  自动侦测配置命令

关于静态路由的详细介绍,请参见本手册中有关“路由协议”的部分。

 

1.1.1  detect-group

【命令】

detect-group group-number

undo detect-group group-number

【视图】

系统视图

【参数】

group-number:自动侦测组的编号,取值范围为1~50。

【描述】

detect-group命令用来创建一个自动侦测组,并进入侦测组视图。undo detect-group命令用来删除一个指定的自动侦测组。

当自动侦测组被其他应用所使用时,不能删除该自动侦测组。如果删除自动侦测组,需要首先删除使用该自动侦测组的应用。

 

【举例】

# 创建一个自动侦测组10

<device> system-view

System View: return to User View with Ctrl+Z.

[device] detect-group 10

[device-detect-group-10]

1.1.2  detect-list

【命令】

detect-list list-number ip address ip-address [ nexthop ip-address ]

undo detect-list list-number

【视图】

侦测组视图

【参数】

list-number:侦测地址的序号,取值范围为1~10。

ip address ip-address:指定自动侦测的目的IP地址(点分十进制格式)。

nexthop ip-address:指定自动侦测下一跳的IP地址。

【描述】

detect-list命令用来配置在某一个侦测组中的侦测对象及侦测的先后顺序。undo detect-list命令用来取消配置的侦测对象和顺序。

当需要侦测时,设备就按照侦测的先后顺序,依次对要侦测的IP地址进行侦测。

当配置了多个侦测对象后,可以通过option命令设置各个侦测对象间的逻辑关系。

相关配置可参考option命令。

【举例】

# 在侦测组10中,增加侦测对象202.13.1.55,侦测序号为1。指定1.2.3.4作为下一跳地址。

<device> system-view

System View: return to User View with Ctrl+Z.

[device] detect-group 10

[device-detect-group-10] detect-list 1 ip address 202.13.1.55 nexthop 1.2.3.4

1.1.3  display detect-group

【命令】

display detect-group [ group-number ]

【视图】

任意视图

【参数】

group-number:自动侦测组的编号,取值范围为1~25。

【描述】

display detect-group命令用来显示所有侦测组或指定侦测组的配置信息。

【举例】

# 显示侦测组1的配置信息。

<device> display detect-group 1

detect-group 1 :

 detect loop time(s) : 15

   ping wait time(s) : 2

  detect retry times : 2

    detect ip option : and

         group state : not detecting

 register module num : 0

     detect ip count : 1

detect-list  ip address       next hop

1            202.13.1.55      1.2.3.4

表1-1 display detect-group命令显示信息描述表

字段

描述

detect-group 1

自动侦测组1

detect loop time(s)

自动侦测的循环周期,单位为秒

ping wait time(s)

一次侦测中的超时时间,单位为秒

detect retry times

一次侦测中重试的次数

detect ip option

侦测组中各个侦测对象间的逻辑关系,可以为“and”或“or”

group state

自动侦测组目前的状态

register module num

注册模块数(即侦测组被引用的次数)

detect ip count

自动侦测的IP地址数目

detect-list

侦测对象的序号

ip address

需要侦测的IP地址

next hop

下一跳的IP地址

 

1.1.4  ip route-static detect-group

【命令】

ip route-static ip-address { mask | mask-length } { interface-type interface-number | next-hop } [ preference preference-value ] [ reject | blackhole ] detect-group group-number

undo ip route-static ip-address { mask | mask-length } [ interface-type interface-number | next-hop ] [ preference preference-value ]

【视图】

系统视图

【参数】

ip-address:IP地址(点分十进制格式)。

mask:子网掩码。

mask-length:子网掩码长度,即子网掩码中连续“1”的位数。

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

next-hop:下一跳IP地址(点分十进制格式)。

preference-value:为该路由的优先级别,取值范围1~255。

reject:指明为不可达路由。当到某一目的地的静态路由具有“reject”属性时,任何去往该目的地的IP报文都将被丢弃,并且通知源主机目的地不可达。

blackhole:指明为黑洞路由。当去往某一目的地的静态路由具有“blackhole”属性时,无论配置的下一跳地址是什么,该路由的出接口均为NULL 0接口,任何去往该目的地的IP报文都将被丢弃,并且不通知源主机。

group-number:自动侦测组的编号,取值范围为1~50。

【描述】

ip route-static detect-group命令用来配置一条静态路由,并利用侦测组返回的结果(可达或不可达)控制静态路由是否生效:

l              当侦测组可达时,此静态路由生效;

l              当侦测组不可达时,此静态路由无效。

undo ip route-static命令用来取消所配置的静态路由。

【举例】

# 配置一条到192.168.1.5/24的静态路由,下一跳为192.168.0.2,利用侦测组10的返回结果控制该静态路由是否生效。

<device> system-view

System View: return to User View with Ctrl+Z.

[device] ip route-static 192.168.1.5 24 192.168.0.2 detect-group 10

配置完成后,如果侦测组10可达,则该静态路由生效。如果侦测组10不可达,则该静态路由不生效。

1.1.5  option

【命令】

option [ and | or ]

undo option

【视图】

侦测组视图

【参数】

and:侦测对象之间的关系为“逻辑与”。

or:侦测对象之间的关系为“逻辑或”。

【描述】

option命令用来设置一个侦测组中各个侦测对象间的逻辑关系。undo option命令用来将一个侦测组中各个侦测对象间的逻辑关系恢复为缺省值。

缺省情况下,各个侦测对象之间的逻辑关系为and

进行每轮侦测时,设备将按照指定的顺序,依次侦测各个IP地址是否可达:

l              当侦测对象之间的关系为and时:只有所有的目的IP地址均可达,该侦测组才被认为可达;

l              当侦测对象之间的关系为or时:只要有一个目的IP地址可达,该侦测组即被认为可达,不再侦测其余IP地址。

【举例】

# 设置侦测组10中的三个侦测对象之间的关系为“or”。

<device> system-view

System View: return to User View with Ctrl+Z.

[device] detect-group 10

[device-detect-group-10] detect-list 1 ip address 202.13.1.55 nexthop 1.2.3.4

[device-detect-group-10] detect-list 2 ip address 202.13.1.56 nexthop 1.2.3.4

[device-detect-group-10] detect-list 3 ip address 202.13.1.57 nexthop 1.2.3.4

[device-detect-group-10] option or

配置完成后,侦测组10中的三个侦测对象中,只要有一个目的IP地址可达,系统即认为侦测组10可达。

1.1.6  retry

【命令】

retry retry-times

undo retry

【视图】

侦测组视图

【参数】

retry-times:一次侦测中的最大重试次数,取值范围为0~10,缺省值是2。

【描述】

retry命令用来设置侦测组在一次侦测中的最大重试次数。undo retry命令用来恢复为缺省情况。

缺省情况下,一次侦测中的最大重试次数为2。

【举例】

# 配置侦测组10中,一次侦测中最大的重试次数为3

<device> system-view

System View: return to User View with Ctrl+Z.

[device] detect-group 10

[device-detect-group-10] retry 3

1.1.7  standby detect-group

【命令】

standby detect-group group-number

undo standby detect-group

【视图】

VLAN接口视图

【参数】

group-number:自动侦测组的编号,取值范围为1~50。

【描述】

standby detect-group命令用来配置利用自动侦测实现接口备份的功能。undo standby detect-group命令用来取消配置的接口备份功能。

用户可以利用侦测组返回的结果(可达或不可达)来控制是否启用备份接口:

l              当侦测组可达时,使用主接口;

l              当侦测组不可达时,启用备份接口;

l              当链路恢复正常,侦测组又可达时,关闭备份接口。

【举例】

# 当自动侦测组10不可达时,启用VLAN接口2作为备份口。

<device> system-view

System View: return to User View with Ctrl+Z.

[device] interface vlan-interface 2

[device-Vlan-interface2] standby detect-group 10

配置完成后,如果侦测组10可达,则VLAN接口2处于关闭状态;如果侦测组10不可达,则将启用VLAN接口2作为备份口。

1.1.8  timer loop

【命令】

timer loop interval

undo timer loop

【视图】

侦测组视图

【参数】

interval:自动侦测的循环周期,取值范围为1~86400,单位为秒,缺省值是15。

【描述】

timer loop命令用来设置自动侦测的循环周期,即每隔一定的时间对所有侦测对象进行一次侦测。undo timer loop命令用来将自动侦测的循环周期恢复为缺省值。

缺省情况下,每隔15秒对所有侦测对象进行一次侦测。

【举例】

# 配置侦测组10的侦测循环周期为60秒。

<device> system-view

System View: return to User View with Ctrl+Z.

[device] detect-group 10

[device-detect-group-10] timer loop 60

1.1.9  timer wait

【命令】

timer wait seconds

undo timer wait

【视图】

侦测组视图

【参数】

seconds:一次侦测中的等待ICMP reply报文的超时时间,取值范围为1~30,单位为秒,缺省值是2。

【描述】

timer wait命令用来设置一次侦测中的等待ICMP reply报文的超时时间。undo timer wait命令用来将一次侦测中的超时时间恢复为缺省值。

缺省情况下,一次侦测中的等待ICMP reply报文的超时时间为2秒。

【举例】

# 在侦测组10中,配置一次侦测中的超时时间为3秒。

<device> system-view

System View: return to User View with Ctrl+Z.

[device] detect-group 10

[device-detect-group-10] timer wait 3

 

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

新华三官网
联系我们