Network Address Translation (NAT)

Network Address Translation provides a method for mapping an internal IP address space to an external IP address space. This mapping is beneficial for making smooth transitions to different ISPs, hiding internal IP address, and conserving IP addresses.

To better understand what NAT does, consider Figure 12-2. NAT is configured on our gateway. The serial0 interface is configured with our global Internet address (from the address space given to our network by our ISP). This is the outside portion of NAT. The ethernet0 interface, and any devices that are connected to this Ethernet, have addresses that are invisible to the outside world; this is the inside portion of NAT.

NAT example

Figure 12-2. NAT example

There are two methods of performing NAT: static and dynamic. With static translation, each inside address is mapped to a specific outside address. With dynamic translation, possible outside addresses are collected into an address pool and are selected from the pool on an as-needed basis.

Let’s look at how to implement the address translation used in Figure 12-2. In this example, the internal network has the address space of 10.10.1.0/24. We need to map these addresses to the external address space, 172.168.1.0/24. First, let’s look at the configuration with the static mapping:

! Assign IP address for NAT for IP addresses .2 through .10 ! (Skip 172.168.1.1 because ...

Get CISCO IOS in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.