What is Destination and Target in Route table? I can see Destination and target can be configured to Internet gateway, is there any other use case ?
The destination route is a manually-configured route entry that determines the next routing hop based on the destination IP address. Usually a network with comparatively a small number of outbound connections or stable Intranet connections will use a destination route.
A “route” is a defined pair of addresses: a “destination” and a “gateway”. The pair indicates that if you are trying to get to this destination, communicate through this gateway. So, a gateway is any router (or routing host) through which packets pass (are sent) when trying to reach a given set of destinations.
A route table contains a set of rules, called routes, that are used to determine where network traffic from your subnet or gateway is directed. To put it simply, a route table tells network packets which way they need to go to get to their destination.
In the above example "local" means the VPC router will send traffic in that cidr range to the local VPC. Specifically, it will send the traffic to the specific network interface that has the IP address specified and drop the packet if nothing in your VPC has that IP address.
Target field specifies where such a request should be routed. It could be local (i.e. to targets in this VPC) or your-internet-gateway-ID in case those requests should be routed to the gateway for external/somewhere-else access. A list of possible target values is here.
Destination => IP address/CIDR range .
Target => Where you want to send the traffic for the specified destination (e.g. if the destination is my local subnet, mention target as "local")
The Internet gateway is one of the targets (e.g. routing traffic to the internet). Other options for the target would be
Route table document explains it well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With