본문 바로가기

Network

Network Layer (1/4) - Data Plane

Goal : 

1. Understand the principles behind network layer services

      - Network Layer Service Models

      - Forwarding vs Routing

      - How a router works

      - Generalized Forwarding

2. Instantiation, Implementation in the Internet

 

 

Network Layer

- The network layer provides host-to-host communication service.

- There is a piece of the network layer in each and every host and router in the network.

Routing determined by forwarding function

- The network layer can be decomposed into two interacting parts, the data plane and the control plane.

- The per-router functions(data plane functions) determines how datagram arriving on router input port is forwarded to router output port. 

 

- The terms forwarding and routing are often used interchangeably by authors discussing the network layer.

- Forwarding refers to the router-local action of transferring a packet from an input link interface to the appropriate output link interface.

- Routing refers to the network-wide process that determines the end-to-end paths that packets take from source to destination.

- A key element in every network router is its forwarding table.

- A router forwards a packet by examining the value of one or more fields in the arriving packet's header, and then using these header values to index into its forwarding table.

- The terms forwarding and switching are often used interchangeably by computer-networking researchers.

 

- Packet Switches could be either link-layer switches or Routers.

- Link-layer switches base their forwarding decision on values in the fields of the link-layer frame.

- Routers base their forwarding decision on header  field values in the network-layer datagram.

- Routers are thus network-layer devices while link-layer switches are link-layer devices.

 

 

Control Plane

- A critical issue is how a router's forwarding table is configured in the first place.

- This issue exposes the important innterplay between forwarding (in a data plane) and routing (in a control plane).

Per-router Control Plane

- The routing algorithm function in one router communicates with the routing algorithm function in other routers to compute the values for its forwarding table by exchanging routing messages containing routing information according to a routing protocol.

Logically Centralized Control Plane

- Remote Controller computes and distributes the forwarding tables to be used by each and every router.

- The routing device performs forwarding only, while the remote controller computes and distributes forwarding tables.

- This control-plane approach is at the heart of software-defined networking(SDN).

 

 

Network Service Model

- The network service model defines the characteristics of end-to-end delivery of packets between sending and receiving hosts.
- Some possible services that the network layer could provide could include : Guaranteed Delivery, Guaranteed Delivery with Bounded Delay, In-order Packet Delivery, Guaranteed Minimal Bandwidth, Security.

 

- The Internet's network layer provides a single service, known as best-effort service.

- With best effort service, packets are neither guaranteed to be received in the order in which they were sent, nor is their eventual delivery even guaranteed, it is a euphemism for no service at all.

- Other network architectures such as ATM have defined and implemented service models that go beyond the Internet's best-effort service.

- However, the Internet's basic best-effort service model combined with adequate bandwidth provisioning have arguably proven to be more than good enough to enable an amazing range of applications.

 

 

Router Architecture Overview

- Forwarding function is the actual transfer of packets from a router's incoming links to the appropriate outgoing links at that router.

- Routers are consisted of input ports, switching fabric, output ports, and routing processor.

Router Architecture Overview

- Input port performs several key functions.

- It performs the physical layer function of terminating an incoming physical link at a router.

- Link-layer function interoperate with link layer at the other side of the incoming link.

- Look up function determines the router output port to which an arriving packet will be forwarded via the switching fabric.

 

- Switching fabric connects the router's input ports to its output ports. It is completely contained within the router.

 

- Output port stores packets received from the switching fabric and transmits these packets on the outgoing link by performing the necessary link-layer and physical-layer functions.

 

- Routing processor performs control-plane functions.

- In traditional routers, it executes the routing protocols, maintains routing tables and attached link state information, and computes the forwarding table for the router.

- In SDN routers, the routing processor is repsonsible for communicating with the remote controller in order to receive forwarding table entries computed by the remote controller, and install these entries in the router's input ports.

 

- Input port, Output port, Switching fabric are almost always implemented in hardware.

