COMPUTER NETWORKS Chapter 03 The Data Link Layer
《计算机网络COMPUTERNETWORKS》英文课件PPTch3TheDataLinkLayer.ppt
Chapter 3 The Data Link Layer Physical: Describes the transmission of raw bits in terms of mechanical and electrical issues.
Data Link: Describes how a shared communication channel can be accessed, and how a data frame can be reliably transmitted .
Network: Describes how routing is to be done. Mostly needed in subnets.
Computer Networks -03
22
Transport: The hardest one, generally offers connection-oriented as well as connectionless services, and varying degrees of reliability. This layer provides the actual network interface to applications . Application: Contains the stuff that users see: e-mail, remote logins, the Web’s exchange protocol, etc.
- Note: We’ll just concentrate on transmission issues. Channel access is discussed in Chapter 4
Computer Networks -03
33
3.1 Data Link Layer Design Issues
Basic Services
Ø Network layer passes a number of bits ( frame ) to the data link layer.
Ø Data link layer is responsible for transmitting the frame to the destination machine.
Ø Receiving layer passes received frame to its network layer.
Functions of the Data Link Layer
- Providing a well-defined service interface to the network layer
Dealing with transmission errors
Regulating data flow so that slow receivers are not swamped by fast senders
Computer Networks -03
44
Relationship among packet and frame • Data link layer takes the packets it gets from the network layer and encapsulates them into frames for transmission. Each frame contains a frame header, a payload field for holding the packet, and a frame trailer. Frame management forms the heart of what the data link layer does.
Computer Networks -03
55
3.1.1 Services Provided to the Network Layer
Data link layer is responsible to transmit bits from source to destination
Three main jobs: framing, error control, and flow control (a) Virtual communication. (b) Actual communication.
Computer Networks -03
66
Services Provided to the Network Layer Unacknowledged connectionless service Source machine sends independent frames to the destination without having the destination acknowledge them. No connection is established beforehand or released afterward. No attempt is made to recover lost data.
Acknowledged connectionless service No logical connection used, each frame sent is individually acknowledged. If a frame has not arrived within a specified time interval, it can be sent again. Acknowledged connection-oriented service Transfers go through three distinct phases, each frame sent over the connection is numbered and indeed received.
Computer Networks -03
77
When a frame arrives at a router, the hardware checks it for errors, then passes it to data link layer software, which checks to see if this is the frame expected, and if so, gives the packet contained in the payload field to the routing software. The routing software then chooses the appropriate outgoing line and passes the packet back down to the data link layer software, which then transmits it.
Fig. 3-3 Placement of the data link protocol
Computer Networks -03
88
3.1.2 Framing
The physical layer doesn’t do much: it just pumps bits from one end to the other. But things may go wrong, that is the data link layer needs a means to do retransmissions. The unit of retransmission is a frame (which is just a fixed number of bits).
Problem: How can we break up a bit stream into frames?
Ø Character count
Ø Flag bytes with byte stuffing or character stuffing
Ø Starting and ending flags with bit stuffing
Ø Physical layer coding violations
Computer Networks -03
99
Character Count
Fig. 3-4. A character stream. (a) Without errors. (b) With one error. Computer Networks -03
1010
预览结束 · 共 77 页
下载完整版