Packet vs. Circuit Switching. Network Layer. Network Service vs. Operation. Network Service. Chapter 6 Packet-Switching Networks

Chapter 6 Packet-Switching Networks Services and Operation Topology Datagrams and Virtual Circuits Routing Services & Internal Operation 1 Packet v...
Author: Barry Norman
2 downloads 0 Views 464KB Size
Chapter 6 Packet-Switching Networks Services and Operation Topology Datagrams and Virtual Circuits Routing

Services & Internal Operation

1

Packet vs. Circuit Switching

Network Layer

z

Transfers packets across multiple links and/or multiple networks

z

2

z

Requires the coordinated actions of multiple, geographically distributed network elements (switches & routers) Biggest Challenges

z

z

Circuit-switching: end-to-end dedicated circuits between clients (save for later discussion) Packet-switching: transfer of information as payload in data packets (this and the next few lectures)

z z

t1

t0

Addressing: where should information be directed to? Routing: what path should be used to get information there? Very large scales (billions of terminals).

z

Network

z z

Packets undergo random delays & possible loss Different applications impose different requirements

3

Network Service

Network Service vs. Operation

Messages

Messages Segments

Transport layer

z

z

z Network layer

Network layer

Network layer

Network layer

Data link layer

Data link layer

Data link layer

Data link layer

Physical layer

Physical layer

Physical layer

Physical layer

Network Service z

Transport layer

Network service

End system α

4

Internal Network Operation z z

End system β

z

Connectionless. E.g., IP Connection-Oriented. E.g., telephone connection, ATM (later).

Various combinations are possible z z z

z

Connectionless: Datagram transfer Connection-Oriented: Reliable and possibly constant bit rate transfer

Connection-oriented service over Connectionless operation Connectionless service over Connection-Oriented operation Context & requirements determine what makes sense

Network layer can offer a variety of services to transport layer z z

Connection-oriented service or connectionless service Best-effort or delay/loss guarantees

5

6

1

Network Layer Functions

Complexity at the Edge or in the Core? z

The End-to-End Argument for System Design An end-to-end function is best implemented at a higher level because a higher level is closer to the application and better positioned to ensure correct operation

z

Example: stream transfer service z

z

Establishing an explicit connection for each stream across network requires all network elements to be aware of connection; In connectionless network operation, network elements do not deal with each explicit connection and hence are much simpler

Essential z Routing: mechanisms for determining the set of best paths. It requires the collaboration of network elements z Forwarding: transfer of packets z Priority & Scheduling: determining order of packet transmission Optional: z Congestion control z Segmentation & reassembly z Security

7

8

Packet Network z

Internet structure highly decentralized z

z

Packet Network Topology

z

Individual packet streams can be highly bursty z

z

Paths traversed by packets can go through many networks controlled by different organizations No single entity responsible for end-to-end service Statistical multiplexing is used to concentrate streams

User demand can undergo dramatic change z

Peer-to-peer applications stimulated huge growth in traffic volumes

9

Access Multiplexing

z z

LAN Concentration r

WiFi

Switch / Router

To packet network

r Nr

•••

r Home Router

•••

Ethernet

10

nc

z z

z

z

z

z

z

z z

z

z

z

Nc

Packet traffic from users multiplexed at access to network into aggregated streams, e.g., DSL, Cable modem, Home LAN Access Multiplexer z z z z z

N subscribers connected @ c bps to mux Each subscriber active r/c of time Mux has C=nc bps to network Oversubscription rate: N/n Find n so that at most 1% overflow probability

z

LAN Hubs and switches in the access network also aggregate packet streams that flows into switches and routers

Feasible oversubscription rate N/n increases with size 11

12

2

Servers have redundant connectivity to backbone

Campus Network Organization Servers

To Internet or wide area network

s

Gateway

Backbone

Internet service provider

s

R

R

Connecting to Internet Service Provider (ISP)

Border routers

R

S R

Departmental Server

S

Campus Network

S R

