Routers
An Introduction
Prof. David Bernstein
James Madison University
Computer Science Department
bernstdh@jmu.edu
Introduction
Role of the Network Layer:
Move packets from the sender to the reciever
Network Layer Functions:
Forwarding - moving a packet from an input link to an output link
Routing - determining the route/path packets will take when moving from the sender to the receiver
An Important(?) Distinction
Switch (a.k.a., Packet Switch):
A link-layer forwarding device (i.e., a device that makes its forwarding decisions using fields in the link layer frame)
Router:
A network-layer forwarding device (i.e., a device that makes its forwarding decisions using fields in the network layer frame)
An Abstract View of a Router
Input Link:
The incoming physical connection
Processing
A buffer of incoming packets
Output Link:
A buffer of outgoing packets
Processing
The outgoing physical connection
Switching Fabric:
Connects the input links to the output links
Routing Processor:
Maintains routing information
Executes the routing protocols
The Forwarding Plane
Components:
Input Links
Switching Fabric
Output Links
Requirements:
Given a 10 Gbps input link and a 64 byte datagram the input port has only about 50 nanoseconds to process the datagram
Most systems must have multiple input links
Implication:
These components/functions are usually implemented in custom hardware (e.g., Cisco, Alcatel-Lucent, Juniper, Huawei, Broadcom)
Input/Output Processing Requirements
Input:
Decapsulation
Lookup
Forwarding
Output:
Encapsulation
Switching
Memory Switching:
The processor reads packets (one at a time) from the input link's memory and writes them to the output link's memory (as in a shared memory computer)
Bus Switching:
The input link prepends a destination to the packet and transmits it to the bus
Only one packet can be on the bus at a time
All output ports receive the packet but it is ignored by all but the designated port which strips-off the destination
Interconnection Network Switching (e.g., Crossbar Switch):
Can forward multiple packets in parallel (to different output links)
Behavior at the Buffers
Queueing:
Does not tend to occur at the input links because the transfer rate of the switching fabric tends to be very high
Does tend to happen at the output links
Packet Loss:
Buffers have a finite size so packets can be dropped
There's Always More to Learn