OSI Layer 2 Technologies Explained

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] [Music] this lecture and presentation is about OSI layer 2 it's really about taking layer 3 and preparing it to communicate on our media at layer 1 that's the job of layer 2 we will cover on this video the fundamentals of layer 2 how the source at layer 2 communicates to the destination at layer 2 we'll look at all of that technology the servicing of layer 3 and the servicing of layer 1 data link layer is about a framing system wrapping what comes down from layer 3 into a framing system we're going to look at this in detail we're also going to look at one of the most popular wide area network layer 2 technology SONET synchronous optical networking we're gonna look at some cool things like OSI 1 ID 2 allows a 10 Gigabit Ethernet LAN to directly connect to a win with almost no equipment between it we will look at the DOCSIS 3.1 data over cable service interface specifications these are specifications developed by cable labs that's the industry organization they lay a standard for how to deliver internet over hybrid fiber coaxial Vimal e at layer 2 we're also going to look at DSL digital subscriber line we're gonna look at G fast dsl goes up to 2 gigabits per second we're gonna again focus primarily at layer 2 point-to-point protocol is one of the most popular layer to win technologies in the networking world it began as early in the Internet as dial-up modems that connected I used to use a dial-up modem using point-to-point protocol to connect to an isp we're gonna look at its frames and this flexibility of this protocol what will not cover in this video or there are a lot of protocols at layer 2 i'm listening some on this slide if they're obsolete or limited use I probably won't touch on them another thing that I will not cover in this video is the Ethernet MAC destination and Mac source address this topic is beat to death on every video and every presentation of a plus and network plus because it's so heavily covered I'm going to focus on items that are not covered very often in the Ethernet frame again will not cover the source MAC address but on both slides I've put a lot of great information so you can always download the slides from the video description and you can take a look at this slide deck the data link layer works very closely hand in hand and it interfaces with the layer above in this case the network layer it also interfaces and communicates to the physical layer so all layers in the OSI have to work with those above and below except the two top and bottom ones application and physical so data link layer is going to work very closely with the network layer and very closely with the physical layer the data link layer is very different than its cousin the network layer which can communicate to a host across a very complex internet working as we're going to look in our next video the data link layer cannot do that it is bound to transfer data and say a LAN to adjacent network node in other words a point-to-point on a win in a land it has to communicate to another device in the same local area network so datalink layer is very limited in its communication as we dig into layer two you're going to hear the word principal service as we look at the various layers and what they're responsible for you're going to see me use the word principal service at layer two the principal service is to transfer data from the network layer of the source to the network layer of the destination that's the principal service of layer two let's take a look at this slide I've got a laptop on the left and you can see it I've got a network stack below it and then I've got a wireless router that's going to act as my intermediate device and then I've got a server on the right-hand side and there the laptop and the server on different subnets and so the router takes care of transferring data from one subnet to the other but remember data link layer can't do that it has to go from one node to another and then from one node to another it doesn't have the ability to do what layer 3 can do if you look at the data coming down from the laptop you'll see arrows going four layers going from three to two two to one and that's the actual flow of the data as it moves over to the intermediate device you see it go from 1 2 to 3 3 to 2 1 and most of you see that data go back to the server and that makes sense that's how actual data flows as it goes from say a laptop to a server people also talk about or they lecture and they talk about the communication between the layers so if you look at the laptop layer 2 and the intermediate device you'll see this communication going across from layer to layer 2 but they never explained what that is how do they communicate well we're going to dive into that and see exactly how engineers design layer 2 so there is crystal clear communication from the source of layer to the destination of their - from your laptop to Microsoft comm if that's where you're going before we get too involved in the communication between layer 2 on one device and their - on the other let's zoom back out and take a look at layer 2 from a thousand feet and let's look at some of the big picture items that layer 2 brings to the table layer 2 brings a number of important features and services one organization of the data into frames we're going to look at it does frame synchronization why that's so critical many data link services provide detection and recovery of transfer errors will also look at flow control many protocols at layer to provide avoidance of overloading the receiver we're also going to look at buffer management and media control now listen carefully all protocols that layer to do not always provide all of these services some provide all of them some of them provide some of them but Ethernet point-to-point protocol and many of the ones I'm going to be talking about do provide most of these services frame design is key to providing all those services that we talked about here I've got an Ethernet brain this is probably one of the simplest frames to look at and understand it doesn't provide all those services we mentioned just to some of them whereas we talked about 802 dot Elevens frame structure and design it complex and provides almost all of those services we just mentioned so frame design by each protocol or to either include some of those or all of those services logical communication between layer two in the source and their two in the destination begins with the source host it sets data in fields and flags so that it can accurately communicate with that destination layer two down at the bottom I've got an 802 dot three Ethernet frame everybody's seen it most people are comfortable with it interesting the network layer provides if you'll see the red arrow that points down to the data link layer it provides a lot of information in layer two for example let's say layer three doesn't harp it's going to put our packet into the data field it's also going to tell there too that the ether type field must have a binary number that indicates this is an art packet it can also set flags in the source MAC and source destination to indicate is it a broadcast MAC address it's a multicast MAC address all of that is being brought or pushed down by layer three now layer to distill has control of some of this information in the frame such as the preamble and the start of frame that's all used for frame synchronization that's done predominantly by layer two and then the CRC value which does the error detection in air correction as at the end of the frame then that sent down and transmitted across transmitting to layer one and then sent across the media now the destination host reads what it received from the source and it begins by looking at those fields and flags it looks at the ether type well actually it starts with a preamble and start a frame it says okay I'm synchronized I can now read those flags in the source MAC the flags in the destination MAC and I can understand what kind of MAC address I have in there then it reads the ether type field and says oh this is an art and then it can read the data pass it up to layer three and if you'll notice the green aerial going from datalink layer to or Claire it communicates critical information to layer two on the destination host once it reads all that information accurate information is communicated with layer three on the destination we are looking at an eight-oh 2.3 Ethernet frame let's just take a look at one field and see the variety of information that can be stored as they design these fields in the Ethernet frame we're looking at the ether type field it's two octet or two bytes remember that's the same thing octet sir bytes it represents sixteen bits if the value in the ether type field is less than decimals 1536 or hexadecimal zero six zero zero it indicates that the length of that data field if the value in the ether type field it R is greater than 1536 then it represents a protocol in the data field this is a spreadsheet used by programmers to know exactly what to put into an ether type field so if a programmer wants to put in the data length he's going to know that he has to put in a value that's below 1536 but if he wants to put a specific protocol but for example he wants to indicate IP version 4 he's going to put this binary number into that ether type field if it's going to be an art packet the program needs to know that it's going to be this binary data that's going to be put in that either type field so depending on the protocol that the programmer is going to be using he needs to know exactly what goes into that ether type field if there's VLAN tagging he's going to put in the value hexadecimal eight one zero zero or if we're using IP version 6 he's going to put in hexadecimal 86 dd by putting accurate information into these fields at the source when it's received by the destination and read it knows exactly what was sent to it you've heard me use the word fields and flags fields are usually a series of bits like the ether type field that indicate specific information flags are very useful because they're usually a one bit portion of the frame that if there are Y it means one condition if it's a zero it means another condition we typically use a word flag when we're talking about those we have already looked at a field the ethertype field it's a 2-byte field that gives us very specific information to help us understand what's in the data field flags are like fields and that they convey important information at the data link layer they're usually one bit so look at the very top and you'll see the destination address it's six octets as you come down you'll notice I have an IG bit and a ul bit in the destination MAC address that's reserved that's a flag it's a one bit condition if the IG is a zero it means that the destination address is an individual address if the IG flag is a one it means it's a group address maybe a broadcast or a multicast over in the source you see I have the same two very important flags an IG flag and a ul flag those are two very important bits of information that are considered Flags not fields frame synchronization is another important service of layer two on my slide the source let's say it's a PC in the destination is a server and they're connected by a one gigabit ethernet connection but the the source PC is running on a certain clock signal and the server's running on different clock they have to somehow the destination has to read that frame and sync up in time with the way it was transmitted that is called frame synchronization this magic is done by seven octet of what's known as a feel called preamble and it's a series of 1 zeros 1 zeros 1 zeros 7 bytes long that gives the destination post a chance to synchronize in time with the transmitted frame the start frame delimiter ends in 1 1 you'll see it right there it's an 8 bit field and it ends in 1 1 and when the destination host reads that one 1 it knows the next bit of information will be the destination MAC address and it can start reading the frame frame synchronization is different depending on the protocol 802 11 B has a preamble of 16 bytes and 2 bytes for the sfd and the total time that it gives it to sync is a hundred and ninety two microseconds this gets really tricky as we transmitted faster wireless frames for example 802 dot 11ac has a preamble and it forces the frame synchronization to happen 40 microseconds this is an actual photo of a spectrum analyzer as it looks at an 802 11 n preamble you can see the synchronization pulses 1 0 1 0 1 0 as it transmits that in RF frequency [Music] [Music] [Music] [Music] let's continue looking at layer two services remember every protocol on layer 2 does not have all of these services another layer 2 service is detection and recovery of transfer errors we also have the ability to do flow control and that's avoiding the overloading of the destination host then we have buffer management whenever software programmers talk about buffers think of memory and then the last is media control carrier sense media access detection collision detection that's in 10100 Ethernet which I hope you don't have or carrier sense media access collision avoidance which is used in 802 11 standards there are three variants to layer 2 error detection number ones and parity so the frame is self-healing to send a checksum so if it's bad it can be detected but no help is given on fixing the problem 3 send a checksum and if bad request every transmission forward error correction or FEC is when the source of digital data adds extra information known as parity to the data stream when the receiver detects it can correct the error in real-time as the data is being received FEC reduces the number of transmission errors you may not be aware of it but CDs DVDs and blu-ray discs including flash memory all use FEC there are a couple techniques that are embedded into forward error correction FEC one is the technique that we've already mentioned parody you can also use ECC which most of have seen that in our memory for servers double parity is also used hamming codes reed-solomon is another algorithm and then low-density parity-check that's used by 10-gig when it's transmitted over twisted pair optical fiber transmission often uses FEC or you can see that the transmitter adds parity to the transmitted data then the receiver can fix the error if there is on the fly at layer 2 sometimes we can detect the error but we can offer no help on fixing the problem this brings us to frame check sequence this is a field that's added to the end of the frame it there's a checksum value usually a polynomial that's added and it allows you to determine whether the frame has been corrupted or not it's not perfect it's used by Ethernet point-to-point protocol frame relay x.25 and hdl-c frame check sequence depends on higher layers like layer for UCP to fix the problem the adapter calculates the incoming frame checksum compares it with a value in the frame check sequence if they don't match the frame is simply discarded layer 2 is done it's not going to fix the problem some layer 2 techniques in error detection not only detect an error but they request a retransmission homeplug is a popular way of transmitting network over power lines and it uses a protocol that uses this technique automatic repeat request a arc you look at the figure on the right you'll see host a mosby AR q when we send data from host a to B you see that in the red line you'll notice that B will send an acknowledgment to a letting it know it received the frame ok then one B sends data to a annual then send an acknowledgement to B this is known as a AR AR q the ITU G dot H and standard networking over power lines phone lines and coax cable can send data up to 2 gigabits per second but it uses this technology now if either host A or B received a corrupted frame they would not send an ACK they would send a negative acknowledgment or a knack once that was received a retransmission would occur flow control at layer 2 is another important service that is used by some protocols at layer 2 and this is to prevent the destination from being overwhelmed with the in some protocols a fast source and a slow destination can swamp a destination so there's a couple approaches to give flow control at layer 2 one method is feedback based flow control where the receiver sends information back to the sender giving it permission to send more data this is used in 802 11 LTE cellular DOCSIS and 5g one of the solutions elegant solutions for solving this flow control problem especially on links that tend to be more noisy or have greater interference like Wireless is put a sequence number into each frame the destination host will always know the sequence sequence number that is next this protects against frame loss and protection against an acknowledgment loss cyndy network across a satellite transmission requires a different type of flow control called sliding windows when you have a long round-trip time typical satellite can have up to 500 milli second round-trip propagation time so we want to send a lot of data and then an acknowledgment there are three popular sliding window technologies go back in selective repeat and selective reject and what it allows the satellite transmission to do send lots of data and occasionally send an acknowledgement rate base flow control is the most popular layer two type of control where the protocol limits the rate of data a cinder may transmit without any feedback from the receiver so for example let's say my laptop network card is a gig and I'm plugging it into a 10 gig port on a switch we know there would be autonegotiation pulses as you see in the graphic and they will negotiate a speed that is agreeable to both the network card and the switchboard which will be at 1 gig the rate of data is set so no one can be overwhelmed inside many data link layer frames are critical fields that provide buffer management and remember whenever we use the word buffer think of memory management and this is very critical for more complexed host like pcs servers Chromebooks iPads Android where you have multiple protocol stacks let's take a look this is the architecture of Windows and you can see I've got my hardware drivers here I've got my kernel I've got my services this this line right here would be kernel mode everything above it would be user mode and you see my apps up here typically a tcp/ip stack would be probably somewhere in the kernel let's say right here is my tcp/ip stack your data link layer is going to be straddling somewhere in the kernel and somewhere in hardware drivers so let's say this is layer 2 and I'm not the greatest artist but you can see this is kind of where it would be in a typical more complexed operating system so I've got my layer 2 drawn in my in my kernel area between hardware drivers and kernel cuz that's about where layer 2 is so let's say I have a software module here written by Microsoft and it handles ARP and so this software is designed to handle all ARP packets that come in and then I have a chunk of software and it's responsible for IP version 4 and then I have another set of module software and I'm going to handle IP version 6 layer 2 has to know what what pointer what area of memory to send the payload which could be IP 4 or an ARP packet or IP version 6 that that it has to know where to send that payload of data in the frame to the right portion of memory because each of these are going to have different memory areas that's what buffer management is about we've looked at different the field called ethertype it's a two byte field and we've looked at it but we really haven't looked at what it does we know that if the value in the ethertype field is below 1536 it describes the length of the payload if the value is 1536 and above it indicates the type of protocol well that is a memory pointer that will allow layer 2 to communicate to layer 3 and say look we've got an art packet in here it needs to go to this location in memory that will allow layer 3 to put that module in the right memory location this is called buffer management so weather layer 2 is handling an art packet or an IP version 6 or a audio/video trash put transport protocol it's got to know how to where in memory this needs to go there's software to execute it and there's a rewrite space that it can put it in that's what the ether type field is for it's a buffer management or a memory pointer here is my pcs Ethernet network card and you can see that I've got a number of protocols loaded this is a multi protocol stack I've got Internet Protocol version 4 I've got the Microsoft network adapter multiplexer protocol I've got the Microsoft lldp protocol driver when that layer 2 brings that data to to the network layer it's got a point to memory so that it goes to the right software it goes to the right rewrite area in memory media control is another important service of layer 2 media control layer 2 is important we see at CSMA /c D or carrier sense multiple access with collision detection that's the old Ethernet 10100 hopefully you don't have that with notice we don't use that at all once we get into gigabit and above then we have carrier sense multiple access carrier collision avoidance which is used in wireless ZigBee and for some of you the old appletalk protocol then with the home plug we have the CSM a harp or what they call collision avoidance and width and resolution using priorities that is used with the home plug technology network over power and then we have LTE and 5g also use media access control so this is important at layer 2 some of our layer 2 protocols require reliability reliability is where the destination notifies the source whether or not the delivery of data was successful 802 dot 11 the wireless protocol is a reliable layer 2 protocol it does that the milspec standard 15:53 B is a well-known example of reliable protocols used in the avionics data buses ATM satellite transmission and ZigBee all use reliability at layer 2 reliability always costs bandwidth if you look at the frame below this is a wireless 4 and you'll see the data the green data slot and then at the very end on the right hand side you'll see orange overhead marker and that shows you where the acknowledgment packet has to be sent back to the wireless transmitter receiver this cost you bandwidth but in the case of many of these protocols they need that reliability you cannot study layer two without being introduced to the concept of sub layers in a protocol basically this is all about helping programmers we've all seen the diagrams of layer two divided in half into these sub layers the upper layer which is 802 dot 2 is a logical link control it has detection recovery of transfer errors those services we've talked about flow control and buffer management and then at the lower level the Mac where we have frame synchronization addressing and then media control this was done primarily to help programmers who write the software at this level to abstract one layer from the other it was just an aid to help them do their job if you study this diagram you'll see that it focuses primarily at the datalink layer you can see the complexity there this is a 10 gig connection that supports a variety of different types of media and you can see the problem that a programmer would have if he didn't have some kind of abstraction from one layer to the other the data link layer is complexed 3 sub layers come on mr. V isn't 2 enough actually know as you get into things like LTE cellular you'll see that we have actually three layers at layer 2 protocol so we've got packet discovery convergence protocol the radio link control and the media access control you can just look at this diagram and see the complexity facing LTE engineers here's a quick look at the architecture of Windows and you can see about where the data link layer is you can see 802 dot 3 when 1394 which is firewire which is a network protocol loopback IP tunnels and you can see about where it's at how do we understand layer 2 with a PC generally the network the physical network art is considered layer one the network heart driver is considered layer two now that's not a hard fast rule most people consider that a good dividing line I wonder mr. Vander pol can you impact layer two on your PC can you actually do anything in there well of course you can you go to your network hard driver and go to advanced you'll see this list of things many of those items are actually layer two functionality that you can tweak or turn on turn off so yes you can now this slide shows you a toe 2.3 wired and you can see again I'm going to my network card adapter looking at the software properties and again you can see under the Advanced tab a variety of things that you can do at layer 2 if we're talking about IOT you can see this diagram showing layer 2 going into ZigBee Bluetooth 4.0 NFC Wi-Fi and then of course wire cellular [Music]
Info
Channel: TechsavvyProductions
Views: 4,835
Rating: undefined out of 5
Keywords: OSI Layer 2, error detection, flow control, networking, buffer management, media control, csma/cd, csma/ca, checksum, retransmission, Forward Error Correction, frame check sequence
Id: cVJrjwOtAOY
Channel Id: undefined
Length: 29min 51sec (1791 seconds)
Published: Thu Jan 23 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.