VPWS with Sequencing
Load vpws.sequencing.init.cfg
#IOS-XE (R1-R6, CE1,3,8,10)
config replace flash:vpws.sequencing.init.cfg
Configure two VPWS services:
CE1 and CE10 using sequencing only one way, on packets transmitted by R1
CE3 and CE8 using sequencing both ways, and resetting the sequence numbers when 100 packets are seen out-of-sync
The CEs are already preconfigured with IP addressing as 10.X.Y.X/24
Answer
#R1
int Gi4
no ip address
service instance 1 eth
encapsulation default
exit
!
template type pseudowire R1_SEQ
encapsulation mpls
sequencing transmit
control-word include
!
l2vpn xconnect context CE1_CE10
member gi4 service-instance 1
member 2.2.2.2 110 template R1_SEQ
#R2
int Gi4
no ip address
service instance 1 eth
encapsulation default
exit
!
template type pseudowire R2_SEQ
encapsulation mpls
sequencing receive
control-word include
!
l2vpn xconnect context CE1_CE10
member gi4 service-instance 1
member 1.1.1.1 110 template R2_SEQ
#R5
int Gi6
no ip address
service instance 1 eth
encapsulation default
exit
!
template type pseudowire CW_SEQ
encapsulation mpls
sequencing both
sequencing resync 100
control-word include
!
l2vpn xconnect context CE3_CE8
member gi6 service-instance 1
member 6.6.6.6 38 template CW_SEQ
#R6
int Gi6
no ip address
service instance 1 eth
encapsulation default
exit
!
template type pseudowire CW_SEQ
encapsulation mpls
sequencing both
sequencing resync 100
control-word include
!
l2vpn xconnect context CE3_CE8
member gi6 service-instance 1
member 5.5.5.5 38 template CW_SEQ
Explanation
The control word is by default enabled on xconnects in IOS-XE. Sequencing is a feature that is supported when the control word is used. By default sequencing is disabled. When using sequencing, the PE will place a sequence number in the CW. This number will simply increment by 1 for each packet. When it gets to 65535, it will wrap around back to 1. The egress PE, if it receives an out-of-order sequence number, will drop the packet. This ensures that the L2VPN service never delivers out-of-order packets.
Sequencing can be enabled unidirectionally. One side can send with sequence numbers but not receive them, and one side can receive sequence numbers but not send them. Sequencing is only available when using tLDP, not when using manual PWs.
There is also a resync option available. When a router receives X number of packets that are out-of-order, it resets the sequence number. This can help speed up reconvergence when events happen that cause lots of out-of-order packets. I believe the receiving router that notices out of order packets will alert the sending router to reset its sequence number via LDP, however this isn’t clear and is not something that is really possible to test.
We can control these parameters using a template and applying the template to a neighbor under the xconnect.
template type pseudowire name
encapsulation mpls
sequencing receive|transmit|both
sequencing resync num
control-word include
!
l2vpn xconnect context name
neighbor 1.1.1.1 vcid template name
Verification
Inspect the details of the VC to view the sequencing parameters. On R1 is shown below:

On R5 and R6, we should see sequencing enabled in both directions and resync enabled:

Last updated