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.
Article Directory
1. Topology
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
[AR2]dis ip routing-table protocol ospf
[AR2]dis mpls lsp
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.
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
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
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.
(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;
time 40-54S, send once in 15 seconds Keep Alive Message message.
(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.
(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.
(6) When both LSR1 and LSR2 receive the Keepalive message from the opposite end, the LDP session is established successfully
OK
[LSR2]dis mpls ldp session
(7)address Message
It carries the address and LSR-ID of its own interface.
(8) Label Mapping Message label mapping message
Label 3
00402 hexadecimal to decimal is 1026
Label 1026
Well, it's time to share the famous saying:
Every day that I never danced is a failure to life.
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!