博客园  :: 首页  :: 管理

关于AWS中VPC下的IGW-internet gateway的创建与说明

Posted on 2023-05-26 12:27  520_1351  阅读(181)  评论(0编辑  收藏  举报

关于AWS中VPC下有一个资源叫做 Internet gateways , 也就是我们常说的IGW

关于IGW,我们可以参考官网文档 Amazon VPC / User Guide 中有如下说明:

An internet gateway is a horizontally scaled, redundant, and highly available VPC component that allows communication between your VPC and the internet.

It supports IPv4 and IPv6 traffic. It does not cause availability risks or bandwidth constraints on your network traffic.

An internet gateway enables resources in your public subnets (such as EC2 instances) to connect to the internet if the resource has a public IPv4 address or an IPv6 address.

Similarly, resources on the internet can initiate a connection to resources in your subnet using the public IPv4 address or IPv6 address.

For example, an internet gateway enables you to connect to an EC2 instance in AWS using your local computer.

An internet gateway provides a target in your VPC route tables for internet-routable traffic.

For communication using IPv4, the internet gateway also performs network address translation (NAT).

For communication using IPv6, NAT is not needed because IPv6 addresses are public. For more information, see IP addresses and NAT.

There's no additional charge for creating an internet gateway.

开启 Enable internet access 步骤

To enable access to or from the internet for instances in a subnet in a VPC using an internet gateway, you must do the following.

  • Create an internet gateway and attach it to your VPC.

  • Add a route to your subnet's route table that directs internet-bound traffic to the internet gateway.

  • Ensure that instances in your subnet have a public IPv4 address or an IPv6 address.

  • Ensure that your network access control lists and security group rules allow the desired internet traffic to flow to and from your instance.

 

1、其中对于IGW在页面上的创建也很简单,只需要输入一个Name的Tag值即可(必须项),但是后续也可以修改,如下图所示:

2、IGW创建了,但要让IGW启作用,还需要将IGW互联网网关 Attach 到 指定的VPC才可以的

3、对Subnet子网的路由表中,添加路由(一般是默认路由)到IGW,这样的Subnet子网,也被称为公有子网 / 公共子网

 

 

 

尊重别人的劳动成果 转载请务必注明出处:https://www.cnblogs.com/5201351/p/17434245.html