If doable, how many of the ifconfig parameters can apply
to an aliased address?
Thanks. Kindly email. -- George
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
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.
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
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.
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
==========================================