1

It's a theory only question.

An host on 192.168.0.0/16 can comunicate with an host on the subnet 192.168.1.0/24 ?

And viceversa?

If no, why?

NOTE: I already CAN calculate host, subnet, network id, host id, etc...

My question is different: I need to know if an host of a subnet can dialogue with a host that is sub-subnetted

Context

Hosts with a common segment in Net ID, but not identical.

This is scenario when an actual /16 net is being subnetted in /24, but the work is done 'some PCs at a time' and not the whole network is already subnetted as /24

Example 1

Host A: 192.168.1.200/16

  • Netmask: 255.255.0.0
  • Net ID: 192.168.0.0/16
  • Host ID: 1.200
  • Network range: 192.168.0.0 ... 192.168.255.255

Host B: 192.168.1.1/24

  • Netmask: 255.255.255.0
  • Net ID: 192.168.1.0/24
  • Host ID: 1
  • Network range: 192.168.1.0 ... 192.168.1.255

Can A send packets to B ? Can B send packets to A ?

Example 2 (from the accepted answer)

Host C: 192.168.0.200/16

  • Netmask: 255.255.0.0
  • Net ID: 192.168.0.0/16
  • Host ID: 0.200
  • Network range: 192.168.0.0 ... 192.168.255.255

Host D: 192.168.1.1/24

  • Netmask: 255.255.255.0
  • Net ID: 192.168.1.0/24
  • Host ID: 1
  • Network range: 192.168.1.0 ... 192.168.1.255

Can C send packets to D ? Can D send packets to A ?

realtebo
  • 123
  • 1
  • 7

1 Answers1

1

[from comment] Hosts can communicate directly when they share a common subnet, from their mutual perspective. Hosts on different subnets - even from only a single perspective - require a gateway in between.

E.g. 192.168.1.200/16 and 192.168.1.1/24 could communicate directly. From 192.168.1.200's perspective, 192.168.1.1 is located within 192.168.0.0/16. From 192.168.1.1's perspective, 192.168.1.200 is part of 192.168.1.0/24. Both hosts will attempt resolving the respective destination IP by ARP and send packets directly.

However, 192.168.0.200/16 would still send to 192.168.1.1 directly,

192.168.0.200 & 255.255.0.0 = 192.168.0.0 = source prefix
192.168.1.1   & 255.255.0.0 = 192.168.0.0 = matches source prefix => destination is local 

but 192.168.1.1/24 would not regard 192.168.0.200 as directly connected and consequently sends packets to its (default) gateway.

192.168.1.1   & 255.255.255.0 = 192.168.1.0 = source prefix
192.168.0.200 & 255.255.255.0 = 192.168.0.0 = mismatches source prefix => destination is not local 

When enlarging an already existing subnet, you should take care to adjust the network masks first and then begin to use addresses from the grown scope. When shrinking an existing subnet, you need to migrate all addresses to the target subnet first and then change the network mask/prefix length.

Note that the term subnet originated from long obsolete classful networking and was carried over to more modern CIDR networks. Presently, it means the same as directly connected IP network, sharing a common prefix.

Zac67
  • 90,111
  • 4
  • 75
  • 141