You are not logged in.

#1 2007-12-31 01:32:20

Alnicolli
Member
Registered: 2007-10-21
Posts: 6

Multiple loopback..is it possible?

Hi,
I need to test a client/server application:  I need to run several clients applications with different ip addresses that comunicates with a single server application, but all applications has to run on the same fisical machine. The server application has to see each client with his specific ip. Do you know how I can configure different ip address for each client application , all on the same machine? 

Thankyou!!

Alnicolli

Offline

#2 2007-12-31 08:21:40

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: Multiple loopback..is it possible?

ifconfig lo:1 inet 127.0.0.2 up


1000

Offline

#3 2007-12-31 09:03:54

Alnicolli
Member
Registered: 2007-10-21
Posts: 6

Re: Multiple loopback..is it possible?

Thankyou for  reply

byte wrote:

ifconfig lo:1 inet 127.0.0.2 up

Yes, that's my first attempt.

The problem with such solution is that you can bind (with bind() function in C language ) the client socket to 127.0.0.2 and you can send packets without errors, but the resulting source address is always 127.0.0.1. No way to make it change! By the way, I'm using UDP protocol, I don't know if that change something. Anyway, I need each client to send UDP packets with different source IP .... that's the problem..

Alnicolli

Last edited by Alnicolli (2007-12-31 09:12:40)

Offline

#4 2008-01-01 12:20:47

Alnicolli
Member
Registered: 2007-10-21
Posts: 6

Re: Multiple loopback..is it possible?

Please, does anyone knows how to solve it? :-)

Offline

Board footer

Powered by FluxBB