OcNOS-SP : Multi-Protocol Label Switching Guide : Multi-Protocol Label Switching Configuration Guide : TWAMP over L3VPN Configuration
TWAMP over L3VPN Configuration
This chapter contains a complete sample TWAMP over L3VPN configuration.
Two-way Active Measurement Protocol (TWAMP) is an open protocol for measuring network performance between any two devices. The TWAMP MPLS transport is implemented as part of supporting TWAMP on routers which acts as MPLS routers both in the roles of LERs as well as intermediate routers. OcNOS version 6.0.0 also supports the end to end statistics calculation when multiple paths are available between sender and reflector with multihop support.
The user can use the link delay metrics such as average, minimum, and maximum delay, and delay variance to determine the network latency. Using link delay metrics will enable troubleshooting latency issues or apply Traffic Engineering (TE) solutions to meet Service Level Agreements (SLAs).
The TWAMP protocol is designed to do such measurements, and a basic implementation of this protocol has already been implemented in OcNOS. This feature here is a TWAMP protocol in OcNOS where the focus will be on accuracy and configurable advertisement of the measured data.
L3VPN (based on MPLS) Supported scenarios:
In general, TWAMP over L3VPN works on:
CE-CE Overlay Only
CE-PE Overlay Only
PE-PE Both Under lay and over lay
Topology
Figure 48-18 displays a sample TWAMP over L3VPN topology.
CE1 and CE2 are customer edge routers
PE1 and PE2 are IPv4 Provider Edge routers
P1 is the router at the core of the IPv4 MPLS provider network
TWAMP over L3VPN Topology
Configure TWAMP over L3VPN for LDP
PE1
 
#configure terminal
Enter Configure mode.
(config)# ip vrf vrf100
Create a new VRF named vrf100
(config-vrf)#rd 100:1
Assign the route distinguisher (RD) value as 100:1
(config-vrf)#route-target both 100:1
Import routes between route target (RT) ext-communities 100 and 1
(config-vrf)#exit
Exit VRF mode
(config)#interface lo
Enter loopback interface mode
(config-if)#ip address 18.18.18.18/32 sec-ondary
Assign IP address to Loopback interface
(config-if)#exit
Exit Interface mode
(config)#interface xe8
Enter Interface mode
(config-if)# ip address 10.1.1.18/24
Assign IP address to interface
(config-if)#enable-ldp ipv4
Enable LDP on the physical interface
(config-if)#label-switching
Enable label switching on the interface
(config-if)#exit
Exit Interface mode
(config)#interface xe11
Enter Interface mode
(config-if)# ip vrf forwarding vrf100
Bind the interface connected to the CE1 router with VRF 100
(config-if)# ip address 100.1.1.1/24
Assign IP address to interface
(config-if)#exit
Exit interface mode
(config)#router ldp
Enter the Router LDP mode
(config-router)#router-id 18.18.18.18
Configure router id as loopback address
(config-router)#transport-address ipv4 18.18.18.18
Configure ldp transport addess as loopback address
(config-router)#exit
Exit from the router ldp mode
(config)# router ospf 1
Enter Router OSPF mode
(config-router)# ospf router-id 18.18.18.18
Configure OSPF router-id
(config-router)# network 10.1.1.0/24 area 0.0.0.0
Define the network on which OSPF runs and associate area id.
(config-router)# network 18.18.18.18/32 area 0.0.0.0
Define the network on which OSPF runs and associate area id.
(config-router)# commit
Commit the configurations
(config-router)# exit
Exit from router OSPF mode
(config)# router bgp 100
Enter BGP router mode
(config-router)# bgp router-id 18.18.18.18
Configure BGP router-id
(config-router)# neighbor 8.8.8.8 remote-as 100
Configure PE2 as an iBGP4+ neighbor
(config-router)# neighbor 8.8.8.8 up-date-source lo
Update the source as loopback for iBGP peering with the remote PE2 router
(config-router)# address-family vpnv4 unicast
Enter address-family vpnv4 mode
(config-router-af)# neighbor 8.8.8.8 activate
Activate the PE2 neighbor in the vpnv4 address family
(config-router-af)# neighbor 8.8.8.8 next-hop-self
Activate the neighbor as next hop self
(config-router-af)#exit
Exit form address family
(config-router)# address-family ipv4 vrf vrf100
Enter the IPv4 address family for VRF 100
(config-router-af)# redistribute connected
Redistribute connected routes
(config-router-af)# neighbor 100.1.1.2 re-mote-as 200
Configure CE1 neighbor in the vrf address family
(config-router-af)# neighbor 100.1.1.2 acti-vate
Activate the CE1 neighbor
(config-router-af)#exit
Exit form address family
(config-router)# commit
Commit the configurations
P1
 
#configure terminal
Enter Configure mode.
(config)#interface lo
Enter loopback interface mode
(config-if)#ip address 3.3.3.3/32 secondary
Assign IP address to Loopback interface
(config-if)#exit
Exit Interface mode
(config)#router ldp
Enter the Router LDP mode
(config-router)#router-id 3.3.3.3
Configure router id as loopback address
(config-router)#transport-address ipv4 3.3.3.3
Configure ldp transport addess as loopback address
(config-router)#exit
Exit from the router ldp mode
(config)#interface xe14
Enter Interface mode
(config-if)# ip address 10.1.1.3/24
Assign IP address to interface
(config-if)#enable-ldp ipv4
Enable LDP on the physical interface
(config-if)#label-switching
Enable label switching on the interface
(config-if)#exit
Exit Interface mode
(config)#interface xe15
Enter Interface mode
(config-if)# ip address 11.1.1.3/24
Assign IP address to interface
(config-if)#enable-ldp ipv4
Enable LDP on the physical interface
(config-if)#label-switching
Enable label switching on the interface
(config-if)#exit
Exit interface mode
(config)# router ospf 1
Enter Router OSPF mode
(config-router)# ospf router-id 18.18.18.18
Configure OSPF router-id
(config-router)# network 10.1.1.0/24 area 0.0.0.0
Define the network on which OSPF runs and associate area id.
(config-router)# network 3.3.3.3/32 area 0.0.0.0
Define the network on which OSPF runs and associate area id.
(config-router)# network 11.1.1.0/24 area 0.0.0.0
Define the network on which OSPF runs and associate area id.
(config-router)# commit
Commit the configurations
(config-router)# exit
Exit from router OSPF mode
PE2
 
#configure terminal
Enter Configure mode.
(config)#ip vrf vrf100
Create a new VRF named vrf100
(config-vrf)#rd 101:1
Assign the route distinguisher (RD) value as 101:1
(config-vrf)#route-target both 100:1
Import routes between route target (RT) ext-communities 100 and 1
(config-vrf)#exit
Exit VRF mode
(config)#router ldp
Enter the Router LDP mode
(config-router)#router-id 8.8.8.8
Configure router id as loopback address
(config-router)#transport-address ipv4 8.8.8.8
Configure ldp transport addess as loopback address
(config-router)#exit
Exit from the router ldp mode
(config)#interface lo
Enter loopback interface mode
(config-if)#ip address 8.8.8.8/32 secondary
Assign IP address to Loopback interface
(config-if)#exit
Exit Interface mode
(config)#interface xe24
Enter Interface mode
(config-if)# ip address 11.1.1.8/24
Assign IP address to interface
(config-if)#enable-ldp ipv4
Enable LDP on the physical interface
(config-if)#label-switching
Enable label switching on the interface
(config-if)#exit
Exit Interface mode
(config)#interface xe25
Enter Interface mode
(config-if)# ip vrf forwarding vrf100
Bind the interface connected to the CE1 router with VRF 100
(config-if)# ip address 101.1.1.1/24
Assign IP address to interface
(config-if)#exit
Exit interface mode
(config)# router ospf 1
Enter Router OSPF mode
(config-router)# ospf router-id 8.8.8.8
Configure OSPF router-id
(config-router)# network 11.1.1.0/24 area 0.0.0.0
Define the network on which OSPF runs and associate area id.
(config-router)# network 8.8.8.8/32 area 0.0.0.0
Define the network on which OSPF runs and associate area id.
(config-router)#exit
Exit from router OSPF mode
(config)# router bgp 100
Enter BGP router mode
(config-router)# bgp router-id 8.8.8.8
Configure BGP router-id
(config-router)# neighbor 18.18.18.18 re-mote-as 100
Configure PE1 as an iBGP4+ neighbor
(config-router)# neighbor 18.18.18.18 up-date-source lo
Update the source as loopback for iBGP peering with the remote PE1 router
(config-router)# address-family vpnv4 unicast
Enter address-family vpnv4 mode
(config-router-af)# neighbor 18.18.18.18 ac-tivate
Activate the PE1 neighbor in the vpnv4 address family
(config-router-af)# neighbor 18.18.18.18 next-hop-self
Activate the neighbor as next hop self
(config-router-af)#exit
Exit form address family
(config-router)# address-family ipv4 vrf vrf100
Enter the IPv4 address family for VRF 100
(config-router-af)# redistribute connected
Redistribute connected routes
(config-router-af)# neighbor 101.1.1.2 re-mote-as 200
Configure CE2 neighbor in the vrf address family
(config-router-af)# neighbor 101.1.1.2 acti-vate
Activate the CE2 neighbor
(config-router-af)#exit
Exit form address family
(config-router)# commit
Commit the configurations
CE1
 
#configure terminal
Enter Configure mode.
(config)#interface lo
Enter loopback interface mode
(config-if)#ip address 37.37.37.37/32 secondary
Assign IP address to Loopback interface
(config-if)#exit
Exit Interface mode
(config)#interface xe24
Enter Interface mode
(config-if)# ip address 100.1.1.2/24
Assign IP address to interface
(config-if)#exit
Exit Interface mode
(config)#interface xe26
Enter Interface mode
(config-if)# ip address 200.1.1.1/24
Assign IP address to interface
(config-if)#exit
Exit interface mode
(config)# router bgp 200
Enter BGP router mode
(config-router)# bgp router-id 37.37.37.37
Configure BGP router-id
(config-router)#neighbor 100.1.1.1 remote-as 100
Configure PE1 as an eBGP4+ neighbor
(config-router)# address-family ipv4 unicast
Enter address-family IPv4 unicast mode
(config-router-af)# redistribute connected
Redistribute the connected route under address family IPv4 unicast
(config-router-af)# neighbor 100.1.1.1 activate
Activate the neighbor in the IPv4 address family
(config-router-af)#exit
Exit form address family
(config-router)# commit
Commit the configurations
CE2
 
#configure terminal
Enter Configure mode.
(config)#interface lo
Enter loopback interface mode
(config-if)#ip address 2.2.2.2/32 secondary
Assign IP address to Loopback interface
(config-if)#exit
Exit Interface mode
(config)#interface xe14
Enter Interface mode
(config-if)# ip address 101.1.1.2/24
Assign IP address to interface
(config-if)#exit
Exit Interface mode
(config)#interface xe15
Enter Interface mode
(config-if)# ip address 201.1.1.1/24
Assign IP address to interface
(config-if)#exit
Exit interface mode
(config)# router bgp 300
Enter BGP router mode
(config-router)# bgp router-id 2.2.2.2
Configure BGP router-id
(config-router)#neighbor 101.1.1.1 remote-as 100
Configure PE2 as an eBGP4+ neighbor
(config-router)# address-family ipv4 unicast
Enter address-family IPv4 unicast mode
(config-router-af)# redistribute connected
Redistribute the connected route under address family IPv4 unicast
(config-router-af)# neighbor 101.1.1.1 acti-vate
Activate the neighbor in the IPv4 address family
(config-router-af)#exit
Exit form address family
(config-router)# commit
Commit the configurations
 
TWAMP Configuration on Sender (PE1)
 
TWAMP sender is configured to measure the delay on interface Loopback on PE1
 
#configure terminal
Enter Configure mode.
(config)# hardware-profile filter twamp-ipv4 enable
Enable hardware filter for ipv4 to configure TWAMP meas-urement configs
(config)#commit
Commit the configuration
(config)# twamp-light control
Enable TWAMP light controller on PE1
(config-twamp-light-con)# control-admin-state enable
Enable TWAMP Controller admin state
(config)#interface lo
Enter Interface Loopback mode
(config-if)# delay-measurement dynamic twamp reflector-ip 11.1.1.8
Configure delay measurement on interface Loopback to re-flector PE2
(config-if)#commit
Commit the configurations
(config-if)#end
Return to privilege mode
TWAMP Configuration on Reflector (PE2)
Configure TWAMP Reflector as interface xe24 on PE2 (Towards core)
 
