Re: Default Gateway outside of subnet



In article <4651de29$0$15304$ec3e2dad@xxxxxxxxxxxxxxxxxxxxxx>,
"Scooby" <mmscooby1@xxxxxxxxxxxxx> wrote:

"Walter Roberson" <roberson@xxxxxxxxxxxx> wrote in message
news:itk4i.201922$DE1.98400@xxxxxxxxxxxx
In article <4651C977.40501@xxxxxxxxx>, Arnold Nipper <arnold@xxxxxxxxx>
wrote:
On 21.05.2007 17:24 Walter Roberson wrote

In article <f2saaf$4dg$1@xxxxxxxx>, pk <philip.kluss@xxxxxxxxx> wrote:
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

Never heard of this. How does that work?

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.

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?

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

ip route <subnet> <mask> 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.

--
Barry Margolin, barmar@xxxxxxxxxxxx
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
.



Relevant Pages

  • Re: Ip forwarding
    ... Packets that are meant to be forwarded by a router must be sent to its MAC address on the link. ... The gateway column optionnally contains the address of the next hop router if the destination is not directly reachable on the network attached to the output interface. ... In both cases the packet is sent on the link to the next hop MAC address. ...
    (comp.os.linux.networking)
  • [Tool] - Nat Probe
    ... and detect all the host that allow it. ... When we use a Gateway, we send the packets with IP dest of the target, ... but the dest mac on the ethernet is the mac at the Gateway. ... If we send a packet to the diferents macs in the lan, ...
    (Pen-Test)
  • Workgroup that spans more than one subnet in Samba
    ... I want a workgroup that spands two IP subnets. ... eth0:192.168.0.1 and gateway of the 192.168.0.0/24 ... The Gateway is a Fedora Core 3 box where I have Samba ... running with this configuration: ...
    (comp.os.linux.networking)
  • Re: MAC and gateways
    ... My question is basically if it is possible to preserve the MAC address ... somehow as the packet cross the gateway. ... on the same network segment (say, using a VPN or a Point-to-point ...
    (comp.os.linux.networking)
  • Re: Socket Bind(Virtual IP) LocalEndPoint
    ... When Truck and Gateway ... each truck GPS position because every packet received from internet is ... Create Asynchronous Socket for Listening ...
    (microsoft.public.win32.programmer.networks)