For new Subnets to have routing outside the VPC, ensure that they have appropriate inbound and outbound routes in a route table. Update the master route table (which is implicitly assigned to your new subnets), or define a new route table and explicitly associate it with the subnets. In this example, an explicit route table is created and the MGT, PKT0, PKT1 and HFE (if required) subnets are assigned to it. Create separate route tables for each of the MGT, PKT0, PKT1 and HFE subnets if desired.

AWS uses the most specific route in the route table that matches the traffic to determine how to route the traffic (longest prefix match). You need the rule to route all the non-Virtual Private Clouds (VPC) traffic to the internet gateway or ensure that the internet traffic is routed through your own NAT instance or Gateway. 

For example, the following route table has a route for IPv4 Internet traffic 0.0.0.0/0 that points to an Internet gateway. The Local route covers any traffic destined for a target within the VPC (10.0.0.0/16) and therefore, is routed within the VPC. All other traffic from the subnet uses the internet gateway. 


Route Table

Destination
Target
10.0.0.0/16Local
0.0.0.0/0igw-11aa22bb

 

For detailed information on the Route Table, refer to AWS documentation.

To create a Route table for MGT0, PKT0, PKT1, HFE

  1. Navigate to the VPC Dashboard https://console.aws.amazon.com/vpc/
  2. Select Route Tables on the taskbar at left to see the list of route tables available


  3. Click Create Route Table to create a route table for MGT0.
  4. Enter a name for the route table and select the VPC that contains your subnet.


  5. Click Create.
    The route Table creates, and the route table ID returned.


  6. Click Close.
    The Route Table screen displays. The new route table is now in the list of route tables.
  7. Select your route table from the list and select Edit routes from the Actions pull down to open the Edit Routes screen.

    By default, the new subnet masks are populated to allow inbound traffic to reach the new subnets, and for each subnet to reach each other.


  8. Click Add route.
  9. Select Internet Gateway from the Target pull down to add a destination for outbound traffic to reach the internet gateway associated with your VPC.


  10. Select the internet gateway associated with your VPC.


  11. Click Save routes.


  12. Click Close. The Route Table screen displays. 
  13. Select your route table from the list. 
  14. Select Edit subnet associates from the Actions pull down.  

    The Edit subnets association screen appears.


  15. Select the subnets that you would want to enable external routing on (for example, MGT0, PKT0, PKT1, HFE).
  16. Click Save.

    The route table screen appears. The Explicitly Associate with field shows that three subnets are associated with the route table.