📜  nat inside outside global local exercise (1)

📅  最后修改于: 2023-12-03 15:17:50.264000             🧑  作者: Mango

NAT Inside Outside Global Local Exercise

Introduction

Network Address Translation (NAT) is a technology used to allow devices on a private network to communicate with devices on a public network. NAT hides the private IP addresses of connected devices by replacing them with a public IP address. This allows multiple devices to share a single public IP address when accessing the internet. The following are the terminologies associated with NAT:

  • Inside Local Address
  • Inside Global Address
  • Outside Local Address
  • Outside Global Address
Inside Local Address

An Inside Local Address is an IP address assigned to a device that is on a private network such as a LAN. This IP address is not routable over the internet, and hence cannot be used to communicate with devices on a public network.

Inside Global Address

An Inside Global Address is a public IP address assigned by an ISP (Internet Service Provider) to the NAT device that resides on the private network. This address represents the device's IP address on the public network and is used for communication with devices on the internet.

Outside Local Address

An Outside Local Address is a public IP address assigned to a device on a public network such as the internet. This address is used to communicate with devices that are on a private network.

Outside Global Address

An Outside Global Address is the IP address assigned by an ISP to a device that resides on the public network. This address is used to communicate with devices on a private network.

Exercise

In this exercise, we will configure a NAT device to allow devices on a private network to communicate with devices on the public network. We will use the following IP addresses:

  • Private network IP address range: 192.168.0.0/24
  • NAT device LAN IP address: 192.168.0.1
  • NAT device WAN IP address: 203.0.113.1
  • Web Server IP address: 203.0.113.2
Step 1

Configure the NAT device with the following commands:

en
conf t
interface fastethernet 0/0
ip address 203.0.113.1 255.255.255.252
no shutdown
exit
interface fastethernet 0/1
ip address 192.168.0.1 255.255.255.0
no shutdown
exit
ip nat pool mypool 203.0.113.2 203.0.113.2 netmask 255.255.255.0
ip nat inside source list 1 pool mypool overload
access-list 1 permit 192.168.0.0 0.0.0.255
exit
Step 2

Configure a web server with the following commands:

en
conf t
interface fastethernet 0/0
ip address 203.0.113.2 255.255.255.0
no shutdown
exit
exit
Step 3

Verify that NAT is working by pinging the web server from a device on the private network:

ping 203.0.113.2

If the ping is successful, NAT is working correctly.

Conclusion

In conclusion, NAT is a technology that allows devices on a private network to communicate with devices on a public network. The terminologies associated with NAT are Inside Local Address, Inside Global Address, Outside Local Address and Outside Global Address. Through the exercise above, we have seen how to configure NAT on a Cisco router and verify its functionality.