1 of 45

CS 31204: Computer Networks – The Routers

INDIAN INSTITUTE OF TECHNOLOGY

KHARAGPUR

Department of Computer Science and Engineering

Sandip Chakraborty

sandipc@cse.iitkgp.ac.in

Abhijnan Chakraborty

abhijnan@cse.iitkgp.ac.in

2 of 45

The Life of a Router

  • Do
    • Find Path
    • Forward, forward, forward, forward, forward
    • Find Path
    • Forward, forward, forward, forward, forward
  • Repeat until powered off

  • Two basic operations –
    • Construct the routing table – the control plane
    • Do a routing match and forward the packet to a dedicated interface – the data plane

Indian Institute of Technology Kharagpur

3 of 45

Evolution of Router Architecture

  • 1st Generation (Until 1980’s): Standard Computer

  • 2nd Generation (Early 1990’s): Delegate to interfaces

  • 3rd Generation (Late 1990’s): Distributed Architecture

  • 4th Generation (Early 2000’s): Distributed over multiple racks

  • 5th Generation (Today): Software Defined Routing

Indian Institute of Technology Kharagpur

4 of 45

Basic Architectural Components of a Router

Processor

Memory

CPU

Interconnection Network

Interface card

Interface card

Interface card

Interface card

Indian Institute of Technology Kharagpur

5 of 45

Router Hardware

  • Processor is responsible for control functions (route processors)
    • Construct the routing table based on the routing algorithm

  • Forwarding is done at the interface card
    • Route match needs to be very fast
    • Specialized hardware – Ternary Content-Addressable Memory (TCAM)

Control Plane

Data Plane

Routing Table Construction

Forwarding

Indian Institute of Technology Kharagpur

6 of 45

Router Internals

Indian Institute of Technology Kharagpur

7 of 45

Slotted Chassis – The Physical Infrastructure for Routers

  • Large routers are built as slotted chassis
    • Interface cards are inserted in the slots
    • Route processor is also inserted at a slot
  • Simplifies repairs and upgrades of components

Indian Institute of Technology Kharagpur

8 of 45

Functional Components

Routing Functions

IP Forwarding

Routing Table

Table

Update

Route Lookup

Control

Datapath

Per Packet Processing

Indian Institute of Technology Kharagpur

9 of 45

Control Plane in a Router

  • Note that a router is a special purpose computer

  • Implemented as a software (router OS) that supports the basic computing functionalities to run a router along with routing functionalities

  • Routing protocols are implemented in the router OS

  • Example: Cisco IOS

Indian Institute of Technology Kharagpur

10 of 45

Routing Functions

  • Route Calculation
  • Maintenance of the routing table
  • Execution of the routing protocol

  • On commercial routers, routing functions are handled by a single general purpose processor, called the route processor

Indian Institute of Technology Kharagpur

11 of 45

Data Plane of a Router

  • Implement forwarding functionalities – make a route lookup and forward the packet at the destination interface

  • Functionality is similar to a L2 switch – use switch fabric (the mapping from input ports to output ports) to forward the packet from one interface to another

  • Maintains interface buffer – to implement store and forward functionality

Indian Institute of Technology Kharagpur

12 of 45

IP Forwarding

  • Per packet processing of the IP packets

  • IP forwarding is distributed, handled by individual interface controllers

  • Special hardware devices are used - TCAM

Indian Institute of Technology Kharagpur

13 of 45

Per Packet Processing – Basic Architectural Components

Routing Table

Indian Institute of Technology Kharagpur

14 of 45

Forwarding Information Base (FIB)

  • The interfaces maintains a forwarding information base (FIB) – a mapping from input interface to output interface

  • A replica of the routing table used at the interfaces for making the forwarding decision

FIB Lookup

Route Lookup

Forward Packet

Input Interface

Output

Interface

PACKET_IN

PACKET_OUT

Routing Protocols

FIB HIT

FIB MISS

Indian Institute of Technology Kharagpur

15 of 45

Difference between RIB and FIB

  • Routing Information Base (RIB) – The routing table, implemented in software, is maintained at the control plane

  • Forwarding Information Base (FIB) – The copy of the required routes maintained in interface TCAM hardware

  • RIB is dynamic and maintains entire routing information, FIB is updated whenever required

Indian Institute of Technology Kharagpur

16 of 45

RIB and FIB

172.16.1.0

255.255.255.0

172.16.1.2

Eth0

172.16.2.0

255.255.255.0

172.16.2.2

Eth1

10.3.0.0

255.255.0.0

10.3.1.1

Eth3

10.9.0.0

255.255.0.0

10.9.1.1

Eth4

172.16.2.0

255.255.255.0

172.16.2.2

Eth1

10.3.0.0

255.255.0.0

10.3.1.1

Eth3

10.9.0.0

255.255.0.0

10.9.1.1

Eth4

172.16.1.0

255.255.255.0

172.16.1.2

Eth0

10.3.0.0

255.255.0.0

10.3.1.1

Eth3

The RIB

FIB at Eth0

FIB at Eth1

Indian Institute of Technology Kharagpur

