If I have 4 disjoint subnets all joined together in one VLAN, can they all reference the same default gateway address that is located in one of the subnets or do I have to assign the default gateway an address in each of the four subnets?
Some operating systems will ARP for the default gateway if it is not in the same subnet, but others will not; and even if the OS does ARP, there is no certainty that the default gateway will respond with something useful.
The rule of thumb is that the default gateway should be in the same subnet as the device itself.
If I understand correctly, the ARPs are sent to the all-1's MAC broadcast address. If the intended receiver picks it up and replies, then it will reply to the MAC address of the sender: this will be received even if the sender is in a different subnet than the receiver (the host trying to get out.) The host trying to get out then knows the MAC address of the default gateway, which is all it needs to route packets through that gateway.
Actually, I've heard of this working as well, but this description alone doesn't fill in the whole picture for me. Sure, that seems easy enough to get the packet out. However, when the packet returns to an IP that the router does not have an interface for, what does it do? How does it know to send the packet out to the correct mac address instead of just forwarding it along to its own next hop route? Perhaps it remembers the info from the incoming packet. But, what if the conversation was initiated from a device outside the network to one of the devices inside and the arp entry was not already there?
Are you sure you weren't thinking of IRDP? That is a router discovery protocol, but I believe that it still requires the router ip to be on the local subnet.
Either way, not a good idea to configure a network like this. To answer the original question, yes, the router should have an ip on each individual subnet. You can separated these into individual vlans and trunk, or you can add secondary addresses to the interface.
The whole point of a subnet is to let nodes know to whom they can talk to directly without going through a router. So for a node to be able to reach a router directly, that router needs to have an IP in the same subnet as that node.
The proper way to do this is to get your router/gateway to have multiple IPs, one in each of the subnets.
Someone mentioned some hack in some version of Windows. This isn't part of a standard, and Microsoft can change or desupport this anytime it wants.
That's what you always do. Right? But typically you put in an IP address into the ARP frame whose MAC address you are looking for. So if you don't have any idea how your default gateway looks like which IP address do you put in?
And even if someone is responding (which eventually will happend when someone has proxy ARP turned on) you still are not sure that this device is really a default gateway.
Would be good if you could dig out any document explaining your idea in detail.
Assuming this is true DHCP and there is no PPP/PPPOE involved between the user site and ISP router, how would this work ?
If the gateway router is outside the defined user's subnet, what would happen behind the scenes to cause the user's machine to interact with the router that is outside its subnet ?
Or is this a case where the DHCP response might include multiple default gateways and deep down, the user's computer would select the one with the right IP in the same subnet, while its displays would just show the first one ?
(aka, if the physical router has multiple IP interfaces, one for each subnet, they would all be included in the DHCP response and let the user computers use the right one).
With PPPoE/PPP, I understand how it is possible to have 2 IPs that are not in the same subnet at each end of the PPP link. A packet that enters the PPP segment blindly comes out at the other end no matter what IPs are involved and there is no ARP involved.