NAT: Why Do We Need It?

NAT, which is critical to the IPv4 networks we still use today, has been hotly debated as the IPv6 grows with more addresses. However, since the IPv6 is not full-fledged, the existence of NAT still makes sense. Here I will introduce NAT definition and figure how NAT works and why we need it.

What Is NAT?

NAT, known as network address translation, is the method adopted by a firewall or router to assign the public addresses to the devices work in the a private network.

It translates the private IPv4 addresses we use in our internal networks into public IPv4 addresses that can be routed over the internet. As we all know, the private addresses may be occupied by connected local service—computers, game consoles, phones, fiber switches etc. to communicate with the modem/router and other devices on the same network. However, the home network connection uses a single public IP address to access the internet. Given this, NAT is responsible for translating the IP address of every device connected to a router into a public IP address at the gateway. Then those devices can connect to the internet.

NAT(network address translation)

NAT: Why We Need?

Assume that you have 3 PCs, a gigabit Ethernet switch which connects 6 PCs, a 10 gigabit switch connecting 6PCs and one smart phone, two ipads and all of them need to work at the same time, then you need to get each of them an IP address accessible to the Internet. But due to a lack of IPv4 IP address space, it is hard to handle the massive number of devices we use every day. Well, the network address translation, proposed in 1994, has become a popular and necessary tool in the face of IPv4 address exhaustion by representing all internal devices as a whole with a same public address available. Together with its extension named port address translation, the network address translation can conserve IP addresses.

Safety, another issue we may concern when accessing the external internet, can partly be addressed by network address translation which servers as a strict controller of accessing to resources on both sides on the firewall. The hackers from outside cannot directly attack the internal network while the internal information cannot access the outside world casually.

How Does NAT Work

A router carrying NAT consists of pairs of local IP addresses and globally unique addresses, by translating the local IP addresses to global address for outgoing traffic and vice versa for incoming traffic. All these are done by rewriting the headers of data packets so that they have the correct IP address to reach the proper destination.

There are generally two types of NAT: dynamic and static.

In dynamic NAT, we map inside local addresses in internal network to global addresses so that they can access resources on the internet. The router responds to the hosts who want to access the internet with an available public IPv4 address so that they can access the internet.

In static NAT, we usually map an internal local address to a global address so that hosts on public networks can access a device in the internal network.

Conclusion

In a word, before the full transition of IPv6, NAT can guarantee the smooth internet surfing no matter how many devices you’ve got. Knowing what it is and how it works with network address will help you establish a clear understanding of it so that you can make good use if it.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值