cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
90870
Views
40
Helpful
101
Comments
xthuijs
Cisco Employee
Cisco Employee

Introduction

In this article we'll be discussing the EVC (Ethernet Virtual Circuit) infrastructure that the ASR9000 and IOS-XR use to define L2 services.

You'll find in this article how packets coming in on an interface are being matched against an EFP (Ethernet Flow Point), how to manipulate the vlan tags and use them in XCONNECT (VPWS) or Bridging (eg VPLS) scenarios with the optional L3 endpoint to provide IRB (Integrated Route Bridging)

Core Issue

The way that IOS-XR handles EVC's is a bit different then the way that IOS handles it when for instance using the 7600.

When starting with IOS-XR and the ASR9000 there are a few things that you will want to be aware of when defining L2 services.

A couple of the key differences are:

- XR does have the concept of a trunk interface

- therefore XR cannot do vlan pruning

- XR does not strip vlan tags by default.

- XR does not have the concept of an "interface VLAN" a.k.a. SVI's (Switch Virtual Interface), instead it uses a BVI (Bridge Virtual Interface) that can be inserted into the bridge-domain.

Flexible VLAN matching

     How the ASR9000 matches traffic to an EFP

TAG rewriting

     how to modify the vlan headers and how that works

Defining L2 services

     and a comparison with IOS

Providing L3 services in L2VPN

     using IRB/BVI interfaces

Resolution

In order to define an L2 service, we need to match traffic to a particular interface. In IOS-XR and the ASR9000 we use the Ethernet Flow Point (EFP) to match this traffic. An EFP is effectively a subinterface of a physical interface with the keyword "l2transport" attached to it. This l2transport defines that we are going to use this (sub) interface for L2 Services. We can match L2 and L3 interfaces on a single physical port:

evc-overview.jpg

Flexible VLAN matching

When traffic is coming in on a port, we use the TCAM to find out which particular subinterface this traffic matches on. With that in mind there are a couple of rules as to how traffic is matched.

An EFP is defined as follows:

RP/0/RSP0/CPU0:asr(config)#int gig 0/0/0/4.100 l2transport

RP/0/RSP0/CPU0:asr(config-subif)#encapsulation ?

  default  Packets unmatched by other service instances

If a particular packet is not matching any other specific EFP on this physical port, this "Default" will capture all unmatched traffic.

  dot1ad    IEEE 802.1ad VLAN-tagged packets

  dot1q     IEEE 802.1Q VLAN-tagged packets

  untagged Packets with no explicit VLAN tag

If there is no vlan tag on the packet, the "untagged" EFP will capture this traffic, this is effectively plain ethernet and useful for instance to capture

BPDU's for instance.

When we are going to match on say dot1q encapsulated traffic we have a variaty of how we can match vlan tagged traffic (see also foot note below in the "Related Information" section on the ethertypes used).

RP/0/RSP1/CPU0:A9K-BOTTOM(config-subif)#encapsulation dot1q ?
  <1-4094>         Start of VLAN range
  <1-4094>         Single VLAN id
  any              Match any VLAN id
  priority-tagged  IEEE 802.1ad priority-tagged packets

At the first level of dot1q classification we can select a vlan, vlan-range or any. These are obvious. The option "Priority tagged" allows us to capture vlan encapped traffic that is with a vlan id of 0.

RP/0/RSP1/CPU0:A9K-BOTTOM(config-subif)#encapsulation dot1q 100 ?
  comma         comma
  exact         Do not allow further inner tags
  ingress       Perform MAC-based matching
  second-dot1q IEEE 802.1Q VLAN-tagged packets

Here is an important concept that is to be highlighted. You see the "word" exact" here. What that means is, in the absence of the keyword exact, if the outter vlan header is "100" in this example, this EFP is matched. so that means that also qinq frames that are of the 100 outter and 200 inner kind (if there is no specific EFP for the qiq combo 100/200 available) will match this EFP.

Just a few examples:

encapsulation dot1q 100: will match any number of vlan headers as long as the outter vlan id is 100

