Tuesday, November 6, 2012

Multi Segment Pseudowire - Basic Understanding and Configuration



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,

  1. PWs switched together using native service ACs.
  2. 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,


  1. Static configuration of pseudowire in one or both segment.
  2. Using LDP FEC 128 in one or both segments.
  3. Using LDP Generalized PWid FEC 129 in one or both segments.


The above boils down to 4 distinct PW switching situations as below,


  1. Switching between two static control planes.
  2. Switching between Static and dynamic LDP control plane (FEC 128 or 129)
  3. Switching between two dynamic LDP control plane using same FEC type (FEC 128 or 129)
  4. Switching between two dynamic LDP control plane using FEC 128 and FEC 129.


Static Configuration

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.


MS-PW Configuration

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,
T-PE1(config)#
interface Ethernet0/0.2
 encapsulation dot1Q 2
 xconnect 10.1.6.6 26 encapsulation mpls

T-PE2(config)#
interface Ethernet0/0.5
 encapsulation dot1Q 5
 xconnect 10.1.6.6 56 encapsulation mpls

Enable pseudowire switching on S-PE as below,

S-PE1(config)#
l2 vfi MSPW point-to-point
 neighbor 10.1.2.2 26 encapsulation mpls
 neighbor 10.1.5.5 56 encapsulation mpls

MS-PW Verification

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.

T-PE1#show mpls l2transport vc 26

Local intf     Local circuit              Dest address    VC ID      Status
-------------  -------------------------- --------------- ---------- ----------
Et0/0.2        Eth VLAN 2                 10.1.6.6        26         UP       

T-PE1#show mpls l2transport vc 26 detail
Local interface: Et0/0.2 up, line protocol up, Eth VLAN 2 up
  Interworking type is Ethernet
  Destination address: 10.1.6.6, VC ID: 26, VC status: up
    Output interface: Et0/0.23, imposed label stack {23 37}
    Preferred path: not configured 
    Default path: active
    Next hop: 10.1.23.3
  Create time: 2d04h, last status change time: 06:29:02
    Last label FSM state change time: 06:29:02
  Signaling protocol: LDP, peer 10.1.6.6:0 up
    Targeted Hello: 10.1.2.2(LDP Id) -> 10.1.6.6, LDP is UP
    Graceful restart: not configured and not enabled
    Non stop routing: not configured and not enabled
    Status TLV support (local/remote)   : enabled/supported
      LDP route watch                   : enabled
      Label/status state machine        : established, LruRru
      Last local dataplane   status rcvd: No fault
      Last BFD dataplane     status rcvd: Not sent
      Last BFD peer monitor  status rcvd: No fault
      Last local AC  circuit status rcvd: No fault
      Last local AC  circuit status sent: No fault
      Last local PW i/f circ status rcvd: No fault
      Last local LDP TLV     status sent: No fault
      Last remote LDP TLV    status rcvd: No fault
      Last remote LDP ADJ    status rcvd: No fault
    MPLS VC labels: local 36, remote 37
    Group ID: local 0, remote 0
    MTU: local 1500, remote 1500
    Remote interface description:
  Sequencing: receive disabled, send disabled
  Control Word: On (configured: autosense)
  Dataplane:
    SSM segment/switch IDs: 4105/4096 (used), PWID: 1
  VC statistics:
    transit packet totals: receive 0, send 0
    transit byte totals:   receive 0, send 0
    transit packet drops:  receive 0, seq error 0, send 0


T-PE1#
T-PE1#show xconnect interface e0/0.2
Legend:    XC ST=Xconnect State  S1=Segment1 State  S2=Segment2 State
  UP=Up       DN=Down            AD=Admin Down      IA=Inactive
  SB=Standby  HS=Hot Standby     RV=Recovering      NH=No Hardware

XC ST  Segment 1                         S1 Segment 2                         S2
------+---------------------------------+--+---------------------------------+--
UP pri   ac Et0/0.2:2(Eth VLAN)          UP mpls 10.1.6.6:26                  UP

T-PE1#show xconnect interface e0/0.2 detail
Legend:    XC ST=Xconnect State  S1=Segment1 State  S2=Segment2 State
  UP=Up       DN=Down            AD=Admin Down      IA=Inactive
  SB=Standby  HS=Hot Standby     RV=Recovering      NH=No Hardware

