Configuring IP Addressing

Configuring Network Address Translation

Packets that enter the router through the inside interface and packets sourced from the router are checked against the access list for possible NAT candidates. The access list is used to specify which traffic is to be translated.

Configuring Dynamic Translation with a Route Map

To configure dynamic inside source address translation with a route map, use the following commands in global configuration mode:

 

Command

 

 

Purpose

Step 1

 

 

 

Router(config)# ip

nat pool name start-ip end-ip

Defines a pool of global addresses to be allocated as

 

{netmask netmask

prefix-length prefix-length}

needed.

Step 2

 

 

 

Router(config)# route-map

name permit sequence

Defines a route map permitting those addresses that

 

 

 

 

are to be translated.

Step 3

 

 

 

Router(config)# ip

nat inside source route-map name

Establishes dynamic source translation, specifying

 

pool name

 

 

the route map defined in the prior step.

Step 4

 

 

 

Router(config)# interface

type number

Specifies the inside interface and enters interface

 

 

 

 

configuration mode.

Step 5

 

 

 

 

Router(config-if)#

ip nat

inside

Marks the interface as connected to the inside.

Step 6

 

 

 

Router(config)# interface

type number

Specifies the outside interface and enters interface

 

 

 

 

configuration mode.

Step 7

 

 

 

 

Router(config-if)#

ip nat

outside

Marks the interface as connected to the outside.

 

 

 

 

 

See the “Dynamic Inside Source Translation Example” section at the end of this chapter for examples of dynamic inside source translation.

Overloading an Inside Global Address

You can conserve addresses in the inside global address pool by allowing the router to use one global address for many local addresses. When this overloading is configured, the router maintains enough information from higher-level protocols (for example, TCP or UDP port numbers) to translate the global address back to the correct local address. When multiple local addresses map to one global address, the TCP or UDP port numbers of each inside host distinguish between the local addresses.

Figure 5 illustrates NAT operation when one inside global address represents multiple inside local addresses. The TCP port numbers act as differentiators.

Cisco IOS IP Configuration Guide

IPC-39

Page 85
Image 85
Cisco Systems 78-11741-02 Overloading an Inside Global Address, Configuring Dynamic Translation with a Route Map, IPC-39