Sophie

Sophie

distrib > Mandriva > 8.1 > i586 > by-pkgid > d96628403a845b9b4b1c38968006ec71 > files > 282

nag-1.0-9mdk.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<!--Converted with LaTeX2HTML 96.1-c (Feb 29, 1996) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds -->
<HTML>
<HEAD>
<TITLE>All About ifconfig</TITLE>
</HEAD>
<BODY LANG="EN">
 <A HREF="node1.html"><IMG WIDTH=65 HEIGHT=24 ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A>  <BR>
<B> Next:</B> <A HREF="node74.html">Checking with netstat</A>
<B>Up:</B> <A HREF="node58.html">Configuring TCP/IP Networking</A>
<B> Previous:</B> <A HREF="node72.html">The Dummy Interface</A>
<BR> <P>
<H1><A NAME="SECTION007800000">All About ifconfig</A></H1>
<A NAME="ifaceifconfig"></A>
There are a lot more parameters to ifconfig than we have
described above. Its normal invocation is this:
<pre>
           ifconfig interface [[-net|-host] address [parameters]]
</pre>
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.
<P>
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:
<pre>
           # ifconfig eth0
           eth0      Link encap 10Mbps Ethernet  HWaddr 00:00:C0:90:B3:42
                     inet addr 191.72.1.2 Bcast 191.72.1.255 Mask 255.255.255.0
                     UP BROADCAST RUNNING  MTU 1500  Metric 0
                     RX packets 3136 errors 217 dropped 7 overrun 26
                     TX packets 1752 errors 25 dropped 0 overrun 0
</pre>

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.
<P>
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.
<P>
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 (-).
<dl>
<dt><b>up </b><dd>This marks an interface ``up'',  i.e.  accessible  to  the  IP
                layer.  This option is implied when an address is given on the
                command line. It may also be used to re-enable  an  interface
                that has been taken down temporarily using the down option.


      (This option corresponds to the flags UP RUNNING.)


  <dt><b>down</b><dd> This  marks an interface ``down'', i.e. inaccessible to the IP
                layer. This effectively disables any IP  traffic  through  the
                interface.  Note that this does not delete all routing entries
                that use this interface automatically.  If you take the inter-
                face  down  permanently,  you  should  to delete these routing
                entries and supply alternative routes if possible.


<dt><b>      netmask mask  </b><dd>This assigns a subnet mask to be used  by  the  interface.
                It may be given as either a 32-bit hexadecimal number preceded
                by 0x, or as a dotted quad of decimal numbers.


               that  involve only two hosts. This option is needed to config-
                ure, for example, SLIP or PLIP interfaces.


   <dt><b>   pointopoint</b><dd> address  This option is used  for  point-to-point  IP  links
                that  involve only two hosts. This option is needed to config-
                ure, for example, SLIP or PLIP interfaces.


      (If a point-to-point address has been set, ifconfig displays the POINTO-
                POINT flag.)


    <dt><b>  broadcast address</b><dd>   The  broadcast  address  is usually made up from the
                network number by setting all bits of the host part.  Some  IP
                implementations  use  a different scheme; this option is there
                to adapt to these strange environments.


      (If a broadcast address has been set, ifconfig  displays  the  BROADCAST
                flag.)

    <dt><b>  metric number </b><dd>  This  option may be used to assign a metric value to the
                routing table entry created for the interface. This metric  is
                used  by the Routing Information Protocol (RIP) to build rout-
                ing  tables  for  the  network.(8)  The default metric used by
                ifconfig is a value of zero. If you don't run  a  RIP  daemon,
                you  don't need this option at all; if you do, you will rarely
                need to change the metric value.



<dt><b>      mtu bytes </b><dd> This sets the Maximum Transmission Unit, which is the maximum
                number of octets the interface is able to handle in one trans-
                action. For Ethernets, the MTU  defaults  to  1500;  for  SLIP
                interfaces, this is 296.


<dt><b>arp</b><dd>  This is an option specific to broadcast networks such as Eth-
                ernets or packet radio. It enables the use of ARP, the Address
                Resolution Protocol, to detect the physical addresses of hosts
                attached to the network. For  broadcast  networks,  is  on  by
                default.

 <dt><b>-arp </b><dd>Disables the use of ARP on this interface.


<dt><b>promisc</b><dd>   Puts  the interface in promiscuous mode. On a broadcast net-
                work, this makes the interface receive all packets, regardless
                of  whether  they  were destined for another host or not. This
                allows an analysis of network traffic using packet filters and
                such,  also called Ethernet snooping.  Usually, this is a good
                technique of hunting down network problems that are  otherwise
                hard to come by.


                     On  the  other  hand,  this  allows attackers to skim the
                traffic of your network  for  passwords  and  do  other  nasty
                things.  One  protection against this type of attack is not to
                let anyone just plug in  their  computers  in  your  Ethernet.
                Another option is to use secure authentication protocols, such
                as Kerberos, or the SRA login suite.(9)


      (This option corresponds to the flag PROMISC.)

<dt><b>-promisc</b><dd> Turns off promiscuous mode.

<dt><b>allmulti</b><dd>  Multicast addresses are some sort of broadcast to a group  of
                hosts  who  don't  necessarily  have to be on the same subnet.
                Multicast addresses are not yet supported by the kernel.


      (This option corresponds to the flag ALLMULTI.)


<dt><b>-allmulti</b><dd> Turns off multicast addresses.
</dl>
<P><A NAME="ifaceinterfaceifconfigmetric"></A><P><HR><A HREF="node1.html"><IMG WIDTH=65 HEIGHT=24 ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A>  <BR>
<B> Next:</B> <A HREF="node74.html">Checking with netstat</A>
<B>Up:</B> <A HREF="node58.html">Configuring TCP/IP Networking</A>
<B> Previous:</B> <A HREF="node72.html">The Dummy Interface</A>
<P><ADDRESS>
<I>Andrew Anderson <BR>
Thu Mar  7 23:22:06 EST 1996</I>
</ADDRESS>
</BODY>
</HTML>