实验目的
MPLS的初级应用
实验过程
1.底层OSPF互通,宣告L0
2.路由器1.2.3上配置MPLS
3.R4pingR5走标签转发表
R3底层配置举例
sy
int g0/0/0
ip ad 192.168.23.3 24
os en 1 ar 0
int g0/0/1
ip ad 192.168.35.3 24
os en 1 ar 0
int l0
ip ad 3.3.3.3 32
os en 1 ar 0
ospf 1 r 3.3.3.3
ar 0
配通如下
2.配置MPLS
R1
mpls lsr-id 1.1.1.1
mpls
int g0/0/1
mpls
static-lsp ingress 1t3 destination 5.5.5.0 24 nexthop 192.168.12.2 out-label 200
R2
mpls lsr-id 2.2.2.2
mpls
int g0/0/0
mpls
int g0/0/1
mpls
static-lsp transit 1t3 incoming-interface GigabitEthernet0/0/1 in-label 200 nexthop 192.168.23.3 out-label 100
R3
mpls lsr-id 3.3.3.3
mpls
int g0/0/0
mpls
static-lsp egress 1t3 incoming-interface GigabitEthernet 0/0/0 in-label 100
配置完成如下
3.R4 ping 5.5.5.5部分报文如下
MPLS静态仅供学习,现网一般使用MPLS LDP。通过LDP协议,标签交换路由器LSR(Label Switched Router)可以把网络层的路由信息直接映射到数据链路层的交换路径上,动态建立起网络层的LSP。目前,LDP广泛地应用在VPN服务上,具有组网、配置简单、支持基于路由动态建立LSP、支持大容量LSP等优点。
全局和端口下使能MPLS LDP,自动生成的LSP如下