.\" -*- nroff -*- .TH INTERFACES 5 "August 10 2000" "ifupdown" "File formats" .SH NAME /etc/network/interfaces \- network interface configuration for ifup and ifdown .SH DESCRIPTION /etc/network/interfaces contains network interface configuration information for the .BR ifup (8) and .BR ifdown (8) commands. This is where you configure how your system is connected to the network, by setting IP addresses, and other related information. .P The file can contain comments; all lines starting with `#' are ignored. A line may be extended across multiple lines by making the last character a \\ in the usual manner. .P The file consists of zero or more "iface", "mapping" and "auto" stanzas, each of which defines one network interface. Here are some sample stanzas: 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.0 iface eth0-work inet dhcp Stanzas beginning with the word "auto" are used to identify interfaces that should be brought up automatically on system boot. Interface names should follow the word "auto" on the same line. Multiple "auto" stanzas may be used, or they may be combined into a single line. .P Stanzas beginning with the word "mapping" are used to automatically translate a physical interface name into a logical interface specified by an "iface" stanza. The first line of a mapping stanza begins with the word "mapping" followed by the names of each physical interface this mapping should apply to. Shell globs (* and ? wildcards) may be used when specifying interfaces. Each mapping must specify a script, which will be run when the mapping is applied. In addition, a mapping may specify any number of "map" parameters that will be passed to the script. .P Stanzas defining interfaces start with the word "iface". The next word is the name of the interface, as used by the .BR ifconfig (8) or .BR route (8) commands (ie, things like "lo", "eth0", or "ppp0", and "eth1:0"). .P The interface name is followed by address family the interface uses -- generally this will be "inet" for TCP/IP networking, but there is also some support for IPX networking ("ipx"), and IPv6 networking ("inet6"). .P Following that is the method used to configure the interface. In the example above, this is "static", which means that eth0 is a staticly allocated IPv4 address. .P Further options may follow the "iface" header line on additional lines in the stanza. These are usually indented for clarity (as in the example) but are not required to be. .SH IFACE OPTIONS There are currently three standard options available for all interfaces, regardless of address family or method. These are: .TP .BI up " command" Run .I command after bringing the interface up. This option can be given multiple times for a single interface. If so, the commands will be executed in order. If one of the commands fails, none of the others will be executed, but the interface will remain configured. (You can ensure a command never fails by suffixing "|| true".) .TP .BI pre-up " command" Run .I command before bringing the interface up. This option can be given multiple times for a single interface. If so, the commands will be executed in order. If one of the commands fails, none of the others will be executed, and the interface will not be configured. (You can ensure a command never fails by suffixing "|| true".) .TP .BI down " command" Run .I command before taking the interface down. This option can be given multiple times for a single interface. If so, the commands will be executed in order. If one of the commands fails, none of the others will be executed, and the interface will not be deconfigured. (You can ensure a command never fails by suffixing "|| true".) .TP .BI post-down " command" Run .I command after taking the interface down. This option can be given multiple times for a single interface. If so, the commands will be executed in order. If one of the commands fails, none of the others will be executed, but the interface will remain deconfigured. (You can ensure a command never fails by suffixing "|| true".) .P Most methods require additional information, such as address, and netmask; details about the available methods and the information they require follows. .SH IPX ADDRESS FAMILY This section documents the methods available in the ipx address family. .SS The static Method This method may be used to setup an IPX interface. It requires the \fIipx_interface\fP command. .PP .B Options .RS .TP .BI frame " type " \fItype\fP of ethernet frames to use (e.g. \fB802.2\fP) .TP .BI netnum " id " Network number .RE .SS The dynamic Method This method may be used to setup an IPX interface dynamically. .PP .B Options .RS .TP .BI frame " type " \fItype\fP of ethernet frames to use (e.g. \fB802.2\fP) .RE .SH INET6 ADDRESS FAMILY This section documents the methods available in the inet6 address family. .SS The loopback Method This method may be used to define the IPv6 loopback interface. .PP .B Options .RS .TP (No options) .RE .SS The static Method This method may be used to define interfaces with statically assigned IPv6 addresses. .PP .B Options .RS .TP .BI address " address " Address (colon delimited) \fBrequired\fP .TP .BI netmask " mask " Netmask (number of bits, eg 64) \fBrequired\fP .TP .BI gateway " address " Default gateway (colon delimited) .TP .BI media " type " Medium type, driver dependent .TP .BI hwaddress " class address" Hardware Address. \fIclass\fP is one of \fBether\fP, \fBax25\fP, \fBARCnet\fP or \fBnetrom\fP. \fIaddress\fP is dependent on this choice. .TP .BI mtu " size " MTU size .RE .SS The v4tunnel Method This method may be used to setup an IPv6-over-IPv4 tunnel. It requires the \fBip\fP command from the \fBiproute\fP package. .PP .B Options .RS .TP .BI address " address " Address (colon delimited) \fBrequired\fP .TP .BI netmask " mask " Netmask (number of bits, eg 64) \fBrequired\fP .TP .BI endpoint " address " Address of other tunnel endpoint (IPv4 dotted quad) \fBrequired\fP .TP .BI local " address " Address of the local endpoint (IPv4 dotted quad) .TP .BI gateway " address " Default gateway (colon delimited) .TP .BI ttl " time " TTL setting .RE .SH AUTHOR The ifupdown suite was written by Anthony Towns . This manpage was contributed by Joey Hess .SH "SEE ALSO" .BR ifup (8), .BR ifdown (8)