Configure VRF Aware Software Infrastruct
Configure VRF Aware Software Infrastruct
Introduction
Prerequisites
Requirements
Components Used
Background Information
Working of VASI
Configure
Network Diagram
Initial Configurations
VASI Interface configuration
NAT Configuration:
Scenario 1 - NAT on Vasiright
Scenario 2 - NAT on Vasileft
Verify
Troubleshoot
Related Information
Introduction
This document describes the configuration of VASI NAT on routers that run Cisco IOS-XE
Prerequisites
Requirements
Components Used
This document is not restricted to specific software and hardware versions. This document applies
to all Cisco routers and switches that run Cisco IOS-XE.
The information in this document was created from the devices in a specific lab environment. All of
the devices used in this document started with a cleared (default) configuration. If your network is
live, make sure that you understand the potential impact of any command.
Background Information
Devices that run on IOS-XE do not support classical inter-vrf nat configurations as those found on
IOS devices. Support for Inter-vrf NAT on IOS-XE is achieved via VASI implementation.
VASI provides the ability to configure services such as IPsec, firewall and NAT to traffic that flows
between VRF instances.
VASI is implemented by configuring VASI pairs, where each of the interfaces in the pair is
associated with a different VRF instance. The VASI virtual interface is the next-hop interface for
any packet that needs to be switched between these two VRF instances. The pairing is done
automatically based on the two interface indexes such that the vasileft interface is automatically
paired to the vasiright interface. Any packet that enters the vasileft interface
is automatically forwarded to its paired vasiright interface.
Working of VASI
When an inter-VRF VASI is configured on the same device, the packet flow happens in the
following order:
Configure
The following scenarios describe basic inter-vrf NAT configuration.
Network Diagram
Initial Configurations
SanJose:
interface GigabitEthernet0/0/0
ip address 192.168.1.1 255.255.255.0
interface GigabitEthernet0/0/0
vrf forwarding VRF_LEFT
ip address 192.168.1.2 255.255.255.0
interface GigabitEthernet0/0/1
vrf forwarding VRF_RIGHT
ip address 172.16.1.2 255.255.255.0
Sydney:
interface GigabitEthernet0/0/0
ip address 172.16.1.1 255.255.255.0
interface vasileft1
vrf forwarding VRF_LEFT
ip address 10.1.1.1 255.255.255.252
interface vasiright1
vrf forwarding VRF_RIGHT
ip address 10.1.1.2 255.255.255.252
NAT Configuration:
In most cases, the WAN interface would be on the outgoing VRF, VRF_RIGHT in this topology. In
such cases, NAT can be configured between the vasiright and the WAN interface; traffic coming in
on the vasiright interface from vasileft will be configured as NAT inside, while the WAN interface
would be the NAT outside interface.
In this scenario, we use static routes to traffic between the VRFs. A static route for the destination
172.16.0.0 subnet is configured on VRF_LEFT pointing to the vasileft interface and another route
for the source subnet 192.168.0.0 is configured on VRF_RIGHT pointing to the vasiright interface.
Do not configure NAT to translate the source IP to the WAN interface IP; the router will treat return
Note to be destined to itself and will not forward traffic to the vasi interface.
Static NAT :
interface vasiright1
vrf forwarding VRF_RIGHT
ip address 10.1.1.2 255.255.255.252
ip nat inside
interface GigabitEthernet0/0/1
vrf forwarding VRF_RIGHT
ip address 172.16.1.2 255.255.255.0
ip nat outside
interface vasiright1
vrf forwarding VRF_RIGHT
ip address 10.1.1.2 255.255.255.252
ip nat inside
interface GigabitEthernet0/0/1
vrf forwarding VRF_RIGHT
ip address 172.16.1.2 255.255.255.0
ip nat outside
NAT can also be configured solely on the vasileft side, i.e VRF_LEFT and have traffic NATTED
before it is sent to VRF_RIGHT. The incoming interface on VRF_LEFT will be considered as the
NAT inside interface, and vasileft 1 will be configured as the NAT outside interface.
In this scenario, we use static routes to traffic between the VRFs. A static route for the destination
172.16.0.0 subnet is configured on VRF_LEFT pointing to the vasileft interface and another route
for the source natted IP 172.16.1.5 is configured on VRF_RIGHT pointing to the vasiright
interface.
Static NAT:
interface GigabitEthernet0/0/0
vrf forwarding VRF_LEFT
ip address 192.168.1.2 255.255.255.0
ip nat inside
interface vasileft1
vrf forwarding VRF_LEFT
ip address 10.1.1.1 255.255.255.252
ip nat outside
interface GigabitEthernet0/0/0
vrf forwarding VRF_LEFT
ip address 192.168.1.2 255.255.255.0
ip nat inside
interface vasileft1
vrf forwarding VRF_LEFT
ip address 10.1.1.1 255.255.255.252
ip nat outside
Verify
1. Check if dynamic/static routes are configured to route traffic between the two VRF instances.
2. Check if NAT has been configured for the correct VRF.
Troubleshoot
There is currently no specific troubleshooting information available for this configuration.
Related Information
● Configuring the VRF-Aware Software Infrastructure