Showing posts with label AToM. Show all posts
Showing posts with label AToM. Show all posts

Friday, December 16, 2016

CCIE SPv4 - MPLS L2 VPN - 1+N Pseudowire and Redundancy

Software versions:
IOS XE 15.5
IOS XR 5.3

The topology for this demo:
In this post we'll take a look at having multiple pseudowires configured between R1, R5 and R6. We won't be leveraging XRv for the simple reason that P2P PWs don't appear to be supported in Dot1Q, SI Dot1Q or SI QinQ modes, only in port mode. We have several different variant to look at in this post so I will keep the intro short. We will look at the following variants, SI and Dot1Q, QinQ is very similar, just adding a VLAN ID. Port mode simply grabs all VLAN IDs. So we'll focus more on the connectivity scenarios rather than the encapsulation that the customer connects with, since we have already seen that. 

We will be looking at having a minimum of 2 PWs configured for redundancy purposes between any 2 PEs. We will have 4 separate designs, we will use 100/101, 200/201, 300/301, 400/401, the even PW is the primary and the odd is the backup, for the Dot1Q/SI value, PW, the xconnect context name will change based on the scenario. Any caveats will be identified as we go through each scenario. After we configured scenario 100, we'll use just service instances moving forward. I would recommend being able to flip back and forth and knowing the caveats. 

1 PE and 1 CE, 1 AC - 100/101
Done between R1 and R13

1 PE and 1 CE, 2 AC - 200/201
Done between R1 and R13, R6 and R10

1 PE and 2 CE, 2 AC - 300/301
Done between R5, R9 and R10

2 PE and 2 CE, 2 AC - 400/401
Done between R5, R6, R9 and R10



1 PE and 1 CE, 1 AC - 100/101

R1
interface GigabitEthernet2.100
 encapsulation dot1Q 100
!
interface pseudowire100
 encapsulation mpls
 neighbor 192.168.1.6 100
interface pseudowire101
 encapsulation mpls
 neighbor 192.168.1.6 101
!
l2vpn xconnect context 1PE_1CE_1AC
 member GigabitEthernet2.100
 member pseudowire100 group RED priority 10
 member pseudowire101 group RED priority 11


R6
interface GigabitEthernet2.100
 encapsulation dot1Q 100
!
interface pseudowire100
 encapsulation mpls
 neighbor 192.168.1.1 100
interface pseudowire101
 encapsulation mpls
 neighbor 192.168.1.1 101
!
l2vpn xconnect context 1PE_1CE_1AC
 member GigabitEthernet2.100
 member pseudowire100 group RED priority 10
 member pseudowire101 group RED priority 11

The interface level configuration for the G2.100 and the PW are pretty straightforward. It's the xconnect context that changes, specifically the "group" is used to bundle 2 pseudowires together for failover capabilities. The group is coupled with a priority to make sure that the appropriate PW is used for forwarding. A lower priority is preferred. One caveat, no more that 4 members to any one context is permitted, so we could attach 3 PWs for 3 separate LSP to the remote PE. From a design perspective, PWs 1 and 2 will likely have a TE tunnels attached to them, each taking separate paths in the network and the third will likely use the LDP path. We'll take a look at that in the TE section. 

Verification

R6#show mpls l2transport vc detail | in label
    Output interface: Gi1.26, imposed label stack {26 27}
    Last label FSM state change time: 00:04:41
    MPLS VC labels: local 26, remote 27
  SSO Descriptor: 192.168.1.1/100, local label: 26
    Output interface: Gi1.26, imposed label stack {26 26}
    Last label FSM state change time: 00:04:41
    MPLS VC labels: local 25, remote 26
  SSO Descriptor: 192.168.1.1/101, local label: 25

R6#show l2vpn atom vc

                                       Service
Interface Peer ID         VC ID      Type   Name                     Status
--------- --------------- ---------- ------ ------------------------ ----------
pw100     192.168.1.1     100        p2p    1PE_1CE_1AC              UP
pw101     192.168.1.1     101        p2p    1PE_1CE_1AC              STANDBY

So as you can see, we have 2 pseudowires attached to the context and pw100 is UP and primary and pw101 is STANDBY and backup.

Another caveat is with xconnect switchover, on the CSRs, this is not supported when you try to switchover from pw100 to pw101 on the same peer, R1 for instance. If you are peered to 1 PW to R5 and 1 PW to R6, switchover is supported.

R6#xconnect backup force-switchover peer 192.168.1.1 101
%%Xconnect: manual switchover failed

