0% found this document useful (0 votes)
270 views

Subnets Practice

The document discusses subnetting techniques for dividing IP address ranges into smaller subnets. It provides examples of subnetting various class A, B, and C IP addresses and networks into 2, 4, or more subnets. The examples calculate the network and broadcast IDs for each subnet based on the number of bits borrowed from the IP class and subnet mask.

Uploaded by

Nebojsha Arsikj
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
270 views

Subnets Practice

The document discusses subnetting techniques for dividing IP address ranges into smaller subnets. It provides examples of subnetting various class A, B, and C IP addresses and networks into 2, 4, or more subnets. The examples calculate the network and broadcast IDs for each subnet based on the number of bits borrowed from the IP class and subnet mask.

Uploaded by

Nebojsha Arsikj
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 7

172.20.0.0/16 ---- 4 subnets with 1000 hosts each!

255.255.0.0

Magic table: |128|64|32|16|8|4|2|1|

11111111.11111111.00000000.00000000 / 16 = 65536 hosts -2 = 65534 hosts.

11111111.11111111.11111111.00000000 /24 = 256 hosts -2 = 254 valid hosts.

11111111.11111111.11111110.00000000 /23 = 512 hosts -2 = 510 valid hosts.

255.255.252.0
11111111.11111111.11111100.00000000 /22 = 1024 hosts -2 = 1022 valid hosts. (Last
borred bit falls on 4 In the magic table)

IP: 172.20.0.0

NID1: 172.20.0.0 /22 = 1024 hosts -2 = 1022;


BID1: 172.20.3.255 /22
Usable hosts: 172.20.0.1 -> 172.20.3.254

NID2: 172.20.4.0 /22 = 1024 hosts -2 = 1022;


BID2: 172.20.7.255 /22
Usable hosts: 172.20.4.1 -> 172.20.7.254

NID3: 172.20.8.0 /22 = 1024 hosts -2 = 1022;


BID3: 172.20.11.255 /22
Usable hosts: 172.20.8.1 -> 172.20.11.254

NID4: 172.20.12.0 /22 = 1024 hosts -2 = 1022;


BID4: 172.20.15.255 /22
Usable hosts: 172.20.12.1 -> 172.20.15.254
-----------------------------------------------------------------------------------
------
Example 2: 192.168.2.0 /24 ---- 4 subnets with 60 hosts each!
255.255.255.0

Magic table: |128|64|32|16|8|4|2|1|

11111111.11111111.11111111.00000000 / 24 = 256 - 2 = 254 valid hosts.


255.255.255.192 /26
11111111.11111111.11111111.11000000 / 26 = 64 - 2 = 62 valid hosts.

NID1: 192.168.2.0 /26


BID1: 192.168.2.63
Usable hosts: 192.168.2.1 -> 192.168.2.62

NID2: 192.168.2.64 /26


BID2: 192.168.2.127
Usable hosts: 192.168.2.65 -> 192.168.2.126

NID3: 192.168.2.128 /26


BID3: 192.168.2.191
Usable hosts: 192.168.2.129 -> 192.168.2.190

NID4: 192.168.2.192 /26


BID4: 192.168.2.255
Usable hosts: 192.168.2.193 -> 192.168.2.254
-----------------------------------------------------------------------------------
-------------

Example 3: 192.168.1.0 /24 ----- 3 networks: Sales=100PCs, Marketing=60PCs and


Management=34PCs.
255.255.255.0

Magic table: |128|64|32|16|8|4|2|1|

Take the highest network first. In our case that Is 100Pcs.

11111111.11111111.11111111.10000000 / 25 = 2^7 -2 = 128 -2 = 126 valid hosts.

NID1: 192.168.1.0 /25


BID1: 192.168.1.127
Usable hosts: 192.168.1.1 -> 192.168.1.126

2nd higest Is 60PCs.

11111111.11111111.11111111.11000000 / 26
NID2: 192.168.1.128 /26
BID2: 192.168.1.191 / 26
Usable hosts: 192.168.1.129 -> 192.168.1.190

Lastly, we have 34PCs.

11111111.11111111.11111111.11000000 / 26
NID3: 192.168.1.192 /26
BID3: 192.168.1.255 / 26
Usable hosts: 192.168.1.193 -> 192.168.1.254

