A routing table is used by a router (or sometimes by a computer) to decide where to forward packets. It contains information about the destination and how to reach it via the gateway.
In a basic routing table that only includes destination and gateway, here's what each column means:
Destination | Gateway |
---|---|
The target network or host | The next-hop router or gateway |
Destination
Column?The Destination
column specifies the network or host the router is trying to reach. It can contain:
192.168.1.0/24
for a network or 10.0.0.0/8
for a large network).192.168.1.10
).0.0.0.0/0
):
Gateway
Column?The Gateway
column specifies the next-hop router where the packet should be sent. It is:
8.8.8.8
, your gateway might be 192.168.1.1
.Gateway
column is marked as `` or 0.0.0.0
(meaning "no gateway needed").Destination | Gateway |
---|---|
192.168.1.0/24 |
- (directly connected) |
10.0.0.0/8 |
192.168.1.254 |
8.8.8.8 |
192.168.1.254 |
0.0.0.0/0 |
203.0.113.1 |