In AIX the network interface works quite similar to other *nix systems. You can enable, disable, detach, delete the network interfaces. Apart from this you can do so many other things with network interfaces in AIX. Here I’m presenting how to work with network interfaces in AIX.
How To List Network Interfaces in Aix
To list network interfaces by using the command lsdev.
wiw_labs:$ lsdev -Cc if
en0 Available 06-08 Standard Ethernet Network Interface
en1 Available 0L-08 Standard Ethernet Network Interface
et0 Defined 06-08 IEEE 802.3 Ethernet Network Interface
et1 Defined 0L-08 IEEE 802.3 Ethernet Network Interface
lo0 Available Loopback Network Interface
The above command gives both en and et interfaces available. To know the difference between en and et refer to the post: Difference Between ent0, en0 and et0.
How To See IP addresses of Network Interfaces
To see IP addresses associated with network interfaces you need to issue one of the following commands:
- ifconfig -a This will show all network interfaces and their ip addresses.
- ifconfig en0 or ifconfig en1 etc. This shows ip addresses associated with a particular network interface.
- lsattr -El en0 or lsattr -El en1. This will show the ip addresses associated with the particular network interface.
For example:
wiw_labs:$ ifconfig en0
en0: flags=5e080863,c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(INACTIVE),PSEG,LARGESEND,CHAIN>
inet 192.168.10.234 netmask 0xffffff00 broadcast 192.168.10.255
inet 192.168.10.134 netmask 0xffffff00 broadcast 192.168.10.255
tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
wiw_labs:$ lsattr -El en0
alias4 192.168.10.134,255.255.255.0 IPv4 Alias including Subnet Mask True
alias6 IPv6 Alias including Prefix Length True
arp on Address Resolution Protocol (ARP) True
authority Authorized Users True
broadcast Broadcast Address True
mtu 1500 Maximum IP Packet Size for This Device True
netaddr 192.168.10.234 Internet Address True
netaddr6 IPv6 Internet Address True
netmask 255.255.255.0 Subnet Mask True
prefixlen Prefix Length for IPv6 Internet Address True
remmtu 576 Maximum IP Packet Size for REMOTE Networks True
rfc1323 1 Enable/Disable TCP RFC 1323 Window Scaling True
security none Security Level True
state up Current Interface Status True
tcp_mssdflt Set TCP Maximum Segment Size True
tcp_nodelay Enable/Disable TCP_NODELAY Option True
tcp_recvspace 262144 Set Socket Buffer Space for Receiving True
tcp_sendspace 262144 Set Socket Buffer Space for Sending True
How To Activate Network Interfaces
To activate the network interface means to enable the network interface so that the traffic can be transmitted through the interface. You issue the command:
ifconfig en0 up
If you want to give some ip address as well:
ifconfig en0 192.168.10.15 netmask 255.255.240.0 up
How To Deactivate Network Interfaces
To deactivate the network interface means to disable the network interface so that the traffic can not be transmitted through the interface. You issue the command:
ifconfig en0 down
How To Delete An IP Address From Network Interfaces
To remove the ip addresses from network interfaces, you need to use the option delete. e.g
ifconfig en0 delete
The command will remove all ip addresses associated with the network interface en0.
If you want to remove a particular ip address then use:
ifconfig en0 192.168.10.15 netmask 255.255.240.0 delete
How To Detach Network Interfaces
To detach a network interface means to remove it from the listing of ifconfig command output.
So,
ifconfig en0 detach
This is required when you have removed the network card physically from the system. Because the entry remains in the system and has to be removed through this command.
How To Create IP Alias on Network Interfaces
To create the network interface ip alias means we can reach the system through different ip address from same network interface. You issue the command:
ifconfig en0 192.168.12.37 netmask 255.255.255.0 alias
How To Chance The MTU Size of Network Interfaces
To change the Maximum Transfer Unit size of the network interface issue the command:
ifconfig en0 mtu 12000
The above command changes the MTU size of interface to 12000.
If you examine the output of “lsattr -El en0” , the MTU value is 1500.