LDP MD5 Authentication

LDP MD5 configuration enables LDP MD5 password authentication on a per-peer basis.

Direct LDP Session

In this example, MD5 authentication is configured for a direct LDP session.

Figure 68. Topology for Direct Session MD5

R1

#configure terminal

Enter configure mode.

(config)#router ldp

Enter Router mode.

(config)#router-id 1.1.1.1

Configure the router id.

(config-router)#transport-address ipv4 1.1.1.1

Configure the transport address to be used for a TCP session over which LDP will run on an IPv4 interface.

(config-router)#neighbor 10.10.10.2 auth md5 password 0 pwd1

Configure the MD5 authentication and password, pwd1, for the neighbor, 10.10.10.2.

(config-router)#exit

Exit the Router mode and return to the Configure mode.

(config)#interface lo

Specify the loopback (lo) interface to be configured.

(config-if)#ip address 1.1.1.1/32 secondary

Set the IP address of the loopback interface to 1.1.1.1/32.

(config)#interface xe1

Specify the interface (xe1) to be configured.

(config-if)#ip address 10.10.10.1/24

Set the IP address of the interface to 10.10.10.1/24..

(config-if)#label-switching

Enable label switching on interface xe1.

(config-if)#enable-ldp ipv4

Enable LDP on interface xe1.

(config-if)#commit

Commit the transaction.

R2

#configure terminal

Enter configure mode.

(config)#router ldp

Enter Router mode.

(config)#router-id 2.2.2.2

Configure the router id.

(config-router)#transport-address ipv4 2.2.2.2

Configure the transport address to be used for a TCP session over which LDP will run on an IPv4 interface.

(config-router)#neighbor 10.10.10.1 auth md5 password 0 pwd1

Configure the MD5 authentication and password, pwd1, for the neighbor, 10.10.10.1.

(config-router)#exit

Exit the Router mode and return to the Configure mode.

(config)#interface lo

Specify the loopback (lo) interface to be configured.

(config-if)#ip address 2.2.2.2/32 secondary

Set the IP address of the loopback interface to 2.2.2.2/32.

(config)#interface xe1

Specify the interface (xe1) to be configured.

(config-if)#ip address 10.10.10.2/24

Set the IP address of the interface to 10.10.10.2/24.

(config-if)#label-switching

Enable label switching on interface xe1.

(config-if)#enable-ldp ipv4

Enable LDP on interface xe1.

(config-if)#commit

Commit the transaction.