Pseudo wire Emulation is a mechanism that emulates Layer2 service like ATM, Frame Relay or Ethernet over a Packet Switched Network (PSN). RFC4447 defines the procedure to use LDP as signaling protocol to advertise the PW label between PE devices that emulates/provides L2VPN service. This PW label will be used as demultiplexor field to identify the AC to which the packet should be delivered. In order to assign and exchange the PW label between PE devices, it is required to have a (targeted) LDP session established between the source and destination PE.
While this works fine when source and destination PE devices are in same domain, there are situation where a Pseudo wire needs to be established between PEs in different domain without reachability between Terminating PEs. Below are few example scenarios where the situation may encounter,
- Inter AS L2VPN service
- L2VPN service in Unified MPLS
- Terminating PE devices using heterogeneous PSN tunnel
In such scenarios, L2VPN service can be emulated by switching Pseudowires between Packet Switched Network domains. There are 2 possible methods for switching pseudowire between domains as below,
- PWs switched together using native service ACs.
- PWs switched by intermittent PE.
As shown in above diagram, pseudowires in different domain are stitched together using native attachment circuit (AC). This is analogous to Option-A Inter-AS solution for L3VPN. As it can be noted, it may face up with scalability issue.
The second method is, each Terminating PEs connecting customer Attachment Circuit will have a pseudowire established with an intermittent device which is capable of switching the data plane traffic between different pseudowire segments.
MS-PW setup and switching
Basically there are 3 different mechanisms to setup MS-PW as below,
- Static configuration of pseudowire in one or both segment.
- Using LDP FEC 128 in one or both segments.
- Using LDP Generalized PWid FEC 129 in one or both segments.
The above boils down to 4 distinct PW switching situations as below,
- Switching between two static control planes.
- Switching between Static and dynamic LDP control plane (FEC 128 or 129)
- Switching between two dynamic LDP control plane using same FEC type (FEC 128 or 129)
- Switching between two dynamic LDP control plane using FEC 128 and FEC 129.
In case of static configuration, S-PE will be configured statically to switch the pseudowire terminated from S-PE to different T-PEs. As it can be noted, there is no control plane involved in static configuration and all label details will be statically configured on T-PE devices and on S-PE devices.
When static is used in one domain while dynamic (FEC 128 or 129) is used in other domain, S-PE will consider the static PW as Attachment Circuit (AC) and will signal appropriate PW status to dynamic PW based on the failure detected on static PW side.
LDP Control plane using same FEC type
In this case, S-PE will assume passive role and will wait for Label mapping from one of the remote T-PE before sending one to other T-PE. This is required in order to get the Interface parameter field in initial FEC advertisement. After receiving label mapping from one T-PE and if the remote T-PE doesn’t accept LDP label mapping message, then S-PE will send a Label Release message.
It should be noted that the T-PE should not bring the PW status as UP till the entire set of segmented pseudowire are up. Else, it might result in situation where one end of T-PE start pumping traffic while the pseudowire in other segment is still coming up or is down. This is handled by PW Status TLV exchange.
Assume S-PE is statically configured with pseudowire with T-PE1 and T-PE2. Now when it receive label mapping from T-PE1, it will send label mapping message with PW Status TLV carrying “Local AC Receive/Transmit fault” error messages (These are different bits in PW Status Sub-TLV and I marked it as one single message for the sake of simplicity). Now when it receives the label mapping message from T-PE2, it will send back label mapping message to T-PE2 without any PW Status TLV error. It also will send a LDP notification to T-PE1 with PW Status TL without any error bit set. This will bring the pseudowire on both segments up and ready. S-PE will populate the forwarding table to swap PW label in Domain 1 to PW label in Domain 2 and vice versa.
LDP Control plane using distinct FEC type
In this case, S-PE will remain passive till it receives LDP Label mapping message for FEC 128 from T-PE. Once it receives the same, S-PE will generate Generalized PWid FEC and send Label mapping message to T-PE in other domain.
Pseudowire Loop Detection
While in this document, there is only one S-PE in between switching between PWs, nothing stops from having multiple S-PEs in between. The only constraint will be the PW label TTL expiry. In case of Inter-AS L2VPN, there will be a minimum of 2 S-PE in between (each from its own AS border). Since the pseudowire is segmented, we need a way to avoid any loop while manually enabling the pseudowire switching functionality in S-PE. LDP SP-PE TLV helps to achieve the same.
This Sub-TLV will record all S-PEs that MS-PW traverses. This is an optional TLV that not only helps with loop detection, but also with Virtual Circuit Connectivity Verification (VCCV) functionality.
It is assumed that the PSN is enabled with MPLS and is not covered in this sample configuration.
Configure xconnect on both T-PE devices as below,
Enable pseudowire switching on S-PE as below,
On T-PE1, it can be observed that VCID 26 is up and it uses 37 label as egress PW label and 36 as local PW label.
On T-PE2, it can be observed that VCID 56 is up and uses 31 as egress PW label and 40 as local PW label.
On S-PE1, it can be observed that PW label advertised to T-PE1 will be mapped to swap with label advertised by T-PE2 and vice versa,