Border routers Interdomain level

R

High-speed Only outgoing campus leave packets backbone net LAN through connects dept router routers

Autonomous system or domain

s

s s s

s

s s

s

Intradomain level s

LAN

s

s

s

network administered by single organization

13

Internet Backbone

14

Key Role of Routing

National Service Provider A

How to get packet from here to there? z Decentralized routing z

National Service Provider B z

NAP

NAP National Service Provider C

z

Private peering

Scalability

z

z

z z

Network Access Points: set up during original commercialization of Internet to facilitate exchange of traffic Private Peering Points: two-party inter-ISP agreements to exchange traffic

Interior gateway protocols (IGPs) determine routes within a domain Exterior gateway protocols (EGPs) determine routes across domains Routes must be consistent & produce stable flows Hierarchical addressing essential to keeping size of routing tables manageable

15

16

The Switching Function z z z

Dynamic interconnection of inputs to outputs Enables dynamic sharing of transmission resource Two fundamental approaches: z z

Connectionless Connection-Oriented: Call setup control, Connection control

Datagrams & Virtual Circuits

Backbone Network Switch

Access Network

17

18

3

Example: Message Switching z z

z

Message

Message z

Message

Source

z

Packet Switching Network

Message switching invented for telegraph Entire messages multiplexed onto shared lines, stored & forwarded Headers for source & destination addresses Routing at message switches Connectionless

User Transmission line Network Packet switch

Message

Packet switching network z Transfers packets between users z Transmission lines + packet switches (routers) z Origin in message switching Two modes of operation: Connectionless packet switching z Virtual circuit switching z

Destination Switches

19

20

Switching Delay

(Connectionless) Datagram Networks z z

Source

T

t

Switch 1

z

t

τ

z z

Switch 2

t z

t

Destination

Delay

Messages broken into packets Source & destination addresses in packet header Connectionless, packets routed independently (datagram) Packet may arrive out of order Pipelining of packets across network can reduce delay, increase throughput Lower delay than message switching, suitable for interactive traffic

Packet 1 Packet 1 Packet 2

Packet 2 Packet 2

Minimum delay = L(τ + T), L= # of hops

Possible additional queueing delays at each link 21

22

Packet Switching Delay: k-Packet Message over L Hops Source Switch 1

Routing Tables in Datagram Networks t

1

τ

Switch 2

2

3

Destination address

Output port

z

t 1

2

3

0785

7

1345

12

1566

6

z

t 1

2

Destination

3

t

Let P=T/k Delay = Lτ + LP + (k-1)P Lτ + (L-1)P first bit received Lτ + LP first bit released Lτ + LP + (k-1)P last bit released

z

z

2458 23

12

Route determined by table lookup Routing decision involves finding next hop in route to given destination Routing table has an entry for each destination specifying output port that leads to next hop Size of table becomes impractical for very large number of destinations 24

4

Example: Internet Routing z

Internet protocol uses datagram packet switching across networks

z

Flat Routing z

Networks are treated as data links

z

z

Flat vs Hierarchical Routing

z

Hosts have two-port IP address: 0

z

Hierarchical Routing z

hostid

netid

z

z

Routers do table lookup on network address z

z

All routers are peers Does not scale

z

This reduces size of routing table

z

In addition, network addresses are assigned so that they can also be aggregated

z

Partitioning: Domains, autonomous systems, areas... Some routers part of routing backbone Some routers only communicate within an area Efficient because it matches typical traffic flow patterns Scales

25

Hierarchical Addressing and Routing 0000 0001 0010 0011

1 3 2

1000 1001 1010 1011

00 01 10 11

00 01 10 11

Packet

5

Virtual circuit 1100 1101 1110 1111

3 4 3 5

z z

z z

Packet

Packet

Packet

R2

1 3 2 3

(Connection-Oriented) Virtual Circuits

0100 0101 0110 0111

4 R1

26

z

Prefix indicates network where host is attached Routing tables require 4 entries each, much less than nonhierarchical routing

