* mult IP address on same network interface?
@ 1995-04-17 4:00 Brian Field
1995-04-18 4:00 ` Brian Field
1995-04-21 4:00 ` Eric Werme
0 siblings, 2 replies; 3+ messages in thread
From: Brian Field @ 1995-04-17 4:00 UTC (permalink / raw)
I'm writing a piece of code which needs to emulate n hosts with
different IP addresses. Rather than run this piece of code physically
on n different hosts, I'd like to run it on a single host, but
configure this host to appear as n different IP address (all within
the same subnet). This host has a single network interface.
Can I do something like:
ifconfig ln0 inet a.b.c.d
ifconfig ln0:1 inet a.b.c.e
...
such that traffic for IP address a.b.c.[d, e, ..] are all routed to ln0?
Can I configure this in rc.config? Something like:
NETDEV_0="ln0"
NETDEV_1="ln0"
...
IFCONFIG_0="a.b.c.d ..."
IFCONFIG_1="a.b.c.e ..."
...
Will this support multiple IP addresses on ln0, or will ln0 have the
IP address from the last IFCONFIG_? line?
I know this is possible in Solaris, AIX, and a few other flavors of
unix. Does this work in OSF?
Brian
[I had posted this question to a couple of general unix groups, but it
now turns out, that I need to get my sw running on an OSF box and
didn't hear back one way or the other for OSF...]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mult IP address on same network interface?
1995-04-17 4:00 mult IP address on same network interface? Brian Field
@ 1995-04-18 4:00 ` Brian Field
1995-04-21 4:00 ` Eric Werme
1 sibling, 0 replies; 3+ messages in thread
From: Brian Field @ 1995-04-18 4:00 UTC (permalink / raw)
Brian Field (field@cs.pitt.edu) wrote:
: Can I do something like:
: ifconfig ln0 inet a.b.c.d
: ifconfig ln0:1 inet a.b.c.e
: ...
: such that traffic for IP address a.b.c.[d, e, ..] are all routed to ln0?
Ok, I re-read the man page and it appears that an alias flag is
supported with ifconfig. So, it look like I should be able to:
ifconfig ln0 inet a.b.c.d ...
ifconfig ln0 inet a.b.c.e ... alias
Now, I'm trying to do the second form (with the alias parameter) from
the command line (as root) and am getting the following error message:
ifconfig: ioctl (SIOCAIFADDR): File exists
Any ideas what file its complaining about?
Thanks
Brian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mult IP address on same network interface?
1995-04-17 4:00 mult IP address on same network interface? Brian Field
1995-04-18 4:00 ` Brian Field
@ 1995-04-21 4:00 ` Eric Werme
1 sibling, 0 replies; 3+ messages in thread
From: Eric Werme @ 1995-04-21 4:00 UTC (permalink / raw)
field@cs.pitt.edu (Brian Field) writes:
>I'm writing a piece of code which needs to emulate n hosts with
>different IP addresses. Rather than run this piece of code physically
>on n different hosts, I'd like to run it on a single host, but
>configure this host to appear as n different IP address (all within
>the same subnet). This host has a single network interface.
>Can I do something like:
Maybe: from man ifconfig:
alias Establishes an additional network address for this interface.
This is sometimes useful when changing network numbers and one
wishes to accept packets addressed to the old interface.
This is something added for ASE (Available Server Environment) where an IP
address moves to another server on failure. One IP address is fixed, the
other is temporary. I don't know if it supports multiple addresses.
--
Eric (Ric) Werme | werme@zk3.dec.com
Digital Equipment Corp. | This space intentionally left blank.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1995-04-21 4:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-04-17 4:00 mult IP address on same network interface? Brian Field
1995-04-18 4:00 ` Brian Field
1995-04-21 4:00 ` Eric Werme
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox