track ip route

Function

The track ip route command adds a route to a route monitoring group.

The undo track ip route command deletes a route from a route monitoring group.

By default, no routes are added to a route monitoring group.

Format

track ip route [ vpn-instance vpn-instance-name ] destination { mask | mask-length } [ down-weight down-weight-value ]

undo track ip route [ vpn-instance vpn-instance-name ] destination { mask | mask-length } [ down-weight down-weight-value ]

Parameters

Parameter Description Value
vpn-instance vpn-instance-name

Specifies the VPN instance to which a route belongs. If vpn-instance vpn-instance-name is specified, a VPN route in the VPN instance is added to the route monitoring group; if vpn-instance vpn-instance-name is not specified, a public network route is added to the route monitoring group.

The value is a string of 1 to 31 case-sensitive characters, spaces not supported. In addition, the VPN instance name must not be _public_. When double quotation marks are used around the string, spaces are allowed in the string.

destination

Specifies the destination IP address of a route.

The value is in dotted decimal notation.

mask

Specifies the mask of a route IP address.

The value is in dotted decimal notation.

mask-length

Specifies the mask length of a route IP address.

The value is an integer ranging from 0 to 32.

down-weight down-weight-value

Specifies a down-weight for the route. The larger the down-weight value, the more important the route. The value can be set based on such information as the link bandwidth, rate, and cost.

The value is an integer ranging from 1 to 1000, with default value 10.

Views

Route monitoring group view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
route-base write

Usage Guidelines

Usage Scenario

A route monitoring group monitors the status of its member routes, each of which has a down-weight. The down-weight indicates the link quality. The larger the down-weight value, the more important the route. The down-weight can be set based on parameters, such as the link bandwidth, rate, and cost.

  • If a route in the route monitoring group goes Down, its down-weight is added to the down-weight sum of the route monitoring group.
  • If a route in the route monitoring group goes Up again, its down-weight is subtracted from the down-weight sum of the route monitoring group.

    To add a route to a route monitoring group, run the track ip route command.

Prerequisites

A route monitoring group has been created using the ip route-monitor-group command.

Precautions

A maximum of 16 routes can be added to a route monitoring group, and one route can be added to multiple route monitoring groups.

Example

# Add routes 10.1.1.0/24 and 10.1.2.0/24 to route monitoring group named uplink and set their down-weights to 100 and 120, respectively.
<HUAWEI> system-view
[~HUAWEI] ip route-monitor-group uplink
[*HUAWEI-route-monitor-group-uplink] track ip route 10.1.1.0 24 down-weight 100
[*HUAWEI-route-monitor-group-uplink] track ip route 10.1.2.0 24 down-weight 120
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >