目录
1 拓扑
2 配置步骤
2.1 配置接口IP
2.2 配置OSPF
2.3 使能LDP
2.3 在VPC上验证
1 拓扑
2 配置步骤
2.1 配置接口IP
LER1
interface LoopBack 0
ip address 1.1.1.9 32
quit
interface GigabitEthernet1/0
ip address 10.1.1.1 255.255.255.0
quit
interface GigabitEthernet2/0
ip address 11.1.1.1 255.255.255.0
quit
LSR
interface LoopBack 0
ip address 2.2.2.9 32
quit
interface GigabitEthernet1/0
ip address 10.1.1.2 255.255.255.0
quit
interface GigabitEthernet2/0
ip address 20.1.1.1 255.255.255.0
quit
LER2
interface LoopBack 0
ip address 3.3.3.9 32
quit
interface GigabitEthernet1/0
ip address 20.1.1.2 255.255.255.0
quit
interface GigabitEthernet2/0
ip address 21.1.1.1 255.255.255.0
quit
VPC1
ip 11.1.1.100/24 11.1.1.1
VPC2
ip 21.1.1.100/24 21.1.1.1
2.2 配置OSPF
LER1
ospf 1
area 1
network 1.1.1.9 0.0.0.0
network 10.1.1.0 0.0.0.255
network 11.1.1.0 0.0.0.255
quit
quit
LSR
ospf 1
area 1
network 2.2.2.9 0.0.0.0
network 10.1.1.0 0.0.0.255
network 20.1.1.0 0.0.0.255
quit
quit
LER2
ospf 1
area 1
network 3.3.3.9 0.0.0.0
network 20.1.1.0 0.0.0.255
network 21.1.1.0 0.0.0.255
quit
quit
查看OSPF 学到的路由
LER1
LSR
LER2
2.3 使能LDP
LER1
mpls lsr-id 1.1.1.9
mpls ldp
quit
interface GigabitEthernet1/0
mpls enable
mpls ldp enable
quit
LSR
mpls lsr-id 2.2.2.9
mpls ldp
quit
interface GigabitEthernet1/0
mpls enable
mpls ldp enable
quit
interface GigabitEthernet2/0
mpls enable
mpls ldp enable
quit
LER2
mpls lsr-id 3.3.3.9
mpls ldp
quit
interface GigabitEthernet1/0
mpls enable
mpls ldp enable
quit
2.4 配置LDP LSP 触发条件
LER1 LSR LER2 配置相同
ip prefix-list ldp index 10 permit 11.1.1.0 24
ip prefix-list ldp index 20 permit 21.1.1.0 24
mpls ldp
lsp-trigger prefix-list ldp
quit
查看LDP LSP
LER1
LSR
LER2