
The combination of the IP addresses and subnet mask allows the device at 192.168.1.101 to figure out if the other device is on the same network (like the device at 192.168.1.103), or on a completely different network somewhere else online. Now if your device with the internal IP address 192.168.1.101 wants to communicate with another device, it'll use the IP address of the other device and the subnet mask. Then every device connected to that router has its own private or internal IP address: Source: What Is My IP Address? This public or external IP address is usually handled automatically, and is assigned by your internet service provider (ISP). Without subnetting, every internet connected device would need its own unique IP address.īut since you have a wireless router, you just need one IP address for your router. So generally, subnetting does two things: it gives us a way to break up networks into subnets, and allows devices to determine whether another device/IP address is on the same local network or not.Ī good way to think about subnetting is to picture your wireless network at home. Generally, an IP address is made up of network bits and host bits: Source: What is IPv4 This process, called subnetting, uses the host section of the IP address to break it down into those smaller networks or subnets. After all, there are almost 4.2 billion possible IPv4 addresses available.īut if you think about how much the internet has grown, and how many more devices are connected these days, it might not surprise you to hear that there's already a shortage of IPv4 addresses.īecause the shortage was recognized years ago, developers came up with a way to split up an IP address into smaller networks called subnets. If you look at the table above, it can seem like the number of IP addresses is practically unlimited.

So to convert the first block, 168, into binary, just start from the beginning of the chart and place a 1 or 0 in that cell until you get a sum of 168.ġ28 + 32 + 8 = 168, which in binary is 10101000. Remember that in binary, 1 is the equivalent to "on" and 0 is "off". All you need to do is break the address into four blocks ( 168, 210, 225, and 206), and convert each into binary using the chart above. Now lets say you want to convert the IP address 168.210.225.206. The chart above represents one 8 bit octive. To convert an IP address between its decimal and binary forms, you can use this chart: 128 And since there are four blocks of 8 bits, every IPv4 address is 32 bits.įor example, here's what the IP address 172.16.254.1 looks like in binary: Source: IPv4 Because the blocks are groups of 8 bits, each block is known as an octet. IPv4 addresses like 192.168.0.1 are really just decimal representations of four binary blocks.Įach block is 8 bits, and represents numbers from 0-255. If you'd like to learn more about IPv6, check out the article on computer networks above. If you are new to network engineering, you can get a better idea of how computer networks work here.įinally, this cheat sheet and the rest of the article is focused on IPv4 addresses, not the newer IPv6 protocol. Note that the wildcard is just the inverse of the subnet mask.

* /31 is a special case detailed in RFC 3021 where networks with this type of subnet mask can assign two IP addresses as a point-to-point link.Īnd here's a table of the decimal to binary conversions for subnet mask and wildcard octets: Here are the charts, followed by some explanations of what they mean.

Just scroll or use Ctrl/Cmd + f to find the value you're looking for. To make your life easier, the freeCodeCamp community has made this simple cheat sheet.

As a developer or network engineer, you may need to occasionally look up subnet mask values and figure out what they mean.
