Data Chapter 6
Routing in Switched Networks
Outlines
2
Review: Two Key Network-Layer Functions
3
Analogy:
Routing:
Forwarding: process
Determine route taken by
packets from source to of getting through
destination. single interchange.
Forwarding: Passing thru A.A
Move packets from Routing: process of
router’s input to planning trip from
appropriate router source to dest.
output. Gonder - A.A - Jimma
Introduction to Routing
4
Routing is one of the most complex and crucial design
aspects of switched data networks.
Routed networks are often large and complex, and it would be
very difficult to manage and update network information on
all routers all the time.
The primary function of a packet-switching network is to
accept packets from a source station and deliver them to a
destination station.
Cont’
5
Hence, a routing function must be performed and some
of the requirements for this function are include:
Correctness
Simplicity
Optimality
Ef ficiency
Stability
Cont’
6
Several routing algorithms have been developed to address
routing and updating information dif ficulties.
These algorithms allow the routers to learn about the
network and then make decisions based on that information.
To learn paths (or routes) through a network, and make
decisions on where to send packets, a router use the
following parameters:
Cont’
7
Destination address: Typically the IP address of the packet
destination.
Source address: Where the information came from.
Possible routes: Routes that can get information from its
present location or source to some other location.
Best route: The best path to the intended destination.
Status of routes: The current state of routes, which routers
track to ensure timely delivery of information.
How to determine “best” path?
8
Performance criteria used for selection of route:
Hop count: Number of times a packet goes over a router.
Delay: Time required to reach the destination.
Reliability: Bit-error rate of each network link.
Cost: Arbitrary value based on a network.
Maximum transmission unit (MTU): Maximum message
length (or packet size) allowed on the path.
The “minimum hop” can be generalized as “least cost” routing.
Graph theory: Defn.
9
A graph is a set of vertices (or nodes) linked by
edges.
1
3
2 5
4
Mathematically, we often write G = (V,E)
V: set of vertices, so |V| = number of vertices
E: set of edges, so |E| = number of edges
Graph theory: The need
10
To present the relationships between
different objects/elements in a
mathematical way
Examples:
Network connections
Friendship
Roads, Airline routes,
Question: What could the vertices and edges
represent in the above examples?
Real-time example: Graph application
1
1
3 Gonder
4
A.zemen
1 5
Arbay
Ebnat a
5
Wereta
7 1
DT
Question: Which road has least cost from Wereta to Arbaya?
Graph theory: for routing
12
Routing protocol
5
Goal: determine “good” path
(sequence of routers) through v
3
w
network from source to 2 5
destination.
u 2 1 z
Graph abstraction for 3
1
routing algorithms: G(N,E) x y
2
1
Graph nodes (set N) are
routers. “Good” path: minimum cost path.
Graph edges (set E) are
physical links.
Routing Algorithms: Graph abstraction
13
3
v w 5
2
u 2 1 z
3
1 2
x y
Graph: G = (N, 1
E)
♪ N = set of routers = { u, v, w, x, y, z }
♪ E = set of links ={ (u,v), (u,x), (v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z) }
Routing protocols-classif ication
15
Routing protocols
Adaptive(dynamic) Non-Adaptive(static)
Interior Gateway Exterior Gateway
Protocol(IGP) Protocol(EGP)
Distance Vector Link State
Most Important !
Cont’
16
Dynamic: Interior Gateway
Protocol(IGP)
Learn about changes in
Handle routing within an
the network automatically.
Autonomous system.
Static:
Exterior Gateway Protocol(EGP)
Only a network
Handle routing outside an
administrator can change
Autonomous system.
an information.
Cont’
1
7
Note:
An autonomous system is a network or a collection of
networks that are all supervised by a single entity or an
organization.
Distance-Vector (DV) routing
18
Bellman-Ford algorithm is used to perform routing.
It is least cost algorithm.
Each node knows the distance (cost) to its directly
connected neighbors.
A node sends a list to its neighbors with the
current distances to all nodes.
Cont’
19
When a router receives information from another router, it
increments whatever metric it is using. This process is
called distance accumulation.
Routers using this method know the distance between any
two points in the network, but they do not know the exact
topology of an internetwork.
Distance vector uses regular updates and sends the whole
routing table every time.
Link-State (LS) Routing
25
The shortest paths can be compute with Dijkstra’s algorithm.
It is Least-cost routing algorithm.
Measure the delay (cost) to its neighbors.
The distance information (link state) is broadcast to all
nodes in the network.
Each node calculates the routing tables independently.
Cont’
26
Link-state routing provides better scaling than distance-
vector routing because it only sends updates when there is
a change in the network, and then it only sends information
specific to the change that occurred.
It is designed to overcome the drawbacks of DV routing.
When a router is initialized, it determines the link cost on
each of its network interfaces.
Cont’
27
The router then advertises this set of link costs to all other
routers in the internet topology, not just neighboring routers.
Open Shortest Path First (OSPF) is the main protocol in use today.
Dijkstra’s algorithm:
“Find the shortest path from a given source node to all other
nodes by developing the paths for increasing path length.”
Comparisons
3
1
Distance vector routing Link State routing
Bellman-Ford algorithm is used. Dijsktra algorithm is used.
The routers receive the topological The router receive complete
information from the neighbor. information on the network
Calculates the best route based on topology.
the distance. Calculates the best route on the
Updates full routing table. basis of least cost.
Simple to implement. Updates only the link state
Complex to implement