Configure or Removing IP Address on AIX / VIOS Network Interface

Configure IP Address on AIX / VIOS Network Interface

Configuring IP address on AIX / VIOS network interface is much simpler compared to Linux. AIX provides rich system manage interface smit to configure and manage all the device connected to AIX LPAR. Similarly smit offers management of network interface using mktcpip. Below is the example to configure the ip address on network interface ent5.

Step 1: Query the Network Interfaces 

lsdev | grep ent will provide the network interfaces connected to the AIX / VIOS

# lsdev | grep ent
ent0       Available       Virtual I/O Ethernet Adapter (l-lan)

Step 2: Identify the Network Port

# lsconf | grep ent
* ent0             Y2020.ABC.1234567-V1-C2-T1                    Virtual I/O Ethernet Adapter (l-lan) 

Run lsconf | grep ent to display the network port number T1/ T2 ....

Step 3: Configure IP using smit

smit mktcpip can be used for configuring the ip address on the network interface. Run smit mktcpip and it will list the network interfaces. Select the network interface enX and click enter button.



Configure the hostname, internet address (ip address), network mask, name server ip address and domain, gateway address by selecting downwards arrow keys and finally start now option yes with tab key option on keyboard. It will lead to the command status interface where smit runs mktcpip command and process output is displayed once command displays OK the interface is configured.

or 

Step 3: Configuring IP using direct mktcpip command

mktcpip is the command to configure the network interface with ip address on AIX. mktcpip arguments are hostname, ip address, network interface (enX), nameserver address and domain, subnet mask, gateway ip address and finally option to start the network address.

# mktcpip -h hostname -a 9.x.x.x -i enX -n dns_ip -d dns_domain -m subnet_mask -g gateway -s

Where -s is to start the network 

Step 4: Modifying the IP address / Removing network interface

Modifying the network interface we can follow Step 3 either smit mktcpip or mktcpip to modify the network ip address. For Removing the network interface completely just run rmdev -dl enX and then cfgmgr (In case of VIOS admin user we should run rmdev -dev enX and cfgdev

# lsdev | grep en0   
en0        Available       Standard Ethernet Network Interface
# ifconfig -a
en0: flags=e08084b,c0<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,LARGESEND,CHAIN>
        inet 9.x.x.x netmask 0xffff0000 broadcast 9.x.x.255
         tcp_sendspace 200 tcp_recvspace 200
#
# rmdev -dl en0
en0 deleted
# cfgmgr
# lsdev | grep en0
en0        Defined         Standard Ethernet Network Interface

Caution : Using rmdev command will remove the network and AIX / VIOS partition may lose the network connectivity.

Post a Comment

0 Comments