r1ch.net forums
* Home Help Search Login Register
r1ch.net  |  r1ch.net stuff  |  Other Projects  |  Topic: ForceBindIP - multiple IP addresses with a single ethernet card?
Pages: [1]
Print
Author Topic: ForceBindIP - multiple IP addresses with a single ethernet card?  (Read 10714 times)
Ron Stordahl
Member

Posts: 1


« on: October 17, 2008, 01:52:06 pm »

Before I try ForceBindIP, I have read the description and it implies (at least to me) that a second ethernet card would be required to support a second IP address.

It appears that the Advanced TCP/IP Settings window allows one to add additional IP addresses.  I am hopeful that ForceBindIP will then allow one to use that additional address, while existing applications will continue to use the first address..which I hope will be the default.

Ron
Logged
R1CH
Administrator
Member

Posts: 2625



« Reply #1 on: October 17, 2008, 04:06:54 pm »

Yes, this should work as expected.
Logged
Ron
Guest
« Reply #2 on: October 17, 2008, 05:48:20 pm »

Do I understand your reply correcly....that only one ethernet card is needed and that tasks which are not using ForceBindIP will use the first IP address in the list?
Logged
R1CH
Administrator
Member

Posts: 2625



« Reply #3 on: October 17, 2008, 06:06:46 pm »

Yes, when using ForceBindI you will need to specify the alternate IP you want to use, if you use the adapter guid method, it will just use the first IP.
Logged
QwazyWabbit
Member

Posts: 402


« Reply #4 on: October 18, 2008, 12:12:22 pm »

Hmmm... I have not tried this but if an application doesn't request a specific IP when it binds a socket the IP it listens to is 0.0.0.0 and that address means "any". If an adapter has multiple IP addresses then the application bound that way (to 0.0.0.0) would be able to receive and respond to any packet addressed to any of the associated IP's on the multihomed adapter, not just the first one.

Binding 0.0.0.0:port would make that port unbindable by any other application on any other address on that card, wouldn't it? I have never seen a port bound to 0.0.0.0 that was reused on any other IP. I have seen 127.0.0.1:port and 192.168.1.1:port cohabit.

Or does ForcebindIP choose the first non-any IP address it finds on that adapter?
« Last Edit: October 18, 2008, 12:20:07 pm by QwazyWabbit » Logged
R1CH
Administrator
Member

Posts: 2625



« Reply #5 on: October 18, 2008, 04:32:28 pm »

In the case of a UDP only application, that would be true. However TCP connections will be established from the first IP on the adapter.
Logged
RonStordahl
Member

Posts: 2


« Reply #6 on: January 28, 2010, 03:13:23 pm »

It also appeared to me from the description of ForceBindIP that a second IP address would require a second interface, which I interpreted as a second adapter card.  However from the above I was encouraged that this was not the case and that one could instead use the "advanced settings" to add a second IP address.  I have done so.  My first address being x.x.x.54 and my second being x.x.x.55 as shown in 'Advanced TCP/IP Settings'  Both have the same subnet mask 255.255.255.0 and below that I have a single default gateway x.x.x.254.

I load my application intended for the second address thus:

ForceBindIP x.x.x.55 mytelnetserver.exe

It starts fine, however when from another machine I try a 'telnet x.x.x.55' I still connect to the original telnet server on x.x.x.54 port 23 rather than the one successfully started by the above command.

I will add that before adding the second address into the advanced TCP/IP settings and trying the above, I would get an error box with 'address not available from the local machine.  After adding the second address there is no error box and all appears well.

Perhaps a second network adapter will be required?

Ron Stordahl

Logged
RonStordahl
Member

Posts: 2


« Reply #7 on: January 28, 2010, 03:22:16 pm »

Sorry...I failed to provide some information information for which I will be undoubtly asked:

The machine I am trying this on is WinXP SP3,
Logged
Ron
Guest
« Reply #8 on: January 28, 2010, 05:54:25 pm »

Further...now it is working as I had hoped..with a single network card.  The strange thing is that initially after running forcebindip, the program started as expected, but doing a 'netstat -an' did not show x.x.x.55 had any listening ports created.  I canceled the program, and tried again, and no listening ports for .55 were shown.  Canceled the program and came back an hour later, did exactly the same thing and this time it created the expected listening port 23 thus:

TCP xxx.xxx.xxx.55:23   0.0.0.0     Listening

Now I was able externally to make a telnet connection to .55.

What has changed I do not know.

I would not bring up this, except it leaves me with some expectation this may occur again.  If not of course I will remain bewildered, but satisfied!bmdcw
Logged
R1CH
Administrator
Member

Posts: 2625



« Reply #9 on: January 28, 2010, 10:00:20 pm »

That sounds very strange, no idea what would cause that! ForceBindIP does bind listening sockets too, so it should have worked as expected.
Logged
Pages: [1]
Print
r1ch.net  |  r1ch.net stuff  |  Other Projects  |  Topic: ForceBindIP - multiple IP addresses with a single ethernet card?
Jump to:  

Powered by SMF 1.1.19 | SMF © 2013, Simple Machines