多协议标签交换 (MPLS) : MPLS

差分服务MPLS网络的隧道模式

2015 年 8 月 28 日 - 机器翻译
其他版本: PDFpdf | 英语 (2015 年 4 月 22 日) | 反馈


目录


简介

本文描述差异化服务(DiffServ)多协议标签交换(MPLS)基于网络环境的建立隧道可用模式的实施。

先决条件

要求

本文档的读者应掌握以下这些主题的相关知识:

  • MPLS和MPLS虚拟私有网络(VPN)的

  • 与IP优先级、服务类型(ToS)和DiffServ相关的概念

  • 服务质量(QoS)数据包标记和分类使用模块化QoS命令行界面CLI (MQC)

使用的组件

本文档中的信息基于以下软件和硬件版本:

  • Cisco IOS软件新的QoS功能的版本12.2(13)T。版本12.1(5)T包括原始QoS功能。

  • 从3600系列的任何Cisco路由器或以上,例如支持MPLS供应商核心(p)路由器/服务商边缘路由器功能的Cisco 3660或7206。

本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。

规则

有关文档规则的详细信息,请参阅 Cisco 技术提示规则

背景信息

默认行为

此图表描述试验差分服务代码点(DSCP)的/MPLS的默认行为(EXP)位,数据包从一个用户边缘(CE)路由器移动到在MPLS核心间的另一个CE路由器:

/image/gif/paws/47815/diffserv_tunnel_01.jpg

此部分此剩余描述在默认行为图表内的活动。

标签(IP的税收– >标签) :

  • 流入的IP数据包的IP优先级复制到MPLS EXP位所有被压入的标签。

  • DSCP位的第1个三个位复制到MPLS EXP位所有被压入的标签。

  • 亦称此技术是Tos反射。

MPLS转发(标签– >标签) :

  • EXP复制到在转发或税收时被交换/被压入的新的标签。

  • 在标签强制,基础标签没有修改与被添加到当前标签栈的新的标签的值。

  • 在标签处理, EXP位没有复制下来到最近显示的标签EXP位。

标签(标签的处理– > IP) :

  • 在标签处理EXP位没有复制下来到最近显示的IP数据包的IP precedence/DSCP字段。

前Cisco IOS软件12.2(13)T Usage命令和行为

在IOS版本12.2(13)T前, set mpls experimental命令是修改MPLS EXP位的唯一的方法联机。

发表物Cisco IOS软件12.2(13)T Usage命令和行为

使用IOS版本12.2(13)T和以后, set mpls experimental命令修改允许这些选项:

注意: set mpls experimental topmost命令与旧有set mpls imposition命令是等同的。

在标签推送、交换和弹出操作期间,这两命令,与一些new命令交换机的组合,允许MPLS EXP二进制处理更加好的控制。这两命令允许您使用DiffServ隧道模式。

DiffServ隧道模式

DiffServ隧道模式引入新的每跳行为(PHB),允许在提供商网络的被区分的QoS。隧道模式在网络的边缘定义,通常在PE标签交换路由器(LSRs) (入口和出口)。您可能需要做在P路由器的变动;您必须也考虑什么发生,当最上面的标签从数据包删除由于Penultimate Hop Popping (PHP)时。复制从弹出到最近显示的标签的顶部标签的MPLS EXP值可能是必要的;这总是不适用于所有隧道模式。

有时(例如,无格式Non-VPN MPLS网络),在最终P路由器的PHP操作能显示一无格式IP数据包,当一数据包用一个标签只接收时。当此IP数据包由出口LSR (PE)接收,分类根据MPLS EXP位的数据包是不可能的,因为当前没有标签。在这些情况下,您必须配置出口PE路由器通告明确NULL标签。当PHP操作在P路由器时进行,有值的一个标签为零发送,并且用此特殊标签您能通常标记EXP位作为标记的信息包,允许在出口PE路由器的正确分类。

DiffServ规格MPLS网络支持定义了这些隧道模式:

以下部分分开检查每个隧道模式,并且提供示例显示每个隧道模式如何可以配置。示例包括IP优先级一全双工映射到MPLS EXP位。有一定数量不同的QoS参数和隧道模式每客户的是可能的。

注意: 配置示例为MPLS VPN不是特定,并且为无格式MPLS网络和载波支持的载波(Csc)网络是可适用的。也很可能,您的网络能从另一网络变化—可以使用许多不同的QoS参数和隧道模式。

统一模式

建立隧道统一模式的DiffServ只有QoS一块层,到达端到端。入口PE路由器(PE1)复制从流入的IP数据包的DSCP到被强加的标签的MPLS EXP位。当EXP位游遍核心,他们可以或不可以由半成品P路由器修改。在本例中, P路由器P1修改顶部标签的EXP位。在出口P路由器(P2)我们复制EXP位到最近显示的标签的EXP位在PHP (Penultimate-Hop-Pop)以后。最终在出口PE路由器(PE2)我们然后复制EXP位到最近显示的IP数据包的DSCP位。

/image/gif/paws/47815/diffserv_tunnel_02.jpg

统一模式配置:

PE1

!--- This configuration maps the IP Precedence
!--- of the incoming IP packets to the MPLS EXP bits.

class-map match-all IP-AF11
  match ip precedence 0 
class-map match-all IP-AF12
  match ip precedence 1 
class-map match-all IP-AF21
  match ip precedence 2 
class-map match-all IP-AF22
  match ip precedence 3 
class-map match-all IP-AF31
  match ip precedence 4 
class-map match-all IP-AF32
  match ip precedence 5 

class-map match-all MPLS-AF11
  match mpls experimental topmost 0 
class-map match-all MPLS-AF12
  match mpls experimental topmost 1 
class-map match-all MPLS-AF21
  match mpls experimental topmost 2 
class-map match-all MPLS-AF22
  match mpls experimental topmost 3 
class-map match-all MPLS-AF31
  match mpls experimental topmost 4 
class-map match-all MPLS-AF32
  match mpls experimental topmost 5 

policy-map set-MPLS-PHB
  class IP-AF11
   police 8000 conform-action set-mpls-exp-imposition-transmit
                                          0 exceed-action drop 
  class IP-AF12
   police 10000 conform-action set-mpls-exp-imposition-transmit
             1 exceed-action set-mpls-exp-imposition-transmit 0
  class IP-AF21
   police 12000 conform-action set-mpls-exp-imposition-transmit
             2 exceed-action set-mpls-exp-imposition-transmit 1
  class IP-AF22
   police 12000 conform-action set-mpls-exp-imposition-transmit
             3 exceed-action set-mpls-exp-imposition-transmit 2
  class IP-AF31
   police 12000 conform-action set-mpls-exp-imposition-transmit
             4 exceed-action set-mpls-exp-imposition-transmit 3
  class IP-AF32
   police 12000 conform-action set-mpls-exp-imposition-transmit
             5 exceed-action set-mpls-exp-imposition-transmit 4

policy-map output-qos
  class MPLS-AF11
   bandwidth percent 5
   random-detect
  class MPLS-AF12
   bandwidth percent 10
   random-detect
  class MPLS-AF21
   bandwidth percent 10
   random-detect
  class MPLS-AF22
   bandwidth percent 15
   random-detect
  class MPLS-AF31
   bandwidth percent 20
   random-detect
  class MPLS-AF32
   bandwidth percent 30
   random-detect

interface Ethernet0/0
 ip address 192.168.0.1 255.255.255.0
 max-reserved-bandwidth 90
 service-policy output output-qos
 tag-switching ip
!
interface Ethernet1/0
 ip vrf forwarding v1
 ip address 10.0.0.2 255.255.255.0
 service-policy input set-MPLS-PHB
!

P1

!--- This configuration swaps the top label from 3 to 2, 
!--- which does not need to occur to follow the previous configuration.

class-map match-all mpls-in
  match mpls experimental topmost 3 
!                 
policy-map mpls-in
  class mpls-in
   set mpls experimental topmost 2
!
interface Ethernet0/0
 ip address 192.168.1.1 255.255.255.0
 tag-switching ip
!         
interface Ethernet1/0
 ip address 192.168.0.2 255.255.255.0
 service-policy input mpls-in
 tag-switching ip
!

P2

!--- Remember to copy down the MPLS EXP value 
!--- from the newly exposed label after the PHP.

class-map match-all MPLS-AF11
  match mpls experimental topmost 0 
class-map match-all MPLS-AF12
  match mpls experimental topmost 1 
class-map match-all MPLS-AF21
  match mpls experimental topmost 2 
class-map match-all MPLS-AF22
  match mpls experimental topmost 3 
class-map match-all MPLS-AF31
  match mpls experimental topmost 4 
class-map match-all MPLS-AF32
  match mpls experimental topmost 5 
!
class-map match-all qos-group-AF11
  match qos-group 0
class-map match-all qos-group-AF12
  match qos-group 1
class-map match-all qos-group-AF21
  match qos-group 2
class-map match-all qos-group-AF22
  match qos-group 3
class-map match-all qos-group-AF31
  match qos-group 4
class-map match-all qos-group-AF32
  match qos-group 5
!
policy-map qos-group-in
  class MPLS-AF11
   set qos-group mpls experimental topmost
  class MPLS-AF12
   set qos-group mpls experimental topmost
  class MPLS-AF21
   set qos-group mpls experimental topmost
  class MPLS-AF22
   set qos-group mpls experimental topmost
  class MPLS-AF31
   set qos-group mpls experimental topmost
  class MPLS-AF32
   set qos-group mpls experimental topmost
!
policy-map qos-group-out
  class qos-group-AF11
   bandwidth percent 5
   random-detect
   set mpls experimental topmost qos-group
  class qos-group-AF12
   bandwidth percent 10
   random-detect
   set mpls experimental topmost qos-group
  class qos-group-AF21
   bandwidth percent 10
   random-detect
   set mpls experimental topmost qos-group
  class qos-group-AF22
   bandwidth percent 15
   random-detect
   set mpls experimental topmost qos-group
  class qos-group-AF31
   bandwidth percent 20
   random-detect
   set mpls experimental topmost qos-group
  class qos-group-AF32
   bandwidth percent 30
   random-detect
   set mpls experimental topmost qos-group
!
interface Ethernet0/0
 ip address 192.168.2.1 255.255.255.0
 max-reserved-bandwidth 90
 service-policy output qos-group-out
 tag-switching ip
!
interface Ethernet1/0
 ip address 192.168.1.2 255.255.255.0
 service-policy input qos-group-in
 tag-switching ip
!

PE2

!--- Remember to copy down the MPLS EXP bits to the IP Precedence
!--- of the newly exposed IP packet.

class-map match-all MPLS-AF11
  match mpls experimental topmost 0 
class-map match-all MPLS-AF12
  match mpls experimental topmost 1 
class-map match-all MPLS-AF21
  match mpls experimental topmost 2 
class-map match-all MPLS-AF22
  match mpls experimental topmost 3 
class-map match-all MPLS-AF31
  match mpls experimental topmost 4 
class-map match-all MPLS-AF32
  match mpls experimental topmost 5 
!
class-map match-all qos-group-AF11
  match qos-group 0
class-map match-all qos-group-AF12
  match qos-group 1
class-map match-all qos-group-AF21
  match qos-group 2
class-map match-all qos-group-AF22
  match qos-group 3
class-map match-all qos-group-AF31
  match qos-group 4
class-map match-all qos-group-AF32
  match qos-group 5
!
policy-map qos-group-in
  class MPLS-AF11
   set qos-group mpls experimental topmost
  class MPLS-AF12
   set qos-group mpls experimental topmost
  class MPLS-AF21
   set qos-group mpls experimental topmost
  class MPLS-AF22
   set qos-group mpls experimental topmost
  class MPLS-AF31
   set qos-group mpls experimental topmost
  class MPLS-AF32
   set qos-group mpls experimental topmost
!
policy-map qos-group-out
  class qos-group-AF11
   bandwidth percent 5
   random-detect
   set precedence qos-group
  class qos-group-AF12
   bandwidth percent 10
   random-detect
   set precedence qos-group
  class qos-group-AF21
   bandwidth percent 10
   random-detect
   set precedence qos-group
  class qos-group-AF22
   bandwidth percent 15
   random-detect
   set precedence qos-group
  class qos-group-AF31
   bandwidth percent 20
   random-detect
   set precedence qos-group
  class qos-group-AF32
   bandwidth percent 30
   random-detect
   set precedence qos-group
!
interface Ethernet0/0
 ip vrf forwarding v1
 ip address 10.0.1.1 255.255.255.0
 max-reserved-bandwidth 90
 service-policy output qos-group-out
!
interface Ethernet1/0
 ip address 192.168.2.2 255.255.255.0
 service-policy input qos-group-in
 tag-switching ip
!

管道模式

DiffServ隧道管道模式使用QoS两块层:

  1. 数据的基础QoS,依然是不可更改,当横断核心时。

  2. 每个核心QoS,是分别于那基础IP信息包。此每个核心QoS PHB保持透明对最终用户。

当数据包到达MPLS核心的边缘时,出口PE路由器(PE2)分类根据从最近已经删除标签的EXP位的MPLS PHB的出站队列的最近显示的IP信息包。

/image/gif/paws/47815/diffserv_tunnel_03.jpg

管道模式配置:

PE1

!--- On input, the IP Precedence is copied to the MPLS EXP 
!--- on label imposition and when leaving the router, the 
!--- MPLS EXP bits are used to classify the traffic into three
!--- traffic classes—gold, silver, and bronze (the topmost).

class-map match-all IP-AF22
  match ip precedence 0 1
class-map match-all IP-AF31
  match ip precedence 2 3
class-map match-all IP-AF32
  match ip precedence 4 5
!
class-map match-all bronze
  match mpls experimental topmost 2 3
class-map match-all silver
  match mpls experimental topmost 4 
class-map match-all gold
  match mpls experimental topmost 5
!
policy-map set-MPLS-PHB
  class IP-AF22
   police 12000 conform-action set-mpls-exp-imposition-transmit 
             3 exceed-action set-mpls-exp-imposition-transmit 2
  class IP-AF31
   police 12000 conform-action set-mpls-exp-imposition-transmit 
             4 exceed-action set-mpls-exp-imposition-transmit 3
  class IP-AF32
   police 12000 conform-action set-mpls-exp-imposition-transmit 
             5 exceed-action set-mpls-exp-imposition-transmit 4
!
policy-map output-qos
  class gold
   bandwidth 40
   random-detect
  class silver
   bandwidth 30
   random-detect
  class bronze
   bandwidth 20
   random-detect
!
interface Ethernet0/0
 ip address 192.168.0.1 255.255.255.0
 max-reserved-bandwidth 90
 service-policy output output-qos
 tag-switching ip
!
interface Ethernet1/0
 ip vrf forwarding v1
 ip address 10.0.0.2 255.255.255.0
 service-policy input set-MPLS-PHB
!

P1

!--- This configuration swaps the top label from 4 to 5,
!--- which does not need to occur to follow the previous configuration.

class-map match-all mpls-in
  match mpls experimental topmost 4
!                
policy-map mpls-in
  class mpls-in
   set mpls experimental topmost 5
!
interface Ethernet0/0
 ip address 192.168.1.1 255.255.255.0
 tag-switching ip
!        
interface Ethernet1/0
 ip address 192.168.0.2 255.255.255.0
 service-policy input mpls-in
 tag-switching ip
!

P2

!--- Remember to copy down the MPLS EXP value from 
!--- the newly exposed label after the PHP.

class-map match-all MPLS-AF11
  match mpls experimental topmost 0 
class-map match-all MPLS-AF12
  match mpls experimental topmost 1 
class-map match-all MPLS-AF21
  match mpls experimental topmost 2 
class-map match-all MPLS-AF22
  match mpls experimental topmost 3 
class-map match-all MPLS-AF31
  match mpls experimental topmost 4 
class-map match-all MPLS-AF32
  match mpls experimental topmost 5 
!
class-map match-all gold
  match qos-group 5
class-map match-all silver
  match qos-group 4
class-map match-all bronze
  match qos-group 3
  match qos-group 2
!
policy-map qos-group-in
  class MPLS-AF11
   set qos-group mpls experimental topmost
  class MPLS-AF12
   set qos-group mpls experimental topmost
  class MPLS-AF21
   set qos-group mpls experimental topmost
  class MPLS-AF22
   set qos-group mpls experimental topmost
  class MPLS-AF31
   set qos-group mpls experimental topmost
  class MPLS-AF32
   set qos-group mpls experimental topmost
