Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IP Aliasing on AIX -- How?

217 views
Skip to first unread message

George H. Bosworth

unread,
Mar 9, 1997, 3:00:00 AM3/9/97
to

In AIX, how (if at all) can one asscociate multiple IP
addresses with one physical interace, e.g. "aliased" or
"logical" or "virtual" addresses, so to be able to advertise
multple address via one Ethernet interface??

If doable, how many of the ifconfig parameters can apply
to an aliased address?

Thanks. Kindly email. -- George

Dave Marquardt

unread,
Mar 10, 1997, 3:00:00 AM3/10/97
to

Hmm, I wonder if this one is a FAQ yet!

ifconfig en0 inet <address> netmask <mask> alias

is all that's required. The system makes no distinction between the
addresses attached to an interface, so as to your second question, if
I understand it correctly, the answer is

All of them

-Dave

Simon Marchese

unread,
Mar 11, 1997, 3:00:00 AM3/11/97
to

Watch out for your netmasks. You can give different netmasks to your IP
aliases, but you can't work them out from netstat -r. ifconfig only
shows one alias and it's netmask.

While we're on the subject, I can get all the addresses in a program
using ioctl(SIOCGIFCONF) but can only get one of the netmasks using
ioctl(SIOCGIFNETMASK). Any ideas how I can get all the netmasks in a
program?

Simon.

Dan Anderson

unread,
Mar 11, 1997, 3:00:00 AM3/11/97
to

For info, type man ifconfig
Example:
ifconfig en0 inet 10.1.2.3 alias
where en0 is the name of your interface and 10.1.2.3 is the alias IP.
Confirm by typing
netstat -rn
and by
ping 10.1.2.3

Don't know the limit, if any.

geo...@netcom.com (George H. Bosworth) wrote:
>In AIX, how (if at all) can one asscociate multiple IP
>addresses with one physical interace, e.g. "aliased" or
>"logical" or "virtual" addresses, so to be able to advertise
>multple address via one Ethernet interface??
>If doable, how many of the ifconfig parameters can apply
>to an aliased address?


-
Dan Anderson, d...@bluebird.com, +1-619-438-2220 x354 (FAX +1-619-438-4560)
Bluebird Systems, 5900 La Place Court, Carlsbad, CA 92008-8806, USA

jke...@ibm.net

unread,
Mar 16, 1997, 3:00:00 AM3/16/97
to

In <georgebE...@netcom.com>, geo...@netcom.com (George H. Bosworth) writes:
>In AIX, how (if at all) can one asscociate multiple IP
>addresses with one physical interace, e.g. "aliased" or
>"logical" or "virtual" addresses, so to be able to advertise
>multple address via one Ethernet interface??
>
>If doable, how many of the ifconfig parameters can apply
>to an aliased address?
>
>Thanks. Kindly email. -- George
Syntax is standard ifconfig plus word 'alias', i.e.,
ifconfig en0 192.1.1.1 netmask 255.255.255.0 alias
ifconfig en0 192.2.1.1 netmask 255.255.255.0 alias

To have it set up this way each time you reboot, add the alias lines
to your /etc/rc.net file.

You can use all of the normal ifconfig parms, I think. Never had a problem
with this.

Taras Dowhaluk

unread,
Mar 20, 1997, 3:00:00 AM3/20/97
to

I've tried IP aliasing on several Unix platforms but the following
results are strange.
I can ping via the IP alias but I can't telnet using it because the src
addr in the
telnet packets is the "real" IP address and not the alias, ie. the ping
leaves,
correctly, on "logical" interface but the telnet leaves, incorrectly,
on the "real" interface.

For example, hosts "real" IP address on interface en0 is 192.168.1.1,
netmask 255.255.255.0.

Have set up an alias thus,
ifconfig en0 202.12.75.34 netmask 255.255.255.248 alias up

202.12.75.33 is a router to another subnet and ping 202.12.75.33, not
surpisingly, pings this router. Have also set a static route to another
host thru this router thus,
route add 200.100.75.106 202.12.75.33
And, not surprisingly, a ping 200.100.75.106 pings the host. But, a
telnet 200.100.75.106 times out.

Now, tcpdump on en0 shows that the src addr on the ping is the alias IP
address, ie. 202.12.75.34, but on the telnet the src addr is the "real"
IP address 192.168.1.1, and so the telnet packets go out to the router
but the router filters out everything but the 202.12.75.32 sub-net.

Anyone seen anything like this ?
BTW, AIX4.2 on a J40.

--


regards, taras

==========================================
Taras M. Dowhaluk
VisionDB Pty Ltd
Sydney, Australia
tar...@visiondb.com.au
http://www.visiondb.com.au
==========================================

0 new messages