l
Refer to the Routing Protocol part of the manual
for information about static routing.
l
Refer to the VRRP part of the manual for
information about VRRP.
Syntax
detect-group
group-number
undo detect-group group-number
View
System view
Parameters
group-number:
Detected group number ranging from 1 to 50.
Description
Use the detect-group command to
create a detected group and enter detected group view.
Use the undo detect-group command to
remove a detected group.
Caution:
When a detected
group is used by applications, the detected group cannot be deleted unless you
delete the applications first.
Examples
# Create detected group 10.
<Sysname> system-view
System View: return to User
View with Ctrl+Z.
[Sysname] detect-group 10
[Sysname-detect-group-10]
Syntax
detect-list list-number
ip address ip-address [ nexthop ip-address ]
undo detect-list
list-number
View
Detected group view
Parameters
list-number:
Sequence number of the IP address to be detected. This argument ranges from 1
to 10.
ip address ip-address: Specifies the destination IP
address (in dotted decimal notation) to be detected.
nexthop
ip-address: Specifies the next hop IP address for
Auto Detect.
Description
Use the detect-list command to add a
detected object to a detected group and specify the detection sequence number
of the detected object.
Use the undo detect-list command to
remove a specified detected object.
When performing Auto Detect, a switch
detects the configured detected objects in the order specified by their sequence
numbers.
If you have configured multiple detected
objects, you can use the option command to set the logical relationships
between the detected objects.
Related commands: option.
Examples
# Add the detected object 202.13.1.55 to
detected group 10, with the detection sequence number set to 1, and the next
hop IP address set to 1.2.3.4.
<Sysname> system-view
System View: return to User
View with Ctrl+Z.
[Sysname] detect-group 10
[Sysname-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
Parameters
group-number:
Detected group number ranging from 1 to 50.
Description
Use the display detect-group command
to display the configuration of the specified detected group or all detected
groups.
Examples
# Display the configuration of detected
group 1.
<Sysname> 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
|
Detected group number 1
|
|
detect loop time(s)
|
Detecting interval, in seconds.
|
|
ping wait time(s)
|
Timeout time of a ping operation, in
seconds.
|
|
detect retry times
|
Number of retries of an auto detect
operation.
|
|
detect ip option
|
The logic relationship between the
detected objects in the detected group. It can be and or or.
|
|
group state
|
Current state of the detected group
|
|
register module num
|
Number of registered modules (that is,
the number of the modules utilizing the detected group.)
|
|
detect ip count
|
Number of the IP addresses contained in a
detected group
|
|
detect-list
|
Sequence number of an IP address
contained in a detected group
|
|
ip address
|
IP address to be detected
|
|
next hop
|
Next hop IP address
|
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
Parameters
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 interface-number: Interface type and interface number.
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:
Detected group number ranging from 1 to 50.
Description
Use the ip route-static detect-group
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.
Examples
# Configure a static route to 192.168.1.5/24
with 192.168.0.2 as the next hop, and control the static route validity using
the detecting result of detected group 10.
<Sysname> system-view
System View: return to User
View with Ctrl+Z.
[Sysname] ip route-static
192.168.1.5 24 192.168.0.2 detect-group 10
After the configuration, if detected group
10 is reachable, the static route is valid; if detected group 10 is unreachable,
the static route is invalid.
Syntax
option [ and
| or ]
undo option
View
Detected group view
Parameters
and:
Specifies the detecting result is reachable only when all the IP
addresses contained in the detected group are reachable.
or:
Specifies the detecting result is reachable if one of the IP addresses
contained in the detected 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 relationship between the
detected objects is and.
When a detecting operation is being carried
out, the switch detects each detected object contained in the detected group in
turn by their sequence number.
l
If you specify the and keyword, the
switch returns reachable as the detecting result only if all the
detected objects in the detected group are detected reachable.
l
If you specify the or keyword, the switch
returns reachable as the detecting result only if one of the detected
objects in the detected group is detected reachable and the remaining detected
objects will not be detected any more.
Examples
# Specify the relationship between the
three detected objects in detected group 10 as or.
<Sysname> system-view
System View: return to User View with
Ctrl+Z.
[Sysname] detect-group 10
[Sysname-detect-group-10] detect-list
1 ip address 202.13.1.55 nexthop 1.2.3.4
[Sysname-detect-group-10] detect-list
2 ip address 202.13.1.56 nexthop 1.2.3.4
[Sysname-detect-group-10] detect-list
3 ip address 202.13.1.57 nexthop 1.2.3.4
[Sysname-detect-group-10] option or
After the configuration, if one of the
three detected objects is reachable, the system will consider detected group 10
reachable.
Syntax
retry retry-times
undo retry
View
Detected group view
Parameters
retry-times:
Maximum 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 times.
By default, the maximum retry times during
a detect operation is two.
Examples
# Specify the maximum number of retires to 3
for detected group 10.
<Sysname> system-view
System View: return to User
View with Ctrl+Z.
[Sysname] detect-group 10
[Sysname-detect-group-10]
retry 3
Syntax
standby detect-group group-number
undo standby
detect-group
View
VLAN interface view
Parameters
group-number:
Detected group number ranging from 1 to 50.
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.
After you configure the standby
detect-group command, whether the backup interface is enabled depends on
the auto detecting results:
l
The primary interface keeps in use when the
detected group is reachable.
l
The backup interface is enabled when the
detected group is unreachable.
l
The backup interface is disabled and the primary
interface is re-enabled when the link between the primary interface and the
destination resumes, that is, the detected group is reachable again.
Examples
# Specify to enable VLAN-interface 2 (the
standby interface) when the detected group 10 is unreachable.
<Sysname> system-view
System View: return to User
View with Ctrl+Z.
[Sysname] interface
vlan-interface 2
[Sysname-Vlan-interface2]
standby detect-group 10
After the configuration, if detected group
10 is reachable, the backup interface VLAN-interface 2 will be in the disabled
state, and if detected group 10 is unreachable, VLAN-interface 2 will be
enabled.
Syntax
timer loop
interval
undo timer loop
View
Detected group view
Parameters
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.
By default, auto detect operations are
performed on all detected groups every 15 seconds.
Examples
# Set the detecting interval to 60 seconds
for detected group 10.
<Sysname> system-view
System View: return to User
View with Ctrl+Z.
[Sysname] detect-group 10
[Sysname-detect-group-10]
timer loop 60
Syntax
timer wait seconds
undo timer wait
View
Detected group view
Parameters
seconds:
Timeout waiting for an ICMP reply. This argument ranges from 1 to 30 (in
seconds) and defaults to 2.
Description
Use the timer wait command to set a timeout
waiting for an ICMP reply.
Use the undo timer wait command to
restore the default.
By default, timeout waiting for an ICMP
reply in an auto detect operation is 2 seconds.
Examples
# Set a timeout of 3 seconds waiting for an
ICMP reply in detected group 10.
<Sysname> system-view
System View: return to User View with
Ctrl+Z.
[Sysname] detect-group 10
[Sysname-detect-group-10] timer wait
3
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
Parameters
virtual-router-id: Virtual router ID ranging from 1 to 255.
group-number:
Detected group number ranging from 1 to 50.
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 track detect-group
command to specify an auto detected group for a VRRP group.
Use the undo vrrp vrid track
detect-group command to cancel the configuration.
You can enable Auto Detect on the master
switch in a VRRP group, use the Auto Detect function to detect the routes from
the master to other networks, and use the detection results
(reachable/unreachable) to control the priority of the master, so as to realize
the automatic master-backup switchover:
l
The master keeps as master when the detected
group is reachable.
l
The priority of the master decreases and thus
becomes a backup when the detected group is unreachable.
Examples
# Specify to decrease the priority of the
master switch in VRRP group 1 by 20 when the detected group 10 is unreachable.
<Sysname> system-view
System View: return to User
View with Ctrl+Z.
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1]
vrrp vrid 1 track detect-group 10 reduced 20
After this configuration, if detected group
10 is reachable, the master keeps as master, and if detected group 10 is
unreachable, the master decreases its priority by 20 and becomes a backup.