Networking routers: Difference between revisions

From wikinotes
No edit summary
No edit summary
Line 15: Line 15:
</syntaxhighlight>
</syntaxhighlight>


When a '''datagram''' travels between networks,<br>
When a '''datagram''' is routed (datalink layer),<br>
the datalink layer info is replaced with information specific to the new network it is passing through.
the outer '''datalink''' info is removed, and it's payload with the '''network''' info is now used from here on out.


= Tutorials =
= Tutorials =

Revision as of 02:24, 8 August 2021

Routers use IP addresses, to route traffic between networks and/or subnets.
A routing table stores routes for each available network.
The target network for a packet is identified using the netmask, if the network exists in the routing table the packet is sent on that network.

+---------------+                              +-----------------+
| network-1     |                              |    network-2    |
|192.168.1.0/24 |                              |   10.0.0.0/24   |
|               |    +-----------------+       |                 |
|  datagram     |    |      router     |       |                 |
| 10.0.0.5/24 --------> 192.168.1.1/24 |       |    destination  |
|               |    |   10.0.0.1/24  ------------>  10.0.0.5/24 |
|               |    |                 |       |                 |
+---------------+    +-----------------+       +-----------------+

When a datagram is routed (datalink layer),
the outer datalink info is removed, and it's payload with the network info is now used from here on out.

Tutorials

router in nixos https://francis.begyn.be/blog/nixos-home-router

Notes

routing schemes