CE Verification
R10#sh ip eigrp nei
EIGRP-IPv4 Neighbors for AS(1)
H   Address                 Interface              Hold Uptime   SRTT   RTO  Q  Seq
                                                   (sec)         (ms)       Cnt Num
0   192.168.10.13           Gi1.100                  14 00:46:28   42   252  0  117



1 PE and 1 CE, 2 AC - 200/201
So R1 and R6 both have 2 AC to reach their connected CEs. This provides HA in case one AC goes down for some reason. Here is some important information, only 1 AC can be mapped to 1 xconnect context. If you map 2 or more, the context will prevent the pair from establishing, this is to prevent loops in the SP core. I won't demo a bad config, I will post the good config so you can see it.

R1
interface GigabitEthernet2
 service instance 200 ethernet
  encapsulation dot1q 200
 !
 service instance 201 ethernet
  encapsulation dot1q 201
!
interface pseudowire2001
 encapsulation mpls
 neighbor 192.168.1.6 2001
interface pseudowire2002
 encapsulation mpls
 neighbor 192.168.1.6 2002
interface pseudowire2011
 encapsulation mpls
 neighbor 192.168.1.6 2011
interface pseudowire2012
 encapsulation mpls
 neighbor 192.168.1.6 2012
!
l2vpn xconnect context 1PE_1CE_2AC_200
 member GigabitEthernet2 service-instance 200
 member pseudowire2001 group 2AC priority 1
 member pseudowire2002 group 2AC priority 2
l2vpn xconnect context 1PE_1CE_2AC_201
 member GigabitEthernet2 service-instance 201
 member pseudowire2011 group 2AC priority 1
 member pseudowire2012 group 2AC priority 2

PW 2001 and 2002 are for service instance 200, PW 2011 and 2012 are for service instance 201. I appended 1 and 2 respectively for primary (1) and secondary (2). For context 200, I mapped SI 200 to PW 2001 and 2002, both grouped together and 2001 getting priority 1 (better). R6 gets an identical configuration, the only difference is that the PW neighbor points to R1.

Verification:

R1#sh l2vpn atom vc

                                       Service
Interface Peer ID         VC ID      Type   Name                     Status
--------- --------------- ---------- ------ ------------------------ ----------
pw2001    192.168.1.6     2001       p2p    1PE_1CE_2AC_200          UP
pw2002    192.168.1.6     2002       p2p    1PE_1CE_2AC_200          STANDBY
pw2011    192.168.1.6     2011       p2p    1PE_1CE_2AC_201          UP
pw2012    192.168.1.6     2012       p2p    1PE_1CE_2AC_201          STANDBY

As you can see, SI 200 has 2 different PWs mapped to it, 2001 is UP, same with SI 201, PW 2011 is up.

R1#sh l2vpn atom vc pseudowire 2001 detail | in label
    Last label FSM state change time: 00:24:50
    Output interface: Gi1.115, imposed label stack {24508 28}
  SSO Descriptor: 192.168.1.6/2001, local label: 28

We can see that there are 2 label values associated here, 24508 is used by R1 to reach R6. Label 28 is used by R1 to forward data over the P2P LSP established by the tLDP session initiated by the "xconnect"


R1#sh mpls forwarding-table labels 22
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop
Label      Label      or Tunnel Id     Switched      interface
22         24207      192.168.1.6/32   0             Gi1.112    10.1.12.12
           24508      192.168.1.6/32   0             Gi1.115    10.1.15.15

R1#sh mpls forwarding-table labels 28
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop
Label      Label      or Tunnel Id     Switched      interface
28         No Label   l2ckt(20)        42464         Gi2        point2point


CE verification
R10#sh ip eigrp nei
EIGRP-IPv4 Neighbors for AS(1)
H   Address                 Interface              Hold Uptime   SRTT   RTO  Q  Seq
                                                   (sec)         (ms)       Cnt Num
2   192.168.21.13           Gi1.201                  11 00:04:31 1600  5000  0  118
1   192.168.20.13           Gi1.200                  13 00:39:07   36   216  0  116





1 PE and 2 CE, 2 AC - 300/301
This scenario is basically where 1 PE terminates 2 different ACs to the same customer but to different CE routers. It could be used in a multihoming scenario, but in this case this is a dual home to the same PE. The configuration is very similar to the previous one, with the exception of the 2 different CEs.

R1
interface GigabitEthernet2
 service instance 300 ethernet
  encapsulation dot1q 300
 !
 service instance 301 ethernet
  encapsulation dot1q 301
!
interface pseudowire3001
 encapsulation mpls
 neighbor 192.168.1.5 3001
interface pseudowire3002
 encapsulation mpls
 neighbor 192.168.1.5 3002
