Wednesday, May 29, 2013

How to add virtual IP in AIX

Adding virtual IP address to an existing network interface is pretty easy.

You can try doing it with smitty - I've found two ways in getting to the required screen:
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.

Second way:
smitty netinterface -> Network Interface Selection -> Configure Aliases

You can also do it directly from the command line:
chdev -l en0 -a alias4=192.168.0.120,255.255.255.0

and remove this alias using:
chdev -l en0 -a delalias4=192.168.0.120,255.255.255.0

Once configured this alias will be persistent over reboots.
You can add multiple aliases to one network interface.
To verify if alias was setup correctly run:
# ifconfig -a
en0: flags=5e080863,c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),PSEG,LARGESEND,CHAIN>
        inet 10.0.0.10 netmask 0xffffff00 broadcast 10.157.86.255
        inet 192.168.0.120 netmask 0xffffff00 broadcast 169.168.23.255
         tcp_sendspace 131072 tcp_recvspace 65536 rfc1323 0
lo0: flags=e08084b<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT>
        inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255
        inet6 ::1/0

         tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1

No comments:

Post a Comment