Posted 19 May 2010 - 12:21 AM
This may be a bit basic, if so I apologize, I just don't know how much background you have in this stuff.
An IP subnet is defined as a subset of the entire IP network address space, the 32 bit address we usually write as four decimal numbers, each representing an 8 bit value from 0-255, separated by periods. Originally there were three defined network subsets, known as Class A, B, and C. Class A networks have 8 bits of Network address and 24 bits of Host addresses, while Class B nets have 16 of each, and Class C have 24 bits of Network address and only 8 of Host address. This meant that a Class A network could have a whopping 16 Million 777 thousand and change nodes, while a Class C was limited to 255. This system was simple to process but not very flexible. Modern "classless" subnets can appear in almost any combination of network and host bits. There are lots of references out there that will explain all this in excruciating detail.
There are a couple of important things to note. One is that each subnet has one special host address, the "all 1's" broadcast address which is the highest address in a given subnet. This address is used to communicate with all hosts within the subnet and is used by some pretty important things, like DHCP and RIP router communications. Some older systems used an "all 0's" address for broadcast, but that practice has pretty well died out. If you define multiple overlapping subnets, by changing the mask without paying close attention to the addresses used, these broadcast addresses end up in funny places and oddness occurs.
A second thing to note, and the important one in your case, is that the only way to communicate between subnets is through a router. A router is a host on multiple subnets and knows how to forward packets between them. It does not pass broadcasts (except in a couple of unusual situations) at either the IP or Ethernet levels. In your case you created three subnetworks, but you only have one router address. Some routers, like most Ciscos, can have multiple IP addresses defined on the same physical port (known as Secondary Addresses) and will route between these logical instances, but most home routers don't have that capability. Most devices, like Windows boxen, will complain if you try to define a gateway address that is not within your own defined subnet. Since only one of your subnets has a router attached, the other two don't communicate outside of their own little address spaces.
Now we will throw one more little kink in the works. A key protocol used by IP networks running over Ethernet is ARP, the Address Resolution Protocol. This protocol resolves an IP address to an Ethernet MAC address. All actual communication within a subnet occurs using Ethernet addresses, not IP addresses, and ARP "looks up" the IP address to MAC (Ethernet) address mapping by broadcasting a request for "who has IP address x.x.x.x" and expecting the owner to reply with a MAC address. ARP uses not the IP broadcast but the Ethernet "All 1's" address at the MAC level to broadcast it's requests. Now in your situation if the IP stack were poorly implemented (and a lot of them have been in the past) and did not require the gateway to be within the local subnet the curious thing is that it would actually work. Since all of your subnets are sharing one physical Ethernet network an ARP would get a reply from any node on any of the subnets, including from the router. Communication would then happen using MAC addresses, which could care less what your IP subnet plan is, as it only cares about Ethernet connectivity. This peculiarity was a major source of issues with early VLANs where it caused information to "leak" between subnets and VLANs. Unfortunately (for you) most modern IP stacks are pretty careful about this part of the implementation and won't ARP for any address outside the nodes own IP subnet.
As for OpenWRT, it is firmware for many kinds of home wireless routers that replaces the manufacturer's firmware with much more flexible, advanced, and complex software. It allows you to use many functions unavailable on stock routers, as well as the ability to misconfigure to your hearts delight or even convert your router to a "brick". Check out OpenWrt.org for more info, and be sure to read the Wiki for your specific router before trying to install it. It isn't for the casual home user, but with a little effort you can greatly expand the usefulness of your itty bitty router by adding big router functions. In your case, you can make each of the four ports on the back of your router a separate subnet, complete with it's own gateway address.
Just to clarify your example, you didn't create 14 subnets of 14 hosts, you created one subnet of 16 host addresses, 192.168.1.0 through 192.168.1.15, of which two ( dot 0 and dot 15) are reserved for broadcast addresses. Other subnets can be defined with different masks out of the same base address, for instance 192.168.1.128 mask 255.255.255.128 (or /25) would define another portion of the base network but containing 128 host addresses (with two reserved) from dot 128 to dot 255. Different masks can coexist as long as you are careful not to overlap them and keep them on the binary boundaries.