Create Transit Gateway Attachments
Create Transit Gateway Attachments
Overview
In this section, you will configure Transit Gateway Attachments to assign VPCs to the created Transit Gateway.
Create Transit Gateway Attachments
- Open VPC Management Console, select Transit Gateway Attachments in the left sidebar, and select Create Transit Gateway Attachment.
- On the Create Transit Gateway Attachment page, select the following parameters and select Create attachment:
- Transit Gateway ID: select the ID of the generated Transit Gateway.
- Attachment type: select VPC to format the assigned object as VPC
- Continue configuration.
- Attachment name tag: enter the VPC corresponding to the VPC ID (Example: VPC1)
- VPC ID: select First VPC, ie VPC1.
- Subnet ID: in this infrastructure, each VPC contains only one subnet. Therefore, you only have one option of subnetting in a certain AZ.
- Select Create transit gateway attachment
- Create Transit Gateway Attachment 1 for VPC1 successfully.
- Create Transit Gateway Attachment 2 for VPC2.
- Same configuration.
- Same configuration.
- Create Transit Gateway Attachment 2 for VPC2 successfully.
- Create Transit Gateway Attachment 3 for VPC3.
- Same configuration.
- Create Transit Gateway Attachment 4 for VPC4 successfully.
- Same configuration.
- Create Transit Gateway Attachment 4 for VPC4 successfully.
- So you have successfully created 4 Transit Gateway Attachment for VPCs. Note that each VPC has only 1 subnet, but in a production environment, you will usually attach all the subnets to the Transit Gateway.
- Now, connect SSH to the instances in VPC1. (With the command
ping <EC2 Public IPv4> -c5
)
To connect SSH to EC2 we have a way. Connect Amazon EC2 Linux 2 using MobaXterm and connect Amazon EC2 Linux 2 using PuTTY. Here I connect Amazon EC2 Linux 2 using PuTTY.
You can review how to connect SSH to EC2 access at Lab About Amazon EC2 section 4.2 .
- Try pinging the private IP addresses of other instances. This won’t work because assigning VPCs to the Transit Gateway does not create routing tops on its own in this case because the Default route table association and Default route table propagation configurations have been disabled. disable in the creation of Transit Gateway first. The image above shows a failed ping from First EC2 Host to Second EC2 Host.
- Now connect SSH to instances at VPC3.
- Try pinging the private IP addresses of other instances. This won’t work because assigning VPCs to the Transit Gateway does not create routing tops on its own in this case because the Default route table association and Default route table propagation configurations have been disabled. disable in the Transit Gateway creation first. The image above shows a failed ping from Third EC2 Host to Fourth EC2 Host.