z z z z

Call set-up phase sets ups pointers in fixed path along network All packets for a connection follow the same path Abbreviated header identifies connection on each link Packets queue for transmission Variable bit rates possible, negotiated during call set-up Delays variable, cannot be less than circuit switching Example: ATM (Asynchronous Transfer Mode)

27

Connection Setup Connect request Connect confirm z z z

z

z

SW 1

Connect request Connect confirm

SW 2

28

Connection Setup Delay …

SW n

Connect request

t

Connect request

Connect confirm

CC

CR

Signaling messages propagate as route is selected Signaling messages identify connection and setup tables in switches Typically a connection is identified by a local tag, Virtual Circuit Identifier (VCI) Each switch only needs to know how to relate an incoming tag in one input to an outgoing tag in the corresponding output Once tables are setup, packets can flow along path

29

CC CR

z z z

Connect confirm

1

2

3 1

2

Release

3

t t

1

2

3

t

Connection setup delay incurred before packet transmission Delay acceptable for sustained transfer of large # of packets This delay overhead may be unacceptably high if only a few packets are being transferred 30

5

Cut-Through switching

Virtual Circuit Forwarding Tables Input VCI

Output port

Output VCI

z

z

12

44

13

z

15

15

23

27

13

16

z z

7

58

Each input port of packet switch has a forwarding table Lookup entry for VCI of incoming packet Determine output port (next hop) and insert VCI for next link Very high speeds are possible Table can also include priority or other information about how packet should be treated

Source

t 2

1

Switch 1

3

t 2

1

Switch 2

3

t 2

1

t

Destination

Minimum delay = Lτ + T , L= # of hops

Some networks perform error checking on header only, so packet can be forwarded as soon as header is received & processed Delays reduced further with cut-through switching

z z

34

3

31

32

Generic Packet Switch

z

1

Line card

2

Line card

3

z z





z

Line card

Inputs contain multiplexed flows from access MUXs & other packet switches Flows demultiplexed at input, routed and/or forwarded to output ports Packets buffered, prioritized, and multiplexed on output lines

N

Line card

Line card

z

Transfer packets between line cards

Egress Line Cards

z

Output ports

z

Scheduling & priority Multiplexing

(a) 34

(b) Output buffering

(a) Input buffering Inputs

1

3

1

2

83

2 3

3

N

N

3









z

N

Inputs

2

3

Routing in small switches Signalling & resource allocation

Interconnection Fabric

z



Queue Control

Shared Memory

Controller

z

Crossbar Switches

1

2

z

3

Line card

Data path Control path

Output Buffering

1

2

z

Shared Memory Packet Switch Connection Control

1

Line card

Input ports

33

Ingress Processing

z

Line card

Header processing Demultiplexing Routing in large switches



z z z N

z



2 z z z N



•••

2

“Unfolded” View of Switch z Ingress Line Cards

Controller

•••

1

1

Interconnection fabric

•••

Packet Switch: Where Traffic Meet

1

N

N

z z

Small switches can be built by reading/writing into shared memory

z 35

2 3 Outputs

N

1

2 3 Outputs

N

Large switches built from crossbar & multistage space switches Requires centralized controller/scheduler (who sends to whom when) Can buffer at input, output, or both (performance vs complexity) 36

6

Self-Routing Switches Inputs

Outputs

0

0

1

1

2

2

3

3

4

4

5

5

6

6

7

7 Stage 1

z z z

Routing

Stage 2

Stage 3

Self-routing switches do not require controller Output port number determines route 101 → (1) lower port, (2) upper port, (3) lower port 37

Routing in Packet Networks 1

38

Routing Tables & Routing Algorithm z

3 6

z

z

4 2

z

z

Node (switch or router)

z

z

1-3-6, 1-4-5-6, 1-2-5-6

z

Which is “best”? z

Min delay? Min hop? Max bandwidth? Min cost? Max reliability?

z

z z z

z

40

z

All routes determined by a central node All state information sent to central node Problems adapting to frequent topology changes Does not scale

z z z

Static Routing z z z

Distributed Routing z

Optimality, Robustness, Simplicity

Static vs Dynamic Routing

Centralized Routing z

Topology or bandwidth changes, congestion Rapid convergence of routers to consistent set of routes Freedom from persistent loops

39

Centralized vs Distributed Routing z

Link up/down; congested; delay or other metrics

Need to distribute link state information using a routing protocol Need to compute routes Responsiveness to changes z

Three possible (loopfree) routes from 1 to 6: z

z

5

Need information on state of links

z

Routes determined by routers using distributed algorithm State information exchanged by routers Adapts to topology and other changes Better scalability

z

Dynamic Routing z z z

41

Set up manually, do not change; requires administration Works when traffic predictable & network is simple Used to override some routes set by dynamic algorithm Used to provide default router Adapt to changes in network conditions Automated Calculates routes based on received updated network state information

42

7

Routing in Virtual-Circuit Networks

Routing Tables in Virtual Circuit Networks Node 3

2

1 A

1 3

5

Host

8 6

1

4 VCI

z

Incoming Node VCI A 1 A 5 3 2 3 3

5

2

2

Node 2

5

Incoming Node VCI C 6 4 3

D

Route determined during connection setup Tables in switches implement forwarding that realizes selected route

z

Node 6 Incoming Node VCI 3 7 3 1 B 5 B 8

Outgoing Node VCI B 8 B 5 3 1 3 7

Destination 1 2 4 5 6

Next node 1 4 4 6 6

Destination 1 2 3 5 6

Node 4 Next node 1 2 3 5 3

Node 6 Destination Next node 1 3 2 5 3 3 4 3 5 5

z

z

Outgoing Node VCI 3 2 5 5 2 3 3 4

Node 5 Incoming Node VCI 4 5 D 2

Outgoing Node VCI D 2 4 5

From A & VCI 5 → 3 & VCI 3 → 4 & VCI 4 → 5 & VCI 5 → D & VCI 2

44

Flooding: broadcast to all nodes z z z z z

z

Node 5 Next node 4 2 4 4 6

No routing tables Useful in propagating info to all nodes, e.g., link state Send packet on all ports except one where it arrived Exponential growth in packet transmissions Limited flooding using Time-to-Live, ID or sequence number

Deflection Routing z

Destination 1 2 3 4 6

Outgoing Node VCI 4 3 C 6

Incoming Node VCI 2 3 3 4 3 2 5 5

Specialized Routing

Node 3

Node 2 Next node 1 1 4 5 5

Outgoing Node VCI 6 7 4 4 6 1 1 2 4 2 1 3

Example: VCI from A to D z

43

Routing Tables in Datagram Networks

Destination 1 3 4 5 6

Incoming Node VCI 1 2 1 3 4 2 6 7 6 1 4 4

Node 4

6

Node 1 Destination Next node 2 2 3 3 4 4 5 2 6 3

Outgoing Node VCI 3 2 3 3 A 1 A 5

Switch or router

5

2

z

B

4 3

C

7

3

Node 1

z z

z

Fixed, preset routing procedure, no route synthesis Network nodes forward packets to preferred port, if busy, deflect packet to another port Works well with regular topologies z Manhattan street network (one-way streets) Bufferless operation is possible z Good for optical networks because all-optical buffering not viable

45

1

46

1

3

3

6

6

4

2

4

2

5

Flooding is initiated from Node 1: Hop 1 transmissions 47

5

Flooding is initiated from Node 1: Hop 2 transmissions

48

8

Shortest Paths & Routing 1

z

3 6

z z z

4

Typically it is possible to attach a cost or distance to a link connecting two nodes Routing can then be posed as a shortest path problem Path Length = sum of costs or distances Possible metrics z z z

2

5

z z z

Flooding is initiated from Node 1: Hop 3 transmissions

Hop count: rough measure of resources used Reliability: link availability; BER Delay: sum of delays along path; complex & dynamic Bandwidth: “available capacity” in a path Load: Link & router utilization along path Cost: $$$

49

Shortest Path Approaches

50

Distance Vector

Distance Vector Protocols z Neighbors exchange list of distances to destinations z Best next-hop determined for each destination z Ford-Fulkerson (distributed) shortest path algorithm Link State Protocols z Link state information flooded to all routers z Routers have complete topology information z Shortest path (& hence next hop) calculated z Dijkstra (centralized) shortest path algorithm

Local Signpost z Direction z Distance

Table Synthesis Neighbors exchange table entries z Determine current best next hop z Inform neighbors z

Routing Table For each destination list: z Next Node dest next dist z Distance

z z

Periodically After changes

51

Shortest Path

52

Why Distance Vector Works

Focus on how nodes find their shortest path to a given destination node, i.e. Chicago

SJ sends accurate info San Jose

Chicago

Dj'

j' i only has local info from neighbors

Cij'

i Di

Cij Cij”

3 Hops From SJ

j

2 Hops From SJ

1 Hop From SJ

Dj Hop-1 nodes calculate current (next hop, dist), & send to neighbors

j" Dj"

If Di is the shortest distance to Chicago from i and if j is a neighbor on the shortest path, then Di = Cij + Dj

Accurate info about SJ ripples across network, Shortest Path Converges 53

54

9

Bellman-Ford Algorithm

Bellman-Ford Algorithm z z

z

z

Consider computations for one destination d Initialization z Each node table has 1 row for destination d z Distance of node d to itself is zero: Dd=0 z Distance of other node j to d is infinite: Dj=∝, for j≠ d z Next hop node nj = -1 to indicate not yet defined for j ≠ d Send Step z Send new distance vector to immediate neighbors across local link Receive Step z At node j, find the next hop that gives the minimum distance to d, z z

z

z z

z z

Now consider parallel computations for all destinations d Initialization z Each node has 1 row for each destination d z Distance of node d to itself is zero: Dd(d)=0 z Distance of other node j to d is infinite: Dj(d)= ∝ , for j ≠ d z Next node nj = -1 since not yet defined Send Step z Send new distance vector to immediate neighbors across local link Receive Step z For each destination d, find the next hop that gives the minimum distance to d, z

Minj { Cij + Dj }

z

Replace old (nj, Dj(d)) by new (nj*, Dj*(d)) if new next node or distance

Go to send step

z

Minj { Cij+ Dj(d) }

Replace old (nj, Di(d)) by new (nj*, Dj*(d)) if new next node or distance found

Go to send step

55

56

Iteration

Node 1

Node 2

Node 3

Node 4

Node 5

Iteration

Node 1

Node 2

Node 3

Node 4

Node 5

Initial

(-1, ∞)

(-1, ∞)

(-1, ∞)

(-1, ∞)

(-1, ∞)

Initial

(-1, ∞)

(-1, ∞)

(-1, ∞)

(-1, ∞)

(-1, ∞)

1

1

(-1, ∞)

(-1, ∞)

(6,1)

(-1, ∞)

(6,2)

2

2

3

3 Table entry @ node 3 for dest SJ

Table entry @ node 1 for dest SJ 2

1

D3=D6+1 n3=6

4

3

1

2

3

4

1

6

3

2

2

D6=0

D5=D6+2 n5=6

57

58

Iteration

Node 1

Node 2

Node 3

Node 4

Node 5

Iteration

Node 1

Node 2

Node 3

Node 4

Node 5

Initial

(-1, ∞)

(-1, ∞)

(-1, ∞)

(-1, ∞)

(-1, ∞)

Initial

(-1, ∞)

(-1, ∞)

(-1, ∞)

(-1, ∞)

(-1, ∞)

1

(-1, ∞)

(-1, ∞)

(6, 1)

(-1, ∞)

(6,2)

1

