lkml.org 
[lkml]   [2000]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: IP address for processes
On Thu, 2 Mar 2000, Justin wrote:
> > This may sound odd, but i want to know if any body
> > has done any work on assigning IP addresses (may be
> > Virtual IP) to processes. I am exploring ways on how
> > to provide IP addresses for processes, files, other
> > resources , etc. . I would like to get your opinion on
> > this.
>
> If you're root, no problem, just add an alias. Otherwise you'd need some
> nice, safe, and sane hook for regular users to do such, and no matter what
> you do to enforce playing nice with that kind of capability, you're
> probably going to open the system up to abuse.

I'm not aware of any completely transparent way to do this, it usually
requires some intervention of the process in some way (like in the alias
case, the process needs to actively bind to the IP it's supposed to bind
to, cf. multi-homed Apache).

There is another way (which is not as dangerous) and which works
differently which although it might not be of use here, is quite
underused I think. It is the ethertap device. I've used this to assign a
completely virtual IP to the simulated network card of an embedded system
running in a simulator on the host PC, so that I can telnet into the
simulation. Pretty cool, same thing that vmware does.

Basically you compile in ethertap support, make sure you have the
/dev/tap0 etc. entries, then do something like

# ifconfig tap0 192.168.1.1 up arp

and then it's up to you to setup netmask for it as well, routes etc. it
works like a virtual network card connected to a virtual network that ends
in /dev/tap0. you can read/write packets from the process to /dev/tap0. so
192.168.1.2 in this case could be the simulator itself, and 192.168.1.1 is
the pc's virtual network card connected to that net.

perhaps you could make a switch program, which assigns tap0, tap1 etc.,
and read/writes from them and forwards it locally to different ports.
problem is, you still can't get like 20 processes running on the same
port, but on different IP's, as long as you don't actually insert the
alias or ethertap knowledge into the processes..

-bjorn



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.030 / U:1.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site