The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > AIX
Google UNIX.COM


AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

More UNIX and Linux Forum Topics You Might Find Helpful
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

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 06-01-2006
Registered User
 

Join Date: May 2006
Posts: 7
Post how many ip's

in aix how many ip's we can assign for single NIC .
Reply With Quote
Forum Sponsor
  #2  
Old 06-15-2006
kduffin's Avatar
UN1X
 

Join Date: Nov 2003
Location: Virginia
Posts: 441
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
Reply With Quote
  #3  
Old 06-30-2008
Registered User
 

Join Date: Jun 2008
Posts: 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.
Reply With Quote
  #4  
Old 06-30-2008
Bughunter Extraordinaire
 

Join Date: May 2005
Location: In the leftmost byte of /dev/kmem
Posts: 1,262
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
Reply With Quote
  #5  
Old 07-01-2008
Registered User
 

Join Date: Jun 2008
Posts: 3
Thanks so much for your help!
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 06:18 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0