Table of contents
HCIP LSP static construction experiment
Build an LSP from 1.0 - 4.0 network segment
Build an LSP from 4.0 - 1.0 network segment
Configure a transit LSR (R3, R2)
Configure an outbound LSR (R1)
HCIP LSP static construction experiment
Experimental diagram
basic configuration
R1
[R1]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 2
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 2
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 12.0.0.1/24 up up
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
LoopBack0 1.1.1.1/24 up up(s)
NULL0 unassigned up up(s)
R2
[R2]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 12.0.0.2/24 up up
GigabitEthernet0/0/1 23.0.0.1/24 up up
GigabitEthernet0/0/2 unassigned down down
LoopBack0 2.2.2.2/24 up up(s)
NULL0 unassigned up up(s)
R3
[R3]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 23.0.0.2/24 up up
GigabitEthernet0/0/1 34.0.0.1/24 up up
GigabitEthernet0/0/2 unassigned down down
LoopBack0 3.3.3.3/24 up up(s)
NULL0 unassigned up up(s)
R4
[R4]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 2
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 2
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 34.0.0.2/24 up up
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
LoopBack0 4.4.4.4/24 up up(s)
NULL0 unassigned up up(s)
configuration method
[R2]int g 0/0/0 [R2-GigabitEthernet0/0/0]ip address 12.0.0.2 24 Apr 14 2023 18:47:25-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state. [R2-GigabitEthernet0/0/0]int g 0/0/1 [R2-GigabitEthernet0/0/1]ip address 23.0.0.1 24 Apr 14 2023 18:47:36-08:00 R2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface GigabitEthernet0/0/1 has entered the UP state. [R2-GigabitEthernet0/0/1]int l 0 [R2-LoopBack0]ip address 2.2.2.2 24
Build an LSP from 1.0 - 4.0 network segment
Build a static route
[R1]ip route-static 4.4.4.0 24 12.0.0.2
Configure MPLS
Configure LSR-ID
[R1]mpls lsr-id 1.1.1.1
Notice:
In general, we are used to using the IP address of the loopback interface of the device as the LSR-ID
Activate MPLS
global activation
[R1]mpls
Info: Mpls starting, please wait... OK!
[R1-mpls]
interface activation
[R1]int g 0/0/0
[R1-GigabitEthernet0/0/0]mpls
Build a static LSP
Build an inbound LSR
[R1]static-lsp ingress lto4 destination 4.4.4.0 24 nexthop 12.0.0.2 out-label 16
Notice:
destination 4.4.4.0 24 nexthop 12.0.0.2 --- Need to correspond with the content in the local routing table , otherwise the static LSP will fail to build
out-label --- outbound label --- the label that R1 presses after forwarding the data packet. After R2 receives the data packet, it needs to judge which network segment the data packet arrives based on this label --- R2 accepts it After that, it is necessary to judge which network segment the data reaches according to this label.
R1 configuration
[R1]mpls lsr-id 1.1.1.1
[R1]mpls
Info: Mpls starting, please wait... OK!
[R1-mpls]
[R1-mpls]q
[R1]int g 0/0/0
[R1-GigabitEthernet0/0/0]mpls
[R1-GigabitEthernet0/0/0]q
[R1]static-lsp ingress lto4 destination 4.4.4.0 24 nexthop 12.0.0.2 out-label 16
Build a transit LSR
[R2]static-lsp transit lto4 incoming-interface GigabitEthernet 0/0/0 in-label 16
nexthop 23.0.0.2 out-label 17
Notice:
incoming-interface --- the interface through which data enters
int-lable --- --- inbound label --- must be the same as the outgoing label configured by R1
R2 configuration
[R2]mpls lsr
[R2]mpls lsr-id 2.2.2.2
[R2]mpls
Info: Mpls starting, please wait... OK!
[R2-mpls]q
[R2]int g 0/0/0
[R2-GigabitEthernet0/0/0]mpls
[R2-GigabitEthernet0/0/0]int g 0/0/1
[R2-GigabitEthernet0/0/1]mpls
[R2-GigabitEthernet0/0/1]q
[R2]static-lsp transit lto4 incoming-interface GigabitEthernet 0/0/0 in-label 16
nexthop 23.0.0.2 out-label 17
[R2]
R3 configuration
[R3]mpls lsr-id 3.3.3.3
[R3]mpls
Info: Mpls starting, please wait... OK!
[R3-mpls]q
[R3]int g 0/0/0
[R3-GigabitEthernet0/0/0]mpls
[R3-GigabitEthernet0/0/0]int g 0/0/1
[R3-GigabitEthernet0/0/1]mpls
[R3-GigabitEthernet0/0/1]q
[R3]static-lsp transit lto4 incoming-interface GigabitEthernet 0/0/0 in-label 17
nexthop 34.0.0.2 out-label 18
Build an outbound LSR
[R4]static-lsp egress lto4 incoming-interface g 0/0/0 in-label 18
R4 configuration
[R4]static-lsp egress lto4 incoming-interface g 0/0/0 in-label 18
Build an LSP from 4.0 - 1.0 network segment
Build a static route
[R4]ip route-static 1.1.1.0 24 34.0.0.1
Notice:
Because MPLS has already been configured, there is no need to build it again
Build LSP
Configure an inbound LSR (R4)
[R4]static-lsp ingress 4to1 destination 1.1.1.0 24 nexthop 34.0.0.1 out-label 10
00
Configure a transit LSR (R3, R2)
[R3]static-lsp transit 4tol incoming-interface GigabitEthernet 0/0/1 in-label 10
00 nexthop 23.0.0.1 out-label 1001
[R2]static-lsp transit 4tol incoming-interface GigabitEthernet 0/0/1 in-label 10
01 nexthop 12.0.0.1 out-label 1002
Configure an outbound LSR (R1)
[R1]static-lsp egress 4to1 incoming-interface GigabitEthernet 0/0/0 in-label 100
2
test
ping test
[R1]ping -a 1.1.1.1 4.4.4.4
PING 4.4.4.4: 56 data bytes, press CTRL_C to break
Request time out
Request time out
Reply from 4.4.4.4: bytes=56 Sequence=3 ttl=253 time=50 ms
Reply from 4.4.4.4: bytes=56 Sequence=4 ttl=253 time=50 ms
Reply from 4.4.4.4: bytes=56 Sequence=5 ttl=253 time=40 ms
--- 4.4.4.4 ping statistics ---
5 packet(s) transmitted
3 packet(s) received
40.00% packet loss
round-trip min/avg/max = 40/46/50 ms
grab bag
MultiProtocol Label Switching Header, Label --- for the added label
Check the static LSP table
[R1]display 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
lto4 4.4.4.0/24 NULL/16 -/GE0/0/0 Up
4to1 -/- 1002/NULL GE0/0/0/- Up
[R1]
[R2]display 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
lto4 -/- 16/17 GE0/0/0/GE0/0/1 Up
4tol -/- 1001/1002 GE0/0/1/GE0/0/0 Up
[R2]
[R3]display 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
lto4 -/- 17/18 GE0/0/0/GE0/0/1 Up
4tol -/- 1000/1001 GE0/0/1/GE0/0/0 Up
[R3]
[R4]display 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
lto4 -/- 18/NULL GE0/0/0/- Up
4to1 1.1.1.0/24 NULL/1000 -/GE0/0/0 Up
[R4]