Friday, December 28, 2012

How to add IP alias in AIX?


How to add IP alias in AIX?

Using "smitty" we can configure the IP alias in AIX. It is better to use “smitty tcpip” to check and verify configuration and interfaces.

Steps using SMITTY:


smitty tcpip --> Further configuration -->Network interface -->Network interface selection -->Configure alias --> Add an IPV4 Network Alias (Here select the available interface  and press enter and the Next screen, we need to insert an IP address and the relative subnet mask and press enter.

At the end of configuration commands we get the status (“OK” if everything is ok)

Validation: 

Execute the #ifconfig -a command and confirm the newly added IP alias has been present.


Steps using CLI:


To temporarily add the IP alias by ifconfig:

           ( Syntax )         #ifconfig <interface> alias <IP_address> netmask <netmask> up

(For example) : #ifconfig en0 alias 192.168.4.75 netmask 255.255.255.0 up


To remove the temporarily added IP alias by ifconfig:

             (Syntax)          #ifconfig <interface> delete <IP_address>

(For Example) #ifconfig en0 delete 192.168.4.75 


Note: ( ifconfig command change or assign ip just temporary, if you reboot system, the IP alias configuration will be lost )


Please follow the below steps to permanently add the IP alias. 


To permanently add the IP alias:

          (Syntax)  #chdev -l <interface> -a alias4=<IP_address>,<Netmask>

(For example) #chdev -l en0 -a alias4=192.168.4.75,255.255.255.0


To remove the permanently added IP alias:



            (Syntax)  #chdev -l <interface> -a delalias4=<IP_address>,<Netmask>

(For example) #chdev -l en0 -a delalias4=192.168.2.75,255.255.255.0


Validation: 


Execute the #ifconfig command and confirm the newly added IP alias has been present.


Note: /etc/hosts file has to be edited with the correct entries for the IP aliases.







If you happy with above topic, Kindly rate your reactions/comments below