mpls static label allocation configuration case

Insert image description here

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 //Go to
static-lsp egress lsp2 incoming-interface GigabitEthernet0/0/0 in-label 60 //Return //
lsp1 is a custom name, local It's the only one, it doesn't need to be the same as other devices

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 and r3 ping each other (ospf needs to publish some network segments for interoperability, which means IP interoperability first)
Insert image description here
Insert image description here

Look at R2
Insert image description here

Guess you like

Origin blog.csdn.net/ydaxia110/article/details/134989439