配置静态MPLS TE隧道示例

本例描述了静态MPLS TE隧道的基本配置过程,包括使能MPLS TE,配置MPLS TE隧道和创建静态CR-LSP。

组网需求

如下图所示,某运营商的网络中存在部分路由性能不强且处理性能偏低的设备。该运营商期望在此网络中采用MPLS TE隧道来承载业务,此时可以建立一条LSRA到LSRC和一条从LSRC到LSRA的静态TE隧道。由于是静态的TE隧道,不运行动态的信令协议,不要求存在IGP路由,因此对设备资源消耗少且对设备的性能需求也更低。

 

配置思路

采用如下的思路配置静态MPLS TE隧道:

  1. 配置各节点接口的IP地址及作为MPLS LSR-ID的Loopback接口的地址。
  2. 配置LSR-ID并全局使能各节点的MPLS和MPLS TE和各接口的MPLS和MPLS TE。
  3. 在入节点创建隧道接口,指定隧道的IP地址、隧道协议、目的地址、隧道ID以及建立隧道使用的信令类型。
  4. 配置与隧道相关联的静态CR-LSP,在入节点上配置下一跳地址和出标签,在中间节点配置入接口、下一跳地址和出标签,在出节点上配置入标签和入接口以建立LSP。

数据准备

为完成此配置例,需准备如下的数据:

  1. 各接口的IP地址
  2. LSRA和LSRC上隧道的接口编号、隧道接口IP地址、目的地址、隧道ID、隧道信令协议(为cr-static)
  3. 静态CR-LSP入节点的下一跳地址和出标签
  4. 静态CR-LSP出节点的入接口

操作步骤

1、配置各接口的IP地址,配置各接口的IP地址和掩码。

设备名称 接口 IP地址
LSRA Loopback1 1.1.1.1/32
Ethernet1/0/1 2.1.1.1/24
LSRB Loopback1 2.2.2.2/32
Ethernet1/0/1 2.1.1.2/32
Ethernet1/0/2 3.2.1.1/24
LSRC Loopback1 3.3.3.3/32
Ethernet1/0/2 3.2.1.2/24

2、配置MPLS基本能力,使能MPLS TE

#配置LSRA

 

1
2
3
4
5
6
7
8
[~HUAWEI]mpls
[*HUAWEI-mpls]mpls te
[*HUAWEI-mpls]mpls lsr-id 1.1.1.1
[*HUAWEI]interface Ethernet 1/0/1
[*HUAWEI-Ethernet1/0/1]mpls
[*HUAWEI-Ethernet1/0/1]mpls te
[*HUAWEI-Ethernet1/0/1]commit
[~HUAWEI-Ethernet1/0/1]quit

 #配置LSRB

1
2
3
4
5
6
7
8
9
10
[*HUAWEI-mpls]interface Ethernet 1/0/1
[*HUAWEI-Ethernet1/0/1]mpls
[*HUAWEI-Ethernet1/0/1]mpls te
[*HUAWEI-Ethernet1/0/1]com
[~HUAWEI-Ethernet1/0/1]quit
[~HUAWEI]interface Ethernet 1/0/2
[~HUAWEI-Ethernet1/0/2]mpls
[*HUAWEI-Ethernet1/0/2]mpls te
[*HUAWEI-Ethernet1/0/2]com
[~HUAWEI-Ethernet1/0/2]quit

#配置LSRC

1
2
3
4
5
6
7
8
9
[~HUAWEI]mpls lsr-id 3.3.3.3
[*HUAWEI]mpls
[*HUAWEI-mpls]mpls te
[*HUAWEI-mpls]q
[*HUAWEI]interface Ethernet 1/0/2
[*HUAWEI-Ethernet1/0/2]mpls
[*HUAWEI-Ethernet1/0/2]mpls te
[*HUAWEI-Ethernet1/0/2]com
[~HUAWEI-Ethernet1/0/2]quit

3、配置MPLS TE隧道

#在LSRA上配置LSRA至LSRC的MPLS TE隧道

LSRA

1
2
3
4
5
6
7
8
[~HUAWEI]interface Tunnel 10
[*HUAWEI-Tunnel10]ip address unnumbered interface loopback 1
[*HUAWEI-Tunnel10]tunnel-protocol mpls te
[~HUAWEI-Tunnel10]destination 3.3.3.3
[*HUAWEI-Tunnel10]mpls te tunnel-id 100
[*HUAWEI-Tunnel10]mpls te signal-protocol cr-static
[*HUAWEI-Tunnel10]commit
[~HUAWEI-Tunnel10]quit

 LSRC

1
2
3
4
5
6
7
8
[~HUAWEI]interface Tunnel 20
[*HUAWEI-Tunnel20]ip address unnumbered interface loopback1
[*HUAWEI-Tunnel20]tunnel-protocol mpls te
[*HUAWEI-Tunnel20]destination 1.1.1.1
[*HUAWEI-Tunnel20]mpls te tunnel-id 20
[*HUAWEI-Tunnel20]mpls te signal-protocol cr-static
[*HUAWEI-Tunnel20]commit
[~HUAWEI-Tunnel20]quit

