diff --git a/School/Analyse/Layers/3. Network Layer.md b/School/Analyse/Layers/3. Network Layer.md index 3b1ceb9..3502617 100644 --- a/School/Analyse/Layers/3. Network Layer.md +++ b/School/Analyse/Layers/3. Network Layer.md @@ -22,4 +22,23 @@ Steps: A router can not practically store all hosts in the table as that would be way to many. -So instead the router stores only possible destination networks. \ No newline at end of file +So instead the router stores only possible destination networks. + +The address to identify a host on a networks should have the format: +{Network, Host} + +## Forwarding + +When a router receives a packet: +1. Extracts the destination address from packet. +2. Separates the network ID from the rest of the address. +3. Looks if it can match the networks id in routing table. +4. If Match found: Sends packet using suggested paths in its table for that destination. +5. If no match found: Send packet over the default path which is the path to the next (probably a higher level) router. + +### Separating network ID from address + +Router needs to know how many digits are used as network ID. +Routers keep this information in their routing table. + +A binary number named a netmask