8

AFAIK, in Windows 3.11 it was possible to enter all kind of subnet masks, e.g. 255.255.255.1. Nowadays, the bits of the mask have to be consecutive.

However, I could imagine that such a unusual subnet mask actually worked as long as it was applied to all computers consistently. An algorithm using bitwise operators would come to a result and be able to conclude whether a packet is targeted or not.

Did this actually work?

Let's consider typical home use hardware of that time such as hubs and switches on Ethernet level, not routers or gateways which might have a different OS.

3
  • What would you expect to happen with a SNM of 255.255.255.1 - what addresses would you expect to match? You could assume that mask to match all odd adresses of a class C network - but how would you express even adresses of that subnet, then? definitively not with a mask of 255.255.255.0? – tofro Feb 22 at 19:11
  • 9
    I don't know about Windows, but in other systems, such subnets did work. @tofro -you're confusing masks and addresses. Mask 255.255.255.1 means hosts 42.42.42.123 and 42.42.42.124 are in different subnets, with network address 42.42.42.0 and 42.42.42.1 respectively. They have the same host number but of course are distinguished by their networks. – another-dave Feb 22 at 19:21
  • Fun fact: Some early ethernet connected devices (eg some early networked laser printers) did not support entering a subnet mask AT ALL, they simply went with what was expected for the address class you used. – rackandboneman Apr 3 at 18:34
16

The first question would be: "with what Winsock stack?"

As originally shipped, Windows for Workgroups didn't support IP at all. Somewhere along the line (but I'm not sure of the exact date) Microsoft specified the Winsock API. To use it, however, you had to install a Winsock implementation, of which there were a number (Trumpet!, Netscape, KA9Q1, to name a few that I recall). Microsoft did release one, but not until others had been around for a couple of years (or so).

I did a quick test with WfW 3.11 using Microsoft's TCP stack (Microsoft TCP/IP-32.3.11b), and it accepted a configuration with a dis-contiguous network mask:

enter image description here

It does make some attempt at sanity checking though. For example:

enter image description here

As for getting a network set up and working this way...sorry, but that seems like a little more work than I'm willing to invest in this particular bit of trivia. Probably possible, but to really verify, I guess I'd have to set up at least 3 machines, plus a router, with two machines on one subnet and one on another. Just too much work.


1. Technically, I believe KA9Q was actually for MS-DOS, but WfW ran on top of MS-DOS.
3
  • 2
    For more on Winsock history, see How did Microsoft take over Winsocks (Windows Sockets)? IIRC (but this is a minor quibble) KA9Q wasn’t a Winsock implementation; at least, I used it under DOS, not Windows... – Stephen Kitt Feb 23 at 9:25
  • @StephenKitt: That does sound correct, now that you mention it... – Jerry Coffin Feb 23 at 16:46
  • Ah, yes. WfWG 3.11, the only version of DOS-based Windows I ever ran. It didn't seem like an actual operating system before then. (I upgraded to NT 3.1 soon after that - free copy from working on NT at DEC). – another-dave Mar 3 at 12:33
6

The original IP specification talks about network masks, and specifies that bits 1 are part of the network address while bits 0 are host. It doesn't require the 1s to be consecutive (the authors thought that was obvious), many implementers took them literally and allowed non-contiguous netmasks. Later corrections did clarify this and stopped the contortions.

I dimly remember an early ('90es?) Unix in which for kicks we once set such a netmask with no obvious ill effects (in very limited tests, though).

4
  • 2
    But does it work in Windows 3.11? – wizzwizz4 Mar 3 at 8:44
  • @wizzwizz4, if the implementors of the TCP/IP stack did their work carefully, it did. – vonbrand Mar 3 at 11:59
  • Do you have any source about "the authors thought that was obvious and corrected that later"? Because I do see a use for non-contiguous subnet masks that might've worked in class-based routing (if address range allocation would have been done with that option in mind): the option of having a subnet spanning across different Class A/B subnets. – orithena Mar 31 at 16:49
  • I have heard tales of networks that used non-contiguous netmasks to make things work. Specifically a POS (Point-Of-Sale, not the other one) that used a daisy-chained coax network (not the tap-based most coax ethernet used), where "subnet" identified department and all POS terminals forwarded "higher IP" to one side, "lower" to the other. After a store re-org, the original POS terminal <> department assignment no longer worked, and only non-contiguous subnetmasks could sort it out without expensive rewiring. Not, however, Windows... – Vatine 2 days ago

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.