cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
324
Views
0
Helpful
8
Replies

Can gateway be in different network form thier PCs?

zillah2004
Level 1
Level 1

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

8 Replies 8

scottmac
Level 10
Level 10

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

Thanks ScottMac, could you please expalin more, because, I want to raise many questions after that, about ARP,

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

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.

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

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

HTH

Rick

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

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

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: