Network layer & the data plane
San Skulrattanakulchai
October 29, 2018
Topics
- Network layer
- Data plane
- Control plane
- Network service model
- Router hardware
- Input port processing
- Switching # Queing
- Packet scheduling
Network layer
- The network layer is responsible for establishing end-to-end connection between hosts.
- The transport layer exists only at the end systems. In contrast, the network layer exists at both the end systems and the routers, i.e. in both the network core and the network edges.
- The network layer can be decomposed into two parts:
- the data plane: per-router (forwarding)
- the control plane: network-wide (routing)
- Forwarding means for each packet that arrives at the router's input link, the router must move it to the appropriate output link. It also includes blocking some packets. Done in hardware, finished within a few nanaseconds.
- Routing means to algorithmically determine the route the packet must take to get from the sender to the receiver. Such algorithms are called routing algorithms. Done in software, finished within seconds.
Data plane
- Two methods:
- traditional forwarding: based on datagram’s destination address
- generalized forwarding: use several fields in the datagram’s header
- TCP/IP has two network-layer protocols
- Each router has a forwarding table. When a packet arrives, the router extracts relevant value(s) from the header of the packet and use it to index into the forwarding table to determine the outgoing link interface at that router to forward.
Control plane
- Two approaches:
- traditional
- software-defined networking (SDN)
- In the traditional approach, the routing algorithm is a distributed algorithm. Each router takes part in it by performing its part of the computation and communicates its result to nearby routers. The communication is by exchanging messages containing routing information through a routing protocol.
- In the SDN approach, a remote controller, physically separate from the routers, computes and distributes the tables for all the routers in the network. This remote controller can be a data center, an ISP, or some third party.
Network service model
- Theoretically, a network layer can provide these services to the transport layer:
- guaranteed delivery
- guaranteed delivery with bounded delay
- in-order packet delivery
- guaranteed minimum bandwidth
- security
- congestion control
- How these questions are answered determines the network service model of the network layer.
- IP is one extreme; it provides a single service—the best-effort service. It provides none of the services we listed above!
- The ATM network architecture is another extreme; it provides most of the services listed above.
- Time has proven: IP model won; ATM lost.
Router hardware
- A router's hardware consists of 4 components: input ports, switching fabric, output ports and routing processor.
- An input port performs 3 functions
- terminating the incoming physical link at a router
- link-layer functions needed to interoperate with the link-layer at the other side of the incoming link
- table lookup function
- The switching fabric connects the router's input ports to its output ports; it’s the network within the router.
- An output port stores packets received from the switching fabric and transmit them on the outgoing link by performing the necessary link-layer & physcial-layer functions.
- The routing processor in the traditional approach executes the routing protocols, maintains routing tables & attached link state information, & computes the forwarding table.
- An SDN router processor communicates with the remote controller to receive forwarding table entries and install them in the input ports. It also performs network management functions.
Switching
- The switching function of the switching fabric can be done using one of
Queing
- Theoretically arriving packets can queue at both the input ports and output ports, and queuing delay & loss can occur at both kinds of ports.
- Input queueing can suffer from the head-of-the-line (HOL) blocking phenomenon, where a blocked packet at the head of the queue prevents other “theoretically unblocked” packets inside the queue to go out.
- Output queues can also overflow. When it does, the router must decide to drop some packet, either the newly arrived packet (drop-tail) or some other packet already in the queue.
- It can also be proactive and starts dropping packets before queue buffer is full (active queue management (AQM)).
- A widely implemented AQM algorithm is Random Early Detection (RED), where after the queue has achieved a certain length, the router starts dropping arriving packets with a certain probability.
Packet scheduling
- First-in-first-out (FIFO)
- Prioriity queuing
- Round robin & weighted fair queuing (WFQ)