#configure terminal
Enter Configure mode.
(config)# hardware-profile filter twamp-ipv4 enable
Enable hardware filter for ipv4 to configure TWAMP meas-urement configs
(config)#commit
Commit the configuration
(config)# twamp-light reflector
Enable TWAMP light Reflector on PE2
(config-twamp-light-ref)# reflec-tor-admin-state enable
Enable the TWAMP reflector admin state
(config-twamp-light-ref)# reflector-name pe2 reflector-ip ipv4 11.1.1.8
Configure TWAMP reflector IP as PE2 interface IP
(config-twamp-light-ref)#commit
Commit the configurations
(config-if)#end
Return to privilege mode
Validation
1. Verify ping from PE1 to PE2
 
PE1#ping 11.1.1.8
Press CTRL+C to exit
PING 11.1.1.8 (11.1.1.8) 56(84) bytes of data.
64 bytes from 11.1.1.8: icmp_seq=1 ttl=63 time=0.683 ms
64 bytes from 11.1.1.8: icmp_seq=2 ttl=63 time=0.491 ms
64 bytes from 11.1.1.8: icmp_seq=3 ttl=63 time=0.594 ms
 
2. Verify mpls l3vpn ping from PE1
 
PE1#ping mpls l3vpn vrf100 101.1.1.0/24
Sending 5 MPLS Echos to 101.1.1.0, timeout is 5 seconds
 
Codes:
'!' - Success, 'Q' - request not sent, '.' - timeout,
'x' - Retcode 0, 'M' - Malformed Request, 'm' - Errored TLV,
'N' - LBL Mapping Err, 'D' - DS Mismatch,
'U' - Unknown Interface, 'R' - Transit (LBL Switched),
'B' - IP Forwarded, 'F' No FEC Found, 'f' - FEC Mismatch,
'P' - Protocol Error, 'X' - Unknown code,
'Z' - Reverse FEC Validation Failed
 
Type 'Ctrl+C' to abort
 
!
!
!
!
!
 
Success Rate is 100.00 percent (5/5)
 
3. Verify the TWAMP statistics on all the configured interfaces on PE1
In the below verification command, packets sent and received showing as equal. So all the TWAMP packets received reply for all the sent packets for the delay measurement. Showing all the Round Trip Delay and Reverse Delay timers.
 
PE1#sh twamp-statistics
=========================================
TWAMP Test-Session Statistics
=========================================
Test-Session Name : __internal_interface_xe8
Start Time : 2019 Feb 14 15:21:58
Elapsed time(milli sec) : 6003
Packets Sent : 6
Packets Received : 6
Packet Loss(%) : 0.00
Round Trip Delay(usec)
Minimum : 17
Maximum : 19
Average : 18
Forward Delay(usec)
Minimum : (*)
Maximum : (*)
Average : (*)
Reverse Delay(usec)
Minimum : (*)
Maximum : (*)
Average : (*)
Round Trip Delay Variation(usec)
Minimum : 16
Maximum : 19
Average : 17
Forward Delay Variation(usec)
Minimum : (*)
Maximum : (*)
Average : (*)
Reverse Delay Variation(usec)
Minimum : (*)
Maximum : (*)
Average : (*)
 
(*) - Time is not in sync between Sender and Reflector
4. Verify the List of all interfaces that are currently participating in Delay measurement
 
PE1#sh twamp-statistics interfaces
Interface Last Advertisement Delay(us) Min(us) Max(us) Var(us) Loss(%)
Xe8 2019-02-14 15:22:00 10 10 10 0 Not Enabled
 
5. Verify the Detailed list of TWAMP delay measurement information on interface xe8
 
PE1#sh twamp-statistics interfaces xe8
Interface name : xe8
Sender IP : 10.1.1.18
Reflector IP : 11.1.1.8
Reflector port : 862
DSCP value : 0
HW Status : HW rules installed
Last Advertised stats:
Time: 2019-02-14 15:22:00
Average delay : 10
Minimum delay : 10
Maximum delay : 10
Average delay variation: 0
Minimum delay variation: 0
Maximum delay variation: 0
Packets sent : 1
Packets received : 1
Packets timeout : 0
Packet Loss: Not Enabled
Last Calculated stats:
Time: 2019-02-14 15:22:00
Average delay : 10
Minimum delay : 10
Maximum delay : 10
Average delay variation: 0
Minimum delay variation: 0
Maximum delay variation: 0
Packets sent : 1
Packets received : 1
Packets timeout : 0
Packet Loss : Not Enabled