Transcript for:
Overview of Data Link Layer Concepts

welcome back to the cisco introduction to networks lecture series this is module 6 and we will be looking at the data link layer if you like to look at the previous modules and go through those lectures i will leave a link below in the description for the playlist for those items so let's get started the objective of this particular module is to explain how media access control in the data link layer supports communication across networks we're gonna learn about purpose of the data link layer we're gonna learn about topologies and we will learn the data link frame you should be able to describe the purpose and the functions of the data link layer and compare characteristics of media access control methods in wn sorry and van and lan topologies you should also be able to describe the characteristics and functions of the data link frame at the end of this lecture so what is the purpose of the data link layer if you look at the osi model you will have a seven layers or seven sectors start from physical data link transport session and go all the way up to presentation and application we looked at the physical layer in our previous uh presentation so now we're going to focus on the next layer on top of that physical layer which is the data link the data link layer is you for use for things like mac addresses which is the physical addressing and it is ensure data is error free the data link layer of the osi model sits on the level 2 or layer 2 as i mentioned before as shown on the figure on the right hand side it prepares the network data for the physical network the data link layer is responsible for the network interface card or nic card to the network interface card communications the data link layer does the following eye things um as part of its you know part of his functions so remember when you plug in your uh network uh cable then to the unique the network interface card for through rj45 you're actually using the data link layer and also the physical layer as well which we discussed in the previous module the data link layer enables upper layers to access the media the upper layer protocol is completely unaware of the type of media that is used to forward the data data link layer accepts data usually layer 3 packets such as ipv4 or ipv6 packets and encapsulates them into layer 2 frames data link layer also controls how data is placed and received on the media data link layer also receives encapsulated data usually layer 3 packets and directs them to proper upper layer protocols such as network and transfer and etc etc and data link layer also performs error detection and reject any corrupt frames and we will learn about this as we go forward the data link layer is responsible for network interface card to network interface card communication within the same network so in other words if you have a computer and you connect that computer to a router like most of you have done in your home that is using the network interface card to a network interface on the on the router or a server to you know connect with each other and that is facilitated by the data link layer it allows upper layer protocols to access the physical layer media and encapsulate data encapsulate layer 3 packets which is ipv4 and ipv6 packets into layer 2 frames it also performs error detection as i mentioned before and it rejects the corrupt frames so that the data can be received from the other end uh with you know all the information that it needed to uh you know needed to communicate the ieee 802 lan man or slash van man data link sub layers can be summarized like this the data link layer consists of two sub layers they are called logical link control llc and media access control or a mac most of you are probably familiar with the media access control or mac because you probably heard about the term mac addresses which often time been thrown around especially when you are working with networks so in here on this diagram you have the physical layer and then you have the data link layer and on the data link layer we have these two subcategories the mac sub layer and the llc layer so what is logical link control or llc lse handles communication between upper layers of the protocol suit and lower layers llc is implemented in software and it is and its implementation is independent of the hardware typically the driver software for a network interface card like for example if you have intel intel network interface card on your computer the driver for your that network interface card is should be responsible for llc the link logical link control it identify which networks layer protocol is being used for the frame this information allows multiple layers three protocols such as ipv4 and ipv6 to use the same network interface and media the media access control which is the one most of you are familiar with or mac address or mac control uh what it does is the the mac sub layer is responsible for data and encapsulation and media access control max sub layer defines the media access pro processors performed by the hardware it manages the frame access to the network media according to the physical signaling requirements such as copper cable fiber optics wireless etc so it's it you know mac layer sublay is the one who is responsible for managing the signaling requirement for each one of those categories for example and the max sub layer controls the network interface card and other hardware that is responsible for sending and receiving data on the wired or wireless lan or man medium the max sub layer provides data encapsulation for frame delimiting the framed eliminating process provides important delimiter deliminators to identify fields within a frame these deliminating bits provides synchronization between the transmitting and receiving nodes it also provides addressing addressing provides source and destination addressing for transporting the layer 2 frame between layer 2 frame between devices on the same shared medium in addition to that the mclare also responsible for error detection which includes a trailer used to detect transmission errors packets exchange between nodes may experience numerous data link layers and media trans transitions at each hop along the path a router performs four basic layer two functions so each time that your packet goes through a router whether it's a whole your home router or your isp router or you have multiple routers within a building such as at your work when the packet passed through from your computer to the through those routers it accepts a frame from the network medium and it de-encapsulates the frame to expose the encapsulated packet then it re-encapsulates the packet into a new frame and then it forwards the new frame on the medium of the next network segment so these are the things that the basic layer two functions that each router performs when a packet pass through which is part of the data link layer process the data link layer protocols are defined by engineering organizations such as ieee itu iso and ansi for your cisco exams what you need to under learn is that the data link layer standards are universally managed by multiple organizations you don't need to know specific of what each organization have done for data link layer uh standardization what you should know this organization does exist and they are the one who is responsible for standardizing data link standards let's look at topologies the topology of a network is the arrangement and relationship of the network devices and the interconnections between them there are two types of topologies used in network engineering to describe networks they are physical and logical the physical topology shows physical connections and how devices are interconnected while the logical topology identifies the virtual connections between devices using device interfaces and ip addressing schemes just reading out these slides you it probably not going to make any sense to you so let's look at some diagrams and then try to understand how physical topology is different from logical topology so the data link layer sees the logical topology of a network when controlling the data access to the media it is the logical topology that influence the type of network framing and media access control use so the physical topology doesn't really have any impact on the network data link layer the logical topology does so based on the definitions of the previous slide um if you just look at these two diagrams as i mentioned you probably have now a better graph you know better idea about how uh the the physical topology is different differ from the logical topology so in this example the physical topology is divided or uh sectored based on the room in which these devices contain so for example these routers switch this router and these two switches and these devices these end devices in this case servers are located in room number two one five eight so physically we're going to separate this into that room as opposed to in here in logical topology the switch and these end sir in device servers in this case web server email server and file server logically is different from it's logically separated from the switch to because switch one is connected to switch to via a router and then that router is responsible for logically separating the switch 1 devices from switch 2 devices therefore in logical topology we separate this as one section and this section is a one another session and these are as three different other sections but in physical topology it is divided based on the room like for example this switch and this router and this switch are all located in one room so we in physical topology we categorize all of them into one room while this printer and this computer is in another room so we're going to put it into another category however in logical topology this printer and this s2 switch are in the same logical uh section because that that logical section is separated by this router in the middle this r1 therefore you know even though this switch may be in the same room as this switch the switch number one they are logically separated we will discuss how logical and physical separation work as we move through this course materials in the future but just for now what you need to remember is physical topology is based on the location of the device while the logical topology is based on the separation of the network in the logical space so that's very important and in data link layer use the logical topology uh not the physical topology when topologies there are three common types of van topologies when stand for the wide area network their point-to-point hub and spoke and mesh the point-to-point is the simplest and the most common van topology consists of a permanent link between two endpoints like you're gonna have two endpoints and they're permanently connected with one link hub and spock system uh is similar to a start topology where a central site interconnects branch sites through point-to-point links you probably have heard this term hub and spark if you ever research how airline industry works for example so it'll have it looks like a start apology but basically you have a central hub just like a airplane uh you know um main distribute main center for example and then everything else connected to that central hub and then is there are spokes it's it's you know from the central hub every other device is connected through that hub so that's for the hub benchmark system then finally the next one is the mesh it provides high availability but requires a very a every end system to be connected to every other end system so in other words in the mesh system each device is connected to each other's device connections so it's going to create like a mesh and we will look into those items in next few slides so point to point when topology is a physical point-to-point topology that directly connects two nodes the nodes may not share the media with each other's hosts because all frames on the media can only travel to or from two from two nodes point-to-point ram protocols can be very simple so that's a very important concept because all frames on the media can only travel to or from the two nodes the point-to-point van protocols can be very simple for example you have a node here so there's a router here and you have a network and you have a node two there's another router here and they are you know communicating across and it's just going to be point to point because they are basically connected to each other like just like a straight line right so that's what the point to point when topology look like i say it's a very very simple form of point to point land topologies end devices on lands are typically interconnected using a star or extended start apology star and extended start apologies are easy to install very scalable and easy to troubleshoot scalable means basically you can add more devices as your company organization grows and it is easy to install because you know it has a central hub you could interconnect everything through the central hub the early uh ethernet and legacy token ring typolog technologies provide two additional uh topologies and those are called bus and ring in bus topology all in systems chained together and terminated on each end while ring topology each end system is connected to its respective neighbor to form a ring in modern day uh in 2022 and so moving forward uh you will hardly see any company or organization implementing bus or ring topologies but you will find a lot of companies implementing start apology which is the most commonly used uh technology nowadays there are a lot of drawbacks associated with bus topology and ring topology and we will not we will not go into depth in this module on those drawbacks and i will post a separate video uh discussing extensively different topologies and advantages and disadvantages of them but for now what you need to understand is that most commonly used topology nowadays on lan uh is the star and extender star and the bus and ring were like legacy uh topologies and on your right hand side if you look at the diagrams as the cisco provided it shows the star topology what it looks like so it has a central point and all the end devices are connected to that central point the extended star topology will have those central points along another connection so in this case there's two connection points central points and they're interconnected and in the legacy uh topology such as bus topology and report topology you know bus topology is like a straight line and then everything connected to that straight line they are terminated on either end and then the ring topology will have this kind of connection so what do you need to understand for your exams if there is a question where cisco give you these four diagrams and ask you to identify them you should be able to identify them and you should also remember bus and ring topologies are legacy topologies and they are currently kind of not in use and maybe in experimental use uh in maybe laboratories that's it like in real world we have probably never going to use past centering topologies in 2022 so you need to remember that for your exams so know how to identify them on a diagram and no there are two items here like the bus and ring there are legacy topologies while the start apology and extended start start apology is being used even in modern day half and full duplex communication again i just want to point out we are not going to go into depth of these two these two uh it will be much more advanced for this particular course series this lecture series but i will explain that in a different lecture series as we move forward but for this course only thing you need to remember is the half duplex communication only allows one device to send or receive at a time on a shared medium while the full duplex communication allows both devices to simultaneously transmit and receive on a shared medium and also half duplex use on w lands wireless lands and legacy bus topologies or with ethernet hubs while the full duplex is used by ethernet switches that operate in full duplex modes including router switches and everything else and why we still talk about half duplex is because the w lands which are wireless communication systems which use half duplex communications so what for this course what you need to remember is half duplex one device to send and receive at a time full duplex allow both devices to simultaneously transmit and receive on that x shared medium so that's what you need to remember for this clock course uh on my wireless lectures wireless communication lectures i'll be posting in the future i'll be talking a lot about how hard half duplex works but for now just remember these two definitions access control methods all hots connect to a shared medium so that means there are multiple access ethernet lands and wlans or wireless networks are examples of multi-access networks a multi-access network is a network that can have two or more in devices attempting to access the network simultaneously contention-based access so in contention based multi-access networks all nodes are operating in half duplex competing for the use of the medium remember the definition of half duplex so that's where this is coming into play however only one device can send at a time because remember because it's half duplex and therefore there is a pros uh process if more than one device transmit at the same time so in half duplex only one device can communicate at a time so now we need to make sure that's not gonna impact uh the the quality of service so how the data is transmitted it's not gonna create collisions for example so how it works is all nodes operating in half duplex competing for use of the medium uh have you know certain um so all nodes operating in half duplex competing for use of the medium the examples could be csma cd and csma is ca sorry ca so there's a carrier sense multiple access with collision detection which uh use on legacy bus topology ethernet and the other one is the carrier sense multiple access with collision avoidance so csma which is used on wireless lands csma the carrier sends multiple access with collision avoidance is still being used while the csm csma cd version is not not really used in modern day so csma ca is the one that you will be focusing on in your future lectures as well control access control access is a deterministic access where each node has its own time on the medium and it is usually used on the legacy network such as token ring and you don't need to learn a lot about it you don't need to know a lot about it but you just need to know it it does exist so there's a contention based access and control access you need to know those two axis but the the control access is not something that we will be focusing on any of our lectures so we can summarize the carrier sense multiple access with collision detection just like this so all devices listen for transmission if no transmissions then device can transmit if a collision is detected which is a spike in voltage every device backs off a random amount of time so it's not a fixed amount of time it's going to be a random amount of time csma is rules governing how communication occur to avoid collision so csma the carrier sense multiple access with collision detection uh or carrier sense multiple access is a set of rules that actually governs how the communication occurs to avoid the collisions so it is a standard used by 802.3 ethernet networking technologies while the ethernet networks are designed with csma cd technology with today's intermediate devices full duplex connections collisions do not occur and the processes utilized by csma cd are really unnecessary so remember that while the ethernet networks are designed with csma cd technology with today's intermediary devices with full duplex connections collisions uh really occurs or never occurred because they are using csma cd wireless connections however in land environments still have to take collisions into account because remember wireless connections are still half duplex csma cd used by legacy ethernet lands operates in half duplex mode where only one device sends or receives at a time uses a collision detection process to govern when a device can send and what happen if multiple devices send at the same time csma cd collision detection process involve devices transmitting simultaneously will result in a signal collision on the shared media devices detects the collision devices wait again a random period of time and transmit data so you need to know these things for your exams but this is this is probably the most detail you're going to go into in this particular course series but you need to know this information so make sure you know this slide for your exam as well as the next few slides as well csmaca is used by ieee 802.11 wireless lan lans operates in half duplex mode where only one device sends or receive at a time uses a collision avoidance process to govern when a device can send and what happens if multiple devices send at the same time csma ca collision avoidance process involved when transmitting devices also include the time duration needed for the transmission each devices on the shared medium receives the time duration information and know how long the medium will be unavailable so instead of being random it will know that the other devices would know how long the the other device need to communicate again it is very important you know these items and in this situation csa csmaca is being used in modern day wireless networks is a very important key concept that you should understand again this slide is very important for your exams and make sure you know these items and you remember those differences and similarities between them data link frame or data link frame the data link protocol is responsible for network interface card to network interface card communications within the same network data is encapsulated by data link layer with a header and a trailer to form a frame a data link frame has three parts header data and the trailer so the header at the top at the front and the data in the center and the trailer in the back the fields of the header and trailer varies according to data link layer protocol the amount of control information carried with in the frame varies according to the access control information and logical topology an ethernet frame is not processed and is discarded if it is smaller than the minimum or if the calculated frame check sequence uh or the s c sorry fcs value does not match the receive fcs value so that's an important concept so ethernet frame is not processed and is discarded if it is similar than the minimum which is a 64 bytes or if the calculated frame check sequence was f s c s value does not match the receive fcs value that's an important concept that you should remember frame fields so we have the header we have the data which is the packet and we have the trailer the header can be divided into frame start addressing type and control and then the trailer can be divided into error detection and frame stop this is very important concept this is a very important concept for your exams as well as your future networking carriers so make sure you understand that so the frame start and stop identifies the beginning and the end of the frame the addressing indicates the source and destination mac addresses remember every packet must have a source and destination information so the addressing will will be taking care of that the type identifies the encapsulated layer 3 protocol such as ipv4 or ipv6 so the type will denote typo dictates whether it's ipv4 or ipv6 control identifies flow control services such as qos so if you have a voice a packet as opposed to a data packet and if you have qos implemented on your network this control uh will be responsible uh for letting the system knows uh you know how the flow control should be managed so if it is a voice packet or a video packet you'll get a higher priority over data packet for example the data which is the packet itself contains the frame payload that means whatever the data you are trying to send error detection uh is used for determining uh so of transmission errors so just to prevent any transmission uh issues and the stop frame which is not on this list is basically saying showing the end of that frame that you're sending so the data link layer protocols add a trailer to the end of each frame in a process called error detection the trailer determines if the frame arrived without an error it places a logical or mathematical summary of the bits that comprise comprise the frame in the trailer the data link layer adds error detection because the signals on the media could be subject to interference distortion or loss that could substantially change the bit values that those signals represent a transmitting node creates a logical summary of the contents of the frame known as this cyclic redundancy check or cr c value this value is placed in the frame check sequence or fcs field to represent the contents of the frame so it's like a fingerprint in the ethernet trailer the fcs provides a method for receiving node to determine whether the frame experience transmission errors so that's what you need to understand about the trailers layer 2 addresses also refer to as a physical address a layer 2 address is also known as a physical address it contained in the frame header like it is contained within the frame header use only for local delivery of a frame on the link so it's basically only using the local delivery for example from this computer end device to this router port it will be using the physical addresses and they get updated by each device that forwards the frame for example when this user send a packet the physical address of the packet from this end device in this case the the computer to the router's port on the left hand side is the same but when it leaves the router on the right hand side port it gonna it will have a new physical address of that router sport until and then it reaches uh the next router so that's what it means by updated by each device that forward the frame so each time you get forward from this node to the next node like this router to the next router when it get forwarded that physical address changes and that's what you need to understand in this layer to addressing um in this slide lan and van frames the logical topology and physical media determine the data link protocol use so this is basically quick summary lan is ethernet as well as 802.11 wireless network ethernet is the wired network one or wide area network includes point-to-point network p or ppp high level data link control hd lc and frame relay uh i will go into depth of high level data link control and other concepts related to van as well as also land in a different lecture but for now just remember these items fall under what category and each protocol performs media access control for specified logical topologies so those are the key things you should get out of this lecture we will go over a summary next so what did we learn in this lecture so for your quiz or your fire the module exams for cisco netacad what you need to remember from this lecture is the data link layer of the osi module uh he prepares network data for the physical network and data link layer is the layer 2 of that osi model the data link layer is responsible for network interface card or nik to network interface card to communications so a neat unique communication is facilitated by the data link layer the ieee 802 lan man data link layer consists of the following two sub layers which is the llc and the mac remember we learned about lse and mac and the two types of topologies using the lan and van networks are physical and logical and remember how we covered the physical how physical is different from logical and you should be able to separate those two three common types of physical one topologies are point to point hub and spoke and mesh you just need to know what they are you don't need to know in depth but you should be able to uh you know understand the basic concepts behind point-to-point hub and spoken mesh half duplex communications exchange data in one direction at a time full duplex sends uh and receives data simultaneously and remember half duplex is being used mostly on wlan or wireless communications in modern day technologies in contention-based multi-access networks all nodes are operating in half duplex such as wlan for example examples of contention-based access methods include csma cd for bus topology ethernet lans and csma slash ca for wlans or wireless networks while the bus topology are considered as like legacy wlans are not legacy they are still in use for modern day wireless communications the data link frame has three basic parts which are header data and the trailer the frame fields include frame starts and stop indicator flags addressing type control data and error detection and you should know how to describe them and the definitions of those and why they exist data link addresses are also known as physical addresses data link addresses are only used for link control sorry link local delivery of frames so data link addresses are only used for link local delivery of frame so in remember between routers the the data link address is going to be the same but when it goes to the next router that the that that hop gonna change that data link address so that's a very important concept you should understand so this is just a summary of terms and commands that you should know the llc mac ieee uh you know what they did uh for standardization it's not that important but you what you need to remember is ieee itu iso actually standardized and in size standardized things you need to understand the separation between you know differences between physical and logical topology you need to understand the differences of half duplex and full duplex you need to understand the concept of csma cd and csmaca and you need to understand cyclic redundancy checks crs and how it you know been used in packet switching you need to understand the contention base access and control access so it's already discussed in my summary but it is just to give you a quick overview you can pause the video here if you just want to have a quick overview for example and that's the end of this module and as always um please make sure to thumbs up and subscribe to my channel and i will be posting uh the future lectures uh within next few weeks and i hope you score high on your exams and all the best and if you have any questions or comments please leave a comment below and i will try to get back to you and until next time have a nice day