0

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 ?

13
  • Does this answer your question? How do you calculate the prefix, network, subnet, and host numbers?
    – Zac67
    Aug 20 at 10:08
  • 192.168.1.0/24 is a subnet of 192.168.0.0/16 so your question doesn't make too much sense...
    – Zac67
    Aug 20 at 10:09
  • 1
    Hosts can communicate directly when they share a common subnet, from their mutual perspective. E.g. 192.168.1.200/16 and 192.168.1.1/24 could communicate directly. Hosts on different subnets - even from only a single perspective - require a gateway in between.
    – Zac67
    Aug 20 at 10:32
  • 1
    Routers route packets between networks. Ihat is the entire reason routers were created, and they are necessary to forward packets between networks.
    – Ron Maupin
    Aug 20 at 11:38
  • 1
    Switches are bridges that forward layer-2 frames on the same network, but routers route layer-3 packrats between different networks.
    – Ron Maupin
    Aug 20 at 12:13
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.

5
  • 1
    The segment may be a single one, but there are two subnets...
    – Zac67
    Aug 20 at 13:12
  • So Sending from A to B will be masked against sender's netmask, right?
    – realtebo
    Aug 20 at 13:19
  • 1
    Yes, a sender always uses its netmask - it doesn't know (or care about) the destination's netmask.
    – Zac67
    Aug 20 at 13:25
  • I added network ranges to my question, so the simplest form of answer is "D is in the network range of C but C is not in the network range of D'. Could be as easy?
    – realtebo
    Aug 20 at 13:27
  • Yes, that is quite possible when prefix lengths don't match.
    – Zac67
    Aug 20 at 13:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.