Tutorial on IP Addressing And Subnetting



IP addressing and Subnetting



Beep Beep Beep! Did I manage to catch your attention? I sure hope I did for this topic will be the base of the entire networking course. This is because we will be going through the relationship of IP addresses (Internet Protocol Address) and Subnet Mask.


Contents:




Back to top
IP Addresses
IPv4 and IPv6 address are the logical addresses of a device. Think of it as the place you are currently at. It changes base on your current location. There are a 2 IP addressing mode available
1.      Static IP
·        This means that the IP is fixed and cannot be changed
·        IP have to configured manually

2.      Dynamic Host Configuration Protocol
·        IP is assign automatically
·        There will be a range where the IP is chosen from
·        IP will change depending on which IP is available
·        There will be a certain amount of time you keep the IP before it is release
·        You can use the ipconfig /release and ipconfig /renew command in the cmd is change your IP
How to enter IP into a router (Cisco)
You can enter IP addresses into each interface on a router by
1.      Entering into Command Line Interface
2.      Type En
3.      Config t
4.      Int “Interface Number”
5.      Ip add “IP address” “Subnet Mask”










Back to top
There are many different classes of IP
IP Address Class
IP range
Usable Hosts
Subnet Mask (Network Bit)
Class A
1.0.0.0 – 126.255.255.255
24
8
Class B
128.0.0.0 – 191.255.255.255
16
16
Class C
192.0.0.0 – 223.255.255.255
8
24
Class D
224.0.0.0 – 239.255.255.255
n/a
n/a
Class E
240.0.0.0-239.255.255.255
n/a
n/a
Classless Inter-Domain Routing
Any IP can be used
Max number of host can be utilized
Any Subnet Mask Number



Back to top
Binary Theory
Everything in the networking world is made up of 1’s and 0’s.
So for an IP address the 1’s represents the Network bits and the 0’s represents the Host bits. Imagine a row of cups that are empty. They are the “O’s”. What if they start filling up? They becomes the “1’s”. Simple right. In an IPv4 address, there are 32 cups and they are divided in 4 section. Each section is an octet and each octet has 8 cups. Each octet total value is 255. Each “0’s/Cups” represent a different value
Example.
128 | 64 | 32 | 16 | 8 | 4 | 2| 1 |.
 0        0       0      0      0   0    0   0   .
As the number of “cups” gets filled up, the 0 will start changing to 1.
Example
128 | 64 | 32 | 16 | 8 | 4 | 2| 1 |.
0     |  0  |   0  |  0  | 0 |  0| 0| 0  |.
Becomes this when filled
1     |  0  |   0  |  0  | 0 |  0| 0| 0  |.
Which means that the first octet will become 128. Apply this to all the octet and you have a full range IP address. Remember that the number have to fit into the subnet mask range.
Example.
192.168.0.1 – 192.168.0.255 /24
You can only fit 32 – 24 which is 8 into in. Which links to the next question? How do I calculate host bits?

Back to top
How to calculate host bits and network bits?
32 = Total number of Hosts available.
In the example above, there were 24 network bits
32 – 24 = 8 bits = 255
Vice versa, to calculate network bits you take the total host bits – host bits.
What are Network Bits and Host Bits?
Host bits defines the amount of addresses that can be used in the the IP. Whereas network bits tells you which part of the available IP range you receive.
Example
IP address: 192.168.0.1
Subnet Mask:/24
This means that you can have up to 255-1 addresses. One address is the broadcast address and cannot be used.
Subnet Mask
Subnet Mask fills up from the right to the left. That is the rule and it cannot be changed. It’s like an order where they state you have to go from left to right.

Back to top
E.g  (Do It yourself)( . means the end of one octet.)
1.  What is the IP address in decimal format?
·        IP address: 10101100. 00010000.0000 0000. 00000001
2.   Convert the following IP addresses to binary format
·        10.1.9.100
·        172.17.8.10
·        192.168.5.7
3.  Convert the following subnet mask to binary format and slash format.

·        255.255.224.0
·        255.255.255.192
·        255.240.0.0
4.  Convert the following subnet mask to decimal dotted format and binary format.

·        /25
·        /18
·        /10
Back to top
~~~~Answer Below~~~~~

1) What is the IP address in decimal format?
 1means filled and 0 means empty.
IP address: 128 + 0 + 32 + 0 + 8+ 4 + 0 +0. 0 + 0 +0 +16 + 0 + 0 + 0 + 0. 0 + 0 + 0 + 0 + 0 +0 + 0 +0.0 + 0 + 0 + 0 + 0 +0 + 0 + 1
Hence the IP is
172.16.0.1/16
The IP is 172.16.0.1 because by adding all the number up, it forms this.
The subnet mask is 255.255.0.0
Why? Because one octet fills up with 255 and only 172 is used. Hence the maximum amount is 255. The subnet mask represents 4 octets. Each octet can have a max of 255. If only 172 is filled , it will still be 255.
2) Convert the following IP addresses to binary format      128 | 64 | 32 | 16 | 8 | 4 | 2| 1 |.
10.1.9.100
0000 1010 .0000 0001. 0000 1001.0110 0100

172.17.8.10
1010 1100.0001 0001.0000 1000.0000.1010

192.168.5.7
1100 0000.1010 1000 .0000 0101.0000 0111



3) Convert the following subnet mask to binary format and slash format.

255.255.224.0
1111 1111.1111 1111.1110 0000. 0000 0000
/19 (numbers of 1s)

255.255.255.192
1111 1111. 1111 1111. 1111 1111. 1100 0000
/26
255.240.0.0
1111 1111.1111 0000. 0000 0000. 0000 0000
/12
4.  Convert the following subnet mask to decimal dotted format and binary format.

·        /25
1111 1111.1111 1111.1111 1111. 1000 0000
255. 255.255.128
·        /18
1111 1111.1111 1111.1100 0000. 0000 0000
255.255.192.0
·        /10
1111 1111. 1100 0000. 0000 0000. 0000 0000
255.192.0.0



This is the end of my Guide on IP addresses and Subnet mask. In this guide I went through how IP address and Subnet Mask were linked together. How to set the 2 different type of IP address mode. I went through on how to configure IP address on a Cisco router. What are host and network bits? How to calculate Host and network bits. How to convert IP into both binary and decimal form. How to convert Subnet mask into Slash format, binary format and decimal format. I hope you had found this guide informative. If you enjoyed this guide, please comment down below as it will make my day. Also if you like it, please help me share to the many different social media platform as it will allow me to accomplish my goal faster. This is me signing off.



Click here for the previous post
Click here for the next post
Justin Soh Writer

Student cum enthusiast in teaching. Never give up!

No comments:

Post a Comment