什么是端口地址转换?(port address translation?)

端口地址转换是专用网络上的多个设备共享一个公用网络地址的一种方法。它是一种网络设备功能,用于修改传入和传出的Internet协议(IP)数据包。IP地址和端口号都被更改,从而阻止公网直接访问专用网络上的主机。网络路由器使用端口地址转换与本地网络上的所有计算机共享一个公共Internet地址。这样可以保存公共IP地址,而不是要求每个需要访问Internet的本地计算机都有一个公共IP地址。...

端口地址转换是专用网络上的多个设备共享一个公用网络地址的一种方法。它是一种网络设备功能,用于修改传入和传出的Internet协议(IP)数据包。IP地址和端口号都被更改,从而阻止公网直接访问专用网络上的主机。网络路由器使用端口地址转换与本地网络上的所有计算机共享一个公共Internet地址。这样可以保存公共IP地址,而不是要求每个需要访问Internet的本地计算机都有一个公共IP地址。

Routers use port address translation to share one IP address between all computers on the local network.

传输控制协议(TCP)和用户数据报协议(UDP)数据包都通过该过程进行转换。每个数据包包含一个源IP地址和一个源端口号。它还包括目标IP地址和目标端口号。端口地址转换(也称为首字母缩略词PAT)创建一个表,在使用时映射地址和端口号。此表保存在PAT设备中,PAT设备可以是硬件路由器、软件防火墙或类似设备。

Port address translation conserves public IP addresses instead of requiring one for each local computer that needs to access the Internet.

当本地网络上的计算机向公共网络发送数据包时,PAT设备可以改变其报头数据。实际源地址将替换为端口地址转换设备的IP地址。PAT设备为源计算机与公共网络的连接分配一个新的端口号。然后用新分配的端口号替换标头中的实际源端口号。通过这种方式,传出数据包被修改为看起来好像它直接来自PAT设备。

对于传出数据包,端口地址转换表保留源地址、源端口和分配端口的副本。只要做一个表查找,相同的端口号就可以用于具有该源地址和端口的每个数据包。当公共网络响应时,它会将数据包发送到PAT设备指定端口号上的IP地址。PAT设备随后将用查找表中的实际私有地址替换该目的地地址。它还将用表中的实际端口号替换数据包头中的端口号。

网络地址转换(NAT)是一种映射IP地址的相关方法。端口地址转换实际上是NAT的一个子集,称为重载NAT。PAT有时被称为NAT或网络地址端口转换。存在仅映射IP地址或仅映射源地址和源端口号的NAT变体。其他表单只映射目标地址和目标端口号,或者同时映射端口和地址的类型。

  • 发表于 2021-12-14 14:01
  • 阅读 ( 174 )
  • 分类:互联网

你可能感兴趣的文章

不使用代理或VPN绕过被阻止站点的5种方法

... 你可能对Google Translate或Microsoft Translator之类的服务相当熟悉:他们的标准服务是将一种语言转换成另一种语言,因此你可以将英语中的任何句子转换成日语、乌尔都语、盖尔语等,然后...

  • 发布于 2021-03-17 18:55
  • 阅读 ( 209 )

什么是端口转发?你需要知道的一切

... 在这里,我们将解释这些端口是什么,为什么需要转发,以及如何在典型路由器上设置端口转发。 ...

  • 发布于 2021-03-31 08:18
  • 阅读 ( 829 )

如何使用ssh隧道访问受限服务器并安全浏览

...务器,但也要提供-L参数。语法是: ssh -L local_port:remote_address:remote_port [email protected] 例如,假设您办公室的数据库服务器位于办公网络上的192.168.1.111。您可以访问办公室的SSH服务器ssh.youroffice.com,并且您在SSH服务器上的用户帐...

  • 发布于 2021-04-08 08:02
  • 阅读 ( 214 )

web服务器是否每个服务器只包含一个网站?

...t:port/path. 2. The browser extracts the host (domain) part of the URL and translates it into an IP address (if necessary) in a process known as name resolution. This translation can occur via DNS, but it does not have to (for example, the local hosts file on common operating systems bypasses DNS). ...

  • 发布于 2021-04-09 11:57
  • 阅读 ( 241 )

为什么要将ipv4和ipv6公共地址分配给我的家庭网络?

...t they generally involve tunneling through an intermediate server that can translate between the two. Your ISP provides you with an IPv4 address for compatibility reas***. What many ISPs do now is implement CGN, where many people share a single “public” IPv4 address. There are many reas*** why t...

  • 发布于 2021-04-09 23:20
  • 阅读 ( 201 )

为什么选择80作为默认http端口,选择443作为默认https端口?

...artment of ICANN, a non-profit private corporation that oversees global IP address allocation, the Domain Name System (DNS), well-known ports, and other Internet Protocol-related symbols and numbers. During March of 1990, they published a document (RFC 1060) where they listed all the well-known port...

  • 发布于 2021-04-10 03:59
  • 阅读 ( 132 )

为什么“物联网”强制要求ipv6地址?

...址: If you have multiple devices within a network, the amount of IPv4 addresses will not increase linearly to accommodate the number of devices. There is just one IPv4 address per network/router that is connected to the Internet. How does the ‘Internet of Things’ (IoT) justify the need for IP...

  • 发布于 2021-04-10 04:14
  • 阅读 ( 234 )

同一wi-fi网络上的两台计算机是否具有相同的ip地址?

...he originating computer and the procedure used for this is Network address translation. However, if you were to try to communicating with your father’s computer, you would use your internal addresses. These use a custom range intended for internal use only: private address range. 接下来是艾...

  • 发布于 2021-04-11 07:22
  • 阅读 ( 239 )

如何将旧的wi-fi路由器重新用作网络交换机

...oggle tells the device whether or not it should enable the Network Address Translation (NAT)  feature. Because we’re turning a **art piece of networking hardware into a relatively dumb one, we don’t need this feature so we switch from Gateway mode (NAT on) to Router mode (NAT off). 我们的下...

  • 发布于 2021-04-11 15:01
  • 阅读 ( 205 )

mac地址到底是用来做什么的?

...者Vishnu Vivek对MAC地址及其功能很好奇: I understand that IP addresses are hierarchical, so that routers throughout the internet know which direction to forward a packet. With MAC addresses, there is no hierarchy, and thus packet forwarding would not be possible. So, MAC addresses are no...

  • 发布于 2021-04-11 16:47
  • 阅读 ( 302 )
fonn9876102
fonn9876102

0 篇文章

相关推荐