The ifconfig command shows the details of the network interface(s) defined in the system.
The most common option is -a , which shows all the interfaces.

# ifconfig -a
The usual name of the primary Ethernet network interface is eth0. To find out the details of a specific interface, e.g. eth0, you can use:

# ifconfig eth0

Here are some key parts of the output:

Link encap : the type of the hardware physical medium supported by this interface (Ethernet, in this case)

HWaddr     : the unique identifier of the NIC card. Every NIC card has a unique identifier assigned by the manufacturer, called MAC or MAC address. The IP address is attached to the MAC to the server. If this IP address is changed, or this card is moved from this server to a different one, the MAC does not change.

Mask       : the netmask

inet addr  : the IP address attached to the interface

RX packets : the number of packets received by this interface

TX packets : the number of packets sent

errors     : the number of errors in sending or receiving

The command is not just used to check the settings; it’s used to configure and manage the interface as well. Here is a short list of parameters and options for this command:

up/down – enables or disables a specific interface. You can use the down parameter to shutdown an interface (or disable it):
# ifconfig eth0 down
# ifconfig eth0 up                 

media – sets the type of the Ethernet media such as 10baseT, 10 Base 2, etc. Common values for the media parameter are 10base2, 10baseT, and AUI. If you want Linux to sense the media automatically, you can specify “auto”, as shown below:
# ifconfig eth0 media auto

add – sets a specific IP address for the interface. To set an IP address of to the interface eth0, you would issue:
# ifconfig eth0 add

netmask – sets the netmask parameter of the interface. Here is an example where you can set the netmask of the eth0 interface to
# ifconfig eth0 netmask

In an Oracle Real Application Clusters environment you have to set the netmask in a certain way, using this command.

In some advanced configurations, you can change the MAC address assigned to the network interface. The hw parameter accomplishes that. The general format is:

ifconfig hw  
The shows the type of the interface, e.g. ether, for Ethernet. Here is how the MAC address is changed for eth0 to (Note: the MAC address shown here is fictional. If it matches any actual MAC, it’s purely coincidental.):

# ifconfig eth0 hw ether
This is useful when you add a new card (with a new MAC address) but do not want to change the Linux-related configuration such as network interfaces.

Usage for the Oracle User
The command, along with nestat described below, is one of the most widely used in managing Oracle RAC. Oracle RAC’s performance depends heavily on the interconnect used between the nodes of the cluster. If the interconnect is saturated (that is, it no longer carries any additional traffic) or is failing, you may see reduced performance. The best course of action in this case is to look at the ifconfig output to view any failures. Here is a typical example:

# ifconfig eth9
eth9      Link encap:Ethernet   HWaddr 00:1C:23:CE:6F:82 
          inet addr:   Bcast:   Mask:
          inet6 addr: fe80::21c:23ff:fece:6f82/64 Scope:Link
          RX packets:1204285416 errors:0 dropped:560923 overruns:0 frame:0
          TX packets:587443664 errors:0 dropped:623409 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1670104239570 (1.5 TiB)  TX bytes:42726010594 (39.7 GiB)
          Interrupt:169 Memory:f8000000-f8012100

Note the text highlighted. The dropped count is extremely high; the number should ideally be 0 or close to it. A high number more than half a million sounds like a faulty interconnect that drops packets, causing the interconnect to resend packets—which should be a clue in the issue diagnosis.


(Extracted from oracle technet notes author Arup Nanda)