Specifications

Table Of Contents
ip vrf receive
MP-122
Cisco IOS Multiprotocol Label Switching Command Reference
January 2010
VRF Selection Based on Source IP Address Guidelines
The ip vrf receive command is automatically disabled when the no ip vrf vrf-name command is entered
for the local interface. An error message is displayed when the ip vrf receive command is disabled in
this manner. Interfaces where the VRF Selection Based on Source IP Address feature is enabled can
forward packets that have an IP address that corresponds to an IP address entry in the VRF table. If the
VRF table does not contain a matching IP address, the packet is dropped, by default, because there is no
corresponding “receive” entry in the VRF entry.
VRF Selection Using Policy Based Routing Guidelines
You must enter the ip policy route-map command before the ip vrf receive command can be enabled.
The ip vrf receive command is automatically disabled when either the no ip policy route-map
map-name or the no ip vrf vrf-name command is entered for the local interface. An error message is
displayed when the ip vrf receive command is disabled in this manner. With the VRF Selection Using
Policy-Based Routing implementation of the VRF selection feature, a route map filters the VRF routes.
If a match and set operation occurs in the route map but there is no receive entry in the local VRF table,
the packet is dropped.
Examples
VRF Selection Based on Source IP Address
The following example shows how to configure Ethernet interface 0/2 (172.16.1.3) and insert its
IP address in VRF1 and VRF2 with the ip v
rf receive command. You must enter the ip vrf select source
command on the interface or subinterface to enable VRF selection on the interface or subinterface. You
must also enter the vrf selection source command in global configuration mode to populate the VRF
selection table and to configure the VRF Selection Based on Source IP Address feature. (The vrf
selection source command is not shown in this example.)
Router(config)# interface Ethernet0/2
Router(config-if)# ip address 172.16.1.3 255.255.255.255
Router(config-if)# ip vrf select source
Router(config-if)# ip vrf receive VRF1
Router(config-if)# ip vrf receive VRF2
Router(config-if)# end
VRF Selection Using Policy-Based Routing
The following example shows how to configure Ethernet interface 0/1 (192.168.1.2) and insert its IP
address in VRF1 and VRF2 with the ip vrf receive command. You must configure an access list and a
route map to allow the VRF Section Using Policy-Based Routing feature to select a VRF. (The access
list and route map configuration are not shown in this example.)
Router(config)# interface Ethernet0/1
Router(config-if)# ip address 192.168.1.2 255.255.255.255
Router(config-if)# ip policy route-map PBR-VRF-SELECTION
Router(config-if)# ip vrf receive VRF1
Router(config-if)# ip vrf receive VRF2
Router(config-if)# end