router bgp [AS number]
neighbor [neighbor IP address] remote-as [neighbor AS number]
network [network IP address]
router ospf [process ID]
network [area IP address] [wildcard mask] area [area ID]
area [area ID] range [area IP address] [area subnet mask]
router eigrp [AS number]
network [network IP address] [network wildcard mask]
mpls label protocol ldp
interface [interface name]
mpls ip
ip address [IP address] [subnet mask]
mpls label protocol ldp
interface GigabitEthernet0/1
mpls ip
ip address 10.0.0.1 255.255.255.0
!
interface GigabitEthernet0/2
mpls ip
ip address 10.0.1.1 255.255.255.0
!
router ospf 1
network 10.0.0.0 0.0.0.255 area 0
network 10.0.1.0 0.0.0.255 area 0
!
mpls ip
mpls ldp router-id Loopback0 force
In this example, MPLS is enabled on two GigabitEthernet interfaces, and OSPF is used to advertise the network subnets between the two interfaces. The mpls ldp router-id command sets the router ID to the IP address of the Loopback0 interface.