-----------------------------------------------------------------------------------
-----

Example 4: 172.24.0.0 /16 ------ 4 netwoks: 5000, 5000, 5000, 5000 hosts.
255.255.0.0

Magic table: |128|64|32|16|8|4|2|1|

1111111.11111111.00000000.00000000 /16 = 2^16 -2 = 65534 valid hosts.


1111111.11111111.11100000.00000000 /19 = 2^13 -2 = 8190 valid hosts.

NID1: 172.24.0.0 /19


BID1: 172.24.31.255
Usable hosts: 172.24.0.1 -> 172.24.31.254

NID2: 172.24.32.0 /19


BID2: 172.24.63.255
Usable hosts: 172.24.32.1 -> 172.24.63.254

NID3: 172.24.64.0 /19


BID3: 172.24.95.255
Usable hosts: 172.24.64.1 -> 172.24.95.254
NID4: 172.24.96.0 /19
BID3: 172.24.127.255
Usable hosts: 172.24.96.1 -> 172.24.127.254

NA: 172.24.0.0 / 19
Subnet Mask: 255.255.224.0

-----------------------------------------------------------------------------------
--------------

Example 5: 192.168.4.0 /24 ----- 2 networks: 30, 30.

Magic table: |128|64|32|16|8|4|2|1|

1111111.11111111.11111111.00000000 /24
1111111.11111111.11111111.11100000 /27

NID1: 192.168.4.0 /27


BID1: 192.168.4.31

NID2: 192.168.4.32 /27


BID2: 192.168.4.63

-----------------------------------------------------------------------------------
--------------------

CCNA Day 3 LN - Class B subnetting:

/16+

IP address: 172.16.100.225 /16


Subnet Mask:255.255.0.0

Let's break It down Into 2 subnets!

Magic table: |128|64|32|16|8|4|2|1|

2 subnets = 2^1 | 2^15 -2 = 32766 hosts!

IP address: 172.16.100.225 /16


Subnet Mask: 11111111.11111111.10000000.00000000 /17

NID1: 172.16.0.0 /17


BID1: 172.16.127.255
NID2: 172.16.128.0 /17
BID2: 172.16.255.255

Example 2: Ip: 172.16.100.225 /16+ Class B


Subnet mask: 255.255.0.0

Let's break It down Into 4 subnets!

Magic table: |128|64|32|16|8|4|2|1|


4 subnets = 2^2 | 2^14 -2 = 16382 hosts!

Ip: 172.16.100.225 /16+


Subnet mask: 11111111.11111111.110000.0 /18

NID1:172.16.0.0 -> First network's ID will make everything 0 In the host part!
Always!
BID1:172.16.63.255

NID2:172.16.64.0
BID2:172.16.127.255

NID3:172.16.128.0
BID3:172.16.191.255

NID4:172.16.192.0
BID4:172.16.255.255 -> The last network's broadcast ID will make everything 255 In
the host part! Always!

Example 3: Ip: 10.20.100.225 /8+ Class A


Subnet mask: 255.0.0.0

Let's break It down Into 2 subnets!

2 subnets = 2^1 | 2^23 -2 = 8388606 hosts!

Magic table: |128|64|32|16|8|4|2|1|

Ip: 10.20.100.225 /8+ Class A


Subnet mask: 11111111.10000000.00000000.00000000 /9

NID1:10.0.0.0 /9
BID1:10.127.255.255

NID2:10.128.0.0 /9
BID2:10.255.255.255

Example 4: Ip: 10.20.100.225 /8+ Class A


Subnet Mask: 255.0.0.0

Let's break It down Into 4 subnets!

4 subnets = 2^2 | 2^22 -2 = 4194302 hosts!

Magic table: |128|64|32|16|8|4|2|1|

Ip: 10.20.100.225
Subnet Mask: 255.11000000.00000000.00000000 /10
255.192.0.0 /10

NID1: 10.0.0.0 /10


BID1: 10.63.255.255

NID2: 10.64.0.0 /10


BID2: 10.127.255.255

NID3: 10.128.0.0 /10


BID3: 10.191.255.255

