From the course: Deploying and Configuring Core TCP/IP Services
Working with IPv4 addressing and subnet masks - Windows Server Tutorial
From the course: Deploying and Configuring Core TCP/IP Services
Working with IPv4 addressing and subnet masks
- [Instructor] Welcome to deploying and configuring core TCP/IP services. There are a lot of aspects to managing TCP/IP in an enterprise, and the root of this technology is the IP address and subnet mask. Let's start there. An IP address is a 32-bit number that can be written in both base 2 and base 10. Here's an example of an IPv4 address written in base 2. The reason for the ones and zeros is that a computer can only recognize two states, on or off. So it has to have this kind of notation to understand, read, and process data and computer instructions, and yes, even IP addresses. As humans though, we use base 10. We have 10 numbers to work with, zero through nine. Here's that same address written in base 10. To make IP addressing easier to manage, we divide the binary addresses into four groups of eight and convert them to base 10. When we talk a about IP addresses, we talk about them like this. Although you can learn to convert base 2 to base 10 and back manually, it's easier to use a calculator. The windows calculator can do these conversions. Understanding how to view the conversion is crucial to understanding the subnet mask. Do this with me if you can, open Windows calculator and choose Programmer mode. Here's the calculator app, make sure Programmer is selected. And keep your eye on this number right here, BIN stands for binary, and let's type 192. Look at the results here, 192 written in binary is 1100 0000. We could go ahead and do this for the rest of the IP address that we have in our example. By typing 168, here's that in binary. By typing 20, here's 20 in binary. And by typing 2, notice binary here is 0010. If we write it out as 8 bits though, we would write it out as 0000 010. This gives us the entire conversion one octet at a time. Here's one 192.168.20.2 written with all ones and zeros. Let's go back to the calculator and let's look at what happens when I type 255. It shows all ones here in the binary conversion, this means that the highest number that can be in any octet in an IPv4 address is 255. Now let's talk about how we can figure out which part of the IPv4 address defines the host, and which part defines the network. In order to do this, you must know the subnet mask. Let's take a look at the IP address information for my computer. I'll open a command prompt by typing CMD, and I'll type ipconfig and press Enter. I'll scroll up a little bit until I can see the information for the wireless LAN adapter. And here you can see my IP address, and here's the subnet mask. Look at all the 255s there, that's pretty common. If I were to type out this subnet mask, I would have 24 ones followed by 8 zeros, you can look this up on your own computer as well. Looking back at our example, if we assume the same default subnet mask of 255.255.255.0 and if we write it out, we can tell which part of the address is the network ID, and which is the host by looking at the ones and zeros. The ones show the network ID, and the zeros show the host. Here, the network ID is notated by the first three octets, and the host is the last octet. As an aside, there are three classes of IP addresses that we need to be familiar with, and we'll address these in more detail in next video. Each class has its own default subnet mask. Notice the default subnet mask for class A addresses is 255.0.0, and you can see the associated ones here. Class B is 255.255.0.0. And class C is the one we've been working with so far, 3 octets of 255 followed by a 0. If you'd like to learn more about these classes as well as class D and E, you can do a quick search on LinkedIn Learning. For now, though, all we're concerned with is how the subnet mask and IPv4 address are related. IP addresses don't have to use one of these default masks though, with subnetting, and octet doesn't have to be all ones. You could have a subnet mask of say, 255.255.240.0. In this case, the subnet mask would be what you see here. When you change the ones, you change the placement of the network ID and host ID. You'll learn more about this later in this course, but it's important to have a cursory understanding of that now. To sum up, an IPv4 address is 32 bits and is broken up into 4 octets or 8 bits each. A subnet mask is also 32 bits, is broken up into 4 octets, and consists of a group of ones followed by groups of zeros. The ones define the network portion of the address, and the zeros define the host.
Contents
-
-
-
Working with IPv4 addressing and subnet masks5m 52s
-
(Locked)
Knowing classful and classless IPv4 addressing4m 1s
-
(Locked)
Understanding public and private IPv4 addressing3m 33s
-
Assigning IPv4 addresses2m 49s
-
(Locked)
Challenge: Reserve and assign a static IP address to a network node2m 22s
-
(Locked)
Solution: Reserve and assign a static IP address to a network node4m 16s
-
-
-
-
-