MSDP peers use port 639 to set up TCP connections.
After MSDP is enabled on two devices and they are specified as MSDP peers, the devices compare their IP addresses. The device with a smaller IP address starts the ConnectRetry timer and initiates a TCP connection to the other device. The device with a larger IP address monitors whether a TCP connection is set up on the port 639. The MSDP peer relationship is set up after a TCP connection is set up. MSDP peers maintain the TCP connection by exchanging Keepalive messages.
As shown in Figure 1, an MSDP peer relationship is set up between RouterA and RouterB as follows:
To improve MSDP security, MSDP peers perform TCP connection authentication. You must configure the same encryption algorithm and password on the two ends. Otherwise, the TCP connection cannot be set up between MSDP peers. MSDP supports two encryption modes: MD5 and Keychain. The two modes are mutually exclusive, and you can configure only one of them between MSDP peers.