Creating Labels per FEC
The following configuration is used to configure the router to generate a label for each different FEC that a BGP route points to in the VPN. The following commands configure a router where BGP is running in VRF pe11 and static and connected routes are redistributed into the VRF:
- Configure the VRFhost1(config)#ip vrf pe11
- Configure the router to generate a label for each different
FEC that a BGP route points to in a VPNhost1(config-vrf)#ip mpls forwarding-mode label-switched
- Establish the static routes for the VRF interfacehost1(config-vrf)#ip route vrf pe11 10.3.4.5 255.255.255.255 fastEthernet 0/1 host1(config-vrf)#ip route vrf pe11 10.1.1.1 255.255.255.255 loopback 1 host1(config-vrf)#exit
- Configure the BGP routing processhost1(config)#router bgp 100
- For the IPv4 address family, configure the router to exchange
IPv4 addresses in unicast host1(config-router)#address-family ipv4 unicast vrf pe11 host1(config-router-af)#exit
- Configure the router to advertise the network routes without
waiting for IGP synchronization with BGPhost1(config-router)#no synchronization
- Configure the router to redistribute routes that are established
automatically when IP is enabled on an interface.host1(config-router)#redistribute connected
- Disable automatic synchronizationhost1(config-router)#no auto-summary
- Configure the router to redistribute static routeshost1(config-router)#redistribute static
For each connected route that is redistributed into the VRF and advertised across the BGP/MPLS VPN, the router assigns a per-VRF label rather than a per-FEC label.
The static route 10.1.1.1/32 points to loopback interface 1. BGP therefore advertises this static route with a per-VRF label.
Hide Navigation Pane
Show Navigation Pane
SHA1