Subnetting is important to make use of the available IP addresses and to avoid wasting large amount of addresses within a network .. where we change the number of reserved bits for hosts either reserving more bits to increase the number of hosts per subnetwork (decreasing the number of subnetworks) or reserving more bits for networks to increase the number of subnetworks (decreasing the number of hosts per subnetwork)
Classification of IP Addresses
Class A --- has a range of (0-127)
Class B --- has a range of (128-191)
Class C --- has a range of (192-223)
Class D --- has a range of (224-239) not used
Class E --- has a range of (240-255) not used
Default Mask
Class A --- has a default mask of 255.0.0.0/8
Class B --- has a default mask of 255.255.0.0/16
Class C --- has a default mask of 255.255.255.0/24
where the bytes of 255 decimal value represent the network ID
while the bytes of 0 decimal value represent the host ID
Number of Used Hosts
Class A --- has (2^24)-2 used hosts
Class B --- has (2^16)-2 used hosts
Class C --- has (2^8)-2 used hosts
In general, the number of used hosts is (2^host ID)-2
Since two of them are reserved.
Example
A company has the network address of 209.50.1.0 wants to create 20 subnetworks
Solution
The given address is class C address, you can find that by comparing the leftmost byte
to ranges above.
The default mask of a class C address is 255.255.255.0/24 .. So, you have one byte or
8 bits for hosts.
You need 20 subnetworks .. applying the relation 20 <= 2^n to find the number of bits
to borrow from the bits reserved for hosts .. 5 applies to the relation, because 2^5=32
.. So, 5 leftmost bits are borrowed from the host bits .. the new mask is ..
255.255.255.248/29
Applying the mask to the given address, we get the address of the first subnet ..
209.50.1.0 or in details 209.50.1.00000|000
*note: You can't combine decimal with binary to write an IP address, but this is done
for illustration.
The 1st subnet is ..
209.50.1.0 or 209.50.1.00000|000 (subnet address)
209.50.1.1 or 209.50.1.00000|001 (1st used address)
209.50.1.2 or 209.50.1.00000|010 (2nd used address)
...
...
...
209.50.1.6 or 209.50.1.00000|110 (last used address)
209.50.1.7 or 209.50.1.00000|111 (broadcast address)
The 2nd subnet is ..
209.50.1.8 or 209.50.1.00001|000 (subnet address)
209.50.1.9 or 209.50.1.00001|001 (1st used address)
209.50.1.10 or 209.50.1.00001|010 (2nd used address)
...
...
...
209.50.1.14 or 209.50.1.00001|110 (last used address)
209.50.1.15 or 209.50.1.00001|111 (broadcast address)
...
...
...
The 20th subnet is ..
209.50.1.152 or 209.50.1.10011|000 (subnet address)
209.50.1.153 or 209.50.1.10011|001 (1st used address)
209.50.1.154 or 209.50.1.10011|010 (2nd used address)
...
...
...
209.50.1.158 or 209.50.1.10011|110 (last used address)
209.50.1.159 or 209.50.1.10011|111 (broadcast address)
****************************************
Create 60 subnetworks for the class B address of 173.50.30.1
Solution
The default mask of a class B address is 255.255.0.0/16 .. So, we have 16 bits for
hosts .. 60 subnetworks can be obtained by borrowing 6 leftmost bits from the hosts
bits .. So, the new mask is ..
255.255.252.0/22
Applying the mask to the given address .. 173.50.0.0
The 1st subnet is ..
173.50.0.0 or 173.50.000000|00.00000000 (subnet address)
173.50.0.1 or 173.50.000000|00.00000001 (1st used address)
173.50.0.2 or 173.50.000000|00.00000010 (2nd used address)
...
...
...
173.50.3.254 or 173.50.000000|11.11111110 (last used address)
173.50.3.255 or 173.50.000000|11.11111111 (broadcast address)
The 2nd subnet is ..
173.50.4.0 or 173.50.000001|00.00000000 (subnet address)
173.50.4.1 or 173.50.000001|00.00000001 (1st used address)
173.50.4.2 or 173.50.000001|00.00000010 (2nd used address)
...
...
...
173.50.7.254 or 173.50.000001|11.11111110 (last used address)
173.50.7.255 or 173.50.000001|11.11111111 (broadcast address)
...
...
...
The 60th subnet is ..
173.50.240.0 or 173.50.111100|00.00000000 (subnet address)
173.50.240.1 or 173.50.111100|00.00000001 (1st used address)
173.50.240.2 or 173.50.111100|00.00000010 (2nd used address)
...
...
...
173.50.243.254 or 173.50.111100|11.11111110 (last used address)
173.50.243.255 or 173.50.111100|11.11111111 (broadcast address)
****************************************
Example
A service provider has given the class C IP address of 209.50.1.0 .. Your company
must break the network into 50 hosts.
Solution
Break the network into 50 hosts means that you must have 50 hosts per
subnetwork ..
The default mask of a class C is 255.255.255.0/24 .. You have 8 bits for hosts and to
reduce them to 6 bits (2^6=64 but 62 are usable) such that you can have 50 hosts per
each subnetwork ..
Unlike reserving bits for subnetworks .. reserving bits for hosts is done by reserving
the rightmost bits .. So, the 2 leftmost bits of the last byte are reserved for
subnetworks ..
The new mask is .. 255.255.255.192/26 ..
The 1st subnet is ..
209.50.1.0 or 209.50.1.00|000000 (subnet address)
209.50.1.1 or 209.50.1.00|000001 (1st used address)
209.50.1.2 or 209.50.1.00|000010 (2nd used address)
...
...
...
209.50.1.62 or 209.50.1.00|111110 (last used address)
209.50.1.63 or 209.50.1.00|111111 (broadcast address)
The 2nd subnet is ..
209.50.1.64 or 209.50.1.01|000000 (subnet address)
209.50.1.65 or 209.50.1.01|000001 (1st used address)
209.50.1.66 or 209.50.1.01|000010 (2nd used address)
...
...
...
209.50.1.126 or 209.50.1.01|111110 (last used address)
209.50.1.127 or 209.50.1.01|111111 (broadcast address)
The 3rd subnet is ..
209.50.1.128 or 209.50.1.10|000000 (subnet address)
209.50.1.129 or 209.50.1.10|000001 (1st used address)
209.50.1.130 or 209.50.1.10|000010 (2nd used address)
...
...
...
209.50.1.190 or 209.50.1.10|111110 (last used address)
209.50.1.191 or 209.50.1.10|111111 (broadcast address)
The 4th subnet is ..
209.50.1.192 or 209.50.1.11|000000 (subnet address)
209.50.1.193 or 209.50.1.11|000001 (1st used address)
209.50.1.194 or 209.50.1.11|000010 (2nd used address)
...
...
...
209.50.1.254 or 209.50.1.11|111110 (last used address)
209.50.1.255 or 209.50.1.11|111111 (broadcast address)
****************************************
Example
You have the following IP address ,, 209.50.1.0 .. The required number of hosts per
network is 300.
Solution
For a class C address, the default mask is 255.255.255.0 .. To have 300 hosts ,, the
required number of bits must be 9 at least .. So, 1 bit is taken from the network bits
,, it is the rightmost bit .. The new mask is ..
255.255.254.0/23
The network addresses are ..
209.50.0.0 or 209.50.0000000|0.00000000 (subnet address)
209.50.0.1 or 209.50.0000000|0.00000001 (1st used address)
209.50.0.2 or 209.50.0000000|0.00000010 (2nd used address)
...
...
...
209.50.1.254 or 209.50.0000000|1.11111110 (last used address)
209.50.1.255 or 209.50.0000000|1.11111111 (broadcast address)
****************************************
Example
You have the following IP address of 192.168.1.58 and you have a mask of
255.255.255.240/28 .. Find the range where the given address is.
Solution
Applying the given mask to the given address we get .. 192.168.1.48 .. So, the subnet
where the given address is 192.168.1.48 ..
Applying the class C default mask to the given address we have 192.168.1.0 .. This
makes bits of last byte zeroes .. then creating subnets by applying the mask given ..
192.168.1.0 ---> 192.168.1.15 (1st subnet range)
192.168.1.16 ---> 192.168.1.31 (2nd subnet range)
192.168.1.32 ---> 192.168.1.47 (3rd subnet range)
192.168.1.48 ---> 192.168.1.63 (4th subnet range) .. the given address belongs to this
subnet.
يعطيك العاافيه يا رب
ردحذفالله يعافيكي :)
حذفمرحبا الله يعطيكم العافية ويسلم ايديكم يا رب
ردحذفكيف ممكن انزل هاد الموضوع عجهازي ؟
الله يعافيكي ياا رب
حذفاعملي save as لصفحة الموضوع