Configuration Example of LDP-Enabled LSRs

The following figure illustrates a configuration example of three LDP-enabled LSRs.

Click to expand in new window
LDP-enabled LSR configuration

The following example provides the configuration of the LSR on each router.

Router R1

R1(config)# interface loopback 1
R1(config-lbif-1)# ip address 10.1.1.1/32
R1(config-lbif-1)# exit
R1(config)# router mpls
R1(config-router-mpls)# mpls-interface ethernet 0/10
R1(config-router-mpls-if-ethernet-0/10)# ldp-params
R1(config-router-mpls-if-ethernet-0/10-ldp-params)# ldp-enable
R1(config-router-mpls)# exit
R1(config)# ip route 10.2.2.2/32 10.1.1.2
R1(config)# ip route 10.3.3.3/32 10.1.1.2
R1(config)# route-only
R1(config)# interface ethernet 0/10
R1(config-if-ethernet-0/10)# ldp-params
R1(config-if-ethernet-0/10-ldp-params)# enable
R1(config-if-ethernet-0/10-ldp-params)# ip address 10.1.1.1/24
R1(config-if-ethernet-0/10-ldp-params)# exit
R1(config)# interface ethernet 0/20
R1(config-if-ethernet-0/20)# ldp-params
R1(config-if-ethernet-0/20-ldp-params)# enable
R1(config-if-ethernet-0/20-ldp-params)# ip address 10.1.1.1/24

Router R2

R2(config)# interface loopback 1
R2(config-lbif-1)# ip address 10.2.2.2/32
R2(config-lbif-1)# exit
R2(config)# router mpls
R2(config-router-mpls)# mpls-interface ethernet 0/10
R2(config-router-mpls-if-ethernet-0/10)# ldp-params
R2(config-router-mpls-if-ethernet-0/10-ldp-params)# ldp-enable
R2(config-router-mpls-if-ethernet-0/10-ldp-params)# exit
R2(config)# ip route 10.1.1.1/32 10.1.1.1
R2(config)# ip route 10.3.3.3/32 10.1.1.1
R2(config)# route-only
R2(config)# interface ethernet 0/20
R2(config-if-ethernet-0/20)# ldp-params
R2(config-if-ethernet-0/10-ldp-params)# enable
R2(config-if-0/20)# ip address 10.1.1.2/24
R2(config-if-0/20)# exit

Router R3

R3(config)# interface loopback 1
R3(config-lbif-1)# ip address 10.3.3.3/32
R3(config-lbif-1)# exit
R3(config)# router mpls
R3(config-router-mpls)# mpls-interface ethernet 0/10
R3(config-router-mpls-if-ethernet-0/10)# ldp-params
R3(config-router-mpls-if-ethernet-0/10-ldp-params)# ldp-enable
R3(config-router-mpls-if-ethernet-0/10-ldp-params)# exit
R3(config)# ip route 10.1.1.1/32 10.1.1.1
R3(config)# ip route 10.2.2.2/32 10.1.1.1
R3(config)# route-only
R3(config)# interface ethernet 0/20
R3(config-if-ethernet-0/20)# ldp-params
R3(config-if-ethernet-0/20-ldp-params)# enable
R3(config-if-ethernet-0/20-ldp-params)# 10.1.1.2/24
R3(config-if-ethernet-0/20-ldp-params)# exit