Huawei LDP session establishment process

Hello, everyone! I Yibo East , is a Cisco background, focus on Huawei's network engineering; Well, did not talk much, we go directly to the topic.

1. Topology

Insert picture description here

Two, configuration and testing

The bottom layer runs the IGP protocol, where the IGP protocol is the OSPF protocol;

LSR1

[LSR1]int g0/0/0
[LSR1-GigabitEthernet0/0/0]ip address 10.1.12.1 32
[LSR1-GigabitEthernet0/0/0]int l0
[LSR1-LoopBack0]ip address 1.1.1.1 32
[LSR1-LoopBack0]q
[LSR1]mpls lsr-id 1.1.1.1
[LSR1]mpls 
[LSR1-mpls]mpls ldp
[LSR1-mpls-ldp]int g0/0/0
[LSR1-GigabitEthernet0/0/0]mpls
[LSR1-GigabitEthernet0/0/0]mpls ldp
[LSR1-GigabitEthernet0/0/0]q
[LSR1]ospf 1 router-id 1.1.1.1
[LSR1-ospf-1] area 0
[LSR1-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0 
[LSR1-ospf-1-area-0.0.0.0]network 10.1.12.1 0.0.0.0

LSR2

[LSR2]int g0/0/0
[LSR2-GigabitEthernet0/0/0]ip address 10.1.12.2 32
[LSR2-GigabitEthernet0/0/0]int l0
[LSR2-LoopBack0]ip address 2.2.2.2 32
[LSR2-LoopBack0]q
[LSR2]mpls lsr-id 2.2.2.2
[LSR2]mpls 
[LSR2-mpls]mpls ldp
[LSR2-mpls-ldp]int g0/0/0
[LSR2-GigabitEthernet0/0/0]mpls
[LSR2-GigabitEthernet0/0/0]mpls ldp
[LSR2-GigabitEthernet0/0/0]q
[LSR2]ospf 1 router-id 2.2.2.2
[LSR2-ospf-1] area 0
[LSR2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0 
[LSR2-ospf-1-area-0.0.0.0]network 10.1.12.2 0.0.0.0

[LSR1]dis ospf peer brief
Insert picture description here

[AR2]dis ip routing-table protocol ospf
Insert picture description here

[AR2]dis mpls lsp

Insert picture description here

Three, analysis

The first is to ensure that the underlying IP address is reachable, and the transport address IPv4 Transport Address is reachable, so that the TCP connection can be made, otherwise the TCP establishment is unsuccessful.

Insert picture description here

Capture packets for data analysis

(1) Both LSR routers will send LDP HELLO messages to each other

A Label Space ID of 0 means it is valid based on the device.

The
Insert picture description here
destination address of the LDP HELLO message of LSR1 is 224.0.0.2, and the HELLO message carries its own transport address IPv4 Transport Address: 1.1.1.1, because they use the transport address to establish an LDP session.

The
Insert picture description here
destination address of the LDP HELLO message of LSR2 is 224.0.0.2, and the HELLO message carries its own transport address IPv4 Transport Address: 2.2.2.2, because they use the transport address to establish an LDP session.

(2) The end with the larger transmission address becomes the active party, and then initiates a TCP connection; that is, the LSR2 router is the active party to initiate a TCP connection, and LSR1 acts as the passive party and waits for the active party to initiate a TCP connection.

Insert picture description here
(3) After TCP is successfully established, the active party LSR2 initiates an initialization message to negotiate the relevant parameters for establishing an LDP session. The parameters are: 3 times the sending time (Send Keep Alive Message once in 15 seconds), label notification method, loop detection method, PDU length, LSR-ID, label space;
Insert picture description here
time 40-54S, send once in 15 seconds Keep Alive Message message.
Insert picture description here

(4) After the passive party LSR1 receives the initialization message of LSR2, LSR1 can accept the relevant parameters, and then responds to the Initialization message, and at the same time sends the Keepalive message to the active party LSR2. If the relevant parameters cannot be accepted, it responds with a Notification message to terminate the establishment of the LDP session connection.

Insert picture description here
(5) After the active party LSR2 receives the initialization message of LSR1, LSR2 can accept the relevant parameters, and then responds with a Keepalive message to the passive party LSR1. If the relevant parameters cannot be accepted, it responds with a Notification message to the passive party LSR1 to terminate the establishment of the LDP session connection.

Insert picture description here

(6) When both LSR1 and LSR2 receive the Keepalive message from the opposite end, the LDP session is established successfully

OK
Insert picture description here

[LSR2]dis mpls ldp session
Insert picture description here

(7)address Message
Insert picture description here

It carries the address and LSR-ID of its own interface.

(8) Label Mapping Message label mapping message

Insert picture description here
Label 3

Insert picture description here

00402 hexadecimal to decimal is 1026

Insert picture description here

Insert picture description here

Label 1026

Well, it's time to share the famous saying:
Every day that I never danced is a failure to life.


Insert picture description here

Well, this issue is here. If you like this article, please like and comment to share the collection. If you can still click and follow, that is really my biggest encouragement. Thank you, see you next time!

Guess you like

Origin blog.csdn.net/HYD696/article/details/112838661
ldp