Cisco Cisco IOS Software Release 12.2(14)S
VRF-Autoclassify
Information About VRF-Autoclassify
2
Cisco IOS Release 12.2(27)SBA
Feature Design of VRF-Autoclassify
When a router receives a packet, the packet is mapped to a global table by default. When the ip vrf
forwarding command is used to assign a specific VRF on the ingress interface, the packet is mapped to
that VRF. The packet is forwarded based on the routes in the VRF.
forwarding command is used to assign a specific VRF on the ingress interface, the packet is mapped to
that VRF. The packet is forwarded based on the routes in the VRF.
The VRF-Autoclassify feature enables the capability to map packets from connected hosts to VRFs that
are different from the VRF defined on the ingress interface. This feature also enables the configuration
of policies that are required for the mapping of packets to the VRFs depending on whether the source
address of the packet belongs to those connected routes.
are different from the VRF defined on the ingress interface. This feature also enables the configuration
of policies that are required for the mapping of packets to the VRFs depending on whether the source
address of the packet belongs to those connected routes.
For example, in
Fast Ethernet interface 0/0 is configured with two secondary addresses,
1.1.1.1/24 and 2.1.1.1/24. The first address, 1.1.1.1/24, is assigned to VRF red, while the other,
2.1.1.1/24, is assigned to VRF green. So in the VRF red table, a connected route 1.1.1.0/24 is installed,
while in VRF green, 2.1.1.0/24 is installed. The routing information can be learned dynamically or
statically defined.
2.1.1.1/24, is assigned to VRF green. So in the VRF red table, a connected route 1.1.1.0/24 is installed,
while in VRF green, 2.1.1.0/24 is installed. The routing information can be learned dynamically or
statically defined.
There is a default route in VRF red that directs all traffic to Fast Ethernet interface 1/0, while in VRF
green, another default route directs all traffic to Fast Ethernet interface 1/1. When packets arrive at Fast
Ethernet interface 0/0, they are mapped to either VRF red or VRF green based on their source address.
If the source address is 1.1.1.2, connected route 1.1.1.0/24 is used, and the packet is mapped to VRF red.
Following the default route, it is forwarded out of Fast Ethernet interface 1/0.
green, another default route directs all traffic to Fast Ethernet interface 1/1. When packets arrive at Fast
Ethernet interface 0/0, they are mapped to either VRF red or VRF green based on their source address.
If the source address is 1.1.1.2, connected route 1.1.1.0/24 is used, and the packet is mapped to VRF red.
Following the default route, it is forwarded out of Fast Ethernet interface 1/0.
Figure 1
Routing and Mapping of Packets with VRF-Autoclassify Enabled
For the return traffic, packets are mapped to the VRF configured on the downstream interface. For
example, when a packet is received by a Fast Ethernet interface, destined for host 1.1.1.2, it is marked
VRF red automatically based on the VRF configured on the downstream interface using the ip vrf
forwarding red command. A lookup in VRF red would return a connected route for 1.1.1.0/24 out of
Fast Ethernet interface 0/0 or return a 1.1.1.2/32 that is a directly connected neighbor. When the
connected route 1.1.1.0/24 is installed in vrf red while pointing out of an interface that is native to the
global table or some other table, the table is tracked. See
example, when a packet is received by a Fast Ethernet interface, destined for host 1.1.1.2, it is marked
VRF red automatically based on the VRF configured on the downstream interface using the ip vrf
forwarding red command. A lookup in VRF red would return a connected route for 1.1.1.0/24 out of
Fast Ethernet interface 0/0 or return a 1.1.1.2/32 that is a directly connected neighbor. When the
connected route 1.1.1.0/24 is installed in vrf red while pointing out of an interface that is native to the
global table or some other table, the table is tracked. See
.
Fast ethernet0/0
1.1.1.1/24 vrf red
2.1.1.1/24 vrf green
1.1.1.1/24 vrf red
2.1.1.1/24 vrf green
VRF red
1.1.1.2
1.1.1.2
Fast ethernet1/0
ip vrf forwarding red
3.1.1.1/24
ip vrf forwarding red
3.1.1.1/24
Fast ethernet1/1
ip vrf forwarding green
4.1.1.1/24
ip vrf forwarding green
4.1.1.1/24
VRF red
VRF green
127902
VRF green
2.1.1.2
2.1.1.2