Bài giảng Mạng máy tính - Chapter 5: Data link layer

MẠNG MÁY TÍNH  
(COMPUTER NETWORKING)  
J.F Kurose and K.W. Ross. Computer  
Networking A Top Down Approach.  
6th edition, Addision Wesley, 2013  
Chapter 5: DATA LINK  
LAYER  
1. Introduction and Services  
2. Error detection and correction  
3. Elementary Data Link Protocols  
4. Sliding Window Protocols  
5. Multiple access protocols  
6. Link-layer Addressing  
7. PPP  
1.3  
Link layer: Introduction  
Some terminology:  
Host and router are nodes  
Communication channels that  
connect adjacent nodes along  
communication path are links  
Wired links  
Wireless links  
LANs  
Packet is a frame, ancapsulates  
datagram  
Data-link layer has responsibility of  
transferring datagram from one node  
to adjacent node over a link  
1.4  
Datagram transferred by  
different link protocols over  
different links  
Transportation analogy  
Trip from Princeton to  
Lausanne  
ex: Ethernet on first link,  
fram relay on intermediate  
links, 802.11 on last link  
Limo: Princeton to JFK  
Plane: JFK to Geneva  
Train: Geneve to Lausanne  
Tourist = datagram  
Each link protocol provides  
different services  
ex: may or may not provide  
Transport segment =  
rdt over link  
communication link  
Transportation mode = link  
layer protocol  
Travel agent = routing  
algorithm  
1.5  
Link layer services (1/2)  
Framing, link access:  
Encapsulate datagram into frame, adding header, trailer  
Channel access if share medium  
“MAC” addresses used in frame headers to identify source,  
destination  
Different from IP address!  
Reliable delivery between adjacent nodes:  
Seldom used on low bit-error link (fiber, some twisted pair)  
Wireless links: high error rates  
Q: why both link-level and end-end reliability?  
1.6  
Framing (1/3)  
A character stream. (a) Without errors. (b) With one error.  
1.7  
Framing (2/3)  
(a) A frame delimited by flag bytes.  
(b) Four examples of byte sequences before and after stuffing.  
1.8  
Framing (3/3)  
Bit stuffing  
(a) The original data.  
(b) The data as they appear on the line.  
(c) The data as they are stored in receiver’s memory after destuffing.  
1.9  
Link layer services (2/2)  
Flow control  
Pacing between adjacent sending and receiving nodes  
Error detection  
Errors caused by signal attenuation, noise  
Receiver detects presence of errors:  
Signals sender for retransmission or drops frame  
Error correction  
Receiver identifies and corrects bit error(s) without resorting to  
retransmision  
Half-duplex and full-duplex  
With half-duplex, nodes at both ends of link can transmit, but not at the  
same time  
1.10  
Where is the link layer implemented?  
In each and every host  
Link layer implemented in “adaptor”  
Ethernet card, PCMCI card,  
802.11 card  
Implements link, physical layer  
Attaches into host’s system buses  
Combination of hardware, software,  
firmware  
1.11  
1. Introduction and Services  
2. Error detection and correction  
3. Elementary Data Link Protocols  
4. Sliding Window Protocols  
5. Multiple access protocols  
6. Link-layer Addressing  
7. PPP  
1.12  
Error-Detecting Codes  
3 different error-detecting codes  
Parity  
Checksums  
Cyclic Redundancy Checks (CRCs)  
1.13  
Error-Detecting Codes  
1.14  
Error-Correcting Codes  
4 difference error-correcting codes:  
1. Hamming codes  
2. Binary convolutional codes  
3. Reer-Solomom codes  
4. Low-Density Parity Check codes  
1.15  
Error-Correcting Codes  
1.16  
1. Introduction and Services  
2. Error detection and correction  
3. Elementary Data Link Protocols  
4. Sliding Window Protocols  
5. Multiple access protocols  
6. Link-layer Addressing  
7. PPP  
1.17  
Elementary Data Link Protocols  
An Unrestricted Simplex Protocol (A Utopian Simplex Protoco)  
A Simplex Stop-and-Wait Protocol for an Error-Free Channel  
A Simplex Stop-and-Wait Protocol for a Noisy Channel  
1.18  
An Unrestricted Simplex Protocol  
Consists of two distinct procedures, a sender and a receiver  
Sender: runs in the data link layer of the source node  
Is in an while loop just pumping data out onto the line as fast as  
it can. The body of loop consists of 3 actions:  
– Fetch a pkt from network layer  
– Construct an outbound frame  
– Send the frame  
Receiver: runs in the data link layer of the destination node  
Wait for something to happen  
No sequence number or ACK  
Only the info field of the frame is used by this protocol  
There are no errors or flow control restrictions here.  
The data portion is passed on to the network layer, and the data link  
layer settles back to wait for the next frame  
1.19  
Unrealistic protocol!!!!  
-does not handle  
either flow control or  
error correction  
120  
Tải về để xem bản đầy đủ
pdf 61 trang myanh 21880 Free
Bạn đang xem 20 trang mẫu của tài liệu "Bài giảng Mạng máy tính - Chapter 5: Data link layer", để tải tài liệu gốc về máy hãy click vào nút Download ở trên

File đính kèm:

  • pdfbai_giang_mang_may_tinh_chapter_5_data_link_layer.pdf