4、创建LSRA至LSRC的静态CR-LSP

# 配置LSRA为静态CR-LSP的入节点。

1
2
[~HUAWEI]static-cr-lsp ingress tunnel-interface  Tunnel 10 destination 3.3.3.3 nexthop 2.1.1.2 out-label 20
[*HUAWEI]commit

# 配置LSRB为静态CR-LSP的中间节点。

1
2
[~HUAWEI]static-cr-lsp transit Tunnel10 incoming-interface Ethernet 1/0/2 in-label 20 nexthop 3.2.1.2 out-label 30
[*HUAWEI]commit 

# 配置LSRC为静态CR-LSP的出节点。

1
2
[~HUAWEI]static-cr-lsp egress Tunnel10 incoming-interface Ethernet 1/0/2 in-label 30
[*HUAWEI]commit

5、创建LSRC至LSRA的静态CR-LSP

# 配置LSRC为静态CR-LSP的入节点

1
[~HUAWEI]static-cr-lsp ingress Tunnel20 destination 1.1.1.1 outgoing-interface Ethernet 1/0/2 nexthop 3.2.1.1 out-label 120<br>[*HUAWEI]commit

#配置LSRB为静态CR-LSP的中间节点

1
2
[~HUAWEI]static-cr-lsp transit Tunnel20 incoming-interface Ethernet 1/0/2 in-label 120 nexthop 2.1.1.1 out-label 130
[*HUAWEI]commit

#配置LSRA为静态CR-LSP的出节点

1
2
[~HUAWEI]static-cr-lsp egress Tunnel20 incoming-interface Ethernet 1/0/1 in-label 130
[*HUAWEI]com

6、检查配置结果

配置完成后,在LSRA上执行display interface tunnel命令,可以看到Tunnel接口的状态为Up。

在各节点上执行display mpls te tunnel命令,可以看到MPLS TE隧道的建立情况。

LSRA节点

 LSRB节点

 LSRC节点

在各节点上执行display mpls lspdisplay mpls static-cr-lsp命令,可以看到静态CR-LSP的建立情况。

# 在LSRA上查看配置结果。

 #在LSRB上查看配置结果

 #在LSRC上查看配置结果

 使用静态CR-LSP建立MPLS TE隧道时,Transit节点和Egress节点直接根据配置的入标签和出标签进行转发,因此,LSRB和LSRC的相关显示信息中,FEC等内容为空。

LSA的配置文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#
sysname LSRA
#
mpls lsr-id 1.1.1.1
#
mpls
 mpls te
#
static-cr-lsp ingress tunnel-interface Tunnel10 destination 3.3.3.3 nexthop 2.1.1.2 out-label 20
#
static-cr-lsp egress Tunnel20 incoming-interface Ethernet1/0/1 in-label 130
#
interface GigabitEthernet1/0/1
 undo shutdown
 ip address 2.1.1.1 255.255.255.0
 mpls
 mpls te 
#
interface LoopBack1
 ip address 1.1.1.1 255.255.255.255
#              
interface Tunnel10
 ip address unnumbered interface LoopBack1
 tunnel-protocol mpls te
 destination 3.3.3.3
 mpls te signal-protocol cr-static
 mpls te tunnel-id 100
#              
return

 LSRB的配置文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#
sysname LSRB
#
mpls lsr-id 2.2.2.2
#
mpls
 mpls te
#
static-cr-lsp transit Tunnel10 incoming-interface Ethernet1/0/1 in-label 20 nexthop 3.2.1.2 out-label 30
#
static-cr-lsp transit Tunnel20 incoming-interface Ethernet1/0/2 in-label 120 nexthop 2.1.1.1 out-label 130
#
interface Ethernet1/0/2
 undo shutdown
 ip address 3.2.1.1 255.255.255.0
 mpls
 mpls te
#              
interface Ethernet1/0/1
 undo shutdown
 ip address 2.1.1.2 255.255.255.0
 mpls
 mpls te
#
interface LoopBack1
 ip address 2.2.2.2 255.255.255.255
#              
return

 LSRC的配置文件 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#
sysname LSRC
#
mpls lsr-id 3.3.3.3
#
mpls
 mpls te
#
static-cr-lsp ingress tunnel-interface Tunnel20 destination 1.1.1.1 nexthop 3.2.1.1 out-label 120
#
static-cr-lsp egress Tunnel10 incoming-interface Ethernet1/0/2 in-label 30
#
interface Ethernet1/0/2
 undo shutdown
 ip address 3.2.1.2 255.255.255.0
 mpls
 mpls te
#
interface Ethernet1/0/1
 undo shutdown
#
interface LoopBack1
 ip address 3.3.3.3 255.255.255.255
#
interface Tunnel20
 ip address unnumbered interface LoopBack1
 tunnel-protocol mpls te
 destination 1.1.1.1
 mpls te signal-protocol cr-static
 mpls te tunnel-id 200
#
return
posted @   leagueandlegends  阅读(179)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2018-11-14 JSP技术(二)
点击右上角即可分享
微信分享提示