NID4: 10.192.0.0 /10


BID4: 10.255.255.255

Requirements 1 : Find the network and broadcast ID of 172.10.21.21 /24

Ip: 172.10.21.21 /24 - Class B, but class B Is /16 that means here 8 bit have
been borrowed.
the 24th bit comes Into the 3rd octet. Now, place value Is 1 and
that
means we need to add 1 to the 3rd octect to keep getting
subsequent network Id.
SM: 255.255.255.0
11111111.11111111.11111111.00000000 /24

Magic table: |128|64|32|16|8|4|2|1|

NID1: 172.10.0.0
BID1: 172.10.0.255
NID2: 172.10.1.0
BID2: 172.10.1.255
NID3: 172.10.2.0
BID3: 172.10.2.255
.
.
.
until we reach 172.10.21.21

last NID: 172.10.21.0


Last BID: 172.10.21.255

Is this 172.10.21.21 in between the last NID: 172.10.21.0 and Last BID:
172.10.21.255? -> Yes!

Requirements 2 : Find the network and broadcast ID of 10.210.170.255 /23 - Class


A, but Class A
Is /8 and that means they have borrowed 15 bits. We don't bother about
those 15 1s.
What we bother about Is /23 comes In which octet? It comes In the 3rd
octet. /23 Is the 7th bit
of the 3rd octect. Which has a place value of 2.

Magic table: |128|64|32|16|8|4|2|1|

11111111.00000000.00000000.00000000 /8
11111111.11111111.11111110.00000000 /23

NID1: 10.0.0.0
BID1: 10.0.1.255
NID2: 10.0.2.0
BID2: 10.0.3.255
NID3: 10.0.4.0
BID3: 10.0.5.255

until we reach 10.0.254.0 and BID: 10.0.255.255

Next network: 10.1.0.0 and BID: 10.1.1.255

next goes like this:


10.1.2.0 and BID: 10.1.3.255
10.1.4.0 and BID: 10.1.5.255
10.1.6.0 and BID: 10.1.7.255

until:
10.1.254.0 and BID: 10.1.255.255

Next netowork:
10.2.0.0 and BID: 10.2.1.255
10.2.2.0 and BID: 10.2.3.255
Until I reaches
10.210.0.0 and BID: 10.210.1.255
next goes again
10.210.2.0 and BID: 10.210.3.255
10.210.4.0 and BID: 10.210.5.255
'
'
'
Until finally reach In what we are interested:
10.210.170.0 and BID: 10.210.171.255

IMPORTANT: Another way to answers this questions Is: Because we know changes are
happening on the 3rd octect.
We could've started at 10.210.0.0 and BID: 10.210.1.255 and next: 10.210.2.0 and
BID: 10.210.3.255 an so on,
until we reach 10.210.170.0 and BID: 10.210.171.255

===================================================================================
======================

Good examples:

first, i'd like to write down the list of the bit

128 64 32 16 8 4 2 1

#1
20.120.47.225/13
13 means 13%8 = 5 so we have to borrow 5 bit in 2nd octet
5 bit means there are 8 network in between, so the answer is :

Network ID : 20.120.0.0
Broadcast ID : 20.127.255.255

#2
220.20.17.5/27
27 means 27%8 = 3 so we have to borrow 3 bit in 4th octet
3 bit means there are 32 network in between, so the answer is :
Network ID : 220.20.17.0
Broadcast ID : 220.20.17.31

#3
10.10.7.17/19
19 means 19%8 = 3 so we have to borrow 3 bit in 3rd octet
3 bit means there are 32 network in between, so the answer is :

Network ID : 10.10.0.0
Broadcast ID : 10.10.31.255

#4
192.8.3.1/18
18 means 18%8 = 2 so we have to borrow 2 bit in 3rd octet
2 bit means there are 64 network in between, so the answer is :

Network ID : 192.8.0.0
Broadcast ID : 192.8.63.255

#5
172.1.4.5/20
20 means 20%8 = 4 so we have to borrow 4 bit in 3rd octet
4 bit means there are 16 network in between, so the answer is :

Network ID : 172.1.0.0
Broadcast ID : 172.1.15.255

===================================================================================
============================

You might also like