Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Comnet 2010 Communication Networks Recitation 7 RDT, CLOS & DV Revisited.

Similar presentations


Presentation on theme: "1 Comnet 2010 Communication Networks Recitation 7 RDT, CLOS & DV Revisited."— Presentation transcript:

1 1 Comnet 2010 Communication Networks Recitation 7 RDT, CLOS & DV Revisited

2 2 Comnet 2010 Reliable Transmission How do we send a packet reliably when it can be lost and/or corrupted in the network?How do we send a packet reliably when it can be lost and/or corrupted in the network? MechanismsMechanisms –Acknowledgements –Timeouts Simplest reliable protocol: Simple Stop and WaitSimplest reliable protocol: Simple Stop and Wait –send a packet –stop and wait until an ACK arrives from the receiver –retransmit if timeout occurs before ACK arrives Is this protocol CORRECT ?!Is this protocol CORRECT ?!

3 3 Comnet 2010 Simple Stop and Wait

4 4 Comnet 2010 Recovering from Errors packet duplicate +missingduplicate

5 5 Comnet 2010 Problems with Simple Stop and Wait Duplicate packets:Duplicate packets: –How does the receiver recognize a duplicate transmission (e.g. in the case of a lost ACK)? Missing Packet:Missing Packet: –In early timeout case. –Duplicate ACK. Solution: Put sequence number in packetSolution: Put sequence number in packet

6 6 Comnet 2010 Sequence Numbers Detect retransmissions using sequence numbersDetect retransmissions using sequence numbers –both packets and ACKs Simple: unbounded #Simple: unbounded # Realistic: sequence # in packet is finiteRealistic: sequence # in packet is finite –Assuming FIFO channel How many bits do we need?How many bits do we need? –1 bit for stop and wait –Won’t send seq #1 until receive ACK for seq #0

7 7 Comnet 2010 Stop and Wait: unbounded seq # Sender:Sender: Init: n=1Init: n=1 Wait for data(n)Wait for data(n) –Send data(n) –Receive ACK(m) –If m=n Then n = n+1 When timeoutWhen timeout –Send data(n) ReceiverReceiver Init: n=1Init: n=1 Receive data(k)Receive data(k) IF k=n thenIF k=n then –Deliver data(n) –n = n+1 Send ACK(n-1)Send ACK(n-1)

8 8 Comnet 2010 What if packets are reordered? Never reuse a seq #? Finite…Never reuse a seq #? Finite… Require in order delivery? Unreliable network …Require in order delivery? Unreliable network … Prevent very late delivery?Prevent very late delivery? –TTL: Decrement hop count per packet, discard if exceeded –Seq # not reused within delay bound

9 9 Comnet 2010 Problems with Stop and Wait PerformancePerformance –No pipeline effect –Example For a l.5 Mbps link with 45 ms RTTFor a l.5 Mbps link with 45 ms RTT Bandwidth-delay product = 67.5 Kb (~8KB)Bandwidth-delay product = 67.5 Kb (~8KB) 1KB packets imply 1/8th link utilization1KB packets imply 1/8th link utilization

10 10 Comnet 2010 Reliable Data Transfer#10 rdt3.0 sender: Stop and Wait

11 11 Comnet 2010 Reliable Data Transfer#11 rdt_rcv(rcvpkt) && notcorrupt(rcvpkt) && has_seq1(rcvpkt) rdt_rcv(rcvpkt) && notcorrupt(rcvpkt) && has_seq1(rcvpkt) rdt_rcv(rcvpkt) && notcorrupt(rcvpkt) && has_seq0(rcvpkt) rdt 3.0 receiver: Stop and Wait rdt_rcv(rcvpkt) && corrupt(rcvpkt) udt_send(ACK[1]) Extract(rcvpkt,data) deliver_data(data) udt_send(ACK[1]) udt_send(ACK[0]) Extract(rcvpkt,data) deliver_data(data) udt_send(ACK[0]) rdt_rcv(rcvpkt) && corrupt(rcvpkt) rdt_rcv(rcvpkt) && notcorrupt(rcvpkt) && has_seq0(rcvpkt) Wait for 0 Wait for 1

12 12 Comnet 2010 Lecture 6: Network Layer Distance Vector Routing: Basic Idea At node i, the basic update rule for dest. vAt node i, the basic update rule for dest. vwhere - d i (v) denotes the distance estimation from i to the destination v, - d i (v) denotes the distance estimation from i to the destination v, - N(i) is set of neighbors of node i, and - N(i) is set of neighbors of node i, and - d ij is the distance of the direct link from i to j; assume positive - d ij is the distance of the direct link from i to j; assume positive i j v destination

13 13 Comnet 2010 Lecture 6: Network Layer Distance Vector: poisoned reverse If Z routes through Y to get to X : r Z tells Y its (Z’s) distance to X is infinite (so Y won’t route to X via Z) r will this completely solve count to infinity problem? X Z 1 4 50 Y 60 algorithm terminates

14 14 Comnet 2010 Example: poisoned reverse fails 1 1 1 1 AB C D When link breaks, C marks D as unreachable and reports that to A and BWhen link breaks, C marks D as unreachable and reports that to A and B Suppose A learns it first. A now thinks best path to D is through B. A reports a route of cost=3 to C.Suppose A learns it first. A now thinks best path to D is through B. A reports a route of cost=3 to C. C thinks D is reachable through A at cost 4 and reports that to B.C thinks D is reachable through A at cost 4 and reports that to B. B reports a cost 5 to A who reports new cost to C.B reports a cost 5 to A who reports new cost to C. etc...etc...

15 15 Comnet 2010 Clos Network Clos(N, n, k) : N - inputs/outputs; cross-points: 2 (N/n)nk + k(N/n) 2 nxk(N/n)x(N/n) kxn N=6 n=2 k=2 3x3 2x2 N k N/n

16 16 Comnet 2010 Example Clos(8,2,3) N=8 n=2 k=3 4x4 3x2 2x3 4x43x2 Need to route a new call

17 17 Comnet 2010 Clos Network nxk(N/n)x(N/n) kxn N=6 n=2 k=2 3x3 2x2 Why is k=n NOT strict sense non-blocking? Blocking means NOT rearrangeable (NOT strict sense non-blocking) Proof gives counter example:

18 18 Comnet 2010 Clos Network nxk(N/n)x(N/n) kxn N=6 n=3 k=2 3x3 2x3 3x2 Why is k { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.com/13/4167577/slides/slide_18.jpg", "name": "18 Comnet 2010 Clos Network nxk(N/n)x(N/n) kxn N=6 n=3 k=2 3x3 2x3 3x2 Why is k


Download ppt "1 Comnet 2010 Communication Networks Recitation 7 RDT, CLOS & DV Revisited."

Similar presentations


Ads by Google