Google Answers Logo
View Question
 
Q: Routing if your own ip address the default gateway in windows xp? ( No Answer,   1 Comment )
Question  
Subject: Routing if your own ip address the default gateway in windows xp?
Category: Computers > Internet
Asked by: vikky999-ga
List Price: $9.50
Posted: 17 Oct 2006 23:01 PDT
Expires: 16 Nov 2006 22:01 PST
Question ID: 774585
Routing if your own ip address the default gateway in windows xp?

Hi I have two laptops running windows XP A & B which can ping each
other just fine if i assign them the following ip addresses. They are
connected via crossover cable.

A: 192.168.0.1
Subnet: 255.255.255.0

B: 192.168.0.2
Subnet 255.255.255.0

However If i change the ip & subnet of B to

B: 192.168.1.2
Subnet: 255.255.0.0

Ping from A ----> B gives an expected and immediate
Desination host unreachable

Ping from B ----> A gives me a
Request Timed out

since B succesfully sends the ping to A but A cannot route the pong back to B

Now here is the weird part ...
If I add the ip of A as the default gateway for A
now B can ping A successfully and A can now route the pong back to B.

WHY WHY WHY ??

Since all packets sent by A to A's ip address are sent back via
loopback , I dont understand why adding it as a default gateway should
allow the pong to reach the wire ??
Additional Details

56 minutes ago
Im not asking how to fix this problem but putting them in the same
subnet. I realise they are in different subnets where one is subnet is
a subset of the other.

My question is why does adding the default gateway as "itself" allow
the smaller subnet to be able to route packets to the larger subnet.
Since all packets sent to itself are sent to loopback and never should
show up on the wire.

I dont know if this behaviour is OS specific..im running windows XP on both machines

Request for Question Clarification by keystroke-ga on 18 Oct 2006 13:20 PDT
Hello Vikky,

Within a LAN you are running at the second layer of the OSI model -
Data Link. The Data Link layer works on the MAC address of a computer
NOT the level 3 Network layer which uses the IP. Provided the NIC can
see the MAC of the card it is trying to communicate with it will
communicate successfully. Your Windows XP machine has basic Routing
functions built into it (Internet Connection sharing is a basic
router).

Telling the NIC to use itself gives the NIC the ability to route the
frames out of its interface. In this case the NIC already received a
frame from computer B so the machine knows that the destination is
situated out of the only port it possesses.

If the NIC did not know the MAC address it would perform what is known
as a MAC Broadcast causing its ARP cache to be updated after the Ack
was received.
In this instance the PC knew that the IP 192.168.1.2 was associated
with MAC address 00:00:00:00:00:00.

When the ping was sent from 192.168.0.1 to IP 192.168.1.2 it was sent
to MAC address 00:00:00:00:00:00 at the Data Link layer over the
Ethernet LAN allowing the frame to be delivered.

Let me know how this works for you.

--keystroke-ga
Answer  
There is no answer at this time.

Comments  
Subject: Re: Routing if your own ip address the default gateway in windows xp?
From: c0r3dump-ga on 18 Oct 2006 04:29 PDT
 
Because of the ARP Protocol,

When A (as gateway) recives a packet for B from A (himself, loopback)
looks in his ARP table for the address of B, if it isn`t in the ARP
table, ask everyone in the net sending a packet ARP request.

For more information look at RFC 826

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy