• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

07-MPLS配置举例

目录

05-H3C_MPLS_TE典型配置举例

本章节下载 05-H3C_MPLS_TE典型配置举例  (307.04 KB)

docurl=/cn/Service/Document_Software/Document_Center/Switches/Catalog/S12500/S12500-S/Configure/Typical_Configuration_Example/H3C_S12500-S_CE-R7577P04-6W100/07/201904/1173246_30005_0.htm

05-H3C_MPLS_TE典型配置举例

H3C MPLS TE典型配置举例

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

资料版本:6W100-20190330

产品版本:Release 7577P04

 

Copyright © 2019 新华三技术有限公司 版权所有,保留一切权利。

非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部,并不得以任何形式传播。

除新华三技术有限公司的商标外,本手册中出现的其它公司的商标、产品标识及商品名称,由各自权利人拥有。

本文档中的信息可能变动,恕不另行通知。



1  简介

MPLS TE(Traffic Engineering,流量工程)结合了MPLS技术与流量工程,通过建立沿着指定路径的LSP隧道进行资源预留(这种LSP也称为CRLSP,即基于约束路由的LSP),使网络流量绕开拥塞节点,达到平衡网络流量的目的。

1. 使用RSVP-TE建立CRLSP

MPLS TE可以通过静态和动态两种方式建立CRLSP:

·              静态方式是指:在流量经过的每一跳设备上(包括Ingress、Transit和Egress)分别手工指定入标签、出标签、流量所需的带宽等信息,从而建立满足约束条件的CRLSP。静态方式的优点是配置简单,缺点是不能根据网络的变化动态调整建立的CRLSP;

·              动态方式是指:根据链路状态信息计算出路径后,通过标签分发协议(如RSVP-TE)通告标签,并在经过的节点上为流量预留所需的带宽资源,从而建立满足约束条件的CRLSP。该方式的优点是能根据网络的变化动态调整建立的CRLSP,且支持CRLSP备份、快速重路由等功能,缺点是配置复杂。

本文着重介绍通过RSVP-TE动态建立CRLSP,从而建立MPLS TE隧道的典型配置举例。

2. MPLS TE FRR

MPLS TE中有两种网络保护技术,分别是FRR和CRLSP备份:

·              FRR(Fast Reroute,快速重路由)是MPLS TE中实现网络局部保护的技术。开启隧道的FRR功能后,当主CRLSP上的某条链路或某个节点失效时,流量会被切换到Bypass隧道上。同时,隧道的Ingress节点尝试建立新的CRLSP。新的CRLSP建立成功后,流量将切换到新的CRLSP。FRR的切换速度可以达到50ms,能够最大程度减少网络故障时数据的丢失。

·              CRLSP备份是指通过备份CRLSP对主CRLSP进行保护。当Ingress节点感知到主CRLSP不可用时,将流量切换到备份CRLSP上,当主CRLSP路径恢复后再将流量切换回来,以实现对主CRLSP的备份保护。

FRR和CRLSP备份的不同之处在于:CRLSP备份是一种端到端的路径保护,对整条CRLSP提供保护,而FRR则是一种局部保护措施,只能保护CRLSP中的某条链路或某个节点。并且,FRR是一种快速响应的临时性保护措施,对于切换时间有严格要求,CRLSP备份则没有时间要求。在实际应用中是配置FRR还是CRLSP备份,可以根据上述两种技术的特点来进行选择。本文将介绍FRR的典型应用。

根据保护的对象不同,FRR分为两类:

·              链路保护:又称为Next-hop(NHOP)保护。PLR(Point of Local Repair,本地修复节点)和MP(Merge Point,汇聚点)之间有直接链路连接,主CRLSP经过这条链路。当这条链路失效时,流量可以切换到Bypass隧道上。如图1所示,主CRLSP是Device A→Device B→Device C→Device D,Bypass隧道是Device B→Device E→Device C。

图1 FRR链路保护示意图

 

·              节点保护:又称为Next-next-hop(NNHOP)保护。PLR和MP之间通过一台设备连接,主CRLSP经过这台设备。当这台设备失效时,流量可以切换到Bypass隧道上。如图2所示,主CRLSP是Device A→Device B→Device C→Device D→Device E,Bypass隧道是Device B→Device F→Device D,Device C是被保护的设备。

图2 FRR节点保护技术示意图

 

本文着重介绍链路保护的MPLS TE FRR典型配置举例。

2  配置前提

本文档不严格与具体软、硬件版本对应,如果使用过程中与产品实际情况有差异,请参考相关产品手册,或以设备实际情况为准。

本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。

本文档假设您已了解MPLS TE特性。

3  使用RSVP-TE配置MPLS TE隧道典型配置举例

3.1  组网需求

企业A和企业B分别有总部和分支机构两个站点,均通过运营商的MPLS网络进行互联。两企业的分支机构均有重要数据,需要穿越MPLS网络备份到总部服务器上。企业A的数据流量的最大带宽为20000kbps,企业B的数据流量的最大带宽为30000kbps。

在如图3所示的网络环境中,每条链路的最大带宽为50000kbps,可通过部署RSVP-TE服务,自动为两个用户分别建立满足其带宽需求的MPLS TE隧道。

图3 使用RSVP-TE配置MPLS TE隧道典型配置举例组网图

 

3.2  配置思路

·              为了使用RSVP-TE配置MPLS TE隧道,需要在骨干网的设备上配置MPLS、MPLS TE和RSVP-TE功能。

·              为了满足两个企业用户同时在运营商MPLS网络中传输数据,并且拥有足够的隧道带宽,需要在MPLS TE隧道的Ingress节点上为两个用户分别创建Tunnel接口,并指定隧道带宽。

·              为了保证每条链路具有足够的带宽,需要在MPLS TE隧道经过的各个接口上配置链路的MPLS TE属性,指定链路最大带宽。

·              为了在各个节点上生成TEDB,从而计算出到达某个节点的符合约束条件的最短路径,需要在骨干网中配置OSPF支持MPLS TE,以便各个节点通过OSPF路由协议发布链路的MPLS TE相关属性。

·              为了实现使用RSVP-TE分发MPLS TE标签并建立CRLSP,需要在MPLS TE隧道的Ingress节点上配置通过RSVP-TE自动建立CRLSP。

·              为了使流量沿着MPLS TE隧道转发,需要在MPLS TE隧道的Ingress节点上配置静态路由,将流量引入MPLS TE隧道。

3.3  配置注意事项

·              在采用RSVP-TE动态建立CRLSP时,必须配置IGP的TE扩展(目前支持OSPF TE和ISIS TE),否则,不能形成TEDB(TE DataBase,流量工程数据库)。在不配置IGP的TE扩展时计算出的路径是由IGP路由得到的,而不是CSPF(Constraint-based Shortest Path First,基于约束的最短路径优先)计算出来的。

·              进行本案例配置之前,需要先全局关闭STP功能,或为每个VLAN映射一个MSTP实例,否则可能会阻断环路中的一条链路。

3.4  配置步骤

(1)      配置各接口的IP地址

# 按照图3配置各接口的IP地址和掩码,包括LoopBack接口,下面以Switch A为例,其它设备配置方法类似,具体配置过程略。

<SwitchA> system-view

[SwitchA] vlan 10

[SwitchA-vlan10] port ten-gigabitethernet 1/0/1

[SwitchA-vlan10] quit

[SwitchA] interface vlan-interface 10

[SwitchA-Vlan-interface10] ip address 10.1.1.1 24

[SwitchA] vlan 30

[SwitchA-vlan30] port ten-gigabitethernet 1/0/2

[SwitchA-vlan30] quit

[SwitchA] interface vlan-interface 30

[SwitchA-Vlan-interface30] ip address 30.1.1.1 24

[SwitchA-Vlan-interface30] quit

[SwitchA] vlan 70

[SwitchA-vlan70] port ten-gigabitethernet 1/0/3

[SwitchA-vlan70] quit

[SwitchA] interface vlan-interface 70

[SwitchA-Vlan-interface70] ip address 70.1.1.1 24

[SwitchA] vlan 80

[SwitchA-vlan80] port ten-gigabitethernet 1/0/4

[SwitchA-vlan80] quit

[SwitchA] interface vlan-interface 80

[SwitchA-Vlan-interface80] ip address 80.1.1.1 24

[SwitchA-vlan80] quit

[SwitchA] interface loopback 0

[SwitchA-LoopBack0] ip address 1.1.1.1 32

[SwitchA-LoopBack0] quit

(2)      配置OSPF协议,以保证各交换机之间路由可达

# 配置Switch A。

[SwitchA] ospf

[SwitchA-ospf-1] area 0

[SwitchA-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0

[SwitchA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255

[SwitchA-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255

[SwitchA-ospf-1-area-0.0.0.0] quit

[SwitchA-ospf-1] quit

# 配置Switch B。

[SwitchB] ospf

[SwitchB-ospf-1] area 0

[SwitchB-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0

[SwitchB-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255

[SwitchB-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255

[SwitchB-ospf-1-area-0.0.0.0] quit

[SwitchB-ospf-1] quit

# 配置Switch C。

[SwitchC] ospf

[SwitchC-ospf-1] area 0

[SwitchC-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0

[SwitchC-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255

[SwitchC-ospf-1-area-0.0.0.0] network 40.1.1.0 0.0.0.255

[SwitchC-ospf-1-area-0.0.0.0] quit

[SwitchC-ospf-1] quit

# 配置Switch D。

[SwitchD] ospf

[SwitchD-ospf-1] area 0

[SwitchD-ospf-1-area-0.0.0.0] network 4.4.4.4 0.0.0.0

[SwitchD-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255

[SwitchD-ospf-1-area-0.0.0.0] network 40.1.1.0 0.0.0.255

[SwitchD-ospf-1-area-0.0.0.0] quit

[SwitchD-ospf-1] quit

# 配置完成后,在各交换机上执行display ip routing-table命令,可以看到相互之间都学到了对方的主机路由,包括Loopback接口对应的主机路由。以Switch A为例:

[SwitchA] display ip routing-table

 

Destinations : 26        Routes : 26

 

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

0.0.0.0/32          Direct 0    0            127.0.0.1       InLoop0

1.1.1.1/32          Direct 0    0            127.0.0.1       InLoop0

2.2.2.2/32          OSPF   10   1            10.1.1.2        Vlan10

3.3.3.3/32          OSPF   10   1            30.1.1.3        Vlan30

4.4.4.4/32          OSPF   10   2            10.1.1.2        Vlan10

8.1.1.0/24          Direct 0    0            8.1.1.1         Tun2

8.1.1.0/32          Direct 0    0            8.1.1.1         Tun2

8.1.1.1/32          Direct 0    0            127.0.0.1       InLoop0

8.1.1.255/32        Direct 0    0            8.1.1.1         Tun2

10.1.1.0/24         Direct 0    0            10.1.1.1        Vlan10

10.1.1.0/32         Direct 0    0            10.1.1.1        Vlan10

10.1.1.1/32         Direct 0    0            127.0.0.1       InLoop0

10.1.1.255/32       Direct 0    0            10.1.1.1        Vlan10

20.1.1.0/24         OSPF   10   2            10.1.1.2        Vlan10

30.1.1.0/24         Direct 0    0            30.1.1.1        Vlan30

30.1.1.0/32         Direct 0    0            30.1.1.1        Vlan30

30.1.1.1/32         Direct 0    0            127.0.0.1       InLoop0

30.1.1.255/32       Direct 0    0            30.1.1.1        Vlan30

40.1.1.0/24         Static 1    0            0.0.0.0         Tun2

127.0.0.0/8         Direct 0    0            127.0.0.1       InLoop0

127.0.0.0/32        Direct 0    0            127.0.0.1       InLoop0

127.0.0.1/32        Direct 0    0            127.0.0.1       InLoop0

127.255.255.255/32  Direct 0    0            127.0.0.1       InLoop0

224.0.0.0/4         Direct 0    0            0.0.0.0         NULL0

224.0.0.0/24        Direct 0    0            0.0.0.0         NULL0

255.255.255.255/32  Direct 0    0            127.0.0.1       InLoop0

(3)      配置LSR ID,开启MPLS、MPLS TE和RSVP-TE能力

# 配置Switch A。

[SwitchA] mpls lsr-id 1.1.1.1

[SwitchA] mpls te

[SwitchA-te] quit

[SwitchA] rsvp

[SwitchA-rsvp] quit

[SwitchA] interface vlan-interface 10

[SwitchA-Vlan-interface10] mpls enable

[SwitchA-Vlan-interface10] mpls te enable

[SwitchA-Vlan-interface10] rsvp enable

[SwitchA-Vlan-interface10] quit

[SwitchA] interface vlan-interface 30

[SwitchA-Vlan-interface30] mpls enable

[SwitchA-Vlan-interface30] mpls te enable

[SwitchA-Vlan-interface30] rsvp enable

[SwitchA-Vlan-interface30] quit

# 配置Switch B。

[SwitchB] mpls lsr-id 2.2.2.2

[SwitchB] mpls te

[SwitchB-te] quit

[SwitchB] rsvp

[SwitchB-rsvp] quit

[SwitchB] interface vlan-interface 10

[SwitchB-Vlan-interface10] mpls enable

[SwitchB-Vlan-interface10] mpls te enable

[SwitchB-Vlan-interface10] rsvp enable

[SwitchB-Vlan-interface10] quit

[SwitchB] interface vlan-interface 20

[SwitchB-Vlan-interface20] mpls enable

[SwitchB-Vlan-interface20] mpls te enable

[SwitchB-Vlan-interface20] rsvp enable

[SwitchB-Vlan-interface20] quit

# 配置Switch C。

[SwitchC] mpls lsr-id 3.3.3.3

[SwitchC] mpls te

[SwitchC-te] quit

[SwitchC] rsvp

[SwitchC-rsvp] quit

[SwitchC] interface vlan-interface 30

[SwitchC-Vlan-interface30] mpls enable

[SwitchC-Vlan-interface30] mpls te enable

[SwitchC-Vlan-interface30] rsvp enable

[SwitchC-Vlan-interface30] quit

[SwitchC] interface vlan-interface 40

[SwitchC-Vlan-interface40] mpls enable

[SwitchC-Vlan-interface40] mpls te enable

[SwitchC-Vlan-interface40] rsvp enable

[SwitchC-Vlan-interface40] quit

# 配置Switch D。

[SwitchD] mpls lsr-id 4.4.4.4

[SwitchD] mpls te

[SwitchD-te] quit

[SwitchD] rsvp

[SwitchD-rsvp] quit

[SwitchD] interface vlan-interface 20

[SwitchD-Vlan-interface20] mpls enable

[SwitchD-Vlan-interface20] mpls te enable

[SwitchD-Vlan-interface20] rsvp enable

[SwitchD-Vlan-interface20] quit

[SwitchD] interface vlan-interface 40

[SwitchD-Vlan-interface40] mpls enable

[SwitchD-Vlan-interface40] mpls te enable

[SwitchD-Vlan-interface40] rsvp enable

[SwitchD-Vlan-interface40] quit

(4)      配置链路的MPLS TE属性

# 在Switch A上配置链路的最大带宽。

[SwitchA] interface vlan-interface 10

[SwitchA-Vlan-interface10] mpls te max-link-bandwidth 50000

[SwitchA-Vlan-interface10] quit

[SwitchA] interface vlan-interface 30

[SwitchA-Vlan-interface30] mpls te max-link-bandwidth 50000

[SwitchA-Vlan-interface30] quit

# Switch B上配置链路的最大带宽。

[SwitchB] interface vlan-interface 10

[SwitchB-Vlan-interface10] mpls te max-link-bandwidth 50000

[SwitchB-Vlan-interface10] quit

[SwitchB] interface vlan-interface 20

[SwitchB-Vlan-interface20] mpls te max-link-bandwidth 50000

[SwitchB-Vlan-interface20] quit

# Switch C上配置链路的最大带宽。

[SwitchC] interface vlan-interface 30

[SwitchC-Vlan-interface30] mpls te max-link-bandwidth 50000

[SwitchC-Vlan-interface30] quit

[SwitchC] interface vlan-interface 40

[SwitchC-Vlan-interface40] mpls te max-link-bandwidth 50000

[SwitchC-Vlan-interface40] quit

# Switch D上配置链路的最大带宽。

[SwitchD] interface vlan-interface 20

[SwitchD-Vlan-interface20] mpls te max-link-bandwidth 50000

[SwitchD-Vlan-interface20] quit

[SwitchD] interface vlan-interface 40

[SwitchD-Vlan-interface40] mpls te max-link-bandwidth 50000

[SwitchD-Vlan-interface40] quit

(5)      配置OSPF TE,发布链路的MPLS TE属性

# 在Switch A上使能OSPF的Opaque LSA发布接收能力(缺省情况下处于开启状态),并在OSPF区域0内使能MPLS TE能力

[SwitchA] ospf

[SwitchA-ospf-1] opaque-capability enable

[SwitchA-ospf-1] area 0

[SwitchA-ospf-1-area-0.0.0.0] mpls te enable

[SwitchA-ospf-1-area-0.0.0.0] quit

[SwitchA-ospf-1] quit

# 在Switch B上使能OSPF的Opaque LSA发布接收能力(缺省情况下处于开启状态),并在OSPF区域0内使能MPLS TE能力

[SwitchB] ospf

[SwitchB-ospf-1] opaque-capability enable

[SwitchB-ospf-1] area 0

[SwitchB-ospf-1-area-0.0.0.0] mpls te enable

[SwitchB-ospf-1-area-0.0.0.0] quit

[SwitchB-ospf-1] quit

# 在Switch C上使能OSPF的Opaque LSA发布接收能力(缺省情况下处于开启状态),并在OSPF区域0内使能MPLS TE能力

[SwitchC] ospf

[SwitchC-ospf-1] opaque-capability enable

[SwitchC-ospf-1] area 0

[SwitchC-ospf-1-area-0.0.0.0] mpls te enable

[SwitchC-ospf-1-area-0.0.0.0] quit

[SwitchC-ospf-1] quit

# 在Switch D上使能OSPF的Opaque LSA发布接收能力(缺省情况下处于开启状态),并在OSPF区域0内使能MPLS TE能力

[SwitchD] ospf

[SwitchD-ospf-1] opaque-capability enable

[SwitchD-ospf-1] area 0

[SwitchD-ospf-1-area-0.0.0.0] mpls te enable

[SwitchD-ospf-1-area-0.0.0.0] quit

[SwitchD-ospf-1] quit

(6)      配置MPLS TE隧道

# 在Switch A上配置MPLS TE隧道Tunnel1,用于传输企业A的数据:目的地址为Switch D的LSR ID(4.4.4.4);采用RSVP-TE信令协议建立MPLS TE隧道;隧道所需的带宽为20000kbps;开启路由记录功能。

[SwitchA] interface tunnel 1 mode mpls-te

[SwitchA-Tunnel1] ip address 7.1.1.1 255.255.255.0

[SwitchA-Tunnel1] destination 4.4.4.4

[SwitchA-Tunnel1] mpls te signaling rsvp-te

[SwitchA-Tunnel1] mpls te bandwidth 20000

[SwitchA-Tunnel1] mpls te record-route

[SwitchA-Tunnel1] quit

# Switch A上配置MPLS TE隧道Tunnel2,用于传输企业B的数据:目的地址为Switch DLSR ID4.4.4.4);采用RSVP-TE信令协议建立MPLS TE隧道;隧道所需的带宽为30000kbps;开启路由记录功能。

[SwitchA] interface tunnel 2 mode mpls-te

[SwitchA-Tunnel2] ip address 8.1.1.1 255.255.255.0

[SwitchA-Tunnel2] destination 4.4.4.4

[SwitchA-Tunnel2] mpls te signaling rsvp-te

[SwitchA-Tunnel2] mpls te bandwidth 30000

[SwitchA-Tunnel2] mpls te record-route

[SwitchA-Tunnel2] quit

(7)      配置静态路由使流量沿MPLS TE隧道转发

# 在Switch A上配置静态路由,使得到达网络50.1.1.0/24的流量通过MPLS TE隧道接口Tunnel1转发。

[SwitchA] ip route-static 50.1.1.0 24 tunnel 1 preference 1

# 在Switch A上配置静态路由,使得到达网络60.1.1.0/24的流量通过MPLS TE隧道接口Tunnel2转发。

[SwitchA] ip route-static 60.1.1.0 24 tunnel 2 preference 1

3.5  验证配置

# 配置完成后,在Switch A上执行display interface tunnel brief命令可以看到2个隧道接口的状态为UP。

[SwitchA] display interface tunnel brief

Brief information on interfaces in route mode:

Link: ADM - administratively down; Stby - standby

Protocol: (s) - spoofing

Interface            Link Protocol Primary IP      Description

Tun1                 UP   UP       7.1.1.1         Tunnel1 Interface

Tun2                 UP   UP       8.1.1.1         Tunnel2 Interface

# 在Switch A上执行display mpls te tunnel-interface命令可以看到2条隧道的详细信息。

[SwitchA] display mpls te tunnel-interface

Tunnel Name            : Tunnel 1

Tunnel State           : Up (Main CRLSP up, Shared-resource CRLSP down)

Tunnel Attributes      :

  LSP ID               : 27415           Tunnel ID            : 1

  Admin State          : Normal

  Ingress LSR ID       : 1.1.1.1         Egress LSR ID        : 4.4.4.4

  Signaling            : RSVP-TE         Static CRLSP Name    : -

  Resv Style           : SE

  Tunnel mode          : -

  Reverse-LSP name     : -

  Reverse-LSP LSR ID   : -               Reverse-LSP Tunnel ID: -

  Class Type           : CT0             Tunnel Bandwidth     : 20000 kbps

  Reserved Bandwidth   : 20000 kbps

  Setup Priority       : 7               Holding Priority     : 7

  Affinity Attr/Mask   : 0/0

  Explicit Path        : -

  Backup Explicit Path : -

  Metric Type          : TE

  Record Route         : Enabled         Record Label         : Disabled

  FRR Flag             : Disabled        Bandwidth Protection : Disabled

  Backup Bandwidth Flag: Disabled        Backup Bandwidth Type: -

  Backup Bandwidth     : -

  Bypass Tunnel        : No              Auto Created         : No

  Route Pinning        : Disabled

  Retry Limit          : 3               Retry Interval       : 2 sec

  Reoptimization       : Disabled        Reoptimization Freq  : -

  Backup Type          : None            Backup LSP ID        : -

  Auto Bandwidth       : Disabled        Auto Bandwidth Freq  : -

  Min Bandwidth        : -               Max Bandwidth        : -

  Collected Bandwidth  : -

 

Tunnel Name            : Tunnel 2

Tunnel State           : Up (Main CRLSP up, Shared-resource CRLSP down)

Tunnel Attributes      :

  LSP ID               : 27302           Tunnel ID            : 2

  Admin State          : Normal

  Ingress LSR ID       : 1.1.1.1         Egress LSR ID        : 4.4.4.4

  Signaling            : RSVP-TE         Static CRLSP Name    : -

  Resv Style           : SE

  Tunnel mode          : -

  Reverse-LSP name     : -

  Reverse-LSP LSR ID   : -               Reverse-LSP Tunnel ID: -

  Class Type           : CT0             Tunnel Bandwidth     : 30000 kbps

  Reserved Bandwidth   : 30000 kbps

  Setup Priority       : 7               Holding Priority     : 7

  Affinity Attr/Mask   : 0/0

  Explicit Path        : -

  Backup Explicit Path : -

  Metric Type          : TE

  Record Route         : Enabled         Record Label         : Disabled

  FRR Flag             : Disabled        Bandwidth Protection : Disabled

  Backup Bandwidth Flag: Disabled        Backup Bandwidth Type: -

  Backup Bandwidth     : -

  Bypass Tunnel        : No              Auto Created         : No

  Route Pinning        : Disabled

  Retry Limit          : 3               Retry Interval       : 2 sec

  Reoptimization       : Disabled        Reoptimization Freq  : -

  Backup Type          : None            Backup LSP ID        : -

  Auto Bandwidth       : Disabled        Auto Bandwidth Freq  : -

  Min Bandwidth        : -               Max Bandwidth        : -

  Collected Bandwidth  : -

# 在Switch A上执行display ip routing-table命令,可以看到路由表中有以Tunnel1和Tunnel2为出接口的静态路由信息。

[SwitchA] display ip routing-table

 

Destinations : 30        Routes : 31

 

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

0.0.0.0/32          Direct 0    0            127.0.0.1       InLoop0

1.1.1.1/32          Direct 0    0            127.0.0.1       InLoop0

2.2.2.2/32          OSPF   10   1            10.1.1.2        Vlan10

3.3.3.3/32          OSPF   10   1            30.1.1.3        Vlan30

4.4.4.4/32          OSPF   10   2            10.1.1.2        Vlan10

                                             30.1.1.3        Vlan30

7.1.1.0/24          Direct 0    0            7.1.1.1         Tun1

7.1.1.0/32          Direct 0    0            7.1.1.1         Tun1

7.1.1.1/32          Direct 0    0            127.0.0.1       InLoop0

7.1.1.255/32        Direct 0    0            7.1.1.1         Tun1

8.1.1.0/24          Direct 0    0            8.1.1.1         Tun2

8.1.1.0/32          Direct 0    0            8.1.1.1         Tun2

8.1.1.1/32          Direct 0    0            127.0.0.1       InLoop0

8.1.1.255/32        Direct 0    0            8.1.1.1         Tun2

10.1.1.0/24         Direct 0    0            10.1.1.1        Vlan10

10.1.1.0/32         Direct 0    0            10.1.1.1        Vlan10

10.1.1.1/32         Direct 0    0            127.0.0.1       InLoop0

10.1.1.255/32       Direct 0    0            10.1.1.1        Vlan10

50.1.1.0/24         Static 1    0            0.0.0.0         Tun1

30.1.1.0/24         Direct 0    0            30.1.1.1        Vlan30

30.1.1.0/32         Direct 0    0            30.1.1.1        Vlan30

30.1.1.1/32         Direct 0    0            127.0.0.1       InLoop0

30.1.1.255/32       Direct 0    0            30.1.1.1        Vlan30

60.1.1.0/24         Static 1    0            0.0.0.0         Tun2

127.0.0.0/8         Direct 0    0            127.0.0.1       InLoop0

127.0.0.0/32        Direct 0    0            127.0.0.1       InLoop0

127.0.0.1/32        Direct 0    0            127.0.0.1       InLoop0

127.255.255.255/32  Direct 0    0            127.0.0.1       InLoop0

224.0.0.0/4         Direct 0    0            0.0.0.0         NULL0

224.0.0.0/24        Direct 0    0            0.0.0.0         NULL0

255.255.255.255/32  Direct 0    0            127.0.0.1       InLoop0

# 在Switch A上执行display rsvp lsp verbose命令,可以看到Tunnel 1的CRLSP使用了Switch A—Switch B—Switch D的路径;Tunnel 2的CRLSP使用了Switch A—Switch C—Switch D的路径。

[SwitchA] display rsvp lsp verbose

Tunnel name: Tunnel1

Destination: 4.4.4.4                      Source: 1.1.1.1

Tunnel ID: 1                              LSP ID: 27415

LSR type: Ingress                         Direction: Unidirectional

Setup priority: 7                         Holding priority: 7

In-Label: -                               Out-Label: 1146

In-Interface: -                           Out-Interface: Vlan10

Nexthop: 10.1.1.2                         Exclude-any: 0

Include-Any: 0                            Include-all: 0

Mean rate (CIR): 20000 kbps               Mean burst size (CBS): 1000.00 bytes

Path MTU: 1500                            Class type: CT0

RRO number: 6

  10.1.1.1/32        Flag: 0x00 (No FRR)

  10.1.1.2/32        Flag: 0x00 (No FRR)

  2.2.2.2/32         Flag: 0x20 (No FRR/Node-ID)

  20.1.1.2/32        Flag: 0x00 (No FRR)

  20.1.1.4/32        Flag: 0x00 (No FRR)

  4.4.4.4/32         Flag: 0x20 (No FRR/Node-ID)

Fast Reroute protection: None

 

Tunnel name: Tunnel2

Destination: 4.4.4.4                      Source: 1.1.1.1

Tunnel ID: 2                              LSP ID: 27302

LSR type: Ingress                         Direction: Unidirectional

Setup priority: 7                         Holding priority: 7

In-Label: -                               Out-Label: 1150

In-Interface: -                           Out-Interface: Vlan30

Nexthop: 30.1.1.3                         Exclude-any: 0

Include-Any: 0                            Include-all: 0

Mean rate (CIR): 30000 kbps               Mean burst size (CBS): 1000.00 bytes

Path MTU: 1500                            Class type: CT0

RRO number: 6

  30.1.1.1/32        Flag: 0x00 (No FRR)

  30.1.1.3/32        Flag: 0x00 (No FRR)

  3.3.3.3/32         Flag: 0x20 (No FRR/Node-ID)

  40.1.1.3/32        Flag: 0x00 (No FRR)

  40.1.1.4/32        Flag: 0x00 (No FRR)

  4.4.4.4/32         Flag: 0x20 (No FRR/Node-ID)

Fast Reroute protection: None

经过验证,可以看到通过部署RSVP-TE服务,自动为两个用户分别建立了两条CRLSP:经过Switch A—Switch B—Switch D的带宽为20000kbps的CRLSP和经过Switch A—Switch C—Switch D的带宽为30000kbps的CRLSP。

3.6  配置文件

·              Switch A

#

ospf 1

 area 0.0.0.0

  network 1.1.1.1 0.0.0.0

  network 10.1.1.0 0.0.0.255

  network 30.1.1.0 0.0.0.255

  mpls te enable

#

 mpls lsr-id 1.1.1.1

#

vlan 10

#

vlan 30

#

vlan 70

#

vlan 80

#

mpls te

#

rsvp

#

interface LoopBack0

 ip address 1.1.1.1 255.255.255.255

#

interface Vlan-interface10

 ip address 10.1.1.1 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 rsvp enable

#

interface Vlan-interface30

 ip address 30.1.1.1 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 rsvp enable

#

interface Vlan-interface70

 ip address 70.1.1.1 255.255.255.0

#

interface Vlan-interface80

 ip address 80.1.1.1 255.255.255.0

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 10

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 30

#

interface Ten-GigabitEthernet1/0/3

 port link-mode bridge

 port access vlan 70

#

interface Ten-GigabitEthernet1/0/4

 port link-mode bridge

 port access vlan 80

#

interface Tunnel1 mode mpls-te

 ip address 7.1.1.1 255.255.255.0

 mpls te bandwidth ct0 20000

 mpls te record-route

 destination 4.4.4.4

#

interface Tunnel2 mode mpls-te

 ip address 8.1.1.1 255.255.255.0

 mpls te bandwidth ct0 30000

 mpls te record-route

 destination 4.4.4.4

#

 ip route-static 20.1.1.0 24 Tunnel1 preference 1

 ip route-static 40.1.1.0 24 Tunnel2 preference 1

#

·              Switch B

#

ospf 1

 area 0.0.0.0

  network 2.2.2.2 0.0.0.0

  network 10.1.1.0 0.0.0.255

  network 20.1.1.0 0.0.0.255

  mpls te enable

#

 mpls lsr-id 2.2.2.2

#

vlan 10

#

vlan 20

#

mpls te

#

rsvp

#

interface LoopBack0

 ip address 2.2.2.2 255.255.255.255

#

interface Vlan-interface10

 ip address 10.1.1.2 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 rsvp enable

#

interface Vlan-interface20

 ip address 20.1.1.2 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 rsvp enable

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 10

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 20

#

·              Switch C

#

ospf 1

 area 0.0.0.0

  network 3.3.3.3 0.0.0.0

  network 30.1.1.0 0.0.0.255

  network 40.1.1.0 0.0.0.255

  mpls te enable

#

 mpls lsr-id 3.3.3.3

#

vlan 30

#

vlan 40

#

mpls te

#

rsvp

#

interface LoopBack0

 ip address 3.3.3.3 255.255.255.0

#

interface Vlan-interface30

 ip address 30.1.1.3 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 rsvp enable

#

interface Vlan-interface40

 ip address 40.1.1.3 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 rsvp enable

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 40

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 30

#

·              Switch D

#

ospf 1

 area 0.0.0.0

  network 4.4.4.4 0.0.0.0

  network 20.1.1.0 0.0.0.255

  network 40.1.1.0 0.0.0.255

  mpls te enable

#

 mpls lsr-id 4.4.4.4

#

vlan 20

#

vlan 40

#

#

vlan 50

#

vlan 60

#

mpls te

#

rsvp

#

interface LoopBack0

 ip address 4.4.4.4 255.255.255.255

#

interface Vlan-interface20

 ip address 20.1.1.4 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 rsvp enable

#

interface Vlan-interface40

 ip address 40.1.1.4 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 rsvp enable

#

interface Vlan-interface50

 ip address 50.1.1.4 255.255.255.0

#

interface Vlan-interface60

 ip address 60.1.1.4 255.255.255.0

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 40

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 20

#

interface Ten-GigabitEthernet1/0/3

 port link-mode bridge

 port access vlan 50

#

interface Ten-GigabitEthernet1/0/4

 port link-mode bridge

 port access vlan 60

#

4  MPLS TE FRR典型配置举例

4.1  组网需求

图4所示,Switch A->Switch B->Switch C->Switch D之间建立了一条CRLSP,承载着某公司的语音业务。由于Switch B和Switch C两台设备相隔较远,中间连有多台二层交换机,链路不太稳定,可能会发生故障,现要求使用MPLS TE FRR功能对Switch B->Switch C这段链路进行保护,当链路出现故障时,能快速切换到Bypass CRLSP(Switch A->Switch B->Switch E->Switch C->Switch D)。(假设Primary隧道和Bypass隧道的所需带宽均为30000kbps;每条链路的最大带宽为50000kbps)

图4 MPLS TE FRR典型配置举例组网图

 

4.2  配置思路

·              为建立主备CRLSP,需要在各Switch上使能MPLS、MPLS TE和RSVP-TE基本能力。

·              由于组网需求中已经明确主CRLSP的路径和Bypass CRLSP的路径,需要通过显式路径的方式指定MPLS TE的主CRLSP和Bypass CRLSP。

·              为实现被保护的主CRLSP链路发生故障后,PLR能快速感知到,需要在主CRLSP保护链路两端的节点上(Switch B和Switch C)配置BFD联动RSVP-TE,使BFD能够快速检测并通告RSVP-TE协议,以便将流量快速切换到Bypass隧道。

·              为实现当BFD检测到被保护链路故障后,主CRLSP上的流量能快速切换到Bypass CRLSP,需在主CRLSP的Ingress节点上使能MPLS TE FRR功能。

·              为了保证主CRLSP链路故障时,MPLS TE能在多条Bypass隧道可能同时并存的情况下,选择出最优的Bypass隧道,需要在PLR节点上配置FRR的Bypass隧道的优选时间间隔为5秒(缺省为300秒)。

4.3  配置注意事项

·              进行本案例配置之前,需要先全局关闭STP功能,或为每个VLAN映射一个MSTP实例,否则可能会阻断环路中的一条链路。

·              只有使用RSVP-TE信令协议建立的MPLS TE隧道支持FRR功能。

·              不要在同一个接口同时配置快速重路由功能和RSVP认证功能。

·              由于FRR使用的Bypass隧道需要预先建立,占用额外的带宽,因此,在网络带宽余量不多的情况下,应该只对关键的接口或链路进行快速重路由保护。

·              用户在配置时应保证Bypass隧道的带宽不小于被保护的所有主CRLSP所需带宽之和,否则可能导致部分主CRLSP不能被Bypass隧道保护。

·              Bypass隧道一般不转发数据。如果Bypass隧道在保护主CRLSP的同时转发流量,需要为Bypass隧道提供足够的带宽。

·              Bypass隧道不能作为VPN等业务的承载隧道。

·              不能为Bypass隧道配置快速重路由功能。也就是说,Bypass隧道不能同时作为主CRLSP被其他Bypass隧道保护,隧道不能被嵌套保护。

·              Bypass隧道不能经过被保护的接口或节点。

·              不要求带宽保护的主CRLSP和提供保护带宽的Bypass隧道绑定成功后,主CRLSP占用Bypass隧道的保护带宽。提供带宽保护的Bypass隧道的保护带宽先到先得,需要带宽保护的主CRLSP并不能抢占不需要带宽保护的主CRLSP。

·              发生FRR切换后,如果修改Bypass隧道的保护带宽,使得保护带宽类型不同、保护带宽不够或者引起FRR保护类型(是否为主CRLSP提供带宽保护)变化,都将导致主CRLSP Down。

4.4  配置步骤

(1)      配置各接口的IP地址

# 按照图4配置各接口的IP地址和掩码,包括LoopBack接口,下面以Switch A为例,其它设备配置方法类似,具体配置过程略。

<SwitchA> system-view

[SwitchA] vlan 2

[SwitchA-vlan2] port ten-gigabitethernet 1/0/1

[SwitchA-vlan2] quit

[SwitchA] interface vlan-interface 2

[SwitchA-Vlan-interface2] ip address 2.1.1.1 24

[SwitchA] interface loopback 0

[SwitchA-LoopBack0] ip address 1.1.1.1 32

[SwitchA-LoopBack0] quit

(2)      配置OSPF协议,以保证各交换机之间路由可达

# 配置Switch A。

[SwitchA] ospf

[SwitchA-ospf-1] area 0

[SwitchA-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0

[SwitchA-ospf-1-area-0.0.0.0] network 2.1.1.0 0.0.0.255

[SwitchA-ospf-1-area-0.0.0.0] quit

[SwitchA-ospf-1] quit

# 配置Switch B。

[SwitchB] ospf

[SwitchB-ospf-1] area 0

[SwitchB-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0

[SwitchB-ospf-1-area-0.0.0.0] network 2.1.1.0 0.0.0.255

[SwitchB-ospf-1-area-0.0.0.0] network 3.1.1.0 0.0.0.255

[SwitchB-ospf-1-area-0.0.0.0] network 3.2.1.0 0.0.0.255

[SwitchB-ospf-1-area-0.0.0.0] quit

[SwitchB-ospf-1] quit

# 配置Switch C。

[SwitchC] ospf

[SwitchC-ospf-1] area 0

[SwitchC-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0

[SwitchC-ospf-1-area-0.0.0.0] network 3.1.1.0 0.0.0.255

[SwitchC-ospf-1-area-0.0.0.0] network 3.3.1.0 0.0.0.255

[SwitchC-ospf-1-area-0.0.0.0] network 4.1.1.0 0.0.0.255

[SwitchC-ospf-1-area-0.0.0.0] quit

[SwitchC-ospf-1] quit

# 配置Switch D。

[SwitchD] ospf

[SwitchD-ospf-1] area 0

[SwitchD-ospf-1-area-0.0.0.0] network 4.4.4.4 0.0.0.0

[SwitchD-ospf-1-area-0.0.0.0] network 4.1.1.0 0.0.0.255

[SwitchD-ospf-1-area-0.0.0.0] quit

[SwitchD-ospf-1] quit

# 配置Switch E。

[SwitchE] ospf

[SwitchE-ospf-1] area 0

[SwitchE-ospf-1-area-0.0.0.0] network 5.5.5.5 0.0.0.0

[SwitchE-ospf-1-area-0.0.0.0] network 3.2.1.0 0.0.0.255

[SwitchE-ospf-1-area-0.0.0.0] network 3.3.1.0 0.0.0.255

[SwitchE-ospf-1-area-0.0.0.0] quit

[SwitchE-ospf-1] quit

# 配置完成后,在各交换机上执行display ip routing-table命令,可以看到相互之间都学到了对方的主机路由,包括Loopback接口对应的主机路由。以Switch A为例:

[SwitchA] display ip routing-table

 

Destinations : 21        Routes : 21

 

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

0.0.0.0/32          Direct 0    0            127.0.0.1       InLoop0

1.1.1.1/32          Direct 0    0            127.0.0.1       InLoop0

2.1.1.0/24          Direct 0    0            2.1.1.1         Vlan2

2.1.1.0/32          Direct 0    0            2.1.1.1         Vlan2

2.1.1.1/32          Direct 0    0            127.0.0.1       InLoop0

2.1.1.255/32        Direct 0    0            2.1.1.1         Vlan2

2.2.2.2/32          OSPF   10   1            2.1.1.2         Vlan2

3.1.1.0/24          OSPF   10   2            2.1.1.2         Vlan2

3.2.1.0/24          OSPF   10   2            2.1.1.2         Vlan2

3.3.1.0/24          OSPF   10   3            2.1.1.2         Vlan2

3.3.3.3/32          OSPF   10   2            2.1.1.2         Vlan2

4.1.1.0/24          OSPF   10   3            2.1.1.2         Vlan2

4.4.4.4/32          OSPF   10   3            2.1.1.2         Vlan2

5.5.5.5/32          OSPF   10   2            2.1.1.2         Vlan2

127.0.0.0/8         Direct 0    0            127.0.0.1       InLoop0

127.0.0.0/32        Direct 0    0            127.0.0.1       InLoop0

127.0.0.1/32        Direct 0    0            127.0.0.1       InLoop0

127.255.255.255/32  Direct 0    0            127.0.0.1       InLoop0

224.0.0.0/4         Direct 0    0            0.0.0.0         NULL0

224.0.0.0/24        Direct 0    0            0.0.0.0         NULL0

255.255.255.255/32  Direct 0    0            127.0.0.1       InLoop0

(3)      配置LSR ID,开启MPLS、MPLS TE和RSVP-TE能力,并在Switch B和Switch C上配置RSVP-TE与BFD联动,以检测Switch B和Switch C之间链路的状态

# 配置Switch A

[SwitchA] mpls lsr-id 1.1.1.1

[SwitchA] mpls te

[SwitchA-te] quit

[SwitchA] rsvp

[SwitchA-rsvp] quit

[SwitchA] interface vlan-interface 2

[SwitchA-Vlan-interface2] mpls enable

[SwitchA-Vlan-interface2] mpls te enable

[SwitchA-Vlan-interface2] rsvp enable

[SwitchA-Vlan-interface2] quit

# 配置Switch B。

[SwitchB] mpls lsr-id 2.2.2.2

[SwitchB] mpls te

[SwitchB-te] quit

[SwitchB] rsvp

[SwitchB-rsvp] quit

[SwitchB] interface vlan-interface 2

[SwitchB-Vlan-interface2] mpls enable

[SwitchB-Vlan-interface2] mpls te enable

[SwitchB-Vlan-interface2] rsvp enable

[SwitchB-Vlan-interface2] quit

[SwitchB] interface vlan-interface 3

[SwitchB-Vlan-interface3] mpls enable

[SwitchB-Vlan-interface3] mpls te enable

[SwitchB-Vlan-interface3] rsvp enable

[SwitchB-Vlan-interface3] rsvp bfd enable

[SwitchB-Vlan-interface3] quit

[SwitchB] interface vlan-interface 5

[SwitchB-Vlan-interface5] mpls enable

[SwitchB-Vlan-interface5] mpls te enable

[SwitchB-Vlan-interface5] rsvp enable

[SwitchB-Vlan-interface5] quit

# 配置Switch C。

[SwitchC] mpls lsr-id 3.3.3.3

[SwitchC] mpls te

[SwitchC-te] quit

[SwitchC] rsvp

[SwitchC-rsvp] quit

[SwitchC] interface vlan-interface 3

[SwitchC-Vlan-interface3] mpls enable

[SwitchC-Vlan-interface3] mpls te enable

[SwitchC-Vlan-interface3] rsvp enable

[SwitchC-Vlan-interface3] rsvp bfd enable

[SwitchC-Vlan-interface3] quit

[SwitchC] interface vlan-interface 4

[SwitchC-Vlan-interface4] mpls enable

[SwitchC-Vlan-interface4] mpls te enable

[SwitchC-Vlan-interface4] rsvp enable

[SwitchC-Vlan-interface4] quit

[SwitchC] interface vlan-interface 6

[SwitchC-Vlan-interface6] mpls enable

[SwitchC-Vlan-interface6] mpls te enable

[SwitchC-Vlan-interface6] rsvp enable

[SwitchC-Vlan-interface6] quit

# 配置Switch D。

[SwitchD] mpls lsr-id 4.4.4.4

[SwitchD] mpls te

[SwitchD-te] quit

[SwitchD] rsvp

[SwitchD-rsvp] quit

[SwitchD] interface vlan-interface 4

[SwitchD-Vlan-interface4] mpls enable

[SwitchD-Vlan-interface4] mpls te enable

[SwitchD-Vlan-interface4] rsvp enable

[SwitchD-Vlan-interface4] quit

# 配置Switch E。

[SwitchE] mpls lsr-id 5.5.5.5

[SwitchE] mpls te

[SwitchE-te] quit

[SwitchE] rsvp

[SwitchE-rsvp] quit

[SwitchE] interface vlan-interface 5

[SwitchE-Vlan-interface5] mpls enable

[SwitchE-Vlan-interface5] mpls te enable

[SwitchE-Vlan-interface5] rsvp enable

[SwitchE-Vlan-interface5] quit

[SwitchE] interface vlan-interface 6

[SwitchE-Vlan-interface6] mpls enable

[SwitchE-Vlan-interface6] mpls te enable

[SwitchE-Vlan-interface6] rsvp enable

[SwitchE-Vlan-interface6] quit

(4)      配置链路的MPLS TE属性

# 在Switch A上配置链路的最大带宽。

[SwitchA] interface vlan-interface 2

[SwitchA-Vlan-interface2] mpls te max-link-bandwidth 50000

[SwitchA-Vlan-interface2] quit

# Switch B上配置链路的最大带宽。

[SwitchB] interface vlan-interface 2

[SwitchB-Vlan-interface2] mpls te max-link-bandwidth 50000

[SwitchB-Vlan-interface2] quit

[SwitchB] interface vlan-interface 3

[SwitchB-Vlan-interface3] mpls te max-link-bandwidth 50000

[SwitchB-Vlan-interface3] quit

[SwitchB] interface vlan-interface 5

[SwitchB-Vlan-interface5] mpls te max-link-bandwidth 50000

[SwitchB-Vlan-interface5] quit

# Switch C上配置链路的最大带宽。

[SwitchC] interface vlan-interface 3

[SwitchC-Vlan-interface3] mpls te max-link-bandwidth 50000

[SwitchC-Vlan-interface3] quit

[SwitchC] interface vlan-interface 4

[SwitchC-Vlan-interface4] mpls te max-link-bandwidth 50000

[SwitchC-Vlan-interface4] quit

[SwitchC] interface vlan-interface 6

[SwitchC-Vlan-interface6] mpls te max-link-bandwidth 50000

[SwitchC-Vlan-interface6] quit

# Switch D上配置链路的最大带宽。

[SwitchD] interface vlan-interface 4

[SwitchD-Vlan-interface4] mpls te max-link-bandwidth 50000

[SwitchD-Vlan-interface4] quit

# Switch E上配置链路的最大带宽。

[SwitchE] interface vlan-interface 5

[SwitchE-Vlan-interface5] mpls te max-link-bandwidth 50000

[SwitchE-Vlan-interface5] quit

[SwitchE] interface vlan-interface 6

[SwitchE-Vlan-interface6] mpls te max-link-bandwidth 50000

[SwitchE-Vlan-interface6] quit

(5)      配置OSPF TE,发布链路的MPLS TE属性

# Switch A上使能OSPF的Opaque LSA发布接收能力(缺省情况下处于开启状态),并在OSPF区域0内使能MPLS TE能力

[SwitchA] ospf

[SwitchA-ospf-1] opaque-capability enable

[SwitchA-ospf-1] area 0

[SwitchA-ospf-1-area-0.0.0.0] mpls te enable

[SwitchA-ospf-1-area-0.0.0.0] quit

[SwitchA-ospf-1] quit

# Switch B上使能OSPF的Opaque LSA发布接收能力(缺省情况下处于开启状态),并在OSPF区域0内使能MPLS TE能力

[SwitchB] ospf

[SwitchB-ospf-1] opaque-capability enable

[SwitchB-ospf-1] area 0

[SwitchB-ospf-1-area-0.0.0.0] mpls te enable

[SwitchB-ospf-1-area-0.0.0.0] quit

[SwitchB-ospf-1] quit

# Switch C上使能OSPF的Opaque LSA发布接收能力(缺省情况下处于开启状态),并在OSPF区域0内使能MPLS TE能力

[SwitchC] ospf

[SwitchC-ospf-1] opaque-capability enable

[SwitchC-ospf-1] area 0

[SwitchC-ospf-1-area-0.0.0.0] mpls te enable

[SwitchC-ospf-1-area-0.0.0.0] quit

[SwitchC-ospf-1] quit

# Switch D上使能OSPF的Opaque LSA发布接收能力(缺省情况下处于开启状态),并在OSPF区域0内使能MPLS TE能力

[SwitchD] ospf

[SwitchD-ospf-1] opaque-capability enable

[SwitchD-ospf-1] area 0

[SwitchD-ospf-1-area-0.0.0.0] mpls te enable

[SwitchD-ospf-1-area-0.0.0.0] quit

[SwitchD-ospf-1] quit

# Switch E上使能OSPF的Opaque LSA发布接收能力(缺省情况下处于开启状态),并在OSPF区域0内使能MPLS TE能力

[SwitchE] ospf

[SwitchE-ospf-1] opaque-capability enable

[SwitchE-ospf-1] area 0

[SwitchE-ospf-1-area-0.0.0.0] mpls te enable

[SwitchE-ospf-1-area-0.0.0.0] quit

[SwitchE-ospf-1] quit

(6)      在主CRLSP的Ingress节点Switch A上建立MPLS TE隧道

# 配置主CRLSP的显式路径,缺省采用严格下一跳方式。

[SwitchA] explicit-path pri-path

[SwitchA-explicit-path-pri-path] nexthop 2.1.1.2

[SwitchA-explicit-path-pri-path] nexthop 3.1.1.3

[SwitchA-explicit-path-pri-path] nexthop 4.1.1.4

[SwitchA-explicit-path-pri-path] nexthop 4.4.4.4

[SwitchA-explicit-path-pri-path] quit

# 配置主CRLSP的MPLS TE隧道Tunnel4:目的地址为Switch D的LSR ID(4.4.4.4);采用RSVP-TE信令协议建立MPLS TE隧道;隧道所需带宽为30000kbps;隧道引用显式路径pri-path。

[SwitchA] interface tunnel4 mode mpls-te

[SwitchA-Tunnel4] ip address 10.1.1.1 255.255.255.0

[SwitchA-Tunnel4] destination 4.4.4.4

[SwitchA-Tunnel4] mpls te signaling rsvp-te

[SwitchA-Tunnel4] mpls te bandwidth 30000

[SwitchA-Tunnel4] mpls te path preference 1 explicit-path pri-path

# 开启MPLS TE隧道的FRR功能。

[SwitchA-Tunnel4] mpls te fast-reroute

[SwitchA-Tunnel4] quit

# 配置完成后,在Switch A上执行display interface tunnel brief命令,可以看到Tunnel4的状态为UP

[SwitchA] display interface tunnel brief

Brief information on interfaces in route mode:

Link: ADM - administratively down; Stby - standby

Protocol: (s) - spoofing

Interface            Link Protocol Primary IP      Description

Tun4                 UP   UP       10.1.1.1        Tunnel4 Interface

# 在Switch A上执行display mpls te tunnel-interface命令,可以看到隧道接口的详细信息。

[SwitchA] display mpls te tunnel-interface

Tunnel Name            : Tunnel 4

Tunnel State           : Up (Main CRLSP up, Shared-resource CRLSP down)

Tunnel Attributes      :

  LSP ID               : 37325           Tunnel ID            : 4

  Admin State          : Normal

  Ingress LSR ID       : 1.1.1.1         Egress LSR ID        : 4.4.4.4

  Signaling            : RSVP-TE         Static CRLSP Name    : -

  Resv Style           : SE

  Tunnel mode          : -

  Reverse-LSP name     : -

  Reverse-LSP LSR ID   : -               Reverse-LSP Tunnel ID: -

  Class Type           : CT0             Tunnel Bandwidth     : 30000 kbps

  Reserved Bandwidth   : 30000 kbps

  Setup Priority       : 7               Holding Priority     : 7

  Affinity Attr/Mask   : 0/0

  Explicit Path        : pri-path

  Backup Explicit Path : -

  Metric Type          : TE

  Record Route         : Enabled         Record Label         : Enabled

  FRR Flag             : Enabled         Bandwidth Protection : Disabled

  Backup Bandwidth Flag: Disabled        Backup Bandwidth Type: -

  Backup Bandwidth     : -

  Bypass Tunnel        : No              Auto Created         : No

  Route Pinning        : Disabled

  Retry Limit          : 3               Retry Interval       : 2 sec

  Reoptimization       : Disabled        Reoptimization Freq  : -

  Backup Type          : None            Backup LSP ID        : -

  Auto Bandwidth       : Disabled        Auto Bandwidth Freq  : -

  Min Bandwidth        : -               Max Bandwidth        : -

  Collected Bandwidth  : -

(7)      在作为PLR的Switch B上配置Bypass隧道

# 配置Bypass隧道的显式路径。

[SwitchB] explicit-path by-path

[SwitchB-explicit-path-by-path] nexthop 3.2.1.5

[SwitchB-explicit-path-by-path] nexthop 3.3.1.3

[SwitchB-explicit-path-by-path] nexthop 3.3.3.3

[SwitchB-explicit-path-by-path] quit

# 配置Bypass隧道Tunnel5:目的地址为Switch C的LSR ID3.3.3.3);采用RSVP-TE信令协议建立MPLS TE隧道;隧道所需带宽为30000kbps;隧道引用显式路径by-path

[SwitchB] interface tunnel 5 mode mpls-te

[SwitchB-Tunnel5] ip address 11.1.1.1 255.255.255.0

[SwitchB-Tunnel5] destination 3.3.3.3

[SwitchB-Tunnel5] mpls te signaling rsvp-te

[SwitchA-Tunnel5] mpls te backup bandwidth 30000

[SwitchB-Tunnel5] mpls te path preference 1 explicit-path by-path

# 将Bypass隧道绑定到被保护的接口。

[SwitchB] interface vlan-interface 3

[SwitchB-Vlan-interface3] mpls te fast-reroute bypass-tunnel tunnel 5

[SwitchB-Vlan-interface3] quit

# 配置完成后,在Switch B上执行display interface tunnel brief命令可以看到接口Tunnel5的状态为UP

[SwitchB] display interface tunnel brief

Brief information on interfaces in route mode:

Link: ADM - administratively down; Stby - standby

Protocol: (s) - spoofing

Interface            Link Protocol Primary IP      Description

Tun5                 UP   DOWN     11.1.1.1        Tunnel5 Interface

(8)       配置静态路由使流量沿MPLS TE隧道转发

# 在Switch A上配置静态路由,使得到达网络4.1.1.0/24的流量通过MPLS TE隧道接口Tunnel4转发。

[SwitchA] ip route-static 4.1.1.0 24 tunnel 4 preference 1

4.5  验证配置

# 在所有设备上执行display mpls lsp命令,可以看到LSP表项。在Switch B上存在两条LSP,通过Bypass隧道保护主CRLSP。

[SwitchA] display mpls lsp

FEC                         Proto    In/Out Label    Interface/Out NHLFE

1.1.1.1/4/37325             RSVP     -/1150          Vlan2

2.1.1.2                     Local    -/-             Vlan2

Tunnel4                     Local    -/-             NHLFE1026

[SwitchB] display mpls lsp

FEC                         Proto    In/Out Label    Interface/Out NHLFE

1.1.1.1/4/37325             RSVP     1150/1147       Vlan3

Backup                               1150/1147       Tun5

2.2.2.2/5/18928             RSVP     -/1149          Vlan5

3.1.1.3                     Local    -/-             Vlan3

3.2.1.5                     Local    -/-             Vlan5

Tunnel5                     Local    -/-             NHLFE1027

[SwitchC] display mpls lsp

FEC                         Proto    In/Out Label    Interface/Out NHLFE

1.1.1.1/4/37325             RSVP     1147/3          Vlan4

2.2.2.2/5/18928             RSVP     3/-             -

4.1.1.4                     Local    -/-             Vlan4

# 在PLR上shutdown被保护的出接口Vlan-interface 3

[SwitchB] interface vlan-interface 3

[SwitchB-Vlan-interface3] shutdown

[SwitchB-Vlan-interface3] quit

# Switch A上执行display interface tunnel 4 brief命令查看主CRLSP的状态,可以看到Tunnel接口仍然处于UP状态。

[SwitchA] display interface tunnel 4 brief

Brief information on interfaces in route mode:

Link: ADM - administratively down; Stby - standby

Protocol: (s) - spoofing

Interface            Link Protocol Primary IP      Description

Tun4                 UP   UP       10.1.1.1        Tunnel4 Interface

# 在Switch A上执行display mpls te tunnel-interface命令,可以看到隧道接口的详细信息。

[SwitchA] display mpls te tunnel-interface

Tunnel Name            : Tunnel 4

Tunnel State           : Up (Main CRLSP up, Shared-resource CRLSP being set up)

Tunnel Attributes      :

  LSP ID               : 37325           Tunnel ID            : 4

  Admin State          : Normal

  Ingress LSR ID       : 1.1.1.1         Egress LSR ID        : 4.4.4.4

  Signaling            : RSVP-TE         Static CRLSP Name    : -

  Resv Style           : SE

  Tunnel mode          : -

  Reverse-LSP name     : -

  Reverse-LSP LSR ID   : -               Reverse-LSP Tunnel ID: -

  Class Type           : CT0             Tunnel Bandwidth     : 30000 kbps

  Reserved Bandwidth   : 30000 kbps

  Setup Priority       : 7               Holding Priority     : 7

  Affinity Attr/Mask   : 0/0

  Explicit Path        : pri-path

  Backup Explicit Path : -

  Metric Type          : TE

  Record Route         : Enabled         Record Label         : Enabled

  FRR Flag             : Enabled         Bandwidth Protection : Disabled

  Backup Bandwidth Flag: Disabled        Backup Bandwidth Type: -

  Backup Bandwidth     : -

  Bypass Tunnel        : No              Auto Created         : No

  Route Pinning        : Disabled

  Retry Limit          : 3               Retry Interval       : 2 sec

  Reoptimization       : Disabled        Reoptimization Freq  : -

  Backup Type          : None            Backup LSP ID        : -

  Auto Bandwidth       : Disabled        Auto Bandwidth Freq  : -

  Min Bandwidth        : -               Max Bandwidth        : -

  Collected Bandwidth  : -

# 在Switch B上执行display mpls lsp命令,可以看到Bypass隧道被使用。

[SwitchB] display mpls lsp

FEC                         Proto    In/Out Label    Interface/Out NHLFE

1.1.1.1/4/37325             RSVP     1150/1147       Tun5

2.2.2.2/5/18928             RSVP     -/1149          Vlan5

3.2.1.5                     Local    -/-             Vlan5

Tunnel5                     Local    -/-             NHLFE1027

# 在PLR上配置在多条旁路隧道中进行优选的时间间隔为5秒。

[SwitchB] mpls te

[SwitchB-te] fast-reroute timer 5

[SwitchB-te] quit

# PLRundo shutdown被保护的出接口Vlan-interface 3

[SwitchB] interface vlan-interface 3

[SwitchB-Vlan-interface3] undo shutdown

[SwitchB-Vlan-interface3] quit

# Switch A上执行display interface tunnel 4 brief命令查看主CRLSP的状态,可以看到Tunnel接口处于up状态。

[SwitchA] display interface tunnel 4 brief

Brief information on interfaces in route mode:

Link: ADM - administratively down; Stby - standby

Protocol: (s) - spoofing

Interface            Link Protocol Primary IP      Description

Tun4                 UP   UP       10.1.1.1        Tunnel4 Interface

# 等待约5秒钟后,在Switch B上执行display mpls lsp verbose命令,可以看到Tunnel5仍绑定到出接口Vlan-interface 3,但未被使用。

[SwitchB] display mpls lsp verbose

Destination  : 4.4.4.4

FEC          : 1.1.1.1/4/53319

Protocol     : RSVP

LSR Type     : Transit

Service      : -

In-Label     : 1150

Path ID      : 0x540000003.1

State        : Active

Out-Label    : 1150

Nexthop      : 3.1.1.3

Out-Interface: Vlan3

BkLabel      : 1150

BkInterface  : Tun5

 

Destination  : 3.3.3.3

FEC          : 2.2.2.2/5/16429

Protocol     : RSVP

LSR Type     : Ingress

Service      : -

NHLFE ID     : 1025

State        : Active

Out-Label    : 1151

Nexthop      : 3.2.1.5

Out-Interface: Vlan5

 

Destination  : 3.1.1.3

FEC          : 3.1.1.3

Protocol     : Local

LSR Type     : Ingress

Service      : -

NHLFE ID     : 1027

State        : Active

Nexthop      : 3.1.1.3

Out-Interface: Vlan3

 

Destination  : 3.2.1.5

FEC          : 3.2.1.5

Protocol     : Local

LSR Type     : Ingress

Service      : -

NHLFE ID     : 1024

State        : Active

Nexthop      : 3.2.1.5

Out-Interface: Vlan5

 

Destination  : 3.3.3.3

FEC          : Tunnel5

Protocol     : Local

LSR Type     : Ingress

Service      : -

NHLFE ID     : 268435461

State        : Active

Out-Interface: NHLFE1025

# 在Switch A上执行display ip routing-table命令,可以看到路由表中有以Tunnel4为出接口的静态路由信息。

[SwitchA] display ip routing-table

 

Destinations : 25        Routes : 25

 

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

0.0.0.0/32          Direct 0    0            127.0.0.1       InLoop0

1.1.1.1/32          Direct 0    0            127.0.0.1       InLoop0

2.1.1.0/24          Direct 0    0            2.1.1.1         Vlan2

2.1.1.0/32          Direct 0    0            2.1.1.1         Vlan2

2.1.1.1/32          Direct 0    0            127.0.0.1       InLoop0

2.1.1.255/32        Direct 0    0            2.1.1.1         Vlan2

2.2.2.2/32          OSPF   10   1            2.1.1.2         Vlan2

3.1.1.0/24          OSPF   10   2            2.1.1.2         Vlan2

3.2.1.0/24          OSPF   10   2            2.1.1.2         Vlan2

3.3.1.0/24          OSPF   10   3            2.1.1.2         Vlan2

3.3.3.3/32          OSPF   10   2            2.1.1.2         Vlan2

4.1.1.0/24          Static 1    0            0.0.0.0         Tun4

4.4.4.4/32          OSPF   10   3            2.1.1.2         Vlan2

5.5.5.5/32          OSPF   10   2            2.1.1.2         Vlan2

10.1.1.0/24         Direct 0    0            10.1.1.1        Tun4

10.1.1.0/32         Direct 0    0            10.1.1.1        Tun4

10.1.1.1/32         Direct 0    0            127.0.0.1       InLoop0

10.1.1.255/32       Direct 0    0            10.1.1.1        Tun4

127.0.0.0/8         Direct 0    0            127.0.0.1       InLoop0

127.0.0.0/32        Direct 0    0            127.0.0.1       InLoop0

127.0.0.1/32        Direct 0    0            127.0.0.1       InLoop0

127.255.255.255/32  Direct 0    0            127.0.0.1       InLoop0

224.0.0.0/4         Direct 0    0            0.0.0.0         NULL0

224.0.0.0/24        Direct 0    0            0.0.0.0         NULL0

255.255.255.255/32  Direct 0    0            127.0.0.1       InLoop0

4.6  配置文件

·              Switch A

#

ospf 1

 area 0.0.0.0

  network 1.1.1.1 0.0.0.0

  network 2.1.1.0 0.0.0.255

  mpls te enable

#

 mpls lsr-id 1.1.1.1

#

vlan 2

#

mpls te

#

explicit-path pri-path

 nexthop index 1 2.1.1.2 include strict

 nexthop index 101 3.1.1.3 include strict

 nexthop index 201 4.1.1.4 include strict

 nexthop index 301 4.4.4.4 include strict

#

rsvp

#

interface LoopBack0

 ip address 1.1.1.1 255.255.255.255

#

interface Vlan-interface2

 ip address 2.1.1.1 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 rsvp enable

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 2

#

interface Tunnel4 mode mpls-te

 ip address 10.1.1.1 255.255.255.0

 mpls te bandwidth ct0 30000

 mpls te path preference 1 explicit-path pri-path

 mpls te fast-reroute

 destination 4.4.4.4

#

ip route-static 4.1.1.0 24 Tunnel4 preference 1

#

·              Switch B

#

ospf 1

 area 0.0.0.0

  network 2.1.1.0 0.0.0.255

  network 2.2.2.2 0.0.0.0

  network 3.1.1.0 0.0.0.255

  network 3.2.1.0 0.0.0.255

  mpls te enable

#

 mpls lsr-id 2.2.2.2

#

vlan 2 to 3

#

vlan 5

#

mpls te

  fast-reroute timer 5

#

explicit-path by-path

 nexthop index 1 3.2.1.5 include strict

 nexthop index 101 3.3.1.3 include strict

 nexthop index 201 3.3.3.3 include strict

#

rsvp

#

interface LoopBack0

 ip address 2.2.2.2 255.255.255.255

#

interface Vlan-interface2

 ip address 2.1.1.2 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 rsvp enable

#

interface Vlan-interface3

 ip address 3.1.1.2 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 mpls te fast-reroute bypass-tunnel Tunnel5

 rsvp enable

 rsvp bfd enable

#

interface Vlan-interface5

 ip address 3.2.1.2 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 rsvp enable

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 2

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 3

#

interface Ten-GigabitEthernet1/0/3

 port link-mode bridge

 port access vlan 5

#

interface Tunnel5 mode mpls-te

 ip address 11.1.1.1 255.255.255.0

 mpls te backup bandwidth ct0 30000

 mpls te path preference 1 explicit-path by-path

 destination 3.3.3.3

#

·              Switch C

#

ospf 1

 area 0.0.0.0

  network 3.1.1.0 0.0.0.255

  network 3.3.1.0 0.0.0.255

  network 3.3.3.3 0.0.0.0

  network 4.1.1.0 0.0.0.255

  mpls te enable

#

 mpls lsr-id 3.3.3.3

#

vlan 3 to 4

#

vlan 6

#

mpls te

#

rsvp

#

interface LoopBack0

 ip address 3.3.3.3 255.255.255.255

#

interface Vlan-interface3

 ip address 3.1.1.3 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 rsvp enable

 rsvp bfd enable

#

interface Vlan-interface4

 ip address 4.1.1.3 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 rsvp enable

#

interface Vlan-interface6

 ip address 3.3.1.3 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 rsvp enable

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 4

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 3

#

interface Ten-GigabitEthernet1/0/3

 port link-mode bridge

 port access vlan 6

#

·              Switch D

#

ospf 1

 area 0.0.0.0

  network 4.1.1.0 0.0.0.255

  network 4.4.4.4 0.0.0.0

  mpls te enable

#

 mpls lsr-id 4.4.4.4

#

vlan 4

#

mpls te

#

rsvp

#

interface LoopBack0

 ip address 4.4.4.4 255.255.255.255

#

interface Vlan-interface4

 ip address 4.1.1.4 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 rsvp enable

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 4

#

·              Switch E

#

ospf 1

 area 0.0.0.0

  network 3.2.1.0 0.0.0.255

  network 3.3.1.0 0.0.0.255

  network 5.5.5.5 0.0.0.0

  mpls te enable

#

 mpls lsr-id 5.5.5.5

#

vlan 5 to 6

#

mpls te

#

rsvp

#

interface LoopBack0

 ip address 5.5.5.5 255.255.255.255

#

interface Vlan-interface5

 ip address 3.2.1.5 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 rsvp enable

#

interface Vlan-interface6

 ip address 3.3.1.5 255.255.255.0

 mpls enable

 mpls te enable

 mpls te max-link-bandwidth 50000

 rsvp enable

#

interface Ten-GigabitEthernet1/0/1

 port link-mode bridge

 port access vlan 5

#

interface Ten-GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 6

#

5  相关资料

·              H3C S12500-S系列交换机 MPLS配置指导-R757X

·              H3C S12500-S系列交换机 MPLS命令参考-R757X

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们