how many ip's


 
Thread Tools Search this Thread
Operating Systems AIX how many ip's
# 1  
Old 06-01-2006
Java how many ip's

in aix how many ip's we can assign for single NIC .
# 2  
Old 06-15-2006
I would recommend having multiple IPs reside at your router rather than your host - it will handle it better.

But AIX does allow for the creation of aliases as part of the ifconfig command. I don't know that IBM has a recommended limit, but I've heard numbers between 40-50 as the limit. What version of AIX are you using and what are you trying to accomplish by binding multiple IPs to the interface?

Cheers,

Keith
# 3  
Old 06-30-2008
Lets say you wanted to assign 30 ips to 1 nic, Is there a script that can do this.
My knowledge of unix is very limited, and any help would be appreciated.
# 4  
Old 06-30-2008
Actually assigning an IP adress to an interface is one command, either "ifconfig", as mentioned or - the AIX way - "chdev". If you have a list of IP adresses and want to assign them to an interface via a script that could be accomplished as simple as:

First prepare a list of the IP adresses in a file. For this example we'll call the file "/tmp/myips.list":

Code:
# cat /tmp/myips.list
10.1.1.1
10.2.1.1
10.3.2.2
10.4.3.3
10.5.4.5

Now we create a script that reads this file, line by line and fills the content of the line read into the prepared command. Save the following to a file "/tmp/setips.ksh":

Code:
#! /bin/ksh

typeset IP=""

cat /tmp/myips.list | while read IP ; do
     chdev -l en0 -a alias4=${IP},255.255.255.0
done

exit 0

Set the execute bit and execute as root to run it.

This script has several limitations: it assumes (maybe falsely so) that the subnet mask is always "255.255.255.0" and the interface to configure is always "en0", it does nothing to check if the configuration file /tmp/myips.list is there, if it is readable and if it contains data which makes sense, it uses a fixed config file instead of a configurable one, it has no error handling (what happens if the "chdev" command is unable to complete for whatever reason?), etc., etc. - but assuming everything works well it will do what you asked for.

If you want to write a better (more versatile) script and need help ask in the "shell scripting and programming" forum.

I hope this helps.

bakunin
# 5  
Old 07-01-2008
Thanks so much for your help!
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question