Overview CS 332 – Computer Networks 1CS332 - Computer Networks.
ECE453 – Introduction to Computer Networks
description
Transcript of ECE453 – Introduction to Computer Networks
![Page 1: ECE453 – Introduction to Computer Networks](https://reader035.fdocuments.us/reader035/viewer/2022070416/5681501f550346895dbe0460/html5/thumbnails/1.jpg)
1
ECE453 – Introduction to Computer Networks
Lecture 9 - The Network Layer (I) - Routing
![Page 2: ECE453 – Introduction to Computer Networks](https://reader035.fdocuments.us/reader035/viewer/2022070416/5681501f550346895dbe0460/html5/thumbnails/2.jpg)
2
RecapFramingError detection and correctionReliable or unreliable data transferChannel allocation protocol
![Page 3: ECE453 – Introduction to Computer Networks](https://reader035.fdocuments.us/reader035/viewer/2022070416/5681501f550346895dbe0460/html5/thumbnails/3.jpg)
3
Network Core and Network Edge
applicationtransportnetworkdata linkphysical
applicationtransportnetworkdata linkphysical
networkdata linkphysical
networkdata linkphysical
logical end-end transportNetworkedge
Network core
![Page 4: ECE453 – Introduction to Computer Networks](https://reader035.fdocuments.us/reader035/viewer/2022070416/5681501f550346895dbe0460/html5/thumbnails/4.jpg)
4
Network Core – Information Transmission
Circuit switching Telephone system
Message switching Mail delivery The message travels as a complete unit. At any
one time, it completely exists in one place.
Packet switching The Internet
![Page 5: ECE453 – Introduction to Computer Networks](https://reader035.fdocuments.us/reader035/viewer/2022070416/5681501f550346895dbe0460/html5/thumbnails/5.jpg)
5
Design Issues
Store-and-forward packet switchingServices to the transport layer Connection-oriented vs.
Connectionless Quality of service (QoS)
![Page 6: ECE453 – Introduction to Computer Networks](https://reader035.fdocuments.us/reader035/viewer/2022070416/5681501f550346895dbe0460/html5/thumbnails/6.jpg)
6
Network Layer Services
Connectionless Best-effort No guarantee The Internet No advance setup
is needed Datagram subnet
Connection-oriented Guaranteed delivery ATM A path from the
source router to the destination router is established before any data packets can be sent
Virtual circuit
![Page 7: ECE453 – Introduction to Computer Networks](https://reader035.fdocuments.us/reader035/viewer/2022070416/5681501f550346895dbe0460/html5/thumbnails/7.jpg)
7
The Internet Network Layer
routingtable
Routing protocols•path selection•RIP, OSPF, BGP
IP protocol•addressing conventions•datagram format•packet handling conventions
ICMP protocol•error reporting•router “signaling”
Transport layer: TCP, UDP
Link layer
physical layer
Networklayer
![Page 8: ECE453 – Introduction to Computer Networks](https://reader035.fdocuments.us/reader035/viewer/2022070416/5681501f550346895dbe0460/html5/thumbnails/8.jpg)
8
Routing - In the Middle of Intersection …
![Page 9: ECE453 – Introduction to Computer Networks](https://reader035.fdocuments.us/reader035/viewer/2022070416/5681501f550346895dbe0460/html5/thumbnails/9.jpg)
9
Different Strategies
Nonadaptive algorithms (or static routing)
Adaptive algorithms (or dynamic routing) Global algorithm
(have a global knowledge – a map)
Decentralized algorithm (get information only from neighbor)
![Page 10: ECE453 – Introduction to Computer Networks](https://reader035.fdocuments.us/reader035/viewer/2022070416/5681501f550346895dbe0460/html5/thumbnails/10.jpg)
10
Graph Abstraction for Routing Algorithms
Graph nodes RoutersGraph edge Physical linksEdge weight Link costLink cost Delay, power consumption, congestion
level, $cost, etc.
Good path or optimal path Minimum link cost
A
ED
CB
F
2
2
13
1
1
2
53
5
![Page 11: ECE453 – Introduction to Computer Networks](https://reader035.fdocuments.us/reader035/viewer/2022070416/5681501f550346895dbe0460/html5/thumbnails/11.jpg)
11
Two Fundamental Routing Algorithms
Link state routing A global algorithm
Distance vector routing (or Bellman-Ford routing, Ford-Fulkerson routing) A decentralized algorithm The original ARPANET routing algorithm,
replaced by LS routing in 1979
![Page 12: ECE453 – Introduction to Computer Networks](https://reader035.fdocuments.us/reader035/viewer/2022070416/5681501f550346895dbe0460/html5/thumbnails/12.jpg)
12
A Link State Routing Algorithm
Net topology, link costs known to all nodes accomplished via “link state broadcast” all nodes have the same info
computes least cost paths from the source to all other nodesIterative algorithm
Dijkstra’s algorithm
![Page 13: ECE453 – Introduction to Computer Networks](https://reader035.fdocuments.us/reader035/viewer/2022070416/5681501f550346895dbe0460/html5/thumbnails/13.jpg)
13
Dijkstra’s Algorithm: An Example
Step012345
start NA
ADADE
ADEBADEBC
ADEBCF
D(B),p(B)2,A2,A2,A
D(C),p(C)5,A4,D3,E3,E
D(D),p(D)1,A
D(E),p(E)infinity
2,D
D(F),p(F)infinityinfinity
4,E4,E4,E
A
ED
CB
F
2
2
13
1
1
2
53
5
![Page 14: ECE453 – Introduction to Computer Networks](https://reader035.fdocuments.us/reader035/viewer/2022070416/5681501f550346895dbe0460/html5/thumbnails/14.jpg)
14
Dijkstra’s Algorithm: DiscussionAlgorithm complexity: n nodes each iteration: need to check all nodes, not in N n*(n+1)/2 comparisons: O(n**2) more efficient implementations possible:
O(nlogn)
Oscillations possible: e.g., link cost = amount of carried trafficA
D
C
B1 1+e
e0
e
1 1
0 0
A
D
C
B2+e 0
001+e1
A
D
C
B0 2+e
1+e10 0
A
D
C
B2+e 0
e01+e1
initially… recompute
routing… recompute … recompute
![Page 15: ECE453 – Introduction to Computer Networks](https://reader035.fdocuments.us/reader035/viewer/2022070416/5681501f550346895dbe0460/html5/thumbnails/15.jpg)
15
DV RoutingEach router maintains a distance table Initialization
0 for itself Infinity for non-neighbor Link cost for neighbor
Message exchange between neighbors
When a neighbor first comes up When information changes
(e.g. change in link cost)
Distance vector calculation Minimize cost to each
destination
D ()
A
B
C
D
A
1
7
6
4
B
14
8
9
11
D
5
5
4
2
Ecost to destination via
dest
inat
ion
D (Y,Z)X
distance from X toY, via Z as next hop
c(X,Z) + min {D (Y,w)}Z
w
=
=
Iterative routingDistributed routing
![Page 16: ECE453 – Introduction to Computer Networks](https://reader035.fdocuments.us/reader035/viewer/2022070416/5681501f550346895dbe0460/html5/thumbnails/16.jpg)
16
DV: Example
X Z12
7
Y
X
Y
Z
![Page 17: ECE453 – Introduction to Computer Networks](https://reader035.fdocuments.us/reader035/viewer/2022070416/5681501f550346895dbe0460/html5/thumbnails/17.jpg)
17
DV: Link Cost Changes
X Z14
50
Y1
algorithmterminates
“good news travels fast”
X
Y
Z
![Page 18: ECE453 – Introduction to Computer Networks](https://reader035.fdocuments.us/reader035/viewer/2022070416/5681501f550346895dbe0460/html5/thumbnails/18.jpg)
18
DV: Link Cost Changes
X Z14
50
Y60
algorithmcontinues
on!
“bad news travels slow”
Count to infinity problem
![Page 19: ECE453 – Introduction to Computer Networks](https://reader035.fdocuments.us/reader035/viewer/2022070416/5681501f550346895dbe0460/html5/thumbnails/19.jpg)
19
Distance Table: An Example
A
E D
CB7
8
1
2
1
2
D (C,D)E
c(E,D) + min {D (C,w)}D
w== 2+2 = 4
D (A,D)E
c(E,D) + min {D (A,w)}D
w== 2+3 = 5
D (A,B)E
c(E,B) + min {D (A,w)}B
w== 8+6 = 14
loop!
loop!
D ()
A
B
C
D
A
1
7
6
4
B
14
8
9
11
D
5
5
4
2
Ecost to destination via
dest
inat
ion