01-15-2005 09:12 AM - edited 03-02-2019 09:05 PM
I just want to double check ,can the gateway be in different nework for the its network?As far as I know to my limit knowledge, that the gateway should be in the same network with its or thier computer(s) respectivly,,,Am I right?
Because when I checked my ADSL LinkSys I found these:
ADSL Link: Up
PPP Login: Connected
Internet IP Address: 217.164.71.43
Public Subnet Mask: 255.255.255.0
Default Gateway: 213.42.4.25
Primary DNS Server: 195.229.241.222
01-15-2005 11:07 PM
You are correct. The Default Gateway needs to be a member / peer of the same network as the hosts it will service.
The host makes the decision as to whether the L3 destination address of the IP packet is "local" (same LAN) or "remote" (off-LAN). If it is off-LAN, the layer two address of the Gateway is installed as the L2 destination of the frame (per ARP).
If the Gateway is on a different LAN, the host has no way of resolving a path to the Gateway.
FWIW
Scott
01-16-2005 12:59 AM
Thanks ScottMac, could you please expalin more, because, I want to raise many questions after that, about ARP,
01-16-2005 02:42 AM
If you are cncerned about the ARP cache, then you should know this: if the destination is on the same (sub)network, then the machine sends an ARP broadcast for the destination. The destination responds giving its layer-2 MAC address, which then gets put into the ARP table.
OTOH, if the destination is on a different (sub)net, then the machine ARPs for the default gateway instead. The gateway (which should be on the same (sub)net) comes back with its MAC address. The machine then sends the packet to the gateway for forwarding.
This still leaves you with a question unanswered: why your linksys seems to have a default gateway that is on a different subnet. I don't honestly know. I was wondering whether it was a misconfiguration, or perhaps doing NAT. But the NAT scenario does not seem to fit either, because normally you would expect the inside network to be in private address space, not a 217.
Kevin Dorrell
Luxembourg
01-16-2005 05:21 AM
I believe recursive lookup should allow you to have a default gateway to be on a different network. If you have something like:
to reach 213.42.4.25 go to 217.164.71.44, then you have resoloved your default next hop on a different network.
You can also have an interface as a next hop. e.g. default-gateway = ATM1/0.2
In addition PPP also installs a route in the local router for the remote end.
Hope this helps.
01-16-2005 05:43 AM
For this to work, wouldn't the PC itself have to know the recursion path? AFAIK, a host will not ARP for anything that is off its own (sub)net, not even for a router.
The only exception I know is in Solaris, where you can configure your own address as the next-hop gateway; that will make it ARP for everything. You would then be relying on proxy-arp to find the router.
Kevin Dorrell
Luxembourg
01-16-2005 06:27 PM
In fact it is not uncommon in Windows environments for the PC Gateway address to be the PCs own address. It works as long as some device on the broadcast domain (subnet) is doing proxy ARP.
HTH
Rick
01-16-2005 09:43 PM
OK, thanks for that Rick. I had only ever used that config on Solaris, and assumed it was not a standard.
I use proxy ARP on my network, but sometimes it would be useful to add an access list do it selectively, i.e. to selected hosts and/or for selected destinations only. But IOS does not have that feature AFAIK.
Kevin Dorrell
Luxembourg
01-16-2005 09:44 PM
I don't know the technical explaination behind this behavior, but PPP peers can be on completely different subnets due to the fact that a host route is installed by each peer.
There is no recursive routing involved, it just works this way.
:) Daniel
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide