cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
366
Views
0
Helpful
1
Replies

Subnet Behaviour in respect of Subnet Mask

Kuldeep singh
Level 1
Level 1

Dear Experts,

I am confused with Subnet concept, for example I am taking  192.168.0.0  with Subnet Mask 255.255.240.

It's Host range will be 192.168.0.1 to 192.168.15.254.

Suppose If I will connect two computer with HUB/SWITCH as

Computer 1:                                                  Computer 2:

ip address = 192.168.0.7                             ip address = 192.168.6.6

subnet mask = 255.255.240.0                     subnet mask = 255.255.240.0

Now my Questions are:

Question1.  will computer 1 communicate with computer 2  ?

Question2.  will computer 2 communicate with computer 1  ?

Question3.  any need of Router or L3 device to inter vlan/subnet routing for both computer subnet ?  

KS

1 Accepted Solution

Accepted Solutions

Peter Paluch
Cisco Employee
Cisco Employee

Hi Kuldeep,

Question1.  will computer 1 communicate with computer 2  ?

Yes. Computer 1 knows it is located in network 192.168.0.0/20 - that is the result of the binary AND operation between its own IP address and its own netmask. When Computer 1 takes the IP address of Computer 2 and performs a binary AND with its own mask, it will arrive at the same network address 192.168.0.0/20. Therefore, Computer 1 knows that Computer 2 is in the same IP network.

Question2.  will computer 2 communicate with computer 1  ?

Yes. The logic is the same as in the previous answer.

Question3.  any need of Router or L3 device to inter vlan/subnet routing for both computer subnet ?

If you are asking whether computers 1 and 2 need a router to communicate with each other, then - no, they do not need any router, and even if there was a router, they would not use it. Because both computers are in the same IP network, they will communicate directly with each other.

Feel welcome to ask further!

Best regards,
Peter

View solution in original post

1 Reply 1

Peter Paluch
Cisco Employee
Cisco Employee

Hi Kuldeep,

Question1.  will computer 1 communicate with computer 2  ?

Yes. Computer 1 knows it is located in network 192.168.0.0/20 - that is the result of the binary AND operation between its own IP address and its own netmask. When Computer 1 takes the IP address of Computer 2 and performs a binary AND with its own mask, it will arrive at the same network address 192.168.0.0/20. Therefore, Computer 1 knows that Computer 2 is in the same IP network.

Question2.  will computer 2 communicate with computer 1  ?

Yes. The logic is the same as in the previous answer.

Question3.  any need of Router or L3 device to inter vlan/subnet routing for both computer subnet ?

If you are asking whether computers 1 and 2 need a router to communicate with each other, then - no, they do not need any router, and even if there was a router, they would not use it. Because both computers are in the same IP network, they will communicate directly with each other.

Feel welcome to ask further!

Best regards,
Peter

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: