Networking Forums

Networking Forums > Computer Networking > Linux Networking > How can I know the IP address was moved to another host immediately ?

Reply
Thread Tools Display Modes

How can I know the IP address was moved to another host immediately ?

 
 
John Shi
Guest
Posts: n/a

 
      02-20-2009, 08:05 AM
Hello everyone, I have a question:

There are three hosts, A1, A2 and B,

First, B connected to A1 through TCP, and state is ESTABLISHED.
Now, I move the IP address from A1 to A2, that is to say,
A1 was changed to A2, B will connect to A2 after a while if B sent ARP
request,
Ok, I know B will be failed and get the error message: connection reset
by peer.
But, this case is what I want.

step1: B ------> A1 ( 192.168.0.1) # ESTABLISHED

step2: B ------> A1 (none) # hanging

step3: B ------> A2 (192.168.0.1) # connection reset

In another occasion, There are two hosts, A and B,
A has 2 IP address on eth0, IP1 and IP2, I create a TCP connection
from A(IP1) to A(IP2), and it's ESTABLISHED.
Now, I move the A(IP2) from A to B, that is to say,
B was changed to A, but A(IP1) never connect to B(IP2),
because this connection will not send ARP request,
it's always through local, so I would not get the error message,
and hanging about 12 minutes.

step1: A (192.168.0.1) -----> A (192.168.0.2) # ESTABLISHED

step2: A (192.168.0.1) -----> A (none) # hanging

step3: A (192.168.0.1) -----> A (none) # hanging
B (192.168.0.2) # no one will
connect to this host

How can I know the IP address was moved to another host immediately,
and I really want to get "connection reset by peer" in second case. :-)

Thank you in advance!

- John Shi

 
Reply With Quote
 
 
 
 
David Schwartz
Guest
Posts: n/a

 
      02-20-2009, 02:05 PM
On Feb 20, 1:05*am, John Shi <see...@gmail.com> wrote:

> Now, I move the IP address from A1 to A2, that is to say,
> A1 was changed to A2, B will connect to A2 after a while if B sent ARP
> request,
> Ok, I know B will be failed and get the error message: connection reset
> by peer.
> But, this case is what I want.


You moved the IP address in a defective way.

If you want this to work, before you move the IP address, you'll need
to do something about the TCP connections (perhaps reset them). And
after you move it, you'll want the other machine to send a gratuitous
ARP. Essentially, you didn't really move the IP properly.

DS
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Win XP's Universal Plug and Play Device Host service starts and thenstops immediately YKhan Windows Networking 6 03-29-2009 07:39 PM
How to obtain an IP-address immediately Johann Höchtl Linux Networking 7 07-22-2007 02:43 PM
Moved premises, moved number, what about ADSL? Tx2 Broadband 10 06-16-2004 06:23 PM
ICS Host Address Geoff Lane Home Networking 1 10-02-2003 11:05 AM
ICS Host Address Geoff Lane Linux Networking 2 10-02-2003 10:49 AM



1 2 3 4 5 6 7 8 9 10 11