[Music] well having covered the application layer and the transport layer which really happened at the edge of the network we're ready now to dive into the network core and to take a look at the network layer itself now this is always one of the most fun and interesting topics to both teach and learn about in networking because the network layer is implemented in each and every internet connected device that's billions and billions of hosts and routers and this makes it among the most interesting and the most challenging to teach really if there's any such thing
as the glue that holds the Internet together it's really the network layer so I think you're going to enjoy learning about things in this chapter now as it turns out we're going to break our study of the network layer into two parts we're going to start with what's called the data plane this corresponds to chapter four in our book the data plane is about the local / router actions primarily forwarding moving a Datagram from an input link to an output link at a router the second part of the network layer that we're going to study
is known as the control plane and the control plane is really about the network wide view the end-to-end view of getting packets from the edge of the network one edge of the network to the other edge of the network the coordination and the management of all of the devices that are in the Internet well here's what we're going to study in our coverage of the data plane we're going to start off by the big picture view of the network layer itself and then we're going to dive down into a router and look at what actually
takes place inside an Internet router well look at the guts of an Internet router well then cover the celebrated Internet Protocol IP well look at the IP Datagram header we'll take a look at IP addressing and quite a bit of detail we'll take a look at network address translation and also a next generation of IP known as IP v6 will then look at the topic of generalized forwarding that's sort of on beyond Datagram forwarding that'll be a bit of a prelude to what we'll cover in the control plane coming up next after this and then
finally we'll wrap up with a discussion of what are known as boxes throughout our discussions here will cover both principles and practices as always so let's get started all right well let's begin our study of the network layer as we have with other layers by taking a services point of view why does the network layer exist what does it do what services does it provide to the transport layer above it and since we're jumping into the network layer having finished the transport layer let's start there at the edge of the network at the sending host
the network layer we'll take a transport layer segment from UDP or TCP and encapsulate the segment into an IP Datagram will study the format of the IP Datagram shortly it'll include some network wide addressing information will cover IP addresses in great detail and then passes the data gram on to the link layer which will be responsible for transmitting the data gram to the next hop at the receiving host the network layer receives data gram checksum information like a checksum extracts the payload and the multiplex is a segment up to the appropriate upper level transport protocol
UDP or TCP well that's what happens at the edge of the network but that's not what's really interesting about the network layer the real action is in the network core and there's a network layer component in each and every device in the network core well indeed in each and every device that's even part of the Internet well as we know routers are the principal network layer devices within the network core and the routers job is pretty simple it receives data grams from our neighboring host or router on an input link and it forwards that data
gram to the appropriate outgoing link well that's a pretty simple statement but think about all the questions it raises there's a local issue how does the router know which is the quote unquote appropriate outgoing link for an arriving data gram and then there's the global issue which is even more interesting how do the collective forwarding actions of routers how are they coordinated to make sure that a Datagram follows a good end end path from source host to destination host through some set of the hundreds of millions of routers that are in the internet well when
we're done with a network layer you'll know the principles and the practices behind the answers to these questions and more so let's get going this distinction between local versus global considerations is a good one for us to keep in mind local means a decision or an action that's made at an individual router where as global means sort of end end or network wide and we see this distinction very clearly in the network layers to key functions the first important function is forwarding forwarding is the router local action of moving packets from over outers input port
to one of its output ports this typically happens at a nanosecond time scale and is implemented in hardware the second key function is that of routing and that's a network-wide activity of determining the route that's taken by packets from sources to destination host routing takes place on a much longer time scale typically seconds and we'll see that it's often implemented in software and a good analogy for this difference between forwarding and routing is the example of taking a trip say by a car you could think of forwarding as the process of getting through a single
interchange say going through a roundabout or an intersection and routing is the process of planning and taking a trip all the way from the source city to the destination city passing through many intersections so as you may have noticed the network layer is really so big and complex that it doesn't really fit into just a single chapter in our textbook as it turns out earlier versions had just a single chapter on the network layer but it was always the largest chapter and with the introduction of Software Defined Networking which we'll take a look at here
and then cover in detail later the network layer really just got too big to fit into one chapter so now our study of the network layer is going to be split across two chapters and two broad topics the first topic is what we'll call the data plane this is going to be a focus on per router per IP device local phone and in the case of the router this is really going to be the issue of how is a packet moved from an input port to the appropriate output port the second piece of the network
layer is going to be the control plane and this is the network wide logic that determines the data grams path from source to destination it's also our network management and device configuration management come into play we'll study two different approaches towards implementing the control plane the first is what we might call the traditional approach and this uses distributed routing algorithms to determine paths the second approach for implementing the control plane the newer approach is what's called software-defined networking we'll learn about these approaches in its tail a bit later but here are a few illustrations to
help you get a general feel for the two different frameworks here's how the traditional per router control plane approach works inside every router is a local forwarding table as shown here a router operates by matching bits in a Datagram header with a table entry in the forwarding table that specifies the appropriate output link to which this data gram should be forwarded so the real question we should be asking ourselves is how do these local forwarding tables get computed well there are a number of ways to do this for example they could be entered by hand
by a network manager into the table at a network router and actually that's how forwarding tables were initially configured way back in the day but with hundreds of millions of routers spread all around the globe now that's not possible and so nowadays of course forwarding tables are computed rather than hand configured and how they're computed is the difference between the traditional routing algorithm approach and the Software Defined Networking approach to the control plane in the traditional routing approach Illustrated here a distributed routing algorithm runs in all of the network routers a piece in every network
router the routing algorithm function in one router communicates with the routing algorithm functions in other routers to compute the values in these forwarding tables the second approach to the network control plane is known as Software Defined Networking or Sdn here a physically separate remote controller software process computes and distributes the forwarding tables to used by each and every router under its control the remote controllers typically implemented in a remote data center or set of servers that have high reliability and redundancy now the router still performs its local data plane service forwarding as before and says
that is received its local forwarding table from the Sdn controller rather than having computed it itself let's wrap up our introduction to the network layer by discussing the service model for data Graham delivery by the network layer from sending host to receiving host what are the properties of this service and you see a bunch of different possible properties listed here for an for instance guaranteed delivery the network layer might guarantee that a packet sent by a source host will eventually arrive at the destination host that is the network layer is responsible for reliable data Graham
delivery rather than say at the transport layer as we've seen there might be guaranteed delivery with bounded delay so that the service not only guarantees delivery of the data Graham but says hey I'm going to deliver this data Graham with a specified host host delay bound for instance less than 40 milliseconds there are ordering considerations while packets be delivered to the transport layer in the order in which they're sent and when we think about flows of packets we might ask whether or not a flow might be guaranteed a minimum amount of bandwidth from source to
destination well with all of these options you might wonder what is the Internet's service model well the Internet's network layer service model is known as best effort service and as you can see from the first line in this table under best effort service transmitted packets are not even guaranteed to be delivered much less to be delivered with bounded and and delay or was some kind of minimum bandwidth guarantee and you might even think of best effort service as a euphemism for no service at all a network that delivered no packets to the destination would satisfy
the definition of best effort service delivery that we see here but this best effort service model is the Internet's network layer service model and it's hard to argue with the success that's been achieved with this minimalist service model and as you can see here in the rest of this table many different network architectures have been proposed and implemented and even deployed a lot of this research happened in the 1990s that provide very sophisticated quality of service classes imagine being able to watch a video and never seeing a spinning wheel say when a video play out
is stalled that was the idea for example behind asynchronous transfer modes ATM constant bit rate service that the end-to-end path would behave essentially like a wire and there were proposed extensions to the Internet's best effort service that would have allowed quality of service guarantees to be made in the context of the Internet these were standardized and RFC's and are actually built and deployed in routers today but in truth they're not really used and you might ask yourself why is that well let's wrap up our introduction to the network layer with a few closing thoughts about
the Internet's the network layer service model best effort service and probably the most important observation to make is that the simplicity of this service model played an incredibly important role in the widespread deployment and adoption of the Internet it's incredibly easy to add a new host to add a new network and relatively simple to maintain and manage an IP network as well this was certainly not true of integrated services digital networks and ATM networks which were competitive competitor network technologies at the time secondly the provisioning of adequate amounts of bandwidth that is that the network
has enough capacity has allowed the performance of today's real-time services for instance voice and video to work well enough works good enough most of the time this didn't used to be the case when you couldn't even purchase for instance transmission capacities for the internet that could carry high quality voice and video now you can and now there's enough capacity in the network so that these applications generally under a best-effort service model run good enough most of the time third and I think this is a bit underappreciated is the fact that there's a tremendous amount of
deployed application level distributed infrastructure in place to provide a service to a customer and that service might be provided from lots of different locations in the internet just think of the example of Netflix that we countered in Chapter two in the amount of application level infrastructure that's provided there to deliver the Netflix services to customers this tremendous rise in the amount of distributed application level infrastructure I think has really been critical to the success of best-effort service and actually one might say that the need for this kind of infrastructure arose because of the given best
effort service model that was in place and then finally for some types of service like email and the web we've seen that TCP congestion control can back off in the face of congestion and that too has played an important role you know to summarize I think that we as engineers sometimes focus a bit too much on the detailed mechanism that we lose sight of the big picture questions such as the service model and yet the more I think about it the more I realized that getting the right service model was one of the most important
decisions made in the original design of the Internet well a big picture of you doesn't get much bigger than that and so next we're going to jump from this high-level big-picture view down into the details of how an individual router works that's coming up next [Music]