Loading

Module 1: Data Link Layer

Notes
Study Reminders
Support
Text Version

Data Link Layer: Overview

Set your study reminders

We will email you at these times to remind you to study.
  • Monday

    -

    7am

    +

    Tuesday

    -

    7am

    +

    Wednesday

    -

    7am

    +

    Thursday

    -

    7am

    +

    Friday

    -

    7am

    +

    Saturday

    -

    7am

    +

    Sunday

    -

    7am

    +

Data Link Layer-Overview
Hello. So, we will continue our discussion on Computer Networks and Internet Protocol.Today we will be discussing on Data Link Layer rather will be having a series of lecturesdiscussed on data link layer. So, as we have seen that data link layer is the one of thepredominant layer in both ways OSI TCP/IP protocol stack, it is in the level 2 or layer 2in the stack.And as we are coming in a top down approach, so we have discussed on applicationlayer, then transport related transport layer, network layer then now the data link layerand then we will go for the physical layer. In some of the literature or some of thereferences you will find that data link layer and the physical layer added togetherbecause, there are a lot of specially the IEEE 802 stack consider them together.So, there is there are both way it is there. So, what we will see we will try to look oneafter another, but no harm in looking them together also.(Refer Slide Time: 01:26)
So, we will just come back to our that slides which we have seen much earlier at thebeginning of the lecture. So, if you look at the OSI protocol stack, these are the 7 layersand if we refer to this data link layer, the transfer of unit information framing and errorchecking or error and flow control is one of the major aspects. And down the below isthe physical layer which is basically transmission of the binary data through the medium.So, this is our protocol stack.(Refer Slide Time: 02:02)
So, and if we again if you recall, so if we see that they if 2 end systems a and b arecommunicating, so a application say email application or HTTP (Refer Time: 02:15)applications when it goes through, it goes through the stack and finally, push through thisphysical and then goes to this is a layer 2 switch, there is a layer 3 switch or a routeragain a layer 2 switch and go on.There can multiple hops of the things finally, it is another application that if it is theemail, there are this email application going on, this peer applications talks to each otheror any applications going on peer applications over the network talks to applicationstalks to each other.Now, one as we know or we have already discussed that intermediate layers,intermediate these devices are open up the layer or the packet up to which it is enabledright. In other sense, this is the whole stack of things like applications data pay load goesto the transport layer as a pay load then the with the header etcetera goes to the network
layer as a payload then, the data link layer physical layer and when it is going coming tothe layer two switch which understands of the data link layer it is it opens up to the datalink layer and see that where need to be forwarded, goes to the this one and go on solong, it is not reaching the end system right. So, that allows us to achieve interoperatibility right.So, we can have intermediate switches and routers of different this is layer 3 capable(Refer Time: 03:45) or layer 1 to layer 7 capable devices which open up the packets up tothis and check that where things to be which to be moved. Couple of things we want toput into want to discuss or just to recap that when we look at a network layer, so itdivides the network right like, IIT Kharagpur is a network then say some other say IITBhubaneshwar, IIT Delhi the other pre universities and type of things if we look at theacademic institution these are the different networks and type of things.So, there is an router which goes on the things right. Also we have discussed aboutautonomous systems and traffic moving from one autonomous system to other.Nevertheless, if you see where if we want to send some data there should be a physicalconnectivity; it can be wired, it can be wireless, it can be something line of sight or it canbe through satellite or something right, but there should be a medium by which thetransmission should be done right.So, whatever you want to transmit, it need to come to the down level right. So, if we lookat that if we look at the last 3 layers, so if we look at the at the network layer it dividesthe network or in other sense, as we have discussed it divides both the collision domainand the broadcast domain right. The broadcast is not heard by the other side of thenetwork neither the collision things are there.If you look at the layer 2, it basically in the same broadcast domain, but neverthelessthey divides the collision domain. So, it gives us a better efficiency. If we look at thelayer 1, then it is in the same collision domain and broadcast domain, so the efficiency ismuch less. So, what we are trying to primarily focus on this couple of or series oflectures is that what are the different things what we go to the layer 2 type of device.So, just to again remind you that if a router is sending a packet to another router right,the logically it is in the network they can it has to find out, but nevertheless finally, it hasto come to this layer 2, find out that layer two addressing scheme and go push to that
particular other interface of the router. So, even 2 layer 3 devices when you have tocommunicate, it has to come down to layer 2, look for the layer 1 for the physical mediaand get the things transmitted right.So, it plays data link layer is inevitable as in some references we have told, we will beagain discussing those things. There is a protocol called address resolution protocol ARPby which, I this is a intermediate protocol what we say that between a layer 2 and layer 3which given a IP address it find out what is the layer 2 address or the MAC address at theMAC address, so that it can be transferred to the next thing right.(Refer Slide Time: 07:01)
So, if we look at the protocol stack, so this data link layer and physical layer sometimesconsidered as a combined layer, where the predominant protocol is the Ethernet. Thereare other protocols, but the predominant protocol here is the Ethernet protocol.
(Refer Slide Time: 07:26)
So, if we see that the data link layer. So, above it is the network layer, down is thephysical layer again I am repeating some of the configuration we take that data link andphysical layer together. And if we look at the data link layer little deep, so what you seethat it has 2 sub layers; one is MAC sub layer another is LLC sub layer, that is MediumAccess Control sub layer and Logical Link Control sub layer.So, one sub layer that MAC is primarily for looking accessing the media that how theaccess mechanism should be there and logical link control is more of the it defines theservice access point with the upper layer. In differentiating these 2 allows the thing thatthere are different MAC mechanisms or protocols can be used for the for a given LLCand type of things right. So, this is 2 aspects of the manageability.
(Refer Slide Time: 08:21)
So, like just to pictorically show you, so network layer, so this LLC sub layer and theMAC sub layer right and this is the physical layer. So, they take care of that connectivitywith the upper layer and the down layer, means layer at the bottom of the things right.So, again just to repeat, we have 2 applications which at it may be running at differentsystems of the same systems for our consideration we say that over the network it isrunning. And then these applications how they will transmitted will be through thetransport layer. So, transport layer identifies the process of the 2 things.So, we require the IP address plus (Refer Time: 09:05) port, what we have discussedwhile discussing on the socket forming a socket connections IP address and port. Wehave then the network layer, which find out the logical connectivity with the help of theIP address. We have that data link layer, which is a hop to hop connectivity right, thatevery hop the next data link layer address need to be resolved or the MAC address needto be resolved, packet need to be passed to the things like if I have a n number of routersin my path then every router i to i plus 1, the address of the router i plus 1 need to beresolved. Or find out that what is the MAC address or the layer 2 address or sometimesknown as the hardware address push this traffic to the next hop and it goes on the hop byhop connectivities. Or as in commonly say, that it is within that local area networkconnectivity, it is in the same broadcast domain, but the collision domain where is adifferent collision domains.
(Refer Slide Time: 10:10)
Now, there are some of the issues, challenges, problems what we say like one is thesharing the wire right. So, I can have 2 things to connect a host, one where connecting ahost like we will see that if I have two machines which wants to communicate, I may notrequired so much, so much layers of network. I can have a wire which can physicallyconnect the resource and I can have a say swap of the trans receive things (Refer Time:10:42) and it can be connected right. But if I have more host than the connection will besomewhere like that right or it will be everybody is connected to everybody, this isswitch network this a type of thing.So, whether I can how to share on a wire; that means, whether I can have a bus and thengo on connecting systems on the bus right. So, I have a sort of a backbone bus and thenconnectivity on the thing. So, that is one issue.
(Refer Slide Time: 11:12)
Other issue usually what we find that when we talk to when we discuss that somebodytalks others listens right. So, listen before you speak or right it can be things.(Refer Slide Time: 11:29)
But, it may so happen that if you do go on simultaneous speaking right. So, this is theanother challenge right. So, there will be collision and requirement we need to speak outwhat we are talking again, so you have to speak out again and which results inretransmission, if there is a retransmission then there is a loss of bandwidth right.
So, on a particular given time, you how much things you could have transferred, if youare going on retransmitting that is effectively you are delaying or loosing or in effectivetrans you are losing that right (Refer Time: 12:03). So, in other sense, if there are multiparty term which is which may be a case when we share a things like this right, whenthere is a common bus you have number of systems then what we see then that may be ascenario of collision right.(Refer Slide Time: 12:25)
So, another issue, so there will be a issue of collision, another issue recipient of thepacket need to put an address on the packet. So, there should be an addressing schemeright. If I want to transmit from here to here or this fellow transmitting to other fellow orsame fellow there should be addressing scheme to identify the identify the destination.So, need to a address of the packet, so what should be the overall format and type ofthings that is issue or there is a something to be resolved. How do you know that whataddress you want to send it to right, I have a logical address right. I know that logically Iknow that that thing which will be the physical address or which address I need to sendthose things need to be I need to know right. So, that is this is other challenge.
(Refer Slide Time: 13:32)
So, if you look at the data link layer, they need to resolve these things. So, if we nowcome to the medium access and medium access control, so MAC sub layer is primarilyused in broadcast and shared channel network. If I have a peer to peer network, it maynot have that much utility right because, if it is a point to point connectivity, then I do nothave that type of utility.MAC protocol enables two station on nodes using a shared communication resource toestablish maintain and terminate connection right. So, it is a protocol which is when 2nodes or 2 given 2 stations systems wants to communicate to each other they shared amedia and they want to communicate with each other and then MAC protocol should beable to establish, maintain and terminate a connection.So, it should have a way to connection establishment, maintenance and terminating.Something analogy you will find in case of our connection oriented service in thetransport layer, where also we have this sort of a stuff that need to the connectionestablishment then maintenance and termination. Also you might have seen or look at thethings where you look at the socket type of things, where these things are required.Those are analogy, but there also we require a things to be communicated right, so thingsare there. And there can be different type of scenarios, the predominant is the Ethernetwhat we are using, it can be through cellular connectivity, even it can be through your
satellite connectivity right, so or any type of media which allows you to connect throughthis through some media.
Data Link Layer: Overview - Part 2
And if we look at the standard IEEE 802 is the predominant standard which are whichare used or which are practised these days over across the world. And if we look at so, ifwe look at that OSI or TCP/IP layers per say if you look at the physical and data linklayer, so the OSI layer, then we have this MAC sub layer and LLC sub layer. And if wehave the standard, so Ethernet is the predominant standard here ignore 2.3 and that this isthis looked as a CSMA/CD or there are standard for 802.4 of token bus, 802.5 of tokenring or FDDI. So, there are different type of standard, but our again as our predominantstandard is CSMA/CD will be primarily looking little more deep into this type of in thistechnology or in this particular protocol right.So, this is the so what we have we have a standard to support this and any say networkdevice manufacturing following this standards will enable us to connect the devicesacross the across each other. So, that is inter operatibility between devices from differentmake or connecting at different layers etcetera are guaranteed or ensured by this use ofthis standards right.So, this is a important thing to know. Though these days token ring and token bus are notso popular, so most predominant is the Ethernet protocol and we have from 10 mbps 100mbps and Giga byte Ethernet at the Gbps level.
(Refer Slide Time: 17:31)
So, if we see that 802.2 is the primarily handled LLC, 802.3 is the CSMA/CD or thepredominant Ethernet protocol. 802.5 is the token ring and 802.11 series is primarily forwireless lines or wireless connectivity right. So, rather in wireless domain we follow aprotocol of CSMA/CA will look into those things in our subsequent lectures.(Refer Slide Time: 18:07)
So, if we look at the scope of the 802.802 standards it is if you look at it spans from thisdata link layer to physical layer. So, those type of things, as we are discussing that LLCas a the different what we say that service access point for different service access point
for the upper layer protocol. And it basically communicate with MAC layer, MAC layerin turns communicates with the physical layer.So, one sort of thing is that I want to know that which is the MAC layer of the thereshould be addressing scheme for the MAC layer of the destination address and also thereshould be some sort of a addressing. But say for this LLC to talk to the upper layers or inother sense, there should be some sort of a service access point reference type of things.So, these things are needed for while we have to communicate from one system to othersystem at the data link layer.(Refer Slide Time: 19:14)
So, if you want to see that 802 dot layers functionality, so at the physical layer portionwhich will be discussing in sometime little later in this series of lectures. So, physicallayer is primarily concerned with encoding and decoding of the data. So, preamblegeneration or removable as and when it is means as applicable right, so, based on wheretransmitting or receiving and type of things.Bit transmission and reception and transmission media and topology how things are therethat is the one of the these are some of the primarily functions of physical layer, which isgoverned by the 802 standards. And in the logical layer control interface to the higherlevel is one of the primary thing and flow and error control is another aspects of LLCwhereas, in the MAC these are these are assembly and dismantle into the frames right,
govern access to LAN transmission media that how that data to be there into the mediaright.So, these are the things which we require. As we are familiar with LAN card or networkadapter type of things, that primarily in a pc or laptop or whatever the your device is. So,this network adapter card or LAN card or type this whatever we heard is primarilyenables this your functionalities of data link layer and some of the physical layer things.Like, interface with the means (Refer Time: 21:06) physical layer it may be wire, it maybe wireless it may be bluetooth, zigbee (Refer Time: 21:11) or anything satellitecommunication and so on so forth.(Refer Slide Time: 21:15)
So, if we look at the LAN protocol, so 2 end stations, so end systems that communicatevia a shared LAN right. So, higher layer protocol above LLC provide end to end servicebetween the station right, these are the higher layer protocols. So, in case of a logical linkalso we go through these LAN, but this is also end to end connectivity whereas, themedia access and the physical is basically utilize this LAN infrastructure or theconnectivity to communicate between each other. So, that is the whole of the thing.
(Refer Slide Time: 21:54)
So, if we look at the LLC, so it is a LLC layer for LANs is concerned with thetransmission of link level protocol data unit or PDU between the 2 station without thenecessity of a intermediate switching right.So, the LLC layer of LAN or LLC layer of the data link layer DLL Data Link Layer isconcerned with the transmission of the link level at the data link level PDU right orprotocol data unit between 2 stations without the necessity of a interface of a switchingnodes. So it can transmit the things or in other sense, this that protocol data unit willcontain the payload what it gets from the higher layers right.So, it is that the data along with the whatever the network layer header and footer andwhatever is there, header and tailor it comes as a payload to the data link layer whichtransmit to the next device or next hop right by finding that what is the next of addressand transmitting the data right. So, that is the basic bottom line of the thing. And thereare two characteristics it must support multi access, shared medium nature of link. So,these are the things what we expect from the data LLC or the data link layer protocol.And it is relieved from some details of the link access to the MAC layer.So, in other sense, LLC some of the things that media access things are pushed into theMAC layer. So, it takes care of the MAC layer. So, if you look at conceptually, so thedata link layer is to LLC and that MAC layer, the MAC layer takes care that negotiationor interfacing with the medium, underlining medium or the physical layer. Whereas, this
LLC is primarily involved or concerned about how it communicate to the higher layer orin this case the network layer how it will concern to the things that is (Refer Time: 24:13)taken care of the things. Only it needs to be ensured that the medium can be shared rightand then and multiple shared means it will be multi access nature of links.(Refer Slide Time: 24:28)
Now, there are different category of LLC services and may be unacknowledgedconnectionless service. So, it is something data datagram style what you have looked intothe IP, does not involve any flow or error control mechanism and data delivery is notguaranteed. So, it is a some sort of best effort (Refer Time: 24:43) service what you haveseen that in case of a datagram right. Another is the connection mode service, a logical alogical connection is set up between the 2 station, flow and error control are maintained,it is a connection oriented type of service.Another is acknowledge connectionless service right. A across between the 2 previousservices right, so it is a acknowledge connectionless service right. So, some sort ofguaranty is ensured. Data grams are to be acknowledged, no prior logical connection setup is required. So, this different mode that LLC type of services can work on fine. So,unacknowledged connection less service, connection mode service and or connectionsome sort of a connection oriented service, acknowledged connectionless service.
(Refer Slide Time: 25:46)
So, if you look at the MAC or the Medium Access Control, so assembly of data intoframe with address and error detection fields. So, that is one of the major aspectsassembly of data into frames with address and error detection fields and deassembly offrames and performing address recognitions error detection and other types.So, it is it takes care that i of the MAC at the sender and the receiver. So, we need to putthe addressing things of the destination hop along with the frames and the error detectionfields etcetera. And on the other hand it sets to extract and also to check that whetherthere is a error request for retransmission is there and type of things can come into play.Governs access to transmission media that is one of the major or one of the major aspector major concern that is governs the access to the transmission media.For the same LLC several MAC option may be available. This is another interesting part.So, you have the 1 LLC, but you can have different type of MAC options right so, orMAC mechanisms for the same LLC. Means, dividing them or into 2 aspects that 1 LLCfor the higher layer connectivity and MAC for the physical layer connectivity what weachieve that you can have, now number of solution of this MAC for the same type ofLLC.So, if you look at the medium access layer so all LANs consist of a collection of devicesthat must share network transmission capacity right. So, whatever LANs at the layer 2
level network we are considering, consist of a collection of devices that must have anetwork transmission capability.What we see that if you have a pc it should have a Ethernet interface card, if you have anetwork printer it should have a network interface card, anything which has a capabilityto communicate with the network has to have some way interfacing with the things.(Refer Slide Time: 27:49)
Function of a medium access control protocol is some means of controlling the access tothe transmission media in needed for efficient use of the capacity right. So, what is thebasic function of the protocol, that there is a some sort of a controlling mechanism sothat, it can first of all it can transmit through this shared media or multiple access type ofthings and the media is maximally used. So, that is that means, the bandwidth which isavailable can be used in a maximum terms right.So, if you look at there are 2 things we are looking for where and how. Where refers towhether the control info is exercised in a centralised or distributed fashion and thatmeans, in case of a centralised we have a controller has a authority to grant access to thenetwork. So, there is a control or centralised controller that who says where things willbe how things will be accessed. Who comes after whom and type of things and there is adistributed station collectively perform in MAC function to determine dynamically andthe order in which the station stand right.
So, one is centralised, there is a master controller which takes care of that howtransmission will be there or that is distributed; that means, there is a some sort ofconsensus protocol or way that the stations transmit to each other. And how isconstrained by the topology is a trade off among the competing factors like costperformance, complexity and type of things the how the transmission will be there right.(Refer Slide Time: 29:36)
So, overall if we try to look at that again that protocol stack, so we have the applicationdata right, which along with the TCP header at the transport level. So, it accumulates. So,the application data payload application data becomes a payload to this TCP layer, it actsas head or tail or whatever it wants to add. And along with that TCP header, it goes to thehas becomes a payload for this IP layer. When the IP layer header is added and then itbecomes a payload to this LLC or what we can say over all a data link layer.And then this MAC along with that whatever is coming with the MAC header and trailerbecome the MAC layer frame. So, what we say that TCP segment, IP datagram LLCPDU and MAC frame or sometimes we say that layer two frame which consider bothLLC and the MAC layer things.So, just to recompile what we are discussing, so, what we are looking at the data linklayer is primarily responsible for hop to hop transmission of the things right like, fromone hop to another hop how the data will be communicated right. And so whatever theupper layer things coming up right the data link layer, when you transmit the things, it
opens up at the packets at the data link layer level and try to and find out that, what is thenext layer next address to be pushed into and push the data to the next.So, it goes for a hop to hop layer. It is in the same transmission same what you saybroadcast domain, but different collision domain, it allows multiple access to theseoverall multiple access to the media and also we have seen LLC for the higher levelconnectivity and the MAC for the medium access type of connectivity right. So, with thislet us let us conclude this lecture and we will be continuing our discussion on this datalink layer protocols in our subsequent lectures.Thank you.