In: Computer Science
Given an IP address 138.112.25.60, with the mask 255.255.255.240:
Calculate the network address and broadcast address of the network it belongs to.
For 138.112.25.47 and 38.112.25.49, which one is in the same network as 138.112.25.60 does, and which one is not. Show the necessary calculation steps and explanation.
IP address is 138.112.25.60, In binary 10001010.01110000.00011001.00111100
The mask is 255.255.255.240 or /28
Calculate network address:
10001010.01110000.00011001.00111100 [IP address]
11111111.11111111.11111111.11110000 [Mask]
__________________________________
10001010.01110000.00011001.00110000 [Bitwise ANDing]
Or 138.112.25.48 in decimal
Therefore, network address 138.112.25.48
Calculate network address:
Set last four bits of the IP address to 1's
10001010.01110000.00011001.00111111
Or 138.112.25.63 in decimal
IP address: 138.112.25.47, In binary 10001010.01110000.00011001.00101111
Calculate network address:
10001010.01110000.00011001.00101111 [IP address]
11111111.11111111.11111111.11110000 [Mask]
__________________________________
10001010.01110000.00011001.00100000 [Bitwise ANDing]
Network address is 138.112.25.32
Since network address is different from 138.112.25.48, not in same network as 138.112.25.60
**********************************************************************************************************
IP address: 38.112.25.49, In binary 00100110.01110000.00011001.00110001
Calculate network address:
00100110.01110000.00011001.00110001 [IP address]
11111111.11111111.11111111.11110000 [Mask]
__________________________________
00100110.01110000.00011001.00110000 [Bitwise ANDing]
Network address is 38.112.25.48
Since network address is different from 138.112.25.48, not in same network as 138.112.25.60