Open In App

Steps of Configuring NAT for IP Address Conservation

Last Updated : 07 Jan, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

Pre-requisites: EIGRP, NAT

Network Address Translation (NAT) is a process in which one or more local IP address is translated into one or more Global IP address and vice versa in order to provide Internet access to the local hosts. Also, it does the translation of port numbers i.e. masks the port number of the host with another port number, in the packet that will be routed to the destination. It then makes the corresponding entries of IP address and port number in the NAT table. NAT stands for Network Address Translation and is used for:

  1. Cost Savings
  2. Dealing with IPv4 address shortage
  3. Adds a layer of privacy
  4. Translation between local and private IPv4 addresses.

Configuration:

Consider the topology:  In this topology, a Cisco switch is connected with 3 Cisco PCs and a router0 Component, and that router0 is connected with another router (router1)

Components Quantities
Cisco PC 3
Cisco Switches 1
Cisco Routers 2
Configuration

 

We will configure the devices such that PC0, PC1, and PC2 will communicate with R1 using only one IP address, which is R0’s g0/0/1 interface’s IP address.

Configuring R0:

Click on R0 and open Command Line Terminal on R0.

interface GigabitEthernet0/0/0
ip address 192.168.1.100 255.255.255.0
ip nat inside
no shutdown
interface GigabitEthernet0/0/1
ip address 182.16.1.1 255.255.255.252
ip nat outside
no shutdown
router eigrp 100
passive-interface GigabitEthernet0/0/0
network 0.0.0.0
no auto-summarization
ip access-list standard name
permit any
ip nat inside source list name interface GigabitEthernet0/0/1 overload

Configuring R1:

Click on R1 and open Command Line Terminal on R1

interface Loopback1
ip address 1.1.1.1 255.255.255.255
interface GigabitEthernet0/0
ip address 182.16.1.2 255.255.255.252
no shutdown
router eigrp 100
network 0.0.0.0
no auto-summarization

Configuring PC0:

Click on PC0 and open Desktop configuration on PC0

Configuring PC0

 

Configuring PC1:

Click on PC1 and open Desktop configuration on PC1

Configuring PC1

 

Configuring PC2:

Click on PC2 and open Desktop configuration on PC2.

Configuring PC2

 

Pinging R1’s loopback from PC0:

Click on R1 and ping to PC0

Pinging R1's loopback from PC0

 

Check the source IP address of the packet when it reaches Router 1:

Checking the source IP address of the packet when it reaches Router 1

 


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads