Showing posts with label E-LAN. Show all posts
Showing posts with label E-LAN. Show all posts

Sunday, January 1, 2017

CCIE SPv4 - MPLS L2VPN - EVPN and PBB-EVPN

Software versions:
IOS XE 15.5
IOS XR 5.3

The topology for this demo:
In this post we will be taking a look at both EVPN and PBB-EVPN. Everything we have previously reviewed has been on the written and lab blueprints, EVPN and PBB-EVPN are only on the written blueprint and per the SPv4 PM, EVPN and PBB EVPN will not be tested on it the lab. I will cover the topics, features, terms and a brief demo to show what it looks like to get PBB-EVPN up and running. The bulk of this post will be covering the terms and an overview of how it all works. 

One thing that I noticed as I was going through the documentation, Cisco Live videos, other publicly available white papers, RFCs, etc. It appears that EVPN for IOS XR doesn't exist. It appears that Cisco decided to go forward with PBB which is actually an enhancement to EVPN. 

Cisco Live presentations
BRKMPL-2101 - Deploying MPLS-based Layer 2 Virtual Private Networks (2014 San Francisco) - 90 Mins
BRKMPL-2333 - E-VPN & PBB-EVPN: the Next Generation of MPLS-based L2VPN (2015 San Diego) - 90 Mins

RFCs
EVPN for MPLS
https://tools.ietf.org/html/rfc7432
PBB EVPN
https://tools.ietf.org/html/rfc7623

Let's take a look at why EVPN and PBB-EVPN were developed. First of all, DCI or Data Center Interconnect with current L2VPN services like VPLS and H-VPLS don't address the scale, redundancy, load balancing, fast convergence or simplified provisioning that EVPN/PBB offer. 

Current VPLS design doesn't allow for All Active per flow redundancy. It uses a PW to exchange label information between PEs/UPEs. If a CE device is connected to 2 different VPLS PEs, only one of the PEs can be used to forward the data, both PEs can learn the MAC info of the CE. The problem that exists, just like in LAN switching, if 2 different MAC addresses are mapped to 1 IP address, how does the switch know which way to forward the data? It will flip-flop back and forth or drop the traffic as a result. 

Remember that VPLS is simply providing a "bridge" over the MPLS core and advertising MAC addresses so that the CE knows how to reach other CEs over the VPLS network. If you dual or multi home a CE-PE connection, each PE will learn that MAC address. Multiple ACs can be used on different physical interfaces, they must be physical as subinterfaces borrow the main interface MAC. The issue with this solution is its costly, 2+ ACs back to multiple PEs, $$$$$. That doesn't solve the load balancing issue though, it would require the customer to know how to run ECMP, assuming they know that. The purpose here is to take the burden off the customer and for the SP to solve that issue. 

I'm not bashing VPLS by any means, just pointing out some things to keep in mind in case you need all active load balancing, which seems to be the most common request I get when it comes to L2 services. 

Ethernet VPN - Next generation solution for E-LAN multipoint services. PEs will run MP-BGP to advertise and learn Customer MAC (C-MAC) over the core, same operationally to L3 VPN. Learning on the PE access circuits or AC via data plane transparently. There is no pseudowire involvement at all. Uses unicast for MP2P or MP2MP depending on the need. Uses Multicast, specifically ingress replication over MP2P tunnel or can use LSM, this is used by the PEs to signal interest in joining the service. 

Provider Backbone Bridge EVPN - Takes EVPN to the next level by adding a PBB header as the frame passes through the I and B Components. The EVPN forwarder add the EVPN MPLS Label (VPN Label) and a Control word, which is used to give the VPN Label a "0" value. As the Frame is forwarded out to the MPLS core, a PSN label or the Transport Label with the E-Type of 8847 or MPLS, a source address and destination address, the NH. 

So let's hit the components you will see when deploying PBB-EVPN, we'll focus on this aspect, the 802.1ah or Provider backbone bridge MAC-in-MAC forwarding capability. We'll only focus design wise on the E-LAN solution as we only need to know this topic for the written exam. 

The components!

Backbone Edge Bridges or BEBs - This is the edge of the MPLS Network. 

PBB - 2^24 service instances per B-VLAN, leverages MAC in MAC routing, MAC in MAC means that the B-MAC is used to reach the PE that is advertises that B-MAC. This gives us 16 million I-SIDs per EVI, lots of scalability at the edge. Multiple I-SIDs can be mapped to a single EVI. 

I-Component - The I-Component maps service VLAN identifiers to service instance identifiers. It adds a PBB header without a backbone VLAN tag. Learns and forwards C-MACs and maintains a mapping table of the C-MAC to B-MAC. Performs the PBB encapsulation and deencapsulation on the PIP or provider instance port. Similar to the "service instance" in VPLS

B-Component - The B-Component maps I-SIDs to backbond VID B-VIDs and adds a PBB header with a B-Tag. Learns and forwards traffic based on B-MACs learned from other PEs. Pushes and pops the B-VLAN on the CBP or Customer backbone port.

The 802.1ah standard specifies three types of BEBs, B-BEBs, I-BEBs and IB-BEBs. Only IB-BEBs are supported on ASR 9K. IOS XR supports IB-BEB bridge type at the Edge Node. IB-BEBs contain both the I-Component and the B-Component. The bridge selects the B-MAC and inserts the I-SID based on the provider (S) tag and customer (C) tag. 

EVPN Instance or EVI - Think of this like the "bridge-domain" in VPLS, it is what binds all of the PEs together to flood data between themselves, EVIs do pretty much the same stuff. The EVI instance number must match among all participating PEs and is configured under the "PBB Core" configuration, ironically enough, pointing into the core of the network. There are several methods to identify traffic as well; Port, VLAN, VLAN Bundling and VLAN Aware Bundling. There can only be one EVI per core bridge.

Ethernet Segment Identifier or ESI - This is a "site" or CE, I also like to think of it like an Attachment Circuit, not 1 for 1 but the fact it is used to connect the PE to the CE. There are several connection styles, Single and Multi Homed Device and Network. This is a uniquely identified 10 byte identifier created under the EVPN configuration. 

BGP Routes - 5 new Route Types
     [1] Ethernet Auto-Discovery (AD) Route
[2] MAC Advertisement Route
[3] Inclusive Multicast Route
[4] EthernetSegment Route
(5) IP Prefix Advertisement Route
EVPN/PBB-EVPN define a single new BGP NLRI used to carry all EVPN routes
NLRI has a new SAFI (70)
Routes serve control plane purposes, including:
MAC / IP address reachability
MAC mass withdrawal
Split-Horizon label adv.
Aliasing
Multicast endpoint discovery
Redundancy group discovery
Designated forwarder election
BGP Route Attributes
Extended Communities
ESI MPLS Label
ES-Import
MAC Mobility
Default Gateway
Router’s MAC
New BGP extended communities defined
Expand information carried in BGP routes, including:
MAC address moves
C-MAC flush notification
Redundancy mode
MAC / IP bindings of a GW
Split-horizon label encoding

Designated Forwarder Election - Used to determine a designated forwarder in dual-homed or multi-homed devices or networks. The election is performed on a per service basis. The DF filtering function for MHN differs from that for MHD. Directionality is implemented differently depending on the connectivity type. DF filtering for MHN is applied for traffic both ingress and egress on the access-facing Ethernet interfaces. DF filtering for MHD is applied only to traffic that egress the access-facing interfaces. Traffic Types are also very similar to Directionality. DF filtering for MHN impacts both unicast as well as flooded multi-destination traffic. DF filtering for MHD only applies to flooded multi-destination traffic. 

The DF idea is basically a way of determining which PE will forward frames received in from the core to the CE if multiple paths to the CE are available. The designated forwarder, depending on the deployment model, mentioned above, is leveraged will determine how the incoming traffic will be forwarded. If traffic is received in on a PE that is not the DF, it is simple discarded. 

There is no data plane support for this feature, only a minimal amount of control plane functionality is available. We'll take a look the base PBB-EVPN configuration. Once the configuration is in place, we'll verify the configuration is working and then how the logic is laid out. 


From the topology above, XR1, XR2 and XR2 will form a full mesh of iBGP L2VPN EVPN peerings with each other. Both XR and IOS can be used as BGP Route Reflectors, however I chose not to implement that. I will copy in the configuration from all three routers, but only verify on XR3 that it is working correctly. 

