Subnet Basics
Understanding the IP - An IP Address is used to uniquely
identify a computer within a network, whether it's a local LAN, or the
Internet. An IP address is typically represented in dotted decimal format
like this: 192.168.1.200.
Each decimal number is comprised of 8 binary bits giving us an IP address of 32
bits.
Two components of an IP Address - An IP address has two
components:
-
Subnet ID (also known as Network ID)
-
Host ID
The Network ID is similar to a zip code. It says what area the IP address
resides in. We refer to the area as the subnet.
The Host ID is similar to a street address. Within any zip code, all
street addresses must be unique. We can't have two addresses of 12
North Lane within the same zip code. Similarly , all Host IDs within
a Subnet ID must be unique.
Which one is which?
We determine which portion of the IP address is the Subnet ID and which is the
Host ID by using the subnet mask. Whenever an IP Address
is assigned, it is always assigned a subnet mask. For example:
-
IP address 192.168.1.200
-
Subnet Mask 255.255.255.0
Notice that both the IP address and the Subnet mask are represented in dotted
decimal format. When the subnet mask is the maximum (255 in this case),
it masks the portion of the IP address that is the
Subnet ID.
192 has a matching 255 so it is part of the
subnet ID
168 has a matching 255 so it is part of the
subnet ID
1 has a matching 255 so it is part of the
subnet ID
-
The Subnet ID is 192.168.1.0
Note the Subnet ID is represented in dotted decimal format with four
decimals. Zeros are added at the end.
The remaining portion is the Host ID
Troubleshooting
On the job and for the tests (MCDST, MCSA, MCSE, Network+), we often need to
troubleshoot communications. What we often need to know is what subnet or
Network ID a computer is on. And, is it on the same subnet as a computer
we are trying to communicate with.
We can do this by using IPConfig. By entering IPConfig at a command
prompt, we can identify the IP address and subnet mask.

This shows an IP address of 192.168.0.157 and a subnet mask of
255.255.255.0. The Subnet ID is 192.168.0.0.
Now we can test communication with other computers by using Ping. If
we can't communicate with any other computers on our subnet,
either our IP address and subnet mask is configured incorrectly, or we
have basic connectivity issues (such as the cable is disconnected, or the
NIC isn't working).
If we can successfully ping a computer on our subnet, but can't communicate
with computers on another subnet, we know that something is wrong related to
the default gateway (the near side of the router, our pathway to other
subnets).
Classless Subnetting
Identifying the subnet ID is relatively straight forward with a classful
(Class A, Class B, Class C) IP address, but can be a little more complex with
classless IP addressing. To identify the subnet ID in a classless IP
address, we need to break down the bits.
Understanding the bits
The above example shows the decimal representations of the number.
Sometimes, it's required to see the binary representations to identify the
subnet ID.
Step 1: Convert IP address and Subnet Mask to binary. (The scientific
view of the calculator can make this easy.)
| 192 |
168 |
70 |
200 |
| 1100 0000 |
1010 1000 |
0100 0110 |
1100 1000 |
| 255 |
255 |
240 <- |
0 |
| 1111 1111 |
1111 1111 |
1111 0000 |
0000 0000 |
Note that in a classless IP address, the subnet mask is not limited to just 255
or 0.
Step 2: Match the 1's of the Subnet Mask to the bits of the IP Address.
Again, when the subnet mask is the maximum (1 in binary), it masks the portion
of the IP address that is the Subnet ID. Below, the subnet
mask is represented in red, and the
masked subnet bits are represented in blue.
| 192 |
168 |
70 |
200 |
| 1100 0000 |
1010 1000 |
0100 0110 |
1100 1000 |
| 255 |
255 |
240 |
0 |
| 1111 1111 |
1111 1111 |
1111 0000
|
0000 0000 |
| 1100 0000 |
1010 1000
|
0100 0000 |
0000 0000 |
| 192 |
168 |
64 |
0 |
Step 3: Add 0's to the network ID to obtain a four-octet structure.
The subnet ID is 192.168.64.0
Master the above concepts and the rest of subnetting will flow
very easily.
If you have questions or comments about this topic, or would like
to read about other topics, feel free to post them.
|