Syntax
detect-group
group-number
undo detect-group group-number
View
System view
Parameter
group-number:
Detecting group number ranging from 1 to 25.
Description
Use the detect-group command to
create a detecting group and enter detecting group view.
Use the undo detect-group command to
remove a detecting group.
Example
# Create detecting group 10.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] detect-group 10
[H3C-detect-group-10]
Syntax
detect-list list-number
ip address ip-address [ nexthop ip-address ]
undo detect-list
list-number
View
Detecting group view
Parameter
list-number:
Sequence number of the IP address to be added to the detecting group. This
argument ranges from 1 to 10.
ip address ip-address: Specifies the IP address
(in dotted decimal notation) to be detected.
nexthop ip-address: Specifies the next hop IP address.
Description
Use the detect-list command to add
an IP address to a detecting group. This command also specifies the order in
which the IP addresses in a detecting group are detected.
Use the undo detect-list command to
specify to skip a specified IP address when performing auto detect operations.
When performing auto detect operations, a
switch detects the IP addresses by their list-number values in an
ascending order. Up to 100 IP addresses can be configured in a detecting group.
You can specify how the detecting result is generated using the option
command.
Related command: option.
Example
# Add the IP address of 202.13.1.55 to
detecting group 10, with list-number set to 1, the next hop IP address
set to 1.2.3.4.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] detect-group 10
[H3C-detect-group-10] detect-list 1 ip
address 202.13.1.55 nexthop 1.2.3.4
Syntax
display detect-group [ group-number ]
View
Any view
Parameter
group-number:
Detecting group number ranging from 1 to 25.
Description
Use the display detect-group command
to display the configuration of a specified detecting group or all detecting
groups.
Example
# Display the configuration of detecting
group 1.
<H3C> 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
Table 1-1 Description on the fields of
the display detect-group command
|
Field
|
Description
|
|
detect-group 1
|
Detecting group number 1
|
|
detect loop time(s): 15
|
Detecting interval is 15 seconds.
|
|
ping wait time(s): 2
|
Timeout time of a ping operation is two
seconds.
|
|
detect retry times: 2
|
Number of retries of an auto detect
operation is 2.
|
|
detect ip option: and
|
A detecting group is reachable only when
all the IP addresses contained in it are reachable.
|
|
group state: not detecting
|
Current state of a detecting group is
"not detecting".
|
|
register module num
|
Number of registered modules (that is,
the number of the modules utilizing the detecting group.)
|
|
detect ip number
|
Number of the IP addresses contained in a
detecting group
|
|
detect-list
|
Sequence number of an IP address contained
in a detecting group
|
|
ip address
|
IP address to be detected
|
|
next hop
|
Next hop IP address
|
Syntax
option [ and
| or ]
undo option
View
Detecting group view
Parameter
and:
Specifies the detecting result is reachable only when all the IP
addresses contained in the detecting group are reachable.
or:
Specifies the detecting result is reachable if one of the IP addresses
contained in the detecting group is reachable.
Description
Use the option command to specify the
way to generate detecting results.
Use the undo option command to restore
the default way to generate detecting results.
By default, the and keyword is
specified.
When a detecting operation is being carried
out, the switch detects each IP address contained in the detecting group in an
ascending order by the list-number values of the IP addresses.
l
If you specify the and keyword, the
switch returns unreachable as the detecting result when the switch fails
to ping an IP address contained
in the detecting group and stops detecting.
l
If you specify the or keyword, the switch
returns reachable as the detecting result if the switch succeeds in
pinging an IP address contained in the detecting group and stops detecting.
Example
# Specify the or keyword for
detecting group 10.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] detect-group 10
[H3C-detect-group-10] option or
Syntax
retry retry-times
undo retry
View
Detecting group view
Parameter
retry-times:
Retry times during a detect operation. This argument ranges from 0 to 10 and
defaults to 2.
Description
Use the retry command to set the maximum
retry times during a detect operation.
Use the undo retry command to
restore the default.
Example
# Specify the maximum number of retires to 3
for detecting group 10.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] detect-group 10
[H3C-detect-group-10] retry 3
Syntax
timer loop
seconds
undo timer loop
View
Detecting group view
Parameter
seconds:
Detecting interval. This argument ranges form 1 to 86,400 (in seconds) and
defaults to 15.
Description
Use the timer loop command to
set the detecting interval, that is, the frequency to perform auto detect
operations.
Use the undo timer loop command to
restore the default.
Example
# Set the detecting interval to 60 seconds
for detecting group 10.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] detect-group 10
[H3C-detect-group-10] timer loop 60
Syntax
timer wait seconds
undo timer wait
View
Detecting group view
Parameter
seconds:
Timeout time of detect operations. This argument ranges from 1 to 30 (in
seconds) and defaults to 2.
Description
Use the timer wait command to set
the timeout time for detect operations.
Use the undo timer wait command to
restore the default.
Example
# Set the timeout time to 3 seconds for
detecting group 10.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] detect-group 10
[H3C-detect-group-10] timer wait 3
l
Refer to the Routing Protocol chapter in this
manual for information about static routing.
l
Refer to the VRRP chapter in this manual for
information about VRRP.
Syntax
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 ]
View
System view
Parameter
ip-address:
IP address in dotted decimal notation.
mask: Subnet
mask.
mask-length:
Length of the subnet mask, that is, the number of successive bits in the subnet
mask whose values are 1.
interface-type: Type of the next hop egress interface.
interface-number: Number of the next hop egress interface.
next-hop:
Next hop IP address in dotted decimal notation.
preference-value: Priority of the route. This argument ranges from 1 to 255.
reject:
Specifies the route to be unreachable. If you specify this keyword when
executing this command, any packet destined for the specified IP address is
discarded, and the system informs the source that the destination is
unreachable.
blackhole:
Specifies the route to be a blackhole route. If you specify this keyword when
executing this command, all outbound interfaces of the static route are the
Null 0 interfaces regardless of the next hop. In addition, the system discards
any packet transmitted along this route without informing the source.
group-number:
Detecting group number ranging from 1 to 25.
Description
Use the ip route-static command to
configure a static route, whose validity depends on detecting results as
follows:
l
The route is valid when the detecting result is reachable.
l
The route is invalid when the detecting result
is unreachable.
Use the undo ip route-static command
to remove an existing static route.
Example
# Configure a static route to
192.168.0.5/24 with 192.168.0.2 as the next hop. The route is to be enabled
when the result of detecting group 10 is reachable.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] ip route-static 192.168.0.5 24
192.168.0.2 detect-group 10
Syntax
standby detect-group group-number
undo standby
detect-group
View
VLAN interface view
Parameter
group-number:
Detecting group number ranging from 1 to 25.
Description
Use the standby detect-group command
to enable the VLAN interface backup function by using the auto detect function.
Use the undo standby detect-group
command to disable the VLAN interface backup function.
You can enable VLAN interface backup
function according to auto detecting results in the following ways:
l
Enable the primary interface when the result of the detecting group is reachable.
l
Enable the secondary interface when the result
of the detecting group is unreachable.
l
When the link between the primary VLAN interface
and the destination comes back up, that is, the result of the detecting group
is reachable again, the system enables the primary VLAN interface and
shuts down the secondary.
Example
# Specify to enable VLAN interface 2 when
the result of detecting group 10 is unreachable.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] interface vlan-interface 2
[H3C-Vlan-interface2] standby
detect-group 10
Syntax
vrrp vrid virtual-router-id track detect-group group-number [ reduced
value-reduced ]
undo vrrp
vrid virtual-router-id track detect-group [ group-number
]
View
VLAN interface view
Parameter
virtual-router-id: Virtual router ID ranging from 1 to 255.
group-number:
Detecting group number ranging from 1 to 25.
value-reduced: Value by which the priority is to be reduced. This argument ranges
from 1 to 255 and defaults to 10.
Description
Use the vrrp vrid command to enable the
track function for a VRRP backup group.
Use the undo vrrp vrid command to
disable the track function when employing VRRP.
You can control the priority of a VRRP
backup group according to the result of a detecting group to enable automatic
switch between the primary switch and the secondary switch. That is,
l
Decrease the priority of a backup group when the
result of the detecting group is unreachable.
l
Restore the priority of a backup group when the result of the detecting
group is reachable.
Currently, auto
detect in VRRP is only supported in S3600-EI series switches.
Example
# Create detecting group 10 and specify to
detect the IP address of 202.12.1.55.
<H3C> system-view
System View: return to User View with
Ctrl+Z.
[H3C] detect-group 10
[H3C-detect-group-10] detect-list 1 ip
address 202.12.1.55
[H3C-detect-group-10] quit
# Specify to decrease the priority of
backup group 1 by 20 when the result of detecting group 10 is unreachable.
[H3C] interface vlan-interface 2
[H3C-Vlan-interface2] vrrp vrid 1
track detect-group 10 reduced 20