This can be explained with an example :
137.157.7.65 - 1st ip
137.157.10.3 - 2nd ip
255.255.252.0 - subnet mask
STEP 1 : Convert 1st ip to binary
137.157.7.65 10001001.10011101.00000111.01000001
255.255.252.0 11111111.11111111.11111100.00000000
STEP 2: Find the network address by copying all the binary digits as is if the mask is 1 and 0 if the mask is 0
10001001.10011101.00000100.00000000
137.157.4.0 - Net address
STEP 3: Convert the second address to binary
137.157.10.3 10001001.10011101.00001010.00000011
255.255.252.0 11111111.11111111.11111100.00000000
STEP 4 : Find network address of the second ip
10001001.10011101.00001000.00000000
137.157.8.0 - Net address
STEP 5: Compare the 2 network addresses
137.157.4.0 ====137.157.8.0 ----> They are not equal. Therefore they are in different subnet
137.157.7.65 - 1st ip
137.157.10.3 - 2nd ip
255.255.252.0 - subnet mask
STEP 1 : Convert 1st ip to binary
137.157.7.65 10001001.10011101.00000111.01000001
255.255.252.0 11111111.11111111.11111100.00000000
STEP 2: Find the network address by copying all the binary digits as is if the mask is 1 and 0 if the mask is 0
10001001.10011101.00000100.00000000
137.157.4.0 - Net address
STEP 3: Convert the second address to binary
137.157.10.3 10001001.10011101.00001010.00000011
255.255.252.0 11111111.11111111.11111100.00000000
STEP 4 : Find network address of the second ip
10001001.10011101.00001000.00000000
137.157.8.0 - Net address
STEP 5: Compare the 2 network addresses
137.157.4.0 ====137.157.8.0 ----> They are not equal. Therefore they are in different subnet
No comments:
Post a Comment