OcNOS-SP : Multi-Protocol Label Switching Guide : Multi-Protocol Label Switching Configuration Guide : TWAMP over EVPN Configuration
TWAMP over EVPN Configuration
This chapter contains a complete sample TWAMP over EVPN 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 6.0 also supports the end to end sta-tistics 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 de-termine the network latency. Using link delay metrics will enable troubleshooting latency issues or apply Traffic En-gineering (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.
EVPN (based on MPLS) Supported scenarios:
In general, TWAMP over EVPN works on,
CE-CE Overlay Only
CE-PE Overlay Only
PE-PE Both Under lay and over lay
Topology
Figure 44-24 displays a sample TWAMP over EVPN 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 EVPN Topology
Configure TWAMP over EVPN for LDP
EVPN-Eline configurations
PE1
 
#configure terminal
Enter Configure mode.
(config)# evpn mpls enable
Enable EVPN MPLS
(config)# evpn mpls vtep-ip-global 18.18.18.18
Configuring VTEP global IP to loopback IP
(config)# mac vrf eline500
Create a new mac VRF named eline100
(config-vrf)# rd 20.20.20.20:100
Assign the route distinguisher (RD) value as 20.20.20.20:100
(config-vrf)# route-target both 111:111
Configuring import and export value as 111:111
Support:
route-target export
route-target import
(config-vrf)#exit
Exit VRF mode
(config)#commit
Commit the configurations
(config)# evpn mpls id 500 xconnect tar-get-mpls-id 501
Configure the EVPN-VPWS identifier with source identifier 2 and target identifier 501
(config-evpn-mpls)#host-reachability-protocol evpn-bgp eline500
Mapping vrf "eline500" to EVPN-VPWS identifier
(config-evpn-mpls)#exit
Exit the EVPN MPLS mode and return to the configure 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)#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.500 switchport
Creating L2 sub interface of physical interface xe11
(config-if)# encapsulation dot1q 500
Setting Encapsulation to dot1q with VLAN ID 2
Supported Encapsulation: dot1ad, dot1q, untagged, default
(config-if)# access-if-evpn
Entering Access mode for EVPN MPLS ID configuration
(config-acc-if-evpn)# map vpn-id 500
Map vpn-id 500 to interface xe11.500 (VPWS)
(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 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 l2vpn evpn
Entering into address family mode as EVPN
(config-router-af)# neighbor 8.8.8.8 activate
Enabling EVPN Address family for neighbor
(config-router-af)#exit
Exit form address family
(config-router)# commit
Commit the configurations
P1
 
#configure terminal
Enter Configure 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 lo
Enter loopback interface mode
(config-if)#ip address 3.3.3.3/32 secondary
Assign IP address to Loopback 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 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)# evpn mpls enable
Enable EVPN MPLS
(config)# evpn mpls vtep-ip-global 8.8.8.8
Configuring VTEP global IP to loopback IP
(config)# mac vrf eline500
Create a new mac VRF named eline100
(config-vrf)# rd 20.20.20.20:100
Assign the route distinguisher (RD) value as 20.20.20.20:100
(config-vrf)# route-target both 111:111
Configuring import and export value as 111:111
Support:
route-target export
route-target import
(config-vrf)#exit
Exit VRF mode
(config)#commit
Commit the configurations
(config)# evpn mpls id 501 xconnect tar-get-mpls-id 500
Configure the EVPN-VPWS identifier with source identifier 501 and target identifier 500
(config-evpn-mpls)#host-reachability-protocol evpn-bgp eline500
Mapping vrf "eline500" to EVPN-VPWS identifier
(config-evpn-mpls)#exit
Exit from EVPN mpls 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)#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 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 PE2 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 PE2 router
 
