Date created: Friday, July 4, 2014 10:33:52 AM. Last modified: Tuesday, January 17, 2017 4:53:17 PM

ME3600X/ME3800X EVC QinQ Shaping

For ME3600/3800;

Receive VLAN 10 & 20 from each customer with an outer QinQ tag and shape the QinQ tunnel. Also termiante non-QinQ customers directly into VLAN 10 and 20;

int gi0/1
 description *L2 Agg*
 switchport mode trunk
 switchport trunk allowed vlan none
 !
 service instance 110 ethernet
  description Cust1-10
  encapsulation dot1q 101 second-dot1q 10
  rewrite ingress tag pop 2 symmetric
  bridge-domain 10
 !
 service instance 120 ethernet
  description Cust1-20
  encapsulation dot1q 101 second-dot1q 20
  rewrite ingress tag pop 2 symmetric
  bridge-domain 20
 !
 service instance 210 ethernet
  description Cust2-10
  encapsulation dot1q 102 second-dot1q 10
  rewrite ingress tag pop 2 symmetric
  bridge-domain 10
 !
 service instance 220 ethernet
  description Cust2-20
  encapsulation dot1q 102 second-dot1q 20
  rewrite ingress tag pop 2 symmetric
  bridge-domain 20
 !
 service instance 10 ethernet
  description VLAN1-No-QinQ
  encapsulation dot1q 10
  rewrite ingress tag pop 1 symmetric
  bridge-domain 10

 service instance 20 ethernet
  description VLAN20-No-QinQ
  encapsulation dot1q 20
  rewrite ingress tag pop 1 symmetric
  bridge-domain 20

class-map match-any CM-Cust1-10M
match service instance ethernet 110
match service instance ethernet 120

class-map match-any CM-Cust2-20M
match service instance ethernet 210
match service instance ethernet 220

policy-map PM-CPE-OUT-PARENT
 class CM-Cust1-10M
  shape average 10000000
  service-policy PM-QOS-CPE-OUT
 class CM-Cust2-20M
  shape average 20000000
  service-policy PM-QOS-CPE-OUT
exit
exit

Ingress one can only police not shape so in and out shaping at the EFP level looks like the below:

policy-map PM-QOS-L3-CPE-IN
 class NC
  set qos-group 6
 class REALTIME
  set qos-group 5
 class APP-1
  set qos-group 4
 class APP-2
  set qos-group 3
 class APP-3
  set qos-group 2
 class APP-4
  set qos-group 1
 class class-default
  set qos-group 0
  exit

policy-map PM-QOS-CPE-80M-POLICER-IN
 class class-default
  police cir 80000000
   conform-action transmit
   exceed-action drop
   service-policy PM-QOS-L3-CPE-IN
   exit
  exit

policy-map PM-QOS-L3-CPE-OUT
 class NC-QG
  bandwidth percent 2
  queue-limit percent 100
 class REALTIME-QG
  police cir percent 10
   conform-action transmit
   exceed-action drop
  priority
  queue-limit percent 100
 class APP-1-QG
  bandwidth percent 22
  queue-limit percent 100
 class PP-2-QG
  bandwidth percent 24
  queue-limit percent 100
 class PP-3-QG
  bandwidth percent 12
  queue-limit percent 100
 class APP-4-QG
  bandwidth percent 5
  queue-limit percent 100
 class class-default
  bandwidth percent 25
  queue-limit percent 100
  exit
 exit

policy-map PM-QOS-CPE-80M-SHAPER-OUT
 class class-default
  shape average 80000000
   service-policy PM-QOS-L3-CPE-OUT
   exit
  exit

interface GigabitEthernet0/1
 description Link to CE2
 switchport trunk allowed vlan none
 switchport mode trunk
 no cdp enable
 service instance 20 ethernet
  description CE2-CustB
  encapsulation dot1q 20
  rewrite ingress tag pop 1 symmetric
  bridge-domain 20
  service-policy output PM-QOS-CPE-80M-SHAPER-OUT
  service-policy intput PM-QOS-CPE-80M-POLICER-IN