LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-19-2009, 11:45 PM   #1
johnsee
LQ Newbie
 
Registered: Oct 2008
Posts: 4

Rep: Reputation: 0
Smile How can I know the IP address was moved to another host immediately ?


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.
Code:
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.
Code:
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 changed immediately,
and I really want to get "connection reset by peer" in second case. :-)

Thank you in advance!

Last edited by johnsee; 02-20-2009 at 12:07 AM.
 
Old 02-22-2009, 03:13 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
With kernel patch I see a way to solve the problem. Without that - only by forcing the connection in step 1 to get outside instead of being local.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
after I had my ip address changed..... chownuseradd Linux - Newbie 3 09-19-2008 09:10 AM
Changed MAC - address czezz Solaris / OpenSolaris 1 06-15-2008 04:10 PM
Changed MAC - address czezz Solaris / OpenSolaris 4 06-10-2008 11:30 AM
how source address can be changed in packet payal_shah Linux - Networking 3 03-29-2005 06:56 AM
IP Address Is Getting Changed When System Get Suspend mehuljv Linux - Newbie 0 11-20-2004 03:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration