Layer 3 of the OSI model handles end-to-end packet delivery using IP addressing, routing tables, and next-hop decisions to move data across networks. This coverage establishes the foundational concepts needed before diving into wide area networks and static routing.
Layer 3 Refresher
This is a layer 3 refresher. The rest of the module gets into wide area networks, routing, and how to do some static routing, so a quick refresher about layer 3 gives us a good basis going into this module.
Within the OSI model, layer 3 is in charge of getting the data from point A to point B, routing the data, forwarding the data to its final destination. It's built for speed.
This is the OSI model, and up until this point the data is getting changed and ready for that transport. In the first few layers here we're just making some changes to this data for this transport and getting it ready to be viewed on the application on the other side that's sending it, essentially from application to application, so it's getting this data ready.
What happens at layer four is we start chopping it up into smaller sections so it can be efficiently transferred from point A to point B, and it's got to know how to reassemble that when it gets to the other side, so we add some data about reassembling. There's some other pretty key characteristics of this transport layer. We call this the segment.
This segment gets handed down to layer three, and now layer three is in charge of how it is going to get from point A to point B, and it uses IP addresses for that. IP addresses are a hierarchical address, so that way it can route this packet from point A to point B. It adds this information at the beginning, and this essentially then creates the packet. That's going to remain the same between point A and point B. There's not going to be a lot that's going to change along the way. There are a couple of things that do change, like the time to live, and perhaps it goes across some different networks that do make little alterations to this, but for the most part it stays intact during the whole distance that it's transferring from point A to point B.
Then it gets passed down to the data link layer. The data link layer is just so it can get transported on the local area network, on the local network, and because it's just local, this information on the data link layer and the physical layer gets rebuilt over and over again as it traverses across all of these different networks.
Just remember that the network layer resides right here, right on this layer three. We call it the network layer. It consists of some protocols such as IPv4, IPv6 and ICMP - think ping when you think ICMP, that's one of the components of it.
Some characteristics of layer three: first of all, it's connectionless. That means there's no connections that are established, there's no setup, there's no handshake, there's nothing that is going to be built between these two connections. That happens at a higher level; it doesn't happen at this layer, layer three. It's really built for efficiency - it just wants to get it to its final destination in an efficient manner. So it doesn't do anything like, if it drops a packet, it doesn't really send back a notification saying I'm dropping this packet. It doesn't really send a lot of information back so that things can get retransmitted. Once again, that's reliant on other layers in here. So it is what's considered best effort: I'm going to give this a try, but if it fails then I'm not going to really reattempt anything.
It is also media independent, so that layer 1 and layer 2 can change along the way. This right here is an Ethernet LAN. This could be maybe a T1, this could be a serial, some sort of serial connection, along the way here along its path. It could run across different types of networks to get it to its final destination. So layer 1 and layer 2 can be changing along the way, but once again, the layer 3, for the most part the packet, is going to largely remain untouched to get from one point to the other.
Now, how does it get from one point to another? In some of the older systems, like our telephone systems, we would actually make a physical connection from point A to point B, so when you were calling up on the phone it would actually make some sort of connection between one system and another, to get from this point to this point, a line of communication flowing across it. That is circuit switch - that's what we call circuit switch, where there are actual circuits that are being connected from one point to another.
A lot of our communication nowadays, when it comes to data, really happens with this packet switching. The idea behind packet switching is that we chop this data up into smaller pieces of information, and then those pieces of information get sent across from, let's say it's this computer, to this server right here. Each of these routers will make a decision on its own on which path it's going to take, and each of those packets could be sent a different route every time. So maybe there's a connection across here too, and maybe there's three packets that go from this machine right here to this server right here, and it could take three different routes to get over to there.
So this is packet switching: every packet that comes across here is sent in a different direction, and therefore it could actually be received at a different time as well. There are quite a bit of nuances in how this happens, and there are also some pros and cons from circuit switching to this packet switching. This packet switching really does open up a lot of possibilities in how we transfer data and make these different connections.
Since we are trying to get it from one location to another, we have to use things like IP addresses. This is the IP header, so this is what gets added to the front end of the data so that way we can get this data going across from point A to point B.
Some of the information that we find in here is like the source IP address, where it's coming from, and the destination IP address, where it's heading to. We have things like the time to live, so that way if for some reason one router thinks it should go this way, and it gets over there and the other router thinks it should go this way, and it just creates this loop - rather than bring that loop down, we have a time to live that counts down to terminate that packet and not continue to loop that packet. We've got some other pieces of information in here as well. I just wanted to call out this IP header as a former reference of what goes at the front end of the data.
So how does this happen? We have routers that reroute this information. Each one of these are the routers that is going to route this information, and these routers use routes to figure out where it's going to go. It stores these routes in a routing table, so this is a routing table that will have a series of routes within it.
When a packet comes into this router, it will take a look at what is the destination network of where it's trying to go to, and then look it up on the routing table to see what is the best next hop, where is the next best location for it to route to to get it there. Then this router does a similar process, to look at its routing table, to look up the route and then send it to the next best location. Then this router says, this is directly connected, so I'm going to send it to this machine right here. So that is routers, routes and routing tables.
We have this idea of next hop, and that is what is the next best location. So if this router determines that to get to this server right here the next best hop would be this router right here, that's the next hop, the next location where it's going to be sent. Each of these routers may just make a simple determination of what is the next best hop.
When it's looking in the routing table, it's looking for what is the best route, and it does this by longest match. What is the best match, what is the longest match in the routing table? Because there could actually be multiple entries within the routing table that meet the needs of whatever is the next hop for this packet that's going across there. So it's going to look for the longest match in here.
Of course, somehow we need to populate this routing table right here. One of the jobs of a router is to do route learning, to discover new routes, and there are a few different ways that it can do this.
So we could set up all of these routers to be able to communicate back and forth to one another. They will then transfer data that will populate these routing tables, and so that information gets passed around, so that way each one of these routers becomes aware of each one of the different networks along this path, on all of these different networks. We call this the dynamic routing protocols. Dynamic routing protocols allow that communication between these different devices so that each of these devices learns of all the different routes.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →