l2 vfi l2vpn manual etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
l2 vfi l2vpn manual etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster

26 Ağustos 2015 Çarşamba

Cisco VPLS 2

This post is a continuation of MPLS L2VPNs since it’s describing MPLS VPLS running on the top of the same LDP infrastructure.

Well a disadvantage of MPLS L2VPN is scalability in configurations where you need to connect more than two sites since L2VPNs is  a point-to-point technology. Creating more and more L2VPNs might be a bit complicated and time consuming especially in case of troubleshooting MPLS L2VPN problems.
To solve these problems VPLS was created and  yeeeeees (!!)  is that it’s a point-to-multipoint technology.
Imagine that you need to span a VLAN across three Data Centers in different localizations and you own the core network connecting all sites. What you need is VPLS that will simply create a “cloud hub” thanks to MPLS running in your core. Here’s an example topology:

This article describes a simple and effective VPLS configuration running on LDP used for L2VPN in previous article.
On that note, I will mention that there is another way of implementing VPLS based on MP-BGP. This method is a little bit more complicated and involves upgrading your iBGP configuration; however, it’s automated to a point where you don’t have to defines all neighbours of a VPLS to create a full mesh (as described below) and requires defining VPN ID only (it’s using build-in auto-discovery to automatically create the full mesh).

In my opinion, both MPLS technologies meaning L2VPNs and VPLS based on LDP are extremely easy to implement and provide really cost effective way of tunnelling traffic through your network!


Steps 1. Configuring Provider router (P router) configuration - routers building the core
– Enabling LDP protocol which is responsible exchanging label mapping information’s between Label Switch Routers (LSR):
mpls label protocol ldp
– Forcing Router-ID of LSR to loopback:
mpls ldp router-id Loopback0 force
– Enabling MPLS on needed interfaces:
mpls ip
Changing MTU on interfaces running MPLS:
mtu 1564
Double labeling needs to be added to an MPLS frame on PE router. The first one is used for label switching and the second one carries the L2VPN label. MTU 1564 allows to q-in-q tunnels to be carried over L2VPNs.
– Enabling CEF if not on by default.


Step 2. Configuring Provider Edge router (PE router) configuration – these router/L3 switch are found on a MPLS edges. They are responsible for adding and removing MPLS tags. Because of it, these handling these packets will be using more hardware performance and if not taken care of in hardware this might increase the CPU utilisation (example C7200s).
As described above enabling LDP on a router:
mpls label protocol ldp
mpls ldp logging neighbor-changes
mpls ldp router-id Loopback0

Under MPLS enabled interfaces:
mpls ip
mtu 1564

To create a VPLS tunnel, PEs are defining “l2 vfi” that include all the VPLS tunnel configuration. They are attached to VLAN interfaces, using xconnect command (similarly to L2VPN) and finally as you can imagine, all is being added to a physical interface as described below.
Defining VPLS VLAN ID and its neighbours:
l2 vfi l2vpn manual
vpn id 1
neighbor 10.0.0.2 encapsulation mpls
neighbor 10.0.0.3 encapsulation mpls
neighbor 10.0.0.4 encapsulation mpls

Attaching l2 vfi to VLAN using xcommand:
interface Vlan2
no ip address
xconnect vfi l2vpn

Attaching VLAN 2 to an interface:
interface FastEthernet4/2
no ip address
switchport
switchport trunk encapsulation dot1q
switchport mode trunk

Step 3. Configuring L2 switches
These switches are used to provide more ports for other potential VPLS VPNs while saving ports on your PEs.
Link connecting PE with a L2 switch is a trunk.
Other L2 switch ports are used to connect customer’s/network devices to VPLSs.
Configuration of this switch is omitted since defining one trunk and a number of access ports shouldn’t be a problem.
Troubleshooting:
– Make sure that the CEF is enabled on all P and PE routers
– Make sure that MPLS and corrct MTU is enabled on all required interfaces
– Make sure that all CE have C configuration plus VFI configuration
– Confirm consistency of th MPLS VPN tag and basic port configuration
– For the status of the VPN per neighbor do:
sh mpls l2 vc
– To check the MPLS table and confirm that the traffic is not being blackholed do:
sh mpls forwarding-table
– To check VFI info’s do:
sh vfi..
– To check next hop details by label do:
sh xconnect all details —- check remote labels of the next hops
sh mpls forwarding-table labels xxx —- confirm next hop neighbor

