Welcome to the World of AIX learning!!!

Posts Tagged ‘ifconfig

Networking Concepts

with 2 comments

This post is an extension to the Networking Concepts post we discussed in the past.

You can refer to the post on Networking Concepts by following this link:

Let us revise some of the concepts we learnt in the past.

Command to check Ethernet adapters’ availability is:

# lsdev –Cc adapter

# lsdev –Cc if

Where If stands for the Interface.

This command will check how many interfaces are available.

Each adapter will have 2 interfaces.

For eg:

Ent0 adapter will have 2 interfaces:

1.       En0

2.       Et0

En0 is a standard Ethernet interface used in assigning ip addresses.

Et0 is used basically in IEEE as Ethernet interface.

Ip is never assigned directly to the adapter.

To assign an ip, command used is:

# ifconfig en0 <ip address> <network address>

To check current ip address, command used is:

# ifconfig –a

254 ip addresses can be assigned to a single interface.

Eg to assign an ip to an interface is:

# ifconfig en0


# ifconfig en0 <ip address> <subnet mask>

When do we use ‘ALIAS’?

Consider the following command:

# ifconfig en0 <ip address> <subnet mask> alias

What is the function of ‘alias’ here?

Alias is basically used to assign more than 1 ip address to a single interface.

For eg:

# ifconfig en0 alias

This command will assign 2 ip addresses to a single interface en0.

If no ‘alias’ is used:

# ifconfig en0

This command will replace the earlier ip address for the interface en0 with a new ip address.

So, by using ‘alias’, we can assign 255 ip addresses to a single interface.

Command to delete an ip address from an interface:

# ifconfig en0 delete

This command will delete this particular ip address from en0 interface.

# ifconfig en0 down

This command will turn off network interface en0.

To permanently add an ip address to en0 or en1 interface, command used is:

# chdev –EH –l en0 –a netaddr = <ip address> -a <subnet mask>

For eg:

# chdev –EH –l en0 –a netaddr = –a

To permanently add alias to the interface, command used is:

# chdev –EH –l en0 –a alias = <ip address> -a <subnet mask>

For eg:

# chdev –EH –l en0 –a alias = –a

To permanently remove added alias from the interface, command used is:

# chdev –EH –l en0 –a delalias = <ip address> -a <subnet mask>

For eg:

# chdev –EH –l en0 –a delalias = –a

To remove all tcp / ip configuration from host, command used is:

# rmtcpip

One can see ent0 statistics by running the following command:

# netstat –v ent0 | more

To add gateway:

A gateway is basically added to connect intranet to internet i.e. to connect your home/private network to the internet.

To add a gateway, command used is:

# route add –net <destination network ip address> <default gateway>

To check gateway, command used is:

# netstat –r

To delete a gateway, command used is:

# route delete <destionation network ip address> <default gateway>

To add / make STATIC gateway:

Edit the file /etc/ by running the following command:

# vi /etc/

Add the following line:

# route add –net <ip address> <subnet mask> -a <gateway>

# route

Command will make manual entries in routing table till the next reboot.

To check the routing table which has gateway information, command used is:

# netstat –rn

To check MAC address of a particular Ethernet interface, command used is:

# entstat en0


# netstat –i

This command will check incoming/outgoing network packet errors.

Ip packets can be captured using iptrace or tcpdump or netstat –in command.

To listen / capture packets from a specific device, command used is:

# tcpdump –I en0 –n <filename where information will be stored> <destination ip address>

Only the root user can run this command.

Arp stands for address resolution protocol.

arp command displays and modifies address resolution.

# arp –a

Command will display local arp cache.

Nslookup command always query internet domain name servers.

Tracert (traceroute) command displays route that ip packets takes to network hosts. For eg:

# tracert

This will be all for this post. I’ll keep updating this blog as and when needed.

P.S: everything written on this blog is written after thorough study of various red hat pdf’s and online material available, mixed with writer’s experience and understanding of the subject. I do not hold any copyrights to the content published here. Anybody can make use of this content. A word of appreciation is enough for me to keep moving.

Till then,

Happy Learning!




Performance Monitoring & Tuning

leave a comment »

This post will cover various commands used by AIX Admin for performance monitoring and tuning.

There are 2 ways of performance monitoring for AIX OS:

  1. Offline
  2. Online

For online monitoring:

TOPAScommand is basically used for online monitoring.

abc of aix

topas command

Once admin runs the command, dynamic output is published onscreen which keeps changing continuously (every 2 seconds).

Information available from Topas is generally of kernel, user, wait, RAM, processes, CPU, NFS, disk allocated etc.

# topas –P will list all the processes individually

abc of aix

topas -P command

# topas –Dwill list all the disk information individually

abc of aix

topas -D command


q Command is used for quitting from TOPAS output.

Similar command used in LINUX is TOP

For offline monitoring:

Commands used are:

# ps –efl

abc of aix

ps -efl command


# ps –ef

abc of aix

ps -ef command

Will give the process status for that instance.

# vmstat

abc of aix

vmstat commands

Command will list all information about virtual memory statistics.

# vmstat 2

Will give output every 2 seconds

# vmstat 2 3

Will give 3 outputs every 2 seconds

# vmstat –s

abc of aix

vmstat commands

Will give count of various events

# vmstat hdisk1 2 3

Command will give hdisk1 specific vm information.

Practise these commands and check out what you get in output:

# vmstat –r

# vmstat -i

# iostat

abc of aix

iostat command

Command will give input output (kernel, threads, virtual memory, disk, tapes, CPU etc) statistics and CPU information

# mpstat

abc of aix


Check out for:

# mpstat 2 3

abc of aix

mpstat 2 3

Command will give memory and CPU statistics

# netstat –a

Command will list all the ports available.

# netstat

Command will list the contents of network related data structures.

# netstat –r command is used to display routing table information.

# netstat –rn command is used to display routing table with network addresses.

# netstat –in command will list the interface with ip addresses.

# netstat –Cn command will show cost to destination.

# netstat –m command shows memory in buffer.

# ifconfig command allows admin to configure and modify properties of network interface directly without the use of SMIT. This will be discussed later in coming posts.

All these commands: vmstat, iostat, mpstat, netstat can run on any flavor of UNIX OS.

# svmoncommand will capture and analyze snapshots of virtual memory

abc of aix


# sar command is used for system activity records

Other commands for performance monitoring are:

# last

# last reboot

# last shutdown

# who

# who –q will give the total number of users logged in

# finger

These commands are already discussed in previous posts. Users can run help command for these commands to know about their functionality.

Performance monitoring in Linux is done through these commands:

# top

# up

To know the uptime in linux OS.


last reboot

last shutdown

system –configure -display

gnome –system –monitor command is used for graphical representation of CPU and processes and Hard disk. It’s very similar to Windows Task Manager.

# uptime

Also used for AIX OS.

Thanks for reading this.

Happy Learning!