Pages

2/25/2013

Configure NAT in the VRF lite scenario

Configure NAT in the VRF lite scenario
But, why would you do a VRF and then decide you wanted to route from that VRF to your global routing instance?  And why on earth would you want to NAT between two interfaces in different VRF's. 
Well, I did end up needing to and this article was very helpful.

ip vrf MyVRF
 exit

interface 
 (no switchport)           ! make routed port
 ip vrf forwarding MyVRF   ! associate interface with MyVRF
 ip address A.B.C.D M.M.M.M

interface 
 switchport
 switchport trunk encapsulation dot1q
 (switchport nonegotiate)
 switchport mode trunk

vlan 10
 name WAN-VLAN

interface Vlan10
 ip vrf forwarding MyVRF
 ip addr E.F.G.H M.M.M.M
 ip nat enable

! now the VRF-aware NAT config:
interface 
 ip nat enable

interface Vlan10
 ip nat enable

ip access-list standard LAN-to-NAT
 permit 

ip nat source list LAN-to-NAT interface Vlan10 vrf MyVRF overload

! finally the def. route
ip route vrf MyVRF 0.0.0.0 0.0.0.0 



No comments: