Differences between version 6 and predecessor to the previous major change of interfaces(5).
Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 6 | Last edited on Tuesday, December 30, 2003 12:49:48 pm | by CraigBox | Revert |
Older page: | version 1 | Last edited on Tuesday, June 4, 2002 12:30:37 am | by perry | Revert |
@@ -1,15 +1,330 @@
-INTERFACES
-!
!!INTERFACES
-
NAME
-DESCRIPTION
-IFACE OPTIONS
-INET ADDRESS FAMILY
-IPX ADDRESS FAMILY
-INET6 ADDRESS FAMILY
-AUTHOR
-SEE ALSO
+!!NAME
+
+/etc/network/interfaces - network interface configuration for ifup and
+ifdown
+
+!!
DESCRIPTION
+
+/etc/network/interfaces contains network interface configuration information for the ifup(8) and ifdown(8) commands. This is where you configure how your system is connected to the network.
+
+Lines starting with `#' are ignored. A line may be extended across
+multiple lines by making the last character a backslash.
+
+The file consists of zero or more "iface", "mapping" and "auto" stanzas. Here is an example.
+
+ auto lo eth0
+
+ iface lo inet loopback
+
+ mapping eth0
+ script /usr/local/sbin/map-scheme
+ map HOME eth0-home
+ map WORK eth0-work
+
+ iface eth0-home inet static
+ address 192.168.1.1
+ netmask 255.255.255.
+ up flush-mail
+
+ iface eth0-work inet dhcp
+
+Stanzas beginning with the word "auto" are used to identify the physical interfaces to be brought up when __ifup__ is run with the __-a__ option.
+(This option is used by the system boot scripts.) Physical interface
+names should follow the word "auto" on the same line. There can be
+multiple "auto" stanzas. __ifup__ brings the named interfaces up in the
+order listed.
+
+Stanzas beginning with the word "mapping" are used to determine how a
+logical interface name is chosen for a physical interface that is to be
+brought up. The first line of a mapping stanza consists of the word
+"mapping" followed by a pattern in shell glob syntax. Each mapping
+stanza must contain a __script__ definition. The named script is run with
+the physical interface name as its argument and with the contents of
+all following "map" lines in the stanza provided to it on its standard
+input. The script must print a string on its standard output before
+exiting.
+
+Mapping a name consists of searching the mapping patterns and running
+the script corresponding to the first match; the script outputs the
+name to which the original is mapped.
+
+__ifup__ is normally given a physical interface name as its first
+non-option argument. __ifup__ begins by choosing this as the logical name
+for the interface. It then maps this name repeatedly until either some
+mapping results in a logical interface name that has been defined, in
+which case __ifup__ attempts to bring up the physical interface as that
+logical interface, or the name matches no pattern, in which case __ifup__
+exits with an error.
+
+Stanzas defining logical interfaces start with a line consisting of the
+word "iface" followed by the name of the logical interface. In simple
+configurations without mapping stanzas this name should simply be the
+name of the physical interface to which it is to be applied. (The
+default mapping script is, in effect, the __echo__ command.) The interface
+name is followed by the name of the address family that the interface
+uses. This will be "inet" for TCP/IP networking, but there is also
+some support for IPX networking ("ipx"), and IPv6 networking ("inet6").
+Following that is the name of the method used to configure the interface.
+
+Additional options can be given on subsequent lines in the stanza.
+Which options are available depends on the family and method, as
+described below. Additional options can be made available by other
+Debian packages. For example, the wireless-tools package makes available a number of options prefixed with "wireless-" which can be used to
+configure the interface using iwconfig(8)__.__
+
+Options are usually indented for clarity (as in the example above) but
+are not required to be.
+
+!!
IFACE OPTIONS
+
+The following "command" options are available for every family and
+method. Each of these options can be given multiple times in a single
+stanza, in which case the commands are executed in the order in which
+they appear in the stanza. If one of the commands fails, none of the
+others will be executed but the interface will still be configured.
+(You can ensure a command never fails by suffixing "|| true".)
+
+__up command__
+ Run__ command__ after bringing the interface up.
+
+__pre-up command__
+ Run__ command__ before bringing the interface up.
+
+__down command__
+ Run__ command__ before taking the interface down.
+
+__post-down command__
+ Run__ command__ after taking the interface down.
+
+There exists for each of the above mentioned options a directory
+__ /etc/network/if__-__<option>_____ the scripts in which are run (with no arguments) using run-parts(8) after the option itself has been processed.
+
+All of these commands have access to the following environment variables.
+
+__IFACE__ physical name of the interface being processed
+
+__ADDRFAM__
+ address family of the interface
+
+__METHOD__ method of the interface (e.g., "static")
+
+__MODE__ either__ start__ or__ stop__, depending on whether the script is called
+ by __ifup__ or __ifdown__.
+
+__PATH__ the command search path: __ /usr/local/sbin:/usr/local/bin:__ __ /usr/sbin:/usr/bin:/sbin:/bin__
+
+Additionally, all options given in an interface definition stanza are
+exported to the environment in upper case with "IF_" prepended and with
+hyphens converted to underscores and non-alphanumeric characters discarded.
+
+__
INET__ __
ADDRESS__ __
FAMILY__
+This section documents the methods available in the inet address family.
+
+ __The__ __loopback__ __Method__
+This method may be used to define the IPv4 loopback interface.
+
+__Options__
+
+ (No options)
+
+ __The__ __static__ __Method__
+This method may be used to define ethernet interfaces with statically
+allocated IPv4 addresses.
+
+__Options__
+
+ __address address__
+ Address (dotted quad) __required__
+
+ __netmask netmask__
+ Netmask (dotted quad) __required__
+
+ __broadcast broadcast_address__
+ Broadcast address (dotted quad)
+
+ __network network_address__
+ Network address (dotted quad) __required__ __for__ __2..x__ __kernels__
+
+ __gateway address__
+ Default gateway (dotted quad)
+
+ __pointopoint address__
+ Address of other end point (dotted quad). Note the
+ spelling of "point-to".
+
+ __media type__
+ Medium type, driver dependent
+
+ __hwaddress class____ address__
+ Hardware Address.__ class__ is one of __ether__, __ax25__, __ARCnet__ or
+ __netrom__.__ address__ is dependent on the above choice.
+
+ __mtu size__
+ MTU size
+
+ __The__ __manual__ __Method__
+This method may be used to define interfaces for which no configuration
+is done by default. Such interfaces can be configured manually by means
+of __up__ and __down__ commands or /etc/network/if-*.d scripts.
+
+__Options__
+
+ (No options)
+
+ __The__ __dhcp__ __Method__
+This method may be used to obtain an address via DHCP with any of the
+tools: dhclient, pump, udhcpc, dhcpcd. (They have been listed in their
+order of precedence.) If you have a complicated DHCP setup you should
+note that some of these clients use their own configuration files and
+do not obtain their configuration information via __ifup__.
+
+__Options__
+
+ __hostname hostname__
+ Hostname to be requested (pump, dhcpcd, udhcpc)
+
+ __leasehours leastime__
+ Preferred lease time in hours (pump)
+
+ __leasetime leasetime__
+ Preferred lease time in seconds (dhcpcd)
+
+ __vendor vendor__
+ Vendor class identifier (dhcpcd)
+
+ __client client_id__
+ Client identifier (dhcpcd, udhcpc)
+
+ __The__ __bootp__ __Method__
+This method may be used to obtain an address via bootp.
+
+__Options__
+
+ __bootfile file__
+ Tell the server to use__ file__ as the bootfile.
+
+ __server address__
+ Use the IP address __ address__ to communicate with the
+ server.
+
+ __hwaddr addr__
+ Use__ addr__ as the hardware address instead of whatever it
+ really is.
+
+ __The__ __ppp__ __Method__
+This method uses pon/poff to configure a PPP interface. See those commands for details.
+
+__Options__
+
+ __provider name__
+ Use__ name__ as the provider (from /etc/ppp/peers).
+
+ __The__ __wvdial__ __Method__
+This method uses wvdial to configure a PPP interface. See that command
+for ore details.
+
+__Options__
+
+ __provider name__
+ Use__ name__ as the provider (from /etc/ppp/peers).
+
+__
IPX__ __
ADDRESS__ __
FAMILY__
+This section documents the methods available in the ipx address family.
+
+ __The__ __static__ __Method__
+This method may be used to setup an IPX interface. It requires the
+__ ipx_interface__ command.
+
+__Options__
+
+ __frame type__
+ __ type__ of ethernet frames to use (e.g. __802.2__)
+
+ __netnum id__
+ Network number
+
+ __The__ __dynamic__ __Method__
+This method may be used to setup an IPX interface dynamically.
+
+__Options__
+
+ __frame type__
+ __ type__ of ethernet frames to use (e.g. __802.2__)
+
+__
INET6__ __
ADDRESS__ __
FAMILY__
+This section documents the methods available in the inet6 address family.
+
+ __The__ __loopback__ __Method__
+This method may be used to define the IPv6 loopback interface.
+
+__Options__
+
+ (No options)
+
+ __The__ __static__ __Method__
+This method may be used to define interfaces with statically assigned
+IPv6 addresses.
+
+__Options__
+
+ __address address__
+ Address (colon delimited) __required__
+
+ __netmask mask__
+ Netmask (number of bits, eg 64) __required__
+
+ __gateway address__
+ Default gateway (colon delimited)
+
+ __media type__
+ Medium type, driver dependent
+
+ __hwaddress class____ address__
+ Hardware Address.__ class__ is one of __ether__, __ax25__, __ARCnet__ or
+ __netrom__.__ address__ is dependent on this choice.
+
+ __mtu size__
+ MTU size
+
+ __The__ __v4tunnel__ __Method__
+This method may be used to setup an IPv6-over-IPv4 tunnel. It requires
+the __ip__ command from the __iproute__ package.
+
+__Options__
+
+ __address address__
+ Address (colon delimited) __required__
+
+ __netmask mask__
+ Netmask (number of bits, eg 64) __required__
+
+ __endpoint address__
+ Address of other tunnel endpoint (IPv4 dotted quad)
+ __required__
+
+ __local address__
+ Address of the local endpoint (IPv4 dotted quad)
+
+ __gateway address__
+ Default gateway (colon delimited)
+
+ __ttl time__
+ TTL setting
+
+!!
AUTHOR
+
+The ifupdown suite was written by Anthony Towns <aj@azure.humbug.org.au>. This manpage was contributed by Joey Hess
+<joey@kitenet.net>.
+
+!!
SEE ALSO
+
+ifup(8), iwconfig(8), run-parts(8).
+
+
+
----
+the old text - can be deleted if not needed any longer -- 2003-12-30 RolfSchumacher
!!NAME
/etc/network/interfaces - network interface configuration for ifup and ifdown
@@ -417,13 +732,12 @@
__gateway__ ''address''
Default gateway (colon delimited)
+
!!AUTHOR
+The ifupdown suite was written by Anthony Towns
-The ifupdown suite was written by Anthony Towns
!!SEE ALSO
-
ifup(8), ifdown(8)
-----