Table Of Contents
Restrictions for NAT Virtual Interface
Information About NAT Virtual Interface
NAT Virtual Interface Feature Design
How to Configure NAT Virtual Interface
Enabling a Dynamic NAT Virtual Interface
Enabling a Static NAT Virtual Interface
Configuration Examples for NAT Virtual Interface
Enabling NAT Virtual Interface: Example
NAT Virtual Interface
The NAT Virtual Interface (NVI) feature removes the requirement to configure an interface as either Network Address Translation (NAT) inside or NAT outside. An interface can be configured to use NAT or not use NAT.
NVI allows traffic between overlapped VPN routing/forwarding (VRFs) in the same Provider Edge (PE) router, and traffic from inside to inside between overlapping networks.
History for the NAT Virtual Interface Feature
Finding Support Information for Platforms and Cisco IOS Software Images
Use Cisco Feature Navigator to find information about platform support and Cisco IOS software image support. Access Cisco Feature Navigator at http://www.cisco.com/go/fn. You must have an account on Cisco.com. If you do not have an account or have forgotten your username or password, click Cancel at the login dialog box and follow the instructions that appear.
Contents
•
Restrictions for NAT Virtual Interface
•
Information About NAT Virtual Interface
•
How to Configure NAT Virtual Interface
•
Configuration Examples for NAT Virtual Interface
Restrictions for NAT Virtual Interface
•
Routemaps are not supported.
•
Stateful Network Address Translation (SNAT) is not supported.
Information About NAT Virtual Interface
Before you configure the NAT Virtual Interface feature, you should understand the following concepts:
•
NAT Virtual Interface Feature Design
NAT Virtual Interface Feature Design
The NAT Virtual Interface feature allows all NAT traffic flows on the virtual interface, eliminating the need to specify inside and outside domains. When a domain is specified, the translation rules are applied either before or after route decisions depending on the traffic flow from inside to outside or outside to inside. The translation rules are applied only after the route decision for an NVI.
When a NAT pool is shared for translating packets from multiple networks connected to a NAT router, an NVI is created and a static route is configured that forwards all packets addressed to the NAT pool to the NVI. The standard interfaces connected to various networks will be configured to identify that the traffic originating and receiving on the interfaces needs to be translated.
Note
NVI is not a new way of doing NAT; it's a new feature to resolve NAT restriction.
Figure 1 shows a typical NAT virtual interface configuration.
Figure 1 NAT Virtual Interface Typical Configuration
How to Configure NAT Virtual Interface
This section contains the following procedures:
•
Enabling a Dynamic NAT Virtual Interface
•
Enabling a Static NAT Virtual Interface
Enabling a Dynamic NAT Virtual Interface
Perform this task to enable a dynamic NAT virtual interface.
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
interface type number
4.
ip nat enable
5.
exit
6.
ip nat pool name start-ip end-ip netmask netmask add-route
7.
ip nat source list access-list- number pool name vrf name
8.
ip nat source list access-list- number pool name vrf name
DETAILED STEPS
Enabling a Static NAT Virtual Interface
Perform this task to enable a static NAT virtual interface.
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
interface type number
4.
ip nat enable
5.
exit
6.
ip nat source static local-ip global-ip vrf name
DETAILED STEPS
Configuration Examples for NAT Virtual Interface
This section provides the following configuration example:
•
Enabling NAT Virtual Interface: Example
Enabling NAT Virtual Interface: Example
The following example shows how to configure NAT virtual interfaces without the use of inside or outside source addresses.
interface Ethernet0/0ip vrf forwarding bankip address 192.168.122.1 255.255.255.0ip nat enable!interface Ethernet1/0ip vrf forwarding parkip address 192.168.122.2 255.255.255.0ip nat enable!interface Serial2/0ip vrf forwarding servicesip address 192.168.123.2 255.255.255.0ip nat enable!ip nat pool NAT 192.168.25.20 192.168.25.30 netmask 255.255.255.0 add-routeip nat source list 1 pool NAT vrf bank overloadip nat source list 1 pool NAT vrf park overloadip nat source static 192.168.123.1 192.168.125.10 vrf services!access-list 1 permit 192.168.122.20access-list 1 permit 192.168.122.0 0.0.0.255!Additional References
The following sections provide references related to the NAT Virtual Interface feature.
Related Documents
Related Topic Document TitleIP NAT commands: complete command syntax, command mode, command history, defaults, usage guidelines, and examples
Cisco IOS IP Command Reference, Volume 1 of 4: Addressing and Services, Release 12.3T
IP NAT configuration tasks
"Configuring Network Address Translation" section of Part 1 of the Cisco IOS IP Configuration Guide, Release 12.3
Standards
MIBs
RFCs
Technical Assistance
Command Reference
This section documents new and modified commands only.
•
ip nat enable
•
ip nat pool
•
ip nat source
ip nat enable
To configure an interface connecting VPNs and the Internet for Network Address Translation (NAT), use the ip nat enable command in interface configuration mode. To remove the interface configuration, use the no form of this command.
ip nat enable
no ip nat enable
Syntax Description
This command has no arguments or keywords.
Command Modes
Interface configuration
Command History
Examples
The following example show how to configure an interface connecting VPNs and the Internet for NAT translation:
interface Ethernet0/0ip vrf forwarding bankip address 192.168.122.1 255.255.255.0ip nat enableRelated Commands
ip nat pool
To define a pool of IP addresses for Network Address Translation (NAT), use the ip nat pool command in global configuration mode. To remove one or more addresses from the pool, use the no form of this command.
ip nat pool name start-ip end-ip {netmask netmask | prefix-length prefix-length} [add-route] [type {match-host | rotary}] [accounting list-name]
no ip nat pool name start-ip end-ip {netmask netmask | prefix-length prefix-length} [add-route] [type {match-host | rotary}] [accounting list-name]
Syntax Description
Defaults
No pool of addresses is defined.
Command Modes
Global configuration
Command History
Usage Guidelines
This command defines a pool of addresses using start address, end address, and either netmask or prefix length. The pool could define an inside global pool, an outside local pool, or a rotary pool.
Examples
The following example translates between inside hosts addressed from either the 192.168.1.0 or 192.168.2.0 network to the globally unique 171.69.233.208/28 network:
ip nat pool net-208 171.69.233.208 171.69.233.223 prefix-length 28ip nat inside source list 1 pool net-208!interface ethernet 0ip address 171.69.232.182 255.255.255.240ip nat outside!interface ethernet 1ip address 192.168.1.94 255.255.255.0ip nat inside!access-list 1 permit 192.168.1.0 0.0.0.255access-list 1 permit 192.168.2.0 0.0.0.255The following example shows that a route has been added to the NVI interface for the global address:
ip nat pool NAT 192.168.25.20 192.168.25.30 netmask 255.255.255.0 add-routeip nat source list 1 pool NAT vrf bank overloadRelated Commands
ip nat source
To enable Network Address Translation (NAT) on a virtual interface without inside or outside specification, use the ip nat source command in global configuration mode. To remove NAT on a virtual interface without inside or outside specification, use the no form of this command.
Dynamic NAT
ip nat source {list {access-list-number | access-list-name} interface type number | pool name} [overload | vrf name]
no ip nat source {list {access-list-number | access-list-name} interface type number | pool name} overload | vrf name]
Static NAT
ip nat source {static {esp local-ip interface type number | local-ip global-ip}} [extendable no-alias | no-payload | vrf name]
no ip nat source {static {esp local-ip interface type number | local-ip global-ip}} [extendable | no-alias | no-payload | vrf name]
Port Static NAT
ip nat source {static {tcp | udp {local-ip local-port global-ip global-port | interface global-port}} [extendable | no-alias | no-payload | vrf name]
no ip nat source {static {tcp | udp {local-ip local-port global-ip global-port | interface global-port}} [extendable | no-alias | no-payload | vrf name]
Network Static NAT
ip nat source static network local-network global-network mask [extendable | no-alias | no-payload | vrf name]
no ip nat source static network local-network global-network mask [extendable | no-alias | no-payload | vrf name]
Syntax Description
Command Modes
Global configuration
Command History
Examples
The following example shows how to configure a virtual interface without inside or outside specification for the global address:
ip nat source list 1 pool NAT vrf bank overloadip nat source list 1 pool NAT vrf park overloadip nat source static 192.168.123.1 192.168.125.10 vrf servicesRelated Commands
Command Descriptionip nat enable
Configures an interface connecting VPNs and the Internet for NAT translation.
ip nat pool
Defines a pool of IP addresses for Network Address Translation.
Copyright © 2005 Cisco Systems, Inc. All rights reserved.