17 of 45

RIB Feeds FIB

Image source: Cisco

Indian Institute of Technology Kharagpur

18 of 45

Basic TCAM Architecture

Indian Institute of Technology Kharagpur

19 of 45

Basic TCAM Architecture

Let us try to match 1010

Indian Institute of Technology Kharagpur

20 of 45

Basic TCAM Architecture

Let us try to match 1010

1

Indian Institute of Technology Kharagpur

21 of 45

Basic TCAM Architecture

Let us try to match 1010

1

1

Indian Institute of Technology Kharagpur

22 of 45

Basic TCAM Architecture

Let us try to match 1010

1

1

1

Indian Institute of Technology Kharagpur

23 of 45

Basic TCAM Architecture

Let us try to match 1010

1

1

1

1

Indian Institute of Technology Kharagpur

24 of 45

Basic TCAM Architecture

Let us try to match 1010

1

1

1

1

0

Indian Institute of Technology Kharagpur

25 of 45

Basic TCAM Architecture

Let us try to match 1010

1

1

1

1

0

1

Indian Institute of Technology Kharagpur

26 of 45

Basic TCAM Architecture

Let us try to match 1010

1

1

1

1

0

1

0

0

Indian Institute of Technology Kharagpur

27 of 45

Basic TCAM Architecture

Let us try to match 1010

1

1

1

1

0

1

0

0

1

1

1

0

0

0

Indian Institute of Technology Kharagpur

28 of 45

Basic TCAM Architecture

Let us try to match 1010

1

1

1

1

0

1

0

0

1

1

1

0

0

0

Indian Institute of Technology Kharagpur

29 of 45

Software Defined Networking

Software-defined networking (SDN) is a network framework which involves in separating a network's control functions from its data forwarding functions, centralizing its intelligence, and abstracting its underlying architecture from applications and services.

Indian Institute of Technology Kharagpur

30 of 45

Control and Data Plane

Indian Institute of Technology Kharagpur

  • Control plane
    • The module which takes all decisions, basically an instructor
    • The routing algorithm

  • Data plane
    • The module which carries out the tasks given by the control plane
    • Forwarding of Packets

31 of 45

Control and Data Plane

Indian Institute of Technology Kharagpur

  • Traditional networking devices are proprietary
    • Vendors decide software (control plane) and hardware (data plane)
  • No standardization

These two modules are “baked” in

Unchangeable

32 of 45

What does separating control and data plane mean?

Indian Institute of Technology Kharagpur

  • Vendors only provide the hardware (data plane)

  • We decide the control plane by writing custom logic – the software

But what if they were separate?

33 of 45

What does separating control and data plane mean?

Indian Institute of Technology Kharagpur

  • Vendors only provide the hardware (data plane)
  • We decide the control plane by writing custom logic

Advantages:

  • Features are no longer limited to what the vendor provides
  • Community development
  • Longer life of products

But what if they were separate?

34 of 45

What does separating control and data plane mean?

Indian Institute of Technology Kharagpur

  • Vendors only provide the hardware (data plane)
  • We decide the control plane by writing custom logic

Advantages:

  • Features are no longer limited to what the vendor provides
  • Community development
  • Longer life of products

But what if they were separate?

35 of 45

How Does SDN Work

Indian Institute of Technology Kharagpur

  • Compared to traditional networks, a software defined network has 2 types of devices
    • Controller
    • Switches

  • The switches in SDN are blind
    • No built-in features
    • Need to be instructed by the controller

Zodiac FX - A Tiny SDN Switch

36 of 45

h1

h3

s1

c0

SDN Controller

  • Brains” of the network
  • All policies, routing logic are placed in the controller
  • Teaches” the switches what to do with an unknown packet

37 of 45

h1

h3

s1

c0

SDN Controller

  • “Brains” of the network
  • All policies, routing logic are placed in the controller
  • “Teaches” the switches what to do with an unknown packet

Let us now see a scenario where a packet wants to go from h1 to h3 in an SDN environment

38 of 45

Forwarding Request from h1 to s1

h1

h3

s1

c0

SRC - h1

DST - h3

39 of 45

?

Table MISS

Table Miss at s1

h1

h3

s1

c0

No rule is there for h1->h3 at the beginning, so a FIB miss at S1

40 of 45

Till then, the packet is buffered at s1

Packet-IN

Packet-OUT

Packet-IN to Controller

h1

h3

s1

c0

?

Table MISS

The controller generates the rule based on a software program (the routing logic)

41 of 45

Flow Rule Set at s1…

h1

h3

s1

c0

Rule 1

The rule is installed at the FIB of S1

42 of 45

All Future Packets from h1->h3

h1

h3

s1

c0

Rule 1

The buffered packet is forwarded based on that rule

43 of 45

Buffered Packet Forwarded to h3…

h1

h3

s1

c0

Rule 1

All the future packets from h1->h3 follow the same rule

44 of 45

The SDN Architecture

Image source: qmonnet.github.io

Indian Institute of Technology Kharagpur

45 of 45

Traditional Network vs SDN

Indian Institute of Technology Kharagpur