(-1, ∞)

(-1, ∞)

(6, 1)

(-1, ∞)

(6,2)

2

(3,3)

(5,6)

(6, 1)

(3,3)

(6,2)

2

(3,3)

(5,6)

(6, 1)

(3,3)

(6,2)

3

(3,3)

(4,4)

(6, 1)

(3,3)

(6,2)

3

3

1

2 5

3

3

1

3

0

4

3

1

2

6

6

3

4

5

1

2

3

1

1

2

5

San Jose

2

1

2

2

6 4 59

3

1

2

0

4

3

San Jose

2

5

4

2

5

0

4

6

3

1

2

5

San Jose

1

2

5

D6=0

3 1

2

1

3

6

3

4

5

San Jose

2

2 60

10

Iteration

Node 1

Node 2

Node 3

Node 4

Node 5

Iteration

Node 1

Node 2

Node 3

Node 4

Initial

(3,3)

(4,4)

(6, 1)

(3,3)

(6,2)

Initial

(3,3)

(4,4)

(6, 1)

(3,3)

(6,2)

1

(3,3)

(4,4)

(4, 5)

(3,3)

(6,2)

1

(3,3)

(4,4)

(4, 5)

(3,3)

(6,2)

2

2

(3,7)

(4,4)

(4, 5)

(5,5)

(6,2)

3

3

1 5

2

3 1 5

3

0

4

3

1

4

6

3

2

5

San Jose

3

53

1

6

2

Node 4 could have chosen 2 as next node because of tie

61

Iteration

Node 1

Node 2

Node 3

Node 4

Node 5

Iteration

Node 1

Node 2

Node 3

Node 4

Initial

(3,3)

(4,4)

(6, 1)

(3,3)

(6,2)

1

(3,3)

(4,4)

(4, 5)

(3,3)

(6,2)

1

(3,3)

(4,4)

(4, 5)

(3,3)

(6,2)

2

(3,7)

(4,4)

(4, 5)

(2,5)

(6,2)

2

(3,7)

(4,4)

(4, 5)

(5,5)

(6,2)

3

(3,7)

(4,6)

(4, 7)

(5,5)

(6,2)

(3,7)

(4,6)

(4, 7)

(5,5)

(6,2)

4

(2,9)

(4,6)

(4, 7)

(5,5)

(6,2)

5 7

2 5

79

3

1

5

2

0

4

3

1

6

3

2

5

4

5

San Jose

2

2

(b)

1

1 1

2 2

1 1

3 3

4

1

4

X

7 1

2

0 6

3

4

5

San Jose

2

2

Node 1 could have chose 3 as next node because of tie

63

64

Problem: Bad News Travels Slowly

Counting to Infinity Problem 1

5

1

6

Node 2 could have chosen 5 as next node because of tie

(a)

3

4

3

2

46

2

1

1

62

Node 5

3

7

San Jose

2

5

4

4

Network disconnected; Loop created between nodes 3 and 4

0 3

2

2

1

2

4

3

2

5

4

2

1

1

2

5

37

3

Node 5

Nodes believe best path is through each other (Destination is node 4)

Remedies z Split Horizon (Belief Propagation) z

Update

Node 1

Node 2

Node 3

Before break

(2,3)

(3,2)

(4, 1)

After break

(2,3)

(3,2)

(2,3)

1

(2,3)

(3,4)

(2,3)

2

(2,5)

(3,4)

(2,5)

z

3

(2,5)

(3,6)

(2,5)

z

4

(2,7)

(3,6)

(2,7)

5

(2,7)

(3,8)

(2,7)









z

Poisoned Reverse z

65

Do not report route to a destination to the neighbor from which route was learned Report route to a destination to the neighbor from which route was learned, but with infinite distance Breaks erroneous direct loops immediately Does not work on some indirect loops

66

11

Link-State Algorithm

Split Horizon with Poison Reverse (a)

1

(b)

1

2

1

1

2

1

3

1

3

1

4

