Networking routers: Difference between revisions

From wikinotes
No edit summary
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[networking datalink layer]] '''frames''' are transmitted to a network-interface identified by it's '''MAC Address'''.<br>
Routers are responsible for bridging/routing packets between networks/subnets.
routers are then responsible for bridging/routing between two networks/subnets.


Routers use IP addresses, to route traffic between networks and/or subnets.<br>
[[networking datalink layer|datalink layer]] '''frames''' are transmitted to a router's network-interface identified by it's '''MAC Address'''.<br>
A routing table stores routes for each available network.<br>
It looks up the target IP address network in it's '''routing table''' and if the network is reachable,<br>
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.
the packet's frame is replaced with info specific to the new network and sent.


<syntaxhighlight lang="">
<syntaxhighlight lang="">
Line 18: Line 17:
</syntaxhighlight>
</syntaxhighlight>


When a '''datagram''' is routed (datalink layer),<br>
A '''frame''' may pass through several routers to reach it's destination.<br>
the outer '''datalink''' info is replaced with information about the new network.  
the routing table determines the gateway router for the next network to pass through.


= Tutorials =
= Tutorials =
Line 26: Line 25:
|-
|-
| router in nixos || https://francis.begyn.be/blog/nixos-home-router
| router in nixos || https://francis.begyn.be/blog/nixos-home-router
|-
| single NIC router || https://louwrentius.com/raspberry-pi-as-a-router-using-a-single-network-interface.html
|-
|-
|}
|}
</blockquote><!-- Tutorials -->
</blockquote><!-- Tutorials -->
= Protocols =
<blockquote>
{| class="wikitable"
|-
| [[gateway protocols]]
|-
|}
</blockquote><!-- Protocols -->


= Notes =
= Notes =
Line 35: Line 45:
|-
|-
| [[routing schemes]]
| [[routing schemes]]
|-
| [[routing tables]]
|-
|-
|}
|}
</blockquote><!-- Notes -->
</blockquote><!-- Notes -->

Latest revision as of 16:48, 11 October 2021

Routers are responsible for bridging/routing packets between networks/subnets.

datalink layer frames are transmitted to a router's network-interface identified by it's MAC Address.
It looks up the target IP address network in it's routing table and if the network is reachable,
the packet's frame is replaced with info specific to the new network and sent.

+---------------+                              +-----------------+
| 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 |
|               |    |                 |       |                 |
+---------------+    +-----------------+       +-----------------+

A frame may pass through several routers to reach it's destination.
the routing table determines the gateway router for the next network to pass through.

Tutorials

router in nixos https://francis.begyn.be/blog/nixos-home-router
single NIC router https://louwrentius.com/raspberry-pi-as-a-router-using-a-single-network-interface.html

Protocols

gateway protocols

Notes

routing schemes
routing tables