0% found this document useful (0 votes)
13 views14 pages

CH 3 - NetworkLayer 1

The document discusses the concept of routing in networking, highlighting the forwarding of packets and the use of routing tables. It differentiates between static and dynamic routing algorithms, outlines various routing protocols, and explains the role of routers in interconnecting networks. Additionally, it covers routing metrics, graph abstractions, and the interplay between routing and forwarding functions.

Uploaded by

molamoe11
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views14 pages

CH 3 - NetworkLayer 1

The document discusses the concept of routing in networking, highlighting the forwarding of packets and the use of routing tables. It differentiates between static and dynamic routing algorithms, outlines various routing protocols, and explains the role of routers in interconnecting networks. Additionally, it covers routing metrics, graph abstractions, and the interplay between routing and forwarding functions.

Uploaded by

molamoe11
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

3.

NETWORK LAYER

1
Routing Concept
• ROUTING is forwarding of packets from one network to
another network choosing the best path from the routing
table.

• Routing table consist of only the best routes for every


destinations.
• Types of routing:

1- Static

2- Default

3- Dynamic
2
Static Algorithm

• Flooding routing.

• Shortest path routing.

• Flow based routing.

3
Dynamic Routing Algorithm

• Distance Vector Routing.

• Link state routing.

4
Routing protocol
• A routing protocol is a combination of rules and

procedures that lets routers in the internet inform each

other of changes.

• Routing metric: a method by which routing algorithms

determines that one route is better than another route

Metric may be(hop count, bandwidth ,delay, load)

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) }

graph abstraction is useful in other network contexts, e.g.,


P2P, where N is set of peers and E is set of TCP connections

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

cost of path (x1, x2, x3,…, xp) = c(x1,x2) + c(x2,x3) + … + c(xp-1,xp)

key question: what is the least-cost path between u and z ?


routing algorithm: algorithm that finds that least cost path

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

To prevent packets from circulating indefinitely:


1- a packet has a hop counter.
2- every time a packet arrives at router, the hop counter is decrease by 1.
3- once the hop counter of a packet reaches 0, the packet is discarded.

11
ROUTERS

A layer 3 device that is used to interconnect 2 or more logical networks:

1- can filter broadcast traffic,


2- preventing broadcast traffic from one network from reaching another network.

180.200.0.0 202.5.3.0

16
Two key network-layer functions

• forwarding: move packets from router䇻s input to appropriate


router output

• routing: determine route taken by packets from source to


destination.

13
Interplay between routing and forwarding

routing algorithm Routing algorithm determines


the forwarding table

local forwarding table


header value output link
Forwarding table determines
0100 3
0101 2 local forwarding at this router
0111 2
1001 1

value in arriving
packet䇻s header
0111 1

3 2

14

You might also like