56-MPLS TE典型配置举例
本章节下载: 56-MPLS TE典型配置举例 (323.09 KB)
H3C S12500R产品 MPLS TE典型配置举例
Copyright © 2021 新华三技术有限公司 版权所有,保留一切权利。
非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部,并不得以任何形式传播。
除新华三技术有限公司的商标外,本手册中出现的其它公司的商标、产品标识及商品名称,由各自权利人拥有。
本文档中的信息可能变动,恕不另行通知。
目 录
本文档介绍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隧道。
本举例是在R3606版本上进行配置和验证的。
· 缺省情况下,本设备的接口处于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接口,具体配置过程略。
(2) 配置OSPF协议,以保证各交换路由器之间路由可达
# 配置Router A。
<RouterA> system-view
[RouterA] ospf
[RouterA-ospf-1] area 0
[RouterA-ospf-1-area-0.0.0.0] network 1.1.1.1 0.0.0.0
[RouterA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[RouterA-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255
[RouterA-ospf-1-area-0.0.0.0] quit
[RouterA-ospf-1] quit
# 配置Router B。
<RouterB> system-view
[RouterB] ospf
[RouterB-ospf-1] area 0
[RouterB-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0
[RouterB-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[RouterB-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255
[RouterB-ospf-1-area-0.0.0.0] quit
[RouterB-ospf-1] quit
# 配置Router C。
<RouterC> system-view
[RouterC] ospf
[RouterC-ospf-1] area 0
[RouterC-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0
[RouterC-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255
[RouterC-ospf-1-area-0.0.0.0] network 40.1.1.0 0.0.0.255
[RouterC-ospf-1-area-0.0.0.0] quit
[RouterC-ospf-1] quit
# 配置Router D。
<RouterD> system-view
[RouterD] ospf
[RouterD-ospf-1] area 0
[RouterD-ospf-1-area-0.0.0.0] network 4.4.4.4 0.0.0.0
[RouterD-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255
[RouterD-ospf-1-area-0.0.0.0] network 40.1.1.0 0.0.0.255
[RouterD-ospf-1-area-0.0.0.0] quit
[RouterD-ospf-1] quit
# 配置完成后,在各交换路由器上执行display ip routing-table命令,可以看到相互之间都学到了对方的主机路由,包括Loopback接口对应的主机路由。以Router A为例:
[RouterA] 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.2.2.2/32 O_INTRA 10 1 10.1.1.2 HGE1/0/1
3.3.3.3/32 O_INTRA 10 1 30.1.1.3 HGE1/0/2
4.4.4.4/32 O_INTRA 10 2 10.1.1.2 HGE1/0/1
10.1.1.0/24 Direct 0 0 10.1.1.1 HGE1/0/1
10.1.1.0/32 Direct 0 0 10.1.1.1 HGE1/0/1
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 HGE1/0/1
20.1.1.0/24 O_INTRA 10 2 10.1.1.2 HGE1/0/1
30.1.1.0/24 Direct 0 0 30.1.1.1 HGE1/0/2
30.1.1.0/32 Direct 0 0 30.1.1.1 HGE1/0/2
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 HGE1/0/2
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
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
(3) 配置LSR ID,开启MPLS、MPLS TE和RSVP-TE能力
# 配置Router A。
[RouterA] mpls lsr-id 1.1.1.1
[RouterA] mpls te
[RouterA-te] quit
[RouterA] rsvp
[RouterA-rsvp] quit
[RouterA] interface hundredgige 1/0/1
[RouterA-HundredGigE1/0/1] mpls enable
[RouterA-HundredGigE1/0/1] mpls te enable
[RouterA-HundredGigE1/0/1] rsvp enable
[RouterA-HundredGigE1/0/1] quit
[RouterA] interface hundredgige 1/0/2
[RouterA-HundredGigE1/0/2] mpls enable
[RouterA-HundredGigE1/0/2] mpls te enable
[RouterA-HundredGigE1/0/2] rsvp enable
[RouterA-HundredGigE1/0/2] quit
# 配置Router B。
[RouterB] mpls lsr-id 2.2.2.2
[RouterB] mpls te
[RouterB-te] quit
[RouterB] rsvp
[RouterB-rsvp] quit
[RouterB] interface hundredgige 1/0/1
[RouterB-HundredGigE1/0/1] mpls enable
[RouterB-HundredGigE1/0/1] mpls te enable
[RouterB-HundredGigE1/0/1] rsvp enable
[RouterB-HundredGigE1/0/1] quit
[RouterB] interface hundredgige 1/0/2
[RouterB-HundredGigE1/0/2] mpls enable
[RouterB-HundredGigE1/0/2] mpls te enable
[RouterB-HundredGigE1/0/2] rsvp enable
[RouterB-HundredGigE1/0/2] quit
# 配置Router C。
[RouterC] mpls lsr-id 3.3.3.3
[RouterC] mpls te
[RouterC-te] quit
[RouterC] rsvp
[RouterC-rsvp] quit
[RouterC] interface hundredgige 1/0/1
[RouterC-HundredGigE1/0/1] mpls enable
[RouterC-HundredGigE1/0/1] mpls te enable
[RouterC-HundredGigE1/0/1] rsvp enable
[RouterC-HundredGigE1/0/1] quit
[RouterC] interface hundredgige 1/0/2
[RouterC-HundredGigE1/0/2] mpls enable
[RouterC-HundredGigE1/0/2] mpls te enable
[RouterC-HundredGigE1/0/2] rsvp enable
[RouterC-HundredGigE1/0/2] quit
# 配置Router D。
[RouterD] mpls lsr-id 4.4.4.4
[RouterD] mpls te
[RouterD-te] quit
[RouterD] rsvp
[RouterD-rsvp] quit
[RouterD] interface hundredgige 1/0/1
[RouterD-HundredGigE1/0/1] mpls enable
[RouterD-HundredGigE1/0/1] mpls te enable
[RouterD-HundredGigE1/0/1] rsvp enable
[RouterD-HundredGigE1/0/1] quit
[RouterD] interface hundredgige 1/0/2
[RouterD-HundredGigE1/0/2] mpls enable
[RouterD-HundredGigE1/0/2] mpls te enable
[RouterD-HundredGigE1/0/2] rsvp enable
[RouterD-HundredGigE1/0/2] quit
(4) 配置链路的MPLS TE属性
# 在Router A上配置链路的最大带宽和最大可预留带宽。
[RouterA] interface hundredgige 1/0/1
[RouterA-HundredGigE1/0/1] mpls te max-link-bandwidth 50000
[RouterA-HundredGigE1/0/1] mpls te max-reservable-bandwidth 40000
[RouterA-HundredGigE1/0/1] quit
[RouterA] interface hundredgige 1/0/2
[RouterA-HundredGigE1/0/2] mpls te max-link-bandwidth 50000
[RouterA-HundredGigE1/0/2] mpls te max-reservable-bandwidth 40000
[RouterA-HundredGigE1/0/2] quit
# 在Router B上配置链路的最大带宽和最大可预留带宽。
[RouterB] interface hundredgige 1/0/1
[RouterB-HundredGigE1/0/1] mpls te max-link-bandwidth 50000
[RouterB-HundredGigE1/0/1] mpls te max-reservable-bandwidth 40000
[RouterB-HundredGigE1/0/1] quit
[RouterB] interface hundredgige 1/0/2
[RouterB-HundredGigE1/0/2] mpls te max-link-bandwidth 50000
[RouterB-HundredGigE1/0/2] mpls te max-reservable-bandwidth 40000
[RouterB-HundredGigE1/0/2] quit
# 在Router C上配置链路的最大带宽和最大可预留带宽。
[RouterC] interface hundredgige 1/0/1
[RouterC-HundredGigE1/0/1] mpls te max-link-bandwidth 50000
[RouterC-HundredGigE1/0/1] mpls te max-reservable-bandwidth 40000
[RouterC-HundredGigE1/0/1] quit
[RouterC] interface hundredgige 1/0/2
[RouterC-HundredGigE1/0/2] mpls te max-link-bandwidth 50000
[RouterC-HundredGigE1/0/2] mpls te max-reservable-bandwidth 40000
[RouterC-HundredGigE1/0/2] quit
# 在Router D上配置链路的最大带宽和最大可预留带宽。
[RouterD] interface hundredgige 1/0/1
[RouterD-HundredGigE1/0/1] mpls te max-link-bandwidth 50000
[RouterD-HundredGigE1/0/1] mpls te max-reservable-bandwidth 40000
[RouterD-HundredGigE1/0/1] quit
[RouterD] interface hundredgige 1/0/2
[RouterD-HundredGigE1/0/2] mpls te max-link-bandwidth 50000
[RouterD-HundredGigE1/0/2] mpls te max-reservable-bandwidth 40000
[RouterD-HundredGigE1/0/2] quit
(5) 配置OSPF TE,发布链路的MPLS TE属性
# 在Router A上使能OSPF的Opaque LSA发布接收能力(缺省情况下处于开启状态),并在OSPF区域0内使能MPLS TE能力。
[RouterA] ospf
[RouterA-ospf-1] opaque-capability enable
[RouterA-ospf-1] area 0
[RouterA-ospf-1-area-0.0.0.0] mpls te enable
[RouterA-ospf-1-area-0.0.0.0] quit
[RouterA-ospf-1] quit
# 在Router B上使能OSPF的Opaque LSA发布接收能力(缺省情况下处于开启状态),并在OSPF区域0内使能MPLS TE能力。
[RouterB] ospf
[RouterB-ospf-1] opaque-capability enable
[RouterB-ospf-1] area 0
[RouterB-ospf-1-area-0.0.0.0] mpls te enable
[RouterB-ospf-1-area-0.0.0.0] quit
[RouterB-ospf-1] quit
# 在Router C上使能OSPF的Opaque LSA发布接收能力(缺省情况下处于开启状态),并在OSPF区域0内使能MPLS TE能力。
[RouterC] ospf
[RouterC-ospf-1] opaque-capability enable
[RouterC-ospf-1] area 0
[RouterC-ospf-1-area-0.0.0.0] mpls te enable
[RouterC-ospf-1-area-0.0.0.0] quit
[RouterC-ospf-1] quit
# 在Router D上使能OSPF的Opaque LSA发布接收能力(缺省情况下处于开启状态),并在OSPF区域0内使能MPLS TE能力。
[RouterD] ospf
[RouterD-ospf-1] opaque-capability enable
[RouterD-ospf-1] area 0
[RouterD-ospf-1-area-0.0.0.0] mpls te enable
[RouterD-ospf-1-area-0.0.0.0] quit
[RouterD-ospf-1] quit
(6) 配置MPLS TE隧道
# 在Router A上配置MPLS TE隧道Tunnel1,用于传输企业A的数据:目的地址为Router D的LSR ID(4.4.4.4);采用RSVP-TE信令协议建立MPLS TE隧道;隧道所需的带宽为20000kbps;开启路由记录功能。
[RouterA] interface tunnel 1 mode mpls-te
[RouterA-Tunnel1] ip address 7.1.1.1 255.255.255.0
[RouterA-Tunnel1] destination 4.4.4.4
[RouterA-Tunnel1] mpls te signaling rsvp-te
[RouterA-Tunnel1] mpls te bandwidth 20000
[RouterA-Tunnel1] mpls te record-route
[RouterA-Tunnel1] quit
# 在Router A上配置MPLS TE隧道Tunnel2,用于传输企业B的数据:目的地址为Router D的LSR ID(4.4.4.4);采用RSVP-TE信令协议建立MPLS TE隧道;隧道所需的带宽为30000kbps;开启路由记录功能。
[RouterA] interface tunnel 2 mode mpls-te
[RouterA-Tunnel2] ip address 8.1.1.1 255.255.255.0
[RouterA-Tunnel2] destination 4.4.4.4
[RouterA-Tunnel2] mpls te signaling rsvp-te
[RouterA-Tunnel2] mpls te bandwidth 30000
[RouterA-Tunnel2] mpls te record-route
[RouterA-Tunnel2] quit
(7) 配置静态路由使流量沿MPLS TE隧道转发
# 在Router A上配置静态路由,使得到达网络50.1.1.0/24的流量通过MPLS TE隧道接口Tunnel1转发。
[RouterA] ip route-static 50.1.1.0 24 tunnel 1 preference 1
# 在Router A上配置静态路由,使得到达网络60.1.1.0/24的流量通过MPLS TE隧道接口Tunnel2转发。
[RouterA] ip route-static 60.1.1.0 24 tunnel 2 preference 1
# 配置完成后,在Router A上执行display interface tunnel brief命令可以看到2个隧道接口的状态为UP。
[RouterA] 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
# 在Router A上执行display mpls te tunnel-interface命令可以看到2条隧道的详细信息。
[RouterA] 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 : -
# 在Router A上执行display ip routing-table命令,可以看到路由表中有以Tunnel1和Tunnel2为出接口的静态路由信息。
[RouterA] display ip routing-table
Destinations : 30 Routes : 30
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 HGE1/0/1
3.3.3.3/32 O_INTRA 10 1 30.1.1.3 HGE1/0/2
4.4.4.4/32 O_INTRA 10 2 10.1.1.2 HGE1/0/1
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 HGE1/0/1
10.1.1.0/32 Direct 0 0 10.1.1.1 HGE1/0/1
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 HGE1/0/1
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 HGE1/0/2
30.1.1.0/32 Direct 0 0 30.1.1.1 HGE1/0/2
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 HGE1/0/2
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
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
# 在Router A上执行display rsvp lsp verbose命令,可以看到Tunnel 1的CRLSP使用了Router A—Router B—Router D的路径;Tunnel 2的CRLSP使用了Router A—Router C—Router D的路径。
[RouterA] display rsvp lsp verbose
Tunnel name: RouterA_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: HGE1/0/1
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: RouterA_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: HGE1/0/2
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:经过Router A—Router B—Router D的带宽为20000kbps的CRLSP和经过Router A—Router C—Router D的带宽为30000kbps的CRLSP。
· Router 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
#
mpls te
#
rsvp
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
interface HundredGigE1/0/1
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 HundredGigE1/0/2
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 HundredGigE1/0/3
ip address 70.1.1.1 255.255.255.0
#
interface HundredGigE1/0/4
ip address 80.1.1.1 255.255.255.0
#
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
#
· Router 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
#
mpls te
#
rsvp
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
#
interface HundredGigE1/0/1
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 HundredGigE1/0/2
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
#
· Router 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
#
mpls te
#
rsvp
#
interface LoopBack0
ip address 3.3.3.3 255.255.255.0
#
interface HundredGigE1/0/1
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 HundredGigE1/0/2
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
#
· Router 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
#
mpls te
#
rsvp
#
interface LoopBack0
ip address 4.4.4.4 255.255.255.255
#
interface HundredGigE1/0/1
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 HundredGigE1/0/2
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 HundredGigE1/0/3
ip address 50.1.1.4 255.255.255.0
#
interface HundredGigE1/0/4
ip address 60.1.1.4 255.255.255.0
#
如图2所示,各设备之间通过OSPF协议实现互通,各链路的度量值已在链路中标注。缺省情况下,Device A发往Device D的流量会通过HundredGigE 1/0/2转发。现要求在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。
缺省情况下,本设备的接口处于ADM(Administratively Down)状态,请根据实际需要在对应接口视图下使用undo shutdown命令开启接口。
本举例是在R3606版本上进行配置和验证的。
# 配置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 hundredgige 1/0/2
[DeviceB-HundredGigE1/0/2] mpls enable
[DeviceB-HundredGigE1/0/2] mpls te enable
[DeviceB-HundredGigE1/0/2] rsvp enable
[DeviceB-HundredGigE1/0/2] 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 hundredgige 1/0/1
[DeviceC-HundredGigE1/0/1] mpls enable
[DeviceC-HundredGigE1/0/1] mpls te enable
[DeviceC-HundredGigE1/0/1] rsvp enable
[DeviceC-HundredGigE1/0/1] quit
[DeviceC] interface hundredgige 1/0/2
[DeviceC-HundredGigE1/0/2] mpls enable
[DeviceC-HundredGigE1/0/2] mpls te enable
[DeviceC-HundredGigE1/0/2] rsvp enable
[DeviceC-HundredGigE1/0/2] 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 hundredgige 1/0/2
[DeviceD-HundredGigE1/0/2] mpls enable
[DeviceD-HundredGigE1/0/2] mpls te enable
[DeviceD-HundredGigE1/0/2] rsvp enable
[DeviceD-HundredGigE1/0/2] 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 OSPF 10 10 12.12.12.2 HGE1/0/1
3.3.3.3/32 OSPF 10 20 12.12.12.2 HGE1/0/1
4.4.4.4/32 OSPF 10 22 12.12.12.2 HGE1/0/1
9.2.2.0/24 OSPF 10 22 12.12.12.2 HGE1/0/1
9.4.4.0/24 OSPF 10 34 12.12.12.2 HGE1/0/1
12.12.12.0/24 Direct 0 0 12.12.12.1 HGE1/0/1
12.12.12.0/32 Direct 0 0 12.12.12.1 HGE1/0/1
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 HGE1/0/1
14.14.14.0/24 Direct 0 0 14.14.14.1 HGE1/0/2
14.14.14.0/32 Direct 0 0 14.14.14.1 HGE1/0/2
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 HGE1/0/2
23.23.23.0/24 OSPF 10 20 12.12.12.2 HGE1/0/1
34.34.34.0/24 OSPF 10 30 12.12.12.2 HGE1/0/1
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
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
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
interface HundredGigE1/0/1
ip address 12.12.12.1 255.255.255.0
ospf cost 10
#
interface HundredGigE1/0/2
ip address 14.14.14.1 255.255.255.0
ospf cost 25
#
· 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
#
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 HundredGigE1/0/1
ip address 12.12.12.2 255.255.255.0
ospf cost 10
#
interface HundredGigE1/0/2
ip address 23.23.23.2 255.255.255.0
ospf cost 10
mpls enable
mpls te enable
rsvp enable
#
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
#
mpls te
#
rsvp
#
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
#
interface HundredGigE1/0/1
ip address 23.23.23.3 255.255.255.0
ospf cost 10
mpls enable
mpls te enable
rsvp enable
#
interface HundredGigE1/0/2
ip address 34.34.34.3 255.255.255.0
ospf cost 10
mpls enable
mpls te enable
rsvp enable
#
· 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
#
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 HundredGigE1/0/1
ip address 14.14.14.4 255.255.255.0
ospf cost 25
#
interface HundredGigE1/0/2
ip address 34.34.34.4 255.255.255.0
ospf cost 10
mpls enable
mpls te enable
rsvp enable
#
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
#
· H3C S12500R系列交换路由器 MPLS配置指导-R3606
· H3C S12500R系列交换路由器 MPLS命令参考-R3606
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!