33-MSR系列路由器MPLS L3VPN QoS功能的典型配置举例
本章节下载: 33-MSR系列路由器MPLS L3VPN QoS功能的典型配置举例 (146.44 KB)
MSR系列路由器MPLS L3VPN QoS功能的典型配置举例
Copyright © 2014 杭州华三通信技术有限公司 版权所有,保留一切权利。 非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部, 并不得以任何形式传播。本文档中的信息可能变动,恕不另行通知。 |
目 录
本文档介绍使用MPLS的EXP优先级对MPLS L3VPN实施QoS的典型案例。
本文档不严格与具体软、硬件版本对应,如果使用过程中与产品实际情况有差异,请参考相关产品手册,或以设备实际情况为准。
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。
本文档假设您已了解MPLS QoS的特性。
如图1所示,在MPLS网络中,FTP Server和FTP Client通过MPLS L3VPN进行互通,PE A和PE B之间物理链路实际带宽为2M,现要求:FTP Server发送到FTP Client的数据流量至少占有MPLS网络50%的带宽。
图1 MSR系列路由器MPLS L3VPN QoS功能的配置组网图
为了对源自FTP Server的MPLS报文有50%的带宽保证,需要对FTP Server的报文进行EXP标记,同时对在PE A出方向进行QoS策略,匹配对应的FTP Server的MPLS报文。
本举例是在Release 2311版本上进行配置和验证的。
# 配置PE A接口地址。
<PEA> system-view
[PEA] interface loopback 0
[PEA-LoopBack0] ip address 1.1.1.1 255.255.255.255
[PEA-LoopBack0] quit
[PEA] interface ethernet 0/0
[PEA-Ethernet0/0] port link-mode route
[PEA-Ethernet0/0] ip address 192.168.1.1 255.255.255.252
[PEA-Ethernet0/0] quit
[PEA] interface ethernet 0/1
[PEA-Ethernet0/1] port link-mode route
[PEA-Ethernet0/1] ip address 10.1.1.1 255.255.255.0
[PEA-Ethernet0/1] quit
# 配置静态路由协议,实现PE间互通。
[PEA] ip route-static 2.2.2.2 255.255.255.255 192.168.1.2
# 配置PE A的MPLS LSR-ID,使能MPLS和MPLS LDP功能。
[PEA] mpls lsr-id 1.1.1.1
[PEA] mpls
[PEA-mpls] quit
[PEA] mpls ldp
[PEA-mpls-ldp] quit
# 在接口Ethernet0/0配置MPLS和MPLS LDP功能。
[PEA] interface ethernet 0/0
[PEA-Ethernet0/0] mpls
[PEA-Ethernet0/0] mpls ldp
[PEA-Ethernet0/0] quit
# 在PE A上创建VPN实例vpna,并配置RD和VPN Target属性。
[PEA] ip vpn-instance vpna
[PEA-vpn-instance-vpna] route-distinguisher 1:1
[PEA-vpn-instance-vpna] vpn-target 1:1 export-extcommunity
[PEA-vpn-instance-vpna] vpn-target 1:1 import-extcommunity
[PEA-vpn-instance-vpna] quit
# 将接口Ethernet0/1绑定到vpna上。
[PEA] interface ethernet 0/1
[PEA-Ethernet0/1] ip binding vpn-instance vpna
[PEA-Ethernet0/1] ip address 10.1.1.1 255.255.255.0
[PEA-Ethernet0/1] quit
# 在PE之间建立MP-IBGP对等体。
[PEA] bgp 100
[PEA-bgp] undo synchronization
[PEA-bgp] peer 2.2.2.2 as-number 100
[PEA-bgp] peer 2.2.2.2 connect-interface loopback 0
[PEA-bgp] quit
# 进入BGP-VPNv4子地址族视图,配置对等体2.2.2.2。
[PEA] bgp 100
[PEA-bgp] ipv4-family vpnv4
[PEA-bgp-af-vpnv4] peer 2.2.2.2 enable
[PEA-bgp-af-vpnv4] quit
[PEA-bgp] quit
# 进入BGP-VPN实例视图,将直连路由引入到vpna的路由表。
[PEA] bgp 100
[PEA-bgp] ipv4-family vpn-instance vpna
[PEA-bgp-ipv4-vpna] import-route direct
[PEA-bgp-ipv4-vpna] quit
[PEA-bgp] quit
# 在PE间设置接口最大可用带宽为2M。
[PEA] interface ethernet 0/0
[PEA-Ethernet0/0] qos max-bandwidth 2048
# 设置接口限速,正常流速为2048kbps,承诺突发流量为128000bytes,超出突发流量为0。
[PEA-Ethernet0/0] qos lr outbound cir 2048 cbs 128000 ebs 0
[PEA-Ethernet0/0] quit
# 创建ACL 3000,定义规则允许源为10.1.1.2的FTP服务器的数据报文通过。
[PEA] acl number 3000
[PEA-acl-adv-3000] rule 0 permit tcp vpn-instance vpna source 10.1.1.2 0 source-p
ort eq ftp-data
[PEA-acl-adv-3000] quit
# 定义流分类FTP-DATA,匹配ACL 3000的报文。
[PEA] traffic classifier FTP-DATA
[PEA-classifier-FTP-DATA] if-match acl 3000
[PEA-classifier-FTP-DATA] quit
# 定义流行为EXP5,标记MPLS报文EXP优先级为5。
[PEA] traffic behavior EXP5
[PEA-behavior-EXP5] remark mpls-exp 5
[PEA-behavior-EXP5] quit
# 定义QoS策略,为类FTP-DATA指定对应的流行为EXP5。
[PEA] qos policy MARKEXP5
[PEA-qospolicy-MARKEXP5] classifier FTP-DATA behavior EXP5
[PEA-qospolicy-MARKEXP5] quit
# 将QoS策略MARKEXP5应用在在接口Ethernet0/1的入方向上。
[PEA] interface ethernet 0/1
[PEA-Ethernet0/1] qos apply policy MARKEXP5 inbound
[PEA-Ethernet0/1] quit
# 定义流分类,匹配EXP优先级为5的MPLS报文。
[PEA] traffic classifier Exp5
[PEA-classifier-Exp5] if-match mpls-exp 5
[PEA-classifier-Exp5] quit
# 定义流行为,配置AF队列,分配50%的最小可用带宽。
[PEA] traffic behavior AF50%
[PEA-behavior-AF50%] queue af bandwidth pct 50
[PEA-behavior-AF50%] quit
# 定义QoS策略,为类Exp5指定对应的流行为AF50%,保证50%带宽。
[PEA] qos policy MPLSAF50%
[PEA-qospolicy-MPLSAF50%] classifier Exp5 behavior AF50%
[PEA-qospolicy-MPLSAF50%] quit
# 将QoS策略MPLSAF50%应用在在接口Ethernet0/0的出方向上。
[PEA] interface ethernet 0/0
[PEA-Ethernet0/0] qos apply policy MPLSAF50% outbound
[PEA-Ethernet0/0] quit
# 配置PE B接口地址。
<PEB> system-view
[PEB] interface loopback 0
[PEB-LoopBack0] ip address 2.2.2.2 255.255.255.255
[PEB-LoopBack0] quit
[PEB] interface ethernet 0/0
[PEB-Ethernet0/0] port link-mode route
[PEB-Ethernet0/0] ip address 192.168.1.2 255.255.255.252
[PEB-Ethernet0/0] quit
[PEB] interface ethernet 0/1
[PEB-Ethernet0/1] port link-mode route
[PEB-Ethernet0/1] ip address 10.1.2.1 255.255.255.0
[PEB-Ethernet0/1] quit
# 配置静态路由协议,实现PE间互通。
[PEB] ip route-static 1.1.1.1 255.255.255.255 192.168.1.1
# 配置PE B的MPLS LSR-ID,使能MPLS和MPLS LDP功能。
[PEB] mpls lsr-id 2.2.2.2
[PEB] mpls
[PEB-mpls] quit
[PEB] mpls ldp
[PEB-mpls-ldp] quit
# 在接口Ethernet0/0配置MPLS和MPLS LDP功能。
[PEB] interface ethernet 0/0
[PEB-Ethernet0/0] mpls
[PEB-Ethernet0/0] mpls ldp
[PEB-Ethernet0/0] quit
# 在PE B上创建VPN实例vpna,并配置RD和VPN Target属性。
[PEB] ip vpn-instance vpna
[PEB-vpn-instance-vpna] route-distinguisher 1:2
[PEB-vpn-instance-vpna] vpn-target 1:1 export-extcommunity
[PEB-vpn-instance-vpna] vpn-target 1:1 import-extcommunity
[PEB-vpn-instance-vpna] quit
# 将接口Ethernet0/1绑定到vpna上。
[PEB] interface ethernet 0/1
[PEB-Ethernet0/1] ip binding vpn-instance vpna
[PEB-Ethernet0/1] ip address 10.1.2.1 255.255.255.0
[PEB-Ethernet0/1] quit
# 在PE之间建立MP-IBGP对等体。
[PEB] bgp 100
[PEB-bgp] undo synchronization
[PEB-bgp] peer 1.1.1.1 as-number 100
[PEB-bgp] peer 1.1.1.1 connect-interface loopback 0
[PEB-bgp] quit
# 进入BGP-VPNv4子地址族视图,配置对等体1.1.1.1。
[PEB] bgp 100
[PEB-bgp] ipv4-family vpnv4
[PEB-bgp-af-vpnv4] peer 1.1.1.1 enable
[PEB-bgp-af-vpnv4] quit
# 进入BGP-VPN实例视图,将直连路由引入到vpna的路由表。
[PEB] bgp 100
[PEB-bgp] ipv4-family vpn-instance vpna
[PEB-bgp-ipv4-vpna] import-route direct
[PEB-bgp-ipv4-vpna] quit
[PEB-bgp] quit
# 在PE A上查看接口Ethernet0/1上所应用的策略,看是否生效。
<PEA> display qos policy interface ethernet 0/1
Interface: Ethernet0/1
Direction: Inbound
Policy: MARKEXP5
Classifier: default-class
Matched : 20(Packets) 1960(Bytes)
5-minute statistics:
Forwarded: 0/0 (pps/bps)
Dropped : 0/0 (pps/bps)
Rule(s) : If-match any
Behavior: be
-none-
Classifier: FTP-DATA
Matched : 0(Packets) 0(Bytes)
5-minute statistics:
Forwarded: 0/0 (pps/bps)
Dropped : 0/0 (pps/bps)
Operator: AND
Rule(s) : If-match acl 3000
Behavior: EXP5
Marking:
Remark MPLS EXP 5
# 在PE A上查看接口Ethernet0/0上所应用的策略,看是否生效。
<PEA> display qos policy interface ethernet0/0
Interface: Ethernet0/0
Direction: Outbound
Policy: MPLSAF50%
Classifier: default-class
Matched : 8472(Packets) 588504(Bytes)
5-minute statistics:
Forwarded: 0/254 (pps/bps)
Dropped : 0/0 (pps/bps)
Rule(s) : If-match any
Behavior: be
Default Queue:
Flow Based Weighted Fair Queuing
Max number of hashed queues: 256
Matched : 0/0 (Packets/Bytes)
Enqueued : 0/0 (Packets/Bytes)
Discarded: 0/0 (Packets/Bytes)
Discard Method: Tail
Classifier: Exp5
Matched : 0(Packets) 0(Bytes)
5-minute statistics:
Forwarded: 0/0 (pps/bps)
Dropped : 0/0 (pps/bps)
Operator: AND
Rule(s) : If-match mpls-exp 5
Behavior: AF50%
Assured Forwarding:
Bandwidth 819 (kbps)
Matched : 0/0 (Packets/Bytes)
Enqueued : 0/0 (Packets/Bytes)
Discarded: 0/0 (Packets/Bytes)
Discard Method: Tail
· PE A配置:
#
mpls lsr-id 1.1.1.1
#
ip vpn-instance vpna
route-distinguisher 1:1
vpn-target 1:1 export-extcommunity
vpn-target 1:1 import-extcommunity
#
acl number 3000
rule 0 permit tcp vpn-instance vpna source 10.1.1.2 0 source-port eq ftp-data
#
mpls
#
mpls ldp
#
traffic classifier FTP-DATA operator and
if-match acl 3000
traffic classifier Exp5 operator and
if-match mpls-exp 5
#
traffic behavior EXP5
remark mpls-exp 5
traffic behavior AF50%
queue af bandwidth pct 50
#
qos policy MPLSAF50%
classifier Exp5 behavior AF50%
qos policy MARKEXP5
classifier FTP-DATA behavior EXP5
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
interface Ethernet0/0
qos max-bandwidth 2048
port link-mode route
ip address 192.168.1.1 255.255.255.252
qos lr outbound cir 2048 cbs 128000 ebs 0
qos apply policy MPLSAF50% outbound
mpls
mpls ldp
#
interface Ethernet0/1
port link-mode route
ip binding vpn-instance vpna
ip address 10.1.1.1 255.255.255.0
qos apply policy MARKEXP5 inbound
#
bgp 100
undo synchronization
peer 2.2.2.2 as-number 1
peer 2.2.2.2 connect-interface LoopBack0
#
ipv4-family vpn-instance vpna
import-route direct
#
ipv4-family vpnv4
peer 2.2.2.2 enable
#
ip route-static 2.2.2.2 255.255.255.255 192.168.1.2
· PE B配置:
#
mpls lsr-id 2.2.2.2
#
ip vpn-instance vpna
route-distinguisher 1:2
vpn-target 1:1 export-extcommunity
vpn-target 1:1 import-extcommunity
#
mpls
#
mpls ldp
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
#
interface Ethernet0/0
port link-mode route
ip address 192.168.1.2 255.255.255.252
mpls
mpls ldp
#
interface Ethernet0/1
port link-mode route
ip binding vpn-instance vpna
ip address 10.1.2.1 255.255.255.0
#
bgp 100
undo synchronization
peer 1.1.1.1 as-number 100
peer 1.1.1.1 connect-interface LoopBack0
#
ipv4-family vpn-instance vpna
import-route direct
#
ipv4-family vpnv4
peer 1.1.1.1 enable
#
ip route-static 1.1.1.1 255.255.255.255 192.168.1.1
· H3C MSR 系列路由器 命令参考(V5)-R2311
· H3C MSR 系列路由器 配置指导(V5)-R2311
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!