Cisco Systems 12.4 Building Set User Manual


 
Note
The configuration examples below show only the commands related to configuring LDP for Router 1,
Router 2, and Router 3 in the sample network shown in the figure above.
Router 1 Configuration
ip cef distributed !Assumes R1 supports distributed CEF
interface Loopback0 !Loopback interface for LDP ID.
ip address 172.16.0.11 255.255.255.255
!
interface POS3/0/0
ip address 10.0.0.44 255.0.0.0
mpls ip !Enable hop-by-hop MPLS forwarding
mpls label protocol ldp !Use LDP for this interface
!
interface POS3/0/1
ip address 192.168.0.44 255.0.0.0
mpls ip !Enable hop-by-hop MPLS forwarding
mpls label protocol tdp !Use TDP for this interface
Router 2 Configuration
ip cef distributed !Assumes R2 supports distributed CEF
!
interface Loopback0 !Loopback interface for LDP ID.
ip address 172.16.0.22 255.255.255.255
!
interface POS2/0/0
ip address 10.0.0.33 255.0.0.0
mpls ip !Enable hop-by-hop MPLS forwarding
mpls label protocol ldp !Use LDP for this interface
Router 3 Configuration
ip cef !Assumes R3 does not support dCEF
!
interface Loopback0 !Loopback interface for LDP ID.
ip address 172.16.0.33 255.255.255.255
!
interface POS1/0
ip address 192.168.0.55 255.0.0.0
mpls ip !Enable hop-by-hop MPLS forwarding
mpls label protocol tdp !Use tDP for this interface
The LDP configuration for Router 1 uses the mpls label protocol ldpcommand in interface configuration
mode, because some of its interfaces use LDP and some use TDP. Another way to configure Router 1 is to
use the mpls label protocol ldpcommand in global configuration mode to configure LDP as the default
protocol for interfaces and use the mpls label protocol tdpcommand in interface configuration mode to
configure TDP for the POS3/0/1 link to Router 3. This alternative way to configure Router 1 is shown
below:
Router 1 Configuration
ip cef distributed !Assumes R1 supports dCEF
mpls label protocol ldp !Use LDP for the default protocol
!
interface Loopback0 !Loopback interface for LDP ID.
ip address 172.16.0.11 255.255.255.255
interface POS3/0/0
ip address 10.0.0.44 255.0.0.0
mpls ip !Enable hop-by-hop MPLS forwarding
MPLS Label Distribution Protocol (LDP)
MPLS LDP Configuration Examples
MPLS LDP Configuration Guide, Cisco IOS Release 12.4
22