(config-router)# address-family l2vpn evpn
Entering into address family mode as EVPN
(config-router-af)# neighbor 8.8.8.8 activate
Enabling EVPN Address family for 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.500
Enter Interface mode
(config-if)#encapsulation dot1q 500
Setting Encapsulation to dot1q with VLAN ID 500
(config-if)# ip address 172.16.10.1/24
Configure IP address on the 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.500
Enter Interface mode
(config-if)#encapsulation dot1q 500
Setting Encapsulation to dot1q with VLAN ID 500
(config-if)# ip address 172.16.10.2/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 (CE1)
TWAMP sender is configured to measure the delay on interface xe24.500 CE1
 
#configure terminal
Enter Configure mode.
(config)# hardware-profile filter twamp-ipv4 enable
Enable hardware filter for ipv4 to configure TWAMP measure-ment configs
(config)#commit
Commit the configuration
(config)# twamp-light control
Enable TWAMP light controller on CE1
(config-twamp-light-con)# control-admin-state enable
Enable TWAMP Controller admin state
(config)# interface xe24.500
Enter Interface Loopback mode
(config-if)# delay-measurement dynamic twamp reflector-ip 172.16.10.2
Configure delay measurement on interface to reflector CE2
(config-if)#commit
Commit the configurations
(config-if)#end
Return to privilege mode
TWAMP Configuration on Reflector (CE2)
Configure TWAMP Reflector as interface xe24.500 on CE2
 
#configure terminal
Enter Configure mode.
(config)# hardware-profile filter twamp-ipv4 enable
Enable hardware filter for ipv4 to configure TWAMP measure-ment configs
(config)#commit
Commit the configuration
(config)# twamp-light reflector
Enable TWAMP light Reflector on CE2
(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 172.16.10.2
Configure TWAMP reflector IP as CE2 interface IP
(config-twamp-light-ref)#commit
Commit the configurations
(config-if)#end
Return to privilege mode
Validation
1. Verify ping from CE1 to CE2
 
PE1#ping 172.16.10.2
Press CTRL+C to exit
PING 172.16.10.2 (172.16.10.2) 56(84) bytes of data.
64 bytes from 172.16.10.2: icmp_seq=1 ttl=64 time=0.776 ms
64 bytes from 172.16.10.2: icmp_seq=2 ttl=64 time=0.553 ms
 
2. Verify the TWAMP statistics on all the configured interfaces on CE1
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_xe24.500
Start Time : 2023 Mar 16 00:04:37
Elapsed time(milli sec) : 3001
Packets Sent : 1
Packets Received : 1
Packet Loss(%) : 0.00
Round Trip Delay(usec)
Minimum : 383
Maximum : 383
Average : 383
Forward Delay(usec)
Minimum : (*)
Maximum : (*)
Average : (*)
Reverse Delay(usec)
Minimum : (*)
Maximum : (*)
Average : (*)
Round Trip Delay Variation(usec)
Minimum : 383
Maximum : 383
Average : 383
Forward Delay Variation(usec)
Minimum : (*)
Maximum : (*)
Average : (*)
Reverse Delay Variation(usec)
Minimum : (*)
Maximum : (*)
Average : (*)
 
(*) - Time is not in sync between Sender and Reflector
 
3. 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(%)
xe24.500 - 0 0 0 0 Not Enabled
4. Verify the Detailed list of TWAMP delay measurement information on interface Loopback
 
PE1#sh twamp-statistics interfaces xe24.500
Interface name : xe24.500
Sender IP : 172.16.10.1
Reflector IP : 172.16.10.2
Reflector port : 862
DSCP value : 0
HW Status : HW rules installed
Last Advertised stats:
Time: 2023-03-16 00:05:08
Average delay : 198
Minimum delay : 166
Maximum delay : 233
Average delay variation: 5
Minimum delay variation: 2
Maximum delay variation: 10
Packets sent : 10
Packets received : 10
Packets timeout : 0
Packet Loss: Not Enabled
Last Calculated stats:
Time: 2023-03-16 00:05:08
Average delay : 198
Minimum delay : 166
Maximum delay : 233
Average delay variation: 5
Minimum delay variation: 2
Maximum delay variation: 10
Packets sent : 10
Packets received : 10
Packets timeout : 0
Packet Loss : Not Enabled