1 / 169

Chapter 5

Chapter 5. Data-Link Layer: Wired Networks. Chapter 5: Outline. 5.1 INTRODUCTION 5.2 DATA LINK CONTROL (DLC) 5.3 MULTIPLE ACCESS PROTOCOLS 5.4 LINK-LAYER ADDRESSING 5.5 WIRED LANS: ETHERNET PROTOCOL 5.6 OTHER WIRED NETWORKS 5.7 CONNECTING DEVICES.

vivian
Télécharger la présentation

Chapter 5

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. Chapter 5 Data-Link Layer: Wired Networks .

  2. Chapter 5: Outline 5.1 INTRODUCTION 5.2 DATA LINK CONTROL (DLC) 5.3 MULTIPLE ACCESS PROTOCOLS 5.4 LINK-LAYER ADDRESSING 5.5 WIRED LANS: ETHERNET PROTOCOL 5.6 OTHER WIRED NETWORKS 5.7 CONNECTING DEVICES

  3. Chapter 5: Objective • We introduce the concept of nodes and links and the types of links, and show how the data-link layer is actually divided into two sublayers: data link control and media access control. • We discuss data link control (DLC) of the data-link layer and explain services provided by this layer, such as framing, flow and error control, and error detection. • We discuss the media access control (MAC) sublayer of the data-link layer. We explain different approaches such as random access, controlled access, and channelization.

  4. Chapter 5: Objective (continued) • We discuss link-layer addressing and how the link-layer address of a node can be found using the Address Resolution Protocol (ARP). • We introduce the wired LANs and in particular Ethernet, the dominant LAN protocol today. We move through different generations of Ethernet and show how it has evolved. • We discuss other wired networks that we encounter in the Internet today, such as point-to-point networks and switched networks. • We discuss connecting devices used in the lower three layers of the TCP/IP protocol such as hubs, link-layer switches, and routers.

  5. 5-1 INTRODUCTION The Internet is a combination of networks glued together by connecting devices (routers or switches). If a datagram is to travel from a host to another host, it needs to pass through these networks. Figure 5.1 shows communication between Alice and Bob, using the same scenario we followed in the last three chapters.

  6. Figure 5.1: Communication at the data-link layer 1.6

  7. 5.1.1 Nodes and Links Although communication at the application, transport, and network layers is end-to-end, communication at the data-link layer is node-to node. As we have learned in the previous chapters, a data unit from one point in the Internet needs to pass through many networks (LANs and WANs) to reach another point. Theses LANs and WANs are connected by routers. It is customary to refer to the two end hosts and the routers as nodes and the networks in between as links.

  8. Figure 5.2: Nodes and Links

  9. 5.1.2 Two Types of Links Although two nodes are physically connected by a transmission medium such as cable or air, we need to remember that the data-link layer controls how the medium is used. We can have a data-link layer that uses the whole capacity of the medium; we can also have a data-link layer that uses only part of the capacity of the link. In other words, we can have a point-to-point link or a broadcast link.

  10. 5.1.3 Two Sublayers To better understand the functionality of and the services provided by the link layer, we can divide the data-link layer into two sublayers: data link control (DLC) and media access control (MAC). This is not unusual because, as we will see later in this chapter and in the next chapter, LAN protocols actually use the same strategy. The data link control sublayer deals with all issues common to both point-to-point and broadcast links; the media access control sublayer deals only with issues specific to broadcast links.

  11. Figure 5.3: Dividing the data-link layer into two sublayers

  12. 5-2 DATA LINK CONTROL (DLC) The data link control deals with procedures for communication between two adjacent nodes. Data link control (DLC) functions include framing, flow and error control, and error detection and correction. In this section, we first discuss framing, or how to organize the bits that are carried by the physical layer. We then discuss flow and error control. Techniques for error detection are discussed at the end of this section.

  13. 5.2.1 Framing Data transmission in the physical layer means moving bits in the form of a signal from the source to the destination. The data-link layer, on the other hand, needs to pack bits into frames, so that each frame is distinguishable from another. • Frame Size • Character-Oriented Framing • Bit-Oriented Framing

  14. Figure 5.4: A frame in a character-oriented protocol

  15. Figure 5.5: Byte stuffing and unstuffing

  16. Figure 5.6: A frame in a bit-oriented protocol

  17. Figure 5.7: Bit stuffing and unstuffing

  18. 5.2.2 Flow and Error Control We defined flow and error control in Chapter 3. One of the responsibilities of the data-link control sublayer is flow and error control at the data-link layer. • Flow Control • Error Control

  19. 5.2.3 Error Detection and Correction At the data-link layer, if a frame is corrupted between the two nodes, it needs to be corrected before it continues its journey to other nodes. However, most link-layer protocols simply discard the frame and let the upper-layer protocols handle the retransmission of the frame. Some wireless protocols, however, try to correct the corrupted frame.

  20. 5.2.3 (continued) • Introduction • Types of Errors • Redundancy • Detection versus Correction • Coding • Block Coding • Error Detection • Hamming Distance • Minimum Hamming Distance for Error Detection

  21. 5.2.3 (continued) • Linear Block Codes • Minimum Distance for Linear Block Codes • Parity-Check Code • Cyclic Codes • Cyclic Redundancy Check • Polynomials • Requirement • Performance • Advantages of Cyclic Codes

  22. 5.2.3 (continued) • Checksum • Concept • Internet Checksum • Algorithm • Other Approaches to the Checksum

  23. Figure 5.8: Single-bit and burst error

  24. Figure 5.9: Process of error detection in block coding 1.24

  25. Example 5.1 Let us assume that k = 2 and n = 3. Table 5.1 shows the list of datawords and codewords. Later, we will see how to derive a codeword from a dataword. Table 5.1: A code for error detection in Example 5.1

  26. Example 5.2 Let us find the Hamming distance between two pairs of words.

  27. Figure 5.10: Geometric concept explaining dmin in error detection

  28. Example 5.3 The minimum Hamming distance for our first code scheme (Table 5.1) is 2. This code guarantees detection of only a single error. For example, if the third codeword (101) is sent and one error occurs, the received codeword does not match any valid codeword. If two errors occur, however, the received codeword may match a valid codeword and the errors are not detected.

  29. Example 5.4 A code scheme has a Hamming distance dmin = 4. This code guarantees the detection of up to three errors (d = s + 1 or s= 3).

  30. Example 5.5 The code in Table 5.1 is a linear block code because the result of XORing any codeword with any other codeword is a valid codeword. For example, the XORing of the second and third codewords creates the fourth one.

  31. Example 5.6 In our first code (Table 5.1), the numbers of 1s in the nonzero codewords are 2, 2, and 2. So the minimum Hamming distance is dmin = 2.

  32. Table 5.2: Simple parity-check code C(5, 4)

  33. Figure 5.11: Encoder and decoder for simple parity-check code

  34. Example 5.7 Let us look at some transmission scenarios. Assume the sender sends the dataword 1011. The codeword created from this dataword is 10111, which is sent to the receiver. We examine five cases:

  35. Table 5.3: A CRC code with C(7, 4)

  36. Figure 5.12: CRC encoder and decoder

  37. Figure 5.13: Division in CRC encoder

  38. Figure 5.14: Division in the CRC decoder for two cases

  39. Table 5.4: Standard polynomials

  40. Figure 5.15: Checksum

  41. Example 5.8 Suppose the message is a list of five 4-bit numbers that we want to send to a destination. In addition to sending these numbers, we send the sum of the numbers. For example, if the set of numbers is (7, 11, 12, 0, 6), we send (7, 11, 12, 0, 6, 36), where 36 is the sum of the original numbers. The receiver adds the five numbers and compares the result with the sum. If the two are the same, the receiver assumes no error, accepts the five numbers, and discards the sum. Otherwise, there is an error somewhere and the message not accepted.

  42. Example 5.9 In the previous example, the decimal number 36 in binary is (100100)2. To change it to a 4-bit number we add the extra leftmost bit to the right four bits as shown below. Instead of sending 36 as the sum, we can send 6 as the sum (7, 11, 12, 0, 6, 6). The receiver can add the first five numbers in one’s complement arithmetic. If the result is 6, the numbers are accepted; otherwise, they are rejected.

  43. Example 5.10 Let us use the idea of the checksum in Example 5.9. The sender adds all five numbers in one’s complement to get the sum = 6. The sender then complements the result to get the checksum = 9, which is 15 − 6. Note that 6 = (0110)2 and 9= (1001)2; they are complements of each other. The sender sends the five data numbers and the checksum (7, 11, 12, 0, 6, 9). If there is no corruption in transmission, the receiver receives (7, 11, 12, 0, 6, 9) and adds them in one’s complement to get 15.

  44. Figure 5.16: Example 5.10

  45. Table 5.5: Procedure to calculate the traditional checksum

  46. Figure 5.17: Algorithm to calculate a traditional checksum

  47. Figure 5.18: Algorithm to calculate an 8-bit Fletcher checksum

  48. Figure 5.19: Algorithm to calculate an Adler checksum

  49. 5.2.4 Two DLC Protocols After finishing all issues related to the DLC sublayer, we discuss two DLC protocols that actually implemented those concepts. The first, HDLC, is the base of many protocols that have been designed for LANs. The second, Point to-Point, is a protocol derived from HDLC and is used for point-to-point links.

  50. 5.2.4 (continued) • HDLC • Configuration and Transfer Modes • Frames • Point-to-Point Protocol (PPP) • Services • Framing • Transition Phases • Multiplexing • Multilink PPP

More Related