XR1
l2vpn
 bridge group CORE
  bridge-domain CORE
   pbb core
    evpn evi 100
   !
  !
 !
 bridge group EVPN
  bridge-domain EVPN
   interface GigabitEthernet0/0/0/2.100
   !
   pbb edge i-sid 256 core-bridge CORE
!
router bgp 1
 address-family l2vpn evpn
 !
 neighbor 192.168.1.12
  remote-as 1
  update-source Loopback0
  address-family l2vpn evpn
  !
 !
 neighbor 192.168.1.13
  remote-as 1
  update-source Loopback0
  address-family l2vpn evpn
  

XR2
l2vpn
 bridge group CORE
  bridge-domain CORE
   pbb core
    evpn evi 100
   !
  !
 !
 bridge group EVPN
  bridge-domain EVPN
   interface GigabitEthernet0/0/0/1
   !
   pbb edge i-sid 256 core-bridge CORE
!
router bgp 1
 address-family l2vpn evpn
 !
 neighbor 192.168.1.11
  remote-as 1
  update-source Loopback0
  address-family l2vpn evpn
  !
 !
 neighbor 192.168.1.13
  remote-as 1
  update-source Loopback0
  address-family l2vpn evpn


XR3
l2vpn
 bridge group CORE
  bridge-domain CORE
   pbb core
    evpn evi 100
   !
  !
 !
 bridge group EVPN
  bridge-domain EVPN
   interface GigabitEthernet0/0/0/1
   !
   pbb edge i-sid 256 core-bridge CORE
!
router bgp 1
 address-family l2vpn evpn
 !
 neighbor 192.168.1.11
  remote-as 1
  update-source Loopback0
  address-family l2vpn evpn
  !
 !
 neighbor 192.168.1.12
  remote-as 1
  update-source Loopback0
  address-family l2vpn evpn


As you can see, the configuration isn't very intensive. However, it is pretty finicky if you don't put things in the right spots. 

So let's verify this now:

RP/0/0/CPU0:XR3#sh l2vpn bridge-domain
Sun Jan  1 19:48:03.837 UTC
Legend: pp = Partially Programmed.
Bridge group: CORE, bridge-domain: CORE, id: 0, state: up, ShgId: 0, MSTi: 0
  Type: pbb-core
  Number of associated pbb-edge BDs: 1
  Aging: 300 s, MAC limit: 4000, Action: none, Notification: syslog
  Filter MAC addresses: 0
  ACs: 0 (0 up), VFIs: 0, PWs: 0 (0 up), PBBs: 1 (1 up)
  List of PBBs:
    PBB Core, state: up
  List of ACs:
  List of Access PWs:
  List of VFIs:
Bridge group: EVPN, bridge-domain: EVPN, id: 1, state: up, ShgId: 0, MSTi: 0
  Type: pbb-edge, I-SID: 256
  Aging: 300 s, MAC limit: 4000, Action: none, Notification: syslog
  Filter MAC addresses: 0
  ACs: 1 (1 up), VFIs: 0, PWs: 0 (0 up), PBBs: 1 (1 up)
  List of PBBs:
    PBB Edge, state: up, Static MAC addresses: 0
  List of ACs:
    Gi0/0/0/1, state: up, Static MAC addresses: 0
  List of Access PWs:
  List of VFIs:

The above output indicates that the 2 bridge domains, the EVPN and the CORE are both up and operational. Both have a MAC limit of 4000 and MAC aging time of 5 minutes. 

RP/0/0/CPU0:XR3#sh l2vpn pbb backbone-source-mac
Sun Jan  1 19:49:08.713 UTC
Backbone Source MAC: 0b16.212c.3742
Chassis MAC        : 0b16.212c.3742

The source MAC of XR3 is above, that will be the B-MAC that XR1 and XR1 will use as the destination address in the PBB Header.

RP/0/0/CPU0:XR3#show evpn evi detail
Sun Jan  1 19:50:26.267 UTC

EVI        Bridge Domain                Type
---------- ---------------------------- -------
100        CORE                         PBB
   Unicast Label  : 24311
   Multicast Label: 24312
   Flow Label: N
   RD Config: none
   RD Auto  : (auto) 192.168.1.13:100
   RT Auto  : 1:100
   Route Targets in Use           Type
   ------------------------------ -------
   1:100                          Import
   1:100                          Export

