mirror of
				https://github.com/CumulusNetworks/ifupdown2.git
				synced 2024-05-06 15:54:50 +00:00 
			
		
		
		
	move ifupdown2/* .
ifupdown2 code was one level deeper because ifupdown2 initially had ifupdown2 and ifupdown2-addons as two separate packages. Since they were combined into one package, it makes sense to move all combined code under the top level directory Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
This commit is contained in:
		
							
								
								
									
										230
									
								
								man/ifquery.8
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										230
									
								
								man/ifquery.8
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,230 @@
 | 
			
		||||
.\" Man page generated from reStructeredText.
 | 
			
		||||
.
 | 
			
		||||
.TH IFQUERY 8 "2014-02-05" "0.1" ""
 | 
			
		||||
.SH NAME
 | 
			
		||||
ifquery \- query network interface configuration
 | 
			
		||||
.
 | 
			
		||||
.nr rst2man-indent-level 0
 | 
			
		||||
.
 | 
			
		||||
.de1 rstReportMargin
 | 
			
		||||
\\$1 \\n[an-margin]
 | 
			
		||||
level \\n[rst2man-indent-level]
 | 
			
		||||
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
 | 
			
		||||
-
 | 
			
		||||
\\n[rst2man-indent0]
 | 
			
		||||
\\n[rst2man-indent1]
 | 
			
		||||
\\n[rst2man-indent2]
 | 
			
		||||
..
 | 
			
		||||
.de1 INDENT
 | 
			
		||||
.\" .rstReportMargin pre:
 | 
			
		||||
. RS \\$1
 | 
			
		||||
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
 | 
			
		||||
. nr rst2man-indent-level +1
 | 
			
		||||
.\" .rstReportMargin post:
 | 
			
		||||
..
 | 
			
		||||
.de UNINDENT
 | 
			
		||||
. RE
 | 
			
		||||
.\" indent \\n[an-margin]
 | 
			
		||||
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
 | 
			
		||||
.nr rst2man-indent-level -1
 | 
			
		||||
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
 | 
			
		||||
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
 | 
			
		||||
..
 | 
			
		||||
.SH SYNOPSIS
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
\fBifquery [\-v] [\-\-allow CLASS] [\-\-with\-depends] \-a|IFACE...\fP
 | 
			
		||||
.sp
 | 
			
		||||
\fBifquery [\-v] [\-r|\-\-running] [\-\-allow CLASS] [\-\-with\-depends] \-a|IFACE...\fP
 | 
			
		||||
.sp
 | 
			
		||||
\fBifquery [\-v] [\-c|\-\-check] [\-\-allow CLASS] [\-\-with\-depends] \-a|IFACE...\fP
 | 
			
		||||
.sp
 | 
			
		||||
\fBifquery [\-v] [\-p|\-\-print\-dependency {list,dot}] [\-\-allow CLASS] [\-\-with\-depends] \-a|IFACE...\fP
 | 
			
		||||
.sp
 | 
			
		||||
\fBifquery [\-v] \-s|\-\-syntax\-help\fP
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.SH DESCRIPTION
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
\fBifquery\fP can be used to parse interface configuration file, query
 | 
			
		||||
running state or check running state of the interface with configuration
 | 
			
		||||
in \fB/etc/network/interfaces\fP file.
 | 
			
		||||
.sp
 | 
			
		||||
\fBifquery\fP always works on the current \fBinterfaces(5)\fP file
 | 
			
		||||
\fB/etc/network/interfaces\fP unless an alternate interfaces file is
 | 
			
		||||
provided with the \fB\-i\fP option.
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.SH OPTIONS
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
positional arguments:
 | 
			
		||||
.sp
 | 
			
		||||
\fBIFACE\fP   interface list separated by spaces. \fBIFACE\fP list and \fB\(aq\-a\(aq\fP argument are mutually exclusive.
 | 
			
		||||
.sp
 | 
			
		||||
optional arguments:
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.TP
 | 
			
		||||
.B \-h,  \-\-help
 | 
			
		||||
show this help message and exit
 | 
			
		||||
.TP
 | 
			
		||||
.B \-a,  \-\-all
 | 
			
		||||
process all interfaces marked "auto"
 | 
			
		||||
.TP
 | 
			
		||||
.B \-v,  \-\-verbose
 | 
			
		||||
verbose
 | 
			
		||||
.TP
 | 
			
		||||
.B \-d,  \-\-debug
 | 
			
		||||
output debug info
 | 
			
		||||
.TP
 | 
			
		||||
.BI \-\-allow \ CLASS
 | 
			
		||||
ignore non\-"allow\-CLASS" interfaces
 | 
			
		||||
.TP
 | 
			
		||||
.B \-w,  \-\-with\-depends
 | 
			
		||||
run with all dependent interfaces. This option
 | 
			
		||||
is redundant when \-a is specified. When \(aq\-a\(aq is
 | 
			
		||||
specified, interfaces are always executed in
 | 
			
		||||
dependency order.
 | 
			
		||||
.TP
 | 
			
		||||
.BI \-X \ EXCLUDEPATS, \ \-\-exclude \ EXCLUDEPATS
 | 
			
		||||
Exclude interfaces from the list of interfaces to
 | 
			
		||||
operate on. Can be specified multiple times
 | 
			
		||||
.TP
 | 
			
		||||
.BI \-i \ INTERFACESFILE, \ \-\-interfaces \ INTERFACESFILE
 | 
			
		||||
Use interfaces file instead of default
 | 
			
		||||
/etc/network/interfaces
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.TP
 | 
			
		||||
.B \-t {native,json}, \-\-interfaces\-format {native,json}
 | 
			
		||||
interfaces file format
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.TP
 | 
			
		||||
.B \-r,  \-\-running
 | 
			
		||||
print raw interfaces file entries
 | 
			
		||||
.TP
 | 
			
		||||
.B \-c,  \-\-check
 | 
			
		||||
check interface file contents against running state
 | 
			
		||||
of an interface. Returns exit code 0 on success and
 | 
			
		||||
1 on error
 | 
			
		||||
.TP
 | 
			
		||||
.B \-x,  \-\-raw
 | 
			
		||||
print raw config file entries
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.TP
 | 
			
		||||
.B \-o {native,json}, \-\-format {native,json}
 | 
			
		||||
interface display format
 | 
			
		||||
.TP
 | 
			
		||||
.B \-p, \-\-print\-dependency {list,dot}
 | 
			
		||||
print iface dependency in list or dot format
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.TP
 | 
			
		||||
.B \-s,  \-\-syntax\-help
 | 
			
		||||
print supported interface config syntax. Scans all
 | 
			
		||||
addon modules and dumps supported syntax from them
 | 
			
		||||
if provided by the module.
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.SH EXAMPLES
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
# dump all or some interfaces config file entries
 | 
			
		||||
# (pretty prints user provided entries)
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
\fBifquery \-a\fP
 | 
			
		||||
.sp
 | 
			
		||||
\fBifquery br0\fP
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.sp
 | 
			
		||||
# Same as above but dump with dependencies
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
\fBifquery br0 \-\-with\-depends\fP
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.sp
 | 
			
		||||
# Check running state with the config in /etc/network/interfaces
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
\fBifquery \-\-check br0\fP
 | 
			
		||||
.sp
 | 
			
		||||
\fBifquery \-\-check \-\-with\-depends br0\fP
 | 
			
		||||
.sp
 | 
			
		||||
\fBifquery \-\-check \-a\fP
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.sp
 | 
			
		||||
# dump running state of all interfaces in /etc/network/interfaces format
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
\fBifquery \-\-running br0\fP
 | 
			
		||||
.sp
 | 
			
		||||
\fBifquery \-\-running \-\-with\-depends br0\fP
 | 
			
		||||
.sp
 | 
			
		||||
\fBifquery \-\-running \-a\fP
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.sp
 | 
			
		||||
# print dependency info in list format
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
\fBifquery \-\-print\-dependency=list \-a\fP
 | 
			
		||||
.sp
 | 
			
		||||
\fBifquery \-\-print\-dependency=list  br2000\fP
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.sp
 | 
			
		||||
# print dependency info in dot format
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
\fBifquery \-\-print\-dependency=dot \-a\fP
 | 
			
		||||
.sp
 | 
			
		||||
\fBifquery \-\-print\-dependency=dot br2000\fP
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.sp
 | 
			
		||||
# Create an image (png) from the dot format
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
\fBifquery \-\-print\-dependency=dot \-a > interfaces.dot\fP
 | 
			
		||||
.sp
 | 
			
		||||
\fBdot \-Tpng interfaces.dot > interfaces.png\fP
 | 
			
		||||
.sp
 | 
			
		||||
(The above command only works on a system with dot installed)
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.SH KNOWN_ISSUES
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
\fBifquery \-\-check\fP is currently experimental
 | 
			
		||||
.sp
 | 
			
		||||
\fBifquery \-\-check\fP cannot validate usercommands given under pre\-up, post\-up etc
 | 
			
		||||
There is currently no support to check/validate ethtool iface attributes
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.SH SEE ALSO
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
ifup(8),
 | 
			
		||||
ifdown(8),
 | 
			
		||||
ifreload(8),
 | 
			
		||||
interfaces(5),
 | 
			
		||||
ifupdown\-addons\-interfaces(5)
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.SH AUTHOR
 | 
			
		||||
Roopa Prabhu <roopa@cumulusnetworks.com>
 | 
			
		||||
.SH COPYRIGHT
 | 
			
		||||
Copyright 2014 Cumulus Networks, Inc.  All rights reserved.
 | 
			
		||||
.\" Generated by docutils manpage writer.
 | 
			
		||||
.\" 
 | 
			
		||||
.
 | 
			
		||||
							
								
								
									
										116
									
								
								man/ifreload.8
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										116
									
								
								man/ifreload.8
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,116 @@
 | 
			
		||||
.\" Man page generated from reStructeredText.
 | 
			
		||||
.
 | 
			
		||||
.TH IFRELOAD 8 "2014-02-05" "0.1" ""
 | 
			
		||||
.SH NAME
 | 
			
		||||
ifreload \- reload network interface configuration
 | 
			
		||||
.
 | 
			
		||||
.nr rst2man-indent-level 0
 | 
			
		||||
.
 | 
			
		||||
.de1 rstReportMargin
 | 
			
		||||
\\$1 \\n[an-margin]
 | 
			
		||||
level \\n[rst2man-indent-level]
 | 
			
		||||
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
 | 
			
		||||
-
 | 
			
		||||
\\n[rst2man-indent0]
 | 
			
		||||
\\n[rst2man-indent1]
 | 
			
		||||
\\n[rst2man-indent2]
 | 
			
		||||
..
 | 
			
		||||
.de1 INDENT
 | 
			
		||||
.\" .rstReportMargin pre:
 | 
			
		||||
. RS \\$1
 | 
			
		||||
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
 | 
			
		||||
. nr rst2man-indent-level +1
 | 
			
		||||
.\" .rstReportMargin post:
 | 
			
		||||
..
 | 
			
		||||
.de UNINDENT
 | 
			
		||||
. RE
 | 
			
		||||
.\" indent \\n[an-margin]
 | 
			
		||||
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
 | 
			
		||||
.nr rst2man-indent-level -1
 | 
			
		||||
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
 | 
			
		||||
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
 | 
			
		||||
..
 | 
			
		||||
.SH SYNOPSIS
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
ifreload [\-h] (\-a|\-c) [\-v] [\-d] [\-f] [\-n]
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.SH DESCRIPTION
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
reloads network \fBinterfaces(5)\fP file \fB/etc/network/interfaces\fP.
 | 
			
		||||
.sp
 | 
			
		||||
Runs \fBifdown\fP on interfaces that changed in the interfaces file and
 | 
			
		||||
subsequently runs \fBifup\fP on all interfaces.
 | 
			
		||||
.sp
 | 
			
		||||
\fBifreload\fP is equivalent to \fBifdown \-a\fP followed by \fBifup \-a\fP
 | 
			
		||||
but it skips \fBifdown\fP for interfaces that did not change in the config
 | 
			
		||||
file.
 | 
			
		||||
.sp
 | 
			
		||||
If you do not wish to execute \fBdown\fP on any interfaces, but only \fBup\fP on
 | 
			
		||||
interfaces that were already \fBup\fP, please see the \fB\-\-currently\-up\fP
 | 
			
		||||
option below.
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.SH OPTIONS
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.TP
 | 
			
		||||
.B \-h,  \-\-help
 | 
			
		||||
show this help message and exit
 | 
			
		||||
.TP
 | 
			
		||||
.B \-a,  \-\-all
 | 
			
		||||
process all interfaces marked "auto"
 | 
			
		||||
.TP
 | 
			
		||||
.B \-v,  \-\-verbose
 | 
			
		||||
verbose
 | 
			
		||||
.TP
 | 
			
		||||
.B \-d,  \-\-debug
 | 
			
		||||
output debug info
 | 
			
		||||
.TP
 | 
			
		||||
.B \-f,  \-\-force
 | 
			
		||||
force run all operations
 | 
			
		||||
.TP
 | 
			
		||||
.B \-c,  \-\-currently\-up
 | 
			
		||||
only reload auto and other interfaces that are
 | 
			
		||||
currently up. This can be used as a non\-disruptive
 | 
			
		||||
alternative to \-a because it will not down any
 | 
			
		||||
interfaces
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.SH EXAMPLES
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
# reload all auto interfaces in \fBinterfaces(5)\fP file
 | 
			
		||||
.sp
 | 
			
		||||
\fBifreload \-a\fP
 | 
			
		||||
.sp
 | 
			
		||||
# reload all interfaces using service command
 | 
			
		||||
.sp
 | 
			
		||||
\fBservice networking reload\fP
 | 
			
		||||
.sp
 | 
			
		||||
# reload all currently up interfaces without bringing any interfaces down
 | 
			
		||||
.sp
 | 
			
		||||
\fBservice networking reload\-currently\-up\fP
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.SH SEE ALSO
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
ifup(8),
 | 
			
		||||
ifdown(8),
 | 
			
		||||
ifquery(8),
 | 
			
		||||
interfaces(5),
 | 
			
		||||
ifupdown\-addons\-interfaces(5)
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.SH AUTHOR
 | 
			
		||||
Roopa Prabhu <roopa@cumulusnetworks.com>
 | 
			
		||||
.SH COPYRIGHT
 | 
			
		||||
Copyright 2014 Cumulus Networks, Inc.  All rights reserved.
 | 
			
		||||
.\" Generated by docutils manpage writer.
 | 
			
		||||
.\" 
 | 
			
		||||
.
 | 
			
		||||
							
								
								
									
										269
									
								
								man/ifup.8
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										269
									
								
								man/ifup.8
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,269 @@
 | 
			
		||||
.\" Man page generated from reStructeredText.
 | 
			
		||||
.
 | 
			
		||||
.TH IFUP 8 "2014-02-05" "0.1" ""
 | 
			
		||||
.SH NAME
 | 
			
		||||
ifup \- network interface management commands
 | 
			
		||||
.
 | 
			
		||||
.nr rst2man-indent-level 0
 | 
			
		||||
.
 | 
			
		||||
.de1 rstReportMargin
 | 
			
		||||
\\$1 \\n[an-margin]
 | 
			
		||||
level \\n[rst2man-indent-level]
 | 
			
		||||
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
 | 
			
		||||
-
 | 
			
		||||
\\n[rst2man-indent0]
 | 
			
		||||
\\n[rst2man-indent1]
 | 
			
		||||
\\n[rst2man-indent2]
 | 
			
		||||
..
 | 
			
		||||
.de1 INDENT
 | 
			
		||||
.\" .rstReportMargin pre:
 | 
			
		||||
. RS \\$1
 | 
			
		||||
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
 | 
			
		||||
. nr rst2man-indent-level +1
 | 
			
		||||
.\" .rstReportMargin post:
 | 
			
		||||
..
 | 
			
		||||
.de UNINDENT
 | 
			
		||||
. RE
 | 
			
		||||
.\" indent \\n[an-margin]
 | 
			
		||||
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
 | 
			
		||||
.nr rst2man-indent-level -1
 | 
			
		||||
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
 | 
			
		||||
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
 | 
			
		||||
..
 | 
			
		||||
.SH NAME
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
\fBifup\fP \- bring a network interface up
 | 
			
		||||
.sp
 | 
			
		||||
\fBifdown\fP \- take a network interface down
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.SH SYNOPSIS
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.TP
 | 
			
		||||
.B ifup [\-h] [\-a] [\-v] [\-d] [\-\-allow CLASS] [\-\-with\-depends]
 | 
			
		||||
\fB[\-X EXCLUDEPATS] [\-f] [\-n] [\-\-print\-dependency {list,dot}]\fP
 | 
			
		||||
\fB[IFACE [IFACE ...]]\fP
 | 
			
		||||
.TP
 | 
			
		||||
.B ifdown [\-h] [\-a] [\-v] [\-d] [\-\-allow CLASS] [\-\-with\-depends]
 | 
			
		||||
\fB[\-X EXCLUDEPATS] [\-f] [\-n] [\-\-print\-dependency {list,dot}]\fP
 | 
			
		||||
\fB[IFACE [IFACE ...]]\fP
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.SH DESCRIPTION
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
\fBifup\fP and \fBifdown\fP commands can be used to configure (or, respectively,
 | 
			
		||||
deconfigure) network interfaces based on interface definitions in the
 | 
			
		||||
file \fB/etc/network/interfaces/\fP file.
 | 
			
		||||
.sp
 | 
			
		||||
\fBifquery(8)\fP maybe used in conjunction with \fBifup\fP and \fBifdown\fP
 | 
			
		||||
commands to query and validate applied/running configuration.
 | 
			
		||||
.sp
 | 
			
		||||
\fBifup\fP always works on the current \fBinterfaces(5)\fP file under
 | 
			
		||||
\fB/etc/network/interfaces\fP. \fBifdown\fP works on the last applied interface
 | 
			
		||||
configuration.
 | 
			
		||||
.sp
 | 
			
		||||
\fBifup\fP on an already ifup\(aqed interface will re\-apply the configuration,
 | 
			
		||||
skipping already applied configuration whereever possible. In many cases
 | 
			
		||||
where config commands are idempotent, you will see that ifup/ifdown will
 | 
			
		||||
reapply the config even if the interface already has that config.
 | 
			
		||||
.sp
 | 
			
		||||
\fBifup\fP and \fBifdown\fP understands interface dependency order.
 | 
			
		||||
.sp
 | 
			
		||||
For logical interfaces like vlans, bridges, bonds, \fBifup\fP creates the
 | 
			
		||||
interface and \fBifdown\fP deletes the interface. Use \fB\-\-admin\-state\fP
 | 
			
		||||
option if you only want to administratively bring the interface up/down.
 | 
			
		||||
.sp
 | 
			
		||||
When \fBifup\fP and \fBifdown\fP are used with interfaces on command line,
 | 
			
		||||
they must be have a \fBiface\fP section in the \fBinterfaces(5)\fP file.
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.SH OPTIONS
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
positional arguments:
 | 
			
		||||
.sp
 | 
			
		||||
\fBIFACE\fP  interface list separated by spaces. \fBIFACE\fP list and \fB\(aq\-a\(aq\fP
 | 
			
		||||
argument are mutually exclusive.
 | 
			
		||||
.sp
 | 
			
		||||
optional arguments:
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.TP
 | 
			
		||||
.B \-h,  \-\-help
 | 
			
		||||
show this help message and exit
 | 
			
		||||
.TP
 | 
			
		||||
.B \-a,  \-\-all
 | 
			
		||||
process all interfaces marked "auto"
 | 
			
		||||
.TP
 | 
			
		||||
.B \-v,  \-\-verbose
 | 
			
		||||
verbose
 | 
			
		||||
.TP
 | 
			
		||||
.B \-d,  \-\-debug
 | 
			
		||||
output debug info
 | 
			
		||||
.TP
 | 
			
		||||
.BI \-\-allow \ CLASS
 | 
			
		||||
ignore non\-"allow\-CLASS" interfaces
 | 
			
		||||
.TP
 | 
			
		||||
.B \-w,  \-\-with\-depends
 | 
			
		||||
run with all dependent interfaces. This option
 | 
			
		||||
is redundant when \-a is specified. When \(aq\-a\(aq is
 | 
			
		||||
specified, interfaces are always executed in
 | 
			
		||||
dependency order.
 | 
			
		||||
.TP
 | 
			
		||||
.BI \-X \ EXCLUDEPATS, \ \-\-exclude \ EXCLUDEPATS
 | 
			
		||||
Exclude interfaces from the list of interfaces to
 | 
			
		||||
operate on. Can be specified multiple times
 | 
			
		||||
.TP
 | 
			
		||||
.BI \-i \ INTERFACESFILE, \ \-\-interfaces \ INTERFACESFILE
 | 
			
		||||
Use interfaces file instead of default
 | 
			
		||||
/etc/network/interfaces
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.TP
 | 
			
		||||
.B \-t {native,json}, \-\-interfaces\-format {native,json}
 | 
			
		||||
interfaces file format
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.TP
 | 
			
		||||
.B \-f,  \-\-force
 | 
			
		||||
force run all operations
 | 
			
		||||
.TP
 | 
			
		||||
.B \-n,  \-\-no\-act
 | 
			
		||||
print out what would happen, but don\(aqt do it
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.TP
 | 
			
		||||
.B \-p, \-\-print\-dependency {list,dot}
 | 
			
		||||
print iface dependency in list or dot format
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.TP
 | 
			
		||||
.B \-m,  \-\-admin\-state,  \-\-no\-scripts
 | 
			
		||||
dont run any addon modules/scripts. Only bring
 | 
			
		||||
the interface administratively up/down
 | 
			
		||||
.TP
 | 
			
		||||
.B \-u,  \-\-use\-current\-config
 | 
			
		||||
By default ifdown looks at the saved state for
 | 
			
		||||
interfaces to bring down. This option allows ifdown
 | 
			
		||||
to look at the current interfaces file. Useful when
 | 
			
		||||
your state file is corrupted or you want down to use
 | 
			
		||||
the latest from the interfaces file
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.SH EXAMPLES
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
# bringing up all interfaces
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
\fBifup \-a\fP
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.sp
 | 
			
		||||
# bringing up interface list
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
\fBifup swp1 swp2\fP
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.sp
 | 
			
		||||
# bringing up interface with its dependents
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
\fBifup br0 \-\-with\-depends\fP
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.sp
 | 
			
		||||
# bringing down all interfaces
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
\fBifdown \-a\fP
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.sp
 | 
			
		||||
# bringing down a single interface
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
\fBifdown swp1\fP
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.sp
 | 
			
		||||
# excluding interfaces using \-X option
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
\fBifdown \-X eth0 \-a\fP
 | 
			
		||||
.sp
 | 
			
		||||
\fBifup \-X eth0 \-a\fP
 | 
			
		||||
.sp
 | 
			
		||||
\fBifdown \-X eth0 \-X lo \-a\fP
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.sp
 | 
			
		||||
# using verbose \-v option to see what is going on
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
\fBifup \-v \-a\fP
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.sp
 | 
			
		||||
# using debug \-d option to see more of what is going on
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
\fBifup \-d \-a\fP
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.sp
 | 
			
		||||
# ignore errors
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
\fBifup \-a \-f\fP
 | 
			
		||||
.sp
 | 
			
		||||
\fBifdown \-a \-f\fP
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.sp
 | 
			
		||||
# run ifdown and ifup on all interfaces using service command/init script
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
\fBservice networking restart\fP
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.sp
 | 
			
		||||
# run ifup on all interfaces using service command/init script
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
\fBservice networking start\fP
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.sp
 | 
			
		||||
# ifdown on all interfaces using service command/init script
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
\fBservice networking stop\fP
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.sp
 | 
			
		||||
# To run ifup/ifdown on only interfaces that changed see \fBifreload(8)\fP
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.SH SEE ALSO
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
ifquery(8),
 | 
			
		||||
ifreload(8),
 | 
			
		||||
interfaces(5),
 | 
			
		||||
ifupdown\-addons\-interfaces(5)
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.SH AUTHOR
 | 
			
		||||
Roopa Prabhu <roopa@cumulusnetworks.com>
 | 
			
		||||
.SH COPYRIGHT
 | 
			
		||||
Copyright 2014 Cumulus Networks, Inc.  All rights reserved.
 | 
			
		||||
.\" Generated by docutils manpage writer.
 | 
			
		||||
.\" 
 | 
			
		||||
.
 | 
			
		||||
							
								
								
									
										1343
									
								
								man/ifupdown-addons-interfaces.5
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1343
									
								
								man/ifupdown-addons-interfaces.5
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										207
									
								
								man/interfaces.5
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										207
									
								
								man/interfaces.5
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,207 @@
 | 
			
		||||
.\" Man page generated from reStructeredText.
 | 
			
		||||
.
 | 
			
		||||
.TH INTERFACES 5 "2014-02-05" "0.1" ""
 | 
			
		||||
.SH NAME
 | 
			
		||||
interfaces \- network interface configuration for ifupdown
 | 
			
		||||
.
 | 
			
		||||
.nr rst2man-indent-level 0
 | 
			
		||||
.
 | 
			
		||||
.de1 rstReportMargin
 | 
			
		||||
\\$1 \\n[an-margin]
 | 
			
		||||
level \\n[rst2man-indent-level]
 | 
			
		||||
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
 | 
			
		||||
-
 | 
			
		||||
\\n[rst2man-indent0]
 | 
			
		||||
\\n[rst2man-indent1]
 | 
			
		||||
\\n[rst2man-indent2]
 | 
			
		||||
..
 | 
			
		||||
.de1 INDENT
 | 
			
		||||
.\" .rstReportMargin pre:
 | 
			
		||||
. RS \\$1
 | 
			
		||||
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
 | 
			
		||||
. nr rst2man-indent-level +1
 | 
			
		||||
.\" .rstReportMargin post:
 | 
			
		||||
..
 | 
			
		||||
.de UNINDENT
 | 
			
		||||
. RE
 | 
			
		||||
.\" indent \\n[an-margin]
 | 
			
		||||
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
 | 
			
		||||
.nr rst2man-indent-level -1
 | 
			
		||||
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
 | 
			
		||||
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
 | 
			
		||||
..
 | 
			
		||||
.SH DESCRIPTION
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
\fB/etc/network/interfaces\fP contains network interface configuration
 | 
			
		||||
information for the \fBifup(8)\fP, \fBifdown(8)\fP and \fBifquery(8)\fP commands.
 | 
			
		||||
.sp
 | 
			
		||||
This is where you configure how your system is connected to the network.
 | 
			
		||||
.sp
 | 
			
		||||
Lines starting with # are ignored. Note that end\-of\-line comments are
 | 
			
		||||
NOT supported, comments must be on a line of their own.
 | 
			
		||||
.sp
 | 
			
		||||
A line may be extended across multiple lines by making the last character
 | 
			
		||||
a backslash.
 | 
			
		||||
.sp
 | 
			
		||||
The file consists of zero or more "iface", "auto",  "allow\-"
 | 
			
		||||
and "source" stanzas. Here is an example:
 | 
			
		||||
.sp
 | 
			
		||||
.nf
 | 
			
		||||
.ft C
 | 
			
		||||
auto lo eth0
 | 
			
		||||
allow\-hotplug eth1
 | 
			
		||||
 | 
			
		||||
iface lo inet loopback
 | 
			
		||||
 | 
			
		||||
source /etc/network/interfaces.d/bridges
 | 
			
		||||
 | 
			
		||||
iface eth0 inet static
 | 
			
		||||
    address 192.168.1.1/24
 | 
			
		||||
    up flush\-mail
 | 
			
		||||
 | 
			
		||||
iface eth1 inet dhcp
 | 
			
		||||
.ft P
 | 
			
		||||
.fi
 | 
			
		||||
.sp
 | 
			
		||||
Lines 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.
 | 
			
		||||
.sp
 | 
			
		||||
Lines beginning with "allow\-" are  used  to  identify  interfaces  that
 | 
			
		||||
should  be  brought  up automatically by various subsytems. This may be
 | 
			
		||||
done using a command such as "ifup \-\-allow=hotplug  eth0  eth1",  which
 | 
			
		||||
will  only  bring up eth0 or eth1 if it is listed in an "allow\-hotplug"
 | 
			
		||||
line. Note that "allow\-auto" and "auto" are synonyms.
 | 
			
		||||
.sp
 | 
			
		||||
Lines beginning with "source" are used to include  stanzas  from  other
 | 
			
		||||
files, so configuration can be split into many files. The word "source"
 | 
			
		||||
is followed by the path of file to be sourced. Shell wildcards  can  be
 | 
			
		||||
used. Currently only supports absolute
 | 
			
		||||
path names.
 | 
			
		||||
.sp
 | 
			
		||||
iface is normally given a interface name as its first non\-option
 | 
			
		||||
argument.
 | 
			
		||||
.sp
 | 
			
		||||
The interface name is followed by the name of the address family that the
 | 
			
		||||
interface uses. This will be "inet" for TCP/IP networking and inet6 for
 | 
			
		||||
ipv6. Following that is the name of the method used to configure the
 | 
			
		||||
interface.
 | 
			
		||||
.sp
 | 
			
		||||
ifupdown supports iface stanzas without a family or a method. This enables
 | 
			
		||||
using the same stanza for inet and inet6 family addresses. And the method
 | 
			
		||||
defaults to "static"
 | 
			
		||||
.sp
 | 
			
		||||
Additional interface options/attributes can be given on subsequent lines
 | 
			
		||||
in the iface stanza. These options come from addon modules. see
 | 
			
		||||
\fBifupdown\-addons\-interfaces(5)\fP for these options.
 | 
			
		||||
.sp
 | 
			
		||||
example bridge interface with additional attributes listed in the
 | 
			
		||||
\fBifupdown\-addons\-interfaces(5)\fP man page:
 | 
			
		||||
.sp
 | 
			
		||||
.nf
 | 
			
		||||
.ft C
 | 
			
		||||
auto br0
 | 
			
		||||
iface br0
 | 
			
		||||
    address 12.0.0.4/24
 | 
			
		||||
    address 2000:1000:1000:1000:3::5/128
 | 
			
		||||
    bridge\-ports swp1 swp2 swp3
 | 
			
		||||
    bridge\-stp on
 | 
			
		||||
.ft P
 | 
			
		||||
.fi
 | 
			
		||||
.sp
 | 
			
		||||
ifupdown supports python\-mako style templates in the interfaces file.
 | 
			
		||||
See examples section for details.
 | 
			
		||||
.sp
 | 
			
		||||
See \fB/usr/share/doc/python\-ifupdown2/examples/\fP for \fBinterfaces(5)\fP
 | 
			
		||||
file examples and interfaces file generation scripts.
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.SH METHODS
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
Both \fBinet\fP and \fBinet6\fP address family interfaces can use the following
 | 
			
		||||
methods (However they are not required):
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.TP
 | 
			
		||||
.B The loopback Method
 | 
			
		||||
This method may be used to define the loopback interface.
 | 
			
		||||
.TP
 | 
			
		||||
.B The static Method
 | 
			
		||||
This method may be used to define ethernet interfaces with
 | 
			
		||||
statically allocated addresses.
 | 
			
		||||
.TP
 | 
			
		||||
.B The dhcp Method
 | 
			
		||||
This method may be used to obtain an address via DHCP.
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.SH BUILTIN INTERFACES
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
\fBiface\fP sections for some interfaces like physical interfaces or vlan
 | 
			
		||||
interfaces in dot notation (like eth1.100) are understood by ifupdown.
 | 
			
		||||
These interfaces do not need an entry in the interfaces file if
 | 
			
		||||
they are dependents of other interfaces and dont need any specific
 | 
			
		||||
configurations like addresses etc.
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.SH EXAMPLES
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
Sample /etc/network/interfaces file:
 | 
			
		||||
.sp
 | 
			
		||||
.nf
 | 
			
		||||
.ft C
 | 
			
		||||
auto lo
 | 
			
		||||
iface lo
 | 
			
		||||
    address 192.168.2.0/24
 | 
			
		||||
    address 2001:dee:eeee:1::4/128
 | 
			
		||||
 | 
			
		||||
auto eth0
 | 
			
		||||
iface eth0 inet dhcp
 | 
			
		||||
 | 
			
		||||
auto eth1
 | 
			
		||||
iface eth1 inet manual
 | 
			
		||||
    address 192.168.2.0/24
 | 
			
		||||
    address 2001:dee:eeee:1::4/128
 | 
			
		||||
 | 
			
		||||
# source files from a directory /etc/network/interfaces.d
 | 
			
		||||
source /etc/network/interfaces.d/*
 | 
			
		||||
 | 
			
		||||
# Using mako style templates
 | 
			
		||||
% for v in [11,12]:
 | 
			
		||||
    auto vlan${v}
 | 
			
		||||
    iface vlan${v} inet static
 | 
			
		||||
        address 10.20.${v}.3/24
 | 
			
		||||
% endfor
 | 
			
		||||
.ft P
 | 
			
		||||
.fi
 | 
			
		||||
.sp
 | 
			
		||||
For additional syntax and examples see \fBifupdown\-addons\-interfaces(5)\fP
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.SH FILES
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
/etc/network/interfaces
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.SH SEE ALSO
 | 
			
		||||
.INDENT 0.0
 | 
			
		||||
.INDENT 3.5
 | 
			
		||||
ifupdown\-addons\-interfaces(5),
 | 
			
		||||
ifup(8),
 | 
			
		||||
ifquery(8),
 | 
			
		||||
ifreload(8)
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.UNINDENT
 | 
			
		||||
.SH AUTHOR
 | 
			
		||||
Roopa Prabhu <roopa@cumulusnetworks.com>
 | 
			
		||||
.SH COPYRIGHT
 | 
			
		||||
Copyright 2014 Cumulus Networks, Inc.  All rights reserved.
 | 
			
		||||
.\" Generated by docutils manpage writer.
 | 
			
		||||
.\" 
 | 
			
		||||
.
 | 
			
		||||
		Reference in New Issue
	
	Block a user