拓扑规划

配置要求
- 所有路由器建立IGP(OSPF),将物理接口和环回口宣告到进程下;
- 配置mpls lsr-id为自己环回口,全局和接口下使能mpls;
- 手动建立静态mpls(来回方向);
- 检查建立状态和标签转发路径。
相关命令
全局相关配置:
#
mpls lsr-id 1.1.1.1 // 配置lsr-id为环回口地址
mpls // 全局开启mpls
#
interface GigabitEthernet0/0/1 // 接口开启mpls
mpls
AR1
static-lsp ingress toR5 destination 5.5.5.5 32 nexthop 10.1.13.3 out-label 300 // 手动配置去往AR5的标签转发
static-lsp egress toR1 incoming-interface GigabitEthernet0/0/1 in-label 300 // AR5回来AR1的配置
AR3
static-lsp transit toR5 incoming-interface GigabitEthernet0/0/0 in-label 300 nexthop 10.1.34.4 out-label 400
static-lsp transit toR1 incoming-interface GigabitEthernet0/0/1 in-label 400 nexthop 10.1.13.1 out-label 300
AR4
static-lsp transit toR5 incoming-interface GigabitEthernet0/0/1 in-label 400 nexthop 10.1.45.5 out-label 500
static-lsp transit toR1 incoming-interface GigabitEthernet0/0/2 in-label 500 nexthop 10.1.34.3 out-label 400
AR5
static-lsp egress toR5 incoming-interface GigabitEthernet0/0/0 in-label 500
static-lsp ingress toR1 destination 1.1.1.1 32 nexthop 10.1.45.4 out-label 500
<R1>dis mpls static-lsp // 查看mpls建立状态及转发路径
TOTAL : 2 STATIC LSP(S)
UP : 2 STATIC LSP(S)
DOWN : 0 STATIC LSP(S)
Name FEC I/O Label I/O If Status
toR5 5.5.5.5/32 NULL/300 -/GE0/0/1 Up
toR1 -/- 300/NULL GE0/0/1/- Up
<R3>dis mpls static-lsp verbose // 查看静态lsp转发详细信息
No : 1
LSP-Name : toR5
LSR-Type : Transit
FEC : -/-
In-Label : 300
Out-Label : 400
In-Interface : GigabitEthernet0/0/0
Out-Interface : GigabitEthernet0/0/1
NextHop : 10.1.34.4
Static-Lsp Type: Normal
Lsp Status : Up
No : 2
LSP-Name : toR1
LSR-Type : Transit
FEC : -/-
In-Label : 400
Out-Label : 300
In-Interface : GigabitEthernet0/0/1
Out-Interface : GigabitEthernet0/0/0
NextHop : 10.1.13.1
Static-Lsp Type: Normal
Lsp Status : Up