interface pseudowire3011
 encapsulation mpls
 neighbor 192.168.1.5 3011
interface pseudowire3012
 encapsulation mpls
 neighbor 192.168.1.5 3012
!
l2vpn xconnect context 1PE_2CE_2AC_300
 member GigabitEthernet2 service-instance 300
 member pseudowire3001 group 2AC priority 1
 member pseudowire3002 group 2AC priority 2
l2vpn xconnect context 1PE_2CE_2AC_301
 member GigabitEthernet2 service-instance 301
 member pseudowire3011 group 2AC priority 1
 member pseudowire3012 group 2AC priority 2

R5
interface GigabitEthernet2
 service instance 300 ethernet
  encapsulation dot1q 300
!
interface GigabitEthernet3
 service instance 301 ethernet
  encapsulation dot1q 301
!
interface pseudowire3001
 encapsulation mpls
 neighbor 192.168.1.1 3001
interface pseudowire3002
 encapsulation mpls
 neighbor 192.168.1.1 3002
interface pseudowire3011
 encapsulation mpls
 neighbor 192.168.1.1 3011
interface pseudowire3012
 encapsulation mpls
 neighbor 192.168.1.1 3012
!
l2vpn xconnect context 1PE_2CE_2AC_300
 member GigabitEthernet2 service-instance 300
 member pseudowire3001 group 2AC priority 1
 member pseudowire3002 group 2AC priority 2
l2vpn xconnect context 1PE_2CE_2AC_301
 member pseudowire3011 group 2AC priority 1
 member pseudowire3012 group 2AC priority 2
 member GigabitEthernet3 service-instance 301


PE Verification
R1# sh l2vpn atom vc

                                       Service
Interface Peer ID         VC ID      Type   Name                     Status
--------- --------------- ---------- ------ ------------------------ ----------
pw3001    192.168.1.5     3001       p2p    1PE_2CE_2AC_300          UP
pw3002    192.168.1.5     3002       p2p    1PE_2CE_2AC_300          STANDBY
pw3011    192.168.1.5     3011       p2p    1PE_2CE_2AC_301          UP
pw3012    192.168.1.5     3012       p2p    1PE_2CE_2AC_301          STANDBY

As you can see, the 2 contexts are up and running, the pseudowires that received the priority of "1" are UP.

R1# sh l2vpn atom vc pseudowire 3001 detail | in label
    Last label FSM state change time: 01:22:47
    Output interface: Gi1.115, imposed label stack {24501 534}
  SSO Descriptor: 192.168.1.5/3001, local label: 33

We can see that label 24501 is used to reach R5, label 33 is for the tLDP session between R1 and R5. Label 534 is used by R5 for the tLDP session back to R1.

R1#sh mpls forwarding-table labels 23
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop
Label      Label      or Tunnel Id     Switched      interface
23         24202      192.168.1.5/32   0             Gi1.112    10.1.12.12
           24501      192.168.1.5/32   0             Gi1.115    10.1.15.15

R1#sh mpls forwarding-table labels 33
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop
Label      Label      or Tunnel Id     Switched      interface
33         No Label   l2ckt(24)        81531         Gi2        point2point

CE Verification
R13(config-subif)#do sh ip eigrp nei
EIGRP-IPv4 Neighbors for AS(1)
H   Address                 Interface              Hold Uptime   SRTT   RTO  Q  Seq
                                                   (sec)         (ms)       Cnt Num
4   192.168.31.10           Gi2.301                  13 01:49:11   37   222  0  150
3   192.168.30.9            Gi2.300                  13 01:49:40  692  4152  0  15

R9#sh ip eigrp nei
EIGRP-IPv4 Neighbors for AS(1)
H   Address                 Interface              Hold Uptime   SRTT   RTO  Q  Seq
                                                   (sec)         (ms)       Cnt Num
0   192.168.30.13           Gi1.300                  14 01:51:52   12   150  0  160


R10(config-subif)#do sh ip eigrp nei
EIGRP-IPv4 Neighbors for AS(1)
H   Address                 Interface              Hold Uptime   SRTT   RTO  Q  Seq
                                                   (sec)         (ms)       Cnt Num
3   192.168.31.13           Gi2.301                  11 01:51:46   69   414  0  162

So as you can see, R13 is peered to both R9 and R10. So if R9 or R10, individually failed, not together, separately, our design would be ok. This gives our HA that we would expect. However, no one that does this in real life would ever terminate 2 ACs to the same PE. If R5 ever died, the customer would be down as well. So this segways us into the 2 PE and 2 CE design next. 



