]> git.proxmox.com Git - mirror_ifupdown2.git/blame - ifupdown2/man.rst/ifquery.8.rst
Merge 'vlan filtering bridge + vxlan + mlag + vrr' support from internal
[mirror_ifupdown2.git] / ifupdown2 / man.rst / ifquery.8.rst
CommitLineData
2c8c4ce7
RP
1=======
2ifquery
3=======
4
5-------------------------------------
6query 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
15SYNOPSIS
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
28DESCRIPTION
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 provided with the **-i** option.
37
38OPTIONS
39=======
40 positional arguments:
41
42 **IFACE** interface list separated by spaces. **IFACE** list and **'-a'** argument are mutually exclusive.
43
44 optional arguments:
45
46 -h, --help show this help message and exit
47
48 -a, --all process all interfaces marked "auto"
49
50 -v, --verbose verbose
51
52 -d, --debug output debug info
f82758bf 53 --allow CLASS ignore non-"allow-CLASS" interfaces
2c8c4ce7
RP
54
55 -w, --with-depends run with all dependent interfaces. This option
56 is redundant when -a is specified. When '-a' is
57 specified, interfaces are always executed in
58 dependency order.
59
60 -X EXCLUDEPATS, --exclude EXCLUDEPATS
61 Exclude interfaces from the list of interfaces to
62 operate on. Can be specified multiple times
63
64 -i INTERFACESFILE, --interfaces INTERFACESFILE
65 Use interfaces file instead of default
66 /etc/network/interfaces
67
f82758bf
RP
68 -t {native,json}, --interfaces-format {native,json}
69 interfaces file format
70
2c8c4ce7
RP
71 -r, --running print raw interfaces file entries
72
73 -c, --check check interface file contents against running state
74 of an interface. Returns exit code 0 on success and
75 1 on error
76
77 -x, --raw print raw config file entries
78
2c8c4ce7
RP
79 -o {native,json}, --format {native,json}
80 interface display format
81
82 -p, --print-dependency {list,dot}
83 print iface dependency in list or dot format
84
85 -s, --syntax-help print supported interface config syntax. Scans all
86 addon modules and dumps supported syntax from them
87 if provided by the module.
88
89EXAMPLES
90========
91 # dump all or some interfaces config file entries
92 # (pretty prints user provided entries)
93
94 **ifquery -a**
95
96 **ifquery br0**
97
98 # Same as above but dump with dependencies
99
100 **ifquery br0 --with-depends**
101
102 # Check running state with the config in /etc/network/interfaces
103
104 **ifquery --check br0**
105
106 **ifquery --check --with-depends br0**
107
108 **ifquery --check -a**
109
110 # dump running state of all interfaces in /etc/network/interfaces format
111
112 **ifquery --running br0**
113
114 **ifquery --running --with-depends br0**
115
116 **ifquery --running -a**
117
118 # print dependency info in list format
119
120 **ifquery --print-dependency=list -a**
121
122 **ifquery --print-dependency=list br2000**
123
124 # print dependency info in dot format
125
126 **ifquery --print-dependency=dot -a**
127
128 **ifquery --print-dependency=dot br2000**
129
130 # Create an image (png) from the dot format
131
132 **ifquery --print-dependency=dot -a > interfaces.dot**
133
134 **dot -Tpng interfaces.dot > interfaces.png**
135
136 (The above command only works on a system with dot installed)
137
138KNOWN_ISSUES
139============
140 **ifquery --check** is currently experimental
141
142 **ifquery --check** cannot validate usercommands given under pre-up, post-up etc
143 There is currently no support to check/validate ethtool iface attributes
144
145SEE ALSO
146========
147 ifup(8),
148 ifdown(8),
149 ifreload(8),
150 interfaces(5),
151 ifupdown-addons-interfaces(5)