Skip to main content
Loading Explore guides…
Networking Fundamentals · Acedra
Home
Explore
Computer Science
Networking Fundamentals
Sign in to save
Chat
If YouTube asks you to sign in, open the video on YouTube.
Watch on YouTube
Reload player
Transcript
47 segments
Copy
Hide video
0:00
What you're about to watch is a full module from the Unifi Network Masterclass. This is my paid training course with Crosstalk's network expert, David Barger, where we walk you through designing, deploying, and configuring Unifi Network from start to finish. It's nearly four hours of content across 13 separate modules. And so far the response has been awesome. We've already received many four and five star reviews from our students. This particular module covers network fundamentals.
0:31
We're talking about the OSI model, the difference between LAN and WAN, layer two and layer three switching, Mac addresses, subnetting, CIDR notation, all of the foundational stuff that you need to understand before you start building out a Unifi Network. So please enjoy this free preview. And if you want to check out the full course, head on over to masterclass.crosstalksolutions.com. All right. Without further ado, please enjoy our Unifi Network Masterclass Networking Fundamentals.
1:08
We're going to begin with some networking fundamentals. And of course, this is key to understanding how all of this networking stuff fits together because at its core, networking is just devices talking to each other, right? Whether that's your smartphone or a PC or a piece of networking gear, or, uh, you know, something that's connected to wifi, something that's connecting to the internet, something that's connecting locally on your local area network.
1:35
So really that's the best place to start, I think is understanding the difference between LAN and WAN. So what LAN being local area network stuff, that's kind of behind your firewall stuff that you have control over as a network administrator. And then bypassing through your firewall, we have the WAN that's everything on the outside, right? Like your ISP and then heading out into the wider internet. Now, most of the stuff that we are going to be covering here in this
2:06
course is going to deal with what's known as layer two and layer three. And of course, layer two and layer three are parts of the OSI network model. Let me bring this up here.
2:21
And the OSI network model consists of seven layers. So I will toss it to Dave here. He's going to talk you through these layers and then we're going to hone in on layer two and layer three. Absolutely. We're going to start with the easiest part of the OSI model, the bottom ring here. It's the physical layer. You could think of this as wires, RJ45 ends, anything that you physically can touch to make your network or really any computer system work right above that. We actually hit the first layer.
2:52
We are really concerned about layer two, the data link layer. This is where most of the switching information happens on a network. We're going to dive into this a little bit later, but understand this is where like Mac addresses live. Right above that is another layer that we're really concerned with. The layer three things like IP addresses live here. Your router is using this layer with IP addresses to really translate information between your local area network and your wide area network.
3:20
Through your ISP. Again, we're going to come back to that in just a moment, but we'll continue going up here. Four is the transport layer. You've probably heard about TCP and UDP, these different protocols that make all of this communication happen.
3:35
Above that is layer five sessions. Whenever information transfers through the router somewhere else, the router actually has to keep track of all this information and what's called a session or a state table. Above that is the presentation layer. This is actually what we see on the screens whenever we load up something like a YouTube video. That's what we see and interact with. And just above that is layer seven or applications, things like Facebook,
4:01
messenger, signal, all of these pieces live here and as a network admin, this is something we're concerned about too, because our routers and devices are getting smart enough to detect application signatures now with all of that. Like I said, we're really going to hone in on the two main components, layer two and layer three. So now we'll actually talk about layer two and Mac addresses. Yeah. And if you think about the way that I like to think about layer two and layer
4:27
three is layer two is your switching layer, right? So that's where your switches live, but you might get confused by that. Cause say, wait a minute, I've heard of layer three switches. So what's the difference between a layer two switch and a layer three switch. Well, a layer three switch is still a switch, except it has some level of routing capabilities built in. So for example, if you need to go from one VLAN to another, that can
4:55
happen inside the switch itself without those packets, having to go all the way back to the firewall for the firewall to say, Hey, no, you need to go over here. Yeah. And a little bit more about that. A switch is very efficient at handling traffic, actually much more efficient than a router. It has something called an ASIC on board, which allows it to really efficiently submit traffic over a hundred gigs per second. All right. So we're going to start though with layer two.
5:20
Oh, by the way, if, if you guys are looking for some mnemonics to help you remember these various layers of the OSI network model, we've got a couple here. My favorite one is please do not throw sausage pizza away. And as we can see, I don't know why our little AI image pulled up Danny DeVito here, but I don't know, there he is. And another one that you could potentially use to remember the layers of the OSI model, please do not touch Steve's pet alligator, although we don't know who
5:49
Steve is, do we? And I don't know his alligator either. Okay. All right. So moving on. Layer two, uh, has to do with Mac addressing. And if you guys, I'm sure you've seen Mac addresses. They are a part of every single piece of network gear that you've ever worked with. Every ethernet port has its own Mac address. Every smartphone that's connecting to wifi does that by, uh, with a Mac address. And it's a way that at a layer two level, the network understands which
6:23
device is talking to the network. A lot of the times we think of this as like a burned in identifier for a lot of pieces of network gear. You can change these if you're rather tech savvy, but let's say for example, your laptop, whenever you open it up from the factory, it has a Mac address set to it. This is the same for everything. Whenever we look at a Mac address, we generally break it down into two sections, kind of right down the middle.
6:47
The first piece is the OUI or the organizationally unique identifier. Every manufacturer has one of these. They apply to some authority that gives them this. And actually if you're inside of Unify or really any other type of router and management system, you've probably seen the device list and it shows like, Oh, this is a ubiquity device. This is Apple. This is Google. This is where it gets that information. You can easily look this all up online.
7:11
Now the second half of this is actually specific to the device you have the network interface controller specific piece of this Mac address. Yeah. So if you have an Apple iPhone, the first, uh, the OUI, the first half of that Mac address is going to be similar with other iPhones. They're not always exactly the same, but it'll be similar with a number of other iPhones. Whereas the back half of the Mac address is always going to be unique to your specific device.
7:39
And then of course, to throw a wrench in the works, some things like iPhones actually generate a random Mac address when they connect out to wireless and stuff like that, which sometimes can wreak havoc on the network. Yeah exactly. If you're the network administrator and you're trying to make rules based on a Mac address and some device that you're trying to track, you know, for some reason or another keeps changing it, you're going to have a problem.
8:01
And the only way around that is like some organizational level, like a, an MDM controller that turns that off. But yeah, you're right. That can be a little bit of a pain. All right. So next we move into frames. Yeah. This component of it is the piece that makes switching so efficient. You could think of this as like an onion that you're peeling the layers back on. We'll actually start maybe in the middle of this. We have a piece of data that we want to send over the network, maybe a single
8:28
frame from a video stream of some type that is called the data piece of this. And right outside of this, it's encapsulated in a segment. The network device itself actually puts some things in there like the TCP protocol port number. And there are some other things that can go inside here depending on the application you use, but all of that then is contained inside of a packet. We hear this all the time on the networking side of things, you know, the
8:52
packet is really the IP address, the piece that the router or the layer three switches looking at, uh, to make decisions on where this piece of information goes. To add to that around that whole packet is the frame. This is what the switch primarily concerns itself with. It's very simple. There's only a few pieces of information in here, such as the sender and receiver Mac address, as well as some things like VLAN IDs. Yeah.
9:19
And correct me if I'm wrong, but current switches can have a database or a table of like tons and tons and tons and tons of different Mac addresses. But in the olden days, you know, if you had like a off the shelf D-link router from Best Buy or something, sometimes you'd hit an upper limit of the number of Mac addresses and you'd have to like reboot that router to kind of clear it out. Exactly. Okay. So now let's start moving up the stack a little bit with some layer three stuff,
9:47
which would be IP addressing. So you guys are probably familiar with the layout of an IP address. It's essentially four octets. Each one of those octets, each one of those octets can have a value of zero up to 255 and you can actually convert these to binary. This makes more sense to us to see this in numerical format, but computers like to see this in binary format. So while it's helpful to know how to convert this stuff to binary, well, it's not really even helpful, honestly.
10:24
It's something that I had to do one time for like four hours in a networking class. And it's the only time I've ever done it in my entire 20 plus year career as a network administrator. So just understand that these octets can convert to binary. That's how the computer sees it. Yeah. And if you ever do need to convert this to binary for some reason or another, there are plenty of cheat sheets online that you can download and look at reference that for all you need.
10:52
It's really helpful for things like subnets, but for the practical use case of this, you know, download a cheat sheet, maybe use something like davidc.net to help you plan these out if you really need to dive deep into them. All right. And then next we have the subnet. So there's a couple of different ways that we can denote a subnet. One of the ways is like 255.255.0.0, right? And that's basically saying the first two octets in this case are the network
11:21
portion and the back two octets are the host portion, or basically how many available IP addresses are there for your devices versus what is the, how is the
11:33
network itself chopped up? One very common one is 255.255.255.0. When you have a subnet of 255.255.255.0, that is essentially just the last octet
11:51
available for your devices from zero to 255. There is a another format that is more common these days called CIDR format, C I D R and that same notation 255.255.255.0.
12:08
Now instead is just slash 24 and the slash 24 denotes the size of the subnet.
12:16
And again, there's some really great tools out there. In fact, why don't we take a look at the David C tool and we'll walk through some examples of how you can chop up a subnet into smaller pieces. The David C subnet calculator is a great resource to really reference whenever you're trying to size up a new network. I show this to all of our clients who are kind of unfamiliar with how subnetting works. So if you go to the David C.net website,
12:40
we can see right across the top is a basic subnet 192.168.0.0.16.
12:48
That's a rather large subnet, but if we look down below, we can see a few things. So the first thing is the subnet address, actually how you would write this out in CIDR notation. Beside that, you see the range of addresses. This is actually the entirety of this subnet right beside that is the usable IP address ranges because we know there's a few IP addresses set aside that we can't use to sign the devices. Think of, you know, maybe the gateway is one of these,
13:15
but more importantly is the broadcast IP address at the end of the subnet that we can't use. Right beside that is just an example of exactly how many hosts you can have here. 65,534. Now here's what makes David C's subnet calculator kind of a game changer. We can see the slash 16 right here, but we can divide this out. So if you split a slash 16 right down the middle, we get two slash 17. We can even divide this out much smaller, but I want to point something out here.
13:47
The reason that I like that it shows you the usable IP address ranges as we get smaller and smaller in our subnet size, the starting IP address is actually not one for all of your subnets right here. We see 192.168.0.129 is the start for this slash 25.
14:07
Even more importantly, maybe we went too far and splicing this large subnet out and we can put them back together by clicking here, put these two slash 25s back into the slash 24 and it shrunk it back down. Some of the most common subnets that you're going to see, slash 24 is probably the most common. That is your 192.168.0.1 that has a range of about 254 IP addresses. That's the most common cause that's what comes as standard on almost every
14:36
single router that you ever purchase. But some other common ones, if we divide this even more, let's divide it down to slash 29. Now, where might you have seen a slash 29 slash 29 is essentially a block of six hosts. Or when your ISP gives you a slash 29, they're giving you their gateway on their side and five usable when IP addresses. Like when you go to Comcast and you say, Hey, I need a static IP address. They often give you the option.
15:08
Do you want one static IP address or do you want five static IP addresses? And when you get the five, that is a slash 29 subnet. That's why they have that number available to you. David, what is the CIDR notation for a single IP address? That would be slash 32. That'd be slash 32, right? So you could see here, I divided this down all the way to slash 32 and we've got 192.168.0.1 for example, slash 32 with just one host. So definitely a very handy tool.
15:43
We use this all the time and we will have links to all of this stuff down in the description or in the notes for this video. Okay. But this does bring us to our next topic, which is the RFC 1918 private address ranges. And what these are are essentially a subset of IP addresses between all of the IP addresses out there in the world that are reserved for internal local area network use. And these are 10 slash eight or 10.0.0.0 slash eight 172.16 slash 12 and 192.168.6.
16:25
Now, even though it's one 92.168.6, that gives you 65,000 some odd IP addresses. Usually those ranges are broken down to what we see most commonly as 192.168.0 dot one slash 24, which means you have 254 IP addresses to use. But you have all of the various subnets, individual slash 24 subnets in there. 192.168.1.2.3.4 et cetera. And you can pick and choose which ones you want. In fact, when we set up networks, we typically don't go with 192.168.0 or 192.168.1 because those are very,
17:03
very common and sometimes they cause conflicts with, you know, a site to site VPN or for example, if you put a star link on the outside of your firewall, that is a 192.168.1 and then if you have a 192.168.1 on the inside, your firewall doesn't know how to handle that having the same network schema or network subnet on both sides. So it can't really route that we've seen that at road support a couple of times people calling with, I don't know how to, my starlings not working,
17:32
but it's just that they're using the same subnet on the inside as they are on the outside. Anything else to add to RFC 1918? Yeah, they're great addresses to remember as a network admin. That way whenever you're looking at a device, you know immediately whether it's a public IP address or a local IP address and make sure if you're working with a new enterprise router, some of them will actually let you use non RFC 1918 addresses on the land side. That will cause issues. Say for example,
17:58
you use Netflix's public IP range internally. When you go to load up the latest Netflix series, it's not going to work because your router is thinking Netflix lives beneath your router. All right, so finally we wanted to talk about a couple of very common network services. If you've had any experience in networking whatsoever, you've probably already come across these, DHCP and DNS. These are going to be services that you touch on almost every single network
18:28
that you ever configure. So what are they? DHCP is the dynamic host configuration protocol. Essentially what this is is a way to automatically assign IP addresses within a given subnet range to the devices that connect into that network. So for example, if you plug a computer into a network via its ethernet port, it's going to say, Hey, I'm here, I need an IP address. And the service that resolves that and says, Oh, I hear you. Here is an IP address that you can use. That is DHCP.
18:59
And we're going to dig deep into DHCP when we go through our network configuration in unify. And DHCP is also handy for other things, such as handing out information to your clients like an NTP server or TFTP server information. That's a little bit beyond the scope of what we're talking about right now, but that is also part of the DHCP service. The other one we want to talk about is DNS and that is domain name system. And essentially this is a way to convert a friendly name,
19:28
also known as a an FQDN or fully qualified domain name into an IP address.
19:35
And most commonly we see this used on the internet, right? If you want to go to www.google.com it's much easier to remember as humans google.com than it is to remember the IP address of every single website that possibly exists out there. But it's also potentially a big problem if DNS is not working. You've heard the phrase, it's always DNS. A lot of times if something's not working, you can't get to something on the internet. DNS is the culprit. All right,
20:05
so that is enough about the networking fundamentals. Make sure you guys know this stuff back and forth because it's really, really important when it comes to delivering a solid and secure and reliable network. But next we are going to get into some deployment planning.
Here to help you learn
Sign in to keep a private conversation with your course tutor.
Ask me anything about the material…
Sign in to chat