OSI Data Link Layer Network Fundamentals Chapter 7 Version 4.0 1
Objectives Explain the role of Data Link layer protocols in data transmission. Describe how the Data Link layer prepares data for transmission on network media. Describe the different types of media access control methods. Identify several common logical network topologies and describe how the logical topology determines the media access control method for that network. Explain the purpose of encapsulating packets into frames to facilitate media access. Describe the Layer 2 frame structure and identify generic fields. Explain the role of key frame header and trailer fields including addressing, QoS, type of protocol and Frame Check Sequence. 2
Data Link Layer Accessing the Media We have learned about the following layers: The application layer provides the interface to the user. The transport layer is responsible for dividing and managing communications between the processes running in the two end systems. The network layer protocols organize communication data so that it can travel across internetworks from the originating host to a destination host. 3
Data Link Layer Accessing the Media For network layer packets to be transported from source host to destination host, they must traverse different physical networks. These physical networks can consist of different types of physical media such as copper wires, microwaves, optical fibers, and satellite links. The services defined by the OSI data link layer prepares network layer packets for transmission and controls access to the physical media. 4
Data Link Layer Accessing the Media 5
Data Link Layer Accessing the Media The data link layer performs two basic services: 1. Allows the upper layers to access the media using techniques such as framing. 2. Controls how data is placed onto the media and is received from the media using techniques such as media access control (MAC) and error detection Responsible for the exchange of frames between nodes(devices communicating at Layer 2) over the media of a physical network. This includes encapsulating the packet into a frame, placing the frame onto the media, receiving the frame from the media, and decapsulating the frame back into a packet. 6
Data Link Layer Accessing the Media In any given exchange of network layer packets, there can be numerous data link layer and media transitions. That is, the packet can be repackaged into different frames as it passes across different media. At each hop along the path, an intermediary device, usually a router, processes the frame as follows: 1. Accepting the frame from a medium 2. Decapsulating the frame into a packet 3. Constructing a new frame appropriate for the next media 4. Forwarding the packet inside the new frame across the next segment of the physical network 7
Data Link Layer Accessing the Media The packet exchange between these two hosts requires a diversity of protocols that must exist at the data link layer. At each router, a different data link layer protocol is used for transport on a new medium. 8
Controlling Transfer Across Local Media The technique used for getting the frame on and off media is called the media access method or MAC method. For the data to be transferred across a number of different media, different MAC methods might be required during the course of a single communication. 9
Controlling Transfer Across Local Media An adapter is used to make the connection to the network. For example, network interface card (NIC) is used to connect host to the LAN media. The adapter manages the framing and media access method. 10
Creating a Frame The data link layer frame includes the following elements: Data: The packet from the network layer Header: The control information, such as addressing, located at the beginning of the PDU Trailer: The control information added to the end of the PDU 11
Creating a Frame 12
Protocols & Standards The functional protocols and services are described by engineering organizations (such as IEEE, ANSI, and ITU) and communications companies. Engineering organizations set open standards and protocols. Communications companies can set and use proprietary. Engineering organizations include International Organization for Standardization (ISO, http://www.iso.org) Institute of Electrical and Electronics Engineers (IEEE, http://www.ieee.org) American National Standards Institute (ANSI, http://www.ansi.org) International Telecommunication Union (ITU, http://www.itu.org) 13
Protocols & Standards 14
Media Access Control Techniques The method of MAC used depends on Media sharing: If and how the nodes share the media Topology: How the connection between the nodes appears to the data link layer 15
MAC for Shared Media Medium with multiple nodes. At any one time, there can be a number of devices attempting to send and receive data using the network media. The two basic MAC methods for shared media are as follows: Controlled: Each node has its own time to use the medium. Contention-based: All nodes compete for the use of the medium 16
MAC for Shared Media 17
MAC for Shared Media Controlled Access for Shared Media In controlled access method, network devices take turns, in sequence, to access the medium = scheduled access or deterministic. Device turn, but does not need to access, the opportunity passes to the next device in line. When one device is placing a frame on the media, no other device can do so until the frame has arrived at the destination and has been processed by the destination. Well ordered and provides predictable throughput, but can be inefficient because of the waiting. 18
MAC for Shared Media Controlled Access for Shared Media 19
MAC for Shared Media Contention-Based Access for Shared Media Allow any device to try to access the medium whenever it has data to send = nondeterministic. To prevent complete chaos on the media, these methods use a carrier sense multiple access (CSMA) process to first detect whether the media is carrying a signal. When the device attempting to transmit sees that the media is busy, it will wait and try again after a short time period. If no carrier signal is detected, the device transmits its data.. 20
MAC for Shared Media Contention-Based Access for Shared Media 21
MAC for Shared Media Contention-Based Access for Shared Media It is possible that the CSMA process will fail and two devices will transmit at the same time. This is called a collision. If a collision occurs, the data sent by both devices will be corrupted and will need to be re-sent. CSMA is usually implemented in conjunction with a method for resolving the media contention. The two commonly used methods are CSMA/collision detect (CSMA/CD) CSMA/collision avoid (CSMA/CA) 22
MAC for Shared Media CSMA/Collision Detect In CSMA/CD, the device monitors the media for the presence of a data signal. If a data signal is absent, indicating that the media is free, the device transmits the data. CSMA/Collision Avoid In CSMA/collision avoid (CSMA/CA), the device examines the media for the presence of a data signal. If the media is free, the device sends a notification across the media of its intent to use it. The device then sends the data. 23
MAC for Nonshared Media Require little or no control before placing frames onto the media. Have simpler rules and procedures for MAC. Such is the case for point-to-point topologies In point-to-point connections, the data link layer has to consider whether the communication is half duplex or full duplex. Traffic analogy, half duplex = one lane road, and full duplex = twolane road. Half-duplex communication means the devices can both transmit and receive on the media but cannot do so simultaneously In full-duplex communication, both devices can transmit and receive on the media at the same time. The data link layer assumes that the media is available for transmission for both nodes at any time. 24
MAC for Nonshared Media Full Duplex 25
Summary 26
27