To configure a VRF to provide BGP VPN services:
- host1(config)#virtual-router vr1
- host1:vr1(config)#ip vrf vrfA
- host1:vr1(config-vrf)#rd 100:100
- host1:vr1(config-vrf)#route-target import
100:1
- host1:vr1(config-vrf)#route-target export
100:1
- host1:vr1(config-vrf)#import map Another-route-map
- host1:vr1(config-vrf)#export map A-route-map
- host1:vr1(config-vrf)#exit
- host1:vr1(config)#interface gigabitEthernet
1/0
- host1:vr1(config-if)#ip vrf forwarding vrfA
- host1:vr1:vrfA(config-if)#ip address 10.16.2.77
255.255.255.0
- host1:vr1:vrfA(config-if)#exit
or
- host1:vr1(config)#virtual-router :vrfA
- host1:vr1:vrfA(config)#interface gigabitEthernet
1/0
![]() |
Note: You can also use the ip vrf forwarding command to specify secondary route lookup at the parent (global) level, in the event the original lookup does not yield any results. |
- host1(config)#virtual-router vr1
- host1:vr1(config)#ip vrf vpnA
- host1:vr1(config-vrf)#ip route vrf vrfA 10.3.0.0
255.255.0.0 10.1.1.1
- host1:vr1(config-vrf)#ip route vrf vrfA 10.12.0.0
255.255.0.0 10.1.1.1
or
- host1(config)#virtual-router vr1:vrfA
- host1:vr1:vrfA(config)#ip route 10.3.0.0 255.255.0.0
10.1.1.1
- host1:vr1:vrfA(config)#ip route 10.12.0.0
255.255.0.0 10.1.1.1
See Configuring IGPs on the VRF for examples.
See Configuring PE-to-CE BGP Sessions for information about configuring EBGP.
- host1:vr1(config-vrf)#ip mpls forwarding-mode
label-switched
- host1:vr1:VrfA(config)#mpls topology-driven-lsp
See Carrier-of-Carriers IPv4 VPNs for information about configuring carrier-of-carriers VPNs.