• Embed Doc
  • Readcast
  • Collections
  • CommentGo Back
Download
 
SUBNETTING
1.What is an IP Address?
An IP address is made of 4 Octets, or 32 bits. It is usually represented in dotted decimalformat like this: 131.107.2.205. Each number represents an octet. An octet is a group of 8 bits. Since we have 4 octets in an IP Address, there are 8*4=32 bits in an IP Address.Computers do not understand dotted decimal notation, as they only function in binary. Allcomputers understand is 1 and 0. Therefore, we must find a way to transfer an IP Addressfrom dotted decimal format to binary. We do this octet by octet.Each bit in an octet has an associated decimal value:Bit12345678Bitvalue1286432168421So you can follow, here is a decimal to binary calculator. However, I advise you to do the mathat first to better understand the concepts...Let’s take an example. I have an IP address of 131.107.2.4. What is that in Binary?Let’s do this octet by octet:131:BitValue
128
64321684
2 1
Binary
1
00000
1 1
Column with a “1” in binary mean that we count the corresponding bit value. If you add up allthe bit values marked with a one, you get 128+2+1=131.107:BitValue128
64 32
16
8
4
2 1
Binary0
1 1
0
1
0
1 1
Column with a “1” in binary mean that we count the corresponding bit value. If you add up allthe bit values marked with a one, you get 64+32+8+2+1=1072:BitValue12864321684
2
1Binary000000
1
0 1
 
SUBNETTING
Column with a “1” in binary mean that we count the corresponding bit value. If you add up allthe bit values marked with a one, you get 24:BitValue1286432168
4
21Binary00000
1
00Column with a “1” in binary mean that we count the corresponding bit value. If you add up allthe bit values marked with a one, you get 4 Now we know that another way of writing our example IP address of 131.107.2.4 is:10000011.01101011.00000010.00000100IP Addresses are made of two distinct parts: the
Network ID
and the
Host ID
. When you tryto ping an IP address, IP at Layer 3 needs to determine whether the target IP address is local or remote to your subnet. To explain this, I like to ask my students the following question:“Let’s say I live on Maple Tree Lane. You say that you also live on Maple Tree Lane. Are weneighbors? Well, we may be, or we may not be. We do not have enough information toanswer that question. Specifically, we do not know if we live in the same town. If we do livein the same town, and our street addresses are similar, then we are neighbors. If we do not livein the same town, it does not matter whether our street addresses are similar or not: we are notneighbors.”The same applies to IP addressing. Before I can find out what your Host ID is – i.e. your streetaddress – I have to worry about what your Network ID is – i.e. your town.So how does IP know what the Host ID and Network IDs are? That is the role of the SubnetMask.Please note that neither the network ID, the host ID nor the subnet bit can be all 0s or all ones.More to come about this later…
2.What is a Subnet Mask?
A Subnet Mask is used to enable IP at Layer 3 to find out whether the target IP address you aretrying to contact is local or remote to your network. That is all it does. It helps you determinewhich part of an IP Address is the Network ID, and which is the Host ID. So how does it dothat?We have all seen a Subnet Mask before. It usually looks something like this:255.255.255.02
 
SUBNETTING
This subnet mask is obviously displayed in dotted decimal format. As we already know,however, computers do not understand this format. They only understand binary. So let’sapply what we know about binary to our subnet mask:255BitValue1286432168421Binary11111111Column with a “1” in binary mean that we count the corresponding bit value. If you add up allthe bit values marked with a one, you get 128+64+32+16+8+4+2+1=255So, 255 are “all ones”, as you may have heard before.0:BitValue1286432168421Binary00000000Column with a “1” in binary mean that we count the corresponding bit value. If you add up allthe bit values marked with a one, you get 0. So, 0 is “all zeros”, as you may have heard before.In other words, our 255.255.255.0 subnet masks in binary looks like this:11111111.11111111.11111111.00000000 Note that a subnet mask is also a 32 bit, 4 octet entity that matches the structure of our IPaddresses…If I were to superimpose the IP address and subnet mask we have translated so far, I would getthis:131.107.2.4
10000011. 01101011. 00000010.00000100 
255.255.255.0
11111111. 11111111. 11111111.00000000 
I highlighted the Network bits in Red, and the Host bits in Blue. Notice anything? All thenetwork bits are the bits that had a value of “1” in the subnet mask, and all the host bits are the bits that had a value of “0” in the subnet mask. Easy, isn’t it?In our example, the Network ID is 131.107.2, and the host ID is 4. If I change the subnet masto 255.255.0.0, what happens? Well, let’s apply the same logic: 131.107.2.4
10000011. 01101011.00000100 00000100
255.255.0.0
11111111. 11111111.00000000 00000000
3
of 00

Leave a Comment

You must be to leave a comment.
Submit
Characters: ...
You must be to leave a comment.
Submit
Characters: ...