You can set IP alias on any network interface (such as en0, en1,..) temporarily (using ifconfig command) or permanently (by adding entry in ODM) in AIX. Here are some commands which you may refer whilst working on this concept.
To temporarily add IP alias :
You can use the below command to set IP alias temporarily ie., the alias will be lost after a server reboot.
#ifconfig en0 alias 192.168.1.2 netmask 255.255.255.0 up
To permanently add IP Alias :
Below command will amend the ODM entry, so the alias will be available even after a server reboot.
# chdev -l en0 -a alias4=192.168.1.2,255.255.255.0
To remove a temporary IP alias :
This would remove the alias from the current ip table, but it would not remove from the ODM. If you like to erase it from ODM, then use the "chdev" or "smitty".
# ifconfig en0 delete 192.168.1.2
To remove IP alias permanently :
This command will work only if IP alias was added in ODM using smitty or chdev command. If you have added using "ifconfig" command, then it is set temporarily, so this command would not work.
#chdev -l en0 -a delalias4=192.168.1.2,255.255.255.0
To display current IP table including IP alias :
# ifconfig -a
To display permanently added IP alias :
# lsattr -El en0
No comments:
Post a Comment