SNAT和DNAT
SNAT
In Source Network Address Translation (SNAT), the NAT router modifies the IP address of the sender in IP packets. SNAT is commonly used to enable hosts with private addresses to communicate with servers on the public Internet.
RFC 1918 reserves the following three subnets as private addresses:
10.0.0.0/8
172.16.0.0/12
192.168.0.0/16
DNAT
In Destination Network Address Translation (DNAT), the NAT router modifies the IP address of the destination in IP packet headers.
OpenStack uses DNAT to route packets from instances to the OpenStack metadata service. Applications running inside of instances access the OpenStack metadata service by making HTTP GET requests to a web server with IP address 169.254.169.254. In an OpenStack deployment, there is no host with this IP address. Instead, OpenStack uses DNAT to change the destination IP of these packets so they reach the network interface that a metadata service is listening on.
- 原文作者:lex
- 原文链接:https://blog.mineor.xyz/posts/SNAT%E5%92%8CDNAT/
- 版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议进行许可,非商业转载请注明出处(作者,原文链接),商业转载请联系作者获得授权。