XC ST  Segment 1                         S1 Segment 2                         S2
------+---------------------------------+--+---------------------------------+--
UP pri   ac Et0/0.2:2(Eth VLAN)          UP mpls 10.1.6.6:26                  UP
            Interworking: ethernet               Local VC label 36             
                                                 Remote VC label 37            
                                                                                
T-PE1#

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.

T-PE2#show mpls l2transport vc 56

Local intf     Local circuit              Dest address    VC ID      Status
-------------  -------------------------- --------------- ---------- ----------
Et0/0.5        Eth VLAN 5                 10.1.6.6        56         UP       

T-PE2#show mpls l2transport vc 56 detail
Local interface: Et0/0.5 up, line protocol up, Eth VLAN 5 up
  Interworking type is Ethernet
  Destination address: 10.1.6.6, VC ID: 56, VC status: up
    Output interface: Et0/0.45, imposed label stack {23 31}
    Preferred path: not configured 
    Default path: active
    Next hop: 10.1.45.4
  Create time: 2d04h, last status change time: 06:35:59
    Last label FSM state change time: 06:35:59
  Signaling protocol: LDP, peer 10.1.6.6:0 up
    Targeted Hello: 10.1.5.5(LDP Id) -> 10.1.6.6, LDP is UP
    Graceful restart: not configured and not enabled
    Non stop routing: not configured and not enabled
    Status TLV support (local/remote)   : enabled/supported
      LDP route watch                   : enabled
      Label/status state machine        : established, LruRru
      Last local dataplane   status rcvd: No fault
      Last BFD dataplane     status rcvd: Not sent
      Last BFD peer monitor  status rcvd: No fault
      Last local AC  circuit status rcvd: No fault
      Last local AC  circuit status sent: No fault
      Last local PW i/f circ status rcvd: No fault
      Last local LDP TLV     status sent: No fault
      Last remote LDP TLV    status rcvd: No fault
      Last remote LDP ADJ    status rcvd: No fault
    MPLS VC labels: local 40, remote 31
    Group ID: local 0, remote 0
    MTU: local 1500, remote 1500
    Remote interface description:
  Sequencing: receive disabled, send disabled
  Control Word: On (configured: autosense)
  Dataplane:
    SSM segment/switch IDs: 4107/4096 (used), PWID: 1
  VC statistics:
    transit packet totals: receive 0, send 0
    transit byte totals:   receive 0, send 0
    transit packet drops:  receive 0, seq error 0, send 0


T-PE2#show xconnect interface e0/0.5
Legend:    XC ST=Xconnect State  S1=Segment1 State  S2=Segment2 State
  UP=Up       DN=Down            AD=Admin Down      IA=Inactive
  SB=Standby  HS=Hot Standby     RV=Recovering      NH=No Hardware

XC ST  Segment 1                         S1 Segment 2                         S2
------+---------------------------------+--+---------------------------------+--
UP pri   ac Et0/0.5:5(Eth VLAN)          UP mpls 10.1.6.6:56                  UP
T-PE2#show xconnect interface e0/0.5 detail
Legend:    XC ST=Xconnect State  S1=Segment1 State  S2=Segment2 State
  UP=Up       DN=Down            AD=Admin Down      IA=Inactive
  SB=Standby  HS=Hot Standby     RV=Recovering      NH=No Hardware

XC ST  Segment 1                         S1 Segment 2                         S2
------+---------------------------------+--+---------------------------------+--
UP pri   ac Et0/0.5:5(Eth VLAN)          UP mpls 10.1.6.6:56                  UP
            Interworking: ethernet               Local VC label 40             
                                                 Remote VC label 31            
                                                                                
T-PE2#

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,

S-PE1#
S-PE1#show mpls forwarding-table labels 37 detail
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop   
Label      Label      or Tunnel Id     Switched      interface             
37         No Label   l2ckt(1)         0             Et0/0.46   10.1.46.4  
        MAC/Encaps=18/26, MRU=1496, Label Stack{22 40}
        AABBCC03EC00AABBCC03EE008100002E8847 0001600000028000
        No output feature configured

S-PE1#show mpls forwarding-table labels 31 detail
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop   
Label      Label      or Tunnel Id     Switched      interface             
31         No Label   l2ckt(2)         0             Et0/0.36   10.1.36.3  
        MAC/Encaps=18/26, MRU=1496, Label Stack{16 36}
        AABBCC03EB00AABBCC03EE00810000248847 0001000000024000
        No output feature configured
S-PE1#

Reference:




2 comments: