]> git.proxmox.com Git - mirror_ifupdown2.git/blob - ifupdown2/man/ifquery.8.rst
man: ifquery: fix conflicting documentation about ifquery -i flag
[mirror_ifupdown2.git] / ifupdown2 / man / ifquery.8.rst
1 =======
2 ifquery
3 =======
4
5 -------------------------------------
6 query network interface configuration
7 -------------------------------------
8
9 :Author: Roopa Prabhu <roopa@cumulusnetworks.com>
10 :Date: 2014-02-05
11 :Copyright: Copyright 2014 Cumulus Networks, Inc. All rights reserved.
12 :Version: 0.1
13 :Manual section: 8
14
15 SYNOPSIS
16 ========
17
18 **ifquery [-v] [--allow CLASS] [--with-depends] -a|IFACE...**
19
20 **ifquery [-v] [-r|--running] [--allow CLASS] [--with-depends] -a|IFACE...**
21
22 **ifquery [-v] [-c|--check] [--allow CLASS] [--with-depends] -a|IFACE...**
23
24 **ifquery [-v] [-p|--print-dependency {list,dot}] [--allow CLASS] [--with-depends] -a|IFACE...**
25
26 **ifquery [-v] -s|--syntax-help**
27
28 DESCRIPTION
29 ===========
30 **ifquery** can be used to parse interface configuration file, query
31 running state or check running state of the interface with configuration
32 in **/etc/network/interfaces** file.
33
34 **ifquery** always works on the current **interfaces(5)** file
35 **/etc/network/interfaces** unless an alternate interfaces file is
36 defined in ifupdown2.conf or provided with the **-i** option.
37 Note: the -i option is enabled by default in ifupdown2.conf.
38
39 OPTIONS
40 =======
41 positional arguments:
42
43 **IFACE** interface list separated by spaces. **IFACE** list and **'-a'** argument are mutually exclusive.
44
45 optional arguments:
46
47 -h, --help show this help message and exit
48
49 -a, --all process all interfaces marked "auto"
50
51 -v, --verbose verbose
52
53 -d, --debug output debug info
54 --allow CLASS ignore non-"allow-CLASS" interfaces
55
56 -w, --with-depends run with all dependent interfaces. This option
57 is redundant when -a is specified. When '-a' is
58 specified, interfaces are always executed in
59 dependency order.
60
61 -X EXCLUDEPATS, --exclude EXCLUDEPATS
62 Exclude interfaces from the list of interfaces to
63 operate on. Can be specified multiple times
64 If the excluded interface has dependent interfaces,
65 (e.g. a bridge or a bond with multiple enslaved interfaces)
66 then each dependent interface must be specified in order
67 to be excluded.
68
69 -i INTERFACESFILE, --interfaces INTERFACESFILE
70 Use interfaces file instead of default
71 defined in ifupdown2.conf (default /etc/network/interfaces)
72
73 -t {native,json}, --interfaces-format {native,json}
74 interfaces file format
75
76 -r, --running print raw interfaces file entries
77
78 -c, --check check interface file contents against running state
79 of an interface. Returns exit code 0 on success and
80 1 on error
81
82 -x, --raw print raw config file entries
83
84 -o {native,json}, --format {native,json}
85 interface display format
86
87 -p, --print-dependency {list,dot}
88 print iface dependency in list or dot format
89
90 -s, --syntax-help print supported interface config syntax. Scans all
91 addon modules and dumps supported syntax from them
92 if provided by the module.
93
94 EXAMPLES
95 ========
96 # dump all or some interfaces config file entries
97 # (pretty prints user provided entries)
98
99 **ifquery -a**
100
101 **ifquery br0**
102
103 # Same as above but dump with dependencies
104
105 **ifquery br0 --with-depends**
106
107 # Check running state with the config in /etc/network/interfaces
108
109 **ifquery --check br0**
110
111 **ifquery --check --with-depends br0**
112
113 **ifquery --check -a**
114
115 # dump running state of all interfaces in /etc/network/interfaces format
116
117 **ifquery --running br0**
118
119 **ifquery --running --with-depends br0**
120
121 **ifquery --running -a**
122
123 # print dependency info in list format
124
125 **ifquery --print-dependency=list -a**
126
127 **ifquery --print-dependency=list br2000**
128
129 # print dependency info in dot format
130
131 **ifquery --print-dependency=dot -a**
132
133 **ifquery --print-dependency=dot br2000**
134
135 # Create an image (png) from the dot format
136
137 **ifquery --print-dependency=dot -a > interfaces.dot**
138
139 **dot -Tpng interfaces.dot > interfaces.png**
140
141 (The above command only works on a system with dot installed)
142
143 KNOWN_ISSUES
144 ============
145 **ifquery --check** is currently experimental
146
147 **ifquery --check** cannot validate usercommands given under pre-up, post-up etc
148 There is currently no support to check/validate ethtool iface attributes
149
150 SEE ALSO
151 ========
152 ifup(8),
153 ifdown(8),
154 ifreload(8),
155 interfaces(5),
156 ifupdown-addons-interfaces(5)