1 / 19

Lecture 8 - Link-Layer Protocol

Packets. Packets. Data link Layer. Data link Layer. Frames. A. B. Physical Layer. Physical Layer. Lecture 8 - Link-Layer Protocol. Frame Synchronization Flow Control Error Control Addressing Link Management. Flow Control.

torgny
Download Presentation

Lecture 8 - Link-Layer Protocol

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Packets Packets Data link Layer Data link Layer Frames A B Physical Layer Physical Layer Lecture 8 - Link-Layer Protocol • Frame Synchronization • Flow Control • Error Control • Addressing • Link Management ECS 152A Computer Networks

  2. Flow Control • Ensuring the sending entity does not overwhelm the receiving entity • Preventing buffer overflow • Transmission time • Time taken to emit all bits into medium • Propagation time • Time for a bit to traverse the link ECS 152A Computer Networks

  3. Model of Frame Transmission ECS 152A Computer Networks

  4. Stop and Wait • Source transmits frame • Destination receives frame and replies with acknowledgement • Source waits for ACK before sending next frame • Destination can stop flow by not sending (or delaying) ACK • Works well for few large frames ECS 152A Computer Networks

  5. Fragmentation • Large block of data may be split into small frames • Limited buffer size • Errors detected sooner (when whole frame received) • On error, retransmission of smaller frames is needed • Prevents one station occupying medium for long periods • Stop and wait becomes inadequate ECS 152A Computer Networks

  6. Transmission delay: R=link bandwidth (bps) L=packet length (bits) time to send bits into link = L/R Propagation delay: d = length of physical link s = propagation speed in medium (~2x108 m/sec) propagation delay = d/s transmission A propagation B nodal processing queueing Delays Note: s and R are very different quantitites! ECS 152A Computer Networks

  7. Stop and Wait Protocol – Analysis • Sender utilization • The fraction of the time the transmitter is busy • U = 1/(1 + 2a) where a = tprop/ttrans • tprop = Distance/Velocity • ttrans = Packet length/data rate ECS 152A Computer Networks

  8. 8kb/pkt t = = 8 microsec transmit 10**9 b/sec Performance of Stop-and-wait • Stop-and-wait works, but performance stinks • example: 1 Gbps link, 15 ms e-e prop. delay, 1KB packet: • Tprop = 15ms. a = Tprop/Ttransmit = 0.008/15 • U = 1/ (1+ 2a) = ECS 152A Computer Networks

  9. Sliding Windows Flow Control • Allow multiple frames to be in transit • Receiver has buffer W long • Transmitter can send up to W frames without ACK • Each frame is numbered • ACK includes number of next frame expected • Sequence number bounded by size of field (k) • Frames are numbered modulo 2k ECS 152A Computer Networks

  10. Pipelining: sender allows multiple, “in-flight”, yet-to-be-acknowledged pkts range of sequence numbers must be increased buffering at sender and/or receiver Two generic forms of pipelined protocols: go-Back-N, selective repeat Sliding Window Protocol ECS 152A Computer Networks

  11. Sender: k-bit seq # in pkt header “window” of up to N, consecutive unack’ed pkts allowed Sliding Window Protocol • ACK(n): ACKs all pkts up to, including seq # n - “cumulative ACK” • may deceive duplicate ACKs (see receiver) ECS 152A Computer Networks

  12. Sliding Window Protocol – Example ECS 152A Computer Networks

  13. Example Sliding Window ECS 152A Computer Networks

  14. Sliding Window Protocol – Analysis • Let N be the size of the window • Let a = tprop/ttrans where tprop is the propagation delay and ttrans is the transmission delay • U = 1 if N > 1 + 2a • U = N/(1 + 2a) if N < 1 + 2a • By increasing N you can achieve higher utilization ECS 152A Computer Networks

  15. Sliding Window Enhancements • Receiver can acknowledge frames without permitting further transmission (Receive Not Ready) • Must send a normal acknowledge to resume • If duplex, use piggybacking • If no data to send, use acknowledgement frame • If data but no acknowledgement to send, send last acknowledgement number again, or have ACK valid flag (TCP) ECS 152A Computer Networks

  16. Error Control • Types of error • Packets (data packets and acks) are corrupted • Packets (data packets and acks ) are lost ECS 152A Computer Networks

  17. Error-free packet sequence Information frames Packet sequence Transmitter Receiver Station B Station A Control frames CRC CRC Header Header Control frame Information packet Information Frame Basic elements of ARQ ECS 152A Computer Networks

  18. Stop and Wait - ARQ • Source transmits single frame • Wait for ACK • If received frame damaged, discard it • Transmitter has timeout • If no ACK within timeout, retransmit • If ACK damaged,transmitter will not recognize it • Transmitter will retransmit • Receive gets two copies of frame • Use ACK0 and ACK1 ECS 152A Computer Networks

  19. Stop-and-wait ARQ Example ECS 152A Computer Networks

More Related