Every device connected to a network—computer, tablet, camera, whatever—needs a unique identifier so that other devices know how to reach it. In the world of TCP/IP networking, that identifier is the Internet Protocol (IP) address.
If you’ve worked with computers for any amount of time, you’ve likely been exposed to IP addresses—those numerical sequences that look something like 192.168.0.15. Most of the time, we don’t have to deal with them directly, since our devices and networks take care of that stuff behind the scenes. When we do have to deal with them, we often just follow instructions about what numbers to put where. But, if you’ve ever wanted to dive a little deeper into what those numbers mean, this article is for you.
Why should you care? Well, understanding how IP addresses work is vital if you ever want to troubleshoot why your network isn’t working right, or why a particular device isn’t connecting the way you’d expect it to. And, if you ever need to set up something a little more advanced—like hosting a game server or media server to which friends from the internet can connect—you’ll need to know something about IP addressing. Plus, it’s kind of fascinating.
Note: We’re going to be covering the basics of IP addressing in this article, the kind of stuff that people who use IP addresses, but never really thought much about them, might want to know. We’re not going to be covering some of the more advanced, or professional, level stuff, like IP classes, classless routing, and custom subnetting…but we will point to some sources for further reading as we go along.
What Is an IP Address?
An IP address uniquely identifies a device on a network. You’ve seen these addresses before; they look something like 192.168.1.34.
An IP address is always a set of four numbers like that. Each number can range from 0 to 255. So, the full IP addressing range goes from 0.0.0.0 to 255.255.255.255.
The reason each number can only reach up to 255 is that each of the numbers is really an eight digit binary number (sometimes called an octet). In an octet, the number zero would be 00000000, while the number 255 would be 11111111, the maximum number the octet can reach. That IP address we mentioned before (192.168.1.34) in binary would look like this: 11000000.10101000.00000001.00100010.
Computers work with the binary format, but we humans find it much easier to work with the decimal format. Still, knowing that the addresses are actually binary numbers will help us understand why some things surrounding IP addresses work the way they do.
Don’t worry, though! We’re not going to be throwing a lot of binary or math at you in this article, so just bear with us a bit longer.
The Two Parts of An IP Address
A device’s IP address actually consists of two separate parts:
- Network ID: The network ID is a part of the IP address starting from the left that identifies the specific network on which the device is located. On a typical home network, where a device has the IP address 192.168.1.34, the 192.168.1 part of the address will be the network ID. It’s custom to fill in the missing final part with a zero, so we might say that the network ID of the device is 192.168.1.0.
- Host ID: The host ID is the part of the IP address not taken up by the network ID. It identifies a specific device (in the TCP/IP world, we call devices “hosts”) on that network. Continuing our example of the IP address 192.168.1.34, the host ID would be 34—the host’s unique ID on the 192.168.1.0 network.
On your home network, then, you might see several devices with IP address like 192.168.1.1, 192.168.1.2, 192.168.1 30, and 192.168.1.34. All of these are unique devices (with host IDs 1, 2, 30, and 34 in this case) on the same network (with the network ID 192.168.1.0).
To picture all this a little better, let’s turn to an analogy. It’s pretty similar to how street addresses work within a city. Take an address like 2013 Paradise Street. The street name is like the network ID, and the house number is like the host ID. Within a city, no two streets will be named the same, just like no two network IDs on the same network will be named the same. On a particular street, every house number is unique, just like all host iDs within a particular network ID are unique.
The Subnet Mask
So, how does your device determine which part of the IP address is the network ID and which part the host ID? For that, they use a second number that you’ll always see in association with an IP address. That number is called the subnet mask.
On most simple networks (like the ones in homes or small businesses), you’ll see subnet masks like 255.255.255.0, where all four numbers are either 255 or 0. The position of the changes from 255 to 0 indicate the division between the network and host ID. The 255s “mask out” the network ID from the equation.
Note: The basic subnet masks we’re describing here are known as default subnet masks. Things get more complicated than this on bigger networks. People often use custom subnet masks (where the position of the break between zeros and ones shifts within an octet) to create multiple subnets on the same network. That’s…
I have a crazy passion for #music, #celebrity #news & #fashion! I'm always out and about on Twitter.
Latest posts by Sasha Harriet (see all)
- Dating App Users Are Reportedly Changing Their Locations to Pyeongchang to Match With Olympians - February 17, 2018
- ‘Dragon Ball Super’ Reveals Perfected Ultra Instinct Goku - February 17, 2018
- Science Reveals Hidden Secrets in Picasso Works - February 17, 2018
More from Around the Web