CH 3 - NetworkLayer 1
CH 3 - NetworkLayer 1
NETWORK LAYER
1
Routing Concept
• ROUTING is forwarding of packets from one network to
another network choosing the best path from the routing
table.
1- Static
2- Default
3- Dynamic
2
Static Algorithm
• Flooding routing.
3
Dynamic Routing Algorithm
4
Routing protocol
• A routing protocol is a combination of rules and
other of changes.
5
Popular routing protocols
6
Routing algorithm classification
Q: What are the differences between static and dynamic algorithms?
static algorithm:
routes change slowly over time
dynamic:
routes change more quickly
periodic update
in response to link cost changes
7
Routing Graph abstraction
5
v 3 w
2 5
u 2 1 z
3
1 2
x 1
y
graph: G = (N,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) }
8
Graph abstraction: costs
5
c(x,x䇻) = cost of link (x,x䇻)
v 3 w e.g., c(w,z) = 5
2 5
u 2 1 z cost could always be 1, or inversely
3
1 related to bandwidth, or inversely
x 2
1
y related to congestion
9
ROUTING ALGORITHMS
1. Shortest Path
B(A,2) C(B,3)
B 1 C
2
A(-,-) 3 2 3
2 D(E,3)
A F(E,4)
D
1
1 F
2 E(A,2) 2
E
A– E–D –F
A – E – F is the answer.
10
ROUTING ALGORITHMS
Flooding Algorithm
11
ROUTERS
180.200.0.0 202.5.3.0
16
Two key network-layer functions
13
Interplay between routing and forwarding
value in arriving
packet䇻s header
0111 1
3 2
14