- The control plane functions are usually implemented in software and execute on the routing processor.

 

 

Destination-based Forwarding

- While Destination-based Forwarding is forwarding based only on destination IP address.

-  With this style of forwarding table, the router matches a prefix of the packet's destination address with the entries in the table.

- When looking for forwarding table entry for given destination address, we should use the longest address prefix that matches destination address.

 

 

Switching Fabrics

- Once a packet's output port has been determined via the lookup, the packet can be sent into the switching fabric.

- Switching rate is the rate at which packets can be transfer from inputs to outputs.

- The three types of switching fabrics are memory, bus, and crossbar.

Three types of switching fabric

 

1) Switching via Memory

Switching via memory

- Traditional computers perform switching between input and output ports under direct control of the CPU.

- The packet is copied from the input port into processor memory.

- After extracting destination address and looking up appropirate output port from the forwarding table, the packet is copied to the output port's buffers.

- If memory bandwidth is B packets per second, then the overall forwarding throughput must be less than B/2.

 

2) Switching via a bus

- Input port transfers a packet directly to the output port over a shared bus, without intervention by the routing processor.

- The input port pre-pend a switch-internal label(header) to the packet.

- All output port receive the packet, but only the port that matches the label will keep the packet.

- The label is then removed at the output port, as this label is only used within the switch to cross the bus.

- The switching speed of the router is limited to the bus speed.

 

3) Switching via interconnection network

- One way to overcome the bandwidth limitation of a single, shared bus is to use a more sophisticated interconnection network, such as those that have been used in the past to interconnect processors in a multiprocessor computer architecture.

- Unlike the previous two approaches, cross-bar switches are capable of forwarding multiple packets in parallel.

- A crossbar switch is non-blocking, a packet being forwarded to an output port will not be blocked from reaching that output port as long as no other packet is currently being forwarded to that output port.

 

 

Queuing

- Output port processing, takes packets that have been stored in the output port's memory and transmits them over the output link.

- This includes selecting and de-queuing packets for transmission, and performing the needed link-layer and physical-layer transmission functions.

 

- Packet queues may form at both the input ports and the output ports.

- Packet loss will occur when no memory is available to store arriving packets.

Input port queuing

- Packets must join input port queues to wait their turn to be transferred throguh the switching fabric to the output port.

- Head-of-the-line(HOL) Blocking is a phenomenon which in an input-queued switch, a queued packet in an input queue must wait for transfer through the fabric because it is blocked by another packet at the head of the line.

Output port queuing

- When there is not enough memory to buffer an incoming packet, a decision must be made to either drop the arriving packet or remove one or more already-queued packets to make room for the newly arrived packet.

- Buffering occurs when arrival rate via switch exceeds the output line speed.

- Rule of thumb is that the average buffering rate should be equal to RTT times link capacity.

 

 

Scheduling Mechanism

- The important question is how to determine the order in which queued packets should be transmitted over an outgoing link.

FIFO Scheduling

- There is first-come-first-servced(FIFO) is a simple implementation.

Priority Scheduling

- Under priority queuing, packets arriving at the output link are classified into priority classes upon arrival at the queue.

- The choice among packets in the same priority class is typically done in a FIFO manner.

- Under a non-preemptive priority queuing discipline, the transmission of a packet is not interrupted once it has begun.

Round Robin Scheduling

- Round Robin scheduling is cyclically scanning class queues, and sending one complete packet from each class if available.

Weighted Fair Queuing

- Weighted Fair Queuing is a generalized Round Robin Scheduling, where each class gets weighted amount of service in each cycle.

'Network' 카테고리의 다른 글

Network Layer (2/4) : Data Plane  (0) 2021.10.31
Transport Layer (3/3)  (0) 2021.10.12
Transport Layer (2/3)  (0) 2021.10.11
Transport Layer (1/3)  (0) 2021.10.11
Application Layer (3/3)  (0) 2021.10.11