 Hello, and welcome to the session on data link layer design issues. At the end of this session, student will be able to simulate different functions of data link layer. The OSI model has seven layers, figure one gives an overall view of the OSI layers with an example of how data can be transmitted using the OSI model. The sending process has some data it wants to send to the receiving process. It gives the data say D7 to the application layer, that is layer 7, which then attaches the application header and gives the resulting item to the presentation layer. Data unit D6 means the data at layer 6 and so on. The process starts at layer 7, then moves from layer to layer in descending sequential order. At each layer, a header is attached to the data unit. At layer 2, that is data link layer, a trailer may also be attached. When the formatted data unit passes through the physical layer, that is layer 1, it changed into an electromagnetic signal and transported along the physical link. Upon reaching its destination, the signal passes into layer 1 and is transformed back into digital form. The data units then move back up through the OSI layers. As each block of data reaches the next higher layer, the headers and trailers attached to it at the corresponding sending layer are removed and the actions appropriate to that layer are taken. Finally, the message arrives at the receiving process. Data link layer takes the packets from the network layer and encapsulates them into frames for transmission. Each frame contains the frame header, a payload field for holding the packet and frame trailer, as shown in figure 2. Error control is achieved by adding a trailer at the end of the frame. Error contains control information. It is responsible for ensuring that frames are received intact or undamaged. Before going further, pause the video for some time and find the answer. Once you have done this, you may resume the video. The data link layer takes the packets from dash and encapsulates them into frames for transmission. Option A, network layer, B, physical layer, C, transport layer, D, application layer. The answer is option A, network layer. Once again pause the video for some time and find the answer. What is the primary function of the trailer added by the data link layer? Option A, supports error detection, B ensures ordered arrival of data, C identifies the devices on the local network, D provides delivery to the correct destination. The answer is option A, supports error detection. Data link layer has a number of specific functions which include providing a well defined service interface to the network layer, framing, physical addressing, flow control, error control, access control, etc. The first function is providing a well defined service interface to the network layer. In this video we are going to see this function in detail. The second function is framing, where the data link layer provides the stream of bits received from the network layer into manageable data units called frames. The next function is physical addressing. If frames are to be distributed to different systems on the network, the data link layer adds a header to the frame to define the sender and receiver of the frame. If the frame is intended for a system outside the sender's network, the receiver's address is the address of the connecting device that connects the network to the next one. Flow control comes into picture if the rate at which the data is absorbed by the receiver is less than the rate produced by the sender. The data link layer imposes a flow control mechanism to prevent overwhelming the receiver. Next function is error control. The data link layer adds reliability to the physical layer by adding mechanism to detect and retransmit damaged or lost frames. It also uses a mechanism to recognize duplicate frames. Error control is normally achieved through a trailer added by the data link layer at the end of the frame. Next function is access control. When two or more devices are connected to the same link, data link layer protocols are necessary to determine which device has control over the link at any given time. The principal service is transferring data from the network layer on the source machine to the network layer on the destination machine. The three major services offered by data link layer to the network layer are unacknowledged connectionless service, acknowledged connectionless service, acknowledged connection-oriented service. Let us see each service in detail. First you need to understand what is acknowledged service. In networking, telecommunications and acknowledgement is a signal that is passed between communicating processes, computers or devices to signify acknowledgement or receipt of the message as a part of communications protocol. Providing acknowledgement in the data link layer is just an optimization, never a requirement. Each frame sent is individually acknowledged as shown in figure 3. In this way, the sender knows whether a frame has arrived correctly or been lost. If it has not arrived within a specified time interval, it can be sent again. This service is useful over unreliable channels such as wireless systems. Layers can offer two different types of services to the layers above them, connection-oriented and connectionless. In this video, we will look at these two services. Connectionless service is modeled after postal system. Each message carries the full destination address and each one is routed through the intermediate nodes inside the system independent of all the subsequent messages. Normally, when two messages are sent to the same destination, the first one sent will be the first one to arrive. However, it is possible that the first one sent can be delayed so that second one arrives first. Connectionless service consists of having the source machine send independent frames to the destination machine without having the destination machine acknowledge them. Ethernet is a good example of data link layer that provides this class of service. No logical connection is established beforehand or released afterwards. If a frame is lost due to the noise on the line, no attempt is made to detect the loss or recover from it in the data link layer. This class of service is appropriate when the error rate is very low, so recovery is left to the higher layers. It is also appropriate for real-time traffic such as voice, in which late data are worse than bad data. The next step up in terms of reliability is acknowledged connectionless service. When this service is offered, there are still no logical connections used, but each frame sent is individually acknowledged. In this way, the sender knows whether a frame has arrived correctly or been lost. If it has not arrived within a specified time interval, it can be sent again. This service is useful over unreliable channels such as wireless systems. 802.11 that is Wi-Fi is a good example of this class of service. Connection oriented service is modelled after telephone system. To talk to someone, we pick up the phone, dial the number, talk and then hang up. Similarly, to use a connection oriented network service, the service user first establishes a connection, uses the connection and then releases the connection. The essential aspect of a connection is that it acts like a tube. The sender pushes objects in at one end and receiver takes them out at the other end. This is shown in figure 5. In most cases, the order is preserved so that the bits arrived in the order they were sent. Getting back to the services, the most sophisticated service the data link layer can offer to the network layer is acknowledged connection oriented service. With this service, the source and destination machines establish a connection before any data are transferred. Each frame sent over the connection is numbered and the data link layer guarantees that each frame sent is indeed received. Furthermore, it guarantees that each frame is received exactly once and that all frames are received in the right order. Connection oriented service thus provides the network layer processes with the equivalent of a reliable bit stream. It is appropriate over long unreliable links such as satellite channel or a long distance telephone circuit. If acknowledged connectionless service is used, it is possible that lost acknowledgments could cause a frame to be sent and received several times, wasting bandwidth. Figure 6 shows the placement of data link layer protocol. Consider an example of one subnet consisting of routers connected by point to point lease telephone lines. When a frame arrives at a router, the hardware verifies the checksum and passes the frame to the data link layer software. The data link layer software checks to see if this is a frame expected and if so, gives the packet contained in the payload field to the routing software. The routing software chooses the appropriate outgoing line and passes the packet back down to the data link layer software which transmits it. In this video, we have seen the services offered by the data link layer to the network layer. Thank you.