目录
拓扑图
基本思路:
- 第一步:配置好各个接口的IP地址
- 第二步:在R1和R4上配置静音路由,仅需要在R1和R4上配置,R2和R3不需要
- 第三步:配置lsr-id启动(全局启动/接口启动)mpls
- 第四步:配置静态的LDP,注意,是来回呀
配置
基础配置
R1
sys
sysn R1
dhcp enable
int l0
ip add 10.0.1.1 32
int g0/0/1
ip add 192.168.10.1 24
dhcp select interface
int g0/0/0
ip add 10.0.12.1 24
R2:
sys
sysn R2
int l0
ip add 10.0.2.2 32
int g0/0/0
ip add 10.0.12.2 24
int g0/0/1
ip add 10.0.23.2 24
R3:
sys
sysn R3
int l0
ip add 10.0.3.3 32
int g0/0/0
ip add 10.0.23.3 24
int g0/0/1
ip add 10.0.34.3 24
R4:
dhcp enable
int l0
ip add 10.0.4.4 32
int g0/0/1
ip add 192.168.20.1 24
dhcp select interface
int g0/0/0
ip add 10.0.24.4 24
R1:
ip route-static 192.168.20.0 24 10.0.12.2
R4:
ip route-static 192.168.10.0 24 10.0.34.3
MPLS 基础配置
MPLS:
R1:
mpls lsr-id 10.0.1.1
mpls
quit
int g0/0/0
mpls
int g0/0/1
mpls
R2:
mpls lsr-id 10.0.2.2
mpls
quit
int g0/0/0
mpls
int g0/0/1
mpls
R3:
mpls lsr-id 10.0.3.3
mpls
quit
int g0/0/0
mpls
int g0/0/1
mpls
R4:
mpls lsr-id 10.0.4.4
mpls
quit
int g0/0/0
mpls
int g0/0/1
mpls
MPLS静态LSP的配置
R1:
static-lsp ingress 1to2 destination 192.168.20.0 24 nexthop 10.0.12.2 out-lab 1002
R2:
static-lsp transit 1to2 incoming-interface g0/0/0 in-label 1002 nexthop 10.0.23.3 out-label 1003
R3
static-lsp transit 1to2 incoming-interface g0/0/0 in-label 1003 nexthop 10.0.34.4 out-label 1004
R4:
static-lsp egress 1to2 incoming-interface g0/0/0 in-label 1004
R4:
static-lsp ingress 2to1 destination 192.168.10.0 24 nexthop 10.0.34.3 out-label 1013
R3:
static-lsp transit 2to1 incoming-inter g0/0/1 in-label 1013 nexthop 10.0.23.2 out-label 1012
R2:
static-lsp transit 2to1 incoming-inter g0/0/1 in-label 1012 nexthop 10.0.12.1 out-label 1011
R1:
static-lsp egress 2to1 incoming-inter g0/0/0 in-label 1011
验证
[R1]dis mpls static-?
static-cr-lsp Static CR-LSP configuration
static-l2vc Static layer 2 virtual circuit over MPLS
static-lsp Static LSP configuration
[R1]dis mpls static-lsp
TOTAL : 2 STATIC LSP(S)
UP : 2 STATIC LSP(S)
DOWN : 0 STATIC LSP(S)
Name FEC I/O Label I/O If Status
1to2 192.168.20.0/24 NULL/1002 -/GE0/0/0 Up
2to1 -/- 1011/NULL GE0/0/0/- Up
<R4>dis mpls static-lsp
TOTAL : 2 STATIC LSP(S)
UP : 2 STATIC LSP(S)
DOWN : 0 STATIC LSP(S)
Name FEC I/O Label I/O If Status
1to2 -/- 1004/NULL GE0/0/0/- Up
2to1 192.168.10.0/24 NULL/1013 -/GE0/0/0 Up
标签:24,10.0,g0,int,mpls,MPLS,STATIC,LSP,static
From: https://www.cnblogs.com/yizhangheka/p/17144969.html