!
policy-map qos-group-out
  class gold
   bandwidth 40
   random-detect
   set mpls experimental topmost qos-group
  class silver
   bandwidth 30
   random-detect
   set mpls experimental topmost qos-group
  class bronze
   bandwidth 20
   random-detect
   set mpls experimental topmost qos-group
!
interface Ethernet0/0
 ip address 192.168.2.1 255.255.255.0
 max-reserved-bandwidth 90
 service-policy output qos-group-out
 tag-switching ip
!
interface Ethernet1/0
 ip address 192.168.1.2 255.255.255.0
 service-policy input qos-group-in
 tag-switching ip
!

PE2

!--- Remember to queue the newly exposed IP packet based in 
!--- the MPLS EXP bits of the label we just removed. Use 
!--- qos-groups to keep track of this value.

class-map match-all MPLS-AF11
  match mpls experimental topmost 0 
class-map match-all MPLS-AF12
  match mpls experimental topmost 1 
class-map match-all MPLS-AF21
  match mpls experimental topmost 2 
class-map match-all MPLS-AF22
  match mpls experimental topmost 3 
class-map match-all MPLS-AF31
  match mpls experimental topmost 4 
class-map match-all MPLS-AF32
  match mpls experimental topmost 5 
!
class-map match-all gold
  match qos-group 5
class-map match-all silver
  match qos-group 4
class-map match-all bronze
  match qos-group 3
  match qos-group 2
!
policy-map qos-group-in
  class MPLS-AF11
   set qos-group mpls experimental topmost
   set discard-class 0
  class MPLS-AF12
   set qos-group mpls experimental topmost
   set discard-class 1
  class MPLS-AF21
   set qos-group mpls experimental topmost
   set discard-class 2
  class MPLS-AF22
   set qos-group mpls experimental topmost
   set discard-class 3
  class MPLS-AF31
   set qos-group mpls experimental topmost
   set discard-class 4
  class MPLS-AF32
   set qos-group mpls experimental topmost
   set discard-class 5
!
policy-map qos-group-out
  class gold
   bandwidth 40
   random-detect discard-class-based
  class silver
   bandwidth 30
   random-detect discard-class-based
  class bronze
   bandwidth 20
   random-detect discard-class-based
!
interface Ethernet0/0
 ip vrf forwarding v1
 ip address 10.0.1.1 255.255.255.0
 max-reserved-bandwidth 90
 service-policy output qos-group-out
!
interface Ethernet1/0
 ip address 192.168.2.2 255.255.255.0
 service-policy input qos-group-in
 tag-switching ip
!

短管道模式

建立隧道短管道模式的DiffServ使用同样规则和技术在核心间。差异在出口PE路由器(PE2) —您分类根据从DSCP值的IP PHB的出站队列的最近显示的IP信息包此IP数据包。

diffserv_tunnel_04.jpg

短管道模式配置:

PE1

!--- On input, the IP Precedent is copied to the MPLS EXP
!--- on label imposition. When leaving the router, the 
!--- MPLS EXP bits are used to classify the traffic into three
!--- traffic classes—gold, silver and bronze (the topmost).


class-map match-all IP-AF22
  match ip precedence 0 1
class-map match-all IP-AF31
  match ip precedence 2 3
class-map match-all IP-AF32
  match ip precedence 4 5
!
class-map match-all bronze
  match mpls experimental topmost 2 3
class-map match-all silver
  match mpls experimental topmost 4 
class-map match-all gold
  match mpls experimental topmost 5
!
policy-map set-MPLS-PHB
  class IP-AF22
   police 12000 conform-action set-mpls-exp-imposition-transmit 
             3 exceed-action set-mpls-exp-imposition-transmit 2
  class IP-AF31
   police 12000 conform-action set-mpls-exp-imposition-transmit 
             4 exceed-action set-mpls-exp-imposition-transmit 3
  class IP-AF32
   police 12000 conform-action set-mpls-exp-imposition-transmit 
             5 exceed-action set-mpls-exp-imposition-transmit 4
!
policy-map output-qos
  class gold
   bandwidth 40
   random-detect
  class silver
   bandwidth 30
   random-detect
  class bronze
   bandwidth 20
   random-detect
