threshold percentage
To set a threshold percentage for a tracked object in a list of objects, use the threshold percentage command. To disable the threshold percentage, use the no form of this command.
threshold percentage {up number [down number] | down number [up number]}
Command Modes
Usage GuidelinesWhen you configure a tracked list using the track object-number list command, there are two keywords available: boolean and threshold. If you specify the threshold keyword, you can specify either the percentage or weight keywords. If you specify the percentage keyword, the weight keyword is unavailable. If you specify the weight keyword, the percentage keyword is unavailable.
You should configure the up percentage first. The valid range is from 1 to 100. The down percentage depends on what you have configured for up. For example, if you configure 50 percent for up, you see a range from 0 to 49 percent for down.
threshold weight
To set a threshold weight for a tracked object in a list of objects, use the threshold weight command. To disable the threshold weight, use the no form of this command.
threshold weight {up number [down number] | down number [up number]}
Command Modes
Usage GuidelinesWhen you configure a tracked list using the track object-number list command, there are two keywords available: boolean and threshold. If you specify the threshold keyword, you can specify either the percentage or weight keywords. If you specify the percentage keyword, the weight keyword is unavailable. If you specify the weight keyword, the percentage keyword is unavailable.
You should configure the up weight first. The valid range is from 1 to 255. The available down weight depends on what you have configured for the up weight. For example, if you configure 25 for up, you will see a range from 0 to 24 for down.
track interface
To configure object tracking on an interface, use the track interface command. To remove the object tracking for this interface, use the no form of this command.
track object-id interface interface-type number {ip routing | line-protocol}
Command Modes
Usage GuidelinesUse the track interface command to track the line protocol status or IPv4 routing state of an interface. This command enters the object tracking command mode. Use the vrf member command in object tracking configuration mode to track objects in a nondefault VRF.
track ip route
To configure object tracking on an IP route, use the track ip route command. To remove the object tracking for this route, use the no form of this command.
Command Modes
Usage GuidelinesUse the track ip route command to track IP route reachability. This command enters the object tracking command mode. Use the vrf member command in object tracking configuration mode to track objects in a nondefault VRF.
track list
To configure object tracking on an object list, use the track list command. To remove the object tracking for this object list, use the no form of this command.
track object-id list boolean {and | or}
track object-id list threshold {percentage | weight}
Syntax Description
Command Modes
Usage GuidelinesUse the track list command to create a list of objects to combine into one tracked state. Use the boolean and keywords to combine the tracked objects as an AND function (that is, all objects must be up for the track list to be up). Use the boolean or keywords to combine the tracked objects as an OR (that is if any object is up, the tracked state is up).
The track list command enters the track command mode. You can configure the following commands in this mode:
- object —Configures one or more objects to track in the track list. You can optionally use the not keyword to negate the object track state. (That is, an up state becomes a down state if you use the not keyword) for boolean tracked lists. You can optionally use the weight keyword to assign a weight to an object for a threshold weight tracked list. The default weight is 10.
- vrf —Assigns the track list to a VRF.
ExamplesThis example shows how to create a track list of two objects and AND their state:
This example shows how to configure a track list with an up threshold of 70 percent and a down threshold of 30 percent:
switch(config)# track 1 list threshold percentage
switch(config-track)# threshold percentage up 70 down 30
switch(config-track)# object 10
switch(config-track)# object 20
switch(config-track)# object 30
This example shows how to configure a track list with an up weight threshold of 30 and a down threshold of 10:
switch(config)# track 1 list threshold weight
switch(config-track)# threshold weight up 30 down 10
switch(config-track)# object 10 weight 15
switch(config-track)# object 20 weight 15
switch(config-track)# object 30
In this example, the track list is up if object 10 and object 20 are up, and the track list goes to the down state if all three objects are down.