Cisco Nat Xe 16 Book
Cisco Nat Xe 16 Book
Cisco Nat Xe 16 Book
Americas Headquarters
Cisco Systems, Inc.
170 West Tasman Drive
San Jose, CA 95134-1706
USA
http://www.cisco.com
Tel: 408 526-4000
800 553-NETS (6387)
Fax: 408 527-0883
© 2022 Cisco Systems, Inc. All rights reserved.
CONTENTS
Short Description 2
Configuring the Same Global Address for Static NAT and PAT 18
Using NAT to Allow Internal Users Access to the Internet 19
Configuring Address Translation Timeouts 20
Changing the Translation Timeout 21
Changing the Timeouts When Overloading Is Configured 21
Allowing Overlapping Networks to Communicate Using NAT 23
Configuring Static Translation of Overlapping Networks 23
What to Do Next 25
Configuring Server TCP Load Balancing 25
Enabling Route Maps on Inside Interfaces 27
Enabling NAT Route Maps Outside-to-Inside Support 28
Configuring NAT of External IP Addresses Only 29
Configuring the NAT Default Inside Server Feature 31
Reenabling RTSP on a NAT Router 32
Configuring Support for Users with Static IP Addresses 32
Configuring the Rate Limiting NAT Translation Feature 34
Configuring Bypass NAT Functionality 36
Configuration Examples for Configuring NAT for IP Address Conservation 37
Example: Configuring Static Translation of Inside Source Addresses 37
Example: Configuring Dynamic Translation of Inside Source Addresses 38
Example: Using NAT to Allow Internal Users Access to the Internet 38
Example: Allowing Overlapping Networks to Communicate Using NAT 39
Example: Configuring Static Translation of Overlapping Networks 39
Example: Configuring Dynamic Translation of Overlapping Networks 39
Example: Configuring Server TCP Load Balancing 39
Example: Enabling Route Maps on Inside Interfaces 40
Example: Enabling NAT Route Maps Outside-to-Inside Support 40
Example: Configuring NAT of External IP Addresses Only 40
Example: Configuring Support for Users with Static IP Addresses 40
Example: Configuring NAT Static IP Support 40
Example: Creating a RADIUS Profile for NAT Static IP Support 40
Example: Configuring the Rate Limiting NAT Translation Feature 41
Where to Go Next 56
Additional References for Using Application-Level Gateways with NAT 56
Feature Information for Using Application-Level Gateways with NAT 57
CHAPTER 8 Interchassis Asymmetric Routing Support for Zone-Based Firewall and NAT 109
Restrictions for Interchassis Asymmetric Routing Support for Zone-Based Firewall and NAT 109
Information About Interchassis Asymmetric Routing Support for Zone-Based Firewall and NAT 110
Asymmetric Routing Overview 110
Asymmetric Routing Support in Firewalls 112
Asymmetric Routing in NAT 112
Asymmetric Routing in a WAN-LAN Topology 113
VRF-Aware Asymmetric Routing in Zone-Based Firewalls 113
VRF-Aware Asymmetric Routing in NAT 114
How to Configure Interchassis Asymmetric Routing Support for Zone-Based Firewall and NAT 114
Configuring a Redundancy Application Group and a Redundancy Group Protocol 114
Configuring Data, Control, and Asymmetric Routing Interfaces 116
Configuring a Redundant Interface Identifier and Asymmetric Routing on an Interface 118
Configuring Dynamic Inside Source Translation with Asymmetric Routing 119
Configuration Examples for Interchassis Asymmetric Routing Support for Zone-Based Firewall and
NAT 122
Example: Configuring a Redundancy Application Group and a Redundancy Group Protocol 122
Example: Configuring Data, Control, and Asymmetric Routing Interfaces 122
Example: Configuring a Redundant Interface Identifier and Asymmetric Routing on an Interface 123
Example: Configuring Dynamic Inside Source Translation with Asymmetric Routing 123
Example: Configuring VRF-Aware NAT for WAN-WAN Topology with Symmetric Routing
Box-to-Box Redundancy 123
Example: Configuring Asymmetric Routing with VRF 126
Additional References for Interchassis Asymmetric Routing Support for Zone-Based Firewall and
NAT 126
Feature Information for Interchassis Asymmetric Routing Support for Zone-Based Firewall and NAT 127
CHAPTER 9 VRF-Aware NAT for WAN-WAN Topology with Symmetric Routing Box-to-Box Redundancy 129
Finding Feature Information 129
Restrictions for VRF-Aware NAT for WAN-WAN Topology with Symmetric Routing Box-to-Box
Redundancy 130
Information About VRF-Aware NAT for WAN-WAN Topology with Symmetric Routing Box-to-Box
Redundancy 130
VRF-Aware Box-to-Box High Availability Support 130
Stateful Interchassis Redundancy Overview 131
Stateful Interchassis Redundancy Operation in NAT 131
How to Configure VRF-Aware NAT for WAN-WAN Topology with Symmetric Routing Box-to-Box
Redundancy 132
Configuration Examples for VRF-Aware NAT for WAN-WAN Topology with Symmetric Routing
Box-to-Box Redundancy 133
Example: Configuring VRF-Aware NAT for WAN-WAN Topology with Symmetric Routing
Box-to-Box Redundancy 133
Additional References for VRF-Aware NAT for WAN-WAN Topology with Symmetric Routing
Box-to-Box Redundancy 135
Feature Information for VRF-Aware NAT for WAN-WAN Topology with Symmetric Routing
Box-to-Box Redundancy 136
Glossary 179
Glossary 205
Feature Information for Disabling Flow Cache Entries in NAT and NAT64 245
Prerequisites for MSRPC ALG Support for Firewall and NAT 263
Restrictions for MSRPC ALG Support for Firewall and NAT 263
Information About MSRPC ALG Support for Firewall and NAT 264
Application-Level Gateways 264
MSRPC 264
MSRPC ALG on Firewall 264
MSRPC ALG on NAT 265
MSRPC Stateful Parser 265
How to Configure MSRPC ALG Support for Firewall and NAT 266
Configuring a Layer 4 MSRPC Class Map and Policy Map 266
Configuring a Zone Pair and Attaching an MSRPC Policy Map 267
Enabling vTCP Support for MSRPC ALG 269
Disabling vTCP Support for MSRPC ALG 270
Configuration Examples for MSRPC ALG Support for Firewall and NAT 270
Example: Configuring a Layer 4 MSRPC Class Map and Policy Map 270
Example: Configuring a Zone Pair and Attaching an MSRPC Policy Map 271
Example: Enabling vTCP Support for MSRPC ALG 271
Example: Disabling vTCP Support for MSRPC ALG 271
Feature Information for MSRPC ALG Support for Firewall and NAT 272
CHAPTER 21 Sun RPC ALG Support for Firewalls and NAT 273
Restrictions for Sun RPC ALG Support for Firewalls and NAT 273
Information About Sun RPC ALG Support for Firewalls and NAT 273
Application-Level Gateways 273
Sun RPC 274
How to Configure Sun RPC ALG Support for Firewalls and NAT 274
Configuring the Firewall for the Sun RPC ALG 275
Configuring a Layer 4 Class Map for a Firewall Policy 275
Configuring a Layer 7 Class Map for a Firewall Policy 276
Configuring a Sun RPC Firewall Policy Map 277
Attaching a Layer 7 Policy Map to a Layer 4 Policy Map 278
Creating Security Zones and Zone Pairs and Attaching a Policy Map to a Zone Pair 279
Configuration Examples for Sun RPC ALG Support for Firewall and NAT 282
Example: Configuring a Layer 4 Class Map for a Firewall Policy 282
Example: Configuring a Layer 7 Class Map for a Firewall Policy 282
Example: Configuring a Sun RPC Firewall Policy Map 282
Example: Attaching a Layer 7 Policy Map to a Layer 4 Policy Map 282
Example: Creating Security Zones and Zone Pairs and Attaching a Policy Map to a Zone Pair 282
Example: Configuring the Firewall for the Sun RPC ALG 283
Additional References for Sun RPC ALG Support for Firewall and NAT 284
Feature Information for Sun RPC ALG Support for Firewalls and NAT 285
CHAPTER 23 ALG—H.323 vTCP with High Availability Support for Firewall and NAT 295
Restrictions for ALG—H.323 vTCP with High Availability Support for Firewall and NAT 295
Information About ALG—H.323 vTCP with High Availability Support for Firewall and NAT 296
Application-Level Gateways 296
Basic H.323 ALG Support 296
Overview of vTCP for ALG Support 297
vTCP with NAT and Firewall ALGs 297
Overview of ALG—H.323 vTCP with High Availability Support 297
How to Configure ALG—H.323 vTCP with High Availability Support for Firewall and NAT 298
Configuring ALG-H.323 vTCP with High Availability Support for NAT 298
Configuration Examples for ALG—H.323 vTCP with High Availability Support for Firewall and
NAT 300
Example: Configuring ALG-H.323 vTCP with High Availability Support for NAT 300
Additional References for ALG-H.323 vTCP with High Availability Support for Firewall and NAT 301
Feature Information for ALG—H.323 vTCP with High Availability Support for Firewall and NAT 302
Restrictions for SIP ALG Hardening for NAT and Firewall 303
Information About SIP ALG Hardening for NAT and Firewall 304
SIP Overview 304
Application-Level Gateways 304
SIP ALG Local Database Management 304
SIP ALG Via Header Support 305
SIP ALG Method Logging Support 305
SIP ALG PRACK Call-Flow Support 305
SIP ALG Record-Route Header Support 306
How to Configure SIP ALG Hardening for NAT and Firewall 306
Enabling NAT for SIP Support 306
Enabling SIP Inspection 307
Configuring a Zone Pair and Attaching a SIP Policy Map 308
Configuration Examples for SIP ALG Hardening for NAT and Firewall 310
Example: Enabling NAT for SIP Support 310
Example: Enabling SIP Inspection 311
Example: Configuring a Zone Pair and Attaching a SIP Policy Map 311
Additional References for SIP ALG Hardening for NAT and Firewall 311
Feature Information for SIP ALG Hardening for NAT and Firewall 312
Note For CUBE feature support information in Cisco IOS XE Bengaluru 17.6.1a and later releases, see Cisco
Unified Border Element IOS-XE Configuration Guide.
Note The documentation set for this product strives to use bias-free language. For purposes of this
documentation set, bias-free is defined as language that does not imply discrimination based on age,
disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and
intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in
the user interfaces of the product software, language used based on standards documentation, or language
that is used by a referenced third-party product.
Feature Information
Use Cisco Feature Navigator to find information about feature support, platform support, and Cisco software
image support. An account on Cisco.com is not required.
Related References
• Cisco IOS Command References, All Releases
Short Description
The documentation set for this product strives to use bias-free language. For purposes of this documentation
set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial
identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be
present in the documentation due to language that is hardcoded in the user interfaces of the product software,
language used based on standards documentation, or language that is used by a referenced third-party product.
Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and
other countries. To view a list of Cisco trademarks, go to this URL: https://www.cisco.com/c/en/us/about/
legal/trademarks.html. Third-party trademarks mentioned are the property of their respective owners. The use
of the word partner does not imply a partnership relationship between Cisco and any other company. (1721R)
Note If you specify an access list with a NAT command, NAT will not support the permit ip any any
command. This command is commonly used in an access list.
NAT Requirements
Before configuring NAT in your network, ensure that you know the interfaces on which NAT is configured
and for what purposes. The following requirements help you decide how to configure and use NAT:
• Define the NAT inside and outside interfaces if:
• Users exist off multiple interfaces.
• Multiple interfaces connect to the internet.
From Cisco IOS XE Denali 16.3 release, NAT support is introduced on Bridge Domain Interface (BDI) for
enabling NAT configuration on the BDI interface.
• In a NAT configuration, addresses configured for any inside mapping must not be configured for any
outside mapping.
• Do not configure the interface IP address as part of the IP address NAT pool.
• By default, support for the Session Initiation Protocol (SIP) is enabled on port 5060. Therefore,
NAT-enabled devices interpret all packets on this port as SIP call messages. If other applications in the
system use port 5060 to send packets, the NAT service may corrupt the packet. This packet corruption
is due to its attempt to interpret the packet as a SIP call message.
• NAT hides the identity of hosts, which may be an advantage or a disadvantage depending on the needed
result.
• Devices that are configured with NAT must not advertise the local networks to outside the network.
However, routing information that NAT receives from the outside can be advertised in the stub domain
as usual.
• NAT outside interface is not supported on a VRF. However, NAT outside interface is supported in iWAN
and is part of the Cisco Validated Design.
• For VRF-aware NAT, remove the NAT configuration before you remove the VRF configuration.
• If you specify an access list to use with a NAT command, NAT does not support the permit ip any any
command. This NAT command is commonly used in the access list.
• This platform does not support an access list with a port range.
• NAT configuration is not supported on the access side of the Intelligent Services Gateway (ISG).
• Using any IP address that is configured of a device as an address pool or in a NAT static rule is not
supported. NAT can share the physical interface address (not any other IP address) of a device only by
using the NAT interface overload configuration. A device uses the ports of its physical interface and
NAT must receive communication about the ports that it can safely use for translation. This communication
happens only when the NAT interface overload is configured.
• The output of the show ip nat statistics command displays information about all IP address pools and
NAT mappings that you have configured. If your NAT configuration has a high number of IP address
pools and NAT mappings, the update rate of the pool and mapping statistics in show ip nat statistics is
slow. For example, NAT configuration output with 1000 to 4000 NAT mappings.
• Static and dynamic NAT with generic routing encapsulation (generic GRE) and dynamic NAT with
Layer 2 do not work when used along with hardware-based Cisco AppNav appliances such as, Wide
Area Application Services (WAAS). In the context of WAAS, generic GRE is an out of path deployment
mechanism. It helps to return packets from the WAAS Wide-Area Application Engine (WAE) through
the GRE tunnel to the same device from which they were originally redirected after completing
optimization.
• Port Address Translation (also called NAT overload) only supports protocols whose port numbers are
known; these protocols are Internet Control Message Protocol (ICMP), TCP, and UDP. Other protocols
do not work with PAT because they consume the entire address in an address pool. Configure your access
control list to only permit ICMP, TCP, and UDP protocols, so that all other protocol traffic is prevented
from entering the network.
• NAT, Zone-Based Policy Firewall, and Web Cache Communication Protocol (WCCP) cannot coexist
in a network.
• Non-Pattable traffic, is traffic for a protocol where there are no ports. PAT/Overload can only be done
on protocols where the ports are known, that is, UDP, TCP, and ICMP.
When NAT overload (PAT) is configured and Non-Pattable traffic hits the router, Non-Pattable BIND
entry gets created for this traffic. Following is a bind entry in the NAT table:
--- 213.252.7.132 172.16.254.242 ---
This bind entry consumes an entire address from the pool. In this example, 213.252.7.132 is an address
from an overloaded pool.
That means an inside local IP Address gets bound to the outside global IP which is similar to static NAT.
Because of this binding action, new inside local IP Addresses cannot use this global IP Address until the
current entry gets timed out. All the translation that is created off this BIND is 1-to-1 translations instead
of overload.
To avoid consumption of an entire address from the pool, make sure that there are not any entries for the
Non-Pattable traffic across the router.
• When configuring NAT with ACLs or route maps, the ACLs or route maps must not overlap. If the ACLs
or route maps overlap, NAT cannot map to the required transition.
address space. NAT also allows a graceful renumbering strategy for organizations that are changing service
providers or voluntarily renumbering into classless interdomain routing (CIDR) blocks. NAT is described in
RFC 1631.
Uses of NAT
NAT can be used for the following scenarios:
• Connect to the internet when all your hosts do not have globally unique IP addresses. Network Address
Translation (NAT) enables private IP networks that use nonregistered IP addresses to connect to the
Internet. NAT is configured on a device at the border of a stub domain (mentioned as the inside network)
and a public network such as the Internet (mentioned as the outside network). NAT translates internal
local addresses to globally unique IP addresses before sending packets to the outside network. As a
solution to the connectivity problem, NAT is practical only when relatively few hosts in a stub domain
communicate simultaneously outside the domain. When outside communication is necessary, only a
small subset of the IP addresses in the domain must be translated into globally unique IP addresses. Also,
these addresses can be reused when they are no longer in use.
• Change your internal addresses. Instead of changing the internal addresses, which can be a considerable
amount of work, you can translate them by using NAT.
• For basic load-sharing of TCP traffic. You can map a single global IP address with many local IP addresses
by using the TCP Load Distribution feature.
Types of NAT
NAT operates on a router—generally connecting only two networks. Before any packets are forwarded to
another network, NAT translates the private (inside local) addresses within the internal network into public
(inside global) addresses. This functionality gives you the option to configure NAT so that it advertises only
a single address for your entire network to the outside world. Doing this translation, NAT effectively hides
the internal network from the world, giving you some additional security.
The types of NAT include:
• Static address translation (static NAT)—Allows one-to-one mapping between local and global addresses.
• Dynamic address translation (dynamic NAT)—Maps unregistered IP addresses to registered IP addresses
from a pool of registered IP addresses.
• Overloading—Maps multiple unregistered IP addresses to a single registered IP address (many to one)
by using different ports. This method is also known as Port Address Translation (PAT). Thousands of
users can be connected to the Internet by using only one real global IP address through overloading.
VRF X Global VRF (also referred to as a When NAT is not configured for
non-VRF interface) Match-in-VRF support. For more
details, see the Match-in-VRF
Support for NAT chapter.
• Static translation establishes a one-to-one mapping between the inside local address and an inside global
address. Static translation is useful when a host on the inside must be accessible by a fixed address from
the outside.
• Dynamic translation establishes a mapping between an inside local address and a pool of global addresses.
The following figure illustrates a device that is translating a source address inside a network to a source address
outside the network.
Figure 1: NAT Inside Source Translation
The following process describes the inside source address translation, as shown in the preceding figure:
1. The user at host 10.1.1.1 opens a connection to Host B in the outside network.
2. The first packet that the device receives from host 10.1.1.1 causes the device to check its Network Address
Translation (NAT) table. Based on the NAT configuration, the following scenarios are possible:
• If a static translation entry is configured, the device goes to Step 3.
• If no translation entry exists, the device determines that the source address (SA) 10.1.1.1 must be
translated dynamically. The device selects a legal, global address from the dynamic address pool,
and creates a translation entry in the NAT table. This kind of translation entry is called a simple entry.
3. The device replaces the inside local source address of host 10.1.1.1 with the global address of the translation
entry and forwards the packet.
4. Host B receives the packet and responds to host 10.1.1.1 by using the inside global IP destination address
(DA) 203.0.113.2.
5. When the device receives the packet with the inside global IP address, it performs a NAT table lookup
by using the inside global address as a key. It then translates the address to the inside local address of host
10.1.1.1 and forwards the packet to host 10.1.1.1.
Host 10.1.1.1 receives the packet and continues the conversation. The device performs Steps 2 to 5 for each
packet that it receives.
The device performs the following process in the overloading of inside global addresses, as shown in the
preceding figure. Both Host B and Host C believe that they are communicating with a single host at address
203.0.113.2. Whereas, they are actually communicating with different hosts; the port number is the
differentiator. In fact, many inside hosts can share the inside global IP address by using many port numbers.
1. The user at host 10.1.1.1 opens a connection to Host B.
2. The first packet that the device receives from host 10.1.1.1 causes the device to check its NAT table.
Based on your NAT configuration the following scenarios are possible:
• If no translation entry exists, the device determines that IP address 10.1.1.1 must be translated, and
translates inside local address 10.1.1.1 to a legal global address.
• If overloading is enabled and another translation is active, the device reuses the global address from
that translation and saves enough information. This saved information can be used to translate the
global address back, as an entry in the NAT table. This type of translation entry is called an extended
entry.
3. The device replaces inside local source address 10.1.1.1 with the selected global address and forwards
the packet.
4. Host B receives the packet and responds to host 10.1.1.1 by using the inside global IP address 203.0.113.2.
5. When the device receives the packet with the inside global IP address, it performs a NAT table lookup
by using a protocol, the inside global address and port, and the outside address and port as keys. It translates
the address to the inside local address 10.1.1.1 and forwards the packet to host 10.1.1.1.
Host 10.1.1.1 receives the packet and continues the conversation. The device performs Steps 2 to 5 for each
packet it receives.
The device examines every DNS reply to ensure that the IP address is not in a stub network. If it is, the device
translates the address as described in the following steps:
1. Host 10.1.1.1 opens a connection to 172.16.0.3.
2. The device sets up the translation mapping of the inside local and global addresses to each other. It also
sets up the translation mapping of the outside global and local addresses to each other.
3. The device replaces the SA with the inside global address and replaces the DA with the outside global
address.
4. Host C receives the packet and continues the conversation.
5. The device does a lookup, replaces the DA with the inside local address, and replaces the SA with the
outside local address.
6. Host 10.1.1.1 receives the packet and the conversation continues using this translation process.
2. The device receives the connection request and creates a new translation, allocating the next real host
(10.1.1.1) for the inside local IP address.
3. The device replaces the destination address with the selected real host address and forwards the packet.
4. Host 10.1.1.1 receives the packet and responds.
5. The device receives the packet and performs a NAT table lookup by using the inside local address and
port number. It also does a NAT table lookup by using the outside address and port number as keys. The
device then translates the source address to the address of the virtual host and forwards the packet.
6. The device will allocate IP address 10.1.1.2 as the inside local address for the next connection request.
RADIUS
RADIUS is a distributed client/server system that secures networks against unauthorized access. Communication
between a network access server (NAS) and a RADIUS server is based on UDP. Generally, the RADIUS
protocol is considered a connectionless service. RADIUS-enabled devices handle issues that are related to a
server availability, retransmission, and timeouts rather than the transmission protocol.
The RADIUS client is typically a NAS, and the RADIUS server is usually a daemon process running on a
UNIX or Windows NT machine. The client passes user information to designated RADIUS servers and acts
on the response that is returned. To deliver service to the user, RADIUS servers receive a user connection
request, authenticate the user, and then return the configuration information necessary for the client. A RADIUS
server can act as a proxy client to other RADIUS servers or other kinds of authentication servers.
Denial-of-Service Attacks
A denial-of-service (DoS) attack typically involves misuse of standard protocols or connection processes.
The intent of DoS attack is to overload and disable a target, such as a device or web server. DoS attacks can
come from a malicious user or from a computer that is infected with a virus or worm. Distributed DoS attack
is an attack that comes from many different sources at once. This attack can be when a virus or worm has
infected many computers. Such distributed DoS attacks can spread rapidly and involve thousands of systems.
target NAT, it may use NAT resources to propagate itself. The Rate Limiting NAT Translation feature can
be used to limit the impact of viruses and worms. These viruses and worms originate from specific hosts,
access control lists, and VPN routing and forwarding (VRF) instances.
Note Configure different IP addresses for an interface on which NAT is configured and for inside addresses
that are configured by using the ip nat inside source static command.
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat inside source static local-ip global-ip
4. interface type number
5. ip address ip-address mask [secondary]
6. ip nat inside
7. exit
8. interface type number
9. ip address ip-address mask [secondary]
10. ip nat outside
11. end
DETAILED STEPS
Step 3 ip nat inside source static local-ip global-ip Establishes static translation between an inside local
address and an inside global address.
Example:
Device(config)# ip nat inside source static
10.10.10.1 172.16.131.1
Step 4 interface type number Specifies an interface and enters the interface configuration
mode.
Example:
Device(config)# interface ethernet 1
Step 5 ip address ip-address mask [secondary] Sets a primary IP address for an interface.
Example:
Device(config-if)# ip address 10.114.11.39
255.255.255.0
Step 6 ip nat inside Connects the interface to the inside network, which is
subject to NAT.
Example:
Device(config-if)# ip nat inside
Step 8 interface type number Specifies a different interface and enters the interface
configuration mode.
Example:
Device(config)# interface gigabitethernet 0/0/0
Step 9 ip address ip-address mask [secondary] Sets a primary IP address for an interface.
Example:
Device(config-if)# ip address 172.31.232.182
255.255.255.240
Note When inside global or outside local addresses belong to a directly connected subnet on a NAT device,
the device adds IP aliases for them. This action enables it to answer Address Resolution Protocol (ARP)
requests. However, a situation can arise where the device answers packets that are not destined for it,
possibly causing a security issue. This security issue can happen when an incoming Internet Control
Message Protocol (ICMP) packet or a UDP packet that is destined for one of the aliased addresses does
not have a corresponding NAT translation in the NAT table. Also, the device itself runs a corresponding
service, for example, Network Time Protocol (NTP). Such a situation can cause minor security risks.
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat pool name start-ip end-ip {netmask netmask | prefix-length prefix-length}
4. access-list access-list-number permit source [source-wildcard]
5. ip nat inside source list access-list-number pool name
6. interface type number
7. ip address ip-address mask
8. ip nat inside
9. exit
10. interface type number
11. ip address ip-address mask
12. ip nat outside
13. end
DETAILED STEPS
Step 3 ip nat pool name start-ip end-ip {netmask netmask | Defines a pool of global addresses to be allocated as
prefix-length prefix-length} needed.
Example:
Step 4 access-list access-list-number permit source Defines a standard access list permitting those addresses
[source-wildcard] that are to be translated.
Example:
Device(config)# access-list 1 permit 192.168.34.0
0.0.0.255
Step 5 ip nat inside source list access-list-number pool name Establishes dynamic source translation, specifying the
access list defined in Step 4.
Example:
Device(config)# ip nat inside source list 1 pool
net-208
Step 6 interface type number Specifies an interface and enters an interface configuration
mode.
Example:
Device(config)# interface ethernet 1
Step 7 ip address ip-address mask Sets a primary IP address for the interface.
Example:
Device(config-if)# ip address 10.114.11.39
255.255.255.0
Step 8 ip nat inside Connects the interface to the inside network, which is
subject to NAT.
Example:
Device(config-if)# ip nat inside
Step 10 interface type number Specifies an interface and enters an interface configuration
mode.
Example:
Device(config)# interface ethernet 0
Step 11 ip address ip-address mask Sets a primary IP address for the interface.
Example:
Device(config-if)# ip address 172.16.232.182
255.255.255.240
Configuring the Same Global Address for Static NAT and PAT
You can configure the same global address for the static NAT and PAT. Static translation is useful when a
host on the inside must be accessible by a fixed address from the outside.
Note This is not supported with ip nat inside source static configuration.
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat outside source static outside global-ip outside local-ip
4. ip nat outside source static {tcp | udp} outside global-ip global-port outside local-ip local-port
extendable
5. end
DETAILED STEPS
Step 3 ip nat outside source static outside global-ip outside Establishes static translation between an outside local
local-ip address and an outside global address.
Example:
Device(config)# ip nat outside source static
10.21.0.202 12.182.174.202
Step 4 ip nat outside source static {tcp | udp} outside global-ip • Establishes static translation between an outside global
global-port outside local-ip local-port extendable address and inside local address.
Example:
Router(config)# ip nat outside source static tcp
10.21.14.49 22512 12.182.174.202 5009 extendable
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat pool name start-ip end-ip {netmask netmask | prefix-length prefix-length}
4. access-list access-list-number permit source [source-wildcard]
5. ip nat inside source list access-list-number pool name overload
6. interface type number
7. ip address ip-address mask
8. ip nat inside
9. exit
10. interface type number
11. ip address ip-address mask
12. ip nat outside
13. end
DETAILED STEPS
Step 3 ip nat pool name start-ip end-ip {netmask netmask | Defines a pool of global addresses to be allocated as
prefix-length prefix-length} needed.
Example:
Device(config)# ip nat pool net-208
192.168.202.129 192.168.202.158 netmask
255.255.255.224
Step 4 access-list access-list-number permit source Defines a standard access list permitting those addresses
[source-wildcard] that are to be translated.
Example: • The access list must permit only those addresses that
Device(config)# access-list 1 permit are to be translated. (Remember that there is an
192.168.201.30 0.0.0.255 implicit “deny all” at the end of each access list.) Use
of an access list that is too permissive can lead to
unpredictable results.
Step 6 interface type number Specifies an interface and enters the interface configuration
mode.
Example:
Device(config)# interface ethernet 1
Step 7 ip address ip-address mask Sets a primary IP address for the interface.
Example:
Device(config-if)# ip address 192.168.201.1
255.255.255.240
Step 8 ip nat inside Connects the interface to the inside network, which is
subject to NAT.
Example:
Device(config-if)# ip nat inside
Step 10 interface type number Specifies an interface and enters the interface configuration
mode.
Example:
Device(config)# interface ethernet 0
Step 11 ip address ip-address mask Sets a primary IP address for the interface.
Example:
Device(config-if)# ip address 192.168.201.29
255.255.255.240
By default, dynamic address translations time out after a period of remaining idle. You can change the default
values on timeouts, if necessary. When overloading is not configured, simple translation entries time out after
24 hours. Use the ip nat translation timeout command to change the timeout value for dynamic address
translations.
You can use the ip nat translation max-entries command to change the default global NAT translation limit.
Note On Catalyst 6500 Series Switches, when the NAT translation is done in the hardware, timers are reset
every 100 seconds or once the set timeout value is reached.
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat translation seconds
4. ip nat translation udp-timeout seconds
5. ip nat translation dns-timeout seconds
6. ip nat translation tcp-timeout seconds
7. ip nat translation finrst-timeout seconds
8. ip nat translation icmp-timeout seconds
9. ip nat translation syn-timeout seconds
10. end
DETAILED STEPS
Step 3 ip nat translation seconds (Optional) Changes the amount of time after which NAT
translations time out.
Example:
Device(config)# ip nat translation 300 • The default timeout is 24 hours, and it applies to the
aging time for half-entries.
• The timeout configured using this command overrides
the default TCP and UDP timeout values, unless
explicitly configured.
Step 4 ip nat translation udp-timeout seconds (Optional) Changes the UDP timeout value.
Example: • The default is 300 seconds. This default value only
Device(config)# ip nat translation udp-timeout applies if the general IP NAT translation timeout
300 value (using the ip nat translation seconds
command) is not configured.
Step 5 ip nat translation dns-timeout seconds (Optional) Changes the Domain Name System (DNS)
timeout value.
Example:
Device(config)# ip nat translation dns-timeout 45
Step 6 ip nat translation tcp-timeout seconds (Optional) Changes the TCP timeout value.
Example: • The default is 7440 seconds. This default value only
Device(config)# ip nat translation tcp-timeout applies if the general IP NAT translation timeout
2500 value (using the ip nat translation seconds
command) is not configured.
Step 7 ip nat translation finrst-timeout seconds (Optional) Changes the finish and reset timeout value.
Example: • finrst-timeout—The aging time after a TCP session
Device(config)# ip nat translation finrst-timeout receives both finish-in (FIN-IN) and finish-out
45 (FIN-OUT) requests or after the reset of a TCP
session.
Step 8 ip nat translation icmp-timeout seconds (Optional) Changes the ICMP timeout value.
Example:
Device(config)# ip nat translation icmp-timeout
45
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat inside source static local-ip global-ip
4. interface type number
5. ip address ip-address mask
6. ip nat inside
7. exit
8. interface type number
9. ip address ip-address mask
10. ip nat outside
11. end
DETAILED STEPS
Step 3 ip nat inside source static local-ip global-ip Establishes static translation between an inside local
address and an inside global address.
Example:
Device(config)# ip nat inside source static
192.168.121.33 10.2.2.1
Step 4 interface type number Specifies an interface and enters the interface configuration
mode.
Example:
Device(config)# interface ethernet 1
Step 5 ip address ip-address mask Sets a primary IP address for the interface.
Example:
Device(config-if)# ip address 10.114.11.39
255.255.255.0
Step 8 interface type number Specifies an interface and enters the interface configuration
mode.
Example:
Device(config)# interface ethernet 0
Step 9 ip address ip-address mask Sets a primary IP address for the interface.
Example:
Device(config-if)# ip address 172.16.232.182
255.255.255.240
What to Do Next
When you have completed the required configuration, go to the “Monitoring and Maintaining NAT” module.
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat pool name start-ip end-ip {netmask netmask | prefix-length prefix-length} type rotary
4. access-list access-list-number permit source [source-wildcard]
5. ip nat inside destination-list access-list-number pool name
6. interface type number
7. ip address ip-address mask
8. ip nat inside
9. exit
10. interface type number
11. ip address ip-address mask
12. ip nat outside
13. end
DETAILED STEPS
Step 3 ip nat pool name start-ip end-ip {netmask netmask | Defines a pool of addresses containing the addresses of
prefix-length prefix-length} type rotary the real hosts.
Example:
Step 4 access-list access-list-number permit source Defines an access list permitting the address of the virtual
[source-wildcard] host.
Example:
Device(config)# access-list 1 permit
192.168.201.30 0.0.0.255
Step 5 ip nat inside destination-list access-list-number pool Establishes dynamic inside destination translation,
name specifying the access list defined in the prior step.
Example:
Device(config)# ip nat inside destination-list 2
pool real-hosts
Step 6 interface type number Specifies an interface and enters the interface configuration
mode.
Example:
Device(config)# interface ethernet 0
Step 7 ip address ip-address mask Sets a primary IP address for the interface.
Example:
Device(config-if)# ip address 192.168.201.1
255.255.255.240
Step 10 interface type number Specifies a different interface and enters the interface
configuration mode.
Example:
Device(config)# interface serial 0
Step 11 ip address ip-address mask Sets a primary IP address for the interface.
Example:
Device(config-if)# ip address 192.168.15.129
255.255.255.240
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat inside source {list {access-list-number | access-list-name} pool pool-name [overload]| static
local-ip global-ip [route-map map-name]}
4. exit
5. show ip nat translations [verbose]
DETAILED STEPS
Step 3 ip nat inside source {list {access-list-number | Enables route mapping with static NAT configured on the
access-list-name} pool pool-name [overload]| static NAT inside interface.
local-ip global-ip [route-map map-name]}
Example:
Device(config)# ip nat inside source static
192.168.201.6 192.168.201.21 route-map isp2
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat pool name start-ip end-ip netmask netmask
4. ip nat pool name start-ip end-ip netmask netmask
5. ip nat inside source route-map name pool name [reversible]
6. ip nat inside source route-map name pool name [reversible]
7. end
DETAILED STEPS
Step 3 ip nat pool name start-ip end-ip netmask netmask Defines a pool of network addresses for NAT.
Example:
Device(config)# ip nat pool POOL-A 192.168.201.4
192.168.201.6 netmask 255.255.255.128
Step 4 ip nat pool name start-ip end-ip netmask netmask Defines a pool of network addresses for NAT.
Example:
Device(config)# ip nat pool POOL-B 192.168.201.7
192.168.201.9 netmask 255.255.255.128
Step 5 ip nat inside source route-map name pool name Enables outside-to-inside initiated sessions to use route
[reversible] maps for destination-based NAT.
Example:
Device(config)# ip nat inside source route-map
MAP-A pool POOL-A reversible
Step 6 ip nat inside source route-map name pool name Enables outside-to-inside initiated sessions to use route
[reversible] maps for destination-based NAT.
Example:
Device(config)# ip nat inside source route-map
MAP-B pool POOL-B reversible
Note When you configure the ip nat outside source static command to add static routes for outside local
addresses, there is a delay in the translation of packets and packets are dropped. Packets are dropped
because a shortcut is not created for the initial synchronization (SYN) packet when NAT is configured
for static translation. To avoid dropped packets, configure either the ip nat outside source static
add-route command or the ip route command.
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat inside source {list {access-list-number | access-list-name} pool pool-name [overload] | static
network local-ip global-ip [no-payload]}
4. ip nat inside source {list {access-list-number | access-list-name} pool pool-name [overload] | static
{tcp | udp} local-ip local-port global-ip global-port [no-payload]}
5. ip nat inside source {list {access-list-number | access-list-name} pool pool-name [overload] | static
[network] local-network-mask global-network-mask [no-payload]}
6. ip nat outside source {list {access-list-number | access-list-name} pool pool-name | static local-ip
global-ip [no-payload]}
7. ip nat outside source {list {access-list-number | access-list-name} pool pool-name | static {tcp | udp}
local-ip local-port global-ip global-port [no-payload]}
8. ip nat outside source {list {access-list-number | access-list-name} pool pool-name | static [network]
local-network-mask global-network-mask [no-payload]}
9. exit
DETAILED STEPS
Step 3 ip nat inside source {list {access-list-number | Disables the network packet translation on the inside host
access-list-name} pool pool-name [overload] | static device.
network local-ip global-ip [no-payload]}
Example:
Device(config)# ip nat inside source static
network 10.1.1.1 192.168.251.0/24 no-payload
Step 4 ip nat inside source {list {access-list-number | Disables port packet translation on the inside host device.
access-list-name} pool pool-name [overload] | static {tcp
| udp} local-ip local-port global-ip global-port
[no-payload]}
Example:
Device(config)# ip nat inside source static tcp
10.1.1.1 2000 192.168.1.1 2000 no-payload
Step 5 ip nat inside source {list {access-list-number | Disables packet translation on the inside host device.
access-list-name} pool pool-name [overload] | static
[network] local-network-mask global-network-mask
[no-payload]}
Example:
Device(config)# ip nat inside source static
10.1.1.1 192.168.1.1 no-payload
Step 6 ip nat outside source {list {access-list-number | Disables packet translation on the outside host device.
access-list-name} pool pool-name | static local-ip
global-ip [no-payload]}
Example:
Device(config)# ip nat outside source static
10.1.1.1 192.168.1.1 no-payload
Step 7 ip nat outside source {list {access-list-number | Disables port packet translation on the outside host device.
access-list-name} pool pool-name | static {tcp | udp}
local-ip local-port global-ip global-port [no-payload]}
Example:
Step 8 ip nat outside source {list {access-list-number | Disables network packet translation on the outside host
access-list-name} pool pool-name | static [network] device.
local-network-mask global-network-mask [no-payload]}
Example:
Device(config)# ip nat outside source static
network 10.1.1.1 192.168.251.0/24 no-payload
Note • You can use this feature to configure gaming devices with an IP address different from the IP
address of the PC. To avoid unwanted traffic or DoS attacks, use access lists.
• For traffic going from the PC to the outside, it is better to use a route map so that extended entries
are created.
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat inside source static local-ip interface type number
4. ip nat inside source static tcp local-ip local-port interface global-port
5. exit
6. show ip nat translations [verbose]
DETAILED STEPS
Step 3 ip nat inside source static local-ip interface type number Enables static NAT on the interface.
Example:
Device(config)# ip nat inside source static
10.1.1.1 interface Ethernet 1/1
Step 4 ip nat inside source static tcp local-ip local-port interface (Optional) Enables the use of telnet to the device from the
global-port outside.
Example:
Device(config)# ip nat inside source static tcp
10.1.1.1 23 interface 23
SUMMARY STEPS
1. enable
2. configure terminal
3. interface type number
4. ip nat inside
5. exit
6. ip nat allow-static-host
7. ip nat pool name start-ip end-ip netmask netmask accounting list-name
8. ip nat inside source list access-list-number pool name
9. access-list access-list-number deny ip source
10. end
11. show ip nat translations verbose
DETAILED STEPS
Step 8 ip nat inside source list access-list-number pool name Specifies the access list and pool to be used for static IP
support.
Example:
Device(config)# ip nat inside source list 1 pool • The specified access list must permit all traffic.
net-208
Step 9 access-list access-list-number deny ip source Removes the traffic of the device from NAT.
Example: • The source argument is the IP address of the device
Device(config)# access-list 1 deny ip that supports the NAT Static IP Support feature.
192.168.196.51
Step 11 show ip nat translations verbose (Optional) Displays active NAT translations and additional
information for each translation table entry, including how
Example:
long ago the entry was created and used.
Device# show ip nat translations verbose
Examples
The following is sample output from the show ip nat translations verbose command:
Device# show ip nat translations verbose
DETAILED STEPS
Step 4 ip nat translation max-entries {number | all-vrf number Configures the maximum number of NAT entries that are
| host ip-address number | list listname number | vrf name allowed from the specified source.
number}
• The maximum number of allowed NAT entries is
Example: 2147483647, although a typical range for a NAT rate
Device(config)# ip nat translation max-entries 300 limit is 100 to 300 entries.
• When you configure a NAT rate limit for all VRF
instances, each VRF instance is limited to the
maximum number of NAT entries that you specify.
• When you configure a NAT rate limit for a specific
VRF instance, you can specify a maximum number of
NAT entries for the named VRF instance that is greater
than or less than that allowed for all VRF instances.
Step 6 show ip nat statistics (Optional) Displays current NAT usage information,
including NAT rate limit settings.
Example:
Device# show ip nat statistics • After setting a NAT rate limit, use the show ip nat
statistics command to verify the current NAT rate
limit settings.
You can enable the Bypass NAT functionality by creating new NAT mapping with new ACL mapped to a
bypass pool.
To configure the bypass-pool with 127.0.0.1 as reserved loopback address:
enable
configure terminal
access-list 60 permit 25.33.0.0 0.0.255.255
ip nat pool bypass-pool 127.0.0.1 127.0.0.1 prefix-length 24
ip nat inside source list 60 pool bypass-pool
end
The following example shows NAT configured on the provider edge (PE) device with a static route to the
shared service for the vrf1 and vrf2 VPNs. NAT is configured as inside source static one-to-one translation.
The following example shows how only traffic local to the provider edge (PE) device running NAT is translated:
ip nat inside source list 1 interface gigabitethernet 0/0/0 vrf vrf1 overload
ip nat inside source list 1 interface gigabitethernet 0/0/0 vrf vrf2 overload
!
ip route vrf vrf1 0.0.0.0 0.0.0.0 192.168.1.1
ip route vrf vrf2 0.0.0.0 0.0.0.0 192.168.1.1
!
access-list 1 permit 10.1.1.1.0 0.0.0.255
!
ip nat inside source list 1 interface gigabitethernet 1/1/1 vrf vrf1 overload
ip nat inside source list 1 interface gigabitethernet 1/1/1 vrf vrf2 overload
!
ip route vrf vrf1 0.0.0.0 0.0.0.0 172.16.1.1 global
ip route vrf vrf2 0.0.0.0 0.0.0.0 172.16.1.1 global
access-list 1 permit 10.1.1.0 0.0.0.255
!
ip nat outside
!
aaa new-model
!
aaa group server radius WLAN-RADIUS
server 172.16.88.1 auth-port 1645 acct-port 1645
server 172.16.88.1 auth-port 1645 acct-port 1646
!
aaa accounting network WLAN-ACCT start-stop group WLAN-RADIUS
aaa session-id common
ip radius source-interface gigabitethernet3/0
radius-server host 172.31.88.1 auth-port 1645 acct-port 1646
radius-server key cisco
The following example shows how to limit the VRF instance named “vrf1” to 150 NAT entries:
ip nat translation max-entries vrf vrf1 150
The following example shows how to limit each VRF instance to 200 NAT entries:
ip nat translation max-entries all-vrf 200
The following example shows how to limit the VRF instance, “vrf2” to 225 NAT entries, but limit all other
VRF instances to 100 NAT entries each:
ip nat translation max-entries all-vrf 100
ip nat translation max-entries vrf vrf2 225
The following example shows how to limit the access control list named “vrf3” to 100 NAT entries:
ip nat translation max-entries list vrf3 100
The following example shows how to limit the host at IP address 10.0.0.1 to 300 NAT entries:
ip nat translation max-entries host 10.0.0.1 300
The following example shows how to limit the VRF instance, “vrf2” to 225 NAT entries, but limit all other
VRF instances to 100 NAT entries each:
Where to Go Next
• To configure NAT for use with application-level gateways, see the “Using Application Level Gateways
with NAT” module.
• To verify, monitor, and maintain NAT, see the “Monitoring and Maintaining NAT” module.
• To integrate NAT with Multiprotocol Label Switching (MPLS) VPNs, see the “Integrating NAT with
MPLS VPNs” module.
• To configure NAT for high availability, see the “Configuring NAT for High Availability” module.
Cisco IOS commands Cisco IOS Master Command List, All Releases
NAT commands: complete command syntax, Cisco IOS IP Addressing Services Command Reference
command mode command history, defaults,
usage guidelines, and examples
IP access list sequence numbering IP Access List Entry Sequence Numbering document
RADIUS attributes overview RADIUS Attributes Overview and RADIUS IETF Attributes
module
Standard/RFC Title
IETF Behave Draft NAT MIB Definitions of Managed Objects for Network Address
Translators (NAT) draft-ietf-behave-nat-mib-11
Technical Assistance
Description Link
The Cisco Support website provides extensive online resources, including http://www.cisco.com/support
documentation and tools for troubleshooting and resolving technical issues
with Cisco products and technologies.
To receive security and technical information about your products, you can
subscribe to various services. These services are the Product Alert Tool
(accessed from Field Notices), the Cisco Technical Services Newsletter, and
Really Simple Syndication (RSS) Feeds.
Access to most tools on the Cisco Support website requires a Cisco.com user
ID and password.
• Before performing the tasks in this module, you should verify that the Session Initiation Protocol (SIP)
and H.323 are not disabled. SIP and H.323 are enabled by default.
We recommend that TCP and UDP be used when conducting IPsec sessions that traverse a NAPT device.
However, not all VPN servers or clients support TCP or UDP.
SPI Matching
SPI matching is used to establish VPN connections between multiple pairs of destinations. NAT entries will
immediately be placed in the translation table for endpoints matching the configured access list..
Note By default support for SIP is enabled on port 5060. Therefore, NAT-enabled devices interpret all packets
on this port as SIP call messages. If other applications in the system use port 5060 to send packets, the
NAT service may corrupt the packet as it attempts to interpret the packet as a SIP call message.
In Cisco IOS Release 12.2(2)T and later releases, embedded IP addresses can be inspected for potential address
translation. Prior to Cisco IOS Release 12.2(2)T, NAT did not support H.323 v2 RAS messages.
multiple TCP segments. Prior to the introduction of this feature, Skinny control message exchanges used to
fail during TCP segmentation because the NAT Skinny ALG was not able to reassemble Skinny control
messages. The NAT SCCP Fragmentation Support feature adds support for TCP segments for the NAT Skinny
ALG and fragmented payloads that requires an IP translation or a port translation is no longer dropped.
Skinny control messages can also be IP fragmented by using Virtual Fragmentation Reassembly (VFR).
In Cisco IOS Release 15.1(3)T and later releases, NAT works with SCCP phones Version 17 and higher.
Restrictions
The NAT Segmentation with Layer 4 Forwarding feature does not work when:
• Firewalls are configured using the ip inspect name command. (Context-Based Access Control (CBAC)
firewalls are not supported. Zone-based firewalls are supported.)
• H.323, SCCP, or TCP DNS messages are larger than 18 KB.
• Multiprotocol Label Switching (MPLS) is configured.
• NAT and the Cisco Unified CallManager are configured on the same device. In this case, a colocated
solution in Call Manager Express is used.
• NAT Virtual Interface (NVI) is configured.
• Stateful Network Address Translation (SNAT) is enabled.
Note Effective January 31, 2014, Stateful NAT is not available in Cisco IOS
software. For more information, see End-of-Sale and End-of-Life
Announcement for the Cisco IOS Stateful Failover of Network Address
Translation (SNAT).
• The match-in-vrf keyword is configured along with the ip nat inside source command for packet
translation.
• The packets are IPv6 packets.
Note IPsec can be configured for any NAT configuration, not just static NAT configurations.
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat [inside | outside] source static local-ip global-ip [vrf vrf-name]
4. exit
5. show ip nat translations
DETAILED STEPS
Router> enable
Step 3 ip nat [inside | outside] source static local-ip global-ip Enables static NAT.
[vrf vrf-name]
Example:
Router(config)# exit
Note This task is required by certain VPN concentrators. Cisco VPN devices generally do not use this feature.
This task is used for IPsec traffic using port 500 for the source port. Perform this task to enable port 500 to
be preserved for the source port.
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat service list access-list-number IKE preserve-port
DETAILED STEPS
Router> enable
Step 3 ip nat service list access-list-number IKE preserve-port Specifies IPsec traffic that matches the access list to
preserve the port.
Example:
Security parameter index (SPI) matching is used to establish VPN connections between multiple pairs of
destinations. NAT entries are immediately placed in the translation table for endpoints matching the configured
access list. SPI matching is available only for endpoints that choose SPIs according to the predictive algorithm
implemented in Cisco IOS Release 12.2(15)T.
The generation of SPIs that are predictable and symmetric is enabled. SPI matching should be used in
conjunction with NAT devices when multiple ESP connections across a NAT device are desired.
Note SPI matching must be configured on the NAT device and both endpoint devices.
>
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat service list access-list-number ESP spi-match
DETAILED STEPS
Router> enable
Step 3 ip nat service list access-list-number ESP spi-match Specifies an access list to enable SPI matching.
Example: • This example shows how to enter ESP traffic matching
list 10 into the NAT table, making the assumption that
Router(config)# ip nat service list 10 ESP both devices are Cisco devices and are configured to
spi-match provide matchable SPIs.
Note Security parameter index (SPI) matching must be configured on the Network Address Translation (NAT)
device and on both endpoint devices.
SUMMARY STEPS
1. enable
2. configure terminal
3. crypto ipsec nat-transparency spi-matching
4. end
DETAILED STEPS
Step 3 crypto ipsec nat-transparency spi-matching Enables SPI matching on both endpoints.
Example:
Device(config)# crypto ipsec nat-transparency
spi-matching
Step 4 end Exits global configuration mode and enters privileged EXEC
mode.
Example:
Device(config)# end
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat service allow-multipart
4. exit
5. show ip nat translations
DETAILED STEPS
Step 4 exit Exits global configuration mode and enters privileged EXEC
mode.
Example:
Device(config)# exit
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat service skinny tcp port number
DETAILED STEPS
Router> enable
Step 3 ip nat service skinny tcp port number Configures the skinny protocol on the specified TCP port.
Example:
Where to Go Next
• To learn about NAT and configure NAT for IP address conservation, see the “Configuring NAT for IP
Address Conservation” module.
• To verify monitor, and maintain NAT, see the “Monitoring and Maintaining NAT” module.
• To integrate NAT with MPLS VPNs, see the “Integrating NAT with MPLS VPNs” module.
• To configure NAT for high availability, see the “Configuring NAT for High Availability” module.
Cisco IOS commands Cisco IOS Master Command List, All Releases
NAT commands: complete command syntax, Cisco IOS IP Addressing Services Command
command mode, defaults, usage guidelines, and Reference
examples
Technical Assistance
Description Link
ALG—SCCP Version 17 Support Cisco IOS XE The ALG—SCCP Version 17 Support feature
Release 3.5S enables the SCCP ALG to parse SCCP Version
17 packets. Cisco Unified Communications
Manager 7.0 and IP phones that use Cisco Unified
Communications Manager 7.0 support only SCCP
Version 17 messages. The SCCP Version 17
packets support IPv6 packets. The SCCP ALG
supports the inspection and translation of IPv4
address information in SCCP messages.
NAT ALG—SIP REFER Method Cisco IOS XE The NAT ALG—SIP REFER method feature
Release 3.2S supports two types of call transfers, unattended
(blind) transfer and attended (consultative)
transfer.
NAT ALG—SIP Trunking Support Cisco IOS XE The NAT ALG—SIP Trunking Support feature
Release 3.2S uses a local database to store all media-related
information within a SIP trunk. Call IDs of each
call are used to index this local database.
NAT Basic H.323 ALG Support Cisco IOS XE NAT requires a variety of ALGs to handle Layer
Release 2.1 7 protocol-specific services such as translating
embedded IP addresses and port numbers in the
packet payload and extracting new
connection/session information from control
channels. The NAT Basic H.323 ALG support
feature provides these specific services for H.323
messages.
NAT DNS ALG Support Cisco IOS XE The NAT DNS ALG Support feature supports
Release 2.1 translation of DNS packets.
NAT FTP ALG Support Cisco IOS XE The NAT FTP ALG Support feature supports
Release 2.1 translation of FTP packets.
NAT H.323 RAS Cisco IOS XE NAT supports all H.225 and H. 245 message types,
Release 2.4 including those sent in the Registration,
Admission, and Status (RAS) protocol. RAS
provides a number of messages that are used by
software clients and VoIP devices to register their
location, request assistance in call setup, and
control bandwidth. The RAS messages are directed
toward an H.323 gatekeeper.
NAT ICMP ALG Support Cisco IOS XE The NAT ICMP ALG Support feature supports
Release 2.1 translation of ICMP packets.
NAT NetBIOS ALG Support Cisco IOS XE NAT provides Network Basic Input Output System
Release 3.1S (NetBIOS) message translation support. The NAT
NetBIOS ALG Support feature introduced the
following command to display NetBIOS-specific
information for a device: show platform
hardware qfp [active | standby] feature alg
statistics netbios.
NAT NetMeeting Directory Cisco IOS XE The NAT NetMeeting Directory (LDAP) feature
(LDAP) Release 2.4 provides ALG support for NetMeeting directory
LDAP messages.
NAT RCMD ALG Support Cisco IOS XE NAT provides remote command execution service
Release 3.1S (RCMD) message translation support.The NAT
RCMD ALG Support feature introduced the
following command to display RCMD-specific
information for a device: show platform software
trace message process qfp active.
NAT RTSP ALG Support Cisco IOS XE The NAT RTSP ALG Support feature provides
Release 3.1S RTSP message translation support.
NAT—SCCP for Video Cisco IOS XE The NAT—SCCP for Video feature provides
Release 2.4 SCCP video message translation support.
NAT—SIP ALG Enhancement for Cisco IOS XE The NAT—SIP ALG Enhancement for T.38 Fax
T.38 Fax Relay Release 2.4.1 Relay feature provides translation support for SIP
ALG support of T.38 Fax Relay over IP.
NAT—SIP Extended Methods Cisco IOS XE The NAT—SIP Extended Methods feature
Release 2.4 supports extended methods for SIP.
NAT Support of IP Phone to Cisco Cisco IOS XE The NAT Support of IP Phone to Cisco
CallManager Release 2.1 CallManager feature adds NAT support for
configuring Cisco SCCP for a Cisco IP phone-to-
Cisco CallManager communication.
NAT Support for IPsec Cisco IOS XE The NAT Support for IPsec ESP-- Phase II feature
ESP—Phase II Release 2.1 provides support for Internet Key Exchange (IKE)
and ESP without encapsulation in tunnel mode
through a device configured with NAPT.
NAT Support for SIP Cisco IOS XE The NAT Support for SIP feature adds the ability
Release 2.1 to deploy NAT between VoIP solutions based on
SIP.
Cisco IOS XE
Release 3.2S
NAT TFTP ALG Support Cisco IOS XE The NAT TFTP ALG Support feature supports
Release 2.1 translation of TFTP packets.
NAT VRF-Aware ALG Support Cisco IOS XE The NAT VRF-Aware ALG Support feature
Release 2.5 supports VPN routing and forwarding (VRF) for
protocols that have a supported ALG.
NAT vTCP ALG Support Cisco IOS XE The NAT vTCP ALG Support feature provides
Release 3.1S vTCP support to handle TCP segmentation and
reassembling for ALG.
Cisco IOS XE
Release 3.2S
Support for IPsec ESP Through Cisco IOS XE The Support for IPsec ESP Through NAT feature
NAT Release 2.1 provides the ability to support multiple, concurrent
IPsec ESP tunnels or connections through a NAT
device configured in Overload or PAT mode.
• Multihoming, which is the ability to support multiple outside interfaces to provide connectivity through
redundant or standby exit points. Depending on the configured routing topology, any exit interface that
is marked as an outside interface can use a translation that was created previously.
• TCP timeout value of 2 hours and 4 minutes.
• VPN routing and forwarding (VRF)-aware NAT.
• CGN NAT can scale to higher number of translations on ESP200 using the ip nat settings scale bind
command.
Note You must use at least one of the configurations described in the following tasks for Carrier Grade NAT
to work.
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat settings mode cgn
4. ip nat inside source static local-ip global-ip
5. interface gigabitethernet card/spaslot/port.subinterface-number
6. ip nat inside
7. exit
8. interface type number
9. ip nat outside
10. end
11. show ip nat translations [verbose]
DETAILED STEPS
Step 4 ip nat inside source static local-ip global-ip Enables static Carrier Grade NAT of the inside source
address.
Example:
Device(config)# ip nat inside source static
192.168.2.1 192.168.34.2
Step 6 ip nat inside Indicates that the interface is connected to the inside
network (the network that is subject to NAT translation).
Example:
Device(config-if)# ip nat inside
Step 8 interface type number Configures an interface and enters interface configuration
mode.
Example:
Device(config)# interface gigabitethernet 0/0/0
Step 9 ip nat outside Indicates that the interface is connected to the outside
network.
Example:
Device(config-if)# ip nat outside
Example
The following is sample output from the show ip nat translations command:
Device# show ip nat translations
The following is sample output from the show ip nat translations verbose command:
Device# show ip nat translations verbose
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat settings mode cgn
4. access-list standard-access-list-number permit source wildcard
5. access-list standard-access-list-number permit source wildcard
6. route-map map-tag
7. match ip address [access-list-number]
8. match ip next-hop [access-list-number]
9. exit
10. ip nat pool name start-ip end-ip prefix-length prefix-length
11. ip nat inside source route-map name pool name
12. interface gigabitethernet card/spaslot/port.subinterface-number
13. ip nat inside
14. exit
15. interface type number
16. ip nat outside
17. end
DETAILED STEPS
Step 4 access-list standard-access-list-number permit source Defines a standard access list and specifies a host.
wildcard
• Access list 1 defined in this step is used by the match
Example: ip address command.
Step 5 access-list standard-access-list-number permit source Defines a standard access list and specifies a host.
wildcard
• Access list 2 defined in this step is used by the match
Example: ip next-hop command.
Device(config)# access-list 2 permit 10.5.5.0
0.0.0.255
Step 6 route-map map-tag Defines conditions for redistributing routes from one
routing protocol into another or enables policy routing and
Example:
enters route-map configuration mode.
Device(config)# route-map nat-route-map
Step 7 match ip address [access-list-number] Distributes any routes that have a destination network
number address that is permitted by a standard access list,
Example:
an extended access list, or a prefix list or performs policy
Device(config-route-map)# match ip address 1 routing on packets.
Step 8 match ip next-hop [access-list-number] Redistributes any routes that have a next-hop router address
passed by one of the specified access lists.
Example:
Device(config-route-map)# match ip next-hop 2
Step 10 ip nat pool name start-ip end-ip prefix-length Defines a pool of IP addresses for NAT.
prefix-length
Example:
Device(config)# ip nat pool nat-pool 10.1.1.1
10.1.254.254 prefix-length 16
Step 11 ip nat inside source route-map name pool name Enables dynamic NAT of the inside source address.
Example:
Device(config)# ip nat inside source route-map
nat-route-map pool nat-pool
Step 13 ip nat inside Indicates that the interface is connected to the inside
network (the network that is subject to NAT translation).
Example:
Device(config-if)# ip nat inside
Step 15 interface type number Configures an interface and enters interface configuration
mode.
Example:
Device(config)# interface gigabitethernet 0/0/1
Step 16 ip nat outside Indicates that the interface is connected to the outside
network.
Example:
Device(config-if)# ip nat outside
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat settings mode cgn
4. ip nat inside source list number pool name [overload]
5. ip nat pool name start-ip end-ip netmask netmask
6. access-list standard-access-list-number permit source wildcard
7. interface gigabitethernet card/spaslot/port.subinterface-number
8. ip nat inside
9. exit
10. interface type number
11. ip nat outside
12. end
13. show ip nat statistics
DETAILED STEPS
Step 4 ip nat inside source list number pool name [overload] Enables the router to use one global address for many local
addresses.
Example:
Device(config)# ip nat inside source list 1 pool • When you configure the overload keyword, the TCP
nat-pool overload or UDP port number of each inside host distinguishes
between multiple conversations using the same local
IP address.
• The overload keyword configures overloading or
PAT.
Step 5 ip nat pool name start-ip end-ip netmask netmask Defines a pool of IP addresses for NAT.
Example:
Device(config)# ip nat pool nat-pool 10.1.1.1
10.1.254.254 netmask 255.255.0.0
Step 6 access-list standard-access-list-number permit source Defines a standard access list and specifies a host.
wildcard
Example:
Device(config)# access-list 1 permit 172.16.0.0
255.255.0.0
Step 8 ip nat inside Indicates that the interface is connected to the inside
network (the network that is subject to NAT translation).
Example:
Device(config-if)# ip nat inside
Step 10 interface type number Configures an interface and enters interface configuration
mode.
Example:
Step 11 ip nat outside Indicates that the interface is connected to the outside
network.
Example:
Device(config-if)# ip nat outside
Example
The following is sample output from the show ip nat statistics command:
Device# show ip nat statistics
Logging Destination IP Address and Port Details in Carrier Grade NAT (CGN)
Mode
In the Carrier Grade NAT (CGN) mode, the destination IP address and port details are not logged when High
Speed Logging (HSL) records are generated. You can still log the destination IP address and destination port
details using the classic NAT mode, but that does not support Endpoint-independent filtering (EIF).
Once the ip nat settings log-destination command is configured in the Carrier Grade NAT (CGN) mode,
the destination IP address and destination port details are included in the add and delete HSL records.
To enable including the destination IP and destination port information in the HSL messages for Carrier Grade
NAT (CGN) mode, use the following ip nat settings log-destination command.
Example
Standard/RFC Title
RFC 4787 Network Address Translation (NAT) Behavioral Requirements for Unicast UDP
Technical Assistance
Description Link
The Cisco Support website provides extensive online resources, including http://www.cisco.com/support
documentation and tools for troubleshooting and resolving technical issues
with Cisco products and technologies.
To receive security and technical information about your products, you can
subscribe to various services, such as the Product Alert Tool (accessed from
Field Notices), the Cisco Technical Services Newsletter, and Really Simple
Syndication (RSS) Feeds.
Access to most tools on the Cisco Support website requires a Cisco.com user
ID and password.
Carrier Grade Network Address Cisco IOS XE Release Carrier Grade Network Address Translation
Translation 3.6S (CGN) is a large-scale NAT that translates
private IPv4 addresses into public IPv4
addresses. CGN employs Network Address and
Port Translation methods to aggregate multiple
private IPv4 addresses into fewer public IPv4
addresses.
The following commands were introduced or
modified: ip nat settings mode and ip nat
settings support mapping outside.
Note This feature is not supported on ISR
4000 platform.
Gratuitous ARP
When a host sends an ARP request to resolve its own IP address, it is called gratuitous ARP. In the ARP
request packet, the source and destination IP addresses are filled with the same source IP address itself. The
destination MAC address is the Ethernet broadcast address.
When a router becomes active, it broadcasts a gratuitous ARP packet with the Hot Standby Router Protocol
(HSRP) virtual MAC address to the affected LAN segment. If the segment uses an Ethernet switch, this allows
the switch to change the location of the virtual MAC address so that packets flow to the new router instead
of the one that is no longer active. End devices do not actually need gratuitous ARP if routers use the default
HSRP MAC address.
Both of the following tasks are required and must be performed on both the active and standby routers to
configure NAT static mapping support for HSRP:
SUMMARY STEPS
1. enable
2. configure terminal
3. interface type number
4. ip address ip-address mask
5. no ip redirects
6. ip nat {inside | outside}
7. standby [group-number] ip [ip-address [secondary]]
8. standby [group-number] preempt
9. standby [group-number] ip [ip-address | secondary]
10. standby [group-number] name [group-name]
11. standby [group-number] track interface-number
12. end
13. show standby
14. show ip nat translations [verbose]
DETAILED STEPS
Step 3 interface type number Configures an interface and enters interface configuration
mode.
Example:
Device(config)# interface gigabitethernet 1/1/1
Step 4 ip address ip-address mask Sets the primary IP address on the interface.
Example:
Device(config-if)# ip address 192.168.1.27
255.255.255.0
Step 6 ip nat {inside | outside} Connects the interface to the inside network.
Example:
Device(config)# ip nat outside
Step 10 standby [group-number] name [group-name] Sets the HSRP group name.
Example:
Device(config-if)# standby 10 name HSRP1
Step 11 standby [group-number] track interface-number Configures HSRP to track an object and to change the hot
standby priority on the basis of the state of the object.
Example:
Device(config-if)# standby 10 track
gigabitethernet1/1/1
Step 14 show ip nat translations [verbose] (Optional) Displays active NAT translations.
Example:
Device# show ip nat translations verbose
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat inside source static local-ip global-ip redundancy group-name
4. ip classless
5. ip route prefix mask interface-type interface-number
6. no ip http server
7. end
8. show ip nat translations [verbose]
DETAILED STEPS
Step 3 ip nat inside source static local-ip global-ip redundancy Enables a device to respond to Address Resolution Protocol
group-name (ARP) queries using BIA MAC, if HSRP is configured on
the NAT outside interface.
Example:
Step 4 ip classless Enables a device to forward packets that are destined for a
subnet of a network that has no network default route, to
Example:
the best supernet route possible.
Device(config)# ip classless
Step 8 show ip nat translations [verbose] (Optional) Displays active NAT translations.
Example:
Device# show ip nat translations verbose
interface BVI10
ip address 192.168.5.54 255.255.255.255.0
no ip redirects
ip nat outside
standby 10 priority 105 preempt
standby 10 name HSRP1
standby 10 ip 192.168.5.30
standby 10 track gigabitethernet1/1/1
!
!
ip default-gateway 10.0.18.126
ip nat inside source static 192.168.5.33 10.10.10.5 redundancy HSRP1
ip classless
interface BVI10
ip address 192.168.5.56 255.255.255.255.0
no ip redirects
ip nat outside
standby 10 priority 100 preempt
standby 10 name HSRP1
standby 10 ip 192.168.5.30
standby 10 track gigabitethernet0/0/1
!
ip default-gateway 10.0.18.126
ip nat inside source static 192.168.5.33 3.3.3.5 redundancy HSRP1
ip classless
ip route 10.0.32.231 255.255.255 gigabitethernet0/0/1
ip route 10.10.10.0 255.255.255.0 gigabitethernet0/0/1
no ip http server
Cisco IOS commands Cisco IOS Master Command List, All Releases
NAT commands: complete command syntax, Cisco IOS IP Addressing Services Command Reference
command mode, command history, usage
guidelines, and examples
Using NAT with MPLS VPNs “Integrating NAT with MPLS VPNs” module
Standard/RFC Title
RFC 826 Ethernet Address Resolution Protocol: Or converting network protocol addresses to 48.bit
Ethernet address for transmission on Ethernet hardware
Technical Assistance
Description Link
NAT—Static Mapping Support Cisco IOS XE Release Static mapping support for HSRP allows the
with HSRP for High Availability 2.1 option of having only the HSRP active router
respond to an incoming ARP for a router
configured with a NAT address.
address is referred to as the MAC address, because the MAC sublayer within the data-link layer processes
addresses for the layer.
To communicate with a device on Ethernet, for example, the Cisco IOS software must first determine the
48-bit MAC or local data-link address of that device. The process of determining the local data-link address
from an IP address is called address resolution. The process of determining the IP address from a local data-link
address is called reverse address resolution.
The software uses three forms of address resolution: Address Resolution Protocol (ARP), proxy ARP, and
Probe (similar to ARP). The software also uses the Reverse Address Resolution Protocol (RARP). ARP, proxy
ARP, and RARP are defined in RFCs 826, 1027, and 903, respectively. Probe is a protocol developed by the
Hewlett-Packard Company (HP) for use on IEEE-802.3 networks.
ARP is used to associate IP addresses with media or MAC addresses. Taking an IP address as input, ARP
determines the associated media address. Once a media or MAC address is determined, the IP address or
media address association is stored in an ARP cache for rapid retrieval. Then the IP datagram is encapsulated
in a link-layer frame and sent over the network. Encapsulation of IP datagrams and ARP requests and replies
on IEEE 802 networks other than Ethernet is specified by the Subnetwork Access Protocol (SNAP).
Gratuitous ARP
When a host sends an ARP request to resolve its own IP address, it is called gratuitous ARP. In the ARP
request packet, the source and destination IP addresses are filled with the same source IP address itself. The
destination MAC address is the Ethernet broadcast address.
When a router becomes active, it broadcasts a gratuitous ARP packet with the Hot Standby Router Protocol
(HSRP) virtual MAC address to the affected LAN segment. If the segment uses an Ethernet switch, this allows
the switch to change the location of the virtual MAC address so that packets flow to the new router instead
of the one that is no longer active. End devices do not actually need gratuitous ARP if routers use the default
HSRP MAC address.
13. exit
14. ip nat pool pool-name start-ipend-ip netmask netmask
15. access-list standard-access-list permit ip-address mask
16. ip nat inside source list list-name pool pool-name [overload]
17. end
DETAILED STEPS
Step 3 track object-number interface type number {ip | ipv6 | Configures an interface to be tracked where the Gateway
line-protocol} Load Balancing Protocol (GLBP) weighting changes based
on the state of the interface
Example:
Device(config)# track 10 interface gigabitethernet
0/0/0 line-protocol
Step 5 interface type number Configures an interface and enters interface configuration
mode.
Example:
Device(config)# interface gigabitethernet 1/2/1
Step 6 ip nat inside Connects the interface to the inside network, which is
subject to Network Address Translation (NAT).
Example:
Device(config-f)# ip nat inside
Step 7 ip address ip-address mask Sets a primary or secondary IP address for an interface.
Example:
Device(config-if)# ip address 192.0.0.2 255.0.0.0
Step 8 standby group-number ip [ip-address] Activates the Hot Standby Router Protocol (HSRP).
Example:
Device(config-if)# standby 1 ip 192.0.0.1
Step 9 standby use-bia Configures HSRP to use the burned-in address of the
interface as its virtual MAC address, instead of the
Example:
preassigned MAC address or the functional address.
Device(config-if)# standby use-bia
Step 11 standby group-number preempt [delay] Configures HSRP preemption and preemption delay.
Example: • If you configure this command, when a local device
Device(config-if)# standby 1 preempt has an HSRP priority higher than the current active
device, the local device assumes control as the active
device. If preemption is not configured, the local
device assumes control as the active device only if it
receives information indicating no device is in the
active state (acting as the designated device).
Step 12 standby group-number track object-number [decrement Configure HSRP to track an object, and change the HSRP
priority-decrement] priority on the basis of the state of the object.
Example: • When a tracked object goes down, the HSRP priority
Device(config-if)# standby 1 track 10 decrement decreases by 10. If an object is not tracked, state
15 changes do not affect the priority.
Step 14 ip nat pool pool-name start-ipend-ip netmask netmask Defines a pool of IP addresses for Network Address
Translation (NAT) translations.
Example:
Device(config)# ip nat pool pool1 10.1.1.10
10.1.1.52 netmask 255.255.255.0
Step 16 ip nat inside source list list-name pool pool-name Enables NAT of the inside source address.
[overload]
• When overloading is configured, it enables the device
Example: to use one global address for many local addresses.
Device(config)# ip nat inside source list list1 The TCP or UDP port number of each inside host
pool pool1 overload distinguishes between the multiple conversations
using the same local IP address.
The following example shows a LAN-WAN configuration for dynamic Network Address Translation
(NAT) overload mapping with Hot Standby Router Protocol (HSRP). A virtual routing and forwarding
(VRF) instance is enabled for this configuration. Devices that are configured with NAT do not have
any route configurations related to HSRP Virtual IP Address (VIP). LAN users using static routes
have to set the default route or next-hop to the HSRP VIP; for example configure the ip route 0.0.0.0
0.0.0.0 192.0.2.1 command.
! Active device configuration:
Device# configure terminal
Device(config)# vrf definition vrf1
Device(config-vrf)# exit
Device(config)# track 10 interface fastethernet 1/1/1 line-protocol
Device(config-track)# exit
Device(config)# interface fastethernet 1/1/0
Device(config-if)# vrf forwarding vrf1
Device(config-if)# ip nat inside
Device(config-if)# ip address 192.0.2.2 255.255.255.240
Device(config-if)# standby 1 ip 192.0.2.1
Device(config-if)# standby use-bia
Device(config-if)# standby 1 priority 120
Device(config-if)# standby 1 preempt
Device(config-if)# standby 1 track 10 decrement 15
Device(config-if)# exit
Device(config)# interface fastethernet 1/1/1
Device(config-if)# ip address 198.51.100.1 255.255.255.240
Device(config-if)# ip nat outside
Device(config-if)# exit
Device(config)# ip nat pool pool1 10.1.1.1 10.1.1.255 netmask 255.255.255.0
Device(config)# access-list 1 permit 203.0.113.0 255.255.255.240
Device(config)# ip nat inside source list1 pool pool1 vrf vrf1 overload
Device(config)# end
SUMMARY STEPS
1. enable
2. show arp
3. show ip alias
4. show ip nat translations
5. show standby brief
DETAILED STEPS
Step 1 enable
Example:
Device> enable
Static NAT with HSRP "Static NAT Mapping with HSRP" module of the IP Addressing: NAT Configuration
Guide
Standard/RFC Title
RFC 826 An Ethernet Address Resolution Protocol or Converting Network Protocol Addresses
Technical Assistance
Description Link
The Cisco Support website provides extensive online resources, including http://www.cisco.com/support
documentation and tools for troubleshooting and resolving technical issues
with Cisco products and technologies.
To receive security and technical information about your products, you can
subscribe to various services, such as the Product Alert Tool (accessed from
Field Notices), the Cisco Technical Services Newsletter, and Really Simple
Syndication (RSS) Feeds.
Access to most tools on the Cisco Support website requires a Cisco.com user
ID and password.
(RTSP), and Session Initiation Protocol (SIP). This SEQ/ACK adjustment information gets associated
with the NAT session and is synchronized to the standby device periodically.
During a stateful switchover, if the SEQ/ACK information is not completely synchronized to the new
active device it is likely that the TCP connection would be reset by endpoints of the application.
• Stateful interchassis redundancy cannot coexist with intrachassis redundancy, including software
redundancy.
• In Service Software Upgrade (ISSU) is not supported.
• When changing the paired-address-pooling, bulk port-allocation, or NAT mode settings the following
steps must be followed:
1. Shutdown the redundancy group and NAT interfaces on the standby device using the shutdown
command. Clear NAT sessions on the standby device after shutting down the redundancy group.
2. Change the paired-address-pooling, bulk port-allocation, or NAT mode on the standby device first
and then on the active device.
3. Configure the no shutdown command for the redundancy group and NAT interfaces on the standby
device.
• In a NAT Stateful Interchassis Redundancy configuration, it is mandatory that both peers use the same
inside and outside NAT interfaces. If the interfaces are not same, it can lead to duplicate NAT entries.
• The following translations are not synchronized to the standby router :
• Translations created based on an interface overload rule
• ICMP requests
Note For a standalone NAT router, shut down the NAT interfaces before you make a configuration change.
Note Manually shutting down the control or data interface link on an active NAT router results in traffic
outage as the NAT router never transitions to active state.
The status of redundancy group members is determined through the use of hello messages sent over the control
link. The software considers either device not responding to a hello message within a configurable amount
of time to be a failure and initiates a switchover. For the software to detect a failure in milliseconds, control
links run the failover protocol that is integrated with the Bidirectional Forwarding Detection (BFD) protocol.
You can configure the following parameters for hello messages:
• Hello time—Interval at which hello messages are sent.
• Hold time—Amount of time before which the active or standby device is declared to be down.
The hello time defaults to 3 seconds to align with the Hot Standby Router Protocol (HSRP), and the hold time
defaults to 10 seconds. You can also configure these timers in milliseconds by using the timers hellotime
msec command.
To determine the pairs of interfaces that are affected by the switchover, you must configure a unique ID for
each pair of redundant interfaces. This ID is known as the RII that is associated with the interface.
A switchover to the standby device can occur when the priority setting that is configured on each device
changes. The device with the highest priority value acts as the active device. If a fault occurs on either the
active or standby device, the priority of the device is decremented by a configurable amount known as the
weight. If the priority of the active device falls below the priority of the standby device, a switchover occurs
and the standby device becomes the active device. This default behavior can be overridden by disabling the
preemption attribute for the RG. You can also configure each interface to decrease the priority when the Layer
1 state of the interface goes down. The priority that is configured overrides the default priority of an RG.
Each failure event that causes a modification of an RG priority generates a syslog entry that contains a time
stamp, the RG that was affected, the previous priority, the new priority, and a description of the failure event
cause.
A switchover also can occur when the priority of a device or interface falls below a configurable threshold
level.
A switchover to the standby device occurs under the following circumstances:
• Power loss or a reload occurs on the active device (including reloads).
• The run-time priority of the active device goes below that of the standby device (with preempt configured).
• The run-time priority of the active device goes below that of the configured threshold.
• The redundancy group on the active device is reloaded manually. Use the redundancy application
reload group rg-number command for a manual reload.
LAN-LAN Topology
The figure below shows the LAN-LAN topology. In a LAN-LAN topology, all participating devices are
connected to each other through LAN interfaces on both the inside and the outside. In this scenario, traffic is
often directed to the correct firewall if static routing is configured on the upstream or downstream devices to
an appropriate virtual IP address. This plaform participate in dynamic routing with upstream or downstream
devices. The dynamic routing configuration supported on LAN-facing interfaces must not introduce a
dependency on the routing protocol convergence; otherwise, fast failover requirements will not be met.
SUMMARY STEPS
1. enable
2. configure terminal
3. redundancy
4. mode none
5. application redundancy
6. protocol number
7. name instance-name
8. timers hellotime [msec] number holdtime [msec] number
9. authentication {text string | md5 key-string [0 | 7] key | md5 key-chain key-chain-name}
10. bfd
11. end
DETAILED STEPS
Step 4 mode none Sets the redundancy mode to none, which is required for
this feature.
Example:
Device(config-red)# mode none
Step 6 protocol number Specifies the protocol instance that will be attached to a
control interface, and enters redundancy application
Example:
protocol configuration mode.
Device(config-red-app)# protocol 4
Step 7 name instance-name (Optional) Specifies an optional alias for the protocol
instance.
Example:
Device(config-red-app-prot)# name rg1
Step 8 timers hellotime [msec] number holdtime [msec] number Specifies the interval between hello messages sent and the
time before a device is declared to be down.
Example:
Device(config-red-app-prot)# timers hellotime 3 • The default time for hello time is 3 seconds and for
holdtime 10 hold time is 10 seconds.
Step 9 authentication {text string | md5 key-string [0 | 7] key Specifies authentication information.
| md5 key-chain key-chain-name}
Example:
SUMMARY STEPS
1. enable
2. configure terminal
3. redundancy
4. application redundancy
5. group {1 | 2}
6. name group-name
7. preempt
8. priority number failover-threshold number
9. track object-number [decrement number | shutdown]
10. timers delay seconds [reload seconds]
DETAILED STEPS
Step 6 name group-name (Optional) Specifies an optional alias for the protocol
instance.
Example:
Device(config-red-app-grp)# name rg1
Step 7 preempt Enables preemption on the group and enables the standby
device to preempt the active device regardless of which
Example:
device has higher priority.
Device(config-red-app-grp)# preempt
Step 8 priority number failover-threshold number Specifies the initial priority and failover threshold for the
redundancy group.
Example:
Device(config-red-app-grp)# priority 120
failover-threshold 80
Step 10 timers delay seconds [reload seconds] Specifies the amount of time by which the redundancy
group will delay role negotiations that start after a fault
Example:
occurs or after the system is reloaded.
Device(config-red-app-grp)# timers delay 10 reload
20
Step 11 control interface-name protocol instance Specifies the control interface that is used by the
redundancy group.
Example:
Device(config-red-app-grp)# control • This interface is also associated with an instance of
GigabitEthernet0/1/0 protocol 1 the control interface protocol.
Step 12 data interface-name Specifies the data interface that is used by the redundancy
group.
Example:
Device(config-red-app-grp)# data
GigabitEthernet0/1/2
Step 16 interface type number Selects an interface to associate with the redundancy group
and enters interface configuration mode.
Example:
Device(config)# interface gigabitethernet 0/0/1
Step 17 redundancy group number ip address exclusive Associates the interface with the redundancy group
[decrement number] identified by the number argument.
Example:
Device(config-if)# redundancy group 1 ip 10.10.1.1
exclusive decrement 20
Step 18 redundancy rii number Specifies a number for the RII associated with this
interface.
Example:
Device(config-if)# redundancy rii 40 • This number must match the RII of the other interface
in the redundancy group.
DETAILED STEPS
Step 3 interface type number Configures an interface and enters interface configuration
mode.
Example:
Device(config)# interface gigabitethernet 0/1/5
Step 4 ip address ip-address mask Sets a primary or secondary IP address for an interface.
Example:
Device(config-if)# ip address 10.1.1.2 255.0.0.0
Step 5 ip nat outside Configures the outside interface for IP address translation.
Example:
Device(config-if)# ip nat outside
Step 8 redundancy rii number Specifies a number for the redundancy interface identifier
(RII) that is associated with this interface.
Example:
Device(config-if)# redundancy rii 200 • This number must match the RII of the other interface
in the redundancy group.
Step 9 redundancy group number ip address exclusive Associates the interface with the redundancy group
[decrement number] identified by the number argument.
Example:
Device(config-if)# redundancy group 1 ip
10.1.1.200 exclusive decrement 10
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat pool name start-ip end-ip {netmask netmask | prefix-length prefix-length}
4. ip nat inside source list {{access-list-number | access-list-name} | route-map name} pool name
[redundancy redundancy-id [mapping-id map-id | overload | reversible | vrf name]]
5. end
DETAILED STEPS
Step 3 ip nat pool name start-ip end-ip {netmask netmask | Defines a pool of IP addresses for NAT.
prefix-length prefix-length}
Example:
Device(config)# ip nat pool VPN-18 10.10.0.0
10.10.255.255 netmask 255.255.0.0
Step 4 ip nat inside source list {{access-list-number | Enables NAT of the inside source address.
access-list-name} | route-map name} pool name
• You must use a mapping ID to associate NAT with
[redundancy redundancy-id [mapping-id map-id |
the redundancy group.
overload | reversible | vrf name]]
Example:
Device(config)# ip nat inside source list acl-18
pool VPN-18 redundancy 2 mapping-id 152
SUMMARY STEPS
1. enable
2. redundancy application reload group number [peer | self]
3. show redundancy application group [group-id | all]
4. show redundancy application transport {clients | group [group-id]}
5. show redundancy application protocol {protocol-id | group [group-id]}
6. show redundancy application faults group [group-id]
7. show redundancy application if-mgr group [group-id]
8. show redundancy application control-interface group [group-id]
9. show redundancy application data-interface group [group-id]
10. show monitor event-trace rg_infra all
DETAILED STEPS
Step 2 redundancy application reload group number [peer | Forces the active redundancy group (RG) to reload and
self] the standby RG to become the active RG.
Example: • Use the redundancy application reload command
Device# redundancy application reload group 2 self to verify if the redundancy configuration is working.
You must enter this command on the active RG.
Step 3 show redundancy application group [group-id | all] Displays summary information for the specified group or
for all groups.
Example:
Device# show redundancy application group 2
Step 4 show redundancy application transport {clients | Displays transport information for the specified group or
group [group-id]} for all groups.
Example:
Device# show redundancy application transport
group 2
Step 5 show redundancy application protocol {protocol-id | Displays protocol information for the specified group or
group [group-id]} for all groups.
Example:
Device# show redundancy application protocol 2
Step 6 show redundancy application faults group [group-id] Displays information about faults for the specified group
or for all groups.
Example:
Device# show redundancy application faults group
2
Step 7 show redundancy application if-mgr group [group-id] Displays information about the interface manager (if-mgr)
for the specified group or for all groups.
Example:
Device# show redundancy application if-mgr group
2
Step 8 show redundancy application control-interface group Displays interface information associated with redundancy
[group-id] groups for the specified control interface.
Example:
Device# show redundancy application
control-interface group IF-2
Step 9 show redundancy application data-interface group Displays interface information associated with redundancy
[group-id] groups for the specified data interface.
Example:
Device# show redundancy application data-interface
group IF-2
Step 10 show monitor event-trace rg_infra all Displays event trace information associated with all
redundancy groups.
Example:
Cisco IOS commands Cisco IOS Master Command List, All Releases
IP addressing commands: complete command Cisco IOS IP Addressing Services Command Reference
syntax, command mode, command history,
defaults, usage guidelines, and examples
Standards/RFCs Title
Technical Assistance
Description Link
• IPsec
• Policy Based Routing (PBR)
• Port bundle
• Lawful intercept
• Layer 2 Tunneling Protocol (L2TP)
• Locator/ID Separation Protocol (LISP) inner packet inspection
• Secure Shell (SSL) VPN
• Session Border Controller (SBC)
Asymmetric routing consists of an interlink interface that handles all traffic that is to be diverted. The bandwidth
of the asymmetric-routing interlink interface must be large enough to handle all expected traffic that is to be
diverted. An IPv4 address must be configured on the asymmetric-routing interlink interface, and the IP address
of the asymmetric routing interface must be reachable from this interface.
Note We recommend that the asymmetric-routing interlink interface be used for interlink traffic only and not
be shared with high availability control or data interfaces because the amount of traffic on the
asymmetric-routing interlink interface could be quite high.
Note The firewall does not support the asymmetric-routing always-divert enable command that diverts
packets received on the standby RG to the active RG. By default, the firewall forces all packet flows to
be diverted to the active RG.
• When a Multiprotocol Label Switching (MPLS) packet is diverted to the active device from the standby
device, the MPLS label is removed before the asymmetric routing diversion happens.
• When MPLS is not configured on a device, an IP packet is diverted to the active device and the VRF ID
is set. The firewall gets the local VRF ID, when it inspects the packet at the egress interface.
VRF mapping between active and standby devices require no configuration changes.
SUMMARY STEPS
1. enable
2. configure terminal
3. redundancy
4. application redundancy
5. group id
6. name group-name
7. priority value [failover threshold value]
8. preempt
9. track object-number decrement number
10. exit
11. protocol id
12. timers hellotime {seconds | msec msec} holdtime {seconds | msec msec}
13. authentication {text string | md5 key-string [0 | 7] key [timeout seconds] | key-chain
key-chain-name}
14. bfd
15. end
DETAILED STEPS
Step 6 name group-name Specifies an optional alias for the protocol instance.
Example:
Device(config-red-app-grp)# name group1
Step 7 priority value [failover threshold value] Specifies the initial priority and failover threshold for a
redundancy group.
Example:
Device(config-red-app-grp)# priority 100 failover
threshold 50
Step 9 track object-number decrement number Specifies the priority value of a redundancy group that will
be decremented if an event occurs on the tracked object.
Example:
Device(config-red-app-grp)# track 50 decrement 50
Step 12 timers hellotime {seconds | msec msec} holdtime Specifies the interval between hello messages sent and the
{seconds | msec msec} time period before which a device is declared to be down.
Example: • Holdtime should be at least three times the hellotime.
Device(config-red-app-prtcl)# timers hellotime 3
holdtime 10
Note Asymmetric routing, data, and control must be configured on separate interfaces.
SUMMARY STEPS
1. enable
2. configure terminal
3. redundancy
4. application redundancy
5. group id
6. data interface-type interface-number
7. control interface-type interface-number protocol id
8. timers delay seconds [reload seconds]
9. asymmetric-routing interface type number
10. asymmetric-routing always-divert enable
11. end
DETAILED STEPS
Step 7 control interface-type interface-number protocol id Specifies the control interface that is used by the RG.
Example: • The control interface is also associated with an
Device(config-red-app-grp)# control instance of the control interface protocol.
GigabitEthernet 1/0/0 protocol 1
Step 8 timers delay seconds [reload seconds] Specifies the time required for an RG to delay role
negotiations that start after a fault occurs or the system is
Example:
reloaded.
Device(config-red-app-grp)# timers delay 100
reload 400
Step 9 asymmetric-routing interface type number Specifies the asymmetric routing interface that is used by
the RG.
Example:
Device(config-red-app-grp)# asymmetric-routing
interface GigabitEthernet 0/1/1
Step 10 asymmetric-routing always-divert enable Always diverts packets received from the standby RG to
the active RG.
Example:
Device(config-red-app-grp)# asymmetric-routing
always-divert enable
Note • You must not configure a redundant interface identifier (RII) on an interface that is configured
either as a data interface or as a control interface.
• You must configure the RII and asymmetric routing on both active and standby devices.
• You cannot enable asymmetric routing on the interface that has a virtual IP address configured.
SUMMARY STEPS
1. enable
2. configure terminal
3. interface type number
4. redundancy rii id
5. redundancy group id [decrement number]
6. redundancy asymmetric-routing enable
7. end
DETAILED STEPS
Step 3 interface type number Selects an interface to be associated with the redundancy
group (RG) and enters interface configuration mode.
Example:
Device(config)# interface GigabitEthernet 0/1/3
Step 5 redundancy group id [decrement number] Enables the RG redundancy traffic interface configuration
and specifies the amount to be decremented from the priority
Example:
when the interface goes down.
Device(config-if)# redundancy group 1 decrement 20
Note You need not configure an RG on the traffic
interface on which asymmetric routing is
enabled.
Step 6 redundancy asymmetric-routing enable Establishes an asymmetric flow diversion tunnel for each
RG.
Example:
Device(config-if)# redundancy asymmetric-routing
enable
For more information on different types of NAT configurations, see the “Configuring NAT for IP Address
Conservation” chapter.
SUMMARY STEPS
1. enable
2. configure terminal
3. interface type number
4. ip address ip-address mask
5. ip nat outside
6. exit
7. redundancy
8. application redundancy
9. group id
10. asymmetric-routing always-divert enable
11. end
12. configure terminal
13. ip nat pool name start-ip end-ip {mask | prefix-length prefix-length}
14. exit
15. ip nat inside source list acl-number pool name redundancy redundancy-id mapping-id map-id
16. access-list standard-acl-number permit source-address wildcard-bits
17. end
DETAILED STEPS
Step 3 interface type number Configures an interface and enters interface configuration
mode.
Example:
Device(config)# interface gigabitethernet 0/1/3
Step 10 asymmetric-routing always-divert enable Diverts the traffic to the active device.
Example:
Device(config-red-app-grp)# asymmetric-routing
always-divert enable
Step 13 ip nat pool name start-ip end-ip {mask | prefix-length Defines a pool of global addresses.
prefix-length}
• Enters IP NAT pool configuration mode.
Example:
Device(config)# ip nat pool pool1 prefix-length
24
Step 14 exit Exits IP NAT pool configuration mode and enters global
configuration mode.
Example:
Device(config-ipnat-pool)# exit
Step 15 ip nat inside source list acl-number pool name Enables NAT of the inside source address and associates
redundancy redundancy-id mapping-id map-id NAT with a redundancy group by using the mapping ID.
Example:
Device(config)# ip nat inside source list pool
pool1 redundancy 1 mapping-id 100
Example:ConfiguringVRF-AwareNATforWAN-WANTopologywithSymmetric
Routing Box-to-Box Redundancy
The following is a sample WAN-to-WAN symmetric routing configuration:
!
multilink bundle-name authenticated
!
redundancy
mode sso
application redundancy
group 1
preempt
priority 120
control GigabitEthernet 0/0/1 protocol 1
data GigabitEthernet 0/0/2
!
!
!
!
ip tftp source-interface GigabitEthernet0
ip tftp blocksize 8192
!
track 1 interface GigabitEthernet 0/0/4 line-protocol
!
interface Loopback 0
ip address 209.165.201.1 255.255.255.224
!
interface GigabitEthernet 0/0/0
vrf forwarding VRFA
ip address 192.168.0.1 255.255.255.248
ip nat inside
negotiation auto
bfd interval 50 min_rx 50 multiplier 3
redundancy rii 2
!
interface GigabitEthernet 0/0/1
ip address 209.165.202.129 255.255.255.224
negotiation auto
!
interface GigabitEthernet 0/0/2
ip address 192.0.2.1 255.255.255.224
negotiation auto
!
interface GigabitEthernet 0/0/3
ip address 198.51.100.1 255.255.255.240
negotiation auto
!
interface GigabitEthernet 0/0/4
ip address 203.0.113.1 255.255.255.240
negotiation auto
!
interface GigabitEthernet 0
vrf forwarding Mgmt-intf
ip address 172.16.0.1 255.255.0.0
negotiation auto
!
interface vasileft 1
vrf forwarding VRFA
ip address 10.4.4.1 255.255.0.0
ip nat outside
no keepalive
!
interface vasiright 1
ip address 10.4.4.2 255.255.0.0
no keepalive
!
router mobile
!
Cisco IOS commands Cisco IOS Master Command List, All Releases
Technical Assistance
Description Link
Asymmetric Routing Cisco IOS XE Release The Asymmetric Routing Enhancements for
Enhancements for NAT44 3.16S NAT44 feature supports asymmetric routing
with CGN, ALGs, VRF, VASI and MPLS.
No commands were introduced or modified.
Interchassis Asymmetric Routing Cisco IOS XE Release 3.5S The Interchassis Asymmetric Routing
Support for Zone-Based Firewall Support for Zone-Based Firewall and NAT
and NAT feature supports the forwarding of packets
from a standby redundancy group to the
active redundancy group for packet
handling.
The following commands were introduced
or modified: asymmetric-routing,
redundancy asymmetric-routing enable.
VRF-Aware Interchassis Cisco IOS XE Release NAT supports the VRF-Aware Interchassis
Asymmetric Routing Support for 3.14S Asymmetric Routing feature. This feature
NAT supports MPLS. There are no configuration
changes for this feature.
No commands were introduced or modified.
Note In some cases you might experience FTP disconnection after failover in a NAT B2B scenario. To resolve
this issue, quit the existing FTP connection and start a new FTP connection.
Note Manually shutting down the control or data interface link on an active NAT router results in traffic
outage as the NAT router never transitions to active state.
Redundant devices are joined by a configurable control link and a data synchronization link. The control link
is used to communicate the status of devices. The data synchronization link is used to transfer stateful
information from Network Address Translation (NAT) and the firewall and synchronize the stateful database.
The pairs of redundant interfaces are configured with the same unique ID number known as the redundant
interface identifier (RII).
The status of redundancy group members is determined through the use of hello messages sent over the control
link. The software considers either device not responding to a hello message within a configurable amount
of time to be a failure and initiates a switchover. For the software to detect a failure in milliseconds, control
links run the failover protocol that is integrated with the Bidirectional Forwarding Detection (BFD) protocol.
You can configure the following parameters for hello messages:
• Hello time—Interval at which hello messages are sent.
• Hold time—Amount of time before which the active or standby device is declared to be down.
The hello time defaults to 3 seconds to align with the Hot Standby Router Protocol (HSRP), and the hold time
defaults to 10 seconds. You can also configure these timers in milliseconds by using the timers hellotime
msec command.
To determine the pairs of interfaces that are affected by the switchover, you must configure a unique ID for
each pair of redundant interfaces. This ID is known as the RII that is associated with the interface.
A switchover to the standby device can occur when the priority setting that is configured on each device
changes. The device with the highest priority value acts as the active device. If a fault occurs on either the
active or standby device, the priority of the device is decremented by a configurable amount known as the
weight. If the priority of the active device falls below the priority of the standby device, a switchover occurs
and the standby device becomes the active device. This default behavior can be overridden by disabling the
preemption attribute for the RG. You can also configure each interface to decrease the priority when the Layer
1 state of the interface goes down. The priority that is configured overrides the default priority of an RG.
Each failure event that causes a modification of an RG priority generates a syslog entry that contains a time
stamp, the RG that was affected, the previous priority, the new priority, and a description of the failure event
cause.
A switchover also can occur when the priority of a device or interface falls below a configurable threshold
level.
A switchover to the standby device occurs under the following circumstances:
• Power loss or a reload occurs on the active device (including reloads).
• The run-time priority of the active device goes below that of the standby device (with preempt configured).
• The run-time priority of the active device goes below that of the configured threshold.
• The redundancy group on the active device is reloaded manually. Use the redundancy application
reload group rg-number command for a manual reload.
exit-address-family
!
ip nat switchover replication http
ip nat pool att_pool 209.165.200.225 209.165.200.225 prefix-length 16
ip nat inside source list 4 pool att_pool redundancy 1 mapping-id 100 vrf VRFA overload
ip forward-protocol nd
!
no ip http server
no ip http secure-server
ip route 203.0.113.1 255.255.255.224 10.4.4.1
ip route 192.168.0.0 255.255.0.0 10.4.4.1
ip route 209.165.200.224 255.255.255.224 10.4.4.1
ip route vrf Mgmt-intf 209.165.200.1 255.255.255.224 172.16.0.0
!
ip prefix-list VRF_Pool seq 5 permit 209.165.200.0/27
ip prefix-list p1-adv-1 seq 5 permit 209.165.200.0/27
ip prefix-list p1-exist-1 seq 5 permit 203.0.113.193/27
logging esm config
access-list 4 permit 203.0.113.193 255.255.255.224
!
control-plane
line console 0
stopbits 1
!
line vty 0 3
login
!
line vty 4
password lab
login
!
end
Technical Assistance
Description Link
The Cisco Support website provides extensive online resources, including http://www.cisco.com/support
documentation and tools for troubleshooting and resolving technical issues
with Cisco products and technologies.
To receive security and technical information about your products, you can
subscribe to various services, such as the Product Alert Tool (accessed from
Field Notices), the Cisco Technical Services Newsletter, and Really Simple
Syndication (RSS) Feeds.
Access to most tools on the Cisco Support website requires a Cisco.com user
ID and password.
VRF-Aware NAT for WAN-WAN Cisco IOS XE Release In Cisco IOS XE Release 3.14S, Network
Topology with Symmetric Routing 3.14S Address Translation (NAT) supports the
Box-to-Box Redundancy VRF-Aware NAT for WAN-WAN Topology
with Symmetric Routing Box-to-Box
Redundancy feature. This feature contains the
following two features: VRF-aware stateful
interchassis redundancy and VRF-aware
interchassis symmetric routing.
No commands were introduced or modified by
this feature.
http://www.cisco.com/univercd/cc/td/doc/product/software/ios122s/122snwft/release/122s14/fsaclseq.htm
Note If you specify an access list to use with a NAT command, NAT does not support the commonly used
permit ip any any command in the access list.
The figure below shows a typical NAT integration with MPLS VPNs. The PE router connected to the internet
and centralized mail service is employed to do the address translation.
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat pool name start-ip end-ip netmask netmask
4. ip nat [inside | outside] source [list {access-list-number | access-list-name} | route-map name] [interface
type number | pool pool-name] vrf vrf-name[overload]
5. Repeat Step 4 for each VPN being configured
6. ip route vrf vrf-name prefix mask interface-type interface-number next-hop-address
7. Repeat Step 6 for each VPN being configured.
8. exit
9. show ip nat translations vrf vrf-name
DETAILED STEPS
Step 3 ip nat pool name start-ip end-ip netmask netmask Defines a pool of IP addresses for NAT.
Example:
Step 4 ip nat [inside | outside] source [list {access-list-number Allows NAT to be configured on a particular VPN.
| access-list-name} | route-map name] [interface type
number | pool pool-name] vrf vrf-name[overload]
Example:
Step 6 ip route vrf vrf-name prefix mask interface-type Allows NAT to be configured on a particular VPN.
interface-number next-hop-address
Example:
Router(config)#
ip route vrf shop 0.0.0.0 0.0.0.0 ethernet 0
168.58.88.2
Router(config)# exit
Step 9 show ip nat translations vrf vrf-name (Optional) Displays the settings used by virtual
routing/forwarding (VRF) table translations.
Example:
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat inside source {static {esp local-ip interface type number | local-ip global-ip}} [extendable |
mapping-id map-id| no-alias | no-payload | redundancy group-name | route-map | vrf name]
4. Repeat Step 3 for each VPN being configured.
5. ip route vrf vrf-name prefix prefix mask next-hop-address global
6. Repeat Step 5 for each VPN being configured.
7. exit
8. show ip nat translations vrf vrf-name
DETAILED STEPS
Step 3 ip nat inside source {static {esp local-ip interface type Enables inside static translation on the VRF.
number | local-ip global-ip}} [extendable | mapping-id
map-id| no-alias | no-payload | redundancy group-name
| route-map | vrf name]
Example:
Router(config)#
ip nat inside source static 192.168.121.113 2.2.2.1
vrf shop
Step 5 ip route vrf vrf-name prefix prefix mask Allows the route to be shared by several customers.
next-hop-address global
Example:
Router(config)#
ip route vrf shop 0.0.0.0 0.0.0.0 168.58.88.2
global
Router(config)# exit
Step 8 show ip nat translations vrf vrf-name (Optional) Displays the settings used by VRF translations.
Example:
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat pool outside global-ip local-ip netmask netmask
4. ip nat inside source static local-ip global-ip vrf vrf-name
5. Repeat Step 4 for each VRF being configured.
6. ip nat outside source static global-ip local-ip vrf vrf-name
7. exit
8. show ip nat translations vrf vrf-name
DETAILED STEPS
Router(config)#
ip nat pool outside 4.4.4.1 4.4.4.254 netmask
255.255.255.00
Step 4 ip nat inside source static local-ip global-ip vrf Allows the route to be shared by several customers.
vrf-name
Example:
Router(config)#
ip nat inside source static 192.168.121.113 2.2.2.1
vrf shop
Step 5 Repeat Step 4 for each VRF being configured. Allows the route to be shared by several customers.
Step 6 ip nat outside source static global-ip local-ip vrf Enables NAT translation of the outside source address.
vrf-name
Example:
Router(config)#
ip nat outside source static 168.58.88.2 4.4.4.1
vrf shop
Router(config)# exit
Step 8 show ip nat translations vrf vrf-name (Optional) Displays the settings used by VRF translations.
Example:
SUMMARY STEPS
1. enable
2. configure {terminal | memory | network}
3. ip nat pool inside global-ip local-ip netmask netmask
4. Repeat Step 3 for each pool being configured.
5. ip nat inside source list access-list-number pool pool-name vrf vrf-name
6. Repeat Step 5 for each pool being configured.
DETAILED STEPS
Step 3 ip nat pool inside global-ip local-ip netmask netmask Allows the configured VRF to be associated with the NAT
translation rule.
Example:
Step 5 ip nat inside source list access-list-number pool Allows the route to be shared by several customers.
pool-name vrf vrf-name
Example:
Router(config)#
ip nat inside source list 1 pool inside2 vrf shop
Step 6 Repeat Step 5 for each pool being configured. Defines the access list.
Step 7 ip nat outside source static global-ip local-ip vrf Allows the route to be shared by several customers.
vrf-name
Example:
Router(config)#
ip nat outside source static 168.58.88.2 4.4.4.1
vrf shop
Router(config)# exit
!
ip nat pool inside 2.2.2.10 2.2.2.10 netmask 255.255.255.0
ip nat inside source list 1 pool inside vrf bank overload
ip nat inside source list 1 pool inside vrf park overload
ip nat inside source list 1 pool inside vrf shop overload
!
ip route vrf shop 0.0.0.0 0.0.0.0 Ethernet1/3 168.58.88.2
ip route vrf bank 0.0.0.0 0.0.0.0 Ethernet1/3 168.58.88.2
ip route vrf park 0.0.0.0 0.0.0.0 Ethernet1/3 168.58.88.2
!
access-list 1 permit 192.168.0.0 0.0.255.255
!
ip nat inside source static 192.168.121.113 2.2.2.1 vrf shop
ip nat inside source static 192.168.122.49 2.2.2.2 vrf shop
ip nat inside source static 192.168.121.113 2.2.2.3 vrf bank
ip nat inside source static 192.168.22.49 2.2.2.4 vrf bank
ip nat inside source static 192.168.121.113 2.2.2.5 vrf park
ip nat inside source static 192.168.22.49 2.2.2.6 vrf park
ip nat inside source static 192.168.11.1 2.2.2.11 vrf shop
ip nat inside source static 192.168.11.3 2.2.2.12 vrf shop
ip nat inside source static 140.48.5.20 2.2.2.13 vrf shop
!
ip route 2.2.2.1 255.255.255.255 Ethernet1/0 192.168.121.113
ip route 2.2.2.2 255.255.255.255 Ethernet1/0 192.168.121.113
ip route 2.2.2.3 255.255.255.255 Serial2/1.1 192.168.121.113
ip route 2.2.2.4 255.255.255.255 Serial2/1.1 192.168.121.113
ip route 2.2.2.5 255.255.255.255 FastEthernet0/0 192.168.121.113
ip route 2.2.2.6 255.255.255.255 FastEthernet0/0 192.168.121.113
ip route 2.2.2.11 255.255.255.255 Ethernet1/0 192.168.121.113
ip route 2.2.2.12 255.255.255.255 Ethernet1/0 192.168.121.113
ip route 2.2.2.13 255.255.255.255 Ethernet1/0 192.168.121.113
!
ip nat pool outside 4.4.4.1 4.4.4.254 netmask 255.255.255.0
ip nat inside source static 192.168.121.113 2.2.2.1 vrf shop
ip nat inside source static 192.168.122.49 2.2.2.2 vrf shop
ip nat inside source static 192.168.121.113 2.2.2.3 vrf bank
ip nat inside source static 192.168.22.49 2.2.2.4 vrf bank
ip nat inside source static 192.168.121.113 2.2.2.5 vrf park
ip nat inside source static 192.168.22.49 2.2.2.6 vrf park
ip nat outside source list 1 pool outside
!
!
ip default-gateway 10.1.15.1
ip nat pool inside1 2.2.1.1 2.2.1.254 netmask 255.255.255.0
ip nat pool inside2 2.2.2.1 2.2.2.254 netmask 255.255.255.0
ip nat pool inside3 2.2.3.1 2.2.3.254 netmask 255.255.255.0
ip nat inside source list 1 pool inside2 vrf bank
ip nat inside source list 1 pool inside3 vrf park
ip nat inside source list 1 pool inside1 vrf shop
ip nat outside source static 168.58.88.2 4.4.4.1 vrf bank
ip nat outside source static 18.68.58.1 4.4.4.2 vrf park
ip nat outside source static 168.58.88.1 4.4.4.3 vrf shop
ip classless
ip route 192.170.10.0 255.255.255.0 Ethernet1/0 192.168.121.113
ip route 192.170.11.0 255.255.255.0 Serial2/1.1 192.168.121.113
ip route 192.170.12.0 255.255.255.0 FastEthernet0/0 192.168.121.113
ip route vrf shop 0.0.0.0 0.0.0.0 168.58.88.2 global
ip route vrf bank 0.0.0.0 0.0.0.0 168.58.88.2 global
ip route vrf park 0.0.0.0 0.0.0.0 168.58.88.2 global
no ip http server
!
access-list 1 permit 192.168.0.0 0.0.255.255
Where to Go Next
• To learn about Network Address Translation and configure NAT for IP address conservation, see the
“Configuring NAT for IP Address Conservation” module.
• To verify, monitor, and maintain NAT, see the “Monitoring and Maintaining NAT” module.
• To use NAT with application level gateways, see the “Using Application Level Gateways with NAT”
module.
• To configure NAT for high availability, see the “Configuring NAT for High Availability” module.
Technical Assistance
Description Link
Integrating NAT with MPLS VPNs 12.1(13)T The Integrating NAT with MPLS VPNs feature
allows multiple Multiprotocol Label Switching
15.1(1)SY
(MPLS) VPNs to be configured on a single device
to work together.
Translation Entries
Translation entry information includes the following:
Statistical Information
Statistical information includes the following:
• The total number of translations active in the system. This number is incremented each time a translation
is created and is decremented each time a translation is cleared or times out.
• A list of interfaces marked as outside with the ip nat outside command.
• A list of interfaces marked as inside with the ip nat inside command.
• The number of times the software does a translations table lookup and finds an entry.
• The number of times the software does a translations table lookup, fails to find an entry, and must try to
create one.
• A cumulative count of translations that have expired since the router was booted.
• Information about dynamic mappings.
• Information about an inside source translation.
• The access list number being used for the translation.
• The name of the pool.
• The number of translations using this pool.
• The IP network mask being used in the pool.
• The starting IP address in the pool range.
• The ending IP address in the pool range.
• The type of pool. Possible types are generic or rotary.
NAT does not support access control lists (ACLs) with the log option. The same functionality can be achieved
by using one of the following options:
• By having a physical interface or virtual LAN (VLAN) with the logging option
• By using NetFlow
DETAILED STEPS
Step 2 show ip nat translations [verbose] (Optional) Displays active NAT translations.
Example:
Device# show ip nat translations
Step 3 show ip nat statistics (Optional) Displays active NAT translation statistics.
Example:
Device# show ip nat statistics
Example:
The following is sample output from the show ip nat translations command:
Device# show ip nat translations
The following is sample output from the show ip nat translations verbose command:
Device# show ip nat translations verbose
The following is sample output from the show ip nat statistics command:
Device# show ip nat statistics
SUMMARY STEPS
1. enable
2. clear ip nat translation inside global-ip local-ip outside local-ip global-ip
3. clear ip nat translation outside global-ip local-ip
4. clear ip nat translation protocol inside global-ip global-port local-ip local-port outside local-ip
local-port global-ip global-port
5. clear ip nat translation {* | [forced] | [inside global-ip local-ip] [outside local-ip global-ip]}
6. clear ip nat translation inside global-ip local-ip [forced]
7. clear ip nat translation outside local-ip global-ip [forced]
DETAILED STEPS
Step 2 clear ip nat translation inside global-ip local-ip outside (Optional) Clears a single dynamic half-entry containing
local-ip global-ip an inside translation or both an inside and outside translation
created in a dynamic configuration.
Example:
Device# clear ip nat translation inside • A dynamic half-entry is cleared only if it does not have
192.168.2.209 192.168.2.95 outside 192.168.2.100 any child translations.
192.168.2.101
Step 3 clear ip nat translation outside global-ip local-ip (Optional) Clears a single dynamic half-entry containing
an outside translation created in a dynamic configuration.
Example:
Device# clear ip nat translation outside • A dynamic half-entry is cleared only if it does not have
192.168.2.100 192.168.2.80 any child translations.
Step 4 clear ip nat translation protocol inside global-ip (Optional) Clears a UDP translation entry.
global-port local-ip local-port outside local-ip
local-port global-ip global-port
Example:
Device # clear ip nat translation udp inside
192.168.2.209 1220 192.168.2.195 1220 outside
192.168.2.13 53 192.168.2.132 53
Step 5 clear ip nat translation {* | [forced] | [inside global-ip (Optional) Clears either all dynamic translations (with the
local-ip] [outside local-ip global-ip]} * or forced keyword), a single dynamic half-entry
containing an inside translation, or a single dynamic
Example:
half-entry containing an outside translation.
Device# clear ip nat translation *
• A single dynamic half-entry is cleared only if it does
not have any child translations.
Step 6 clear ip nat translation inside global-ip local-ip (Optional) Forces the clearing of a single dynamic half-entry
[forced] and its child translations containing an inside translation
Step 7 clear ip nat translation outside local-ip global-ip (Optional) Forces the clearing of a single dynamic half-entry
[forced] and its child translations containing an outside translation
created in a dynamic configuration.
Example:
Device# clear ip nat translation outside • A dynamic half-entry is always cleared, regardless of
192.168.2.100 192.168.2.80 forced whether it has any child translations.
Cisco IOS commands Cisco IOS Master Command List, All Releases
NAT commands: complete command syntax, command Cisco IOS IP Addressing Services Command
mode, command history, defaults, usage guidelines, Reference
and examples
Technical Assistance
Description Link
NAT—Forced Clear of Dynamic Cisco IOS XE Release The NAT-Forced Clear of Dynamic NAT
NAT Half-Entries 2.4 Half-Entries feature filters the display of the
translation table by specifying an inside or
outside address.
The following commands were introduced or
modified: clear ip nat translations forced,
show ip nat translations.
You must first use the ip nat log translations flow-export v9 udp destination command to enable HSL
for all VPN and non-VPN translations. . VPN translations are also known as Virtual Routing and Forwarding
(VRF) translations.
After you enable HSL for all NAT translations, you can then use the ip nat log translations flow-export v9
vrf-name command to enable or disable translations for specific VPNs. When you use this command, HSL
is disabled for all VPNs, except for the ones the command is explicitly enabled.
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat log translations flow-export v9 udp destination source interface type interface-number
4. ip nat log translations flow-export v9 {vrf-name | global-on}
5. exit
DETAILED STEPS
Step 4 ip nat log translations flow-export v9 {vrf-name | Enables or disables the high-speed logging of specific NAT
global-on} VPN translations.
Example:
Device(config)# ip nat log translations flow-export
v9 VPN-18
Cisco IOS commands Cisco IOS Master Command List, All Releases
Standard/RFC Title
Technical Assistance
Description Link
Enabling NAT Cisco IOS XE Release The Enabling NAT High-Speed Logging per VRF
High-Speed Logging per 3.1S feature provides the ability to enable and disable
VRF Network Address Translation (NAT) high-speed
logging (HAL) for virtual routing and forwarding
(VRF) instances.
The following commands were introduced or modified:
ip nat log translations flow-export.
The figure below shows an IPv4-translatable IPv6 address format with several different prefixes and embedded
IPv4 address positions.
Figure 12: IPv4-Translatable IPv6 Address Format
Prefixes Format
A set of bits at the start of an IPv6 address is called the format prefix. Prefix length is a decimal value that
specifies how many of the leftmost contiguous bits of an address comprise the prefix.
An embedded IPv4 address is used to construct IPv4 addresses from the IPv6 packet. The Stateless NAT64
translator has to derive the IPv4 addresses that are embedded in the IPv6-translatable address by using the
prefix length. The translator has to construct an IPv6-translatable address based on the prefix and prefix length
and embed the IPv4 address based on the algorithm.
The prefix lengths of 32, 40, 48, 56, 64, or 96 are supported for Stateless NAT64 translation. The Well Known
Prefix (WKP) is not supported. When traffic flows from the IPv4-to-IPv6 direction, either a WKP or a
configured prefix can be added only in stateful translation.
The figure below shows stateless translation for scenarios 1 and 2. An IPv6-only network communicates with
the IPv4 Internet.
Scenario 1 is an IPv6 initiated connection and scenario 2 is an IPv4 initiated connection. Stateless NAT64
translates these two scenarios only if the IPv6 addresses are IPv4 translatable. In these two scenarios, the
Stateless NAT64 feature does not help with IPv4 address depletion, because each IPv6 host that communicates
with the IPv4 Internet is a globally routable IPv4 address. This consumption is similar to the IPv4 consumption
rate as a dual-stack. The savings, however, is that the internal network is 100 percent IPv6, which eases
management (Access Control Lists, routing tables), and IPv4 exists only at the edge where the Stateless
translators live.
The figure below shows stateless translation for scenarios 5 and 6. The IPv4 network and IPv6 network are
within the same organization.
Figure 14: Stateless Translation for Scenarios 5 and 6
The IPv4 addresses used are either public IPv4 addresses or RFC 1918 addresses. The IPv6 addresses used
are either public IPv6 addresses or Unique Local Addresses (ULAs).
Both these scenarios consist of an IPv6 network that communicates with an IPv4 network. Scenario 5 is an
IPv6 initiated connection and scenario 6 is an IPv4 initiated connection. The IPv4 and IPv6 addresses may
not be public addresses. These scenarios are similar to the scenarios 1 and 2. The Stateless NAT64 feature
supports these scenarios if the IPv6 addresses are IPv4 translatable.
SUMMARY STEPS
1. enable
2. configure terminal
3. ipv6 unicast-routing
4. interface type number
5. description string
6. ipv6 enable
7. ipv6 address {ipv6-address/prefix-length | prefix-name sub-bits/prefix-length}
8. nat64 enable
9. exit
10. interface type number
11. description string
12. ip address ip-address mask
13. nat64 enable
14. exit
15. nat64 prefix stateless ipv6-prefix/length
16. nat64 route ipv4-prefix/mask interface-type interface-number
17. ipv6 route ipv4-prefix/length interface-type interface-number
18. end
DETAILED STEPS
Device> enable
Step 4 interface type number Configures an interface type and enters interface
configuration mode.
Example:
Step 7 ipv6 address {ipv6-address/prefix-length | prefix-name Configures an IPv6 address based on an IPv6 general prefix
sub-bits/prefix-length} and enables IPv6 processing on an interface.
Example:
Device(config-if)# exit
Step 10 interface type number Configures an interface type and enters interface
configuration mode.
Example:
Device(config-if)# exit
Step 15 nat64 prefix stateless ipv6-prefix/length Defines the Stateless NAT64 prefix to be added to the IPv4
hosts to translate the IPv4 address into an IPv6 address.
Example:
• The command also identifies the prefix that must be
Device(config)# nat64 prefix stateless used to create the IPv4-translatable addresses for the
2001:0db8:0:1::/96 IPv6 hosts.
Step 16 nat64 route ipv4-prefix/mask interface-type Routes the IPv4 traffic towards the correct IPv6 interface.
interface-number
Example:
Step 17 ipv6 route ipv4-prefix/length interface-type Routes the translated packets to the IPv4 address.
interface-number
• You must configure the ipv6 route command if your
Example: network is not running IPv6 routing protocols.
Device(config)# ipv6 route
2001:DB8:0:1::CB00:7100/120 gigabitethernet 0/0/0
Device(config)# end
SUMMARY STEPS
1. enable
2. configure terminal
3. ipv6 unicast-routing
4. interface type number
5. ipv6 address {ipv6-address/prefix-length | prefix-name sub-bits/prefix-length}
6. ipv6 enable
7. nat64 enable
8. nat64 prefix stateless v6v4 ipv6-prefix/length
9. exit
10. interface type number
11. ip address ip-address mask
12. negotiation auto
13. nat64 enable
14. exit
15. nat64 prefix stateless v4v6 ipv6-prefix/length
16. nat64 route ipv4-prefix/mask interface-type interface-number
17. ipv6 route ipv6-prefix/length interface-type interface-number
18. end
DETAILED STEPS
Device> enable
Step 4 interface type number Configures an interface type and enters interface
configuration mode.
Example:
Step 5 ipv6 address {ipv6-address/prefix-length | prefix-name Configures an IPv6 address based on an IPv6 general prefix
sub-bits/prefix-length} and enables IPv6 processing on an interface.
Example:
Step 8 nat64 prefix stateless v6v4 ipv6-prefix/length Maps an IPv6 address to an IPv4 host for Stateless NAT
64 translation.
Example:
• The NAT64 prefix in the command is the same as the
Device(config-if)# nat64 prefix stateless v6v4 prefix of the source packet that is coming from the
2001:0db8:0:1::/96 IPv6-to-IPv4 direction.
Device(config-if)# exit
Step 10 interface type number Configures an interface type and enters interface
configuration mode.
Example:
Router(config-if)# exit
Step 15 nat64 prefix stateless v4v6 ipv6-prefix/length Maps an IPv4 address to an IPv6 host for Stateless NAT
64 translation.
Example:
• This command identifies the prefix that creates the
Device(config)# nat64 prefix stateless v4v6 IPv4-translatable addresses for the IPv6 hosts.
2001:DB8:2::/96
Step 16 nat64 route ipv4-prefix/mask interface-type Routes the IPv4 traffic towards the correct IPv6 interface.
interface-number
Example:
Step 17 ipv6 route ipv6-prefix/length interface-type Routes the translated packets to the IPv4 address.
interface-number
• You must configure the ipv6 route command if your
Example: network is not running IPv6 routing protocols.
Device(config)# ipv6 route
2001:DB8:0:1::CB00:7100/120 gigabitethernet 0/0/0
Device(config)# end
SUMMARY STEPS
1. show nat64 statistics
2. show ipv6 route
3. show ip route
4. debug nat64 {all | ha {all | info | trace | warn} | id-manager | info | issu {all | message | trace} | memory
| statistics | trace | warn}
5. ping [protocol [tag]] {host-name | system-address}
DETAILED STEPS
Example:
NAT64 Statistics
Global Stats:
Packets translated (IPv4 -> IPv6): 21
Packets translated (IPv6 -> IPv4): 15
GigabitEthernet0/0/1 (IPv4 configured, IPv6 configured):
Packets translated (IPv4 -> IPv6): 5
Packets translated (IPv6 -> IPv4): 0
Packets dropped: 0
GigabitEthernet1/2/0 (IPv4 configured, IPv6 configured):
Packets translated (IPv4 -> IPv6): 0
Packets translated (IPv6 -> IPv4): 5
Packets dropped: 0
Step 4 debug nat64 {all | ha {all | info | trace | warn} | id-manager | info | issu {all | message | trace} | memory | statistics
| trace | warn}
This command enables Stateless NAT64 debugging.
Example:
.... .... .... 0000 0000 0000 0000 0000 = Flowlabel: 0x00000000
Payload length: 64
Next header: 64
Hop limit: 64
Source: 2001::c6a7:2 (2001::c6a7:2)
[Source Teredo Server IPv4: 0.0.0.0 (0.0.0.0)]
[Source Teredo Port: 6535]
[Source Teredo Client IPv4: 198.51.100.1 (198.51.100.1)]
Destination: 2001:c6a8:2 (2001::c6a8:2)
[Destination Teredo Server IPv4: 0.0.0.0 {0.0.0.0)]
[Destination Teredo Port: 65535]
[Destination Teredo Client IPv4: 198.51.100.2 {198.51.100.2)]
Internet Control Message Protocol v6
Type: 128 (Echo request)
Code: 0 (Should always be zero)
Checksum: 0xaed2 [correct]
ID: 0x5018
Sequence: 0x0000
Data (56 bytes)
Data: 069ae4c0d3b060008090a0b0c0d0e0f1011121314151617...
[Length: 57]
SUMMARY STEPS
1. enable
2. configure terminal
3. ipv6 unicast-routing
4. interface type number
5. description string
6. ipv6 address {ipv6-address/prefix-length | prefix-name sub-bits/prefix-length}
7. ipv6 enable
8. nat64 enable
9. exit
10. interface type number
11. ip address ip-address mask
12. negotiation auto
13. nat64 enable
14. exit
15. nat64 prefix stateless v4 v6 ipv6-prefix/length src-prefix /dst-prefix vrfdst-prefix
16. nat64 route ipv4-prefix/mask interface-type interface-number
17. ipv6 route ipv6-prefix/length interface-type interface-number
18. end
DETAILED STEPS
Device> enable
Step 4 interface type number Configures an interface type and enters interface
configuration mode.
Example:
Step 6 ipv6 address {ipv6-address/prefix-length | prefix-name Configures an IPv6 address based on an IPv6 general prefix
sub-bits/prefix-length} and enables IPv6 processing on an interface.
Example:
Device(config-if)# exit
Device(config-if)# exit
Step 15 nat64 prefix stateless v4 v6 ipv6-prefix/length Defines the Stateless NAT64 prefix to be added to the IPv4
src-prefix /dst-prefix vrfdst-prefix hosts to translate the IPv4 address into an IPv6 address.
Example: • The command also identifies the prefix that must be
used to create the IPv4-translatable addresses for the
Device(config)# nat64 prefix stateless IPv6 hosts.
2001:0db8:0:1::/96
Step 16 nat64 route ipv4-prefix/mask interface-type Routes the IPv4 traffic towards the correct IPv6 interface.
interface-number
Example:
Step 17 ipv6 route ipv6-prefix/length interface-type Routes the translated packets to the IPv4 address.
interface-number
• You must configure the ipv6 route command if your
Example: network is not running IPv6 routing protocols.
Device(config)# ipv6 route
2001:DB8:0:1::CB00:7100/120 gigabitethernet 0/0/0
Device(config)# end
ipv6 unicast-routing
!
interface gigabitethernet 0/0/0
description interface facing ipv6
ipv6 enable
ipv6 address 2001:DB8::1/128
nat64 enable
!
ipv6 unicast-routing
!
interface gigabitethernet 0/0/0
ipv6 address 2001:DB8::1/128
ipv6 enable
nat64 enable
nat64 prefix stateless v6v4 2001:0db8:0:1::/96
!
interface gigabitethernet 1/2/0
ip address 198.51.100.1 255.255.255.0
negotiation auto
nat64 enable
!
nat64 prefix stateless v4v6 2001:DB8:2::/96
nat64 route 203.0.113.0/24 gigabitethernet 0/0/0
ipv6 route 2001:DB8:0:1::CB00:7100/120 gigabitethernet 0/0/0
Technical Assistance
Description Link
Glossary
ALG—application-layer gateway or application-level gateway.
FP—Forward Processor.
IPv4-converted address—IPv6 addresses used to represent the IPv4 hosts. These have an explicit mapping
relationship to the IPv4 addresses. This relationship is self-described by mapping the IPv4 address in the IPv6
address. Both stateless and stateful translators use IPv4-converted IPv6 addresses to represent the IPv4 hosts.
IPv6-converted address—IPv6 addresses that are assigned to the IPv6 hosts for the stateless translator. These
IPv6-converted addresses have an explicit mapping relationship to the IPv4 addresses. This relationship is
self-described by mapping the IPv4 address in the IPv6 address. The stateless translator uses the corresponding
IPv4 addresses to represent the IPv6 hosts. The stateful translator does not use IPv6-converted addresses,
because the IPv6 hosts are represented by the IPv4 address pool in the translator via dynamic states.
• The translation of IPv4 options, IPv6 routing headers, hop-by-hop extension headers, destination option
headers, and source routing headers is not supported.
• Virtual routing and forwarding (VRF)-aware NAT64 is not supported.
• When traffic flows from IPv6 to IPv4, the destination IP address that you have configured must match
a stateful prefix to prevent hairpinning loops. However, the source IP address (source address of the IPv6
host) must not match the stateful prefix. If the source IP address matches the stateful prefix, packets are
dropped.
Hairpinning allows two endpoints inside Network Address Translation (NAT) to communicate with each
other, even when the endpoints use only each other's external IP addresses and ports for communication.
• Only TCP and UDP Layer 4 protocols are supported for header translation.
• Routemaps are not supported.
• Application-level gateways (ALGs) FTP and ICMP are not supported.
• In the absence of a pre-existing state in NAT 64, stateful translation only supports IPv6-initiated sessions.
• If a static mapping host-binding entry exists for an IPv6 host, the IPv4 nodes can initiate communication.
In dynamic mapping, IPv4 nodes can initiate communication only if a host-binding entry is created for
the IPv6 host through a previously established connection to the same or a different IPv4 host.
Dynamic mapping rules that use Port-Address Translation (PAT), host-binding entries cannot be created
because IPv4-initiated communication not possible through PAT.
• Both NAT44 (static, dynamic and PAT) configuration and stateful NAT64 configuration are not supported
on the same interface.
• The destination IPv6 address is translated mechanically based on the BEHAVE translation draft using
either the configured NAT64 stateful prefix or the Well Known Prefix (WKP).
• The packet is translated from IPv6 to IPv4 and forwarded to the IPv4 network.
When an incoming packet is stateful (if a state exists for an incoming packet), NAT64 identifies the state and
uses the state to translate the packet.
All subsequent IPv4-initiated packets are translated based on the previously created session.
• A new NAT64 translation is created in the session database and in the bind database. The pool and port
databases are updated depending on the configuration. The return traffic and the subsequent traffic of
the IPv6 packet flow will use this session database entry for translation.
IP Packet Filtering
Stateful Network Address Translation 64 (NAT64) filters IPv6 and IPv4 packets. All IPv6 packets that are
transmitted into the stateful translator are filtered because statefully translated IPv6 packets consume resources
in the translator. These packets consume processor resources for packet processing, memory resources (always
session memory) for static configuration, IPv4 address resources for dynamic configuration, and IPv4 address
and port resources for Port Address Translation (PAT).
Stateful NAT64 utilizes configured access control lists (ACLs) and prefix lists to filter IPv6-initiated traffic
flows that are allowed to create the NAT64 state. Filtering of IPv6 packets is done in the IPv6-to-IPv4 direction
because dynamic allocation of mapping between an IPv6 host and an IPv4 address can be done only in this
direction.
Stateful NAT64 supports endpoint-dependent filtering for the IPv4-to-IPv6 packet flow with PAT configuration.
In a Stateful NAT64 PAT configuration, the packet flow must have originated from the IPv6 realm and created
the state information in NAT64 state tables. Packets from the IPv4 side that do not have a previously created
state are dropped. Endpoint-independent filtering is supported with static Network Address Translation (NAT)
and non-PAT configurations.
Address savings N:1 mapping for PAT or overload One-to-one mapping—one IPv4 address
configuration that saves IPv4 addresses. is used for each IPv6 host).
Address space IPv6 systems may use any type of IPv6 IPv6 systems must have
addresses. IPv4-translatable addresses (based on
RFC 6052).
State creation Each traffic flow creates a state in the Traffic flow does not create any state
NAT64 translator. The maximum number in the NAT64 translator. Algorithmic
of states depends on the number of operation is performed on the packet
supported translations. headers.
Table 13: Templates for HSL Bind and Session Create or Destroy
The table below describes the HSL pool exhaustion templates (in the order they are available in the template).
SUMMARY STEPS
1. enable
2. configure terminal
DETAILED STEPS
Step 3 nat64 logging translations flow-export v9 udp Enables the high-speed logging of all VPN and non-VPN
destination addr|ipv6-destination IPv6 address vrfvrf translations for up to four destinations. You can enable
name source interface type interface-number logging for a specific destination VRF using the vrf
keyword. To specify an IPv6 address for the UDP
Example:
destination, use the ipv6-destination keyword followed by
This example shows how to enable high-speed logging the IPv6 address.
using an IPv4 address
Device(config)# nat64 logging translations
flow-export v9 udp destination 10.10.0.1 1020
source GigabitEthernet 0/0/0
Example:
This example shows how to enable high-speed logging
using an IPv6 address
Device(config)# nat64 logging translations
flow-export v9 udp ipv6-destination 2001::06 5050
source GigabitEthernet 0/0/0
Example:
This example shows how to enable high-speed logging
using an IPv6 address for a destination VRF
Device(config)# nat64 logging translations
flow-export v9 udp ipv6-destination 2001::06 5050
vrf hslvrf source GigabitEthernet 0/0/0
Step 4 nat64 logging translations flow-export v9 {vrf-name | Enables or disables the high-speed logging of specific NAT
global-on} VPN translations.
Example:
Device(config)# nat64 logging translations
flow-export v9 VPN-18
Note The FTP64 ALG does not support IPv4-compatible IPv6 addresses.
Based on IPv6-to-IPv4 translation FTP considerations draft-ietf-behave-ftp64-02 and RFC 2228, the FTP64
ALG must switch to transparent mode (a device in a transparent mode is invisible in the network; however,
this device can act as a bridge and inspect or filter packets), when commands and responses flow between the
FTP client and the FTP server. When a client issues the FTP AUTH command, the FTP64 ALG transparently
forwards all data on the control channel in both (ingress and egress) directions, until the end of the control
channel session. Similarly, during an AUTH negotiation, the ALG must be in transparent mode, whether the
negotiation is successful or not.
Based on RFC 6384, the behavior of the FTP64 ALG during a client-server communication is different. During
an IPv6-to-IPv4 translation, the FTP64 ALG must transparently copy data transmitted over the control channel
so that the transport layer security (TLS) session works correctly. However, the client commands and server
responses are hidden from the FTP64 ALG. To ensure a consistent behavior, as soon as the initial FTP AUTH
command is issued by a client, the FTP64 ALG must stop translating commands and responses and start
transparently copying TCP data that is sent by the server to the client and vice versa. The FTP64 ALG must
ignore the AUTH command and not go into transparent mode if the server response is in the 4xx or 5xx ranges,
which comprise FTP error/warning messages.
Prior to CSCtu37975, when an IPv6 FTP client issues an FTP AUTH command, irrespective of whether the
IPv4 FTP server accepts or rejects that authorization negotiation, the FTP64 ALG moves the AUTH session
to transparent mode (or bypass mode). When a session is in transparent mode, NAT cannot perform translation
on the packets within the session. With CSCtu37975, during a client-server communication, the FTP64 ALG’s
behavior is compliant with RFC 6384.
Use the no nat64 service ftp command to disable the NAT64 ALG service.
The FTP64 ALG synchronizes data when it receives the following messages:
• User authentication flag after 230 replies.
• ALG disable/enable flag after ALG ENABLE and ALG DISABLE messages are received.
• Fragment detection information after the first segmented packet is detected.
• Fragment detection information after the end of the segmentation is detected.
When a standby FP is inserted or when a standby FP recovers from a reload, the active FP performs a bulk
synchronization to synchronize the standby FP with the active FP. NAT does an aggressive synchronization
by which the active FP pushes all the state information forcefully to the standby FP.
In addition to NAT64 session information, application-specific information (application-level gateway [ALG]
information) also has to be communicated to the standby FP. Each ALG has a per-session state that needs to
be synchronized in the standby. The ALG triggers the sending of all ALG state information to the standby
FP. NAT provides the mechanism for actually sending the ALG state and associates the state to a particular
session.
HTTP sessions are not backed up on the standby FP. To replicate HTTP sessions on the standby FP during a
switchover, you must configure the nat64 switchover replicate http enable command.
Note The Stateful NAT64—Intrachassis Redundancy feature does not support box-to-box (B2B) redundancy
or asymmetric routing.
Note You need to configure at least one of the configurations described in the following tasks for Stateful
NAT64 to work.
SUMMARY STEPS
1. enable
2. configure terminal
3. ipv6 unicast-routing
4. interface type number
5. description string
6. ipv6 enable
7. ipv6 address {ipv6-address/prefix-length | prefix-name sub-bits/prefix-length}
8. nat64 enable
9. exit
10. interface type number
11. description string
12. ip address ip-address mask
13. nat64 enable
14. exit
15. nat64 prefix stateful ipv6-prefix/length
DETAILED STEPS
Step 4 interface type number Configures an interface type and enters interface
configuration mode.
Example:
Device(config)# interface gigabitethernet 0/0/0
Step 7 ipv6 address {ipv6-address/prefix-length | prefix-name Configures an IPv6 address based on an IPv6 general prefix
sub-bits/prefix-length} and enables IPv6 processing on an interface.
Example:
Device(config-if)# ipv6 address 2001:DB8:1::1/96
Step 10 interface type number Configures an interface and enters interface configuration
mode.
Example:
Step 15 nat64 prefix stateful ipv6-prefix/length Defines the Stateful NAT64 prefix to be added to IPv4
hosts to translate the IPv4 address into an IPv6 address.
Example:
Device(config)# nat64 prefix stateful • The Stateful NAT64 prefix can be configured at the
2001:DB8:1::1/96 global configuration level or at the interface level.
Step 16 nat64 v6v4 static ipv6-address ipv4-address Enables NAT64 IPv6-to-IPv4 static address mapping.
Example:
Device(config)# nat64 v6v4 static 2001:DB8:1::FFFE
209.165.201.1
SUMMARY STEPS
1. enable
2. configure terminal
3. ipv6 unicast-routing
DETAILED STEPS
Step 4 interface type number Configures an interface type and enters interface
configuration mode.
Example:
Device(config)# interface gigabitethernet 0/0/0
Step 7 ipv6 {ipv6-address/prefix-length | prefix-name Configures an IPv6 address based on an IPv6 general prefix
sub-bits/prefix-length} and enables IPv6 processing on an interface.
Example:
Device(config-if)# ipv6 2001:DB8:1::1/96
Step 10 interface type number Configures an interface type and enters interface
configuration mode
Example:
Device(config)# interface gigabitethernet 1/2/0
Step 15 ipv6 access-list access-list-name Defines an IPv6 access list and enters IPv6 access list
configuration mode.
Example:
Device(config)# ipv6 access-list nat64-acl
Step 16 permit ipv6 ipv6-address any Sets permit conditions for an IPv6 access list.
Example:
Device(config-ipv6-acl)# permit ipv6
2001:DB8:2::/96 any
Step 18 nat64 prefix stateful ipv6-prefix/length Enables NAT64 IPv6-to-IPv4 address mapping.
Example:
Device(config)# nat64 prefix stateful
2001:DB8:1::1/96
Step 19 nat64 v4 pool pool-name start-ip-address end-ip-address Defines the Stateful NAT64 IPv4 address pool.
Example:
Device(config)# nat64 v4 pool pool1 209.165.201.1
209.165.201.254
Step 20 nat64 v6v4 list access-list-name pool pool-name Dynamically translates an IPv6 source address to an IPv6
source address and an IPv6 destination address to an IPv4
Example:
destination address for NAT64.
Device(config)# nat64 v6v4 list nat64-acl pool
pool1
SUMMARY STEPS
1. enable
2. configure terminal
3. ipv6 unicast-routing
4. interface type number
5. description string
6. ipv6 enable
7. ipv6 {ipv6-address/prefix-length | prefix-name sub-bits/prefix-length}
8. nat64 enable
9. exit
10. interface type number
11. description string
12. ip address ip-address mask
DETAILED STEPS
Step 4 interface type number Configures an interface type and enters interface
configuration mode.
Example:
Device(config)# interface gigabitethernet 0/0/0
Step 7 ipv6 {ipv6-address/prefix-length | prefix-name Configures an IPv6 address based on an IPv6 general prefix
sub-bits/prefix-length} and enables IPv6 processing on an interface.
Example:
Device(config-if)# ipv6 2001:DB8:1::1/96
Step 10 interface type number Configures an interface type and enters interface
configuration mode
Example:
Device(config)# interface gigabitethernet 1/2/0
Step 15 ipv6 access-list access-list-name Defines an IPv6 access list and places the device in IPv6
access list configuration mode.
Example:
Device(config)# ipv6 access-list nat64-acl
Step 16 permit ipv6 ipv6-address any Sets permit conditions for an IPv6 access list.
Example:
Device(config-ipv6-acl)# permit ipv6
2001:db8:2::/96 any
Step 17 exit Exits IPv6 access list configuration mode and enters global
configuration mode.
Example:
Device(config-ipv6-acl)# exit
Step 18 nat64 prefix stateful ipv6-prefix/length Enables NAT64 IPv6-to-IPv4 address mapping.
Example:
Device(config)# nat64 prefix stateful
2001:db8:1::1/96
Step 20 nat64 v6v4 list access-list-name pool pool-name Enables NAT64 PAT or overload address translation.
overload
Example:
Device(config)# nat64 v6v4 list nat64-acl pool
pool1 overload
SUMMARY STEPS
1. show nat64 aliases [lower-address-range upper-address-range]
2. show nat64 logging
3. show nat64 prefix stateful {global | {interfaces | static-routes} [prefix ipv6-address/prefix-length]}
4. show nat64 timeouts
DETAILED STEPS
Aliases configured: 1
Address Table ID Inserted Flags Send ARP Reconcilable Stale Ref-Count
10.1.1.1 0 FALSE 0x0030 FALSE TRUE FALSE 1
Step 3 show nat64 prefix stateful {global | {interfaces | static-routes} [prefix ipv6-address/prefix-length]}
This command displays information about NAT64 stateful prefixes.
Example:
Device# show nat64 prefix stateful interfaces
Stateful Prefixes
NAT64 Timeout
enable
configure terminal
ipv6 unicast-routing
interface gigabitethernet 0/0/0
description interface facing ipv6
ipv6 enable
ipv6 2001:DB8:1::1/96
nat64 enable
exit
interface gigabitethernet 1/2/0
description interface facing ipv4
ip address 209.165.201.24 255.255.255.0
nat64 enable
exit
ipv6 access-list nat64-acl
permit ipv6 2001:db8:2::/96 any
exit
nat64 prefix stateful 2001:db8:1::1/96
nat64 v4 pool pool1 209.165.201.1 209.165.201.254
nat64 v6v4 list nat64-acl pool pool1 overload
end
! Router B Configuration
Standard/RFC Title
FTP ALG for IPv6-to-IPv4 translation An FTP ALG for IPv6-to-IPv4 translation
draft-ietf-behave-ftp64-06
Stateful NAT64: Network Address and Stateful NAT64: Network Address and Protocol Translation from
Protocol Translation from IPv6 Clients IPv6 Clients to IPv4 Servers
to IPv4 Servers draft-ietf-behave-v6v4-xlate-stateful-12
Technical Assistance
Description Link
Asymmetric Routing Support for Cisco IOS XE Release In Cisco IOS XE Release and later releases,
NAT64 3.16S Network Address Translation 64 (NAT64)
supports asymmetric routing and asymmetric
routing with Multiprotocol Label Switching
(MPLS).
FTP64 NAT ALG Intrabox HA Cisco IOS XE Release In Cisco IOS XE Release 3.5S, the FTP64 ALG
Support 3.5S adds HA support for Stateful NAT64. The
FTP64 NAT ALG Intrabox HA Support feature
supports the stateful switchover between
redundant FPs within a single chassis. The HA
support provided by the FTP64 ALG is
applicable to both intrabox and interbox HA
and In-Service Software Upgrade (ISSU).
Stateful NAT64 ALG—Stateful Cisco IOS XE Release Cisco IOS XE Release 3.4S and later releases
FTP64 ALG Support 3.4S support FTP64 (or service FTP) ALGs. The
FTP64 ALG helps Stateful NAT64 operate on
Layer 7 data. An FTP ALG translates IP
addresses and the TCP port information
embedded in the payload of an FTP control
session.
The following commands were introduced or
modified: nat64 service ftp.
Stateful NAT64—Intra-Chassis Cisco IOS XE Release Cisco IOS XE Release 3.5S and later releases
Redundancy 3.5S support the Stateful NAT64—Intra-Chassis
Redundancy feature. When a second Forward
Cisco IOS XE Release
Processor (FP) is available inside a single
3.10S
chassis, the Stateful NAT64 Intra-Chassis
Redundancy feature enables you to configure
the second FP as a standby entity. The standby
FP maintains a backup of the stateful NAT64
session information and when the active (first)
FP fails, there is no disruption of NAT64
sessions.
The following commands were introduced or
modified: nat64 switchover replicate http
port.
Stateful Network Address Cisco IOS XE Release The Stateful Network Address Translation 64
Translation 64 3.4S feature provides a translation mechanism that
translates IPv6 packets into IPv4 packets and
vice versa. The Stateful NAT64 translator,
algorithmically translates the IPv4 addresses
of IPv4 hosts to and from IPv6 addresses by
using the configured stateful prefix. In a similar
manner, the IPv6 addresses of IPv6 hosts are
translated to and from IPv4 addresses through
NAT.
The following commands were introduced or
modified: clear nat64 statistics, debug nat64,
nat64 logging, nat64 prefix stateful, nat64
translation, nat64 v4, nat64 v4v6, nat64
v6v4, show nat64 aliases, show nat64 limits,
show nat64 logging, show nat64 mappings
dynamic, show nat64 mappings static, show
nat64 services, show nat64 pools, show nat64
prefix stateful, show nat64 statistics, show
nat64 timeouts, and show nat64 translations.
Glossary
ALG—application-layer gateway or application-level gateway.
FP—Forward Processor.
IPv4-converted address—IPv6 addresses used to represent the IPv4 hosts. These have an explicit mapping
relationship to the IPv4 addresses. This relationship is self-described by mapping the IPv4 address in the IPv6
address. Both stateless and stateful translators use IPv4-converted IPv6 addresses to represent the IPv4 hosts.
IPv6-converted address—IPv6 addresses that are assigned to the IPv6 hosts for the stateless translator. These
IPv6-converted addresses have an explicit mapping relationship to the IPv4 addresses. This relationship is
self-described by mapping the IPv4 address in the IPv6 address. The stateless translator uses the corresponding
IPv4 addresses to represent the IPv6 hosts. The stateful translator does not use IPv6-converted addresses,
because the IPv6 hosts are represented by the IPv4 address pool in the translator via dynamic states.
NAT—Network Address Translation.
RP—Route Processor.
stateful translation—In stateful translation a per-flow state is created when the first packet in a flow is
received. A translation algorithm is said to be stateful if the transmission or reception of a packet creates or
modifies a data structure in the relevant network element. Stateful translation allows the use of multiple
translators interchangeably and also some level of scalability. Stateful translation is defined to enable the IPv6
clients and peers without mapped IPv4 addresses to connect to the IPv4-only servers and peers.
stateless translation—A translation algorithm that is not stateful is called stateless. A stateless translation
requires configuring a static translation table, or may derive information algorithmically from the messages
it is translating. Stateless translation requires less computational overhead than stateful translation. It also
requires less memory to maintain the state, because the translation tables and the associated methods and
processes exist in a stateful algorithm and do not exist in a stateless one. Stateless translation enables the
IPv4-only clients and peers to initiate connections to the IPv6-only servers or peers that are equipped with
IPv4-embedded IPv6 addresses. It also enables scalable coordination of IPv4-only stub networks or ISP
IPv6-only networks. Because the source port in an IPv6-to-IPv4 translation may have to be changed to provide
adequate flow identification, the source port in the IPv4-to-IPv6 direction need not be changed.
of the application to occur. When a switchover occurs, the application activity continues to run seamlessly
on the redundant interface.
The figure below depicts an active/standby load-sharing scenario. The figure shows how an RG is configured
for a pair of devices that has one outgoing interface. Group A on Router 1 is the active RG and Group A on
Router 2 is the standby RG.
Redundant devices are joined by a configurable control link and a data synchronization link. The control link
is used to communicate the status of devices. The data synchronization link is used to transfer stateful
information from Network Address Translation (NAT) and the firewall and synchronize the stateful database.
The pairs of redundant interfaces are configured with the same unique ID number known as the redundant
interface identifier (RII).
Figure 15: Redundancy Group Configuration—One Outgoing Interface
The status of redundancy group members is determined through the use of hello messages sent over the control
link. The software considers either device not responding to a hello message within a configurable amount
of time to be a failure and initiates a switchover. For the software to detect a failure in milliseconds, control
links run the failover protocol that is integrated with the Bidirectional Forwarding Detection (BFD) protocol.
You can configure the following parameters for hello messages:
• Hello time—Interval at which hello messages are sent.
• Hold time—Amount of time before which the active or standby device is declared to be down.
The hello time defaults to 3 seconds to align with the Hot Standby Router Protocol (HSRP), and the hold time
defaults to 10 seconds. You can also configure these timers in milliseconds by using the timers hellotime
msec command.
To determine the pairs of interfaces that are affected by the switchover, you must configure a unique ID for
each pair of redundant interfaces. This ID is known as the RII that is associated with the interface.
A switchover to the standby device can occur when the priority setting that is configured on each device
changes. The device with the highest priority value acts as the active device. If a fault occurs on either the
active or standby device, the priority of the device is decremented by a configurable amount known as the
weight. If the priority of the active device falls below the priority of the standby device, a switchover occurs
and the standby device becomes the active device. This default behavior can be overridden by disabling the
preemption attribute for the RG. You can also configure each interface to decrease the priority when the Layer
1 state of the interface goes down. The priority that is configured overrides the default priority of an RG.
Each failure event that causes a modification of an RG priority generates a syslog entry that contains a time
stamp, the RG that was affected, the previous priority, the new priority, and a description of the failure event
cause.
A switchover also can occur when the priority of a device or interface falls below a configurable threshold
level.
A switchover to the standby device occurs under the following circumstances:
• Power loss or a reload occurs on the active device (including reloads).
• The run-time priority of the active device goes below that of the standby device (with preempt configured).
• The run-time priority of the active device goes below that of the configured threshold.
• The redundancy group on the active device is reloaded manually. Use the redundancy application
reload group rg-number command for a manual reload.
Active/Active Failover
In an active/active failover configuration, both devices can process network traffic. Active/active failover
generates virtual MAC (VMAC) addresses for interfaces in each redundancy group (RG).
One device in an active/active failover pair is designated as the primary (active) device, and the other is
designated as the secondary (standby) device. Unlike with active/standby failover, this designation does not
indicate which device becomes active when both devices start simultaneously. Instead, the primary/secondary
designation determines the following:
• The device that provides the running configuration to the failover pair when they start simultaneously.
• The device on which the failover RG appears in the active state when devices start simultaneously. Each
failover RG in the configuration is configured with a primary or secondary device preference. You can
configure both failover RGs to be in the active state on a single device and the standby failover RGs to
be on the other device. You can also configure one failover RG to be in the active state and the other RG
to be in the standby state on a single device.
Active/Standby Failover
Active/standby failover enables you to use a standby device to take over the functionality of a failed device.
A failed active device changes to the standby state, and the standby device changes to the active state. The
device that is now in the active state takes over IP addresses and MAC addresses of the failed device and
starts processing traffic. The device that is now in the standby state takes over standby IP addresses and MAC
addresses. Because network devices do not see any change in the MAC-to-IP address pairing, Address
Resolution Protocol (ARP) entries do not change or time out anywhere on the network.
In an active/standby scenario, the main difference between two devices in a failover pair depends on which
device is active and which device is a standby, namely which IP addresses to use and which device actively
passes the traffic. The active device always becomes the active device if both devices start up at the same
time (and are of equal operational health). MAC addresses of the active device are always paired with active
IP addresses.
LAN-LAN Topology
In a LAN-LAN topology, all participating devices are connected to each other through LAN interfaces on
both the inside and the outside. In this scenario, the traffic is often directed to the correct firewall if static
routing is configured on the upstream or downstream devices to an appropriate virtual IP address. The dynamic
routing configuration supported on LAN-facing interfaces must not introduce a dependency on routing protocol
convergence; otherwise, fast failover requirements will not be met. The figure below shows a LAN-LAN
topology.
Figure 16: LAN-LAN Scenario
Translation Filtering
RFC 4787 provides translation filtering behaviors for Network Address Translation (NAT). The following
options are used by NAT to filter packets that originate from specific external endpoints:
• Endpoint-independent filtering—Filters out packets that are not destined to an internal IP address and
port regardless of the external IP address and port source.
• Address-dependent filtering—Filters out packets that are not destined to an internal IP address. NAT
also filters out packets that are destined for an internal endpoint.
• Address- and port-dependent filtering—Filters out packets that are not destined to an internal IP address.
NAT also filters out packets that are destined for an internal endpoint if packets were not sent to the
endpoint previously.
Note The FTP64 ALG does not support IPv4-compatible IPv6 addresses.
Based on IPv6-to-IPv4 translation FTP considerations draft-ietf-behave-ftp64-02 and RFC 2228, the FTP64
ALG must switch to transparent mode (a device in a transparent mode is invisible in the network; however,
this device can act as a bridge and inspect or filter packets), when commands and responses flow between the
FTP client and the FTP server. When a client issues the FTP AUTH command, the FTP64 ALG transparently
forwards all data on the control channel in both (ingress and egress) directions, until the end of the control
channel session. Similarly, during an AUTH negotiation, the ALG must be in transparent mode, whether the
negotiation is successful or not.
Based on RFC 6384, the behavior of the FTP64 ALG during a client-server communication is different. During
an IPv6-to-IPv4 translation, the FTP64 ALG must transparently copy data transmitted over the control channel
so that the transport layer security (TLS) session works correctly. However, the client commands and server
responses are hidden from the FTP64 ALG. To ensure a consistent behavior, as soon as the initial FTP AUTH
command is issued by a client, the FTP64 ALG must stop translating commands and responses and start
transparently copying TCP data that is sent by the server to the client and vice versa. The FTP64 ALG must
ignore the AUTH command and not go into transparent mode if the server response is in the 4xx or 5xx ranges,
which comprise FTP error/warning messages.
Prior to CSCtu37975, when an IPv6 FTP client issues an FTP AUTH command, irrespective of whether the
IPv4 FTP server accepts or rejects that authorization negotiation, the FTP64 ALG moves the AUTH session
to transparent mode (or bypass mode). When a session is in transparent mode, NAT cannot perform translation
on the packets within the session. With CSCtu37975, during a client-server communication, the FTP64 ALG’s
behavior is compliant with RFC 6384.
DETAILED STEPS
DETAILED STEPS
Step 6 name group-name Configures a name for the redundancy application group.
Example:
Device(config-red-app-grp)# name RG1
Step 7 control interface-type interface-number protocol id Configures a control interface type and number for the
redundancy application group.
Example:
Device(config-red-app-grp)# control
gigabitethernet 0/0/1 protocol 1
Step 8 data interface-type interface-number Configures a data interface type and number for the
redundancy application group.
Example:
Device(config-red-app-grp)# data gigabitethernet
0/2/2
SUMMARY STEPS
1. enable
2. configure terminal
3. redundancy
4. application redundancy
5. group id
6. name group-name
7. priority value [failover-threshold value]
8. control interface-type interface-number protocol id
9. data interface-type interface-number
10. end
DETAILED STEPS
Step 6 name group-name Configures a name for the redundancy application group.
Example:
Device(config-red-app-grp)# name RG1
Step 7 priority value [failover-threshold value] Specifies a group priority and failover threshold value for
the redundancy group.
Example:
Device(config-red-app-grp)# priority 195
failover-threshold 190
Step 8 control interface-type interface-number protocol id Configures a control interface type and number for the
redundancy application group.
Example:
Device(config-red-app-grp)# control
gigabitethernet 0/0/1 protocol 1
Step 15 name group-name Configures a name for the redundancy application group.
Example:
Device(config-red-app-grp)# name RG2
Step 16 priority value [failover-threshold value] Specifies a group priority and failover threshold value for
the redundancy group.
Example:
Device(config-red-app-grp)# priority 205
failover-threshold 200
Step 17 control interface-type interface-number protocol id Configures a control interface type and number for the
redundancy application group.
Example:
Device(config-red-app-grp)# control
gigabitethernet 0/0/1 protocol 2
Step 18 data interface-type interface-number Configures a data interface type and number for the
redundancy application group.
Example:
Device(config-red-app-grp)# data gigabitethernet
0/2/2
SUMMARY STEPS
1. enable
2. configure terminal
3. interface type number
4. redundancy rii id
5. redundancy group group-id ipv6 ipv6-prefix/prefix-length exclusive decrement value
6. exit
7. interface type number
8. redundancy rii id
9. redundancy group group-id ipv6 ipv6-prefix/prefix-length exclusive decrement value
10. end
DETAILED STEPS
Step 3 interface type number Configures an interface and enters interface configuration
mode.
Example:
Device(config)# interface gigabitethernet 0/0/0
Step 7 interface type number Configures an interface and enters interface configuration
mode.
Example:
Device(config)# interface gigabitethernet 0/1/1
SUMMARY STEPS
1. enable
2. configure terminal
3. ipv6 unicast-routing
4. interface type number
5. ipv6 enable
6. ipv6 address ipv6-address/prefix-length
7. nat64 enable
8. exit
9. Repeat Steps 3 to 8 to configure NAT64 on another interface.
10. nat64 prefix stateful ipv6-prefix/length
11. nat64 v6v4 static ipv6-address ipv6-address [redundancy group-id mapping-id id]
12. nat64 v6v4 tcp ipv6-address ipv6-port ipv4-address ipv4-port [redundancy group-id mapping-id id]
13. end
14. show nat64 translations protocol tcp
15. show nat64 translations redundancy group-id
DETAILED STEPS
Step 4 interface type number Configures an interface and enters interface configuration
mode.
Example:
Device(config)# interface gigabitethernet 0/0/1
Step 6 ipv6 address ipv6-address/prefix-length Configures an IPv6 address based on an IPv6 general prefix
and enables IPv6 processing on an interface.
Example:
Device(config-if)# ipv6 address 2001:DB8:1::1/96
Step 11 nat64 v6v4 static ipv6-address ipv6-address [redundancy Enables NAT64 IPv6-to-IPv4 static address mapping and
group-id mapping-id id] interchassis redundancy.
Example:
Device(config)# nat64 v6v4 static 2001:DB8:1::FFFE
209.165.201.1 redundancy 1 mapping-id 30
Step 12 nat64 v6v4 tcp ipv6-address ipv6-port ipv4-address Applies static mapping to TCP protocol packets and
ipv4-port [redundancy group-id mapping-id id] enables interchassis redundancy.
Example:
Device(config)# nat64 v6v4 tcp 2001:DB8:1::1
redundancy 1 mapping-id 1
Step 14 show nat64 translations protocol tcp Displays information about NAT 64 protocol translations.
Example:
Device# show nat64 translations protocol tcp
Step 15 show nat64 translations redundancy group-id Displays information about NAT64 redundancy
translations.
Example:
Device# show nat64 translations redundancy 1
Example:
The following is sample output from the show nat64 translations protocol tcp command:
Device# show nat64 translations protocol tcp
The following is sample output from the show nat64 translations redundancy command:
209.165.201.2:21 [2001:DB8:1::103]:32847
Additional References
Related Documents
Standards/RFCs
Standard/RFC Title
RFC 4787 Network Address Translation (NAT) Behavioral Requirements for Unicast
UDP
Technical Assistance
Description Link
MAP-T is a mechanism that performs double translation (IPv4 to IPv6 and vice versa) on customer edge (CE)
devices and border routers. The Mapping of Address and Port Using Translation feature supports only the
MAP-T border router functionality. This feature does not support the MAP-T CE functionality.
The Mapping of Address and Port Using Translation feature leverages the Network Address Translation 64
(NAT64) translation engine and adds the MAP-T border router function to the NAT64 stateless function.
MAP-T is enabled on IPv4 and IPv6 interfaces. MAP-T uses IPv4 and IPv6 forwarding, IPv4 and IPv6
fragmentation functions, and NAT64 translation functions. A MAP-T domain is one or more MAP CE devices
and a border router, all connected to the same IPv6 network.
A MAP-T CE device connects a user’s private IPv4 address and the native IPv6 network to the IPv6-only
MAP-T domain. The MAP-T border router uses the stateless IPv4/IPv6 translation to connect external IPv4
networks to all devices available in the one or more MAP-T domains. MAP-T requires only one IPv6 prefix
per network and supports the regular IPv6 prefix/address assignment mechanisms. The MAP-T domain
contains regular IPv6-only hosts or servers that have an IPv4-translatable IPv6 address. MAP-T does not
require the operation of an IPv4 overlay network or the introduction of a non-native-IPv6 network device or
server functionality.
A MAP-T configuration provides the following features:
• Retains the ability for IPv4 end hosts to communicate across the IPv6 domain with other IPv4 hosts.
• Permits both individual IPv4 address assignment and IPv4 address sharing with a predefined port range.
• Allows communication between IPv4-only and IPv6-enabled end hosts and native IPv6-only servers in
domains that use IPv4-translatable IPv6 addresses.
• Allows the use of IPv6 native network operations, including the ability to classify IP traffic and perform
IP traffic routing optimization policies such as routing optimization based on peering policies for IPv4
destinations outside the domain.
• An FMR is used for forwarding packets. Each FMR results in an entry in the MRT for the rule IPv4
prefix. FMR is an optional rule for mapping IPv4 and IPv6 destinations within a MAP-T domain.
Note FMR is not supported by the Mapping of Address and Port Using Translation
feature.
Note Forwarding mapping rule (FMR) is not supported by the Mapping of Address and Port Using Translation
feature.
The figure below shows the mapped CE address format as defined in MAP-T configuration. This address
format is used in basic mapping rule (BMR) and FMR operations.
Figure 17: IPv4-Translatable Address for BMR and FMR
The figure below shows the address format used by the MAP-T default mapping rule (DMR), an IPv4-translated
address that is specific to MAP-T configuration.
Figure 18: IPv4-Translated Address for DMR
Note The Mapping of Address and Port Using Translation feature does not support the MAP-T customer edge
(CE) functionality. The CE functionality is provided by third-party devices.
mapping the destination IPv4 address without the port information for packets that do not contain the ID field,
and the corresponding CE device translates the ICMPv6 packets to ICMP.
SUMMARY STEPS
1. enable
2. configure terminal
3. nat64 map-t domain number
4. default-mapping-rule ipv6-prefix/prefix-length
5. basic-mapping-rule
6. ipv6-prefix prefix/length
7. ipv4-prefix prefix/length
8. port-parameters share-ratio ratio [start-port port-number]
9. end
10. show nat64 map-t domain number
DETAILED STEPS
Step 3 nat64 map-t domain number Configures the Network Address Translation 64 (NAT64)
mapping of address and port using translation (MAP-T)
Example:
domain and enters NAT64 MAP-T configuration mode.
Device(config)# nat64 map-t domain 1
Step 4 default-mapping-rule ipv6-prefix/prefix-length Configures the default domain mapping rule for the MAP-T
domain.
Example:
Device(config-nat64-mapt)# default-mapping-rule
2001:DA8:B001:FFFF::/64
Step 5 basic-mapping-rule Configures the basic mapping rule (BMR) for the MAP-T
domain and enters NAT64 MAP-T BMR configuration
Example:
mode.
Device(config-nat64-mapt)# basic-mapping-rule
Step 6 ipv6-prefix prefix/length Configures an IPv6 address and prefix for the MAP-T
BMR.
Example:
Device(config-nat64-mapt-bmr)# ipv6-prefix
2001:DA8:B001::/56
Step 7 ipv4-prefix prefix/length Configures an IPv4 address and prefix for the MAP-T
BMR.
Example:
Device(config-nat64-mapt-bmr)# ipv4-prefix
202.1.0.128/28
Step 8 port-parameters share-ratio ratio [start-port Configures port parameters for the MAP-T BMR.
port-number]
Example:
Device(config-nat64-mapt-bmr)# port-parameters
share-ratio 16 start-port 1024
Step 10 show nat64 map-t domain number Displays MAP-T domain information.
Example:
Device# show nat64 map-t domain 1
Example:
The following is sample output from the show nat64 map-t domain command:
Device# show nat64 map-t domain 1
MAP-T Domain 1
Mode MAP-T
Default-mapping-rule
Ip-v6-prefix 2001:DA8:B001:FFFF::/64
Basic-mapping-rule
Ip-v6-prefix 2001:DA8:B001::/56
Ip-v4-prefix 202.1.0.128/28
Port-parameters
Share-ratio 16 Contiguous-ports 64 Start-port 1024
Share-ratio-bits 4 Contiguous-ports-bits 6 Port-offset-bits 6
At the PC:
An IPv4 packet goes from 202.1.0.130 to 11.1.1.1. At the customer edge (CE) device the Mapping
of address and port mapping using translation (MAP-T) function translates the packet to Src:
2201:DA8:B001:2E:0:CA01:82:E00 Dest: 2001:DA8:B001:FFFF:B:0101:0100:0.
At the border router the MAP-T border router translates the packet to
Packet goes from 192.168.1.2 ---> 74.1.1.1, source 4000, destination port : 5000
At the CPE the MAP-T CE function translates the
packet to Src: 2201:DA8:B001:2E:0:CA01:82:E00 Dest: 2001:DA8:B001:FFFF:B:0101:0100:0.
At the BR the MAP-T BR function translates the packet to
Src:203.38.102.130 Dst:74.1.1.1 SrcPort:4000 DstPort:5000
From End device:
Src:74.1.1.1 Dst:203.38.102.130 SrcPort:4000 DstPort:5000
At the BR the MAP-T BR function translates the packet to
Src: 2201:DA8:B001:2E:0:CA01:82:E00 Dest: 2001:DA8:B001:FFFF:B:0101:0100:0.
At the CE the MAP-T CE function translates the packet from
Src: 2201:DA8:B001:2E:0:CA01:82:E00 Dest: 2001:DA8:B001:FFFF:B:0101:0100:0.
To
Src:74.1.1.1 Dst:203.38.102.130 SrcPort:4000 Dstport:5000
Cisco IOS commands Cisco IOS Master Command List, All Releases
Standard/RFC Title
Technical Assistance
Description Link
Glossary
EA bits—Embedded address bits. The IPv4 EA bits in the IPv6 address identify an IPv4 prefix/address (or
part thereof) or a shared IPv4 address (or part thereof) and a port-set identifier.
IP fragmentation—The process of breaking a datagram into a number of pieces that can be reassembled
later. The IP source, destination, identification, total length, and fragment offset fields, along with the More
fragments and Don't Fragment (DF) flags in the IP header, are used for IP fragmentation and reassembly. A
DF bit is a bit within the IP header that determines whether a device is allowed to fragment a packet.
IPv4-translatable address—IPv6 addresses that are used to represent IPv4 hosts. These addresses have an
explicit mapping relationship to IPv6 addresses. This relationship is self-described by mapping the IPv4
address in the IPv6 address. Both stateless and stateful translators use IPv4-translatable (also called
IPv4-converted) IPv6 addresses to represent IPv4 hosts.
IPv6-translatable address—IPv6 addresses that are assigned to IPv6 hosts for stateless translation. These
IPv6-translatable addresses (also called IPv6-converted addresses) have an explicit mapping relationship to
IPv4 addresses. This relationship is self-described by mapping the IPv4 address in the IPv6 address. The
stateless translator uses corresponding IPv4 addresses to represent IPv6 hosts. The stateful translator does not
use IPv6-translatable addresses because IPv6 hosts are represented by the IPv4 address pool in the translator
via dynamic states.
MAP rule—A set of parameters that define the mapping between an IPv4 prefix, an IPv4 address or a shared
IPv4 address, and an IPv6 prefix or address. Each MAP domain uses a different mapping rule set.
MAP-T border router—A mapping of address and port using translation (MAP-T)-enabled router or translator
at the edge of a MAP domain that provides connectivity to the MAP-T domain. A border relay router has at
least one IPv6-enabled interface and one IPv4 interface connected to the native IPv4 network, and this router
can serve multiple MAP-T domains.
MAP-T CE—A device that functions as a customer edge (CE) router in a MAP-T deployment. A typical
MAP-T CE device that adopts MAP rules serves a residential site with one WAN-side interface and one or
more LAN-side interfaces. A MAP-T CE device can also be referred to as a “CE” within the context of a
MAP-T domain.
MAP-T domain—Mapping of address and port using translation (MAP-T) domain. One or more customer
edge (CE) devices and a border router, all connected to the same IPv6 network. A service provider may deploy
a single MAP-T domain or use multiple MAP domains.
MRT—MAP rule table. Address and port-aware data structure that supports the longest match lookups. The
MRT is used by the MAP-T forwarding function.
path MTU—Path maximum transmission unit (MTU) discovery prevents fragmentation in the path between
endpoints. Path MTU discovery is used to dynamically determine the lowest MTU along the path from a
packet’s source to its destination. Path MTU discovery is supported only by TCP and UDP. Path MTU
discovery is mandatory in IPv6, but it is optional in IPv4. IPv6 devices never fragment a packet—only the
sender can fragment packets.
stateful translation—Creates a per-flow state when the first packet in a flow is received. A translation
algorithm is said to be stateful if the transmission or reception of a packet creates or modifies a data structure
in the relevant network element. Stateful translation allows the use of multiple translators interchangeably
and also some level of scalability. Stateful translation enables IPv6 clients and peers without mapped IPv4
addresses to connect to IPv4-only servers and peers.
stateless translation—A translation algorithm that is not stateful. A stateless translation requires configuring
a static translation table or may derive information algorithmically from the messages that it is translating.
Stateless translation requires less computational overhead than stateful translation. It also requires less memory
to maintain the state because the translation tables and the associated methods and processes exist in a stateful
algorithm and do not exist in a stateless one. Stateless translation enables IPv4-only clients and peers to initiate
connections to IPv6-only servers or peers that are equipped with IPv4-embedded IPv6 addresses. It also
enables scalable coordination of IPv4-only stub networks or ISP IPv6-only networks. Because the source port
in an IPv6-to-IPv4 translation may have to be changed to provide adequate flow identification, the source
port in the IPv4-to-IPv6 direction need not be changed.
Note Disabling flow cache entries results in lesser performance as this functionality does multiple database
searches to find the most specific translation to use.
This module describes the feature and explains how to configure it.
• Restrictions for Disabling Flow Cache Entries in NAT and NAT64, on page 235
• Information About Disabling Flow Cache Entries in NAT and NAT64, on page 236
• How to Disable Flow Cache Entries in NAT and NAT64, on page 237
• Configuration Examples for Disabling Flow Cache Entries in NAT and NAT64, on page 243
• Additional References for Disabling Flow Cache Entries in NAT and NAT64, on page 244
• Feature Information for Disabling Flow Cache Entries in NAT and NAT64, on page 245
Note NAT, NAT64 (stateful and stateless), and carrier-grade NAT (CGN) translations support the disabling
of flow cache entries.
When flow cache entry is enabled and a user has 100 sessions, 1 bind and 100 session are created. However,
when flow cache entry is disabled, only one single bind is created for these sessions. Disabling flow cache
entries for dynamic and static translations saves memory usage and provides more scalability for your dynamic
or static translations.
Note Disabling flow cache entries will result in lesser performance as this functionality performs multiple
database searches to find the most specific translation to use.
Note Port Address Translation (PAT) or interface overload configuration, which is a type of dynamic NAT,
requires flow cache entries. You cannot disable flow cache entries for PAT configurations.
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat pool name start-ip end-ip {netmask netmask | prefix-length prefix-length}
4. access-list access-list-number permit source source-wildcard
5. ip nat inside source list access-list-number pool name
6. no ip nat create flow-entries
7. interface type number
8. ip address ip-address mask
9. ip nat inside
10. exit
11. interface type number
12. ip address ip-address mask
13. ip nat outside
14. end
DETAILED STEPS
Step 3 ip nat pool name start-ip end-ip {netmask netmask | Defines a pool of global addresses to be allocated as
prefix-length prefix-length} needed.
Example:
Step 4 access-list access-list-number permit source Defines a standard access list that permits IP addresses
source-wildcard that are to be translated.
Example:
Device(config)# access-list 1 permit 192.168.34.0
0.0.0.255
Step 5 ip nat inside source list access-list-number pool name Establishes a dynamic source translation by specifying the
pool and the access list specified in Steps 3 and 4,
Example:
respectively.
Device(config)# ip nat inside source list 1 pool
net-208
Step 6 no ip nat create flow-entries Disables the creation of flow cache entries.
Example:
Device(config)# no ip nat create flow-entries
Step 7 interface type number Specifies an interface and enters interface configuration
mode.
Example:
Device(config)# interface gigabitethernet 0/0/1
Step 8 ip address ip-address mask Sets a primary IP address for the interface.
Example:
Device(config-if)# ip address 10.114.11.39
255.255.255.0
Step 9 ip nat inside Connects the interface to the inside network, which is
subject to NAT.
Example:
Device(config-if)# ip nat inside
Step 11 interface type number Specifies an interface and enters interface configuration
mode.
Example:
Device(config)# interface gigabitethernet 0/1/1
SUMMARY STEPS
1. enable
2. configure terminal
3. ipv6 unicast-routing
4. interface type number
5. description string
6. ipv6 enable
7. ipv6 address {ipv6-address/prefix-length | prefix-name sub-bits/prefix-length}
8. nat64 enable
9. exit
10. interface type number
11. description string
12. ip address ip-address mask
13. nat64 enable
14. exit
15. nat64 prefix stateful ipv6-prefix/length
16. nat64 v6v4 static ipv6-address ipv4-address
17. nat64 settings flow-entries disable
18. end
DETAILED STEPS
Step 4 interface type number Specifies an interface type and enters interface
configuration mode.
Example:
Device(config)# interface gigabitethernet 0/0/0
Step 7 ipv6 address {ipv6-address/prefix-length | prefix-name Configures an IPv6 address based on an IPv6 general prefix
sub-bits/prefix-length} and enables IPv6 processing on an interface.
Example:
Device(config-if)# ipv6 address 2001:DB8:1::1/96
Step 10 interface type number Specifies an interface type and enters interface
configuration mode.
Example:
Device(config)# interface gigabitethernet 1/2/0
Step 15 nat64 prefix stateful ipv6-prefix/length Defines the stateful NAT64 prefix to be added to IPv4
hosts to translate the IPv4 address into an IPv6 address.
Example:
Device(config)# nat64 prefix stateful • The stateful NAT64 prefix can be configured in global
2001:DB8:1::1/96 configuration mode or in interface mode.
Step 16 nat64 v6v4 static ipv6-address ipv4-address Enables NAT64 IPv6-to-IPv4 static address mapping.
Example:
Device(config)# nat64 v6v4 static 2001:DB8:1::FFFE
209.165.201.1
Step 17 nat64 settings flow-entries disable Disables flow cache entries in the NAT64 configuration.
Example:
Device(config)# nat64 settings flow-entries
disable
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat settings mode cgn
4. ip nat inside source static local-ip global-ip
5. no ip nat create flow-entries
6. interface virtual-template number
7. ip nat inside
8. exit
9. interface type number
10. ip nat outside
11. end
DETAILED STEPS
Step 4 ip nat inside source static local-ip global-ip Enables static CGN of the inside source address.
Example:
Device(config)# ip nat inside source static
192.168.2.1 192.168.34.2
Step 5 no ip nat create flow-entries Disables flow cache entries in static CGN mode.
Example:
Device(config)# no ip nat create flow-entries
Step 6 interface virtual-template number Creates a virtual template interface that can be configured
and applied dynamically when creating virtual access
Example:
interfaces and enters interface configuration mode.
Device(config)# interface virtual-template 1
Step 7 ip nat inside Connects the interface to the inside network, which is
subject to NAT.
Example:
Device(config-if)# ip nat inside
Step 9 interface type number Specifies an interface and enters interface configuration
mode.
Example:
Device(config)# interface gigabitethernet 2/1/1
Stateful NAT64 “Stateful Network Address Translation 64” module in IP Addressing NAT Configuration
Guide
Stateless NAT64 “Stateless Network Address Translation 64” module in IP Addressing NAT
Configuration Guide
Technical Assistance
Description Link
The Cisco Support website provides extensive online resources, including http://www.cisco.com/support
documentation and tools for troubleshooting and resolving technical issues
with Cisco products and technologies.
To receive security and technical information about your products, you can
subscribe to various services, such as the Product Alert Tool (accessed from
Field Notices), the Cisco Technical Services Newsletter, and Really Simple
Syndication (RSS) Feeds.
Access to most tools on the Cisco Support website requires a Cisco.com user
ID and password.
Disabling Flow Cache Cisco IOS XE Release The Disabling of Flow Cache Entries in NAT and
Entries in NAT and 3.10S NAT64 feature allows you to disable flow entries for
NAT64 dynamic and static NAT translations. By default, flow
entries are created for all Network Address Translation
(NAT) translations.
The following commands were introduced or modified:
ip nat create flow-entries, nat64 settings flow-entries
disable, and show ip nat translations.
This following example is a combination of non-VRF and VRF-to-global mappings. In this example as
well, sharing IP addresses in pools are not supported.
ip nat pool natpool1 82.0.0.15 82.0.0.15 prefix-length 24
ip nat pool natpool2 82.0.0.15 82.0.0.15 prefix-length 24
ip nat inside source list acl2 pool natpool2 overload //non-vrf mapping//
ip nat inside source list acl1 pool natpool1 vrf vrf1 overload //vrf mapping//
The only case where same pools can be used in two different mapping is for the match-in-vrf mappings.
Note If you change the Network Address Translation (NAT) configuration mode to paired-address-pooling
configuration mode and vice versa, all existing NAT sessions are removed.
To configure NAT paired-address-pooling mode, use the ip nat settings pap command. To remove it, use
the no ip nat settings pap command.
After you configure paired-address-pooling mode, all pool-overload mappings will act in the
paired-address-pooling manner.
Based on your NAT configuration, you can use NAT static or dynamic rules.
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat settings pap [limit {1000 | 120 | 250 | 30 | 500 | 60}]
4. ip nat pool name start-ip end-ip {netmask netmask | prefix-length prefix-length}
5. access-list access-list-number permit source [source-wildcard]
6. ip nat inside source list access-list-number pool name overload
7. interface type number
8. ip address ip-address mask
9. ip nat inside
10. exit
11. interface type number
12. ip address ip-address mask
13. ip nat outside
14. end
DETAILED STEPS
Step 4 ip nat pool name start-ip end-ip {netmask netmask | Defines a pool of global addresses to be allocated as
prefix-length prefix-length} needed.
Example:
Device(config)# ip nat pool net-208
192.168.202.129 192.168.202.158 netmask
255.255.255.240
Step 5 access-list access-list-number permit source Defines a standard access list permitting addresses that are
[source-wildcard] to be translated.
Example:
Device(config)# access-list 1 permit 192.168.34.0
0.0.0.255
Step 6 ip nat inside source list access-list-number pool name Establishes dynamic Port Address Translation (PAT) or
overload NAT overload and specifies the access list and the IP
address pool defined in Step 4 and Step 5.
Example:
Device(config)# ip nat inside source list 1 pool
net-208 overload
Step 7 interface type number Specifies an interface and enters interface configuration
mode.
Example:
Device(config)# interface gigabitethernet 0/0/1
Step 8 ip address ip-address mask Sets a primary IP address for the interface.
Example:
Device(config-if)# ip address 10.114.11.39
255.255.255.0
Step 9 ip nat inside Connects the interface to the inside network, which is
subject to NAT.
Example:
Device(config-if)# ip nat inside
Step 11 interface type number Specifies an interface and enters interface configuration
mode.
Example:
Device(config)# interface gigabitethernet 0/1/2
Note If you change the Network Address Translation (NAT) configuration mode to paired-address-pooling
configuration mode and vice versa, all existing NAT sessions are removed.
To configure NAT paired-address-pooling mode, use the ip nat settings pap command. To remove it, use
the no ip nat settings pap command.
After you configure paired-address-pooling mode, all pool-overload mappings will act in the
paired-address-pooling manner.
Based on your NAT configuration, you can use NAT static or dynamic rules.
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat settings pap [limit {1000 | 120 | 250 | 30 | 500 | 60}]
4. ip nat pool name start-ip end-ip {netmask netmask | prefix-length prefix-length}
5. access-list access-list-number permit source [source-wildcard]
6. ip nat inside source list access-list-number pool name overload
7. interface type number
8. ip address ip-address mask
9. ip nat inside
10. exit
DETAILED STEPS
Step 3 ip nat settings pap [limit {1000 | 120 | 250 | 30 | 500 | Configures NAT paired address pooling configuration
60}] mode.
Example: • Use the limit keyword to limit of the number of local
Device(config)# ip nat settings pap addresses you can use per global address. The default
is 120.
Step 4 ip nat pool name start-ip end-ip {netmask netmask | Defines a pool of global addresses to be allocated as
prefix-length prefix-length} needed.
Example:
Device(config)# ip nat pool net-208
192.168.202.129 192.168.202.158 netmask
255.255.255.240
Step 5 access-list access-list-number permit source Defines a standard access list permitting addresses that are
[source-wildcard] to be translated.
Example:
Device(config)# access-list 1 permit 192.168.34.0
0.0.0.255
Step 6 ip nat inside source list access-list-number pool name Establishes dynamic Port Address Translation (PAT) or
overload NAT overload and specifies the access list and the IP
address pool defined in Step 4 and Step 5.
Example:
Device(config)# ip nat inside source list 1 pool
net-208 overload
Step 7 interface type number Specifies an interface and enters interface configuration
mode.
Example:
Device(config)# interface gigabitethernet 0/0/1
Step 8 ip address ip-address mask Sets a primary IP address for the interface.
Example:
Step 9 ip nat inside Connects the interface to the inside network, which is
subject to NAT.
Example:
Device(config-if)# ip nat inside
Step 11 interface type number Specifies an interface and enters interface configuration
mode.
Example:
Device(config)# interface gigabitethernet 0/1/2
Step 12 ip address ip-address mask Sets a primary IP address for the interface.
Example:
Device(config-if)# ip address 172.16.232.182
255.255.255.240
Device(config-if)# exit
Device(config)# interface gigabitethernet 0/1/2
Device(config-if)# ip address 172.16.232.182 255.255.255.240
Device(config-if)# ip nat outside
Device(config-if)# end
Technical Assistance
Description Link
The Cisco Support website provides extensive online resources, including http://www.cisco.com/support
documentation and tools for troubleshooting and resolving technical issues
with Cisco products and technologies.
To receive security and technical information about your products, you can
subscribe to various services, such as the Product Alert Tool (accessed from
Field Notices), the Cisco Technical Services Newsletter, and Really Simple
Syndication (RSS) Feeds.
Access to most tools on the Cisco Support website requires a Cisco.com user
ID and password.
Paired-Address-Pooling Cisco IOS XE Release 3.9S The ability of Network Address Translation (NAT)
Support in NAT to consistently represent a local IP address as a
single global IP address is termed paired address
pooling. Paired address pooling is supported only
on Port Address Translation (PAT).
The following command was introduced or
modified: ip nat settings pap.
• ALG ports can be used for bulk-port allocation; however, this can cause degraded performance in sessions
associated with these ports. If your configuration does not need ALGs, we recommend that you disable
ALGs using the CLI.
• Syslog is not supported.
• Low ports, ports below 1024, are not supported; any application that requires a low port does not work
with this feature.
• Bulk-port allocation pools must not overlap with static NAT mappings (particularly static mappings with
ports) for this feature to work.
• The ip nat service full-range command is not supported.
Note This feature is supported only in carrier-grade NAT (CGN) mode; therefore only source information is
logged when this feature is configured. Destination information is not logged. For more information
about CGN, see the “Carrier-Grade Network Address Translation" module in IP Addressing: NAT
Configuration Guide.
The first port that is allocated is always the first port in the set. Initially, ports are likely to be allocated in a
linear method; however, as sessions are released and ports are freed, the allocation is semi-random. A port
set is freed when the last session referencing it is freed.
A few port sets are reserved for users using a specific global IP address. Therefore, when allocated ports are
used up, a session can use a reserved port set. If all reserved port sets are used, the session is dropped.
The default port size is 512 ports, but it can differ based on the configured paired-address pooling limit. The
following table provides information of the default port size when various paired-address pooling limits are
configured:
Paired-Address Pooling Limit Default Bulk-Port Allocation Port Maximum Port Step Size
Size
30 2048 ports 2
60 1024 ports 4
1000 64 ports 16
SUMMARY STEPS
1. enable
2. configure terminal
3. interface type number
4. ip nat inside
5. exit
6. interface type number
7. ip nat outside
8. exit
9. ip nat settings mode cgn
10. ip nat pool name start-ip end-ip {netmask netmask | prefix-length prefix-length}
11. access-list access-list-number permit source [source-wildcard]
12. ip nat inside source list access-list-number pool name
13. ip nat settings pap bpa set-size 512 step-size 8
14. ip nat log translations flow-export v9 udp destination addr port
15. end
16. show ip nat translations
DETAILED STEPS
Step 3 interface type number Specifies an interface and enters interface configuration
mode.
Example:
Device(config)# interface gigabitethernet 0/0/0
Step 4 ip nat inside Connects the interface to the inside network, which is
subject to Network Address Translation (NAT).
Example:
Device(config-if)# ip nat inside
Step 6 interface type number Specifies an interface and enters interface configuration
mode.
Example:
Device(config)# interface gigabitethernet 1/0/1
Step 10 ip nat pool name start-ip end-ip {netmask netmask | Defines a pool of global addresses to be allocated as
prefix-length prefix-length} needed.
Example:
Device(config)# ip nat pool net-208
192.168.202.129 192.168.202.132 prefix-length 24
Step 12 ip nat inside source list access-list-number pool name Establishes dynamic NAT by specifying the access list
and the IP address pool defined in Step 10 and Step 11.
Example:
Device(config)# ip nat inside source list 1 pool
net-208
Step 13 ip nat settings pap bpa set-size 512 step-size 8 Configures bulk-port allocation.
Example:
Device(config)# ip nat settings pap bpa set-size
512 step-size 8
Step 14 ip nat log translations flow-export v9 udp destination Enables the high-speed logging (HSL) of all NAT
addr port translations.
Example:
Device(config)# ip nat log translations
flow-export v9 udp destination 10.1.1.1 2055
Device(config-if)# exit
Device(config)# ip nat settings mode cgn
Device(config)# ip nat pool net-208 192.168.202.129 192.168.202.132 prefix-length 24
Device(config)# access-list 1 permit source 192.168.34.0 0.0.0.255
Device(config)# ip nat inside source list 1 pool net-208
Device(config)# ip nat settings pap bpa set-size 512 step-size 8
Device(config)# ip nat log translations flow-export v9 udp destination 10.1.1.1 2055
Device(config)# end
DETAILED STEPS
Displays Network Address Translation (NAT) bulk logging and port-block allocation settings.
The following is sample output from the show ip nat bpa command:
Device# show ip nat bpa
The following is sample output from the show ip nat pool name pool3 command:
Paired-address pooling “Paired-Address Pooling Support in NAT” module in the IP Addressing NAT
support Configuration Guide
Technical Assistance
Description Link
The Cisco Support website provides extensive online resources, including http://www.cisco.com/support
documentation and tools for troubleshooting and resolving technical issues
with Cisco products and technologies.
To receive security and technical information about your products, you can
subscribe to various services, such as the Product Alert Tool (accessed from
Field Notices), the Cisco Technical Services Newsletter, and Really Simple
Syndication (RSS) Feeds.
Access to most tools on the Cisco Support website requires a Cisco.com user
ID and password.
Note MSRPC ALG is automatically enabled if traffic is sent to TCP port 135 by either Cisco IOS XE firewall
or NAT, or both.
• Only traffic that reaches destination port 135 is supported. This setting can be changed by configuration.
The firewall opens a pinhole, and NAT performs translation service on any TCP or UDP traffic that does not
carry the source and destination IP addresses in the application-layer data stream. Specific protocols or
applications that embed IP address information require the support of an ALG.
MSRPC
MSRPC is a framework that developers use to publish a set of applications and services for servers and
enterprises. RPC is an interprocess communication technique that allows the client and server software to
communicate over the network. MSRPC is an application-layer protocol that is used by a wide array of
Microsoft applications. MSRPC supports both connection-oriented (CO) and connectionless (CL) Distributed
Computing Environment (DCE) RPC modes over a wide variety of transport protocols. All services of MSRPC
establish an initial session that is referred to as the primary connection. A secondary session over a port range
between 1024 to 65535 as the destination port is established by some services of MSRPC.
For MSRPC to work when firewall and NAT are enabled, in addition to inspecting MSRPC packets, the ALG
is required to handle MSRPC specific issues like establishing dynamic firewall sessions and fixing the packet
content after the NAT.
By applying MSRPC protocol inspection, most MSRPC services are supported, eliminating the need for Layer
7 policy filters.
out-of-sequence commands and malformed packets. As the packet is parsed, the state machine records various
data and fills in the correct token information for NAT and firewall inspection.
Note By default, MSRPC ALG is automatically enabled when NAT is enabled. There is no need to explicitly
enable MSRPC ALG in the NAT-only configuration. You can use the no ip nat service msrpc command
to disable MSRPC ALG on NAT.
DETAILED STEPS
Step 3 class-map type inspect match-any class-map-name Creates an inspect type class map for the traffic class and
enters QoS class-map configuration mode.
Example:
Router(config)# class-map type inspect match-any
msrpc-cmap
Step 5 exit Exits QoS class-map configuration mode and enters global
configuration mode.
Example:
Router(config-cmap)# exit
Step 6 policy-map type inspect policy-map-name Creates a Layer 3 or Layer 4 inspect type policy map and
enters QoS policy-map configuration mode.
Example:
Router(config)# policy-map type inspect msrpc-pmap
Step 7 class type inspect class-map-name Specifies the traffic (class) on which an action is to be
performed and enters QoS policy-map class configuration
Example:
mode.
Router(config-pmap)# class type inspect
msrpc-class-map
Step 9 end Exits QoS policy-map class configuration mode and enters
privileged EXEC mode.
Example:
Router(config-pmap-c)# end
9. end
DETAILED STEPS
Step 3 zone security security-zone-name Creates a security zone to which interfaces can be assigned
and enters security zone configuration mode.
Example:
Router(config)# zone security in-zone
Step 4 exit Exits security zone configuration mode and enters global
configuration mode.
Example:
Router(config-sec-zone)# exit
Step 5 zone security security-zone-name Creates a security zone to which interfaces can be assigned
and enters security zone configuration mode.
Example:
Router(config)# zone security out-zone
Step 6 exit Exits security zone configuration mode and enters global
configuration mode.
Example:
Router(config-sec-zone)# exit
Step 7 zone-pair security zone-pair-name [source source-zone Creates a zone pair and enters security zone pair
destination [destination-zone]] configuration mode.
Example: Note To apply a policy, you must configure a zone
Router(config)# zone-pair security in-out source pair.
in-zone destination out-zone
Step 8 service-policy type inspect policy-map-name Attaches a firewall policy map to the destination zone pair.
Example: Note If a policy is not configured between a pair of
Router(config-sec-zone-pair)# service-policy type zones, traffic is dropped by default.
inspect msrpc-pmap
DETAILED STEPS
Step 3 alg vtcp service msrpc Enables vTCP functionality for MSRPC ALG.
Example: Note By default, MSRPC ALG supports vTCP.
Rotuer(config)# alg vtcp service msrpc
Step 5 set platform hardware qfp active feature alg msrpc Enables MSRPC unknown message tolerance.
tolerance on
Note By default, the tolerance is switched off.
Example:
Rotuer# set platform hardware qfp active feature
alg msrpc tolerance on
DETAILED STEPS
Step 3 no alg vtcp service msrpc Disables vTCP functionality for MSRPC ALG.
Example:
Rotuer(config)# no alg vtcp service msrpc
Router(config-pmap-c)# end
MSRPC ALG Support for Firewall Cisco IOS XE Release 3.5S The MSRPC ALG Support for
and NAT Firewall and NAT feature provides
support for the MSRPC ALG on
the firewall and NAT. The MSRPC
ALG provides deep packet
inspection of the MSRPC protocol.
The MSRPC ALG works in
conjunction with a provisioning
system to allow the network
administrator to configure match
filters that define match criteria that
can be searched in an MSRPC
packet.
The following commands were
introduced or modified: ip nat
service msrpc, match protocol
msrpc.
MSRPC ALG Inspection Cisco IOS XE Release 3.14S The MSRPC ALG Inspection
Improvements for Zone-based Improvements for Zone-based
Firewall and NAT Firewall and NAT feature supports
Virtual Transport Control Protocol
(vTCP) functionality which
provides a framework for various
ALG protocols to appropriately
handle the TCP segmentation and
parse the segments in the Cisco
firewall, Network Address
Translation (NAT) and other
applications.
The following command was
introduced: alg vtcp service
msrpc.
Restrictions for Sun RPC ALG Support for Firewalls and NAT
• If you configure the inspect action for Layer 4 or Layer 7 class maps, packets that match the Port Mapper
Protocol well-known port (111) pass through the firewall without the Layer 7 inspection. Without the
Layer 7 inspection, firewall pinholes are not open for traffic flow, and the Sun remote-procedure call
(RPC) is blocked by the firewall. As a workaround, configure the match program-number command
for Sun RPC program numbers.
• Only Port Mapper Protocol Version 2 is supported; none of the other versions are supported.
• Only RPC Version 2 is supported.
Information About Sun RPC ALG Support for Firewalls and NAT
Application-Level Gateways
An application-level gateway (ALG), also known as an application-layer gateway, is an application that
translates the IP address information inside the payload of an application packet. An ALG is used to interpret
the application-layer protocol and perform firewall and Network Address Translation (NAT) actions. These
actions can be one or more of the following depending on your configuration of the firewall and NAT:
• Allow client applications to use dynamic TCP or UDP ports to communicate with the server application.
• Recognize application-specific commands and offer granular security control over them.
• Synchronize multiple streams or sessions of data between two hosts that are exchanging data.
• Translate the network-layer address information that is available in the application payload.
The firewall opens a pinhole, and NAT performs translation service on any TCP or UDP traffic that does not
carry the source and destination IP addresses in the application-layer data stream. Specific protocols or
applications that embed IP address information require the support of an ALG.
Sun RPC
The Sun remote-procedure call (RPC) application-level gateway (ALG) performs a deep packet inspection
of the Sun RPC protocol. The Sun RPC ALG works with a provisioning system that allows network
administrators to configure match filters. Each match filter define a match criterion that is searched in a Sun
RPC packet, thereby permitting only packets that match the criterion.
In an RPC, a client program calls procedures in a server program. The RPC library packages the procedure
arguments into a network message and sends the message to the server. The server, in turn, uses the RPC
library and takes the procedure arguments from the network message and calls the specified server procedure.
When the server procedure returns to the RPC, return values are packaged into a network message and sent
back to the client.
For a detailed description of the Sun RPC protocol, see RFC 1057, RPC: Remote Procedure Call Protocol
Specification Version 2.
How to Configure Sun RPC ALG Support for Firewalls and NAT
For Sun RPC to work when the firewall and NAT are enabled, the ALG must inspect Sun RPC packets. The
ALG also handles Sun RPC-specific issues such as establishing dynamic firewall sessions and fixing the
packet content after NAT translation.
SUMMARY STEPS
1. enable
2. configure terminal
3. class-map type inspect {match-any | match-all} class-map-name
4. match protocol protocol-name
5. end
DETAILED STEPS
Step 3 class-map type inspect {match-any | match-all} Creates a Layer 4 inspect type class map and enters QoS
class-map-name class-map configuration mode.
Example:
Device(config)# class-map type inspect match-any
sunrpc-l4-cmap
Step 4 match protocol protocol-name Configures a match criterion for a class map on the basis
of the specified protocol.
Example:
Device(config-cmap)# match protocol sunrpc
SUMMARY STEPS
1. enable
2. configure terminal
3. class-map type inspect protocol-name {match-any | match-all} class-map-name
4. match program-number program-number
5. end
DETAILED STEPS
Step 3 class-map type inspect protocol-name {match-any | Creates a Layer 7 (application-specific) inspect type class
match-all} class-map-name map and enters QoS class-map configuration mode.
Example:
Device(config)# class-map type inspect sunrpc
match-any sunrpc-l7-cmap
Step 4 match program-number program-number Specifies the allowed RPC protocol program number as a
match criterion.
Example:
Device(config-cmap)# match program-number 100005
SUMMARY STEPS
1. enable
2. configure terminal
3. policy-map type inspect protocol-name policy-map-name
4. class type inspect protocol-name class-map-name
5. allow
6. end
DETAILED STEPS
Step 3 policy-map type inspect protocol-name Creates a Layer 7 (protocol-specific) inspect type policy
policy-map-name map and enters QoS policy-map configuration mode.
Example:
Device(config)# policy-map type inspect sunrpc
sunrpc-l7-pmap
Step 4 class type inspect protocol-name class-map-name Specifies the traffic class on which an action is to be
performed and enters QoS policy-map class configuration
Example:
mode.
Device(config-pmap)# class type inspect sunrpc
sunrpc-l7-cmap
Step 6 end Exits QoS policy-map class configuration mode and returns
to privileged EXEC mode.
Example:
Device(config-pmap-c)# end
SUMMARY STEPS
1. enable
2. configure terminal
3. policy-map type inspect policy-map-name
4. class {class-map-name | class-default}
5. inspect [parameter-map-name]
6. service-policy protocol-name policy-map-name
7. exit
8. class class-default
9. drop
10. end
DETAILED STEPS
Step 3 policy-map type inspect policy-map-name Creates a Layer 4 inspect type policy map and enters QoS
policy-map configuration mode.
Example:
Device(config)# policy-map type inspect
sunrpc-l4-pmap
Step 6 service-policy protocol-name policy-map-name Attaches the Layer 7 policy map to a top-level Layer 4
policy map.
Example:
Device(config-pmap-c)# service-policy sunrpc
sunrpc-l7-pmap
Step 7 exit Exits QoS policy-map class configuration mode and returns
to QoS policy-map configuration mode.
Example:
Step 8 class class-default Specifies the default class (commonly known as the
class-default class) before you configure its policy and
Example:
enters QoS policy-map class configuration mode.
Device(config-pmap)# class class-default
Step 10 end Exits QoS policy-map class configuration mode and returns
to privileged EXEC mode.
Example:
Device(config-pmap-c)# end
Creating Security Zones and Zone Pairs and Attaching a Policy Map to a Zone Pair
You need two security zones to create a zone pair. However, you can create only one security zone and the
second one can be the system-defined security zone. To create the system-defined security zone or self zone,
configure the zone-pair security command with the self keyword.
Note If you select a self zone, you cannot configure the inspect action.
SUMMARY STEPS
1. enable
2. configure terminal
3. zone security {zone-name | default}
4. exit
5. zone security {zone-name | default}
6. exit
7. zone-pair security zone-pair-name source source-zone-name destination destination-zone-name
8. service-policy type inspect policy-map-name
9. exit
10. interface type number
11. ip address ip-address mask [secondary [vrf vrf-name]]
12. zone-member security zone-name
13. exit
14. interface type number
15. ip address ip-address mask [secondary [vrf vrf-name]]
16. zone-member security zone-name
17. end
DETAILED STEPS
Step 3 zone security {zone-name | default} Creates a security zone and enters security zone
configuration mode.
Example:
Device(config)# zone security z-client • Your configuration must have two security zones to
create a zone pair: a source zone and a destination
zone.
• In a zone pair, you can use the default zone or self
zone as either the source or destination zone.
Step 5 zone security {zone-name | default} Creates a security zone and enters security zone
configuration mode.
Example:
Device(config)# zone security z-server • Your configuration must have two security zones to
create a zone pair: a source zone and a destination
zone.
• In a zone pair, you can use the default zone as either
the source or destination zone.
Step 7 zone-pair security zone-pair-name source Creates a zone pair and enters security zone-pair
source-zone-name destination destination-zone-name configuration mode.
Example:
Step 8 service-policy type inspect policy-map-name Attaches a firewall policy map to a zone pair.
Example:
Device(config-sec-zone-pair)# service-policy type
inspect sunrpc-l4-pmap
Step 10 interface type number Configures an interface type and enters interface
configuration mode.
Example:
Device(config)# interface gigabitethernet 2/0/0
Step 11 ip address ip-address mask [secondary [vrf vrf-name]] Sets a primary or secondary IP address for an interface.
Example:
Device(config-if)# ip address 192.168.6.5
255.255.255.0
Step 14 interface type number Configures an interface type and enters interface
configuration mode.
Example:
Device(config)# interface gigabitethernet 2/1/1
Step 15 ip address ip-address mask [secondary [vrf vrf-name]] Sets a primary or secondary IP address for an interface.
Example:
Device(config-if)# ip address 192.168.6.1
255.255.255.0
Example: Creating Security Zones and Zone Pairs and Attaching a Policy Map
to a Zone Pair
Device# configure terminal
Device(config)# zone security z-client
Device(config-sec-zone)# exit
Standard/RFC Title
Technical Assistance
Description Link
Feature Information for Sun RPC ALG Support for Firewalls and
NAT
Table 22: Feature Information for Sun RPC ALG Support for Firewalls and NAT
Sun RPC ALG Support for Cisco IOS XE Release The Sun RPC ALG Support for Firewalls and
Firewalls and NAT 3.2S NAT feature adds support for the Sun RPC ALG
on the firewall and NAT.
The following command was introduced or
modified: match protocol.
SUMMARY STEPS
1. enable
2. configure terminal
3. class-map type inspect match-any class-map-name
4. match protocol protocol-name
5. exit
6. policy-map type inspect policy-map-name
7. class type inspect class-map-name
8. inspect
9. class class-default
10. exit
11. exit
12. zone security zone-name1
13. exit
14. zone security zone-name2
15. exit
16. zone-pair security zone-pair-name source source-zone-name destination destination-zone-name
17. service-policy type inspect policy-map-name
18. exit
19. interface type number
20. zone-member security zone-name1
21. exit
22. interface type number
23. zone-member security zone-name
24. end
DETAILED STEPS
Router> enable
Step 3 class-map type inspect match-any class-map-name Creates an inspect type class map and enters class-map
configuration mode.
Example:
Step 4 match protocol protocol-name Configures the match criteria for a class map on the basis
of the named protocol.
Example:
• Use DNS in place of RTSP to configure DNS as the
Router(config-cmap)# match protocol rtsp match protocol.
Router(config-cmap)# exit
Step 6 policy-map type inspect policy-map-name Creates an inspect type policy map and enters policy-map
configuration mode.
Example:
Step 7 class type inspect class-map-name Specifies the class on which the action is performed and
enters policy-map-class configuration mode.
Example:
Router(config-pmap-c)# inspect
Step 9 class class-default Specifies that these policy map settings apply to the
predefined default class. If traffic does not match any of
Example:
the match criteria in the configured class maps, it is
directed to the predefined default class.
Router(config-pmap-c)# class class-default
Router(config-pmap-c)# exit
Router(config-pmap)# exit
Step 12 zone security zone-name1 Creates a security zone to which interfaces can be assigned
and enters security-zone configuration mode.
Example:
Router(config-sec-zone)# exit
Step 14 zone security zone-name2 Creates a security zone to which interfaces can be assigned
and enters security-zone configuration mode.
Example:
Router(config-sec-zone)# exit
Step 16 zone-pair security zone-pair-name source Creates a pair of security zones and enters
source-zone-name destination destination-zone-name security-zone-pair configuration mode.
Example: • To apply a policy, you must configure a zone pair.
Step 17 service-policy type inspect policy-map-name Attaches a firewall policy map to the destination zone pair.
Example: • If a policy is not configured between a pair of zones,
traffic is dropped by default.
Router(config-sec-zone-pair)# service-policy
rtsp_policy
Router(config-sec-zone-pair)# exit
Router(config)# GigabitEthernet0/1/0
Router(config-if)# exit
Router(config)# GigabitEthernet0/1/0
Router(config-if)# end
Troubleshooting Tips
The following commands can be used to troubleshoot your RTSP-enabled configuration:
• clear zone-pair
• show policy-map type inspect zone-pair
• show zone-pair security
Cisco IOS commands Cisco IOS Master Command List, All Releases
Cisco Firewall--SIP Enhancements: ALG Security Configuration Guide: Securing the Data Plane
Standard/RFC Title
Technical Assistance
Description Link
The firewall opens a pinhole, and NAT performs translation service on any TCP or UDP traffic that does not
carry the source and destination IP addresses in the application-layer data stream. Specific protocols or
applications that embed IP address information require the support of an ALG.
In addition to the protocols listed, the H.323 specification describes the use of various IETF protocols like
the Real Time Transport (RTP) protocol and audio (G.711, G.729, and so on) and video (H.261, H.263, and
H.264) codecs.
NAT requires a variety of ALGs to handle Layer 7 protocol-specific services such as translating embedded
IP addresses and port numbers in the packet payload and extracting new connection/session information from
control channels. The H.323 ALG performs these specific services for H.323 messages.
vTCP starts to buffer data, the high availability (HA) function is impacted, because vTCP cannot synchronize
the buffered data to a standby device. If the switchover to the standby device happens when vTCP is buffering
data, the connection may be reset if the buffered data is not synchronized to the standby device. After the
buffered data is acknowledged by vTCP, the data is lost and the connection is reset. The firewall and NAT
synchronize the data for HA. vTCP only synchronizes the status of the current connection to the standby
device, and in case of errors, the connection is reset.
DETAILED STEPS
Step 3 interface type number Configures an interface and enters interface configuration
mode.
Example:
Device(config)# interface gigabitethernet 0/0/1
Step 6 interface type number Configures an interface and enters interface configuration
mode.
Example:
Device(config)# interface gigabitethernet 0/1/1
Step 7 ip nat outside Indicates that the interface is connected to the outside
network.
Example:
Device(config-if)# ip nat outside
Step 9 ip nat pool pool-name start-ip end-ip prefix-length Defines a pool of IP addresses for NAT.
prefix-length
Example:
Device(config)# ip nat pool pool1 10.1.1.10
10.1.1.100 prefix-length 24
Step 10 ip nat inside source list pool pool-name Enables NAT of the inside source address.
Example:
Device(config)# ip nat inside source list pool
pool1
Step 11 access-list access-list-number permit source Defines a standard IP access list and permits access to
[source-wildcard] packets if conditions are matched.
Example:
Device(config)# access-list 1 permit 10.0.0.0
255.255.255.0
Example
The following is sample output from the show ip nat statistics command:
The following is sample output from the show ip nat translations command:
Device# show ip nat translations
Technical Assistance
Description Link
ALG—H.323 vTCP with High Cisco IOS XE The ALG—H.323 vTCP with High Availability
Availability Support for Firewall Release 3.7S Support for Firewall and NAT feature enhances the
and NAT H.323 ALG to support a TCP segment that is not a
single H.323 message. vTCP supports segment
reassembly. Prior to the introduction of this feature,
the H.323 ALG processed a TCP segment only if it
was a complete H.323 message. If the TCP segment
was more than one message, the H.323 ALG ignored
the TCP segment and the packet was passed without
processing.
The above enhancements are available by default; no additional configuration is required on NAT or firewall.
This module explains the SIP ALG enhancements and describes how to enable NAT and firewall support for
SIP.
• Restrictions for SIP ALG Hardening for NAT and Firewall, on page 303
• Information About SIP ALG Hardening for NAT and Firewall, on page 304
• How to Configure SIP ALG Hardening for NAT and Firewall, on page 306
• Configuration Examples for SIP ALG Hardening for NAT and Firewall, on page 310
• Additional References for SIP ALG Hardening for NAT and Firewall, on page 311
• Feature Information for SIP ALG Hardening for NAT and Firewall, on page 312
Application-Level Gateways
An application-level gateway (ALG), also known as an application-layer gateway, is an application that
translates the IP address information inside the payload of an application packet. An ALG is used to interpret
the application-layer protocol and perform firewall and Network Address Translation (NAT) actions. These
actions can be one or more of the following depending on your configuration of the firewall and NAT:
• Allow client applications to use dynamic TCP or UDP ports to communicate with the server application.
• Recognize application-specific commands and offer granular security control over them.
• Synchronize multiple streams or sessions of data between two hosts that are exchanging data.
• Translate the network-layer address information that is available in the application payload.
The firewall opens a pinhole, and NAT performs translation service on any TCP or UDP traffic that does not
carry the source and destination IP addresses in the application-layer data stream. Specific protocols or
applications that embed IP address information require the support of an ALG.
destination port, and protocol. The conventional method of using the 5 tuple to identify and match calls does
not completely support SIP trunking and often leads to Layer 7 data memory leaks and call matching issues.
In contrast to other application-level gateways (ALGs), SIP ALG manages the SIP Layer 7 data by using a
local database to store all media-related information contained in normal SIP calls and in SIP calls embedded
in a SIP trunk. SIP ALG uses the Call-ID header field contained in a SIP message to search the local database
for call matching and to manage and terminate calls. The Call-ID header field is a dialog identifier that identifies
messages belonging to the same SIP dialog.
SIP ALG uses the call ID to perform search in the local database and to manage memory resources. In certain
scenarios where SIP ALG is unable to free up a Layer 7 data record from the database, a session timer is used
to manage and free resources to ensure that there are no stalled call records in the database.
Note Because all Layer 7 data is managed by SIP ALG by using a local database, SIP ALG never replies on
firewall and NAT to free SIP Layer 7 data; SIP ALG frees the data by itself. If you use the clear command
to clear all NAT translations and firewall sessions, the SIP Layer 7 data in the local database is not freed.
The existing SIP methods that are logged in SIP ALG statistics include ACK, BYE, CANCEL, INFO, INVITE,
MESSAGE, NOTIFY, REFER, REGISTER, SUBSCRIBE, and 1XX-6XX.
Provisional Response Acknowledgement (PRACK) is a SIP method that provides an acknowledgment (ACK)
system for provisional responses. PRACK allows reliable exchanges of SIP provisional responses between
SIP endpoints. SIP reliable provisional responses ensure that media information is exchanged and resource
reservation can occur before connecting the call.
SIP uses the connection, media, and attribute fields of the Session Description Protocol (SDP) during connection
negotiation. SIP application-level gateway (ALG) supports SDP information within a PRACK message. If
media information exists in a PRACK message, SIP ALG retrieves and processes the media information. SIP
ALG also handles the creation of media channels for subsequent media streams. SIP ALG creates a firewall
pinhole and a NAT door based on the SDP information in PRACK messages.
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat service sip {tcp | udp} port port-number
4. end
DETAILED STEPS
DETAILED STEPS
Step 3 class-map type inspect match-any class-map-name Creates an inspect type class map and enters class-map
configuration mode.
Example:
Device(config)# class-map type inspect match-any
sip-class1
Step 4 match protocol protocol-name Configures the match criterion for a class map based on
the named protocol.
Example:
Device(config-cmap)# match protocol sip
Step 6 policy-map type inspect policy-map-name Creates an inspect type policy map and enters policy-map
configuration mode.
Example:
Device(config)# policy-map type inspect sip-policy
Step 7 class type inspect class-map-name Specifies the class on which the action is performed and
enters policy-map class configuration mode.
Example:
Device(config-pmap)# class type inspect sip-class1
Step 10 class class-default Specifies that these policy map settings apply to the
predefined default class.
Example:
Device(config-pmap)# class class-default • If traffic does not match any of the match criteria in
the configured class maps, it is directed to the
predefined default class.
9. exit
10. interface type number
11. zone-member security zone-name
12. exit
13. interface type number
14. zone-member security zone-name
15. end
DETAILED STEPS
Step 3 zone security {zone-name | default} Creates a security zone to which interfaces can be assigned
and enters security zone configuration mode.
Example:
Device(config)# zone security zone1
Step 5 zone security {zone-name | default} Creates a security zone to which interfaces can be assigned
and enters security zone configuration mode.
Example:
Device(config)# zone security zone2
Step 7 zone-pair security zone-pair-name [source Creates a zone pair and returns to security zone-pair
{source-zone-name | self | default} destination configuration mode.
[destination-zone-name | self | default]]
Note To apply a policy, you must configure a zone
Example: pair.
Device(config)# zone-pair security in-out source
zone1 destination zone2
Step 8 service-policy type inspect policy-map-name Attaches a firewall policy map to the destination zone pair.
Example: Note If a policy is not configured between a pair of
Device(config-sec-zone-pair)# service-policy type zones, traffic is dropped by default.
inspect sip-policy
Step 10 interface type number Configures an interface and enters interface configuration
mode.
Example:
Device(config)# interface gigabitethernet 0/0/0
Step 13 interface type number Configures an interface and enters interface configuration
mode.
Example:
Device(config)# interface gigabitethernet 0/1/1
Cisco IOS commands Cisco IOS Master Command List, All Releases
Standard/RFC Title
Technical Assistance
Description Link
Feature Information for SIP ALG Hardening for NAT and Firewall
Table 24: Feature Information for SIP ALG Hardening for NAT and Firewall
SIP ALG Hardening for NAT and Cisco IOS XE Release 3.8S The SIP ALG Hardening for NAT
Firewall and Firewall feature provides better
memory management and RFC
compliance over the existing SIP
ALG support for NAT and firewall.
• Call-proceeding timer that controls the maximum length of an unanswered SIP call.
When the configured maximum time is reached, the SIP application layer gateway (ALG) releases resources
for this call, and future messages related to this call may not be properly parsed by the SIP ALG.
SUMMARY STEPS
1. enable
2. configure terminal
3. alg sip processor session max-backlog concurrent-processor-usage
4. alg sip processor global max-backlog concurrent-processor-usage
5. alg sip blacklist trigger-period trigger-period trigger-size minimum-events destination ip-address
6. alg sip blacklist trigger-period trigger-period trigger-size minimum-events block-time block-time
[destination ip-address]
7. alg sip timer call-proceeding-timeout time
8. alg sip timer max-call-duration seconds
9. end
DETAILED STEPS
Step 3 alg sip processor session max-backlog Sets a per session limit for the number of backlog messages
concurrent-processor-usage waiting for shared resources.
Example:
Device(config)# alg sip processor session
max-backlog 5
Step 4 alg sip processor global max-backlog Sets the maximum number of backlog messages waiting
concurrent-processor-usage for shared resources for all SIP sessions.
Example:
Step 5 alg sip blacklist trigger-period trigger-period Configures dynamic SIP ALG blacklist criteria for the
trigger-size minimum-events destination ip-address specified destination IP address.
Example:
Device(config)# alg sip blacklist trigger-period
90 trigger-size 30 destination 10.1.1.1
Step 6 alg sip blacklist trigger-period trigger-period Configures the time period, in seconds, when packets from
trigger-size minimum-events block-time block-time a source are blocked if the configured limit is exceeded.
[destination ip-address]
Example:
Device(config)# alg sip blacklist trigger-period
90 trigger-size 30 block-time 30
Step 7 alg sip timer call-proceeding-timeout time Sets the maximum time interval, in seconds, to end SIP
calls that do not receive a response.
Example:
Device(config)# alg sip timer
call-proceeding-timeout 35
Step 8 alg sip timer max-call-duration seconds Sets the maximum call duration, in seconds, for a successful
SIP call.
Example:
Device(config)# alg sip timer max-call-duration 90
SUMMARY STEPS
1. enable
2. show alg sip
3. show platform hardware qfp {active | standby} feature alg statistics sip
4. show platform hardware qfp {active | standby} feature alg statistics sip dbl
5. show platform hardware qfp {active | standby} feature alg statistics sip dblcfg
6. show platform hardware qfp {active | standby} feature alg statistics sip processor
7. show platform hardware qfp {active | standby} feature alg statistics sip timer
8. debug alg {all | info | trace | warn}
DETAILED STEPS
Step 1 enable
Example:
Device> enable
Step 3 show platform hardware qfp {active | standby} feature alg statistics sip
Displays SIP ALG-specific statistics information in the Cisco Quantum Flow Processor (QFP).
Example:
Device# show platform hardware qfp active feature alg statistics sip
Events
...
Cr dbl entry: 10 Del dbl entry: 10
Cr dbl cfg entry: 8 Del dbl cfg entry: 4
start dbl trig tmr: 10 restart dbl trig tmr: 1014
stop dbl trig tmr: 10 dbl trig timeout: 1014
start dbl blk tmr: 0 restart dbl blk tmr: 0
stop dbl blk tmr: 0 dbl blk tmr timeout: 0
start dbl idle tmr: 10 restart dbl idle tmr: 361
stop dbl idle tmr: 1 dbl idle tmr timeout: 9
DoS Errors
Dbl Retmem Failed: 0 Dbl Malloc Failed: 0
DblCfg Retm Failed: 0 DblCfg Malloc Failed: 0
Session wlock ovflw: 0 Global wlock ovflw: 0
Blacklisted: 561
Step 4 show platform hardware qfp {active | standby} feature alg statistics sip dbl
Step 5 show platform hardware qfp {active | standby} feature alg statistics sip dblcfg
Displays all SIP blocked list settings.
Example:
Device# show platform hardware qfp active feature alg statistics sip dblcfg
Step 6 show platform hardware qfp {active | standby} feature alg statistics sip processor
Displays SIP processor settings.
Example:
Device# show platform hardware qfp active feature alg statistics sip processor
Step 7 show platform hardware qfp {active | standby} feature alg statistics sip timer
Displays SIP timer settings.
Example:
Device# show platform hardware qfp active feature alg statistics sip timer
Cisco IOS commands Cisco IOS Master Command List, All Releases
Standard/RFC Title
RFC 4028 Session Timers in the Session Initiation Protocol (SIP)
MIBs
MB
I MIBs Link
To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco
MIB Locator found at the following URL:
http://www.cisco.com/go/mibs
Technical Assistance
Description Link
The Cisco Support website provides extensive online resources, including http://www.cisco.com/support
documentation and tools for troubleshooting and resolving technical issues
with Cisco products and technologies.
To receive security and technical information about your products, you can
subscribe to various services, such as the Product Alert Tool (accessed from
Field Notices), the Cisco Technical Services Newsletter, and Really Simple
Syndication (RSS) Feeds.
Access to most tools on the Cisco Support website requires a Cisco.com user
ID and password.
source command) configuration. Both static and dynamic NAT configurations support the match-in-vrf
keyword.
Note All NAT commands that support VRF support the match-in-vrf keyword. Because NAT outside rules
(ip nat outside source command) support the match-in-VRF functionality by default, the match-in-vrf
keyword is not supported by NAT outside rules.
In VRF-aware NAT, the IP alias and Address Resolution Protocol (ARP) entries for inside global addresses
are configured in the global domain. For intra-VPN NAT, the IP alias and ARP entries for inside global
addresses are configured in the VRF through which the translation happens. In intra-VPN NAT, configuration
of the match-in-vrf keyword implies that at least one NAT outside interface is configured in the same VRF.
The ARP entry in that VRF replies to the ARP request from the outside host.
If inside addresses are configured, the match-in-VRF is determined through inside mappings during the address
translation of VRF traffic. If you have configured only outside mapping of IP addresses for address translations,
the match-in-VRF will work. When a translation entry is created with both inside and outside mappings, the
match-in-vrf keyword is determined by the inside mapping.
The Match-in-VRF Support for NAT feature supports the configuration of multiple dynamic mappings with
the same IP address pool.
The following table provides you information about VRF support for NAT:
MPLS IP VRF
Note You must use the match-in-vrf keyword
in the configuration to indicate that
communication is occurring within the
VRF.
VRF VRF
Note Both VRFs must be in the same inside
interface for this configuration to work.
VRF MPLS
Note You must use the match-in-vrf keyword
in the configuration to indicate that
communication is occurring within the
VRF.
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat inside source static local-ip global-ip [vrf vrf-name [match-in-vrf]]
4. interface type number
5. ip address ip-address mask [secondary]
6. ip nat inside
7. ip vrf forwarding vrf-name
8. exit
9. interface type number
10. ip address ip-address mask
11. ip nat outside
12. ip vrf forwarding vrf-name
13. end
DETAILED STEPS
Step 3 ip nat inside source static local-ip global-ip [vrf Establishes static translation between an inside local
vrf-name [match-in-vrf]] address and an inside global address.
Example: • The match-in-vrf keyword enables NAT inside and
Router(config)# ip nat inside source static outside traffic in the same VRF.
10.10.10.1 172.16.131.1 vrf vrf1 match-in-vrf
Step 4 interface type number Specifies an interface and enters interface configuration
mode.
Example:
Router(config)# interface gigabitethernet 0/0/1
Step 9 interface type number Specifies a different interface and enters interface
configuration mode.
Example:
Router(config)# interface gigabitethernet 0/0/0
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat inside source list access-list-number pool pool-name [vrf vrf-name [match-in-vrf]]
4. access-list access-list-number permit source [source-wildcard]
5. ip nat inside source list access-list-number pool pool-name vrf vrf-name [match-in-vrf]
6. interface type number
7. ip address ip-address mask
8. ip nat inside
9. ip vrf forwarding vrf-name
10. exit
11. interface type number
12. ip address ip-address mask
13. ip nat outside
14. ip vrf forwarding vrf-name
15. end
DETAILED STEPS
Step 3 ip nat inside source list access-list-number pool Enables multiple dynamic mappings to be configured with
pool-name [vrf vrf-name [match-in-vrf]] the same address pool.
Example: • The match-in-vrf keyword enables NAT inside and
Router(config)# ip nat inside source list 1 pool outside traffic in the same VRF.
shared-pool vrf vrf1 match-in-vrf
Step 4 access-list access-list-number permit source Defines a standard access list permitting those addresses
[source-wildcard] that are to be translated.
Example:
Router(config)# access-list 1 permit 192.168.34.0
0.0.0.255
Step 5 ip nat inside source list access-list-number pool Establishes dynamic source translation, specifying the
pool-name vrf vrf-name [match-in-vrf] access list defined in the previous step.
Example:
Router(config)# ip nat inside source list 1 pool
shared-pool vrf vpn1
Step 11 interface type number Specifies a different interface and enters interface
configuration mode.
Example:
Router(config)# interface gigabitethernet 0/0/0
Cisco IOS commands Cisco IOS Master Command List, All Releases
NAT commands: complete command syntax, Cisco IOS IP Addressing Services Command Reference
command mode, command history, usage
guidelines, and examples
Using NAT with MPLS VPNs “Integrating NAT with MPLS VPNs” module
Standard/RFC Title
RFC 826 Ethernet Address Resolution Protocol: Or converting network protocol addresses to 48.bit
Ethernet address for transmission on Ethernet hardware
Technical Assistance
Description Link
Match-in-VRF Support for NAT Cisco IOS XE Release 3.5S The Match-in-VRF Support for
NAT feature supports the NAT
translation of packets that
communicate between two hosts
within the same VPN.
Note To configure multicast ACL for a NAT inside interface, ensure that you configure the ACL to allow IP
addresses before and after NAT translation. If you do not configure the ACL to permit IP addresses after
NAT translation, the MFIB table does not contain (S,G) entry and this can cause issues in certain
deployments.
Uses of NAT
NAT can be used for the following applications:
• When you want to connect to the Internet, but not all of your hosts have globally unique IP addresses.
NAT enables private IP internetworks that use nonregistered IP addresses to connect to the Internet. NAT
is configured on the router at the border of a stub domain (referred to as the inside network) and a public
network such as the Internet (referred to as the outside network). NAT translates internal local addresses
to globally unique IP addresses before sending packets to the outside network. As a solution to the
connectivity problem, NAT is practical only when relatively few hosts in a stub domain communicate
outside of the domain at the same time. When this is the case, only a small subset of the IP addresses in
the domain must be translated into globally unique IP addresses when outside communication is necessary,
and these addresses can be reused when they are no longer in use.
• When you must change your internal addresses. Instead of changing the internal addresses, which can
be a considerable amount of work, you can translate them by using NAT.
• When you want to do basic load sharing of TCP traffic. You can map a single global IP address to many
local IP addresses by using the TCP load distribution feature.
• Outside local address—The IP address of an outside host as it appears to the inside network. Not
necessarily a legitimate address, it is allocated from the address space that is routable on the inside.
• Outside global address—The IP address that is assigned to a host on the outside network by the owner
of the host. The address is allocated from a globally routable address or network space.
VRF X Global VRF (also referred to as a When NAT is not configured for
non-VRF interface) Match-in-VRF support. For more
details, see the Match-in-VRF
Support for NAT chapter.
Note When inside global or outside local addresses belong to a directly connected subnet on a NAT router,
the router adds IP aliases for them. This action enables answer Address Resolution Protocol (ARP)
requests. However, a situation can arise where the router itself answers packets that are not destined for
it, possibly causing a security issue. This security issue can happen when an incoming Internet Control
Message Protocol (ICMP) or UDP packet that is destined for one of the aliased addresses does not have
a corresponding NAT translation in the NAT table. The router itself runs a corresponding service, for
example, the Network Time Protocol (NTP). Such a situation might cause minor security risks.
Note IP multicast dynamic translation establishes a one-to-one mapping between an inside local address and
one of the addresses from the pool of outside global addresses
SUMMARY STEPS
1. enable
2. configure terminal
3. ip nat pool name start-ip end-ip {netmask netmask | prefix-length prefix-length} [type
{match-host | rotary}]
4. access-list access-list-number permit source-address wildcard-bits [any]
5. ip nat inside source list access-list-number pool name
6. ip multicast-routing distributed
7. interface type number
8. ip address ip-address mask
9. ip pim sparse-mode
10. ip nat inside
11. exit
12. interface type number
13. ip address ip-address mask
14. ip pim sparse-mode
15. ip nat outside
16. end
DETAILED STEPS
Router> enable
Step 4 access-list access-list-number permit source-address Defines a standard access list for the inside addresses that
wildcard-bits [any] are to be translated.
Example:
Router(config)# access-list 100 permit 10.3.2.0
0.0.0.255 any
Step 5 ip nat inside source list access-list-number pool name Establishes dynamic source translation, specifying the
access list defined in the prior step.
Example:
Router(config)# ip nat inside source list 100 pool
mypool
Step 7 interface type number Configures an interface and enters interface configuration
mode.
Example:
Router(config)# interface gigabitethernet 0/0/0
Step 8 ip address ip-address mask Sets a primary or secondary IP address for an interface.
Example:
Router(config-if)# ip address 10.1.1.1
255.255.255.0
Step 10 ip nat inside Indicates that the interface is connected to the inside
network (the network that is subject to NAT translation).
Example:
Router(config-if)# ip nat inside
Step 12 interface type number Configures an interface and enters interface configuration
mode.
Example:
Router(config)# interface gigabitethernet 0/0/1
Step 15 ip nat outside Indicates that the interface is connected to the outside
network.
Example:
Router(config-if)# ip nat outside
Additional References
Related Documents
Cisco IOS commands Cisco IOS Master Commands List, All Releases
Configuring NAT for IP address conservation Configuring NAT for IP Address Conservation
module
Standard/RFC Title
None —
MIBs
None To locate and download MIBs for selected platforms, Cisco software releases, and feature sets, use
Cisco MIB Locator found at the following URL:
http://www.cisco.com/go/mibs
Technical Assistance
Description Link
IP Multicast Dynamic NAT Cisco IOS XE Release 3.4S The IP Multicast Dynamic Network
Address Translation feature
supports the source address
translation of multicast packets.
You can use source address
translation when you want to
connect to the Internet, but not all
your hosts have globally unique IP
addresses. NAT translates the
internal local addresses to globally
unique IP addresses before sending
packets to the outside network. The
IP multicast dynamic translation
establishes a one-to-one mapping
between an inside local address and
one of the addresses from the pool
of outside global addresses.
Network Address Translation (NAT) translates only the IP address and the port number of a PPTP message.
Static and dynamic NAT configurations work with PPTP without the requirement of the PPTP application
layer gateway (ALG). However, Port Address Translation (PAT) configuration requires the PPTP ALG to
parse the PPTP header and facilitate the translation of call IDs in PPTP control packets. NAT then parses the
GRE header and translates call IDs for PPTP data sessions. The PPTP ALG does not translate any embedded
IP address in the PPTP payload. The PPTP ALG is enabled by default when NAT is configured.
NAT recognizes PPTP packets that arrive on the default TCP port, 1723, and invokes the PPTP ALG to parse
control packets. NAT translates the call ID parsed by the PPTP ALG by assigning a global address or port
number. Based on the client and server call IDs, NAT creates two doors based on the request of the PPTP
ALG. ( A door is created when there is insufficient information to create a complete NAT-session entry. A
door contains information about the source IP address and the destination IP address and port.) Two NAT
sessions are created (one with the server call ID and the other with the client call ID) for two-way data
communication between the client and server. NAT translates the GRE packet header for data packets that
complies with RFC 2673.
PPTP is a TCP-based protocol. Therefore, when NAT recognizes a TCP packet as a PPTP packet, it invokes
the PPTP ALG parse-callback function. The PPTP ALG fetches the embedded call ID from the PPTP header
and creates a translation token for the header. The PPTP ALG also creates data channels for related GRE
tunnels. After ALG parsing, NAT processes the tokens created by the ALG.
SUMMARY STEPS
1. enable
2. configure terminal
3. interface type number
4. ip nat inside
5. exit
6. interface type number
7. ip nat outside
8. exit
9. ip nat pool name start-ip end-ip {netmask netmask | prefix-length prefix-length}
10. ip nat inside source list {access-list-number | access-list-name} pool name overload
11. ip access-list standard access-list-name
12. permit host-ip
13. end
DETAILED STEPS
Step 3 interface type number Enables an interface and enters interface configuration
mode.
Example:
Device(config)# interface gigabitethernet 0/0/1
Step 4 ip nat inside Connects the interface to the inside network, which is
subject to NAT.
Example:
Device(config-if)# ip nat inside
Step 6 interface type number Enables an interface and enters interface configuration
mode.
Example:
Device(config)# interface gigabitethernet 0/1/0
Step 9 ip nat pool name start-ip end-ip {netmask netmask | Defines a pool of IP addresses for NAT translations.
prefix-length prefix-length}
Example:
Device(config)# ip nat pool pptp-pool 192.168.0.1
192.168.0.234 prefix-length 24
Step 11 ip access-list standard access-list-name Defines a standard IP access list by name to enable packet
filtering and enters standard access-list configuration mode.
Example:
Device(config)# ip access-list standard pptp-acl
Step 12 permit host-ip Sets conditions in named IP access lists that permit packets.
Example:
Device(config-std-nacl)# permit 10.1.1.1
Standard/RFC Title
RFC 2637 Point-to-Point Tunneling Protocol (PPTP)
Technical Assistance
Description Link
The Cisco Support website provides extensive online resources, including http://www.cisco.com/support
documentation and tools for troubleshooting and resolving technical issues
with Cisco products and technologies.
To receive security and technical information about your products, you can
subscribe to various services, such as the Product Alert Tool (accessed from
Field Notices), the Cisco Technical Services Newsletter, and Really Simple
Syndication (RSS) Feeds.
Access to most tools on the Cisco Support website requires a Cisco.com user
ID and password.
PPTP Port Address Cisco IOS XE Release The PPTP Port Address Translation Support
Translation Support 3.9S feature introduces the Point-to-Point Tunneling
Protocol (PPTP) application layer gateway (ALG)
for Port Address Translation (PAT) configuration.
PAT configuration requires the PPTP ALG to
parse PPTP packets. The PPTP ALG is enabled
by default when Network Address Translation
(NAT) is configured.
The following commands were introduced or
modified: debug platform hardware qfp feature
alg datapath pptp, ip nat service pptp, show
platform hardware qfp feature alg statistics
pptp.
Configuring NPTv6
You can configure the inside and outside prefix for NPTv6 translation.
To configure NPTv6 support :
enable
configure terminal
interface GigabitEthernet0/0/0
nat66 inside
interface GigabitEthernet0/0/1
nat66 outside
nat66 prefixinside 2002:AB01::/64outside 2002:AB02::/64
end
Use the show nat66 statistics command to verify the NAT66 interface and global configuration:
Device# show nat66 statistics
NAT66 Statistics
Global Stats:
Packets translated (In -> Out)
: 7
Packets translated (Out -> In)
: 7
Use the show platform hardware qfp active feature nat66 datapath basecfg command to verify the global
stateless NPTv6 prefix in the data plane along with other base configuration information:
Device# show platform hardware qfp active feature nat66 datapath basecfg
nat66 cfg_flags 0x00000001, dbg_flags 0x00000000
nat66_prefix_hash_table_entries 2048, nat66_prefix_hash_table 0x89628400
prefix hasht 0x89628400 max 2048 chunk 0x8c392bb0 hash_salt 719885386
Use the show platform hardware qfp active feature nat66 datapath prefix command to verify the passed
interfaces stateless NPTv6 prefix configuration:
Device# show platform hardware qfp active feature nat66 datapath prefix
prefix hasht 0x89628400 max 2048 chunk 0x8c392bb0 hash_salt 719885386
NAT66 hash[1] id(1) len(64) vrf(0) in: 2002:ab01:0000:0000:0000:0000:0000:0000 out:
2002:ab02:0000:0000:0000:0000:0000:0000 in2out: 7 out2in: 7
Use the show platform hardware qfp active feature nat66 datapath statistics to verify the global NPTv6
statistics.
Device# show platform hardware qfp act feat nat66 data statistics
in2out xlated pkts 7
out2in xlated pkts 7
NAT66_DROP_SC_INVALID_PKT 0
NAT66_DROP_SC_BAD_DGLEN 0
NAT66_DROP_SC_PLU_FAIL 22786
NAT66_DROP_SC_PROCESS_V6_ERR 0
NAT66_DROP_SC_INVALID_EMBEDDED 0
NAT66_DROP_SC_SRC_RT 0
NAT66_DROP_SC_NOT_ENABLED 0
NAT66_DROP_SC_NO_GPM 0
NAT66_DROP_SC_LOOP 0
in2out_pkts 22768 out2in_pkts 22793
in2out_pkts_untrans 22761 out2in_pkts_untrans 22786
in2out_lookup_pass 7 out2in_lookup_pass 7
in2out_lookup_fail 0 out2in_lookup_fail 22786
mem_alloc_fail 0 prefix_fail 0
total prefix count 1
Troubleshooting Tips
You must make sure that the inside and outside interfaces are configured.
Use the following debug commands if you have any configuration issues:
• debug platform hardware qfp active feature nat66 datapath detailed- Provides detailed debugging
information about the data plane layer.
• debug platform hardware qfp active feature nat66 datapath all- Displays debugging information
about the data plane layer.
• debug platform condtion feature nat66 datapath submode detailed- Provides data plane layer
debugging information using buginf_cond. ACL filter can be supplied via the debug condition
infrastructure.
Multihoming
In a multihomed network the NPTv6 Translators are attached to an internal network, but are connected to
different external networks. The NPTv6 Translators are configured with the same internal prefix but different
external prefixes. Since there are multiple translations, the NPTv6 Translator maps multiple external addresses
to the common internal address.
The figure below illustrates NPTv6 deployment in multihoming network.
Figure 21: NPTv6 in Multihoming Network
Cisco IOS commands Cisco IOS Master Command List, All Releases
Standard/RFC Title
Technical Assistance
Description Link