Logo
Section 1 / 10

公共子网和互联网网关

学习互联网网关的基础知识。

导入

公共子网和互联网网关

学习互联网网关的基础知识。

...
Amazon自定义VPC与互联网网关
1aws ec2 create-internet-gateway

创建互联网网关命令的输出

1{ 2 "InternetGateway": { 3 "Attachments": [], 4 "InternetGatewayId": "igw-072d957a85301700d", 5 "OwnerId": "0123456789", 6 "Tags": [] 7 } 8}
1aws ec2 attach-internet-gateway --internet-gateway-id IGW_ID --vpc-id VPC_ID
1aws ec2 attach-internet-gateway --internet-gateway-id igw-072d957a85301700d --vpc-id vpc-0c25cfdf2a6b6c711
1aws ec2 detach-internet-gateway --internet-gateway-id IGW_ID --vpc-id VPC_ID
1aws ec2 detach-internet-gateway --internet-gateway-id igw-072d957a85301700d --vpc-id vpc-0c25cfdf2a6b6c711
1aws ec2 delete-internet-gateway --internet-gateway-id IGW_ID
1aws ec2 delete-internet-gateway --internet-gateway-id igw-072d957a85301700d

请按照以下步骤执行命令:

  1. 接下来,点击下方终端以连接,并使用命令通过程序化方式与AWS账户交互。

  2. 使用终端时,在收到某个命令的输出后,按 Enter 键查看完整输出,按 q 键退出并执行下一个命令。

注意: 有关如何创建AWS安全凭证(即访问密钥和秘密访问密钥)的说明,请参阅附录中的《创建AWS安全凭证》课程。

VPC 基础知识

公共子网、VPC路由和路由表