.TH ifup 8 "11 Jan 2017" IFUPDOWN "" .SH NAME ifup \- bring a network interface up .PP ifdown \- take a network interface down .PP ifquery \- parse interface configuration .SH SYNOPSIS .B ifup [\fB\-nv\fR] [\fB\-\-no\-act\fR] [\fB\-\-verbose\fR] [\fB\-i\fR \fIFILE\fR|\fB\-\-interfaces=\fR\fIFILE\fR] [\fB\-\-state-dir=\fR\fIDIR\fR] [\fB\-\-allow\fR \fICLASS\fR] \fB\-a\fR|\fIIFACE\fR... .br .B ifup \fB\-h\fR|\fB\-\-help\fR .br .B ifup \fB\-V\fR|\fB\-\-version\fR .PP .B ifdown [\fB\-nv\fR] [\fB\-\-no\-act\fR] [\fB\-\-verbose\fR] [\fB\-i\fR \fIFILE\fR|\fB\-\-interfaces=\fR\fIFILE\fR] [\fB\-\-state-dir=\fR\fIDIR\fR] [\fB\-\-allow\fR \fICLASS\fR] \fB\-a\fR|\fIIFACE\fR... .PP .B ifquery [\fB\-nv\fR] [\fB\-\-no\-act\fR] [\fB\-\-verbose\fR] [\fB\-i\fR \fIFILE\fR|\fB\-\-interfaces=\fR\fIFILE\fR] [\fB\-\-state-dir=\fR\fIDIR\fR] [\fB\-\-allow\fR \fICLASS\fR] \fB\-a\fR|\fIIFACE\fR... .PP .B ifquery \fB\-l\fR|\fB\-\-list\fR [\fB\-nv\fR] [\fB\-\-no\-act\fR] [\fB\-\-verbose\fR] [\fB\-i\fR \fIFILE\fR|\fB\-\-interfaces=\fR\fIFILE\fR] [\fB\-\-state-dir=\fR\fIDIR\fR] [\fB\-\-allow\fR \fICLASS\fR] \fB\-a\fR|\fIIFACE\fR... .PP .B ifquery \fB\-\-state\fR [\fIIFACE\fR...] .SH DESCRIPTION The .BR ifup " and " ifdown commands may be used to configure (or, respectively, deconfigure) network interfaces based on interface definitions in the file .IR /etc/network/interfaces ". " .BR ifquery " command may be used to parse interfaces configuration." .SH OPTIONS A summary of options is included below. .TP .BR \-a ", " \-\-all If given to \fBifup\fP, affect all interfaces marked \fBauto\fP. Interfaces are brought up in the order in which they are defined in .IR /etc/network/interfaces . Combined with \fB-\-allow\fP, acts on all interfaces of a specified class instead. If given to \fBifdown\fP, affect all defined interfaces. Interfaces are brought down in the order in which they are currently listed in the state file. Only interfaces defined in .I /etc/network/interfaces will be brought down. .TP .B \-\-force Force configuration or deconfiguration of the interface. .TP .B \-\-ignore-errors If any of the commands of scripts fails, continue. .TP .BR \-h ", " \-\-help Show summary of options. .TP \fB\-\-allow=\fR\fICLASS\fR Only allow interfaces listed in an .I allow\-CLASS line in .IR /etc/network/interfaces " to be acted upon." .TP \fB\-i\fR \fIFILE\fR, \fB\-\-interfaces=\fR\fIFILE\fR Read interface definitions from .I FILE instead of from .IR /etc/network/interfaces "." .TP \fB\-\-state\-dir=\fR\fIDIR\fR Keep interface state in .I DIR instead of in .IR /run/network "." .TP .BI \-X " PATTERN\fR, " "\-\-exclude=" PATTERN Exclude interfaces from the list of interfaces to operate on by the \fIPATTERN\fR. \fIPATTERN\fR uses a usual shell glob syntax. If shell wildcards are not used, it must match the exact interface name. This option may be specified multiple times resulting in more than one pattern being excluded. .TP .BI \-o " OPTION" "\fB=" VALUE Set \fIOPTION\fR to \fIVALUE\fR as though it were in .IR /etc/network/interfaces . .TP .BR \-n ", " \-\-no\-act Don't configure any interfaces or run any "up" or "down" commands. .TP .B \-\-no\-mappings Don't run any mappings. See .BR interfaces (5) for more information about the mapping feature. .TP .B \-\-no\-scripts Don't run any scripts under /etc/network/if-*.d/ .TP .B \-\-no\-loopback Disable special handling of the loopback interface. By default, the loopback interface (\fIlo\fR on Linux) is predefined internally as an auto interface, so it's brought up on \fBifup -a\fR automatically. In the case the loopback device is redefined by user, the interface is configured just once anyway. If, however, another interface is also defined as loopback, it's configured as usual. Specifying this option disables this behaviour, so the loopback interface won't be configured automatically. .TP .BR \-V ", " \-\-version Show copyright and version information. .TP .BR \-v ", " \-\-verbose Show commands as they are executed. .TP .BR \-l ", " \-\-list For \fBifquery\fR, list all the interfaces which match the specified class. If no class specified, prints all the interfaces listed as \fBauto\fR. .TP .BR \-\-state For \fBifquery\fR, dump the state of the interfaces. When no interfaces specified, lists all interfaces brought up together with logical interfaces assigned to them and exits with a status code indicating success. If one or more interfaces specified, display state of these interfaces only; successful code is returned if all of interfaces given as arguments are up. Otherwise, 0 is returned. .SH EXAMPLES .TP .B ifup -a Bring up all the interfaces defined with .I auto in .I /etc/network/interfaces .TP .B ifup eth0 Bring up interface .B eth0 .TP .B ifup eth0=home Bring up interface .B eth0 as logical interface .B home .TP .B ifdown -a Bring down all interfaces that are currently up. .TP .B ifquery -l Print names of all interfaces specified with the \fBauto\fR keyword. .TP .B ifquery -l --allow=hotplug Print names of all interfaces specified with the \fBallow-hotplug\fR keyword. .TP .B ifquery eth0 Display the interface options as specified in the \fBifupdown\fR configuration. Each key-value pair is printed out on individual line using "\fB: \fR" as separator. .SH NOTES .BR ifup , .BR ifdown , and .BR ifquery are actually the same program called by different names. .P The program does not configure network interfaces directly; it runs low level utilities such as .BR ip to do its dirty work. .P When invoked, .B ifdown checks if .B ifup is still running. In that case, .B SIGTERM is sent to ifup. .P During interface deconfiguration, .BR ifdown ignores errors the same way as if .B \-\-ignore\-errors was specified. .SH FILES .TP .I /etc/network/interfaces definitions of network interfaces See .BR interfaces (5) for more information. .TP .I /run/network/ifstate current state of network interfaces .SH KNOWN BUGS/LIMITATIONS The program keeps records of whether network interfaces are up or down. Under exceptional circumstances these records can become inconsistent with the real states of the interfaces. For example, an interface that was brought up using .B ifup and later deconfigured using .B ifconfig will still be recorded as up. To fix this you can use the .B \-\-force option to force .B ifup or .B ifdown to run configuration or deconfiguration commands despite what it considers the current state of the interface to be. .P The file .I /run/network/ifstate must be writable for .B ifup or .B ifdown to work properly. If that location is not writable (for example, because the root filesystem is mounted read-only for system recovery) then .I /run/network/ifstate should be made a symbolic link to a writable location. If that is not possible then you can use the .B \-\-force option to run configuration or deconfiguration commands without updating the file. .P Note that the program does not run automatically: .B ifup alone does not bring up interfaces that appear as a result of hardware being installed and .B ifdown alone does not bring down interfaces that disappear as a result of hardware being removed. To automate the configuration of network interfaces you need to install other packages such as .BR udev (7) or .BR ifplugd (8). .SH AUTHORS The ifupdown suite was created by Anthony Towns , and is currently maintained by Guus Sliepen . .P Many others have helped develop ifupdown over time, see /usr/share/doc/ifupdown/changelog.Debian.gz for a full history. .SH SEE ALSO .BR interfaces (5), .BR ip (8), .BR ifconfig (8).