11.11. Configuring Track
Overview
Function Introduction
Track is used for link the functional modules and monitor modules. Track builds a system structure with 3 levels: Track <-> monitor modules <-> functional modules
Track can shield the difference of the monitor modules and provide an unitized API for the functional modules.
The following monitor modules are supported:
IP SLA
interface states
bfd states
The following functional modules are supported:
Static route
VRRP
Track makes a communication for the functional modules and monitor modules. When link states or network performance is changed, the monitor modules can detect the event and notify the track module; therefore track will change its owner states and notify the related functional modules.
Principle Description
N/A
Configuration
Configuring IP SLA for interfaces in the VRF
IP SLA (Service Level Agreement) is a network performance measurement and diagnostics tool that uses active monitoring. Active monitoring is the generation of traffic in a reliable and predictable manner to measure network performance. Every IP SLA operation maintains an operation return-code value. This return code is interpreted by the tracking process. The return code can return OK, Over Threshold, and several other return codes. Different operations can have different return-code values, so only values common to all operation types are used. In IP SLA, use icmp echo to check state or reachability of a route.
The following configuration should be operated on all switches if the switch ID is not specified.
step 1 Enter the configure mode
Switch# configure terminal
step 2 Create a vrf instance
Switch(config)# ip vrf vpn1
Switch(config-vrf)# exit
step 3 Enter the interface configure mode and set the attributes of the interface
Interface configuration for Switch1:
Switch(config)# interface eth-0-1
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ip vrf forwarding vpn1
Switch(config-if)# ip address 192.168.0.2/24
Switch(config-if)# exit
Interface configuration for Switch2:
Switch(config)# interface eth-0-1
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ip vrf forwarding vpn1
Switch(config-if)# ip address 192.168.0.1/24
Switch(config-if)# exit
step 4 Create ip sla and set the attributes
Configuring Switch1:
Switch(config)# ip sla monitor 1
Switch(config-ipsla)# type icmp-echo 192.168.0.1
Switch(config-ipsla)# frequency 35
Switch(config-ipsla)# timeout 6
Switch(config-ipsla)# threshold 3000
Switch(config-ipsla)# ttl 65
Switch(config-ipsla)# tos 1
Switch(config-ipsla)# data-size 29
Switch(config-ipsla)# data-pattern abababab
Switch(config-ipsla)# fail-percent 90
Switch(config-ipsla)# packets-per-test 4
Switch(config-ipsla)# interval 9
Switch(config-ipsla)# statistics packet 10
Switch(config-ipsla)# statistics test 3
Switch(config-ipsla)# vrf vpn1
Switch(config-ipsla)# exit
frequency:Time between 2 probes. Valid range is 1-4800 second, default value is 60 seconds.
timeout:Timeout value for icmp reply. Valid range is 1-4800 second, default value is 5 seconds.
threshold: Timeout value for icmp threshold. Valid range is 1-4800000 millisecond, default value is 5000 millisecond.
packets-per-test:Packet number for each probe. Valid range is 1-10, default value is 3.
interval:Time between 2 packets. Valid range is 1-4800 second, default value is 6 seconds.
statistics packet:Packet number for statistics. Valid range is 0-1000, default value is 50.
statistics test probe number for statistics. Valid range is 0-10, default value is 5
step 5 Enable ip sla
Configuring Switch1:
Switch(config)# ip sla monitor schedule 1
step 6 Exit the configure mode
Switch(config)# end
step 7 Validation
Display the result on Switch1.
Switch# sho ip sla monitor 1
Entry 1
Type : Echo
Admin state : Disable
Destination address : 192.168.0.1
Frequency : 35s
Timeout : 6s
Threshold : 3000ms
Interval : 9s
Packet per test : 4
TTL : 65
TOS : 1
Data Size : 29 bytes
Fail Percent : 90%
Packet Item Cnt : 10
Test Item Cnt : 3
Vrf : vpn1
Return code : Unknown
Configuring IP SLA for Layer3 interfaces
The following configuration should be operated on all switches if the switch ID is not specified.:
step 1 Enter the configure mode
Switch# configure terminal
step 2 Enter the interface configure mode and set the attributes of the interface
Interface configuration for Switch1:
Switch(config)# interface eth-0-1
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ip address 192.168.0.2/24
Switch(config-if)# exit
Interface configuration for Switch2:
Switch(config)# interface eth-0-1
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ip address 192.168.0.1/24
Switch(config-if)# exit
step 3 Create ip sla and set the attributes
Configuring Switch1:
Switch(config)# ip sla monitor 1
Switch(config-ipsla)# type icmp-echo 192.168.0.1
Switch(config-ipsla)# frequency 10
Switch(config-ipsla)# timeout 5
Switch(config-ipsla)# exit
step 4 Enable ip sla
Configuring Switch1:
Switch(config)# ip sla monitor schedule 1
step 5 Exit the configure mode
Switch(config)# end
step 6 Validation
Display the result on Switch1.
Switch# show ip sla monitor
Entry 1
Type : Echo
Admin state : Enable
Destination address : 192.168.0.1
Frequency : 10 seconds
Timeout : 5 seconds
Threshold : 5 seconds
Running Frequency : 8 seconds
Return code : OK
Switch# ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=0.846 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=0.643 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=0.978 ms
64 bytes from 192.168.0.1: icmp_seq=4 ttl=64 time=0.640 ms
64 bytes from 192.168.0.1: icmp_seq=5 ttl=64 time=0.704 ms
Shutdown the interface eth-0-1 on Switch2.
Switch(config)# interface eth-0-1
Switch(config-if)# shutdown
Display the result on Switch1 again.
Switch# show ip sla monitor
Entry 1
Type : Echo
Admin state : Enable
Destination address : 192.168.0.1
Frequency : 10 seconds
Timeout : 5 seconds
Threshold : 5 seconds
Running Frequency : 9 seconds
Running Timeout : 4 seconds
Running Threshold : 4 seconds
Return code : Timeout
Configuring IP SLA for outgongin interface of static route
The following configuration should be operated on all switches if the switch ID is not specified.:
step 1 Enter the configure mode
Switch# configure terminal
step 2 Enter the interface configure mode and set the attributes of the interface
Interface configuration for Switch1:
Switch(config)# interface eth-0-1
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ip address 192.168.0.2/24n
Switch(config-if)# exit
Interface configuration for Switch2:
Switch(config)# interface eth-0-1
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ip address 192.168.0.1/24
Switch(config-if)# exit
Switch(config)# interface loopback 1
Switch(config-if)# ip address 1.1.1.1/32
Switch(config-if)# exit
step 3 Create ip sla and set the attributes
Configuring Switch1:
Switch(config)# ip sla monitor 2
Switch(config-ipsla)# type icmp-echo 1.1.1.1
Switch(config-ipsla)# frequency 10
Switch(config-ipsla)# timeout 5
Switch(config-ipsla)# exit
step 4 Enable ip sla
Configuring Switch1:
Switch(config)# ip sla monitor schedule 2
step 5 Exit the configure mode
Switch(config)# end
step 6 Validation
Display the result on Switch1.
Switch# show ip sla monitor 2
Entry 2
Type : Echo
Admin state : Enable
Destination address : 1.1.1.1
Frequency : 10 seconds
Timeout : 5 seconds
Threshold : 5 seconds
Running Frequency : 1 seconds
Return code : Unreachable
Switch# ping 1.1.1.1
connect: Network is unreachable
Create a static route on Switch1
Switch# configure terminal
Switch(config)# ip route 1.1.1.1/32 192.168.0.1
Switch(config)# end
Display the result on Switch1 again.
Switch# ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=64 time=1.03 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=64 time=1.63 ms
64 bytes from 1.1.1.1: icmp_seq=3 ttl=64 time=0.661 ms
64 bytes from 1.1.1.1: icmp_seq=4 ttl=64 time=0.762 ms
64 bytes from 1.1.1.1: icmp_seq=5 ttl=64 time=0.942 ms
Entry 2
Type : Echo
Admin state : Enable
Destination address : 1.1.1.1
Frequency : 10 seconds
Timeout : 5 seconds
Threshold : 5 seconds
Running Frequency : 8 seconds
Return code : OK
Configuring track interface linkstate
Before the introduction of track feature, the VRRP had a simple tracking mechanism that allowed you to track the interface link state only. If the link state of the interface went down, the VRRP priority of the router was reduced, allowing another VRRP router with a higher priority to become active. The Track feature separates the tracking mechanism from VRRP and creates a separate standalone tracking process that can be used by other processes in future. This feature allows tracking of other objects in addition to the interface link state. VRRP can now register its interest in tracking objects and then be notified when the tracked object changes state. TRACK is a separate standalone tracking process that can be used by other processes as well as VRRP. This feature allows tracking of other objects in addition to the interface link state.
Configuring Switch1:
step 1 Enter the configure mode
Switch# configure terminal
step 2 Create track and set the attributes
Switch(config)# track 1 interface eth-0-1 linkstate
Switch(config-track)# delay up 30
Switch(config-track)# delay down 30
Switch(config-track)# exit
Switch(config-router)#[Switch(config-router)#]Parameters for track:
delay up: After the interface states is up, the track will wait for a cycle before restore the states. Valid range is 1-180 second. The default configuration is restore without delay.
delay down: After the interface states is down, the track will wait for a cycle before change the states. Valid range is 1-180 second.
The default configuration is change without delay.
If the track is using bfd or ip sla, the
Switch(config-router)#
delay upSwitch(config-router)#
and Switch(config-router)#
delay downSwitch(config-router)#
is similar as using interface states.
step 3 Exit the configure mode
Switch(config)# end
step 4 Validation
Switchshow track
Track 2
Type : Interface Link state
Interface : eth-0-1
State : down
Delay up : 30 seconds
Delay down : 30 seconds
Configuring track ip sla reachability
The following configuration should be operated on all switches if the switch ID is not specified.
step 1 Enter the configure mode
Switch# configure terminal
step 2 Enter the interface configure mode and set the attributes of the interface
Interface configuration for Switch1:
Switch(config)# interface eth-0-1
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ip address 192.168.0.2/24
Interface configuration for Switch2:
Switch(config)# interface eth-0-1
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ip address 192.168.0.1/24
step 3 Create ip sla and enable it
Configuring Switch1:
Switch(config)# ip sla monitor 1
Switch(config-ipsla)# type icmp-echo 192.168.0.1
Switch(config-ipsla)# frequency 10
Switch(config-ipsla)# timeout 5
Switch(config-ipsla)# threshold 1
Switch(config-ipsla)# exit
Switch(config)# ip sla monitor schedule 1
step 4 Create track and set the attributes
Configuring Switch1:
Switch(config)# track 1 rtr 1 reachability
Switch(config-track)# delay up 30
Switch(config-track)# delay down 30
Switch(config-track)# exit
step 5 Exit the configure mode
Switch(config)# end
step 6 Validation
Switch# show track
Track 1
Type : Response Time Reporter(RTR) Reachability
RTR entry number : 1
State : up
Delay up : 30 seconds
Delay down : 30 seconds
Configuring track ip sla state
The following configuration should be operated on all switches if the switch ID is not specified.
step 1 Enter the configure mode
Switch# configure terminal
step 2 Enter the interface configure mode and set the attributes of the interface
Interface configuration for Switch1:
Switch(config)# interface eth-0-1
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ip address 192.168.0.2/24
Interface configuration for Switch2:
Switch(config)# interface eth-0-1
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ip address 192.168.0.1/24
step 3 Create ip sla and enable it
Configuring Switch1:
Switch(config)# ip sla monitor 1
Switch(config-ipsla)# type icmp-echo 192.168.0.1
Switch(config-ipsla)# frequency 10
Switch(config-ipsla)# timeout 5
Switch(config-ipsla)# threshold 1
Switch(config-ipsla)# exit
Switch(config)# ip sla monitor schedule 1
step 4 Create track and set the attributes
Configuring Switch1:
Switch(config)# track 1 rtr 1 state
Switch(config-track)# delay up 30
Switch(config-track)# delay down 30
Switch(config-track)# exit
step 5 Exit the configure mode
Switch(config)# end
step 6 Validation
Switch# show track
Track 1
Type : Response Time Reporter(RTR) State
RTR entry number : 1
State : up
Delay up : 30 seconds
Delay down : 30 seconds
Configuring track bfd
The following configuration should be operated on all switches if the switch ID is not specified.
step 1 Enter the configure mode
Switch# configure terminal
step 2 Enter the interface configure mode and set the attributes of the interface
Interface configuration for Switch1:
Switch(config)# interface eth-0-1
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ip address 9.9.9.1/24
Switch(config-if)# quit
Interface configuration for Switch2:
Switch(config)# interface eth-0-1
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ip address 9.9.9.2/24
Switch(config-if)# quit
step 4 Create track and set the attributes
Configuring Switch1:
Switch(config)# track 1 bfd source interface eth-0-1 destination 9.9.9.2
Switch(config-track)# delay up 30
Switch(config-track)# delay down 30
Switch(config-track)# exit
Configuring Switch2:
Switch(config)# track 1 bfd source interface eth-0-1 destination
9.9.9.1
Switch(config-track)# delay up 30
Switch(config-track)# delay down 30
Switch(config-track)# exit
step 5 Exit the configure mode
Switch(config)# end
step 6 Validation
Display the result on Switch1.
Switch# show track
Track 1
Type : BFD state
Source interface : eth-0-1
Destination IP : 9.9.9.2
BFD Local discr : 1
State : up
Display the result on Switch2.
Switch(config-router)# show track
Track 1
Type : BFD state
Source interface : eth-0-1
Destination IP : 9.9.9.1
BFD Local discr : 1
State : up
Configuring track for vrrp
step 1 Check current configuration
Reference to chapter Configuring VRRP (OneVirtual Router)
Display the configuration on R1.
interface eth-0-1
no switchport
ip address 10.10.10.50/24
!
router vrrp 1
interface eth-0-1
virtual-ip 10.10.10.60
advertisement-interval 5
enable
Display the configuration on R2.
interface eth-0-1
no switchport
ip address 10.10.10.40/24
!
router vrrp 1
interface eth-0-1
priority 200
virtual-ip 10.10.10.60
advertisement-interval 5
enable
step 2 Create track and set the attributes
Create track on Switch1
Switch(config)# track 1 interface eth-0-1 linkstate
Switch(config-track)# exit
Switch(config)# track 1 cfm domain cust service cst
Switch(config-track)# exit
Switch(config)# track 1 cfm domain cust service cst rdi-trigger
step 3 Apply track for vrrp
Apply track on Switch1
Switch(config)# router vrrp 1
Switch(config-router)# disable
Switch(config-router)# track 1 decrement 30
Switch(config-router)# enable
step 4 Validation
Display the result on Switch1.
Switch# show vrrp
vrrp session count: 1
VRID Switch(config-router)#<1Switch(config-router)#>
State : Backup
Virtual IP : 10.10.10.60(Not IP owner)
Interface : eth-0-9
VMAC : 0000.5e00.0101
VRF : Default
Advt timer : 5 second(s)
Preempt mode : TRUE
Conf pri : Unset Run pri : 100
Increased pri : 0
Track Object : 1
Decre pri : 30
Master router ip : 10.10.10.40
Master priority : 200
Master advt timer : 5 second(s)
Master down timer : 16 second(s)
Preempt delay : 0 second(s)
Learn master mode : FALSE
BFD session state : UNSET
Configuring track for static route
The following configuration should be operated on all switches if the switch ID is not specified.
step 1 Enter the configure mode
Switch# configure terminal
step 2 Enter the interface configure mode and set the attributes of the interface
Interface configuration for Switch1:
Switch(config)# interface eth-0-1
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ip address 192.168.1.10/24
Switch(config-if)# exit
Interface configuration for Switch2:
Switch(config)# interface eth-0-1
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ip address 192.168.1.11/24
Switch(config-if)# exit
step 3 Create ip sla and enable it
Configuring Switch1:
Switch(config)# ip sla monitor 1
Switch(config-ipsla)# type icmp-echo 192.168.1.11
Switch(config-ipsla)# exit
Switch(config)# ip sla monitor schedule 1
step 4 Create track and set the attributes
Configuring Switch1:
Switch(config)# track 1 rtr 1 reachability
Switch(config-track)# exit
step 5 Apply track for static route
Switch(config)# ip route 10.10.10.0/24 192.168.1.11 track 1
step 6 Exit the configure mode
Switch(config)# end
step 7 Validation
Display the result on Switch1.
Switch# show ip sla monitor 1
Entry 1
Type : Echo
Admin state : Enable
Destination address : 192.168.1.11
Frequency : 60 seconds
Timeout : 5 seconds
Threshold : 5 seconds
Running Frequency : 49 seconds
Return code : OK
Switch# show track 1
Track 1
Type : Response Time Reporter(RTR) Reachability
RTR entry number : 1
State : up
Switch# show ip route static
S 10.10.10.0/24 Switch(config-router)#[1/0Switch(config-router)#] via 192.168.1.11, eth-0-1
Shutdown the interface eth-0-1 on Switch2.
Switch(config)# interface eth-0-1
Switch(config-if)# shutdown
Display the result on Switch1 again.
Switch# show ip sla monitor 1
Entry 1
Type : Echo
Admin state : Enable
Destination address : 192.168.1.11
Frequency : 60 seconds
Timeout : 5 seconds
Threshold : 5 seconds
Running Frequency : 8 seconds
Return code : Timeout
Switch# show track 1
Track 1
Type : Response Time Reporter(RTR) Reachability
RTR entry number : 1
State : down
Switch# show ip route static
Application cases
N/A