cmpe 150- introduction to computer networks 1 cmpe 150 fall 2005 lecture 10 introduction to computer...
Post on 20-Dec-2015
219 views
TRANSCRIPT
![Page 1: CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 10 Introduction to Computer Networks](https://reader036.vdocuments.net/reader036/viewer/2022062516/56649d435503460f94a1f6eb/html5/thumbnails/1.jpg)
1CMPE 150- Introduction to Computer Networks
CMPE 150
Fall 2005Lecture 10
Introduction to Computer Networks
![Page 2: CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 10 Introduction to Computer Networks](https://reader036.vdocuments.net/reader036/viewer/2022062516/56649d435503460f94a1f6eb/html5/thumbnails/2.jpg)
2CMPE 150- Introduction to Computer Networks
Announcements
• No labs next week!– Except for make-up sessions.
• Homework 2 is up.• Graded homework 1 should be back next
week.
![Page 3: CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 10 Introduction to Computer Networks](https://reader036.vdocuments.net/reader036/viewer/2022062516/56649d435503460f94a1f6eb/html5/thumbnails/3.jpg)
3CMPE 150- Introduction to Computer Networks
Today
• Layer 2!!!!• Tanenbaum chapter 3.
![Page 4: CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 10 Introduction to Computer Networks](https://reader036.vdocuments.net/reader036/viewer/2022062516/56649d435503460f94a1f6eb/html5/thumbnails/4.jpg)
4CMPE 150- Introduction to Computer Networks
Data Link Layer
Application
Transport
Network
PHY
DLL
![Page 5: CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 10 Introduction to Computer Networks](https://reader036.vdocuments.net/reader036/viewer/2022062516/56649d435503460f94a1f6eb/html5/thumbnails/5.jpg)
5CMPE 150- Introduction to Computer Networks
What does it do?
• What functions it performs?• Typically:– Handling transmission errors, a.k.a., error
control.
– Flow control.
– Framing.
![Page 6: CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 10 Introduction to Computer Networks](https://reader036.vdocuments.net/reader036/viewer/2022062516/56649d435503460f94a1f6eb/html5/thumbnails/6.jpg)
6CMPE 150- Introduction to Computer Networks
Framing
![Page 7: CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 10 Introduction to Computer Networks](https://reader036.vdocuments.net/reader036/viewer/2022062516/56649d435503460f94a1f6eb/html5/thumbnails/7.jpg)
7CMPE 150- Introduction to Computer Networks
DLL and the Stack
• (a) Virtual communication• (b) Actual communication
![Page 8: CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 10 Introduction to Computer Networks](https://reader036.vdocuments.net/reader036/viewer/2022062516/56649d435503460f94a1f6eb/html5/thumbnails/8.jpg)
8CMPE 150- Introduction to Computer Networks
DLL Between Routers
![Page 9: CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 10 Introduction to Computer Networks](https://reader036.vdocuments.net/reader036/viewer/2022062516/56649d435503460f94a1f6eb/html5/thumbnails/9.jpg)
9CMPE 150- Introduction to Computer Networks
The DDL and PHY
• The PHY delivers raw sequence of bits.– Unreliable service.
• The DLL must detect and, in some cases, correct errors.
![Page 10: CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 10 Introduction to Computer Networks](https://reader036.vdocuments.net/reader036/viewer/2022062516/56649d435503460f94a1f6eb/html5/thumbnails/10.jpg)
10CMPE 150- Introduction to Computer Networks
DLL’s Error Control
• Break bit stream into frames.• Check if frames arrived correctly.• If not:– Discards frame.
– In some cases also request retransmisssion.
![Page 11: CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 10 Introduction to Computer Networks](https://reader036.vdocuments.net/reader036/viewer/2022062516/56649d435503460f94a1f6eb/html5/thumbnails/11.jpg)
11CMPE 150- Introduction to Computer Networks
Framing (Revisited)
• Not trivial.• Different methods.
![Page 12: CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 10 Introduction to Computer Networks](https://reader036.vdocuments.net/reader036/viewer/2022062516/56649d435503460f94a1f6eb/html5/thumbnails/12.jpg)
12CMPE 150- Introduction to Computer Networks
Framing: Using Counters
(a) Without errors. (b) With one error.
![Page 13: CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 10 Introduction to Computer Networks](https://reader036.vdocuments.net/reader036/viewer/2022062516/56649d435503460f94a1f6eb/html5/thumbnails/13.jpg)
13CMPE 150- Introduction to Computer Networks
Character Counter
• Main problem?
![Page 14: CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 10 Introduction to Computer Networks](https://reader036.vdocuments.net/reader036/viewer/2022062516/56649d435503460f94a1f6eb/html5/thumbnails/14.jpg)
14CMPE 150- Introduction to Computer Networks
Framing: Flag Byte
• Each frame starts and ends with special bytes: flag bytes.
• Two consecutive flag bytes indicate end of frame and beginning on new frame.
• Problem?
![Page 15: CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 10 Introduction to Computer Networks](https://reader036.vdocuments.net/reader036/viewer/2022062516/56649d435503460f94a1f6eb/html5/thumbnails/15.jpg)
15CMPE 150- Introduction to Computer Networks
Framing: Flag Byte
• Each frame starts and ends with special bytes: flag bytes.
• Two consecutive flag bytes indicate end of frame and beginning on new frame.
• Problem?– What if flab bit pattern occurs in data?
![Page 16: CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 10 Introduction to Computer Networks](https://reader036.vdocuments.net/reader036/viewer/2022062516/56649d435503460f94a1f6eb/html5/thumbnails/16.jpg)
16CMPE 150- Introduction to Computer Networks
Byte Stuffing
• (a) A frame delimited by flag bytes.• (b) Four examples of byte sequences before and after stuffing.
![Page 17: CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 10 Introduction to Computer Networks](https://reader036.vdocuments.net/reader036/viewer/2022062516/56649d435503460f94a1f6eb/html5/thumbnails/17.jpg)
17CMPE 150- Introduction to Computer Networks
Byte Stuffing (Cont’d)
• Single ESC: part of the escape sequence.• Doubled ESC: single ESC is part of data.• De-stuffing.
• Problem: – What if character encoding does not use 8-bit
characters?
![Page 18: CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 10 Introduction to Computer Networks](https://reader036.vdocuments.net/reader036/viewer/2022062516/56649d435503460f94a1f6eb/html5/thumbnails/18.jpg)
18CMPE 150- Introduction to Computer Networks
Bit Stuffing
• Allows character codes with arbitrary bits per character.
• Each frames begins and ends with special pattern.
• Example: 01111110.• When sender’s DLL finds 5 consecutive 1’s in
data stream, stuffs 0.• When receiver sees 5 1’s followed by 0, de-
stuffs.
![Page 19: CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 10 Introduction to Computer Networks](https://reader036.vdocuments.net/reader036/viewer/2022062516/56649d435503460f94a1f6eb/html5/thumbnails/19.jpg)
19CMPE 150- Introduction to Computer Networks
Bit Stuffing: Example
• (a) Original data.• (b) Data as they appear on the line.• (c) Data after de-stuffing.
![Page 20: CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 10 Introduction to Computer Networks](https://reader036.vdocuments.net/reader036/viewer/2022062516/56649d435503460f94a1f6eb/html5/thumbnails/20.jpg)
20CMPE 150- Introduction to Computer Networks
Error Control
![Page 21: CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 10 Introduction to Computer Networks](https://reader036.vdocuments.net/reader036/viewer/2022062516/56649d435503460f94a1f6eb/html5/thumbnails/21.jpg)
21CMPE 150- Introduction to Computer Networks
Error Control
• Reliable delivery.– Hop-by-hop!
• Detecting errors.• Detecting and correcting errors.
![Page 22: CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 10 Introduction to Computer Networks](https://reader036.vdocuments.net/reader036/viewer/2022062516/56649d435503460f94a1f6eb/html5/thumbnails/22.jpg)
22CMPE 150- Introduction to Computer Networks
Acknowledgments
• Special control info (in the case of the DLL, control frame) acknowledging receipt of data.
• Positive and negative ACKs.– ACKs.
– NACKs.
• Are ACKs sufficient?
![Page 23: CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 10 Introduction to Computer Networks](https://reader036.vdocuments.net/reader036/viewer/2022062516/56649d435503460f94a1f6eb/html5/thumbnails/23.jpg)
23CMPE 150- Introduction to Computer Networks
Reliable Delivery
• Timers.• Retransmission.• Duplicate detection.
![Page 24: CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 10 Introduction to Computer Networks](https://reader036.vdocuments.net/reader036/viewer/2022062516/56649d435503460f94a1f6eb/html5/thumbnails/24.jpg)
24CMPE 150- Introduction to Computer Networks
Flow Control
• Handles mismatch between sender’s and receiver’s speed.– Receiver’s buffer limitation.
• Feedback-based flow control.– Explicit permission from receiver.
• Rate-based flow control.– Implicit mechanism for limiting sending rate.
• DLL typically uses feedback-based flow control.