VPLS LAB 1 - Example

Before you configure VPLS, you need to ensure that IP routing and MPLS forwarding are configured properly and that the minimal Layer 2 VPN connectivity requirements

Every PE router has a loopback interface that is configured with an IP address and a /32 network mask >  Router ID in LDP signaling for the PE router.

PE routers have IP connectivity to each other >  LDP Neighborship

PE routers have MPLS label switched paths (LSPs) for those host route > Activate MPLS Routing


Attachment circuits that are used in VPLS can be Layer 2 switch-port interfaces, Gigabit Ethernet interfaces on intelligent line cards, or other interfaces with bridged encapsulation.

Before going into the configuration steps for Layer 2 switchport interface, it is necessary to explain the difference and the correlation between a service-delimiting VLAN tag and an internal VLAN tag


Service providers use service-delimiting VLAN tags to identify different types of customer traffic. Because a service-delimiting VLAN tag usually has only local significance, it is removed at the ingress PE router. The egress PE router might have a different service-delimiting VLAN tag, which is added to the packets that are sending to a CE router.


An internal VLAN tag identifies a bridge domain on a PE router. In the context of VPLS, it is the virtual switch.
 Conceptually, service-delimiting VLAN tags and internal VLAN tags are two independent entities.

A port can operate in 3 different modes as:

Access :The interface sends and accepts untagged Ethernet packets only. Tagged Ethernet VLAN packets are dropped.

interface FastEthernet4/3
 no ip address
 switchport
 switchport access vlan 2
 switchport mode access



 Trunk : The interface sends and receives tagged Ethernet VLAN packets and native VLAN packets.

 interface FastEthernet4/3
 no ip address
 switchport
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 2-10
 switchport mode trunk
 


Dot1q Tunnel : Any packet, tagged or untagged, is forwarded through a QinQ tunnel. A QinQ tunnel is identified by the access VLAN tag that is configured on the Layer 2 switchport interface. The access VLAN tag is added to the packet at the ingress tunnel interface and removed at the egress tunnel interface, which means that the VLAN tags must be identical at both interfaces for a given QinQ tunnel.


QinQ tunneling is an Ethernet native tunneling mechanism that stacks VLAN tags together in a similar fashion to the MPLS labels. The outer VLAN tag that is added at the tunnel ingress interface is the access VLAN tag that is configured on the Layer 2 switchport interface. The purpose of the outer VLAN tag is similar to that of the tunnel label in an MPLS-encapsulated pseudowire packet. The outer VLAN tag is to forward the packet from the ingress tunnel endpoint to the egress tunnel endpoint and hide the inner VLAN tag from the transit network.
In VPLS, the transit network is an MPLS network, and a tunnel label is used to move packets from the LSP ingress endpoint to the egress endpoint. Because the function of an outer VLAN tag is effectively replaced by an MPLS tunnel label, the outer VLAN tag is no longer added to the Ethernet header when the Layer 2 switchport interface is configured as dot1q-tunnel mode. That is the main difference in the way dot1q-tunnel mode operates in VPLS versus normal bridging.


The main difference is dot1q tunneling and VPLS mechanism is ;
the outer VLAN tag is replaced with MPLS Tunnel Labels !!!!! 


 interface FastEthernet4/3
 no ip address
 switchport
 switchport access vlan 2
 switchport mode dot1q-tunnel



Configuring VFI : 

We need mapping mechanisim like ( Frame Relay = DLCI, ATM= PVC etc)

In this case;

VPLS = VFI
Also VFI needs some VPN ID.

l2 vfi blue manual
 vpn id 100
 neighbor 10.0.0.2 encapsulation mpls
 neighbor 10.0.0.3 encapsulation mpls

 neighbor 10.0.0.4 encapsulation mpls


Associating Attachment Circuits to the VFI:

The final step is building the many-to-many mapping involves how to associate attachment circuits to a VFI in configuration.


 Step 1.
  VPLS-PE1(config)#interface vlan 2


Note that the VLAN ID needs to be identical to the service-delimiting VLAN tag when using Layer 2 switchport trunk mode. Otherwise, it can be the tag value of an unused VLAN.

