301d8 read06 - carlosjorr/reading-notes GitHub Wiki
Network Address Translation
- What is the main purpose for implementing NAT on a network?
The main purpose of implementing Network Address Translation (NAT) on a network is to enable the sharing of a single public IP address among multiple devices on a private network. NAT allows devices with private IP addresses to communicate with devices on the internet using a single public IP address.
- At what layer of the OSI model does NAT happen?
NAT operates at the Network Layer (Layer 3) of the OSI model. It involves modifying the IP addresses and sometimes the port numbers of packets as they traverse between the private network and the public network.
- What happens to packets when NAT runs out of addresses in the pool of available IPs?
When NAT runs out of addresses in the pool of available IPs, it typically starts dropping incoming connections. This means that new devices trying to establish connections from the private network to the internet may be unable to do so until an IP address becomes available in the NAT pool.
- What disadvantage does using NAT pose for routers?
Using NAT can pose some disadvantages for routers:
Complexity: NAT introduces additional complexity to the routing process. It requires maintaining a translation table to keep track of IP mappings, and this table can become large and resource-intensive.
Limited Port Forwarding: NAT can make it challenging to set up certain types of incoming connections, such as running servers or hosting services that require specific ports to be forwarded. NAT often requires manual configuration or additional techniques like Universal Plug and Play (UPnP) to handle port forwarding.
Impact on IP-based protocols: Some IP-based protocols, such as IPsec VPN or certain peer-to-peer applications, may not function properly when NAT is involved. NAT modifies IP addresses, which can interfere with the end-to-end connectivity expected by these protocols.
Dependency on Public IP: NAT relies on having a sufficient supply of public IP addresses to map to devices in the private network. With the exhaustion of IPv4 addresses, obtaining public IP addresses can be more challenging and may require additional costs or complex address management strategies.
It's important to note that despite its drawbacks, NAT has been widely adopted as a temporary solution to address the shortage of public IP addresses until the transition to IPv6, which offers a significantly larger address space.