Transit Gateway Peering Configuration

The Soracom Canal Transit Gateway peering connection connects a Type-F2 VPG to your AWS Transit Gateway. This connection enables bidirectional communication without NAT between devices using IoT SIMs and instances such as EC2 in your Amazon VPC over a private network.

Transit Gateway Peering

Requirements

To configure Canal with a Transit Gateway Peering, you will need:

Limitations

If you have created a VPG in Japan coverage, your VPC cannot include the 10.21.0.0/16 IP address range. If your AWS VPC uses a CIDR block that includes this range, you will need to create a new VPC with a CIDR block that does not include this range.

Configuration

Creating a VPG

Creating a VPG will incur fees. Refer to the Pricing & Fee Schedule for more information.

To use Transit Gateway peering connection, create a Type-F2 VPG.

Follow the instructions from the Virtual Private Gateway Configuration documentation to create a new VPG with the following options:

For more information on each option, refer to the Virtual Private Gateway Configuration documentation.


Creating a Transit Gateway

If you have already created a Transit Gateway you may skip this step.

You can create a Transit Gateway by following these instructions:

  1. Log in to the AWS Management Console, click the Services menu, and open the VPC dashboard.

  2. In the Region selector, choose the Region that you selected for your VPG rendezvous point.

  3. In the navigation menu's Transit Gateways section, click Transit Gateways.

  4. Click Create transit gateway.

  5. Configure your transit gateway as desired, ensuring that Default route table propagation is enabled. Then click Create transit gateway. The transit gateway will now be provisioned by AWS.

  6. Wait for the Transit Gateway to be provisioned and its state to become Available.

  7. In the navigation menu's Transit Gateways section, click Transit Gateway attachments.

  8. Click Create transit gateway attachment.

  9. Set a descriptive name in the Name tag field, under Transit Gateway ID select the transit gateway you just created, and under VPC ID choose your VPC. Then click Create transit gateway attachment.

Creating Transit Gateway Peering Connection

Create a Transit Gateway peering connection to the Transit Gateway created in Step 1: Create a Transit Gateway.

You need the following information about your AWS Transit Gateway to create a Transit Gateway Peering connection.

To create the Transit Gateway Peering connection follow these steps:

  1. In the VPG settings page for the created VPG, click Closed Network > + Add Transit Gateway Peering Connection.

  2. Configure the following settings:

    • AWS Account ID
    • Transit Gateway ID
    • AWS Region
    • Name (optional)
  3. Click Add Connection.

    The Transit Gateway peering connection (Transit Gateway Attachment) will be created.

  4. You can see the following procedures for the configuration in "Peering Attachment Settings" window. Replace the following part of the AWS CLI command displayed under Accept Transit Gateway Peering Attachment and execute it on your workstation.

    • <REPLACE_YOUR_AWS_PROFILE>: Replace with your AWS CLI profile.

    With the command, the Transit Gateway Peering Attachment of the Transit Gateway managed by Soracom will be accepted in your AWS account, and the following results will be displayed.

    {
        "TransitGatewayPeeringAttachment": {
            "TransitGatewayAttachmentId": "tgw-attach-xxxxxxxxxxxxxxxxx",
            "RequesterTgwInfo": {
                "TransitGatewayId": "tgw-xxxxxxxxxxxxxxxxx",
                "OwnerId": "000000000000",
                "Region": "sample-1"
            },
            "AccepterTgwInfo": {
                "TransitGatewayId": "tgw-xxxxxxxxxxxxxxxxx",
                "OwnerId": "111111111111",
                "Region": "sample-2"
            },
            "Options": {
                "DynamicRouting": "disable"
            },
            "State": "pending",
            "CreationTime": "2024-XX-XXTXX:XX:XX+00:00"
        }
    }

    Initially, the status of the Transit Gateway Peering Connection on the page will be displayed as "pending". After the Transit Gateway Attachment is accepted, it will change to "active".

    Once you created a Transit Gateway peering connection, you can see the "Transit Gateway Peering Settings" window again by clicking the Settings Icon next to Transit Gateway peering connections.

Configuring Routes

To enable bidirectional communication between the VPG and your Amazon VPC via the Transit Gateway Peering connection, the following routing settings are required:

Routing from VPG to Your Amazon VPC

  1. In the VPG settings page, click Routing Table > + Add Static Route.

  2. Configure the following settings.

    • Destination Network: Enter the CIDR block of your Amazon VPC.
    • Gateway: Select the attachment ID of the Transit Gateway peering connection (Transit Gateway Attachment) created in Creating Transit Gateway Peering Connection. The VPC attachment ID can be displayed in the VPG settings page by clicking Closed Network Settings and then selecting Transit Gateway peering connections.
  3. Click Add.

Routing from Your Amazon VPC to Your Transit Gateway

  1. Access the VPC Dashboard, switch to your region, and in the side menu, click Your VPCs.

  2. Select your Amazon VPC, and click the route table ID displayed under Main Route Table.

  3. Select the route table, go to the Routes tab, and click Edit routes.

  4. Click Add route.

  5. Configure the following settings.

    • Destination: Enter the CIDR block of the VPG's device subnet IP address range. You can see this in the VPG settings page as Device Subnet IP Address Range.
    • Target: Select "Transit Gateway" and enter your Transit Gateway ID. The ID begins with tgw-.
  6. Click Save changes.

Routing from Your Transit Gateway to VPG

  1. Access the VPC Dashboard, switch to your region, and in the side menu, click Transit Gateway > Transit Gateway Attachments.

  2. Check the Transit Gateway peering connection (Transit Gateway Attachment) created in Creating Transit Gateway Peering Connection, and click the route table ID displayed in Associated Route Table ID.

  3. Click Routes > Create Static Route.

  4. Configure the following settings:

    • CIDR: Enter the IP address range of the device subnet for the VPG.
    • Type: Select "Active".
    • Attachment Type: Select the attachment ID of the Transit Gateway peering connection (Transit Gateway Attachment).
  5. Click Create Static Route.

Now the bidirectional communication between the VPG and your Amazon VPC is enabled.

(Reference) Terminating the Transit Gateway Peering Connection

When you need to delete the Transit peering, take the following steps.

  1. Delete static routes from the VPG routing table.

    1. In the VPG settings page, click Routing Table and click the Delete Icon next to the static route where the Transit peering connection (Transit Gateway Attachment) is specified as the Gateway.

    2. Confirm and click Delete.

    3. If multiple static routes are configured for the Transit Gateway peering connection, delete all of them.
  2. Delete the Transit Gateway peering connection (Transit Gateway Attachment).

    1. In the VPG settings page, click Closed Network Settings and click the Delete Icon next to the Transit peering connection (Transit Gateway Attachment) to be terminated.

    2. Click Delete Connection.

Even if you delete the Transit peering connection, the VPG usage fee will continue to be charged until the VPG is deleted. For more information about VPG usage fees, see Pricing & Fee Schedule. For details on terminating or deleting a VPG, see Terminating a VPG.

Please also be aware that you may also have to delete AWS resources such as EC2 and Transit Gateway to stop the charge if you do not need them.