Step 2.
Attach the VFI to the VLAN interface:

  VPLS-PE1(config-if)#xconnect vfi blue





CE1 sends and receives untagged Ethernet packets, null service-delimiting VLAN tags.
PE1 configures the switchport mode as dot1q-tunnel to forward packets that have an unmodified Ethernet header. 


The internal VLAN that is associated with the switchport is 2.


CE2 sends and receives tagged Ethernet VLAN packets of which the service-delimiting VLAN tag is 4. PE2 configures the switchport mode as a trunk to remove or add the service-delimiting VLAN tag accordingly. The internal VLAN that is associated with the switchport is 4.

CE3 sends and receives untagged Ethernet packets that, null service-delimiting VLAN tags. PE3 configures the switchport mode as access to forward all untagged packets. The internal VLAN that is associated with the switchport is 8.

CE4 sends and receives tagged Ethernet VLAN packets of which the service-delimiting VLAN tag is 10. PE4 configures the switchport mode as a trunk to remove or add the service-delimiting VLAN tag accordingly. The internal VLAN that is associated with the switchport is 10.




hostname PE1
!
mpls label protocol ldp
mpls ldp logging neighbor-changes
mpls ldp router-id Loopback0
!
l2 vfi l2vpn manual
 vpn id 1
 neighbor 10.0.0.2 encapsulation mpls
 neighbor 10.0.0.3 encapsulation mpls
 neighbor 10.0.0.4 encapsulation mpls
!
interface Loopback0
 ip address 10.0.0.1 255.255.255.255
!
interface POS3/1
 ip address 10.0.1.1 255.255.255.252
 mpls ip
!
interface FastEthernet4/2
 no ip address
 switchport
 switchport access vlan 2
 switchport mode dot1q-tunnel
!
interface Vlan2
 no ip address
 xconnect vfi l2vpn

PE2 --

hostname PE2
!
mpls label protocol ldp
mpls ldp logging neighbor-changes
mpls ldp router-id Loopback0
!
l2 vfi l2vpn manual
 vpn id 1
 neighbor 10.0.0.1 encapsulation mpls
 neighbor 10.0.0.3 encapsulation mpls
 neighbor 10.0.0.4 encapsulation mpls
!
interface Loopback0
 ip address 10.0.0.2 255.255.255.255
!
interface POS3/1
 ip address 10.0.2.1 255.255.255.252
 mpls ip
!
interface FastEthernet4/2
 no ip address
 switchport
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 4
 switchport mode trunk
!
interface Vlan4
 no ip address
 xconnect vfi l2vpn

PE3

hostname PE3
!
mpls label protocol ldp
mpls ldp logging neighbor-changes
mpls ldp router-id Loopback0
!
l2 vfi l2vpn manual
 vpn id 1
 neighbor 10.0.0.1 encapsulation mpls
 neighbor 10.0.0.2 encapsulation mpls
 neighbor 10.0.0.4 encapsulation mpls
!
interface Loopback0
 ip address 10.0.0.3 255.255.255.255
!
interface POS3/1
 ip address 10.0.3.1 255.255.255.252
 mpls ip
!
interface FastEthernet4/2
 no ip address
 switchport
 switchport access vlan 8
 switchport mode access
!
interface Vlan8
 no ip address
 xconnect vfi l2vpn

Example 15-8 shows the configuration on PE4.

Example 15-8. PE4 Configuration

hostname PE4
!
mpls label protocol ldp
mpls ldp logging neighbor-changes
mpls ldp router-id Loopback0
!
l2 vfi l2vpn manual
 vpn id 1
 neighbor 10.0.0.1 encapsulation mpls
 neighbor 10.0.0.2 encapsulation mpls
 neighbor 10.0.0.3 encapsulation mpls
!
interface Loopback0
 ip address 10.0.0.4 255.255.255.255
!
interface POS3/1
 ip address 10.0.4.1 255.255.255.252
 mpls ip
!
interface FastEthernet4/2
 no ip address
 switchport
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 10
 switchport mode trunk
!
interface Vlan10
 no ip address
 xconnect vfi l2vpn
After full connectivity is established among all CE routers, every PE router should learn all MAC addresses from the CE routers.