配置静态双向关联LSP示例
本例描述了静态双向关联LSP的配置过程,包括静态CR-LSP。
组网需求
如图3-9所示,网络中存在PE1–>PE2和PE2–>PE1两条方向相反的静态CR-LSP。为了保证两条LSP能做到双端同时的保护倒换,需要将两条LSP相互绑定为双向关联LSP。
设备 |
接口 |
IP地址 |
---|---|---|
PE1 |
Loopback1 |
1.1.1.1/32 |
GE0/1/0 |
10.1.1.1/30 |
|
P |
Loopback1 |
2.2.2.2/32 |
GE0/1/0 |
10.1.1.2/30 |
|
GE0/2/0 |
10.2.1.1/30 |
|
PE2 |
Loopback1 |
3.3.3.3/32 |
GE0/2/0 |
10.2.1.2/30 |
配置思路
采用如下的思路配置静态MPLS TE隧道:
配置各节点接口的IP地址及作为MPLS LSR-ID的Loopback接口的地址。
配置正向及反向静态CR-LSP。
配置正向及反向静态CR-LSP相互绑定。
数据准备
假定以PE1–>PE2为正向,以PE2–>PE1为反向。
设备 |
数据项 |
取值 |
---|---|---|
PE1 |
正向LSP的隧道接口编号 |
Tunnel10 |
正向LSP的隧道ID |
100 |
|
正向LSP出标签 |
20 |
|
反向LSP名称 |
Tunnel20 |
|
反向LSP入标签 |
130 |
|
P |
正向LSP名称 |
Tunnel10 |
正向LSP入标签 |
20 |
|
正向LSP出标签 |
30 |
|
反向LSP入名称 |
Tunnel20 |
|
反向LSP入标签 |
120 |
|
反向LSP出标签 |
130 |
|
PE2 |
反向LSP的隧道接口编号 |
Tunnel20 |
反向LSP的隧道ID |
200 |
|
反向LSP出标签 |
120 |
|
正向LSP名称 |
Tunnel10 |
|
正向LSP入标签 |
30 |
操作步骤
- 配置各接口的IP地址
配置各接口的IP地址和掩码,具体配置过程见配置文件。
- 配置正向及反向静态CR-LSP
具体配置过程见配置文件。
- 配置正向及反向静态CR-LSP相互绑定
# 配置PE1。
[~PE1] interface Tunnel 10
[~PE1-Tunnel10] mpls te reverse-lsp protocol static lsp-name Tunnel20
[*PE1-Tunnel10] commit
# 配置PE2。
[~PE2] interface Tunnel 20
[~PE2-Tunnel20] mpls te reverse-lsp protocol static lsp-name Tunnel10
[*PE2-Tunnel20] commit
- 检查配置结果
配置完毕后,可以分别在PE1和PE2上执行display mpls te reverse-lsp verbose检查反向LSP的信息。以PE1为例:
[~PE1] display mpls te reverse-lsp verbose
------------------------------------------------------------------------------- LSP Information: STATIC LSP ------------------------------------------------------------------------------- Obverse Tunnel : Tunnel10 //正向LSP的隧道接口 Reverse LSP Name : Tunnel20 //反向LSP的名称 Reverse LSP State : Up //反向LSP的状态 Incoming Label : 130 Incoming Interface : GE0/1/0
配置文件
PE1的配置文件
# sysname PE1 # mpls lsr-id 1.1.1.1 # mpls mpls te # interface GigabitEthernet0/1/0 undo shutdown ip address 10.1.1.1 255.255.255.252 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 reverse-lsp protocol static lsp-name Tunnel20 mpls te tunnel-id 100 # static-cr-lsp ingress tunnel-interface Tunnel10 destination 3.3.3.3 nexthop 10.1.1.2 out-label 20 bandwidth ct0 10000 # static-cr-lsp egress Tunnel20 incoming-interface GigabitEthernet0/1/0 in-label 130 # return
P的配置文件
# sysname LSRB # mpls lsr-id 2.2.2.2 # mpls mpls te # interface GigabitEthernet0/1/0 undo shutdown ip address 10.1.1.2 255.255.255.252 mpls mpls te # interface GigabitEthernet0/2/0 undo shutdown ip address 10.2.1.1 255.255.255.252 mpls mpls te # interface LoopBack1 ip address 2.2.2.2 255.255.255.255 # static-cr-lsp transit Tunnel10 incoming-interface GigabitEthernet0/1/0 in-label 20 nexthop 10.2.1.2 out-label 30 bandwidth ct0 10000 # static-cr-lsp transit Tunnel20 incoming-interface GigabitEthernet0/2/0 in-label 120 nexthop 10.1.1.1 out-label 130 bandwidth ct0 10000 # return
PE2的配置文件
# sysname PE2 # mpls lsr-id 3.3.3.3 # mpls mpls te # s# interface GigabitEthernet0/2/0 undo shutdown ip address 10.2.1.2 255.255.255.252 mpls mpls te # 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 reverse-lsp protocol static lsp-name Tunnel10 mpls te tunnel-id 200 # static-cr-lsp ingress tunnel-interface Tunnel20 destination 1.1.1.1 nexthop 10.2.1.1 out-label 120 bandwidth ct0 10000 # static-cr-lsp egress Tunnel10 incoming-interface GigabitEthernet0/2/0 in-label 30 # return