You should take note that we didn't configure any VRF like attributes, RD/RT when we configured PBB, the bridge domains or BGP. That is because those values are auto generated based on the EVI value and the lo0 IP address and then EVI value. As you can see, the EVI is using 1:100 as the import and export value.

RP/0/0/CPU0:XR3#show evpn evi inclusive-multicast detail
Sun Jan  1 19:50:04.499 UTC
ISID: 256, Originating IP: 192.168.1.11                             100
    Nexthop: 192.168.1.11
    Label  : 24113
    Source : Remote
ISID: 256, Originating IP: 192.168.1.12                             100
    Nexthop: 192.168.1.12
    Label  : 24211
    Source : Remote
ISID: 256, Originating IP: 192.168.1.13                             100
    Nexthop: ::
    Label  : 24312
    Source : Local

This is really important, in case you missed it eariler, inclusive multicast is critically important in the PBB environment. IM is used by the PEs to signal to the network they would like to join the PBB service. You can also see the label values that were generated by the respective PEs; XR1 - 24113; XR2 - 24211; XR3 - 24312. 

RP/0/0/CPU0:XR3#show bgp l2vpn evpn summary
BGP is operating in STANDALONE mode.

Process       RcvTblVer   bRIB/RIB   LabelVer  ImportVer  SendTblVer  StandbyVer
Speaker              27         27         27         27          27           0

Neighbor        Spk    AS MsgRcvd MsgSent   TblVer  InQ OutQ  Up/Down  St/PfxRcd
192.168.1.11      0     1     401     403       27    0    0 01:39:04          2
192.168.1.12      0     1     399     404       27    0    0 01:39:11          2

We can see that we have 2 BGP L2 VPN EVPN peerings, to XR1 and XR2 respectively. Each advertising 2 prefixes.

RP/0/0/CPU0:XR3#show bgp l2vpn evpn
Sun Jan  1 19:51:26.043 UTC
BGP router identifier 192.168.1.13, local AS number 1
BGP generic scan interval 60 secs
Non-stop routing is enabled
BGP table state: Active
Table ID: 0x0   RD version: 0
BGP main routing table version 27
BGP NSR Initial initsync version 7 (Reached)
BGP NSR/ISSU Sync-Group versions 0/0
BGP scan interval 60 secs

Status codes: s suppressed, d damped, h history, * valid, > best
              i - internal, r RIB-failure, S stale, N Nexthop-discard
Origin codes: i - IGP, e - EGP, ? - incomplete
   Network            Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 192.168.1.11:100
*>i[2][0][48][0b16.212c.3742][0]/104
                      192.168.1.11                  100      0 i
*>i[3][256][32][192.168.1.11]/80
                      192.168.1.11                  100      0 i
Route Distinguisher: 192.168.1.12:100
*>i[2][0][48][0b16.212c.3742][0]/104
                      192.168.1.12                  100      0 i
*>i[3][256][32][192.168.1.12]/80
                      192.168.1.12                  100      0 i
Route Distinguisher: 192.168.1.13:100 (default for vrf CORE)
*> [2][0][48][0b16.212c.3742][0]/104
                      0.0.0.0                                0 i
* i                   192.168.1.11                  100      0 i
* i                   192.168.1.12                  100      0 i
*>i[3][256][32][192.168.1.11]/80
                      192.168.1.11                  100      0 i
*>i[3][256][32][192.168.1.12]/80
                      192.168.1.12                  100      0 i
*> [3][256][32][192.168.1.13]/80
                      0.0.0.0                                0 i

Processed 8 prefixes, 10 paths

A couple of things to note here. You'll notice that there is some uniqueness to the outputs above, namely the bracketed [2][0][48][MAC] outputs. This is essentially the power behind PBB. 

There are 2 very important outputs, the [2] and the [3]. The [2] indicate a MAC advertisement Route and [3] indicates Inclusive Multicast Routes. We see 3 [3] followed by [256] which is the I-SID value. I have not found any documentation explaining the [32] or the reason there are /80 or /104 length prefixes. Those lengths are similar to BGP AD with BGP signaling but not exact. 


RP/0/0/CPU0:XR3#show bgp l2vpn evpn bdomain CORE [2][0][48][0b16.212c.3742][0]$
Sun Jan  1 19:53:39.924 UTC
BGP routing table entry for [2][0][48][0b16.212c.3742][0]/104, Route Distinguisher: 192.168.1.13:100
Versions:
  Process           bRIB/RIB  SendTblVer
  Speaker                 26          26
    Local Label: 24311
Last Modified: Jan  1 18:12:01.298 for 01:41:38
Paths: (3 available, best #1)
  Advertised to update-groups (with more than one peer):
    0.2
  Path #1: Received by speaker 0
  Advertised to update-groups (with more than one peer):
    0.2
  Local
    0.0.0.0 from 0.0.0.0 (192.168.1.13)
      Origin IGP, localpref 100, valid, redistributed, best, group-best, import-candidate, rib-install
      Received Path ID 0, Local Path ID 1, version 26
      Extended community: RT:1:100
      EVPN ESI: 0000.0000.0000.0000.0000
  Path #2: Received by speaker 0
  Not advertised to any peer
  Local
    192.168.1.11 (metric 4) from 192.168.1.11 (192.168.1.11)
      Received Label 24112
      Origin IGP, localpref 100, valid, internal, import-candidate, imported, rib-install
      Received Path ID 0, Local Path ID 0, version 0
      Extended community: RT:1:100
      EVPN ESI: 0000.0000.0000.0000.0000
      Source VRF: default, Source Route Distinguisher: 192.168.1.11:100
  Path #3: Received by speaker 0
  Not advertised to any peer
  Local
    192.168.1.12 (metric 2) from 192.168.1.12 (192.168.1.12)
      Received Label 24210
      Origin IGP, localpref 100, valid, internal, import-candidate, imported, rib-install
      Received Path ID 0, Local Path ID 0, version 0
      Extended community: RT:1:100
      EVPN ESI: 0000.0000.0000.0000.0000
      Source VRF: default, Source Route Distinguisher: 192.168.1.12:100

This output indicates how XR3 will use the RIB to figure out the path to XR1 and XR2. Both will use LDP to get to their respective locations. Since we are looking at a detailed output of a MAC advertisement route, this is data plane specific, No data plane support currently.

RP/0/0/CPU0:XR3#sh mpls forwarding labels 24311
Sun Jan  1 20:47:09.794 UTC
Local  Outgoing    Prefix             Outgoing     Next Hop        Bytes
Label  Label       or ID              Interface                    Switched
------ ----------- ------------------ ------------ --------------- ------------
24311  Pop         No ID              BD=0 PE      point2point     0

RP/0/0/CPU0:XR3#sh mpls forwarding labels 24312
Sun Jan  1 20:47:12.864 UTC
Local  Outgoing    Prefix             Outgoing     Next Hop        Bytes
Label  Label       or ID              Interface                    Switched
------ ----------- ------------------ ------------ --------------- ------------
24312  Pop         No ID              BD=0 PEIM    point2point     0




RP/0/0/CPU0:XR3#show bgp l2vpn evpn bdomain CORE [3][256][32][192.168.1.11]/80
Sun Jan  1 19:54:21.691 UTC
BGP routing table entry for [3][256][32][192.168.1.11]/80, Route Distinguisher: 192.168.1.13:100
Versions:
  Process           bRIB/RIB  SendTblVer
  Speaker                 27          27
Last Modified: Jan  1 18:12:01.298 for 01:42:20
Paths: (1 available, best #1)
  Not advertised to any peer
  Path #1: Received by speaker 0
  Not advertised to any peer
  Local
    192.168.1.11 (metric 4) from 192.168.1.11 (192.168.1.11)
      Origin IGP, localpref 100, valid, internal, best, group-best, import-candidate, imported
      Received Path ID 0, Local Path ID 1, version 27
      Extended community: RT:1:100
      PMSI: flags 0x00, type 6, label 24113, ID 0xc0a8010b
      Source VRF: default, Source Route Distinguisher: 192.168.1.11:100

This is Inclusive Multicast Route specific, 

Thanks for stopping by!
Rob Riker, CCIE #50693

Friday, December 23, 2016

CCIE SPv4 - MPLS L2VPN - H-VPLS BGP AD with LDP - MPLS Access - E-LAN

Software versions:
IOS XE 15.5
IOS XR 5.3

The topology for this demo:

In the previous post we took a look at H-VPLS in a very basic setup, conceptually basic, configuration wise it is rather intensive. In this post we'll take H-VPLS deeper with BGP AD with LDP signaling for E-LAN, where all the CEs can communicate with each other. 

In the previous post, we configured manual NPE pseudowires, which works in our little lab to test out the configuration, but in a large SP network with 100s of NPEs, that is not going to happen. So we implement BGP AD with LDP signaling to provide the scalability required for large environments. Since our deployment is rather small, I don't bother with BGP configuration scaling techniques, just a couple of neighbor statements where needed to get functionality working. 

We've taken a look at VPLS with BGP AD in prior posts, so the BGP configuration there is what we'll use here. We'll be activating the "l2vpn vpls" address family and this is what we'll enable the propagation of NLRI between the NPEs so that the SP Access where the UPEs sit will be able to advertise and learn information from the NPEs and provide end to end connectivity. We'll start with the NPE configuration and work our way out to the customer. I didn't configure it that way, I started on the Customer, then the UPE, then the NPEs, then the went back to make sure it was working. It was my way of proving each step and the order of operations were followed. It also allows me to see the minimum required level of configuration needed to get the function working.

NPEs

R4
template type pseudowire HVPLS
 encapsulation mpls
 sequencing both
 control-word include

 signaling protocol ldp
!
interface pseudowire34100
  source template type pseudowire HVPLS
 encapsulation mpls
 neighbor 192.168.1.3 34100

 signaling protocol ldp
!
l2vpn vfi context VPLS_100
 vpn id 100
 autodiscovery bgp signaling ldp
  route-target export 100:50693
  route-target import 100:50693

  no auto-route-target
!
bridge-domain 100
 member vfi VPLS_100

 member pseudowire34100
!
router bgp 50693
 bgp log-neighbor-changes
 neighbor 192.168.1.2 remote-as 50693
 neighbor 192.168.1.2 update-source Loopback0
 neighbor 192.168.1.5 remote-as 50693
 neighbor 192.168.1.5 update-source Loopback0
 !
 address-family l2vpn vpls
  neighbor 192.168.1.2 activate
  neighbor 192.168.1.2 prefix-length-size 2
  neighbor 192.168.1.5 activate

  neighbor 192.168.1.5 prefix-length-size 2


R5
template type pseudowire HVPLS
 encapsulation mpls
 sequencing both
 control-word include

 signaling protocol ldp
!
interface pseudowire56100
  source template type pseudowire HVPLS
 encapsulation mpls
 neighbor 192.168.1.6 56100

 signaling protocol ldp
!
l2vpn vfi context VPLS_100
 vpn id 100
 autodiscovery bgp signaling ldp
  route-target export 100:50693

  route-target import 100:50693
!
bridge-domain 100
 member vfi VPLS_100

 member pseudowire56100
!
router bgp 50693
 bgp log-neighbor-changes
 neighbor 192.168.1.2 remote-as 50693
 neighbor 192.168.1.2 update-source Loopback0
 neighbor 192.168.1.4 remote-as 50693
 neighbor 192.168.1.4 update-source Loopback0
 !
 address-family l2vpn vpls
  neighbor 192.168.1.2 activate
  neighbor 192.168.1.2 prefix-length-size 2
  neighbor 192.168.1.4 activate

  neighbor 192.168.1.4 prefix-length-size 2


R2
template type pseudowire HVPLS
 encapsulation mpls
 sequencing both
 control-word include

 signaling protocol ldp
!
interface pseudowire12100
  source template type pseudowire HVPLS
 encapsulation mpls
 neighbor 192.168.1.1 12100

 signaling protocol ldp
!
l2vpn vfi context VPLS_100
 vpn id 100
 autodiscovery bgp signaling ldp
  route-target export 100:50693
  route-target import 100:50693

  no auto-route-target
!
bridge-domain 100
 member vfi VPLS_100

 member pseudowire12100
!
router bgp 50693
 bgp log-neighbor-changes
 neighbor 192.168.1.4 remote-as 50693
 neighbor 192.168.1.4 update-source Loopback0
 neighbor 192.168.1.5 remote-as 50693
 neighbor 192.168.1.5 update-source Loopback0
 !
 address-family l2vpn vpls
  neighbor 192.168.1.4 activate
  neighbor 192.168.1.4 prefix-length-size 2
  neighbor 192.168.1.5 activate

  neighbor 192.168.1.5 prefix-length-size 2



UPE Configuration

R3
template type pseudowire HVPLS
 encapsulation mpls
 sequencing both
 control-word include

 signaling protocol ldp
!
interface pseudowire34100
  source template type pseudowire HVPLS
 encapsulation mpls
 neighbor 192.168.1.4 34100

 signaling protocol ldp
!
l2vpn xconnect context VPLS_100
 member GigabitEthernet2 service-instance 100

 member pseudowire34100


R6
template type pseudowire HVPLS
 encapsulation mpls
 sequencing both
 control-word include

 signaling protocol ldp
!
interface pseudowire56100
  source template type pseudowire HVPLS
 encapsulation mpls
 neighbor 192.168.1.5 56100

 signaling protocol ldp
!
l2vpn xconnect context VPLS_100
 member GigabitEthernet2 service-instance 100

 member pseudowire56100


R1
template type pseudowire HVPLS
 encapsulation mpls
 sequencing both
 control-word include

 signaling protocol ldp
!
interface pseudowire12100
  source template type pseudowire HVPLS
 encapsulation mpls
 neighbor 192.168.1.2 12100

 signaling protocol ldp
!
l2vpn xconnect context VPLS_100
 member GigabitEthernet2 service-instance 100

 member pseudowire12100


Now that we have everything configured, in my testing, it took on average 2-4 minutes for BGP to run best path and propagate information. 

We'll verify the VPLS part and make sure all is well with BGP.

R3
R3#sh xc all | in 100
UP pri   ac Gi2:100(Eth VLAN)            UP mpls 192.168.1.4:34100            UP

R3#sh l2vpn service xconnect all | in 100
VPWS name: VPLS_100, State: UP
  Gi2                            Gi2:100(Eth VLAN)               0     UP  UP
  pw34100                        192.168.1.4:34100(MPLS)         0     UP  UP

We can see that the UPE configuration is good and that the peering to R4 is operational.


NPE Verification:

R4
R4#sh l2vpn service vfi name VPLS_100 | b Interface
  Interface          Group       Encapsulation                   Prio  St  XC St
  ---------          -----       -------------                   ----  --  -----
VPLS name: VPLS_100, State: UP
  pw100002                       VPLS_100(VFI)                   0     UP  UP
  pw100005           core_pw     192.168.1.5:100(MPLS)           0     UP  UP
  pw100003           core_pw     192.168.1.2:100(MPLS)           0     UP  UP
  pw34100            core_pw     192.168.1.3:34100(MPLS)         0     UP  UP


We can see that the l2vpn service is up and operational, this output and the next are centric to the VPLS aspect, this one specifically highlights all parts of the service, pseudowires to the other NPEs and the UPE. pw100002 specifically points to the operational status of the VFI instance. 


R4#show l2vpn vfi name VPLS_100
Legend: RT=Route-target, S=Split-horizon, Y=Yes, N=No

VFI name: VPLS_100, state: up, type: multipoint, signaling: LDP
  VPN ID: 100, VPLS-ID: 50693:100
  RD: 50693:100, RT: 100:50693,
  Bridge-Domain 100 attachment circuits:
  Pseudo-port interface: pseudowire100002
  Interface          Peer Address     VC ID        Discovered Router ID    S
  pseudowire100005   192.168.1.5      100          192.168.1.5             Y
  pseudowire100003   192.168.1.2      100          192.168.1.2             Y
  pseudowire34100    192.168.1.3      34100        n/a                     N


Like the previous output, vfi centric, however this is more specific to the actual forwarding of traffic on the NPE, we see 3 different psuedowires, 2 to the other NPEs and 1 to the UPE, you'll see that split horizon is enabled on the NPE facing pseudowires. You'll also see the "Discovered Router ID", this is an indication that BGP AD is being used, you normally won't see that, you'll see the pseudowire info and the VC-ID used to reach that remote device, here we see that R5 and R2 show up. but R3 we see the "n/a", meaning that R3 is statically assigned and not running BGP AD.



R4#sh bgp l2vpn vpls all summary
BGP router identifier 192.168.1.4, local AS number 50693
BGP table version is 7, main routing table version 7
3 network entries using 792 bytes of memory
3 path entries using 408 bytes of memory
2/2 BGP path/bestpath attribute entries using 496 bytes of memory
1 BGP extended community entries using 40 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 1736 total bytes of memory
BGP activity 4/1 prefixes, 4/1 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.1.2     4        50693     139     139        7    0    0 02:02:10        1
192.168.1.5     4        50693     125     128        7    0    0 01:50:17        1

We see that we have connectivity to R2 and R5, and we're learning 1 pfx from each, however this isn't a "prefix" so to speak, but rather a MAC from that router. 



R4#sh bgp l2vpn vpls all
BGP table version is 7, local router ID is 192.168.1.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 50693:100
 *>i 50693:100:192.168.1.2/96
                       192.168.1.2              0    100      0 ?
 *>  50693:100:192.168.1.4/96
                       0.0.0.0                            32768 ?
 *>i 50693:100:192.168.1.5/96
                       192.168.1.5              0    100      0 ?

We can see that we have /96 prefixes learned, the RD:RID of the remote device, this is a good sign of solid propagation of MAC learned from the remote peer.


R4#sh bgp l2vpn vpls all 192.168.1.2
BGP routing table entry for 50693:100:192.168.1.2/96, version 2
Paths: (1 available, best #1, table L2VPN-VPLS-BGP-Table)
  Not advertised to any peer
  Refresh Epoch 1
  Local
    192.168.1.2 (metric 4) from 192.168.1.2 (192.168.1.2)
      Origin incomplete, metric 0, localpref 100, valid, internal, best, AGI version(1090519043)
      Extended Community: RT:100:50693 L2VPN AGI:50693:100
      mpls labels in/out 16777215/16777215
      rx pathid: 0, tx pathid: 0x0

We take a deeper look at what R2 has advertised to us, we see the AGI info is the same as the RT and RD, all of these values must match in order for R4 to learn the routes. Another thing to take note on is that the "mpls labels" are 16777215, which simply means max value or not used. BGP signaling for VPLS doesn't exchange labels, it exchanges details on how the label should be derived. The quickest way to find that out is to look at the atom DB.


R4#show l2vpn atom vc pseudowire 100003 detail | in label
    Last label FSM state change time: 02:52:05
    Output interface: Gi1.154, imposed label stack {24510 33}
  SSO Descriptor: 192.168.1.2/100, local label: 51

This output shows that label 51 is allocated for the p2p pseudowire.

R4#show mpls forwarding-table labels 51
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop
Label      Label      or Tunnel Id     Switched      interface
51         No Label   l2ckt(8)         0             none       point2point

This output shows that label 24510 is used to reach the next hop, which at the moment, hasn't incremented the "label switched" portion, which is no big deal. 

R4#show mpls forwarding-table labels 40
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop
Label      Label      or Tunnel Id     Switched      interface
40         527        192.168.1.2/32   7884          Gi1.45     10.4.5.5
           24510      192.168.1.2/32   0             Gi1.154    10.15.4.15



R4#sh bridge-domain 100
Bridge-domain 100 (3 ports in all)
State: UP                    Mac learning: Enabled
Aging-Timer: 300 second(s)
    vfi VPLS_100 neighbor 192.168.1.3 34100
    vfi VPLS_100 neighbor 192.168.1.2 100
    vfi VPLS_100 neighbor 192.168.1.5 100
   AED MAC address    Policy  Tag       Age  Pseudoport
   1   FFFF.FFFF.FFFF flood   static    0    OLIST_PTR:0xe7fa6c70
   0   000C.29BA.0E21 forward dynamic   297  VPLS_100.1004016
   0   000C.2994.B818 forward dynamic   298  VPLS_100.1004019
   0   000C.2990.89E9 forward dynamic   296  VPLS_100.1004017


This output shows that we have dynamically learned about 3 UPEs who have forwarded data into the NPE core. WE see the three peers, 2 of them being NPE peers, the other is the UPE peer. Since R2 and R5 were learned dynamically, there "VC-ID" is 100 and not statically defined like R3 is. 


Customer verification:

R7
R7#sh ip eigrp nei
EIGRP-IPv4 Neighbors for AS(1)
H   Address                 Interface              Hold Uptime   SRTT   RTO  Q  Seq
                                                   (sec)         (ms)       Cnt Num
8   192.168.100.10          Gi1.100                  14 02:56:22  257  1542  0  462
9   192.168.100.13          Gi1.100                  10 02:57:58  334  2004  0  495


All is well!

Thanks for stopping by!
Rob Riker, CCIE #50693