CISCO Lab # 10: How to configure PAT (Port Address Translation) to access Internet in LAN from single Router Public IP Address

 

Tasks:

Configure the network as follows:
1) Configure the router to get an IP address via DHCP from your ISP
2) Configure the router to allocate IP addresses via DHCP to clients in your network:
- Network = 10.1.1.0/24
- Default Gateway = 10.1.1.254
- DNS = 8.8.8.8
3) Configure the router so internal hosts can access the internet servers using PAT (router IP address) 

Download Solved Lab

Solution:

PAT (Port Address Translation) is also called NAT overload. Its a technique which is used to access Internet from LAN using a single public IP Address configured at the Router. 

We will configure router interface GigabitEthernet0/0/1 to get public IP Address from the Internet. The DHCP server is already configured. 

Router>enable
Router#
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#interface GigabitEthernet0/0/1
Router(config-if)#ip address dhcp
Router(config-if)#no shutdown
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0/1, changed state to up
Router#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
GigabitEthernet0/0/0   unassigned      YES unset  administratively down down
GigabitEthernet0/0/1   8.8.8.100       YES DHCP   up                    up
Vlan1                  unassigned      YES unset  administratively down down

We see that router interface GigabitEthernet0/0/1 is assigned IP Address 8.8.8.100.

Now we will need to configure Router to act as a DNS server and assign IP Addresses to the hosts in LAN.

First we need to assign IP Address to GigabitEthernet 0/0/0. The IP Address is 10.1.1.254 then we have put the interface in UP mode.

Router>en
Router#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#
Router(config)#interface gigabitEthernet 0/0/0
Router(config-if)#
Router(config-if)#ip address 10.1.1.254 255.255.255.0
Router(config-if)#no shut

Now we need to define a DHCP pool at the router

Router#
Router#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#ip dhcp pool LAN
Router(dhcp-config)#network 10.1.1.0 255.255.255.0
Router(dhcp-config)#default-router 10.1.1.254
Router(dhcp-config)#dns-server 8.8.8.8
Router(dhcp-config)#exit

DHCP is configured at the LAN and  PC0 to PC1 are assigned IP Addresses from the Pool.

Now we need to configure PAT at the router

Router(config)#
Router(config)#interface gigabitEthernet 0/0/1
Router(config-if)#ip nat outside
Router(config-if)#exit
Router(config)#interface gigabitEthernet 0/0/0
Router(config-if)#ip nat inside
Router(config-if)#exit
Router(config)#
Router(config)#ip nat inside source list 1 interface gigabitEthernet 0/0/1 overload
Router(config)#access-list 1 permit any
Router(config)#

Next we need to verify if the settings are working properly

We can see list of DHCP IP Addresses assigned to the hosts

Router#show ip dhcp binding
IP address Client-ID/ Lease expiration Type
Hardware address
10.1.1.1 0009.7C78.31BE -- Automatic
10.1.1.2 000A.4186.291A -- Automatic
10.1.1.3 0007.EC6A.6ECE -- Automatic
Router#

 

We see that all three PCs are assigned IP Addresses. Next we will verify NAT Translations
Router#show ip nat translations
Pro  Inside global     Inside local       Outside local      Outside global
udp 8.8.8.100:1025     10.1.1.1:1025      8.8.8.8:53         8.8.8.8:53
udp 8.8.8.100:1026     10.1.1.1:1026      8.8.8.8:53         8.8.8.8:53
tcp 8.8.8.100:1025     10.1.1.1:1025      8.8.8.10:80        8.8.8.10:80
tcp 8.8.8.100:1026     10.1.1.1:1026      8.8.8.10:80        8.8.8.10:80

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !