1 拓扑
2 配置步骤
2.1 配置接口IP 和路由
LER1
interface GigabitEthernet1/0ip address 10.1.1.1 255.255.255.0quitinterface GigabitEthernet2/0ip address 11.1.1.1 255.255.255.0quitip route-static 21.1.1.0 24 10.1.1.2
VPC1
ip 11.1.1.100/24 11.1.1.1
配置完成后VPC1 能够ping 通LER1 的Ge2/0
LER2
interface GigabitEthernet1/0ip address 20.1.1.2 255.255.255.0quitinterface GigabitEthernet2/0ip address 21.1.1.1 255.255.255.0quitip route-static 11.1.1.0 24 20.1.1.1
VPC2
ip 21.1.1.100/24 21.1.1.1
配置完成后VPC2 能够ping 通LER2 的Ge2/0
LSR
interface GigabitEthernet1/0ip address 10.1.1.2 255.255.255.0quitinterface GigabitEthernet2/0ip address 20.1.1.1 255.255.255.0quit
2.2 使能MPLS
LER1
interface GigabitEthernet1/0mpls enablequit
LSR
interface GigabitEthernet1/0mpls enablequitinterface GigabitEthernet2/0mpls enable quit
LER2
interface GigabitEthernet1/0mpls enablequit
2.3 配置LSP
LER1
static-lsp ingress 1to2 destination 21.1.1.0 24 nexthop 10.1.1.2 out-label 30
static-lsp egress 2to1 in-label 60
LSR
static-lsp transit 1to2 in-label 30 nexthop 20.1.1.2 out-label 50
static-lsp transit 2to1 in-label 40 nexthop 10.1.1.1 out-label 60
LER2
static-lsp egress 1to2 in-label 50
static-lsp ingress 2to1 destination 11.1.1.0 24 nexthop 20.1.1.1 out-label 40