mpls静态标签分配配置案例

在这里插入图片描述

R1

mpls lsr-id 1.1.1.1
mpls

interface GigabitEthernet0/0/0
ip address 10.0.12.1 255.255.255.0
mpls

interface LoopBack0
ip address 1.1.1.1 255.255.255.255

ospf 1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.0.12.1 0.0.0.0

static-lsp ingress lsp1 destination 3.3.3.3 32 nexthop 10.0.12.2 out-label 20 //去
static-lsp egress lsp2 incoming-interface GigabitEthernet0/0/0 in-label 60 //回
//lsp1为自定义名字,本地唯一就行了不用和其它设备一样

R2:

mpls lsr-id 2.2.2.2
mpls

interface GigabitEthernet0/0/0
ip address 10.0.12.2 255.255.255.0
mpls

interface GigabitEthernet0/0/1
ip address 10.0.23.2 255.255.255.0
mpls

interface LoopBack0
ip address 2.2.2.2 255.255.255.255

ospf 1
area 0.0.0.0
network 2.2.2.2 0.0.0.0
network 10.0.12.2 0.0.0.0
network 10.0.23.2 0.0.0.0

static-lsp transit lsp1 incoming-interface GigabitEthernet0/0/0 in-label 20 next
hop 10.0.23.3 out-label 40
static-lsp transit lsp2 incoming-interface GigabitEthernet0/0/1 in-label 30 next
hop 10.0.12.1 out-label 60

R3:
mpls lsr-id 3.3.3.3
mpls

interface GigabitEthernet0/0/0
ip address 10.0.23.3 255.255.255.0
mpls

interface LoopBack0
ip address 3.3.3.3 255.255.255.255

ospf 1
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 10.0.23.3 0.0.0.0

static-lsp egress lsp1 incoming-interface GigabitEthernet0/0/0 in-label 40
static-lsp ingress lsp2 destination 1.1.1.1 32 nexthop 10.0.23.2 out-label 30

r1和r3上面互ping(要ospf发布互通的些网段才行,意思是要IP互通先)
在这里插入图片描述
在这里插入图片描述

R2上看
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/ydaxia110/article/details/134989439
今日推荐