Nodes believe best path is through each other

4

X

z

Basic idea: two step procedure Each source node gets a map of all nodes and link metrics (link state) of the entire network Find the shortest path on the map from the source node to all destination nodes

z

z

Update

Node 1 Node 2

Before break

(2, 3)

Node 3

(3, 2)

(4, 1)

z

After break

(2, 3)

(3, 2)

(-1, ∞)

Node 2 advertizes its route to 4 to node 3 as having distance infinity; node 3 finds there is no route to 4

1

(2, 3)

(-1, ∞)

(-1, ∞)

Node 1 advertizes its route to 4 to node 2 as having distance infinity; node 2 finds there is no route to 4

2

(-1, ∞)

(-1, ∞)

(-1, ∞)

Node 1 finds there is no route to 4

Broadcast of link-state information Every node i in the network broadcasts to every other node in the network:

z

z

ID’s of its neighbors: Ni=set of neighbors of i

z

Distances to its neighbors: {Cij | j ∈Ni}

Flooding is a popular method of broadcasting packets

z

67

Dijkstra’s algorithm

Dijkstra’s Algorithm Closest node to s is 1 hop away

Find shortest paths from source s to all other destinations

z

3

5

2

3

z

x'

9

4

1

6

z

9

2 5

70

Shortest Paths in Dijkstra’s Algorithm 1

6 9

2

3

5

2

4

N

D2

D3

D4

D5

D6

Initial

{1}

3

29

5





1

{1,3}

39

2

4



3

2

{1,2,3}

3

2

4

7

3 9

3

{1,2,3,6}

3

2

5

3

4

{1,2,3,4,6}

3

2

4 9 4

3

5

{1,2,3,4,5,6}

3

2

4

5 9 5

1

2

3

5

2

3

5

2

1

4

2

3

5

2

6 4

1

5

2

3

5

2

1 6

4

1

2

2

3

3

2

3

2 5

1

4 1

3

2

5

2

4

2

3

1

2

6

1 71

4

5

2

3

3

1

3 4

1

6

3

2

1

4

4

1

2

2

6

3

3

5

5

4

Iteration

2

1

2

3

2 5

1 3

4

1

2

1 6

3

49 3

2 5

1

3 2

1

2

Minimum distance from s to j through node i in N

Dj = min (Dj, Di+Cij) Go to Step A

69

3

3

Step B: (update minimum costs) z For each node j ∉ N z

1

4

1 2

Add i to N If N contains all the nodes, stop

z

Execution of Dijkstra’s algorithm 2

Step A: (Find next closest node i) z Find i ∉ N such that z Di = min Dj for j ∉ N z

z'

w"

N = {s}, Ds = 0, “s is distance zero from itself” Dj=Csj for all j ≠ s, distances of directly-connected neighbors

z

x

s

N: set of nodes for which shortest path already found Initialization: (Start with source node s) z

z

w

1

z z

2nd closest node to s is 1 hop away from s or w” 3rd closest node to s is 1 hop away from s, w”, or x

w'

68

4

72

5

12

Reaction to Failure z

z

Why is Link State Better?

If a link fails, z Router sets link distance to infinity & floods the network with an update packet z All routers immediately update their link database & recalculate their shortest paths z Recovery very quick But watch out for old update messages z Add time stamp or sequence # to each update message z Check whether each received update message is new z If new, add it to database and broadcast z If older, send update message on arriving link

Fast, loopless convergence Support for precise metrics, and multiple metrics if necessary (throughput, delay, cost, reliability) Support for multiple paths to a destination

z z

z

z

algorithm can be modified to find best two paths

73

74

Complexity at the Edge or in the Core?

The End

C 12 1

End system α 4 3 21

12

3

1 2 21

2

3

2

21 1 1

Medium

A

2

12

3

B

2 1

1 2 21

End system β 123 4

Network

75

1

Physical layer entity

3

2

Data link layer entity

4

3

Network layer entity

Transport layer entity 76

13