encapsulation dot1q 100 second any: will match any qiq frame where the outter vlan is 100

encapsulation dot1q 100 second 200: will match vlan tagged packets whereby the outter is 100, the inner is 200 and also a potential vlan combo of 100/200/300

encapsulation dot1q 100 second 200 exact: will match vlan tagged packets whereby the outter is 100, the inner is 200 and no other vlan tags are on the packet then these 2 specified.

Normally "longest match" will win, or better put, the most specific match will win.

ASR9000 doesn't support best match for VLAN ranges, but we do support best match if the "any" keyword is used. 

So the configuration :

EFP 1 VLAN: S-VLAN=1000, C-VLAN_range=1-4095

EFP 2 VLAN= S-VLAN=1000, C-VLAN=2000

isn't allowed because the more specific C-vlan is part of the range. The parser will reject this config upon commit.

The following options A and B, achieving the same, are allowed :

A)

EFP 1) VLAN: S-VLAN=1000, C-VLAN_range=1-1999,2001-4095

EFP 2) VLAN= S-VLAN=1000, C-VLAN=2000

B)

EFP 1) VLAN: S-VLAN=1000, C-VLAN=any

EFP 2) VLAN= S-VLAN=1000, C-VLAN=2000,

VLAN  TAG rewriting

The ASR9000/XR is capable of doing many translations on vlan to a packet.

The behavior is always symmetric (though this keyword is to be provided as part of that config command). The symmetry means that if we pop a tag on ingress, we push it back on egress.

the following rewrites are possible:

RP/0/RSP0/CPU0:A9K(config)#int gig 0/0/0/4.100 l2transport

RP/0/RSP0/CPU0:A9K(config-subif)#rewrite ingress tag ?
  pop        Remove one or more tags
  push       Push one or more tags
  translate  Replace tags with other tags

RP/0/RSP0/CPU0:A9K(config-subif)#rewrite ingress tag pop ?
  1  Remove outer tag only
  2  Remove two outermost tags

RP/0/RSP0/CPU0:A9K(config-subif)#rewrite ingress tag push ?
  dot1ad  Push a Dot1ad tag (ethertype 88a8)
  dot1q   Push a Dot1Q tag (ethertype 8100 by default, or 9100/9200 is specied on the main interface for the outter most tag)

RP/0/RSP0/CPU0:A9K(config-subif)#rewrite ingress tag push dot1q 100 ?
  second-dot1q  Push another Dot1Q tag
  symmetric     All rewrites must be symmetric

RP/0/RSP0/CPU0:A9K(config-subif)#rewrite ingress tag translate ?
  1-to-1  Replace the outermost tag with another tag
  1-to-2  Replace the outermost tag with two tags
  2-to-1  Replace the outermost two tags with one tag
  2-to-2  Replace the outermost two tags with two other tags

If you want to make a cross connect or bridge between two EFP's where one EFP is vlan 100 and the other EFP is vlan 200,

you need to make sure you pop the tags so that the vlan 100 is removed from the packet so it, by means of symmetry, will get vlan 200 on the egress

of the other EFP.

L2VPN configuration examples and comparison to 7600

The following picture highlights how to create L2 services on the ASR9000.

l2vpn.jpg

l2vpn-7600-9k.jpg

Using IRB/BVI

To provide L3 services in a bridge-domain, you can add a routed interface to the bridge domain.

What is important here is that the BVI is not vlan tagged. So in order for the EFP's to talk to the BVI, we need to pop ALL Tags on ingress!!

This means that frames with more then 2 tags cannot be natively using the BVI, unless we do some workarounds such as loopback cables to

pop more tags.

interface BVI5
ipv4 address 31.1.1.1 255.255.255.0
mac-address 0.4343.3434

! when creating the bvi verify the show int bvi to see if the mac address is correctly programmed, these macs are coming from the backplane mac table, ! if we ran out because of so many bundle interfaces etc, you may need to provide a mac manually.

interface TenGigE0/7/0/3.100 l2transport

encapsulation dot1q 100

rewrite ingress tag pop 1 symmetric

l2vpn

bridge group testing
  bridge-domain testing
   interface TenGigE0/7/0/3.100
   !
   interface GigabitEthernet0/1/0/14
   !
   routed interface BVI5
  !

Related Information

XR MTU calculations

Dot1q, Dot1ad and configuring "dot1q tunneling ethertype on the physical interface:

As per IEEE documentation, Ethertype 8100 is for 802.1q and Ethertype 88A8 is for 802.1ad.
IEEE also calls any kind of double tagging as QinQ, including dot1ad. That means that under IEEE's point of view, dot1ad = qinq.
Cisco, on the other hand, calls qinq a double dot1q, where both Ethertypes (inner and outer) are 8100.
Ethertype 9100 and 9200 were used as an option to differentiate the inner Ethertpe form the outer Ethertype,
but they are obsolete now and the standard became dot1ad (with Ethertype 88A8).
In order to configure ethertype 9100 and 9200 you have to explicitly issue the command dot1q tunneling ethertype 0x9100 or
dot1q tunneling ethertype 0x9200 under the physical interface you are configuring.
Summarizing:
encapsulation dot1q second dot1q                                     -> inner and outer ethertype are 8100
encapsulation dot1ad second dot1q                                   -> inner 8100, outer 88A8
encapsulation dot1q second dot1q (with ethertype 9100)      -> inner 8100, outer 9100
encapsulation dot1q second dot1q (with ethertype 9200)      -> inner 8100, outer 9200




Xander Thuijs, CCIE #6775

Sr. Tech Lead ASR9000

Comments
xthuijs
Cisco Employee
Cisco Employee

yes you can do that exactly like your config proposal.

xander

Renato Reis
Level 1
Level 1

Thank you so much !!!

lanzola_oplk
Community Member

Hi Xander,

Hope all is going well for you!

I was wondering if the ASR9K supports the concept of Routed-PW? If so, what routing protocols are supported for PE-CE? Is there any remarkable restriction?

Thanks in advance!

Luis

xthuijs
Cisco Employee
Cisco Employee

Hi Luis,

yes we do, it is called pseudo wire head end which is an XR4.3.0 feature.

this release will come end of this year (planned).

today you could mimick it with a PW in a BD and using a BVI.

xander

lanzola_oplk
Community Member

Excellent!

I´m running XR4.2.3 so I think the workaround will work well for me!

Thanks for your help.

Luis

Umpri
Level 1
Level 1

Hi Xander how are you!!!!

One question in connection with 4.3.0 , pwe-he is not supporting pppoe sessions, isn't it?

if we needed to solve that scenary in 4.3, we would have to do it with hairpinning, wouldn't we?

Regards

Javier

xthuijs
Cisco Employee
Cisco Employee

Hey Javier,

correct PWHE is not in 431, but beyond, either hairpinning or popping the tunnel on the adjacent PE node is the course of action you want to take today.

xander

lanzola_oplk
Community Member

Hi Alexander,

I was wondering what is the best way to convert a L2 switchport access configuration (for untagged traffic) from IOS to IOS XR on the ASR9K to provide IP access to a few servers within a Vlan? I understand that I´m able to configure this using the following methods:

  • Setting up the physical interfaces connected to the servers as l2transport and associating them to a bridge-domain with a routed-BVI. Simplest way to configure it!
  • Creating l2transport subinterfaces (EFPs) matching untagged traffic and associating them to a bridge-domain with a routed-BVI.

Are there any pros and cons (QoS Classification/Marking, ACL) when I use any of these methods?

Thanks in advance!

Luis

xthuijs
Cisco Employee
Cisco Employee

Luis,

you can go either way, the same features are available.

I think it makes more sense to define individual EFP's (so an untagged one for that service and individual or ambigious/range ones for those vlans you want to enable service on).

If you use the main interface, which is technically equivalent, then ALL vlans including untagged belong to the same service and you have little or less control when the CE side has say a misconfiguration.

regards

xander

lanzola_oplk
Community Member

Hi Alexander,

