Loading

Module 1: Data Link Layer

Notes
Study Reminders
Support
Text Version

Data Link Layer: Basic Concepts

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-Basic Concepts
Hello. So, we will be continuing our discussion on Computer Network and InternetProtocol. So, we have started discussion on Data Link Layer. So, overview of the thingswe will again look at some of the basic concepts and then we will go slowly to little bitspecific things which we want to discuss, right.So, as we have discussed in our earlier lecture that data link layer is a layer 2 position ofOSI and also the TCP/IP protocol stack. It plays important role because finally, the fortransmitting any data that data link layer address need to be resolved, right. And finally,and end of the things we require a physical media wired or wireless to transmit the datafrom one source to another from the source to destination or hop to hop. Or data linklayer manifestation sometimes we call is a hop to hop manifestation, right.So, this is important to understand the different fields means different functionalities ormechanisms of data link layer. Though whenever we are writing as a application networkapplication, writing an application or working as a network admin not primarily forapplication etcetera may not be much always bothered about the data link layer, we aremostly at the higher layer protocols and type of things. But to understand things it mayhelp us in optimising at different level.And these days as we have seen that lot of cross layer issues are coming up or cross layeroptimisation challenges are coming up, lot of research going on, cross layeroptimisations which taking care that not that individually things but taking the stack or aportion of the stack together that it is important to understand, right. Because our allprotocol things were primarily why we made stack because that one layer should workindependently and it should only bothered about its upper layer and the down layer, right.So, this, it is extremely nice or for interoperability between different devices, differentprotocols and type of things, but in doing so, more you make it flexible more you lose onperformance or maybe there is a compromisation of the performance; so that there is
people looking at the cross layer optimisation. In some of the cases like quality of serviceor even type of services, security, overall network management etcetera this called crosslayer things optimisation things come up and several applications made demand a notonly one layer but a optimised different layer type of things maybe multimediaapplication or some secured application over the things etcetera. So, those things aresome of the aspects which we look into this in case of a your data link layer. Data linklayer for (Refer Time: 03:33) that aspects is important to understand that why things arethere, right.(Refer Slide Time: 03:59)
So, just to recap what with one slide what we have seen that data link layer is primarilyconsist of two things, one is LLC or Logical Link Control, another in the medium accesscontrol. So, LLC is primarily responsible for upper layer negotiation or upper layerconnectivity etcetera, whereas the MAC is primarily with the physical layer, right.So, LLCs as LSAP or the LLC service access point and on other sense that MAC alsohave a MAC address, sometimes we call a hardware address type of hardware addressthose are at the MAC level, right. And if you look at the IEEE 802 standard, itencompasses both these layer 2 and the physical layer stuff.
(Refer Slide Time: 04:31)
Now, if you look at the generic MAC frame format, right. So, MAC layer it forms aframe. So, what is the MAC frame format? Its payload is the LLC PDU, right protocoldata unit which it gets from the LLC as its payload and it addresses the source MACaddress and destination MAC address and there are some control MAC control is at thefront of it. At the end it gives the CRC or the redundancy check field to find out whetherthere is a transmission error or not by the end station or the next stop station where thethings are being transmitted, right. So, that is important.So, we have a MAC control, contains the control information of the function of the MACprotocol that is priority level, etcetera. Destination MAC addresses; the address of thephysical attachment point of the LAN for this frame, right; so where it is connected,right. So, your number of cases if the if the if your PC or laptop say wire connectionconnected to a switch, so that is the destination for this, the next stop is the switch, right.And if it is a wireless then also the destination is the wireless access point is for it is a(Refer Time: 05:54) hop to hop things, right and there is source MAC address, the sourcephysical attachment point of the LAN of this things.So, attachment point means where it is connecting to network interface card. So, that isimportant. So, what another is the LLC; the LLC data from the next higher layer, right.So, the whatever the data it gets from the next higher layer is the LLC PDU things arethere and CRC is the redundancy cyclic redundancy check field used to check if the
transmission error has occurred or not. Set the distance and check whether the CRCchecking is there, right. So, we will see that if we can discuss on the CRC time permits insome later lectures, but otherwise you can refer any standard book.Now, important is that that I have a frame which is on the standard and as we understandthat the for this we require a physical device network adaptor card or what we say LANcard where you have you can plug in your vat, RJ 45 type of cable. Or if it is a wirelessantenna or that transreceiver things will should be there or if it is a something otherthings like some other things, (Refer Time: 07:26) things those interfaces will be there,that card fits into over devices it is laptop, PC, server whatever, right. And it contains aphysical address, right. Physical address or MAC address or hardware addresssometimes. So, it comes with manufacture things. So, it comes with the address which isembedded into the things, right. So, that is important.Though there are things we talk about cloning of MAC address etcetera, we are notgoing to those issues or complicacies as of now this MAC address is unique. That means,any device having a interface card has a unique MAC address across the world, right. So,what we required to do? We need to have a logical connection between the source anddestination from the IP address then every hop it needs to know that, what is the next IPaddress, resolve the MAC address push it to this MAC into this MAC.Because the layer 2 only understands up to the layer 2 things that means, up to MAClayer LLC layer it understand. Layer 2 does not understand IP etcetera, right becausethere is a higher level things. So, that need to be addressed need to be resolved need to beresolved as by some protocol, we know there is the protocol called ARP, AddressResolution Protocol with allows this which maps this IP address to this MAC address,right and then goes on doing those things.
(Refer Slide Time: 08:57)
Now, MAC techniques or MAC approaches can be one is synchronous, a specificcapacities dedicated to a connection. Same approach as in circuit switch FDM that is orTDM that is frequency domain multiplexing or time domain multiplexing. So, notoptimal for the land or metropolitan area network because the need of the station may beunpredictable, right. So, you can synchronous and reserved things may not be dedicatedconnection may be very appropriate. On the other way we have the asynchronous,capacities allocate dynamically dynamic fashion in response to the demand.When the demand comes, it is the capacities allocated. Subdivided or you can see that wecan have with it 3 approaches, one is round robin, I go on getting things after everyparticular time slot. It can be some reservation strategy it is reserved for the things orthere can be contention, right I contend for that slot and get the things done.
(Refer Slide Time: 09:59)
So, round robin, in case of a round robin for asynchronous MAC techniques, which morepredominant, MAC synchronous things. So, in case of round robin what we say that eachstation is in turn granted right to transmit, right. So, it is not that it is fixed, so eachstation gets its turn to right to transmit after each station finish in transmitting it passesthe right to transmit to the next station in the logical sequence, right. So, oncetransmission there it goes to the next.Efficient technique when many stations have data to transmit over an extended period oftime. If the everybody is wants to transmit it is efficient, right but if there are stationwhich are nothing to transmit then also it is getting a turn and it is a wastage of thethings, right. So, it is it becomes efficient when everybody wants to transmit or the dataare more or less in uniform manner we want to transmit and type of things it becomesmuch easier, very much efficient, otherwise it will be loss of things like, it goes ongetting turns but nothing to be transmitted.Whereas, in the in case of a reservation for it is more appropriate for some of the trafficwhere like stream traffic like voice, bulk file transfer etcetera. Time on the medium isdivided into slot like synchronous TDM, a station wishing to transmit reserve the slot forextended period. So, it is it has a it in case of steady streaming (Refer Time: 11:34) trafficyou have a quite a volume of data to be transmitted, so you reserve the slot to betransmitted, right a priori before transmitting, right.
And the third one which is contenders contends contention based technique that is forbursty traffic, short, sporadic transmission such as interactive terminal host traffic andtype of things which is which are predominant in case of a normal network traffic. Nocontrol is excised on to determine whose turn it is, right. So, there is no control on thething simply to implement then efficient for light load. So, it is it is somethingcontention. A contend for that slot and get the things and it is something which is verymeans what we say simple or out of the (Refer Time: 12:31) simple to implement andefficient for light load. So, if it is a heavy load and traffic etcetera need to be transmitted.So, that may be a problem otherwise it is efficient.(Refer Slide Time: 12:43)
So, if you look again in the medium access method, so there are two things which ispredominant, one is Carrier Sense Multiple Access with Collision Detection CSMA/CDfor bus topologies which are which we mostly see across us, right CSMA/CD.There is another thing which is still there but not so popular that is control token or tokenpassing for bus and ring topologies, right. So, this is also there, but not so popular thesedays. So, we are mostly on CSMA/CD type of architecture.
(Refer Slide Time: 13:23)
So, in case of a CSMA/CD used only in bus type of network where a number of nodesCRA common communication path or bus or what we say communication media, right.So, I have a communication path where the number of nodes or number of systems orend system transmit through that bus, that it is the it is also the technique in ourtraditional Ethernet connectivity, right CSMA/CD is the technique.(Refer Slide Time: 13:57)
So, what we say that it need to carrier sense it need to sense whether there is a channel isfree or not. So, there is a whether the carrier is free or not it tends to sense. There is a
question of multiple access that number of thing can access at the same time, there is aphenomenon of collision that party communicate and may collide, right and there is athat should be a way to detect the collision and there should be a back off algorithm. So,once collision is there that should be a back off and retransmission, so need to bejammed that there is a collision is occurred that do not transmit and there is a back offalgorithm so after some time there should be a retransmission, right.So, one is that I need to sense it, one definitely there is a multiple access I need to senseit and if in spite of that there is a collision there should be a way to handle this collisionand retransmit the data in a using some back off algorithm.(Refer Slide Time: 15:05)
Data Link Layer: Basic Concepts - Part 2
So, if you look at the basic operation to transmit data, the source station assembles apacket comprise of the destination address and that data and the control info at the layertwo level. The source station listen to the cable or the transmission media to determine ifthe bus is currently is in use or not, if so it waits until the bus is free else transmit else ittransmit the packet, right.So, if there is free transmit if it is not free it waits whether the bus is free and transmit theoperation is known as the carrier sensing. So, if it carrier sense if it is not free it wait forthe time and if it is free transmit. During the transmission the source station continues tothe listens to the cable or the media to detect if another station is also initiatedtransmission that causing a collision. So, it look at the collision things.
So, collision and this process is a collision detection. Typically there is a if there is acollision there is a fluctuation in the voltage level etcetera which it the source stationhardware suit able to capture that and there is a what we say collision detection. If acollision has detected then to ensure all station are aware of the collision the sourcestation transmitted random bit pattern known as jam sequence, right. So, if the collisionis detection detected then other station will may also jumped in to the thing, right withoutknowing that collision is there and it will be more collision and things will be there. So,what it does source station that it sends a jam signal. So, random bit pattern which issends as a (Refer Time: 16:45) jam signal.The station involved in a collision then back off for a random period before retrying thepacket for the transmission. So, the whichever station involved in this in a this collisionscenario will then back off for a random time period before retrying for transmitting thepacket, right. So, that is the fundamental way of things. (Refer Time: 17:13).So, let me just repeat the thing the it assembles first off all source station assemble thepackets or it forms that MAC level frame. And then look listens to the media if there ismedia is free it transmit, if the media so this the carrier sensing, if it is not free it I needto wait if it is once transmission if there is a collision usually detected by the fluctuationof the voltage the source station go for a collision detection mechanisms. If the collisionis detected or collision has occurred then the source station send a random bit pattern or ajam signal jam sequence to alert other station that there is a collision has occurred, right.And on listening that the stations which are preparing for involved in this collision orpreparing to transmit it will wait for a random back off time we will see that how thingsare there in the protocol thing. So, it is basically back off time before retransmitting orchecking the again going to the loop checking the station and going on to thetransmitting the data.
(Refer Slide Time: 18:33)
The same thing, so sensing if the idle transmit immediately if busy wait till the channelbecomes idle, collision detection abort a transmission immediately if the collision isdetected, try again later after waiting a random amount of time, right. So, if we look atthe sequence start then set back off to 0, if it is a persistence strategy check that the whatsort of persistence strategy is there, send the frame, if there is a collision no then it is asuccess, if this is a so transmission is there if there is a collision send jam signal in thatLAN segment then there is increment the back off time. And if the back off limit has notcrossed then wait for the back off time and then retransmit, right.The same thing if the limit has crossed then just abort the thing, right that how muchtime you can go on trying there if the limit has crossed then you say that you about theconnection or say that there is transmission link failure or something is not there. So, thisis the way it works in case of this, when we transmit the things in a collision detection ina multiple access carrier sense multiple access with collision detection CSMA/CD.
(Refer Slide Time: 20:05)
Now, when collision detection time how long does it take to realise that there is acollision? The worst case it may happen that to cross end to end propagation delay, right.So, it is a end to end propagation delay twice that I think then we can have this whetherthere is a collision has occurred or not. So, that maybe the scenario which will be there,right.(Refer Slide Time: 20:29)
So, there is a another protocol what we have just mention at the beginning which iswhich is still they are but not so predominant but just to have a overview of this sort of a
MAC level protocol. So, this control token or token passing another way of controllingaccess to the shared media is by control token or token passing so that means, whoeverthe in the control of that token has the right to transmit, right.The control token technique uses a control or permission token to share thecommunication resource between the number of nodes, right. This technique can beapplied to both bus and ring topologies. So, this control token thing this token is passedfrom one station to another according to a defined set of rules. So, that how this thingshould passed or shared it is a defined into the thing.So, a station may transmit a frame only when it possess a token that means, you have acontrol of the token or token is in your hand then only the station can transmit the frame.And after it has transmitted the frame it passes the token on to allow another station tograb that token and in turn used at media to transmit that data, right. So, this is the basicphilosophy which it works. So, in other sense we have a tokenization mechanism or awhat we say control or permission token, the station which has the control over the tokenor has the token in its hand has the way to transmit after transmission it pass the token onso that the other contending stations who wants to transmit can use this token to transmit.(Refer Slide Time: 22:19)
So, control token operation whether ring or bus topology a logical ring is established,right because it has to go on token in the sharing whether it is a physically ring or bus
topology there is a logical ring is established or they token moving or token moving inthe ring or token ring type of scenario, right.So, logical ring is established which links the nodes using a physical media. So, will seein the next slide that what is the thing. A link control permission token is one node, rightthe token is passed from node to node around the logical ring until it arrives the nodewaiting for the center frame so that means, it goes on moving in the node to node unlesssomebody grabs the token into the to transmit the data. The node captures the token hasthe control over the token and transmit the data. Upon completing the transmission thenode releases the token to the next node in the logical ring. So, in the logical ring it. So,there are nodes which are in the logical ring. So, once that is one ring gets thetransmission done it release the token in that logical ring. So, that is the things which youare talking of.(Refer Slide Time: 23:43)
So, there is a logical ring is has been formed in to the things a token always circulatesaround a ring net a user grabs a token and transmit the data and this is the logical ringwhich is formed into the overall scenario, right. So, token is passed from one to another,right. So, the way we discussed.
(Refer Slide Time: 24:17)
So, if we try to look at that what we say flow of the thing. So, the wait for the a stationneed to wait for the token to come, once the token it gets the token it captures or on havethe control over the token then it data whether it has a data frame to send. So, it gets thetoken it so, it has the control over the token if whether it has the it has data frame to sendif no then you release the token, right to the next one in the ring or if yes, then send theframe accept the allocated time limit if it is expired then it has to delete the tokenbecause it cannot indefinitely keep the token on its control its has the there is a time limitfor the things. If it is not expired then capture the go to the things again go for the data tobe sent etcetera.In other sense so long it is the token is there till its time has expired it goes ontransmitting it goes on transmitting the data it wants to transmit. Once that is once thattime is expired then it has to release the thing or its transmission over time (Refer Time:25:42) is not expired it release the token to the next node in the logical ring. So, if these 3nodes are there if this is the way it is moving. So, it is release to the next node next nodenext to (Refer Time: 25:53) the logical ring. So, this was in use rather some of the thingsare still in use, but now it is all mostly over mostly are Ethernet based services orCSMA/CD based services what we see these days.
(Refer Slide Time: 26:15)
So, there is another important aspect that how this addressing things can come up, right.Communication involves 3 things, right one processes, stations, networks, right. Theprocess to be there their networks is the process used to communicate between theprocesses and networks the two network, two or more networks are there and the stationswhich are the end stations.Transfer of data from one process to another involves getting the data to the station inwhich the destination process resides and then getting it to the intended process withinthe computer, right. So, if I want to transmit a data from the things. So, it has to go tothat intended process and a execute into the thing.Two level of addressing they have. So, one is the MAC address or the hardware addressor what we sometimes called network address and there is a LLC addressing schemewhere it tries to identify the network service point.
(Refer Slide Time: 27:15)
So, if we look at LLC user data IP datagram are passed now to LLC which appends aheader to make the LLC PDU, right. So, with the header it becomes a LLC protocol dataunit. The LLC PDU is passed to the MAC entity which in turn appends the header andthe trailer to make the MAC frame, right.So, I the user data in this case user data in this case what it receive from the upper layersay network layer and then it address the LLC header and create the LLC PDU, this LLCPDU now become the payload for the MAC. So, the MAC adds a header and a trailerand make this MAC frame which need to be transmitted to the next hop, right, where theMAC header contains the destination address that is the layer two address of the MACaddress which need to be transmitted to the next hop.
(Refer Slide Time: 28:19)
So, level of addressing. So, one is MAC addressing identify a physical interface from thestation to the LAN, right. So, it should be physically connected wired or wireless there isone or more relationship between the station and the physical address. So, LLC addressidentify LLC user, LLC address or LSAP is associated with that is a service access pointassociated a with the particular user within the station, right. And also the LLC serviceaccess point may refer to a process executing on a station or to a hardware port end typeof things that means, it is mostly talking with the upper layer type of, it is talking withthe upper layer type of protocol with the LLC SAP.(Refer Slide Time: 29:05)
So, what we see; so 3 broad classes or categories, right. In case of if you look at theMAC protocols, so one is channel partitioning like divide channel into smallest pieceeither time slot or frequency the channel need to be partitioned, allocate piece to node forexclusive use. So, I allocate these slots into different nodes either through mechanism ofCSMA/CD or token ring and type of thing. So, this is one aspect. Like the channel needto be somewhat logically partitioned and things would be there.Other aspect is random access: allow collisions, allow collision, recover from collision,right. So, one is allowing collision and recovering from the collision. And there is ashared access, tightly coordinate shared access to avoid collisions, right. So, there is amore coordinated effort to avoid collision, right. So, these are the 3 what we say aspectsof MAC layer protocol which is hard to achieve.The basic philosophy or a basic goal of this thing is that it should be efficient, fair,simple and decentralized, right. So, efficient, fair, efficient means that channel is utilisedefficiently; fair means is fair to all the nodes in the in that LAN like it is not giving anyextra preference to the other things, right it should be simple to implement. Finally, endof the day it is these devices are not that high resource devices. So, simple to implement.So, simple and as far as possible it should be decentralised decentralized that thereshould not be any centralised control over this mechanisms, right. So, that should bedecentralized type of things.So, what we say efficient, simple and decentralized this; these are the things which if anyMAC protocol tries to achieve. So, what will what we have seen a overall mechanismsoverall basic philosophy of that how this layer two data link layer protocols works. So,LLC and MAC and what are the different technique like CSMA/CD is the predominanttechnique which is Ethernet uses also there is a token ring technique things are there andthe MAC protocol as such want to become efficient fair to all simple protocol anddecentralised.So, with this let us conclude our discussion today. We will continue our discussion onthis layer two or data link layer in our subsequent lectures.Thank you.