2 PE and 2 CE, 2 AC - 400/401
This design gives much more flexibility, high availability and scale. It requires more routers and more configuration on the SP side, but it gives path diversity that the customer is more than likely demand. So we'll setup R5 and R6 to terminate ACs from R9 and R10. Now if R9 and R10 have a backdoor link, this would be a routed connected to the provider, unless it's a L2 P2P circuit, it would be terminated on a L3 interface and no worry of L2 traffic crossing broadcast domains.

R1
interface GigabitEthernet2
 service instance 400 ethernet
  encapsulation dot1q 400
 !
 service instance 401 ethernet
  encapsulation dot1q 401
!
interface pseudowire4001
 encapsulation mpls
 neighbor 192.168.1.5 4001
interface pseudowire4002
 encapsulation mpls
 neighbor 192.168.1.5 4002
interface pseudowire4011
 encapsulation mpls
 neighbor 192.168.1.6 4011
interface pseudowire4012
 encapsulation mpls
 neighbor 192.168.1.6 4012
!
l2vpn xconnect context 2PE_2CE_2AC_400
 member GigabitEthernet2 service-instance 400
 member pseudowire4001 group 2AC priority 1
 member pseudowire4002 group 2AC priority 2
l2vpn xconnect context 2PE_2CE_2AC_401
 member GigabitEthernet2 service-instance 401
 member pseudowire4011 group 2AC priority 1
 member pseudowire4012 group 2AC priority 2

Since we have PWs to different PEs, we have twice the verification. You can see the PWs are up and operational, that is the first thing we need to highlight.

R1#sh l2vpn atom vc | in 40
pw4001    192.168.1.5     4001       p2p    2PE_2CE_2AC_400          UP
pw4002    192.168.1.5     4002       p2p    2PE_2CE_2AC_400          STANDBY
pw4011    192.168.1.6     4011       p2p    2PE_2CE_2AC_401          UP
pw4012    192.168.1.6     4012       p2p    2PE_2CE_2AC_401          STANDBY

Next we have to look at the labels allocated, 34 is used for the PW and 24501 is used to reach R5. Label 530 is used by R5 for the PW.

R1#sh l2vpn atom vc pseudowire 4001 detail | in label
    Last label FSM state change time: 00:34:08
    Output interface: Gi1.115, imposed label stack {24501 530}
  SSO Descriptor: 192.168.1.5/4001, local label: 34

R1#show mpls forwarding-table labels 34
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop
Label      Label      or Tunnel Id     Switched      interface
34         No Label   l2ckt(26)        59980         Gi2        point2point

R1#show mpls forwarding-table labels 23
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop
Label      Label      or Tunnel Id     Switched      interface
23         24202      192.168.1.5/32   0             Gi1.112    10.1.12.12
           24501      192.168.1.5/32   0             Gi1.115    10.1.15.15


Same as above, label 39 is used for the PW, label 24207 is used to reach R6 and label 33 is used by R6 for the PW to reach R1. It is very important to know how to identify what labels are used for what purpose. 

R1#sh l2vpn atom vc pseudowire 4011 detail | in label
    Last label FSM state change time: 00:31:24
    Output interface: Gi1.112, imposed label stack {24207 33}
  SSO Descriptor: 192.168.1.6/4011, local label: 39


R1#show mpls forwarding-table labels 39
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop
Label      Label      or Tunnel Id     Switched      interface
39         No Label   l2ckt(29)        25468         Gi2        point2point


R1#show mpls forwarding-table labels 22
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop
Label      Label      or Tunnel Id     Switched      interface
22         24207      192.168.1.6/32   0             Gi1.112    10.1.12.12
           24508      192.168.1.6/32   0             Gi1.115    10.1.15.15

CE Verification
R13#sh ip eigrp nei
EIGRP-IPv4 Neighbors for AS(1)
H   Address                 Interface              Hold Uptime   SRTT   RTO  Q  Seq
                                                   (sec)         (ms)       Cnt Num
6   192.168.41.10           Gi2.401                  14 00:21:25   45   270  0  155
5   192.168.40.9            Gi2.400                  14 00:42:21 1070  5000  0  14

So we have connectivity on R13 to R9 and R10 respectively. "Q" counts are 0 which means that updates are being exchanged. 


Thanks for stopping by!
Rob Riker, CCIE #50693

Wednesday, December 14, 2016

CCIE SPv4 - MPLS L2VPN P2P EPL AToM VPWS with the L2VPN Protocol CLI - VLAN and QinQ

Software versions:
IOS XE 15.5
IOS XR 5.3

