In: Computer Science
IP Address: 37.124.67.99
Subnet Mask: 255.240.0.0
find Network address, Broadcast address, first valid host address, last valid host address and number of valid hosts in the network.
show very clear steps for all the calculations.
IP Address: 37.124.67.99
----------------------------------------
Let's first convert this into binary format
37.124.67.99
Let's convert all octets to binary separately
Converting 37 to binary
Divide 37 successively by 2 until the quotient is 0
> 37/2 = 18, remainder is 1
> 18/2 = 9, remainder is 0
> 9/2 = 4, remainder is 1
> 4/2 = 2, remainder is 0
> 2/2 = 1, remainder is 0
> 1/2 = 0, remainder is 1
Read remainders from the bottom to top as 100101
So, 37 of decimal is 100101 in binary
37 in binary is 00100101
Converting 124 to binary
Divide 124 successively by 2 until the quotient is 0
> 124/2 = 62, remainder is 0
> 62/2 = 31, remainder is 0
> 31/2 = 15, remainder is 1
> 15/2 = 7, remainder is 1
> 7/2 = 3, remainder is 1
> 3/2 = 1, remainder is 1
> 1/2 = 0, remainder is 1
Read remainders from the bottom to top as 1111100
So, 124 of decimal is 1111100 in binary
124 in binary is 01111100
Converting 67 to binary
Divide 67 successively by 2 until the quotient is 0
> 67/2 = 33, remainder is 1
> 33/2 = 16, remainder is 1
> 16/2 = 8, remainder is 0
> 8/2 = 4, remainder is 0
> 4/2 = 2, remainder is 0
> 2/2 = 1, remainder is 0
> 1/2 = 0, remainder is 1
Read remainders from the bottom to top as 1000011
So, 67 of decimal is 1000011 in binary
67 in binary is 01000011
Converting 99 to binary
Divide 99 successively by 2 until the quotient is 0
> 99/2 = 49, remainder is 1
> 49/2 = 24, remainder is 1
> 24/2 = 12, remainder is 0
> 12/2 = 6, remainder is 0
> 6/2 = 3, remainder is 0
> 3/2 = 1, remainder is 1
> 1/2 = 0, remainder is 1
Read remainders from the bottom to top as 1100011
So, 99 of decimal is 1100011 in binary
99 in binary is 01100011
===================================================================================
|| 37.124.67.99 in binary notation is
00100101.01111100.01000011.01100011 ||
===================================================================================
Subnet address: 255.240.0.0
----------------------------------------
Let's convert this into binary format
255.240.0.0
Let's convert all octets to binary separately
Converting 255 to binary
Divide 255 successively by 2 until the quotient is 0
> 255/2 = 127, remainder is 1
> 127/2 = 63, remainder is 1
> 63/2 = 31, remainder is 1
> 31/2 = 15, remainder is 1
> 15/2 = 7, remainder is 1
> 7/2 = 3, remainder is 1
> 3/2 = 1, remainder is 1
> 1/2 = 0, remainder is 1
Read remainders from the bottom to top as 11111111
So, 255 of decimal is 11111111 in binary
255 in binary is 11111111
Converting 240 to binary
Divide 240 successively by 2 until the quotient is 0
> 240/2 = 120, remainder is 0
> 120/2 = 60, remainder is 0
> 60/2 = 30, remainder is 0
> 30/2 = 15, remainder is 0
> 15/2 = 7, remainder is 1
> 7/2 = 3, remainder is 1
> 3/2 = 1, remainder is 1
> 1/2 = 0, remainder is 1
Read remainders from the bottom to top as 11110000
So, 240 of decimal is 11110000 in binary
240 in binary is 11110000
Converting 0 to binary
Divide 0 successively by 2 until the quotient is 0
Read remainders from the bottom to top as
So, 0 of decimal is in binary
0 in binary is 00000000
Converting 0 to binary
Divide 0 successively by 2 until the quotient is 0
Read remainders from the bottom to top as
So, 0 of decimal is in binary
0 in binary is 00000000
==================================================================================
|| 255.240.0.0 in binary notation is
11111111.11110000.00000000.00000000 ||
==================================================================================
Remove all dots to form
11111111111100000000000000000000
Remove all 0's from the right side to form 111111111111
Number of 1's in this is 12
so, Subnet mask is /12
For Calculating network ID, keep first 12 bits of
00100101.01111100.01000011.01100011 and set all remaining bits to
0.
so, network ID in binary is
00100101.01110000.00000000.00000000
00100101.01110000.00000000.00000000:
----------------------------------------
00100101.01110000.00000000.00000000
Let's convert all octets to decimal separately
Converting 00100101 to decimal
=> 00100101
=> 0x2^7+0x2^6+1x2^5+0x2^4+0x2^3+1x2^2+0x2^1+1x2^0
=> 0x128+0x64+1x32+0x16+0x8+1x4+0x2+1x1
=> 0+0+32+0+0+4+0+1
=> 37
00100101 in decimal is 37
Converting 01110000 to decimal
=> 01110000
=> 0x2^7+1x2^6+1x2^5+1x2^4+0x2^3+0x2^2+0x2^1+0x2^0
=> 0x128+1x64+1x32+1x16+0x8+0x4+0x2+0x1
=> 0+64+32+16+0+0+0+0
=> 112
01110000 in decimal is 112
Converting 00000000 to decimal
=> 00000000
=> 0x2^7+0x2^6+0x2^5+0x2^4+0x2^3+0x2^2+0x2^1+0x2^0
=> 0x128+0x64+0x32+0x16+0x8+0x4+0x2+0x1
=> 0+0+0+0+0+0+0+0
=> 0
00000000 in decimal is 0
Converting 00000000 to decimal
=> 00000000
=> 0x2^7+0x2^6+0x2^5+0x2^4+0x2^3+0x2^2+0x2^1+0x2^0
=> 0x128+0x64+0x32+0x16+0x8+0x4+0x2+0x1
=> 0+0+0+0+0+0+0+0
=> 0
00000000 in decimal is 0
==================================================================================
|| 00100101.01110000.00000000.00000000 in decimal notation is
37.112.0.0 ||
==================================================================================
=========================================
|| So, Network ID is 37.112.0.0 ||
=========================================
For Calculating broadcast ID, keep first 12 bits of
00100101.01111100.01000011.01100011 and set all remaining bits to
1.
so, broadcast ID in binary is
00100101.01111111.11111111.11111111
00100101.01111111.11111111.11111111:
----------------------------------------
00100101.01111111.11111111.11111111
Let's convert all octets to decimal separately
Converting 00100101 to decimal
=> 00100101
=> 0x2^7+0x2^6+1x2^5+0x2^4+0x2^3+1x2^2+0x2^1+1x2^0
=> 0x128+0x64+1x32+0x16+0x8+1x4+0x2+1x1
=> 0+0+32+0+0+4+0+1
=> 37
00100101 in decimal is 37
Converting 01111111 to decimal
=> 01111111
=> 0x2^7+1x2^6+1x2^5+1x2^4+1x2^3+1x2^2+1x2^1+1x2^0
=> 0x128+1x64+1x32+1x16+1x8+1x4+1x2+1x1
=> 0+64+32+16+8+4+2+1
=> 127
01111111 in decimal is 127
Converting 11111111 to decimal
=> 11111111
=> 1x2^7+1x2^6+1x2^5+1x2^4+1x2^3+1x2^2+1x2^1+1x2^0
=> 1x128+1x64+1x32+1x16+1x8+1x4+1x2+1x1
=> 128+64+32+16+8+4+2+1
=> 255
11111111 in decimal is 255
Converting 11111111 to decimal
=> 11111111
=> 1x2^7+1x2^6+1x2^5+1x2^4+1x2^3+1x2^2+1x2^1+1x2^0
=> 1x128+1x64+1x32+1x16+1x8+1x4+1x2+1x1
=> 128+64+32+16+8+4+2+1
=> 255
11111111 in decimal is 255
======================================================================================
|| 00100101.01111111.11111111.11111111 in decimal notation is
37.127.255.255 ||
======================================================================================
===============================================
|| So, broadcast ID is 37.127.255.255 ||
===============================================
For Calculating first valid address in subnet, add 1 to
the network address.
Network Address is 37.112.0.0
============================================================
|| So, first valid address in subnet is 37.112.0.1 ||
============================================================
For Calculating last valid address in subnet, remove 1
from the broadcast address.
Broadcast Address is 37.127.255.255
===============================================================
|| So, last valid address in subnet is 37.127.255.254 ||
===============================================================
Number of valid hosts in the network
> 2^(32 - number of 1's in subnet) - 2
> 2^(32 - 12) - 2
> 2^(20) - 2
> 1048576 - 2
> 1048574
===============================================================
|| So, number of valid hosts in the subnet is 1048574 ||
===============================================================