next up previous contents
Next: Checking with netstat Up: Configuring TCP/IP Networking Previous: The Dummy Interface

All About ifconfig

   

There are a lot more parameters to ifconfig than we have described above. Its normal invocation is this:

interface is the interface name, and address is the IP address to be assigned to the interface. This may either be an IP address in dotted quad notation, or a name ifconfig will look up in /etc/hosts and /etc/networks. The -net and -host options force ifconfig to treat the address as network number or host address, respectively.

  If ifconfig is invoked with only the interface name, it displays that interface's configuration. When invoked without any parameters, it displays all interfaces you configured so far; an option of -a forces it to show the inactive ones as well. A sample invocation for the Ethernet interface eth0 may look like this:

    The MTU and Metric fields show the current MTU and metric value for that interface. The metric value is traditionally used by some operating systems to compute the cost of a route. doesn't use this value yet, but defines it for compatibility nevertheless.

The RX and TX lines show how many packets have been received or transmitted error free, how many errors occurred, how many packets were dropped, probably because of low memory, and how many were lost because of an overrun. Receiver overruns usually happen when packets come in faster than the kernel can service the last interrupt. The flag values printed by ifconfig correspond more or less to the names of its command line options; they will be explained below.

The following is a list of parameters recognized by ifconfig with the corresponding flag names are given in brackets. Options that simply turn on a feature also allow it to be turned off again by preceding the option name by a dash (-).

 


next up previous contents
Next: Checking with netstat Up: Configuring TCP/IP Networking Previous: The Dummy Interface

Andrew Anderson
Thu Mar 7 23:22:06 EST 1996