So confused about Route Tables

My main confusion surrounds Destination vs Target.

In one definition

"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”) "

makes it seem as if the Destination is the broader area of where you want to go, and Target is the specific area.(i.e. Destination: New Jersey, Target: Short Hills)

on the other hand, it appears as if the exact opposite is true from other definitions I’ve found on the internet

"Destination: the packet’s final destination

Target: where the packet should go next, to get it one step closer to the intended destination."

Can someone clear this up for me? Thanks

Okay dont overthink.

It says, if you are trying to send traffic from your subnet to an IP that belongs to a CIDR (destination), send it to X. X can be internet gateway, a nat device, a transit gateway, a VPN etc. “A device (target)”

After that, is up to the device (internet gateway, a nat device, a transit gateway, a VPN etc.) to do stuff with the packets, there’s no logic and nothing advanced at the route table level, the device will do all the routing, packet encapsulation, natting, etc.

You can configure those devices, create your own routers and do stuff with them, but thats a diff topic. The route table just select the best device based on the CIDR you want to reach from within the vpc.

I see, thanks!

Destination - Which traffic this rule should match

Target - What I should do with matching traffic

Think about a physical mail service

Imagine you are in america

you are sending a letter to the UK

The destination is “some street, some town, some county, UK”

The target is “your local mail centre in your US town”

Target is where it needs to go next on the way to the destination.

Your local town post service doesn’t need to know about “some street, some town, some county, UK” … first it needs to get it to your local mail centre, then the regional one (next target), then the international one (next target), then the UK international one.. and so on.

When the data gets to the target, it will have a route table which will contain another target “next hop”

I see, that analogy helps a lot.

When you think about routing … keep in mind its about being distributed.

Not every router can know about every network and how to get there

All it generally knows is the “next hop” to get there (there, in this context being “the destination network” … the next hop is the “target”

Its either a default route … (I have no clue where this should go, so im throwing it over there).. 0.0.0.0/0 or ::/0

or its a explicit route (im going to send this here).