Thanks again for your valuable help!

Best regards,

Luis

701031ola
Community Member

Hi Xander,

I have a scenario where outer vlans is different(say 20-40) and inner vlan is any(ambiguous. Can I use the following configuration in this case?

interface Bundle-Ether10.100 l2transport

encapsulation dot1q 20-40 second-dot1q any


and use a BVI to have the Layer3 IP address.

Or this configuration:

interface Bundle-Ether10.100 l2transport

encapsulation dot1q 20 second-dot1q any

rewrite ingress tag pop 1 symmetric

interface Bundle-Ether10.101 l2transport

encapsulation dot1q 21 second-dot1q any

rewrite ingress tag pop 1 symmetric

interface Bundle-Ether10.102 l2transport

encapsulation dot1q 22 second-dot1q any

rewrite ingress tag pop 1 symmetric

and use a BVI to have the Layer3 IP address.

Regards,

Babatunde

xthuijs
Cisco Employee
Cisco Employee

Hi Babatunde,

ambigious vlans for EFP's (that is l2transport interfaces) can only be ambigious (that is a range) on the outer most tag. That means :

encapsulation dot1q 20-40

or encapsulation dot1q 20 second 40-50

when you do choose to use amb vlans, popping the tag is difficult because on egress we don't know what to apply back on to the egress direction, unless we have a helper application (such as DHCP/proxy) that keeps track of MAC, IP and the vlan combo to use.

With that, you can't pop tags for amb vlans, which means inherently BVI can't be used either in such designs.

It makes sense, as generally a vlan is the equivalent of an ip subnet and a bvi serves only 1.

You should move to an unamb design, that is fixed inner and outer in order to use tag pop manipulation and or use of BVI's.

xander

chatasos
Level 1
Level 1

Hi Xander,

Just wondering....Can you have one (sub)interface attached to more than one bridge-domains?

bridge group TEST1-BG

  bridge-domain TEST1-BD

   interface TenGigE0/4/0/1

   neighbor 10.201.201.105 pw-id 1

   !

bridge group TEST2-BG

  bridge-domain TEST2-BD

   interface TenGigE0/4/0/1

   neighbor 10.201.201.105 pw-id 2

If yes, can you filter the AC=>PW direction based on vlans?

i.e. in the PW=>AC direction i have:

in TEST1-BD i have traffic with 100/1 vlans coming from pw 1

in TEST2-BD i have traffic with 100/2 vlans coming from pw 2

Is there a way i can filter traffic (directly on the PW) on the opposite direction (AC=>PW) based on the outer vlan, in order to avoid using a different subif per bridge-domain?

That way, traffic with 100/1 vlans coming from TenGigE0/4/0/1 will go only to pw-id 1, while traffic with 100/2 vlans coming from TenGigE0/4/0/1 will go only to pw-id 2.

Thx,

Tassos

xthuijs
Cisco Employee
Cisco Employee

Hi Tassos,

that you can't do like that, an EFP, that is an l2transport interface, can only belong to one BD at a time.

but you can split out the vlans from a main interface into different BD's.

Something like this:

BD-X

int te0/4/0/1.100 l2transport

encap dot1q 100

BD-Y

int te0/4/0/1.200 l2transport

encap dot1q 200

effectively a BD is the equivalent of a vlan whereb you like all EFP's from the same vlan (set) to the same BD.

cheers!

xander

chatasos
Level 1
Level 1

The problem is that i'm trying to avoid subifs, because if i have 500 bridge-domains, then i'll also need 500 subifs per interface.

I was hoping to get something equivalent to an IOS L2 trunk, without much configuration.

It's strange to move from 7600/IOS to ASR9k/IOS-XR and be forced to multiply x 500 x NoOfInterfaces my interface config.

interface TenGigabitEthernet7/1

switchport

switchport trunk encapsulation dot1q

switchport trunk allowed vlan 100,200,etc

interface Vlan100

no ip address

xconnect vfi VFI-100

interface Vlan200

no ip address

xconnect vfi VFI-200

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links