1 / 17

Review:

Review:. Chapter 3: The Data Link Layer achieve reliable, efficient communication between two physically connected machines. Example problems to be addressed: Errors in the physical layer Two machines may have different speeds Design issues: services interface to the network layer

turner
Download Presentation

Review:

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. Review:

  2. Chapter 3: The Data Link Layer • achieve reliable, efficient communication between two physically connected machines. • Example problems to be addressed: • Errors in the physical layer • Two machines may have different speeds • Design issues: • services interface to the network layer • how to group bits into frames (framing) • how to deal with errors (error control). • how to deal with speed mismatch (flow control).

  3. Service interface: • unreliable connectionless service • reliable connectionless service • reliable connection-oriented service • Advantages of each service type: • Unreliable connectionless: • Efficient when error rate is very low, • Ideal for real time traffic • acknowledged connectionless: • Error rate is high, less retries are needed • acknowledged connection-oriented • guarantee order, upper level software is simpler

  4. Framing (break the bit stream into frames) • Why framing? • Raw bit stream cannot provide any error detection capability. • Bits may change (lightning strikes). • Bits may get lost (clock drift). • Cut the raw bit stream into frames -> can then compute the checksum for the frame. Misunderstanding of the two parties will result in an unmatched checksum. • How to do framing? • Character count • Starting and ending characters with character stuffing • starting and ending flags with bit stuffing • physical level code violation.

  5. Character count. Frame: Count + frame data E.g 5 1 2 3 4 5 6 7 8 9 8 0 1 2 3 4 5 6 Problem: what if a count is altered during transmission?

  6. Byte oriented framing. • Each frame is a sequence of bytes. Use special characters to signal the start and end of a frame. • E.g STX: start of text, ETX: end of text. Frames: STX frame_data ETX STX frame_data ETX. PROBLEM: WHAT IF frame_data = ETX Solution: Byte stuff the character ETX Introduce another escape character: DLE: data link escape. Characters that need to be stuffed? Example: frame data = STX DLE ETX frame = ??? • Advantage: can recover frames. • Limitation: ties to a particular character set.

  7. Bit oriented framing. • A frame is a sequence of bits, using special bit patterns to signal the start and end of a frame. • E.g: special pattern 01111110 Frames: 01111110 frame_data 01111110. PROBLEM: WHAT IF frame_data = 01111110 Solution: Bit stuffing: make sure that such bit pattern will not occur in the frame data --> after 5 1’s add a 0 automatically. Example: 011111100111110100111110 The sender always adds a 0 after five1’s, the receiver always deletes the 0 after five 1’s. Example: frame_data=011111011111111111111110

  8. Physical layer coding violation. • Use special symbol (that never occur in the data) for the frame boundary. • E.g: Manchester code 1: low to high, 0: high to low. Frame boundary symbol: high-high or low-low.

  9. Error control • How to make sure that each frame is eventually delivered to the destination (reliable service)? • Reliability through acknowledgement • Sender knows that the frame is delivered when it gets the acknowledgement. • Sender sends, resends when NACK. • Receiver sends ACK when the checksum is correct, NACK when incorrect. • Problem? What if the whole packet gets lost? • Solution: timeout. • Problem? • Need to do more.

  10. Flow control • To avoid swamping the slow receiver. • Use a feedback mechanism to make sure that the sender knows the status of the receiver. • “send me N frames and no more until I tell you to continue”

  11. Sender get a packet from the network layer Add frame header, send the frame to the physical layer. Receiver get a frame from the physical layer strip the header pass the packet to the network layer. Data link layer protocols: P0 - Nothing

  12. Sender get a packet from the network layer Add frame header, send the frame to the physical layer. Wait for ACK Receiver get a frame from the physical layer strip the header pass the packet to the network layer. Send ACK. P1: Stop and wait (flow control)Assumption: no lost packets

  13. Sender get a packet from the network layer Add frame header (seq), send the frame to the physical layer. Wait for ACK till timeout If timeout, resend the packet, back to waiting Receiver get a frame from the physical layer strip the header if (seq = expected) pass to the network layer. Send ACK Else send ACK P2: stop and wait + timeout + sequence number (flow control + error control )

  14. Stop and Wait in action

  15. Stop and Wait in action

  16. Stop-and-wait operation sender receiver first packet bit transmitted, t = 0 last packet bit transmitted, t = L / R first packet bit arrives RTT last packet bit arrives, send ACK ACK arrives, send next packet, t = RTT + L / R

  17. rdt3.0 works, but performance stinks example: 1 Gbps link, 15 ms e-e prop. delay, 1KB packet: Performance of Stop-and-Wait L (packet length in bits) 8kb/pkt T = = = 8 microsec transmit R (transmission rate, bps) 10**9 b/sec • U sender: utilization – fraction of time sender busy sending • 1KB pkt every 30 msec -> 33kB/sec thruput over 1 Gbps link • network protocol limits use of physical resources!

More Related