Module 4: Network Layer
The Network Layer (Layer 3) is responsible for routing packets across different networks. The primary protocol is Internet Protocol (IP).4.1 IP Addressing (IPv4)
An IPv4 address is a 32-bit number, typically written in dotted-decimal notation (e.g.,192.168.1.1).
Classes (Legacy)
- Class A: 0.0.0.0 - 127.255.255.255 (Large networks)
- Class B: 128.0.0.0 - 191.255.255.255 (Medium networks)
- Class C: 192.0.0.0 - 223.255.255.255 (Small networks)
Private IP Addresses (RFC 1918)
10.0.0.0/8172.16.0.0/12192.168.0.0/16
4.2 Subnetting
Subnetting divides a network into smaller, manageable sub-networks.- Subnet Mask: Determines which part of the IP is the Network ID and which is the Host ID.
- Example:
255.255.255.0(/24) means first 24 bits are Network ID.
4.3 Routing
Routers operate at Layer 3. They connect different networks and decide the best path for packets.Routing Protocols
- IGP (Interior Gateway Protocol): Used within an autonomous system (e.g., OSPF, RIP).
- EGP (Exterior Gateway Protocol): Used between autonomous systems (e.g., BGP).
Next Module
Module 5: Transport Layer
TCP vs UDP and reliability.