This page is under regular updates. Please check back later for more content.
Networking & Content Delivery
VPC
Virtual Private Cloud (VPC)
Route tables

Route table

A route table in networking is a data table stored in a router or a networked computer that lists the routes to particular network destinations. It contains information about the topology of the network immediately around it. Here are some key points:

Destination Network: Specifies the IP address of the destination network.

Subnet Mask: Used to determine the network portion of an IP address.

Gateway: The next hop IP address to which the packet should be forwarded.

Interface: The outgoing network interface the packet should be sent through.

Metric: A value that indicates the cost of using a particular route, with lower values generally preferred.

In the context of cloud services like AWS, Azure, or GCP, a route table is used to control the routing of traffic within a virtual network.

Here's an example of a simple route table:

DestinationSubnet MaskGatewayInterfaceMetric
192.168.1.0255.255.255.0192.168.1.1eth01
10.0.0.0255.0.0.010.0.0.1eth110
0.0.0.00.0.0.0192.168.1.254eth0100

In this table:

  • Traffic destined for the 192.168.1.0 network will be routed through the gateway 192.168.1.1 via interface eth0.
  • Traffic for the 10.0.0.0 network will go through the gateway 10.0.0.1 via interface eth1.
  • The default route (0.0.0.0) will send traffic to 192.168.1.254 if no other specific route matches.
  • Understanding route tables is crucial for network configuration and troubleshooting.

Routing Table in AWS

  • Is the central routing function.
  • It connects the different availability zones together and connect the VPC to the Internet
  • You can have up to 200 route table for VPC.
  • You can have up to 50 route table entries per round table.
  • Each subnet must be associated with only route table at any event time.
  • If you do not specify a subnet to route table association, the subnet will be associated with the default VPC route table.
  • The default route table can be modified but cannot be deleted if no other main route table exist.
  • You can make a custom route table manually and decalre as main route table and then you can delete the default main route table as if no longer a main route table.
  • By default every round table contain a local route for communication with the VPC.
  • Each route specifies a destination and target.

image

Route Table for Private Subnet -

DestinationTarget
10.0.0.0/16local
0.0.0.0/0nat-XXXXX

Route Table for Public Subnet -

DestinationTarget
10.0.0.0/16local
0.0.0.0/0igw-XXXXX

Points to remember