[Music] well welcome to the link layer we're now down at the lowest layer of the protocol stack that we're going to cover in this class and we're going to see a number of topics that we've encountered already such as reliable data transfer and flow control of course now between directly connected nodes but we've studied these topics before so we've got a good feeling for them and we won't need to cover them in depth here but we're also going to cover a lot of new and interesting topics such as the multiple access problem local area networks
addressing now with the link layer and data center networks of course we're going to cover the instantiation the principles that we learn in practice protocols such as ethernet that we've heard about the address resolution protocol arp and multi-protocol label switching mpls so there's a lot for us to cover i think you're going to find it interesting so let's get going well let's start off our study of the link layer by laying out our goals of course as always we're going to want to look at both principles and practice so let's start with principles well we've
already studied error detection we looked at the internet checksum earlier in the transport layer in the link layer we're going to study much more powerful error detection and correction techniques as well the heart of the principles that we're going to take a look at coming up next is the multiple access problem how do multiple nodes share a common communication channel this to me is another top 10 problem in networking and i think you're going to find that really interesting and of course we want to look at the issue of addressing now in the context of
the link layer in terms of practice we're going to look at some link layer protocols including ethernet virtual local area networks multi-protocol label switching and then finally data center networking as well so that's what we're going to be covering roughly in that order so let's get started well let's start off by defining some link layer terminology depicted over here in the diagram on the right well of course we see the hosts and the routers that we've seen throughout this course and we'll refer to them simply as nodes here in the context of the link layer
the role of the link layers to serve as a communication channel directly connecting to physically adjacent nodes and we'll want to parse that statement quite carefully and discuss what we mean by directly connecting and physically adjacent two nodes might be directly connected by a physical wire or by a wireless link with one host on each end that's simple or by a local area network the critical thing to remember here is that the link layer connects two nodes without any intervening layer three that's to say network layer router well maybe you just got a flashback when
i said no intervening layer 3 router you may recall when we were studying subnets network layer addressing and interfaces back in section 4.3 let's flash back to this slide here from section 4.3 we ask then how are interfaces connected well we're going top down we're in chapter 4 the network layer and we said well we'll learn about that later in chapter six well here we are in chapter six and now we can be more precise now we can say that interfaces as shown here the diagram are connected by the link layer and that link layer
can be a physically connected wire or wireless link but it can also be a link layer with interconnected link layer switches which we'll refer to as a local area network or a lan or the link layer can consist of wireless access points and nodes as we'll see in chapter 7. but the key thing here is that there are no layer 3 that is network layer routers between two nodes that are connected at the link layer the link layer consists of links and switching possibly that will switch layer 2 frames but a link layer has no
layer 3 routers well let's return now to our link layer vocabulary where the last important definition is that of a frame which is the layer 2 packet or protocol data unit for the link layer frame will typically encapsulate an ip datagram as its payload in an internet setting well we can summarize by saying that the link layer has the responsibility of transferring a datagram from one node to a physically adjacent node over a link and we should realize that pretty much every word in that statement is important now let's put the link layer into the
larger end-to-end context if we're to follow an ip datagram from its initial source to its final destination we could see that along the way it could be transferred by different link protocols over different links on its source to destination journey for example wi-fi on the first link ethernet on the second link and so on and different link layer technologies provide different services and have different characteristics how noisy is the link does the link provide link layer error control or error detection and correction if we take a traveler analogy and say consider a trip from princeton
to lausanne and switzerland we're going to take a car to get from princeton to the jfk airport take a plane from the jfk airport to geneva and then take a train from geneva to lausanne in this analogy the tourist would be the datagram who travels from source to destination an individual segment on the end-to-end trip the transport segment would be a communication link each with different services hopefully with reliable transfer and the transportation mode is the link layer protocol here let's next talk about the services that are to be implemented by the link layer like
any layer the link layer implements an encapsulation services the case of the link layer link layer is going to take a network layer datagram at its own fields in a header wrapped around the network layer datagram as payload then pass the link layer frame as we'll call it down to the physical layer for bit level transmission across the physical media we're going to encounter a new service at the link layer that we've not seen before media access when multiple nodes need to share the same communication channel their access to that channel needs to be regulated
it needs to be coordinated of course there's a protocol for that those protocols are known as multiple access protocols also media access protocols or macs so mac protocols not like mac computers and lastly we'll see that at the link layer there's going to need to be a new addressing scheme as well sort of the bane of our existence as networking students we'll see that the link layer many link layers implement a 48-bit mac layer addressing scheme which is distinct from the 32-bit or 128-bit ip addressing scheme that we've studied earlier mac addresses will only be
used in the context of an individual link they won't be used network wide as in the case of the ip addresses that we've studied another service that can be provided by the link layer is reliable delivery of frames between adjacent nodes from a principal standpoint we already know how to do this acts knacks error detection bits timeout and retransmit these are precisely the mechanisms that are used at the link layer now these techniques are seldom used on low bit error links but they are used in wireless links in a number of cases because wireless links
are subject to noise and interference and have high bid error rates and you might ask yourself well gee some links provide error control others don't provide error control we do have error control end to end why is it that we've got this sort of mix of local as well as end to end error control some of the other link layer services that are offered by link layer protocols include flow control which we've learned is about speed matching between the sending and receiving sides of a link here making sure that the link layer sender doesn't overflow
the link layer buffers on the receiving side there's error detection where more powerful error detection and correction codes more powerful than the internet checksum are used to detect and in some cases correct bit level errors in a frame we're going to study error detection and correction techniques in the following section if errors are detected some link layer protocols like bluetooth and 4g lte cellular links use an acknack re-transmission protocol like we studied in chapter 3 to recover from frame loss and lastly we should note that some links allow for data to be transferred simultaneously in
both directions these are called full duplex links while for other links data cannot be transmitted and received at the same time these are called half duplex links so each networked host has a link layer the implementation of a host link layer is particularly interesting because it's here where we're going to see the split between hardware and software part of the link layer is implemented in hardware on chip or in a network interface card which attaches to the host system bus the upper layer parts of the link layer demultiplexing up handling interrupts for example are handled
in software in the host's operating system so as we see in the figure here the link layers is where we see the split between network functionality implemented primarily in hardware and the rest implemented in software the lower parts of the link layer and the physical layer are implemented in hardware the upper parts of the link layer and the higher layers of the protocol stack are implemented in software typically and lastly here we can follow the data on the sending side the interface is going to encapsulate the ip datagram in a link layer frame adding error
detection correction bits link layers sending and receiving addressing information perhaps fields for sequence numbers and acknowledgments flow control and more all of these are the fields that will allow the link layer to implement its service it then passes the frame to the physical layer for bit level transmission on the receiving side the link layer receives the frame from the physical layer performs error checking flow control and other services then finally removes the payload typically an ip datagram and passes the datagram up to the network layer well that wraps up our introduction to the link layer
we've seen that there's some ground we've already covered flow control reliable data transfer addressing bit level error detection with some new takes on these topics but we've also seen that there are a number of new interesting principles and protocols that we'll want to take a look at so let's get started you