Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Host A (with IP address 172.16.2.4) wants to communicate with Host B (with IP ad

ID: 3846159 • Letter: H

Question

Host A (with IP address 172.16.2.4) wants to communicate with Host B (with IP address 172.16.3.5).

If the subnet mask for Host A is 255.255.0.0, will the hosts communicate using local transmissions or will they send information to the default gateway?

Show the workings for the ANDing process below.

Source IP

Source Subnet Mask                                                                               

                                                                                                               =

AND Result

Destination IP

Source Subnet Mask

                                                                                                               =

AND Result

Source IP

Source Subnet Mask                                                                               

                                                                                                               =

AND Result

Destination IP

Source Subnet Mask

                                                                                                               =

AND Result

Explanation / Answer

Q :Host A (with IP address 172.16.2.4) wants to communicate with Host B (with IP address 172.16.3.5).

If the subnet mask for Host A is 255.255.0.0, will the hosts communicate using local transmissions or will they send information to the default gateway?

Ans : In order to determine whether the hosts communicate using local transmissions or will they send information to the default gateway we have to perform ANDing process.

So , first we have to know

What is ANDing process : When a source host A wants to communicate with a destination host B, then the source host A uses its subnet mask to determine whether the destination host is on the local transmission network or a remote network(Default gateway).

How do we perform AND operation:

AND operation  takes two bit patterns of equal length and performs the logical AND operation by multiplying them.

If both bits in the position when compared are 1, the bit in the resulting binary representation is 1 (1 × 1 = 1); otherwise, the result is 0 (1 × 0 = 0 and 0 × 0 = 0).

for example: let us add 5 and 3

0 1 0 1

0 0 1 1

_________

0 0 01 ---> performing AND operation

_________

now if we get into the problem,..

lets convet the given IP address into the binary form to perform AND operation with subnet mask A

The host A IP address when converted to binary:(Host A's address 172.16.2.4):

2^7 2^6 2^5 2^4 2^3 2^2 2^12^0 (2^7 +2^5 +2^3 +2^2)

1 0 1 0 1 1 0 0 =172

2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0

0 0 0 1 0 0 0 0 =16

2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0

0 0 0 0 0 0 1 0 =2

2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0

0 0 0 0 0 1 0 0 =4

The host B IP address when converted to binary:(Host B's address 172.16.3.5):

2^7 2^6 2^5 2^4 2^3 2^2 2^12^0

1 0 1 0 1 1 0 0 =172

2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0

0 0 0 1 0 0 0 0 =16

2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0

0 0 0 0 0 0 1 1 =3

2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0

0 0 0 0 0 1 0 1 =5

the binary form of subnet mask for Host A is:( 255.255.0.0):

2^7 2^6 2^5 2^4 2^3 2^2 2^12^0

1 1 1 1 1 1 1 1 =225

2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0

1 1 1 1 1 1 1 1 =225

2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0

0 0 0 0 0 0 0 0 =0

2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0

0 0 0 0 0 0 0 0 =0

now lets perform ANDing process:

Host A's IP address : 10101100 00010000 00000010 00000100   

Host A's subnet mask: 11111111 11111111 00000000 00000000

____________________________________________________________

Result(AND operation):10101100 00010000 00000000 00000000 ----> 172.16.0.0

____________________________________________________________

Host B's IP address : 10101100 00010000 00000011 00000101   

Host A's subnet mask: 11111111 11111111 00000000 00000000

____________________________________________________________

Result(AND operation):10101100 00010000 00000000 00000000 --------> 172.16.0.0

_____________________________________________________________

Here, if we observe the result obtained is same.This implies that the two Hosts can communicate using local transmissions