# CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 14 Introduction to Computer Networks.

## Presentation on theme: "CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 14 Introduction to Computer Networks."— Presentation transcript:

CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 14 Introduction to Computer Networks

CMPE 150- Introduction to Computer Networks 2 Announcements Midterm moved to 11.04. –In class, closed books/notes. We will have lab this week. Homework 1 is due today. Homework 2 will be up soon.

CMPE 150- Introduction to Computer Networks 3 Today Finish Layer 2…

CMPE 150- Introduction to Computer Networks 4 Flow + Error Control Stop and Wait. –ACKs. ARQ. –Noisy channels. –ACKs. –Sequence numbers. –Timers.

CMPE 150- Introduction to Computer Networks 5 Can we do better? –Piggybacking. –Bi-directional transmission. –Wait for data packet and use that to piggyback the ACK. –Use ACK field: only a few additional bits in the header. But, how long should Layer 2 wait to send an ACK? –ACK timers!

CMPE 150- Introduction to Computer Networks 6 Can we do even better? In Stop and Wait, only 1 frame outstanding at any given point in time. Whats the problem with that? –Loooong pipes. –Fat pipes. S R S R

CMPE 150- Introduction to Computer Networks 7 Sliding Window Window: number of outstanding frames at any given point in time. –So whats the window size of Stop and Wait? Every ACK received, window slides.

CMPE 150- Introduction to Computer Networks 8 Sliding Window: Example A sliding window of size 1, with a 3-bit sequence number.(a) Initially; (b) After the first frame has been sent; (c) After the first frame has been received;(d) After the first acknowledgement has been received.

CMPE 150- Introduction to Computer Networks 9 Sliding Window: Basics Allows multiple frames to be in transit at the same time. Receiver allocates buffer space for n frames. Transmitter is allowed to send n (window size) frames without receiving ACK. Sequence number?

CMPE 150- Introduction to Computer Networks 10 Sliding Window: Receiver Receiver maintains window corresponding with frames it can receive. Receiver acks frame by including sequence number of next expected frame. –Cumulative ACK: acks multiple frames. Example: if receiver receives frames 2,3, and 4, it sends an ACK with sequence number 5, which acks receipt of 2, 3, and 4.

CMPE 150- Introduction to Computer Networks 11 Sliding Window: Sender Sender maintains window corresponding to frames (sequence numbers) its allowed to send. Sequence numbers are bounded; if frame reserves k-bit field for sequence numbers, then they can range from 0 … 2 k -1. Transmission window shrinks each time frame is sent, and grows each time an ACK is received.

CMPE 150- Introduction to Computer Networks 12 Example: 3-bit sequence number and window size 7 0 1 2 0 1 2 3 4 5 6 7 0 1 2 3 4 ACK 3 0 1 2 3 4 5 6 7 0 1 2 3 4 3 4 5 6 ACK 4 0 1 2 3 4 5 6 7 0 1 2 3 4 A (Sender) B (Receiver) 0 1 2 3 4 5 6 7 0 1 2 3 4… 0 1 2 3 4 5 6 7 0 1 2 3 4

CMPE 150- Introduction to Computer Networks 13 One-Bit Sliding Window Protocol Two scenarios: (a) Normal case. (b) Abnormal case. Notation is (seq, ack, packet number). An * indicates where a network layer accepts packet. ACK indicates last sequence number received.

CMPE 150- Introduction to Computer Networks 14 Bandwidth-Delay Product How large should the senders window be? Function of how fat and long the pipe is S R RTT BW W = BW*RTT/data size

CMPE 150- Introduction to Computer Networks 15 Pipelining Pipelining and error recovery. Effect on error when (a) Receivers window size is 1. (b) Receivers window size is large. Receivers window size is 1: discard frames after error with no ACK. Receivers window size is large: buffers all frames until error recovered. Selective Repeat Go Back N

CMPE 150- Introduction to Computer Networks 16 Medium Access Control MAC. Tanenbaum, Chapter 4.

CMPE 150- Introduction to Computer Networks 17 Why MAC? Point-to-point versus shared-medium networks. Shared-medium networks use broadcast channels. –A.k.a. multi-access or random access channels. MAC layer protocols regulate access to medium in shared-medium networks.

CMPE 150- Introduction to Computer Networks 18 Where is the MAC Sub-Layer? MAC

CMPE 150- Introduction to Computer Networks 19 Where is the MAC Sub-Layer? MAC PHY DLL Link Control Network Transport Application

CMPE 150- Introduction to Computer Networks 20 MAC and LANs LANs typically use shared-medium. Examples? MAC layer critical! –BTW, in wireless networks also! WANs typically use point-to-point connections.

Download ppt "CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 14 Introduction to Computer Networks."

Similar presentations