61-MPLS TE典型配置举例
本章节下载: 61-MPLS TE典型配置举例 (367.71 KB)
H3C S12500X-AF & S12500-X & S9800产品 MPLS TE典型配置举例
资料版本:6W100-20190628
Copyright © 2019 新华三技术有限公司 版权所有,保留一切权利。
非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部,并不得以任何形式传播。
除新华三技术有限公司的商标外,本手册中出现的其它公司的商标、产品标识及商品名称,由各自权利人拥有。
本文档中的信息可能变动,恕不另行通知。
目 录
本文档介绍MPLS TE相关典型配置举例。
本文档不严格与具体软、硬件版本对应,如果使用过程中与产品实际情况有差异,请参考相关产品手册,或以设备实际情况为准。
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。
本文档假设您已了解MPLS TE特性。
企业A和企业B分别有总部和分支机构两个站点,均通过运营商的MPLS网络进行互联。两企业的分支机构均有重要数据,需要穿越MPLS网络备份到总部服务器上。企业A的数据流量的最大带宽为20000kbps,企业B的数据流量的最大带宽为30000kbps。
在如图1所示的网络环境中,每条链路的最大带宽为50000kbps,最大可预留带宽为40000kbps,可通过部署RSVP-TE服务,自动为两个用户分别建立满足其带宽需求的MPLS TE隧道。
图1 使用RSVP-TE配置MPLS TE隧道典型配置举例组网图
· 为了使用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隧道。
本举例进行配置和验证所使用的版本,如表1所示。
产品 |
软件版本 |
S12500X-AF系列交换机 |
S12500X-CMW710-R2712 |
S12500-X系列交换机 |
S12500X-CMW710-R2712 |
S9800系列交换机 |
S9800-CMW710-R2712 |
· 缺省情况下,S12500X-AF系列、S12500-X系列、S9800系列交换机的接口处于ADM(Administratively Down)状态,请根据实际需要在对应接口视图下使用undo shutdown命令开启接口。
· 在采用RSVP-TE动态建立CRLSP时,必须配置IGP的TE扩展(目前支持OSPF TE和ISIS TE),否则,不能形成TEDB(TE DataBase,流量工程数据库)。在不配置IGP的TE扩展时计算出的路径是由IGP路由得到的,而不是CSPF(Constraint-based Shortest Path First,基于约束的最短路径优先)计算出来的。
· 进行本案例配置之前,需要先全局关闭STP功能,或为每个VLAN映射一个MSTP实例,否则可能会阻断环路中的一条链路。
(1) 配置各接口的IP地址
# 按照图1配置各接口的IP地址和掩码,包括LoopBack接口,下面以Switch A为例,其它设备配置方法类似,具体配置过程略。
<SwitchA> system-view
[SwitchA] vlan 10
[SwitchA-vlan10] port fortygige 1/0/1
[SwitchA-vlan10] quit
[SwitchA] interface vlan-interface 10
[SwitchA-Vlan-interface10] ip address 10.1.1.1 24
[SwitchA-Vlan-interface10] undo shutdown
[SwitchA-Vlan-interface10] quit
[SwitchA] vlan 30
[SwitchA-vlan30] port fortygige 1/0/2
[SwitchA-vlan30] quit
[SwitchA] interface vlan-interface 30
[SwitchA-Vlan-interface30] ip address 30.1.1.1 24
[SwitchA-Vlan-interface30] undo shutdown
[SwitchA-Vlan-interface30] quit
[SwitchA] vlan 70
[SwitchA-vlan70] port fortygige 1/0/3
[SwitchA-vlan70] quit
[SwitchA] interface vlan-interface 70
[SwitchA-Vlan-interface70] ip address 70.1.1.1 24
[SwitchA-Vlan-interface70] undo shutdown
[SwitchA-Vlan-interface70] quit
[SwitchA] vlan 80
[SwitchA-vlan80] port fortygige 1/0/4
[SwitchA-vlan80] quit
[SwitchA] interface vlan-interface 80
[SwitchA-Vlan-interface80] ip address 80.1.1.1 24
[SwitchA-Vlan-interface80] undo shutdown
[SwitchA-Vlan-interface80] 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 O_INTRA 10 1 10.1.1.2 Vlan10
3.3.3.3/32 O_INTRA 10 1 30.1.1.3 Vlan30
4.4.4.4/32 O_INTRA 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 O_INTRA 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] mpls te max-reservable-bandwidth 40000
[SwitchA-Vlan-interface10] quit
[SwitchA] interface vlan-interface 30
[SwitchA-Vlan-interface30] mpls te max-link-bandwidth 50000
[SwitchA-Vlan-interface30] mpls te max-reservable-bandwidth 40000
[SwitchA-Vlan-interface30] quit
# 在Switch B上配置链路的最大带宽和最大可预留带宽。
[SwitchB] interface vlan-interface 10
[SwitchB-Vlan-interface10] mpls te max-link-bandwidth 50000
[SwitchB-Vlan-interface10] mpls te max-reservable-bandwidth 40000
[SwitchB-Vlan-interface10] quit
[SwitchB] interface vlan-interface 20
[SwitchB-Vlan-interface20] mpls te max-link-bandwidth 50000
[SwitchB-Vlan-interface20] mpls te max-reservable-bandwidth 40000
[SwitchB-Vlan-interface20] quit
# 在Switch C上配置链路的最大带宽和最大可预留带宽。
[SwitchC] interface vlan-interface 30
[SwitchC-Vlan-interface30] mpls te max-link-bandwidth 50000
[SwitchC-Vlan-interface30] mpls te max-reservable-bandwidth 40000
[SwitchC-Vlan-interface30] quit
[SwitchC] interface vlan-interface 40
[SwitchC-Vlan-interface40] mpls te max-link-bandwidth 50000
[SwitchC-Vlan-interface40] mpls te max-reservable-bandwidth 40000
[SwitchC-Vlan-interface40] quit
# 在Switch D上配置链路的最大带宽和最大可预留带宽。
[SwitchD] interface vlan-interface 20
[SwitchD-Vlan-interface20] mpls te max-link-bandwidth 50000
[SwitchD-Vlan-interface20] mpls te max-reservable-bandwidth 40000
[SwitchD-Vlan-interface20] quit
[SwitchD] interface vlan-interface 40
[SwitchD-Vlan-interface40] mpls te max-link-bandwidth 50000
[SwitchD-Vlan-interface40] mpls te max-reservable-bandwidth 40000
[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 D的LSR ID(4.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
# 配置完成后,在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
Tun2 UP UP 8.1.1.1
# 在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 O_INTRA 10 1 10.1.1.2 Vlan10
3.3.3.3/32 O_INTRA 10 1 30.1.1.3 Vlan30
4.4.4.4/32 O_INTRA 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: SwitchA_t1
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: SwitchA_t2
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。
· 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
mpls te max-reservable-bandwidth 40000
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
mpls te max-reservable-bandwidth 40000
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 FortyGigE1/0/1
port link-mode bridge
port access vlan 10
#
interface FortyGigE1/0/2
port link-mode bridge
port access vlan 30
#
interface FortyGigE1/0/3
port link-mode bridge
port access vlan 70
#
interface FortyGigE1/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
mpls te max-reservable-bandwidth 40000
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
mpls te max-reservable-bandwidth 40000
rsvp enable
#
interface FortyGigE1/0/1
port link-mode bridge
port access vlan 10
#
interface FortyGigE1/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
mpls te max-reservable-bandwidth 40000
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
mpls te max-reservable-bandwidth 40000
rsvp enable
#
interface FortyGigE1/0/1
port link-mode bridge
port access vlan 40
#
interface FortyGigE1/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
mpls te max-reservable-bandwidth 40000
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
mpls te max-reservable-bandwidth 40000
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 FortyGigE1/0/1
port link-mode bridge
port access vlan 40
#
interface FortyGigE1/0/2
port link-mode bridge
port access vlan 20
#
interface FortyGigE1/0/3
port link-mode bridge
port access vlan 50
#
interface FortyGigE1/0/4
port link-mode bridge
port access vlan 60
#
如图2所示,各设备之间通过OSPF协议实现互通,各链路的度量值已在链路中标注。缺省情况下,Device A发往Device D的流量会通过Vlan-interface23转发。现要求在Device B上创建一条经过Device C到达Device D的MPLS TE隧道,并通过配置MPLS TE转发邻接,实现:
· MPLS TE隧道被当作一条链路发布出去,OSPF网络中的其他设备在路由计算时都会考虑MPLS TE隧道;
· 配置MPLS TE隧道的开销,使Device A发往Device D的流量通过MPLS TE隧道转发。
· 创建MPLS TE隧道前,需要在MPLS TE隧道经过的各个节点和接口上开启MPLS TE能力。
· 要想使转发邻接功能生效,需要创建方向相反的两条MPLS TE隧道,并在隧道的两端同时配置转发邻接功能;
· 为了控制MPLS TE隧道的实际转发路径经过Device C,需要配置显式路径;
· 为了保证Device A发往Device D的流量通过MPLS TE隧道转发,必须在OSPF计算中使包含MPLS TE隧道的路径度量值小于25,即MPLS TE隧道度量值小于15,本例中我们选择12。
缺省情况下,S12500X-AF系列、S12500-X系列、S9800系列交换机的接口处于ADM(Administratively Down)状态,请根据实际需要在对应接口视图下使用undo shutdown命令开启接口。
本举例进行配置和验证所使用的版本,如表2所示。
产品 |
软件版本 |
S12500X-AF系列交换机 |
S12500X-CMW710-R2712 |
S12500-X系列交换机 |
S12500X-CMW710-R2712 |
S9800系列交换机 |
S9800-CMW710-R2712 |
# 配置Device B的LSR ID,开启MPLS、MPLS TE和RSVP-TE能力。
<DeviceB> system-view
[DeviceB] mpls lsr-id 2.2.2.2
[DeviceB] mpls te
[DeviceB-te] quit
[DeviceB] rsvp
[DeviceB-rsvp] quit
[DeviceB] interface vlan-interface 23
[DeviceB-Vlan-interface23] mpls enable
[DeviceB-Vlan-interface23] mpls te enable
[DeviceB-Vlan-interface23] rsvp enable
[DeviceB-Vlan-interface23] quit
# 配置Device C的LSR ID,开启MPLS、MPLS TE和RSVP-TE能力。
<DeviceC> system-view
[DeviceC] mpls lsr-id 3.3.3.3
[DeviceC] mpls te
[DeviceC-te] quit
[DeviceC] rsvp
[DeviceC-rsvp] quit
[DeviceC] interface vlan-interface 23
[DeviceC-Vlan-interface23] mpls enable
[DeviceC-Vlan-interface23] mpls te enable
[DeviceC-Vlan-interface23] rsvp enable
[DeviceC-Vlan-interface23] quit
[DeviceC] interface vlan-interface 34
[DeviceC-Vlan-interface34] mpls enable
[DeviceC-Vlan-interface34] mpls te enable
[DeviceC-Vlan-interface34] rsvp enable
[DeviceC-Vlan-interface34] quit
# 配置Device D的LSR ID,开启MPLS、MPLS TE和RSVP-TE能力。
<DeviceD> system-view
[DeviceD] mpls lsr-id 4.4.4.4
[DeviceD] mpls te
[DeviceD-te] quit
[DeviceD] rsvp
[DeviceD-rsvp] quit
[DeviceD] interface vlan-interface 34
[DeviceD-Vlan-interface34] mpls enable
[DeviceD-Vlan-interface34] mpls te enable
[DeviceD-Vlan-interface34] rsvp enable
[DeviceD-Vlan-interface34] quit
# 在Device B上使能OSPF的Opaque LSA发布接收能力(缺省情况下处于开启状态),并在OSPF区域0内使能MPLS TE能力。
[DeviceB] ospf
[DeviceB-ospf-1] opaque-capability enable
[DeviceB-ospf-1] area 0
[DeviceB-ospf-1-area-0.0.0.0] mpls te enable
[DeviceB-ospf-1-area-0.0.0.0] quit
[DeviceB-ospf-1] quit
# 在Device C上使能OSPF的Opaque LSA发布接收能力(缺省情况下处于开启状态),并在OSPF区域0内使能MPLS TE能力。
[DeviceC] ospf
[DeviceC-ospf-1] opaque-capability enable
[DeviceC-ospf-1] area 0
[DeviceC-ospf-1-area-0.0.0.0] mpls te enable
[DeviceC-ospf-1-area-0.0.0.0] quit
[DeviceC-ospf-1] quit
# 在Device D上使能OSPF的Opaque LSA发布接收能力(缺省情况下处于开启状态),并在OSPF区域0内使能MPLS TE能力。
[DeviceD] ospf
[DeviceD-ospf-1] opaque-capability enable
[DeviceD-ospf-1] area 0
[DeviceD-ospf-1-area-0.0.0.0] mpls te enable
[DeviceD-ospf-1-area-0.0.0.0] quit
[DeviceD-ospf-1] quit
(1) 在Device B上配置MPLS TE隧道
# 在Device B上使用RSVP-TE信令协议建立MPLS TE隧道Tunnel1,目的地址为Device D的LSR ID(4.4.4.4)。
[DeviceB] interface tunnel 1 mode mpls-te
[DeviceB-Tunnel1] ip address 9.2.2.2 255.255.255.0
[DeviceB-Tunnel1] destination 4.4.4.4
[DeviceB-Tunnel1] mpls te signaling rsvp-te
[DeviceB-Tunnel1] quit
# 创建隧道的显式路径,指定Tunnel1的流量从Device C转发。
[DeviceB] explicit-path tun1
[DeviceB-explicit-path-tun1] nexthop 23.23.23.3
[DeviceB-explicit-path-tun1] nexthop 34.34.34.4
[DeviceB-explicit-path-tun1]quit
[DeviceB] interface tunnel 1
[DeviceB–Tunnel1] mpls te path preference 1 explicit-path tun1
# 开启隧道的IGP转发邻接功能,使MPLS TE隧道加入IGP路由计算。
[DeviceB-Tunnel1] mpls te igp advertise
# 在隧道接口tunnel 1上使能OSPF,设置隧道接口的OSPF开销为12。
[DeviceB-Tunnel1] ospf 1 area 0
[DeviceB-Tunnel1] ospf cost 12
[DeviceB-Tunnel1] quit
(2) 在Device D上配置MPLS TE隧道
# 在Device D上使用RSVP-TE信令协议建立MPLS TE隧道Tunnel1,目的地址为Device B的LSR ID(2.2.2.2)。
[DeviceD] interface tunnel 1 mode mpls-te
[DeviceD-Tunnel1] ip address 9.2.2.4 255.255.255.0
[DeviceD-Tunnel1] destination 2.2.2.2
[DeviceD-Tunnel1] mpls te signaling rsvp-te
[DeviceD-Tunnel1] quit
# 创建隧道的显式路径,指定Tunnel1的流量从Device C转发。
[DeviceD] explicit-path tun1
[DeviceD-explicit-path-tun1] nexthop 34.34.34.3
[DeviceD-explicit-path-tun1] nexthop 23.23.23.2
[DeviceD-explicit-path-tun1]quit
[DeviceD] interface tunnel 1
[DeviceD–Tunnel1] mpls te path preference 1 explicit-path tun1
# 开启隧道的IGP转发邻接功能,使MPLS TE隧道加入IGP路由计算。
[DeviceD-Tunnel1] mpls te igp advertise
# 在隧道接口tunnel 1上使能OSPF,设置隧道接口的OSPF开销为12。
[DeviceD-Tunnel1] ospf 1 area 0
[DeviceD-Tunnel1] ospf cost 12
[DeviceD-Tunnel1] quit
# 在Device B和Device D上执行display interface tunnel brief命令,可以看到Tunnel1的状态为up,以DeviceB为例:
[DeviceB] 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 9.2.2.2
# 在Device A上查看路由表,可以看到去往Device D(4.4.4.4)的下一跳为Device B(12.12.12.2),开销为22(10+12),说明MPLS TE隧道已加入OSPF路由计算。
[Device A] display ip routing-table
Destinations : 24 Routes : 24
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 O_INTRA 10 10 12.12.12.2 Vlan12
3.3.3.3/32 O_INTRA 10 20 12.12.12.2 Vlan12
4.4.4.4/32 O_INTRA 10 22 12.12.12.2 Vlan12
9.2.2.0/24 O_INTRA 10 22 12.12.12.2 Vlan12
10.1.0.3/32 Direct 0 0 127.0.0.1 InLoop0
12.12.12.0/24 Direct 0 0 12.12.12.1 Vlan12
12.12.12.0/32 Direct 0 0 12.12.12.1 Vlan12
12.12.12.1/32 Direct 0 0 127.0.0.1 InLoop0
12.12.12.255/32 Direct 0 0 12.12.12.1 Vlan12
14.14.14.0/24 Direct 0 0 14.14.14.1 Vlan14
14.14.14.0/32 Direct 0 0 14.14.14.1 Vlan14
14.14.14.1/32 Direct 0 0 127.0.0.1 InLoop0
14.14.14.255/32 Direct 0 0 14.14.14.1 Vlan14
23.23.23.0/24 O_INTRA 10 20 12.12.12.2 Vlan12
34.34.34.0/24 O_INTRA 10 30 12.12.12.2 Vlan12
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
· Device A:
#
ospf 1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 12.12.12.0 0.0.0.255
network 14.14.14.0 0.0.0.255
#
vlan 12
#
vlan 14
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
interface Vlan-interface12
ip address 12.12.12.1 255.255.255.0
ospf cost 10
#
interface Vlan-interface14
ip address 14.14.14.1 255.255.255.0
ospf cost 25
#
interface FortyGigE1/0/1
port link-mode bridge
port access vlan 12
#
interface FortyGigE1/0/2
port link-mode bridge
port access vlan 14
#
· Device B :
#
ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 12.12.12.0 0.0.0.255
network 23.23.23.0 0.0.0.255
mpls te enable
#
mpls lsr-id 2.2.2.2
#
vlan 12
#
vlan 23
#
mpls te
#
explicit-path tun1
nexthop index 1 23.23.23.3 include strict
nexthop index 101 34.34.34.4 include strict
#
rsvp
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
#
interface Vlan-interface12
ip address 12.12.12.2 255.255.255.0
ospf cost 10
#
interface Vlan-interface23
ip address 23.23.23.2 255.255.255.0
ospf cost 10
mpls enable
mpls te enable
rsvp enable
#
interface FortyGigE1/0/1
port link-mode bridge
port access vlan 12
#
interface FortyGigE1/0/2
port link-mode bridge
port access vlan 23
#
interface Tunnel1 mode mpls-te
ip address 9.2.2.2 255.255.255.0
ospf cost 12
ospf 1 area 0.0.0.0
mpls te path preference 1 explicit-path tun1
mpls te igp advertise
destination 4.4.4.4
#
· Device C :
#
ospf 1
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 23.23.23.0 0.0.0.255
network 34.34.34.0 0.0.0.255
mpls te enable
#
mpls lsr-id 3.3.3.3
#
vlan 23
#
vlan 34
#
mpls te
#
rsvp
#
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
#
interface Vlan-interface23
ip address 23.23.23.3 255.255.255.0
ospf cost 10
mpls enable
mpls te enable
rsvp enable
#
interface Vlan-interface34
ip address 34.34.34.3 255.255.255.0
ospf cost 10
mpls enable
mpls te enable
rsvp enable
#
interface FortyGigE1/0/1
port link-mode bridge
port access vlan 34
#
interface FortyGigE1/0/2
port link-mode bridge
port access vlan 23
#
· Device D:
#
ospf 1
area 0.0.0.0
network 4.4.4.4 0.0.0.0
network 14.14.14.0 0.0.0.255
network 34.34.34.0 0.0.0.255
mpls te enable
#
mpls lsr-id 4.4.4.4
#
vlan 14
#
vlan 34
#
mpls te
#
explicit-path tun1
nexthop index 1 34.34.34.3 include strict
nexthop index 101 23.23.23.2 include strict
#
rsvp
#
interface LoopBack0
ip address 4.4.4.4 255.255.255.255
#
interface Vlan-interface14
ip address 14.14.14.4 255.255.255.0
ospf cost 25
#
interface Vlan-interface34
ip address 34.34.34.4 255.255.255.0
ospf cost 10
mpls enable
mpls te enable
rsvp enable
#
interface FortyGigE1/0/1
port link-mode bridge
port access vlan 34
#
interface FortyGigE1/0/2
port link-mode bridge
port access vlan 14
#
interface Tunnel1 mode mpls-te
ip address 9.2.2.4 255.255.255.0
ospf cost 12
ospf 1 area 0.0.0.0
mpls te path preference 1 explicit-path tun1
mpls te igp advertise
destination 2.2.2.2
#
如图3所示,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,最大可预留带宽为40000kbps)
图3 MPLS TE FRR典型配置举例组网图
· 为建立主备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秒)。
本举例进行配置和验证所使用的版本,如表3所示。
产品 |
软件版本 |
S12500X-AF系列交换机 |
S12500X-CMW710-R2712 |
S12500-X系列交换机 |
S12500X-CMW710-R2712 |
S9800系列交换机 |
S9800-CMW710-R2712 |
· 缺省情况下,S12500X-AF系列、S12500-X系列、S9800系列交换机的接口处于ADM(Administratively Down)状态,请根据实际需要在对应接口视图下使用undo shutdown命令开启接口。
· 进行本案例配置之前,需要先全局关闭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。
(1) 配置各接口的IP地址
# 按照图3配置各接口的IP地址和掩码,包括LoopBack接口,下面以Switch A为例,其它设备配置方法类似,具体配置过程略。
<SwitchA> system-view
[SwitchA] vlan 2
[SwitchA-vlan2] port fortygige 1/0/1
[SwitchA-vlan2] quit
[SwitchA] interface vlan-interface 2
[SwitchA-Vlan-interface2] ip address 2.1.1.1 24
[SwitchA-Vlan-interface2] undo shutdown
[SwitchA-Vlan-interface2] 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 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 O_INTRA 10 1 2.1.1.2 Vlan2
3.1.1.0/24 O_INTRA 10 2 2.1.1.2 Vlan2
3.2.1.0/24 O_INTRA 10 2 2.1.1.2 Vlan2
3.3.1.0/24 O_INTRA 10 3 2.1.1.2 Vlan2
3.3.3.3/32 O_INTRA 10 2 2.1.1.2 Vlan2
4.1.1.0/24 O_INTRA 10 3 2.1.1.2 Vlan2
4.4.4.4/32 O_INTRA 10 3 2.1.1.2 Vlan2
5.5.5.5/32 O_INTRA 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] mpls te max-reservable-bandwidth 40000
[SwitchA-Vlan-interface2] quit
# 在Switch B上配置链路的最大带宽和最大可预留带宽。
[SwitchB] interface vlan-interface 2
[SwitchB-Vlan-interface2] mpls te max-link-bandwidth 50000
[SwitchB-Vlan-interface2] mpls te max-reservable-bandwidth 40000
[SwitchB-Vlan-interface2] quit
[SwitchB] interface vlan-interface 3
[SwitchB-Vlan-interface3] mpls te max-link-bandwidth 50000
[SwitchB-Vlan-interface3] mpls te max-reservable-bandwidth 40000
[SwitchB-Vlan-interface3] quit
[SwitchB] interface vlan-interface 5
[SwitchB-Vlan-interface5] mpls te max-link-bandwidth 50000
[SwitchB-Vlan-interface5] mpls te max-reservable-bandwidth 40000
[SwitchB-Vlan-interface5] quit
# 在Switch C上配置链路的最大带宽和最大可预留带宽。
[SwitchC] interface vlan-interface 3
[SwitchC-Vlan-interface3] mpls te max-link-bandwidth 50000
[SwitchC-Vlan-interface3] mpls te max-reservable-bandwidth 40000
[SwitchC-Vlan-interface3] quit
[SwitchC] interface vlan-interface 4
[SwitchC-Vlan-interface4] mpls te max-link-bandwidth 50000
[SwitchC-Vlan-interface4] mpls te max-reservable-bandwidth 40000
[SwitchC-Vlan-interface4] quit
[SwitchC] interface vlan-interface 6
[SwitchC-Vlan-interface6] mpls te max-link-bandwidth 50000
[SwitchC-Vlan-interface6] mpls te max-reservable-bandwidth 40000
[SwitchC-Vlan-interface6] quit
# 在Switch D上配置链路的最大带宽和最大可预留带宽。
[SwitchD] interface vlan-interface 4
[SwitchD-Vlan-interface4] mpls te max-link-bandwidth 50000
[SwitchD-Vlan-interface4] mpls te max-reservable-bandwidth 40000
[SwitchD-Vlan-interface4] quit
# 在Switch E上配置链路的最大带宽和最大可预留带宽。
[SwitchE] interface vlan-interface 5
[SwitchE-Vlan-interface5] mpls te max-link-bandwidth 50000
[SwitchE-Vlan-interface5] mpls te max-reservable-bandwidth 40000
[SwitchE-Vlan-interface5] quit
[SwitchE] interface vlan-interface 6
[SwitchE-Vlan-interface6] mpls te max-link-bandwidth 50000
[SwitchE-Vlan-interface6] mpls te max-reservable-bandwidth 40000
[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
# 在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 ID(3.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
(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
# 在所有设备上执行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
# 在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
# 在PLR上undo 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
# 等待约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 O_INTRA 10 1 2.1.1.2 Vlan2
3.1.1.0/24 O_INTRA 10 2 2.1.1.2 Vlan2
3.2.1.0/24 O_INTRA 10 2 2.1.1.2 Vlan2
3.3.1.0/24 O_INTRA 10 3 2.1.1.2 Vlan2
3.3.3.3/32 O_INTRA 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 O_INTRA 10 3 2.1.1.2 Vlan2
5.5.5.5/32 O_INTRA 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
· 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
mpls te max-reservable-bandwidth 40000
rsvp enable
#
interface FortyGigE1/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
mpls te max-reservable-bandwidth 40000
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 max-reservable-bandwidth 40000
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
mpls te max-reservable-bandwidth 40000
rsvp enable
#
interface FortyGigE1/0/1
port link-mode bridge
port access vlan 2
#
interface FortyGigE1/0/2
port link-mode bridge
port access vlan 3
#
interface FortyGigE1/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
mpls te max-reservable-bandwidth 40000
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
mpls te max-reservable-bandwidth 40000
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
mpls te max-reservable-bandwidth 40000
rsvp enable
#
interface FortyGigE1/0/1
port link-mode bridge
port access vlan 4
#
interface FortyGigE1/0/2
port link-mode bridge
port access vlan 3
#
interface FortyGigE1/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
mpls te max-reservable-bandwidth 40000
rsvp enable
#
interface FortyGigE1/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
mpls te max-reservable-bandwidth 40000
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
mpls te max-reservable-bandwidth 40000
rsvp enable
#
interface FortyGigE1/0/1
port link-mode bridge
port access vlan 5
#
interface FortyGigE1/0/2
port link-mode bridge
port access vlan 6
#
· H3C S12500X-AF & S12500-X & S9800系列交换机 MPLS配置指导(R27xx)
· H3C S12500X-AF & S12500-X & S9800系列交换机 MPLS命令参考(R27xx)
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!