In-Depth Notes on Network Layer – Data Plane
Overview of Network Layer
The Network Layer is responsible for transporting segments from sending to receiving hosts.
It encapsulates segments into datagrams at the sending side and delivers segments to the transport layer at the receiving side.
Network layer protocols exist in every host and router, examining header fields in all passing IP datagrams.
Key Functions of Network Layer
Forwarding: Moves packets from the router's input to the appropriate output.
- Analogy: Getting through a single interchange during a trip.
Routing: Determines the path taken by packets from source to destination.
- Analogy: Planning a trip from start to finish.
Data Plane vs Control Plane
Data Plane:
- Local, per-router function.
- Determines how datagrams arriving on router input are forwarded to output.
- Involves forwarding functions.
Control Plane:
- Network-wide logic for routing datagrams among routers from source to destination.
- Includes traditional routing algorithms and software-defined networking (SDN).
Routing Algorithms and Forwarding
Each router contains individual routing algorithm components that communicate.
Routing algorithms compute values in the forwarding tables.
- No routing protocols would be needed if human operators manually configured forwarding tables, leading to errors and slow responses.
Network Service Models
Models for the “channel” transporting datagrams include:
- Guaranteed delivery
- Guaranteed delivery with bounded delay
- In-order datagram delivery for flows
- Guaranteed minimum bandwidth and maximum jitter
Internet relies on a “best-effort” service model without guarantees of delivery, timing, or order.
Router Architecture
Routers execute routing algorithms/protocols (e.g., RIP, OSPF, BGP) and forward datagrams from incoming to outgoing links using high-speed switching fabric.
Two functions:
- Run routing protocols
- Forward datagrams
Input Port Functions
Receive bits at the physical layer and perform link layer protocol actions (e.g., Ethernet).
Forward datagrams based on header field values using a decentralized switching method (match + action).
Destination-Based Forwarding
Traditional forwarding based only on IP address destination.
Generalized forwarding can utilize any header field values.
Longest Prefix Matching
Technique used in forwarding tables to find the longest matching prefix for a destination address.
Often implemented using Ternary Content Addressable Memories (TCAMs) for fast access.
Switching Fabrics
Essential for transferring packets from input to output buffers with high speed.
Types include:
- Memory-based switching
- Bus-based switching
- Interconnection networks
Output Port Functions
Involves line termination, link layer protocols, switching fabrics, and datagram queuing.
Buffering necessary to manage instances when datagrams arrive faster than output rates, potentially leading to congestion and packet loss.
Buffering Strategies
RFC 3439 suggests buffering that equals typically RTT (round trip time) times link capacity.
Scheduling mechanisms (e.g., FIFO, Priority Scheduling, Round Robin) govern how packets are sent.
Internet Protocols
Major components of the network layer include:
- IP Protocol: Manages IP addressing and datagram format.
- Routing Protocols: Handle path selection.
- ICMP Protocol: For error reporting and routing signaling.
IP Addressing
Utilizes a 32-bit identifier for hosts (dotted-decimal notation).
Subnets defined by the high-order bits, determined by subnet masks.
Special addresses include:
- 0.0.0.0 (invalid address)
- 127.0.0.1 (loopback address)
- Private IP ranges (e.g., 192.168.0.0 to 192.168.255.255).
Dynamic Host Configuration Protocol (DHCP)
Allows hosts to dynamically obtain IP addresses from a server when joining a network, facilitating mobility and address reuse.
DHCP process involves discovery, offer, request, and acknowledgment messages.
Network Address Translation (NAT)
Enables a local network to use one IP address for external connections while having multiple internal addresses, conserving IP space and enhancing privacy.
Issues arise with NAT, such as end-to-end connectivity concerns and application compatibility.
IPv6 Development
Developed due to IPv4 address exhaustion, enabling larger address spaces and improved routing efficiency.
Key changes from IPv4 include fixed-length headers and no fragmentation at the router level.
Conclusion
The network layer encompasses essential services such as forwarding and routing, interfacing via IP protocols, and incorporates advancements through IPv6 and practices like NAT to address current network challenges.