!
interface Ethernet0/0
 ip address 192.168.0.1 255.255.255.0
 max-reserved-bandwidth 90
 service-policy output output-qos
 tag-switching ip
!
interface Ethernet1/0
 ip vrf forwarding v1
 ip address 10.0.0.2 255.255.255.0
 service-policy input set-MPLS-PHB
!

P1

!--- This configuration swaps the top label from 4 to 5, 
!--- which does not need to occur to follow the previous configuration.

class-map match-all mpls-in
  match mpls experimental topmost 4
!                
policy-map mpls-in
  class mpls-in
   set mpls experimental topmost 5
!
interface Ethernet0/0
 ip address 192.168.1.1 255.255.255.0
 tag-switching ip
!        
interface Ethernet1/0
 ip address 192.168.0.2 255.255.255.0
 service-policy input mpls-in
 tag-switching ip
!

P2

!--- Remember to copy down the MPLS EXP value from 
!--- the newly exposed label after the PHP.

class-map match-all MPLS-AF11
  match mpls experimental topmost 0 
class-map match-all MPLS-AF12
  match mpls experimental topmost 1 
class-map match-all MPLS-AF21
  match mpls experimental topmost 2 
class-map match-all MPLS-AF22
  match mpls experimental topmost 3 
class-map match-all MPLS-AF31
  match mpls experimental topmost 4 
class-map match-all MPLS-AF32
  match mpls experimental topmost 5 
!
class-map match-all gold
  match qos-group 5
class-map match-all silver
  match qos-group 4
class-map match-all bronze
  match qos-group 3
  match qos-group 2
!
policy-map qos-group-in
  class MPLS-AF11
   set qos-group mpls experimental topmost
  class MPLS-AF12
   set qos-group mpls experimental topmost
  class MPLS-AF21
   set qos-group mpls experimental topmost
  class MPLS-AF22
   set qos-group mpls experimental topmost
  class MPLS-AF31
   set qos-group mpls experimental topmost
  class MPLS-AF32
   set qos-group mpls experimental topmost
!
policy-map qos-group-out
  class gold
   bandwidth 40
   random-detect
   set mpls experimental topmost qos-group
  class silver
   bandwidth 30
   random-detect
   set mpls experimental topmost qos-group
  class bronze
   bandwidth 20
   random-detect
   set mpls experimental topmost qos-group
!
interface Ethernet0/0
 ip address 192.168.2.1 255.255.255.0
 max-reserved-bandwidth 90
 service-policy output qos-group-out
 tag-switching ip
!
interface Ethernet1/0
 ip address 192.168.1.2 255.255.255.0
 service-policy input qos-group-in
 tag-switching ip
!

PE2

!--- Remember to queue the newly exposed IP packet
!--- based on the value of the IP Precedent.

class-map match-all gold
  match  precedence 4  5 
class-map match-all silver
  match  precedence 2  3
class-map match-all bronze
  match  precedence 0  1
!
policy-map qos-group-out
  class gold
   bandwidth 40
   random-detect prec-based
  class silver
   bandwidth 30
   random-detect prec-based
  class bronze
   bandwidth 20
   random-detect prec-based
!
interface Ethernet0/0
 ip vrf forwarding v1
 ip address 10.0.1.1 255.255.255.0
 max-reserved-bandwidth 90
 service-policy output qos-group-out
!
interface Ethernet1/0
 ip address 192.168.2.2 255.255.255.0
 tag-switching ip
!

隧道模式摘要

此表汇总应用到IP或标记的信息包在网络的多种阶段的多种操作:

隧道模式 IP – >标签 标签– >标签 标签– > IP
统一 复制IP Prec/DiffServ到MPLS EXP里(可以由SP也更改) MPLS EXP可能由SP更改 MPLS EXP复制对IP Prec/DiffServ
管道 SP QoS策略设置的MPLS EXP 原始IP保留的Prec/DiffServ (根据MPLS EXP)的出口队列
短管道 原始IP保留的Prec/DiffServ (在IP Prec/DiffServ根据的出口队列)

相关的思科支持社区讨论

思科支持社区是您提问、解答问题、分享建议以及与工作伙伴协作的论坛。


相关信息


Document ID: 47815