BGP4+ authentication can be configured to enhance security of BGP networks.
MD5 authentication
BGP uses TCP as the transport protocol and considers a packet valid if the source address, destination address, source port, destination port, and TCP sequence number of the packet are correct. However, most parameters in a packet are easily accessible to attackers. To protect BGP against attacks, configure MD5 authentication for TCP connections established between BGP peers.
To prevent the MD5 password set on the BGP peers from being decrypted, update the MD5 password periodically.
MD5 authentication is not recommended if high security is required.
Keychain authentication
A keychain consists of multiple authentication keys, each of which contains an ID and a password. Each key has a lifecycle, and keys are dynamically selected based on the lifecycle of each key. After a keychain with the same rules is configured on the two ends of a BGP connection, the keychains can dynamically select authentication keys to enhance BGP attack defense.
The TCP authentication option (TCP-AO) is used to authenticate received and to-be sent packets during TCP session establishment and data exchange. It supports packet integrity check to prevent TCP replay attacks. TCP-AO authentication improves the security of the TCP connection between BGP peers and is applicable to the network that requires high security.
BGP MD5 authentication and BGP keychain authentication are mutually exclusive.
# A peer relationship can be set between two peers that have the same authentication information. Run the display bgp ipv6 peer command to check the peer relationship status.