Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 3830 Day 15 Introduction 1-1. Announcements r Quiz 3: Wednesday, Oct 10 r Prog3 due (in 1DropBox) on Wednesday, Oct 10 r Prog4: m Parts A and B m Work.

Similar presentations


Presentation on theme: "CS 3830 Day 15 Introduction 1-1. Announcements r Quiz 3: Wednesday, Oct 10 r Prog3 due (in 1DropBox) on Wednesday, Oct 10 r Prog4: m Parts A and B m Work."— Presentation transcript:

1 CS 3830 Day 15 Introduction 1-1

2 Announcements r Quiz 3: Wednesday, Oct 10 r Prog3 due (in 1DropBox) on Wednesday, Oct 10 r Prog4: m Parts A and B m Work in roups of two. m Sign-up for groups IN CLASS by Wednesday, Oct 10 If not, I will assign random groups! Transport Layer 3-2

3 Transport Layer 3-3 Chapter 3 outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP r 3.4 Principles of reliable data transfer r 3.5 Connection-oriented transport: TCP m segment structure m reliable data transfer m flow control m connection management r 3.6 Principles of congestion control r 3.7 TCP congestion control

4 Transport Layer 3-4 Principles of Reliable data transfer r important in app., transport, link layers r top-10 list of important networking topics! r characteristics of unreliable channel will determine complexity of reliable data transfer protocol (rdt)

5 Transport Layer 3-5 Principles of Reliable data transfer r important in app., transport, link layers r top-10 list of important networking topics! r characteristics of unreliable channel will determine complexity of reliable data transfer protocol (rdt)

6 Transport Layer 3-6 Principles of Reliable data transfer r important in app., transport, link layers r top-10 list of important networking topics! r characteristics of unreliable channel will determine complexity of reliable data transfer protocol (rdt)

7 Transport Layer 3-7 Reliable data transfer: getting started send side receive side rdt_send(): called from above, (e.g., by app.). Passed data to deliver to receiver upper layer udt_send(): called by rdt, to transfer packet over unreliable channel to receiver rdt_rcv(): called when packet arrives on rcv-side of channel deliver_data(): called by rdt to deliver data to upper

8 Transport Layer 3-8 Reliable data transfer: getting started We will: r consider only unidirectional data transfer m but control info will flow on both directions! r assume data sent first are received first r use finite state machines (FSM) to specify sender, receiver state 1 state 2 event causing state transition actions taken on state transition state: when in this “state” next state uniquely determined by next event event actions

9 Transport Layer 3-9 Rdt1.0: reliable transfer over a reliable channel r underlying channel perfectly reliable m no bit errors m no loss of packets r separate FSMs for sender, receiver: m sender sends data into underlying channel m receiver read data from underlying channel Wait for call from above packet = make_pkt(data) udt_send(packet) rdt_send(data) extract (packet,data) deliver_data(data) Wait for call from below rdt_rcv(packet) sender receiver

10 Reliable transfer over an unreliable channel r Pkts may be corrupted or dropped! r Solution: m Pkts should have sequence numbers m Only two sequence numbers suffice: 0 and 1 m Received pkts ACKed m ACKs have sequence number of pkt being ACKed m Sender will have countdown timer r We will develop rdt3.0 from the book (see the book for intermediate rdt versions) Transport Layer 3-10

11 Receiver r Always ACK last “good” pkt: m If waiting for pkt0 and receive corrupt pkt, send ACK1 m If waiting for pkt1 and receive corrupt pkt, send ACK0 m If waiting for pkt0 and receive pkt0, send ACK0 m If waiting for pkt0 and receive pkt1, send ACK1 m If waiting for pkt1 and receive pkt0, send ACK0 m If waiting for pkt1 and receive pkt1, send ACK1 r Only 2 states needed! Transport Layer 3-11

12 Transport Layer 3-12 rdt_rcv(rcvpkt) && (corrupt(rcvpkt) || has_seq0(rcvpkt)) Wait for 1 from below Wait for 0 from below rdt_rcv(rcvpkt) && notcorrupt(rcvpkt) && has_seq1(rcvpkt) extract(rcvpkt,data) deliver_data(data) sndpkt = make_pkt(ACK1, chksum) udt_send(sndpkt) rdt_rcv(rcvpkt) && (corrupt(rcvpkt) || has_seq1(rcvpkt)) udt_send(sndpkt) What if first pkt is corrupt? rdt3.0 receiver rdt_rcv(rcvpkt) && notcorrupt(rcvpkt) && has_seq0(rcvpkt) extract(rcvpkt,data) deliver_data(data) sndpkt = make_pkt(ACK0, chksum) udt_send(sndpkt)

13 Transport Layer 3-13 r Must check if received ACK corrupt m If waiting for ACK0 and receive corrupt pkt, re-send pkt0 m If waiting for ACK1 and receive corrupt pkt, re-send pkt1 r Duplicate ACK: resend current pkt m If waiting for ACK0 and receive ACK0, send pkt1 m If waiting for ACK0 and receive ACK1, re-send pkt0 m If waiting for ACK1 and receive ACK0, re-send pkt1 m If waiting for ACK1 and receive ACK1, send pkt0 r ACK gets dropped: m If waiting for ACK0 and receive no ACK, re-send pkt0 m If waiting for ACK1 and receive no ACK, re-send pkt1 r Handle re-sending of all pkts with countdown timer Sender

14 Transport Layer 3-14 sndpkt = make_pkt(0, data, checksum) udt_send(sndpkt) start_timer rdt_send(data) Wait for ACK0 rdt_rcv(rcvpkt) && ( corrupt(rcvpkt) || isACK(rcvpkt,1) ) Wait for call 1 from above sndpkt = make_pkt(1, data, checksum) udt_send(sndpkt) start_timer rdt_send(data) rdt_rcv(rcvpkt) && notcorrupt(rcvpkt) && isACK(rcvpkt,0) rdt_rcv(rcvpkt) && ( corrupt(rcvpkt) || isACK(rcvpkt,0) ) rdt_rcv(rcvpkt) && notcorrupt(rcvpkt) && isACK(rcvpkt,1) stop_timer udt_send(sndpkt) start_timer timeout udt_send(sndpkt) start_timer timeout rdt_rcv(rcvpkt) Wait for call 0from above Wait for ACK1  rdt_rcv(rcvpkt)    rdt3.0 sender


Download ppt "CS 3830 Day 15 Introduction 1-1. Announcements r Quiz 3: Wednesday, Oct 10 r Prog3 due (in 1DropBox) on Wednesday, Oct 10 r Prog4: m Parts A and B m Work."

Similar presentations


Ads by Google