4.2 What's Inside a Router? (Part 2)
Router Architecture Overview
Router Components:
Input Ports: Perform physical layer termination, data link layer decapsulation, and lookup/forwarding (using longest prefix matching).
Switching Fabric: The heart of the router, connecting input ports to output ports.
Output Ports: Store packets received from the fabric and transmit them on the outgoing link.
Routing Processor: Executes routing protocols and maintains routing tables (control plane functions).
Packet Scheduling and Buffer Management
Queuing and potential packet loss occur at both input and output ports when the traffic rate exceeds the processing or transmission capacity.
Input Port Queuing: Occurs if the switching fabric is slower than the combined input line rates.
Head-of-the-Line (HOL) Blocking: A packet at the front of an input queue prevents packets behind it from moving forward, even if their target output ports are idle, because the fabric is busy with the lead packet's destination.
Output Port Buffering and Sizing
Buffering is necessary when packets arrive from the fabric at a rate exceeding the outgoing link capacity .
Buffer Sizing Criteria:
Traditionally, the rule of thumb is , where is the buffer size, is the round-trip time, and is the link capacity.
For a large number of independent TCP flows (), the required buffer size is often calculated as .
Bufferbloat: Excessive buffering that leads to long delays for interactive applications without necessarily improving throughput.
Buffer Management and Discard Policies
When a buffer is full, a drop policy determines which packet to discard:
Tail Drop: Discards the arriving packet if the queue is full.
Priority Drop: Discards lower-priority packets to make room for higher-priority ones.
Active Queue Management (AQM): Proactively drops or marks packets (like Random Early Detection - RED) to signal congestion to the sender before the buffer is completely full.
Scheduling Disciplines
First Come, First Serve (FCFS/FIFO): Packets are transmitted in the exact order they arrive.
Priority Scheduling: Packets are categorized into classes. The scheduler always transmits packets from the highest-priority non-empty queue. This can lead to starvation for lower-priority classes.
Round Robin (RR): The scheduler cycles through classes, transmitting one packet from each class if available. This ensures fairness and prevents starvation.
Weighted Fair Queuing (WFQ): A generalized version of Round Robin where each class is assigned a weight . Each class is guaranteed a throughput rate of:
Network Neutrality and Regulatory Frameworks
Network Neutrality: The principle that Internet Service Providers (ISPs) must treat all data on the internet the same, regardless of content, user, or platform.
2015 FCC Open Internet Order (Bright Line Rules):
No Blocking: ISPs cannot block access to legal content, applications, or services.
No Throttling: ISPs cannot degrade or impair internet traffic based on content or application.
No Paid Prioritization: ISPs cannot accept payment to manage traffic in a way that favors certain content over others (no "fast lanes").