How to add IP alias in AIX?

Adding 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 alias 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 delete  

(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 -a alias4=, 

(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 -a delalias4=, 

(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.

Comments

Popular posts from this blog

How to Install and Configure Kubernetes Cluster and Docker on CentOS8/RHEL8

How to install Ansible Tower on Red Hat / CentOS

How to install Ansible on RHEL8 / CentOS8