Module 8: Network Layer Notes
Network Layer Characteristics
- Purpose: The Network Layer allows end devices to exchange data using IP protocols.
- Protocols: IPv4 and IPv6 are the principal protocols used in this layer.
- Basic Operations:
- Addressing: Identifies devices on the network.
- Encapsulation: Prepares data for transmission.
- Routing: Directs packets to their destination.
- De-encapsulation: Removes the IP header at the receiving end.
IP Encapsulation
- Function: Encapsulates Transport Layer segments into packets.
- IPv4/IPv6: The IP layer can use either IPv4 or IPv6 without affecting the layer 4 segment.
- Packet Handling: Each layer 3 device examines the IP packet as it flows through the network.
- Address Consistency: The original address from source to destination remains unchanged, except in cases of Network Address Translation (NAT).
Characteristics of IP
- Connectionless:
- Does not establish a connection before sending packets.
- No pre-notifications are sent; packets arrive independently.
- Best Effort:
- No guarantees on delivery.
- No resends of lost packets, and the sender does not know the state of the recipient.
- Media Independent:
- Can operate over various physical media (copper, fiber, wireless).
- Does not address the specifics of the underlying data link layer.
Maximum Transmission Unit (MTU)
- Definition: The MTU is the largest size of a packet that can be sent over the network.
- Fragmentation:
- IPv4 can split packets to fit into smaller MTUs, which may induce latency.
- IPv6 does not support fragmentation.
IPv4 Packet Structure
- Header Purpose:
- Guides the packet to its destination and for processing.
- Key Fields:
- Version: Indicates IP version (4 bits for IPv4).
- Differentiated Services: Quality of Service information.
- Header Checksum: Error detection.
- Time to Live (TTL): Limits packet lifespan.
- Protocol: Identifies the next layer protocol (e.g., TCP, UDP).
- Source and Destination Addresses: 32-bit addressing.
IPv6 Packet Improvements
- Resolution to IPv4 Limitations:
- Increased addressing capacity (128-bit compared to 32-bit).
- Simplified packet header structure with fewer fields.
- Eliminates NAT needs due to abundant address space.
- Fixed Size: 40 bytes.
- Key Fields:
- Version: 6-bit field.
- Traffic Class: Similar to Differentiated Services in IPv4.
- Flow Label: Identifies special packet flows.
- Next Header and Hop Limit: Similar roles as in IPv4 header.
Host Routing Decisions
- Routing Table Creation: Each host creates its routing table.
- Destination Types:
- Local: When communicating within the same LAN.
- Remote: When reaching a destination on a different LAN or network.
Default Gateway Functionality
- Role of a Default Gateway:
- Connects multiple networks.
- Must have a valid IP address in the LAN range.
- Responsible for routing data to remote networks.
- ARP (Address Resolution Protocol): Used to identify MAC addresses on the same LAN.
Router Routing Tables
- Types of Routes:
- Directly Connected: Auto-configured by the router.
- Remote: Learned through static or dynamic methods.
- Default: Routes traffic when no other routes match.
- Routing Table Entries:
- Identified by symbols such as L (local), C (connected), O (OSPF), D (EIGRP), and S (static routes).
Static vs. Dynamic Routing
- Static Routing:
- Manually configured.
- Requires manual updates with topology changes.
- Dynamic Routing:
- Automatically updates routing tables using protocols.
- Adapts to changes in network topology.
Summary of Key Learnings in Module**
- IP Characteristics: Connectionless, best effort, media independence.
- IPv4 vs. IPv6: IPv4 has limitations like address depletion and complexity; IPv6 addresses these issues effectively.
- Routing Fundamentals: Hosts identify destination types, utilize ARP, and must configure a default gateway for external communication. Routers manage paths and maintain routing tables.