Static NAT is a type of NAT that maps one public IP address to one private IP address. Every time a device with a private IP address on your network tries to access the internet, its traffic will be routed through the NAT device and assigned the public IP address that is statically mapped to it.
What is Static Network Address Translation?
Static NAT is a type of NAT that maps one public IP address to one private IP address. This means that every time a device with a private IP address on your network tries to access the internet, its traffic will be routed through the NAT device and assigned the public IP address that is statically mapped to it.
Static NAT is often used in small businesses and home networks where only one public IP address is available. This allows all of the devices on the network to share the same public IP address, which can save money on internet service costs.
Static Network Address Translation (NAT) is used to save IP addresses. It allows unregistered IP addresses from private IP networks to connect to the Internet.
NAT converts private (not globally unique) addresses in the internal network into legal addresses before they are sent to another network.
Sites that already have registered IP addresses for customers on an internal network may wish to hide those addresses from the Internet in order to prevent hackers from directly attacking clients. A degree of security is achieved by concealing client addresses.
How does Static NAT Work?
Static NAT routes network traffic from a static external IP address to an internal IP address or network. It generates a static translation of actual addresses to mapped addresses. Static NAT connects networking devices to the internet through a private LAN and an unregistered private IP address.
Static NAT defines a one-to-one mapping from one IP subnet to another. The mapping contains destination IP address translation in one direction and source IP address translation in the other.
The NAT device’s original destination address is the virtual host IP address, whereas the mapped-to address is the real host IP address.
Static NAT permits connections to originate from either side of the network, but translation is limited to one-to-one or between blocks of addresses of the same size. A public address must be assigned for each private address. No address pools are required.
Static NAT additionally allows the following sorts of translation:
- To map multiple IP addresses and specified port ranges to a single IP address and a separate port range
- To map a given IP address and port to another IP address and port
You should grasp the following terms to comprehend static NAT:
- The Layer 3 interface that confronts the private network is known as the NAT inside interface.
- The Layer 3 interface that faces the public network is known as the NAT outside interface.
- Every address that occurs on the internal (private) part of the network is referred to as a local address.
- Every address that appears on the network’s outer (public) ring is referred to as a global address.
- A legitimate IP address is one that the Network Information Center (NIC) or service provider has assigned.
- The IP address given to a host on the inside network is known as the inside local address. It is not necessary for this address to be a real IP address.
- The IP address of an external host, as it appears on the internal network, is known as the “outside local address”. Given that it is assigned from an address space that may be routed on the internal network, it is not necessary that it be a valid address.
- Inside global address: A valid IP address that, to the outside world, corresponds to one or more inside local IP addresses.
- Outside global address: The IP address that the host owner has assigned to an outside network host. The address is a valid one that is chosen from network space or an address that can be routed.
What are the typical Scenarios where Static NAT is used?
Static Network Address Translation (NAT) serves several functions, including providing low-cost internet access to small businesses and improving security by shielding private IP addresses from potential threats.
- If only one public IP address is available, as in a small business or household network. This allows any device connected to the network to use the same public IP address, potentially lowering the cost of internet access. A small company with ten employees, for example, could use static NAT to provide internet access to all of them via a single public IP address.
- To establish a static IP address on a device’s connection to the internet. This is frequently done for equipment such as web servers and file servers that must be accessed via the Internet. For example, a company may use static NAT to connect its web server to the internet so that users from all over the world can access its website.
- To enhance the network’s security. Static NAT can improve network security by shielding the network’s devices’ private IP addresses from the internet. As a result, attackers may find it more difficult to target specific network devices. A home user, for example, can use static NAT to hide their computer’s private IP address from the internet, making them less likely to be the target of hackers.
A use case for static NAT is shown here:
- A tiny company is made up of one public IP address and ten people. The company would like to provide each employee with a public IP address that they can use to connect to the internet.
- The company configures and installs a NAT device to use static NAT on its network. The NAT device is assigned a public IP address, and each employee’s PC is assigned a private IP address.
- Traffic from a worker’s PC attempting to connect to the internet is routed through the NAT device. The NAT device then sends the traffic to the internet using the employee’s computer’s statically assigned public IP address.
- This allows all of the staff to access the internet without difficulty using the same public IP address.
How does Static NAT Enable External Access to Internal Network Resources?
Static NAT is a network traffic mapping technique that maps traffic from a fixed external IP address to an internal IP address or network. It establishes a one-to-one mapping from one IP subnet to another, including destination IP address translation in one direction and source IP address translation in the other. Static NAT connects networking devices to the internet via a private LAN with an unregistered private IP address.
The following steps are required to enable external access to internal network resources via Static NAT:
- Configure private/public IP address mapping by using the inside static PRIVATE_IP PUBLIC_IP command.
- When an external host sends a packet to the public IP address, the router (acting as the NAT device) will translate the packet to the server’s private IP address.
- When the server responds, the router will untranslate the packet back to the original IP address of the external host.
- The Static NAT allows the internal host with the private IP address to be accessed by an external host.
Here is how static NAT enables external access to internal network resources:
- Inside network: This is the private network that is behind the NAT device. It contains the devices that need to access the internet.
- Outside network: This is the public internet. It is the network that the inside network can access through the NAT device.
- NAT device: This is the device that performs the static NAT translation. It has two interfaces: one for the inside network and one for the outside network.
Static NAT configuration:
The following is the static NAT configuration for this topology:
ip nat inside source static 192.168.1.100 10.0.0.1
This command maps the private IP address 192.168.1.100 to the public IP address 10.0.0.1. This means that any traffic from the inside network with a source IP address of 192.168.1.100 will be translated to the public IP address 10.0.0.1 when it goes out to the internet.
How it works:
When a device on the inside network with the IP address 192.168.1.100 tries to access the internet, the NAT device will translate the traffic to the public IP address 10.0.0.1. The traffic will then be sent out to the internet using the NAT device’s public IP address.
The important point to remember is that a Static NAT translation is bidirectional. Whether the first packet was sent by an internal or external host, it would “pass through” the Static NAT. Static NAT allows connections to be established from either side of the network, but translation is restricted to one-to-one or between blocks of addresses of the same size. For each private address, a public address must be assigned.
What are the differences between Static NAT and Dynamic NAT?
Static NAT is a type of Network Address Translation (NAT) in which one public IP address is mapped to one private IP address. This means that whenever a device on your network with a private IP address attempts to connect to the internet, its traffic will be routed through the NAT device and assigned the public IP address that is statically mapped to it.
Dynamic NAT is a type of NAT in which public IP addresses are dynamically assigned to private IP addresses. This means that the public IP address assigned to a device on your network may change based on the traffic sent and received.
The two types of Network Address Translation (NAT) techniques used to translate private IP addresses to public IP addresses are static NAT and dynamic NAT. The following are the distinctions between static and dynamic NAT:
- Allows for permanently mapping an internal address to a specific public address.
- Is useful when a network device within a private network requires internet access.
- Creates a one-to-one mapping from one IP subnet to another.
- Allows connections to be established from either side of the network.
- The translation is limited to one-to-one or between identical address blocks.
- A public address must be assigned to every private address.
- Dynamically converts private IP addresses to public IP addresses.
- Allows for translating unregistered private IP addresses into registered public IP addresses from a pool of public IP addresses.
- Creates a one-to-one mapping from a group of public IP addresses known as the NAT pool between a private IP address and a public IP address.
- The router selects an address from the global address pool that is not currently assigned.
- The dynamic entry remains in the NAT translations table as long as traffic is exchanged.
- The entry expires after a period of inactivity, and the global IP address can be used for new translations.
- Two sets of addresses are required on the router: the inside addresses that will be translated and a pool of global addresses.
The following table summarizes the key differences between static and dynamic NAT:
- Public IP address mapping
- Use cases
- Small businesses and home networks
- Large networks
- Can improve security by hiding private IP addresses
- Does not improve security
- Can reduce performance by routing all traffic through the NAT device
- Can improve performance by reducing traffic through the NAT device