![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Assigning IP's | macgre_r | HP-UX | 12 | 11-30-2007 06:49 PM |
| find the IP's on the sever | habuzahra | AIX | 1 | 10-30-2007 01:56 AM |
| Extracting IP's from a file | eth0 | Shell Programming and Scripting | 14 | 08-18-2006 11:35 AM |
| pinging IP's in a file | jalge2 | AIX | 2 | 06-21-2005 12:47 PM |
| stopping ip's from accessing apache | lawadm1 | UNIX for Dummies Questions & Answers | 2 | 09-27-2004 06:21 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
in aix how many ip's we can assign for single NIC .
|
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
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
|
|||
|
|||
|
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
|
|||
|
|||
|
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 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
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
|
|||
|
|||
|
Thanks so much for your help!
|
|||
| Google The UNIX and Linux Forums |