The topology for this demo:
In this post we will be taking the previous "Port" based configuration and leveraging the service instance for both "encapsulation dot1q VLAN" "VLAN" and "encapsulation dot1q VLAN second-dot1q VLAN" "QinQ" variations. Just like in the "Port" based configuration, the service instance is used to multiplex the port to support several configuration options that the EFP or Ethernet Flow Point capability is design to do. As discussed in previous posts, the EFP allows the SP to connect several customers to a single interface and, depending on the services needed, to selectively map the "service instance" to a "context", decoupling the interface from the service it is providing access to. This greatly increases the scale, and is supported for both P2P (EPL/EVPL), MP2MP (VPLS/H-VPLS) and P2MP (E-TREE or Rooted VPLS). 

R1 and R6 are the PEs providing access into the SP core, R10 connecting to R6 and R13 to R1. Ihave OSPFv2 running on R13 and R10 to proove that there is dataplane connectivity between the CEs. We'll start out with the VLAN configuration variant to highlight the fact that if there are customers that require at least 1 VLAN, we'll be able to meet that need. The QinQ option will be visited a little later, very similar configuration, but with 2 VLAN tags. 

To level set between the 2 variations, the only configuration difference is the service instance at the interface level, the VLAN variation has only a single VLAN encapsulated, where the QinQ variation has 2. Beyond that, the rest of the configuration is identical, I'll include all the necessary configuration to make sure you see the difference. 

The VLAN Variant

R1
interface GigabitEthernet2
 service instance 16 ethernet
  encapsulation dot1q 1013
!
interface pseudowire16
 encapsulation mpls
 neighbor 192.168.1.6 16
!
l2vpn xconnect context VLAN
 member pseudowire16
 member GigabitEthernet2 service-instance 16

The interface level configuration is the same as Inter-VLAN routing without an IP address configured at the interface level. 

The pseudowire configuration set the encapsulation to MPLS and the neighbor to R6, mapping to the VC-ID of 16.

The xconnect context has 2 members, pseudowire 16 and G2 service instance 16, providing the mapping from interface to bridge. As traffic from R13 comes into R1 on G2 SI 16, it will be immediately encap'd into MPLS and tLDP to R6 which will place the traffic onto G2 SI 16 out to R10, thus completely the circuit. 

R6
interface GigabitEthernet2
 service instance 16 ethernet
  encapsulation dot1q 1013
!
interface pseudowire16
 encapsulation mpls
 neighbor 192.168.1.1 16
!
l2vpn xconnect context VLAN
 member pseudowire16
 member GigabitEthernet2 service-instance 16

I won't bore you with another breakdown, R1's config breakdown works on R6 😉.



So now we have completed the configuration between R1 and R6. Since we are dealing with P2P connections ro "xconnects", there are several debugs that show output of the AC or attachment circuit, PW or pseudowire and other details. 

debug l2vpn xconnect event
debug l2vpn xconnect initialization

A couple things to point out, [192.168.1.1:16] indicates the PW; [Gi2:1013] indicates the SI.
If you leave the debugs running while you are enabling/disabling capabilities, be patient, there is a lot of update/sync type output.

XC VPWS[BF000001:192.168.1.1:16]: Update, i/f 4002
XC VPWS[BF000001:192.168.1.1:16]: Circuit attributes from client:
XC VPWS[BF000001:192.168.1.1:16]:  Payload encap: Ethernet
XC VPWS[BF000001:192.168.1.1:16]:  VLAN ID: 0
XC VPWS[BF000001:192.168.1.1:16]:  Loadbalance mode: None
XC VPWS[BF000001:192.168.1.1:16]:  Loadbalance Flow class: none
XC VPWS[BF000001:Gi2:1013]: Send active circuit attributes
XC VPWS[BF000001:Gi2:1013]: Circuit attributes to client:
XC VPWS[BF000001:Gi2:1013]:  Payload encap: Ethernet
XC VPWS[BF000001:Gi2:1013]:  VLAN ID: 0
XC VPWS[BF000001:Gi2:1013]:  Loadbalance mode: None
XC VPWS[BF000001:Gi2:1013]:  Loadbalance Flow class: none
XC VPWS[BF000001:192.168.1.1:16]: Update, i/f 4002
XC VPWS[BF000001:192.168.1.1:16]: Circuit attributes from client:
XC VPWS[BF000001:192.168.1.1:16]:  Interface handle: 0x4002
XC VPWS[BF000001:192.168.1.1:16]:  Status: UP (0x1)
XC VPWS[BF000001:192.168.1.1:16]:  Payload encap: Ethernet
XC VPWS[BF000001:192.168.1.1:16]:  Circuit Encap: Ethernet
XC VPWS[BF000001:192.168.1.1:16]:  VCCV CC: 0x7
XC VPWS[BF000001:192.168.1.1:16]:  Segment type: AToM
XC VPWS[BF000001:192.168.1.1:16]:  Control Word: yes
XC VPWS[BF000001:192.168.1.1:16]:  Fast Switchover: no
XC VPWS[BF000001:192.168.1.1:16]:  MTU: 1500
XC VPWS[BF000001:192.168.1.1:16]:  I/F Str: pw16
XC VPWS[BF000001:192.168.1.1:16]:  Circuit string: 192.168.1.1:16
XC VPWS[BF000001:192.168.1.1:16]: Received status change, status is UP
XC VPWS[BF000001:Gi2:1013]: Circuit attributes to client:
XC VPWS[BF000001:Gi2:1013]:  Interface handle: 0x4002
XC VPWS[BF000001:Gi2:1013]:  Status: UP (0x1)
XC VPWS[BF000001:Gi2:1013]:  Payload encap: Ethernet
XC VPWS[BF000001:Gi2:1013]:  Circuit Encap: Ethernet
XC VPWS[BF000001:Gi2:1013]:  VCCV CC: 0x7
XC VPWS[BF000001:Gi2:1013]:  Segment type: AToM
XC VPWS[BF000001:Gi2:1013]:  Control Word: yes
XC VPWS[BF000001:Gi2:1013]:  Fast Switchover: no
XC VPWS[BF000001:Gi2:1013]:  MTU: 1500
XC VPWS[BF000001:Gi2:1013]:  I/F Str: pw16
XC VPWS[BF000001:Gi2:1013]:  Circuit string: 192.168.1.1:16
XC: MPLS peer 192.168.1.1 vcid 16, VC state UP


So as you can see, the VC is up. Now it's time to look at some of the specific outputs, like the VC details, MPLS forwarding table, knowing which labels equal to forwarding and others to local mappings, how to correlate the outgoing label to the PW. Let's take a look at the basics first and then take a walk into the weeds.

R1#sh l2vpn atom vc

                                       Service
Interface Peer ID         VC ID      Type   Name                     Status
--------- --------------- ---------- ------ ------------------------ ----------
pw16      192.168.1.6     16         p2p    VLAN                     UP

So we see that PW16 is up and operational.

R1#show mpls l2transport vc

Local intf     Local circuit              Dest address    VC ID      Status
-------------  -------------------------- --------------- ---------- ----------
Gi2            Eth VLAN 1013              192.168.1.6     16         UP

Pretty much the same output, slightly different though.


R1#show xconnect all
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 mpls 192.168.1.6:16               UP   ac Gi2:1013(Eth VLAN)           UP

This output gives us a bit more info, like the PW and the AC info. 


Let's take a deeper look at the detailed output of the atom vc output.


R1#show l2vpn atom vc pseudowire 16 detail
pseudowire16 is up, VC status is up PW type: Ethernet
  Create time: 1d01h, last status change time: 00:09:09
    Last label FSM state change time: 00:09:09
  Destination address: 192.168.1.6 VC ID: 16
    Output interface: Gi1.112, imposed label stack {24207 30}
    Preferred path: not configured
    Default path: active
    Next hop: 10.1.12.12
  Member of xconnect service VLAN
    Associated member Gi2 is up, status is up
    Interworking type is Ethernet
    Service id: 0x31000001
  Signaling protocol: LDP, peer 192.168.1.6:0 up
    Targeted Hello: 192.168.1.1(LDP Id) -> 192.168.1.6, LDP is UP
    Graceful restart: not configured and not enabled
    Non stop routing: not configured and not enabled
    PWid FEC (128), VC ID: 16
    Status TLV support (local/remote)         : enabled/supported
      LDP route watch                         : enabled
      Label/status state machine              : established, LruRru
      Local dataplane status received         : No fault
      BFD dataplane status received           : Not sent
      BFD peer monitor status received        : No fault
      Status received from access circuit     : No fault
      Status sent to access circuit           : No fault
      Status received from pseudowire i/f     : No fault
      Status sent to network peer             : No fault
      Status received from network peer       : No fault
      Adjacency status of remote peer         : No fault
  Sequencing: receive disabled, send disabled
  Bindings
    Parameter    Local                          Remote
    ------------ ------------------------------ ------------------------------
    Label        32                             30
    Group ID     0                              0
    Interface
    MTU          1500                           1500
    Control word on (configured: autosense)     on
    PW type      Ethernet                       Ethernet
    VCCV CV type 0x02                           0x02
                   LSPV [2]                       LSPV [2]
    VCCV CC type 0x07                           0x07
                   CW [1], RA [2], TTL [3]       CW [1], RA [2], TTL [3]
    Status TLV   enabled                        supported
  SSO Descriptor: 192.168.1.6/16, local label: 32
  Dataplane:
    SSM segment/switch IDs: 4121/4096 (used), PWID: 1
  Rx Counters
    9773 input transit packets, 960362 bytes
    0 drops, 0 seq err
  Tx Counters
    9778 output transit packets, 1255320 bytes
    0 drops

There are 2 different sets of labels to pay attention to here, the "{24207 30}" and the "32  30". 
The first set, 24207 is the outgoing label on R1 to XR2 to get to R6; 30 is the label that R6 will use to get to R1 via the P2P connection.



R1#show mpls forwarding-table 192.168.1.6
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop
Label      Label      or Tunnel Id     Switched      interface
22         24207      192.168.1.6/32   0             Gi1.112    10.1.12.12

R6#show mpls forwarding-table labels 30
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop
Label      Label      or Tunnel Id     Switched      interface
30         No Label   l2ckt(1)         9598          Gi2        point2point


The second set is specific to the PW labels. Where R1 will use label 32 to reach R6 and will use label 30 to reach R1.


R1#show mpls forwarding-table labels 32
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop
Label      Label      or Tunnel Id     Switched      interface
32         No Label   l2ckt(1)         12134         Gi2        point2point

R6#show mpls forwarding-table labels 30
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop
Label      Label      or Tunnel Id     Switched      interface
30         No Label   l2ckt(1)         9598          Gi2        point2point

R6#show mpls forwarding-table 192.168.1.1
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop
Label      Label      or Tunnel Id     Switched      interface
40         26         192.168.1.1/32   0             Gi1.26     10.2.6.2
           526        192.168.1.1/32   0             Gi1.56     10.5.6.5


Being able to map the label to the service is important, the service being the P2P PW between the  PEs, in this case, R1 to R6 is label 32 and R6 to R1 is label 30. The other label values, used to label switch to the other PE, 24207 on R1 and 26 on R6. 

Taking a look at the "targeted LDP" outputs.

R6#show mpls ldp discovery
    Targeted Hellos:
        192.168.1.6 -> 192.168.1.1 (ldp): active/passive, xmit/recv
            LDP Id: 192.168.1.1:0

We an see we have a P2P non-directly connected session up, transmitting and receiving. The label space is platform wide the "0" behind the LDP Id: 192.168.1.1:0.

More specifically...
R6#show mpls ldp discovery  detail
Targeted Hellos:
        192.168.1.6 -> 192.168.1.1 (ldp): active/passive, xmit/recv
        Enabled by: MPLS AToM Circuit,
            Hello interval: 10000 ms; Transport IP addr: 192.168.1.6
            LDP Id: 192.168.1.1:0
              Src IP addr: 192.168.1.1; Transport IP addr: 192.168.1.1
              Hold time: 90 sec; Proposed local/peer: 90/90 sec
              Reachable via 192.168.1.1/32
              Password: not required, none, in use

It tells us this is an MPLS AToM circuit and the specifics of the peering. 

We can see that R1 has advertised a number of label values. 

R6#show mpls ldp bindings neighbor 192.168.1.1 detail
Local label filtering spec: host routes

  lib entry: 10.1.11.0/24, rev 57
  lib entry: 10.1.12.0/24, rev 58
  lib entry: 10.1.15.0/24, rev 59

Not really applicable here, but it's important to know that under the hood, LDP is still the active label distribution protocol here and needs to be verified. 


Let's take a look at the CEs, just to make sure that the connectivity is up and operational.

R10#sh ip ospf int br | in Gi1.1013
Gi1.1013     1     0               172.10.13.10/24    1     BDR   1/1

R10#show ip ospf neighbor | in GigabitEthernet1.1013
13.13.13.13       1   FULL/DR         00:00:33    172.10.13.13    GigabitEthernet1.1013

Awesome, good sign!. We can see that R10 has a peering with R13 and all is well. 





The QinQ Variant

Now we'll look at the QinQ variant. This is where we will have 2 Dot1Q tags, one for the Service provider, the other for the customer. We've covered QinQ in detail in earlier posts, so I won't go into those details now. 

R1
interface GigabitEthernet2
 service instance 61 ethernet
  encapsulation dot1q 100 second-dot1q 200
!
interface pseudowire61
 encapsulation mpls
 neighbor 192.168.1.6 61
!
l2vpn xconnect context QinQ
 member GigabitEthernet2 service-instance 61
 member pseudowire61

R6
interface GigabitEthernet2
 service instance 61 ethernet
  encapsulation dot1q 100 second-dot1q 200
!
interface pseudowire61
 encapsulation mpls
 neighbor 192.168.1.1 61
!
l2vpn xconnect context QinQ
 member GigabitEthernet2 service-instance 61
 member pseudowire61


So basically all we are doing is adding an additional VLAN tag to the forwarding process. The outer tag, the service provider tag, is stripped off as it enters the SP core and is label switched through the core. The inner tag, the customer tag, is not stripped off by default and is added encapsulation through the core. There are ways to "rewrite" that information which we will be taking a look at later on. 

Let's take a look at the verification for this now, very similar to the VLAN variant, the main difference is simply a new set of labels used to switch the PW data between PEs.

R1#show l2vpn atom vc pseudowire 61 detail
pseudowire61 is up, VC status is up PW type: Ethernet
  Create time: 4d00h, last status change time: 3d23h
    Last label FSM state change time: 3d23h
  Destination address: 192.168.1.6 VC ID: 61
    Output interface: Gi1.115, imposed label stack {24508 28}
    Preferred path: not configured
    Default path: active
    Next hop: 10.1.15.15
  Member of xconnect service QinQ
    Associated member Gi2 is up, status is up
    Interworking type is Ethernet
    Service id: 0x22000002
  Signaling protocol: LDP, peer 192.168.1.6:0 up
    Targeted Hello: 192.168.1.1(LDP Id) -> 192.168.1.6, LDP is UP
    Graceful restart: not configured and not enabled
    Non stop routing: not configured and not enabled
    PWid FEC (128), VC ID: 61
    Status TLV support (local/remote)         : enabled/supported
      LDP route watch                         : enabled
      Label/status state machine              : established, LruRru
      Local dataplane status received         : No fault
      BFD dataplane status received           : Not sent
      BFD peer monitor status received        : No fault
      Status received from access circuit     : No fault
      Status sent to access circuit           : No fault
      Status received from pseudowire i/f     : No fault
      Status sent to network peer             : No fault
      Status received from network peer       : No fault
      Adjacency status of remote peer         : No fault
  Sequencing: receive disabled, send disabled
  Bindings
    Parameter    Local                          Remote
    ------------ ------------------------------ ------------------------------
    Label        39                             28
    Group ID     0                              0
    Interface
    MTU          1500                           1500
    Control word on (configured: autosense)     on
    PW type      Ethernet                       Ethernet
    VCCV CV type 0x02                           0x02
                   LSPV [2]                       LSPV [2]
    VCCV CC type 0x07                           0x07
                   CW [1], RA [2], TTL [3]       CW [1], RA [2], TTL [3]
    Status TLV   enabled                        supported
  SSO Descriptor: 192.168.1.6/61, local label: 39
  Dataplane:
    SSM segment/switch IDs: 20496/8198 (used), PWID: 2
  Rx Counters
    36973 input transit packets, 3781234 bytes
    0 drops, 0 seq err
  Tx Counters
    36987 output transit packets, 4897012 bytes
    0 drops

The 24508 label is used to reach R6's loopback. Label 28 is the label that R6 allocated to forward data over the PW. 


R1#sh mpls forwarding-table labels 22
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop
Label      Label      or Tunnel Id     Switched      interface
22         24207      192.168.1.6/32   0             Gi1.112    10.1.12.12
           24508      192.168.1.6/32   0             Gi1.115    10.1.15.15


R6#show mpls forwarding-table labels 28
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop
Label      Label      or Tunnel Id     Switched      interface
28         No Label   l2ckt(2)         3783524       Gi2        point2point


Let's verify that R10 has an active OSPFv2 adjacency.

interface GigabitEthernet1.1310
 encapsulation dot1Q 100 second-dot1q 200
 ip address 192.168.10.10 255.255.255.0
end

R10#sh ip ospf int br | in Gi1.1310
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Gi1.1310     1     0               192.168.10.10/24   1     DR    1/1

R10#sh ip route 13.14.0.0
Routing entry for 13.14.0.0/24
  Known via "ospf 1", distance 110, metric 2, type intra area
  Last update from 192.168.10.13 on GigabitEthernet1.1310, 3d08h ago
  Routing Descriptor Blocks:
  * 192.168.10.13, from 13.13.13.13, 4d00h ago, via GigabitEthernet1.1310
      Route metric is 2, traffic share count is 1

All is well. So we know that the configuration up to this point is operational.