On 5/17/21 1:35 PM, Hendrik Boom wrote: > I have found several authoritative-looking web pages on instructions to
> display and edit the routing tables.
>
> But none of them explains what the routing tabe entries *mean*.
The routing table entries show the way your host can find other
networks, local or remote. Each entry describes how to reach every
connected network, and what it considers to be local to your
connection. A special route, the default route, shows how to reach
networks outside of your local scope.
Other routing table entries may show how to reach other networks.
When you configure your interface ethv0, a route to its local network
will be shown, for example:
with "ip route":
192.168.1.0/24 dev ethv0 proto kernel scope link src 192.168.1.10
They both describe the same route, to network 192.168.1.0, with a 24 bit
netmask (meaning you have 8 bits left for hosts in your network, from
192.168.1.1 to 192.168.1.254, with 192.168.1.0 being used to reference
the network itself, and 192.168.1.255 as the broadcast address, where
you would send data meant for every host in your network).
If you want to reach say network 192.168.90.0/24 which is reacheable via
host 192.168.1.2, you could add a route like this:
ip route add 192.168.90.0/24 via 192.168.1.2
A special route to network 0.0.0.0/0 is the default route, which is used
to reach any network of which your host has no knowledge. With ip show
it looks like this: