Default Gateway outside of subnet

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?

Reply to
pk
Loading thread data ...

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.

Reply to
Walter Roberson

On 21.05.2007 17:24 Walter Roberson wrote

Never heard of this. How does that work?

Arnold

Reply to
Arnold Nipper

Windows 2000 and later (not sure about earlier).

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.

Reply to
Walter Roberson

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.

Jim

Reply to
Scooby

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.

Reply to
JF Mezei

On 21.05.2007 19:15 Walter Roberson wrote

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.

Arnold

Reply to
Arnold Nipper

You can configure static routes on the router that point to the interface:

ip route ethernet0/1

The only benefit of this over the more normal mechanism of secondary addresses is that you don't waste an address for the router.

Reply to
Barry Margolin

JF Mezei crashed Echelon writing news:d53bf$4651e73b$cef8887a$ snipped-for-privacy@TEKSAVVY.COM:

My ISP is actually using the system. I have no deep knowledge how it works.

My ISP assigns IP through DHCP and for some reason my router is getting:

Internet IP Address: 212.242.205.253 Internet Netmask: 255.255.255.0 Internet Gateway: 212.242.2.149

The logic sense to me says above should not work, but it works fine, and apparently is implemented even on the big net.

Reply to
Bjarke Andersen

writingnews:d53bf$4651e73b$cef8887a$ snipped-for-privacy@TEKSAVVY.COM:

Official name: loop0.mxc1-vbgx.ip.cybercity.dk IP address: 212.242.2.149

It looks like your ISP is setting the default gateway to a loopback iinterface (a logical interface) on the ISP's router that terminates your link to the ISP.

Reply to
Merv

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.

Reply to
JF Mezei

JF Mezei crashed Echelon writing news:8c9a8$46533c9a$cef8887a$ snipped-for-privacy@TEKSAVVY.COM:

Wooops, the router actually runs PPPoA, so I guess I blew that theory.

Reply to
Bjarke Andersen

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.