]> git.proxmox.com Git - mirror_frr.git/blob - yang/frr-interface.yang
Merge pull request #11480 from opensourcerouting/fix/peer_flags_luu
[mirror_frr.git] / yang / frr-interface.yang
1 module frr-interface {
2 yang-version 1.1;
3 namespace "http://frrouting.org/yang/interface";
4 prefix frr-interface;
5
6 import frr-vrf {
7 prefix frr-vrf;
8 }
9
10 import ietf-interfaces {
11 prefix ietf-if;
12 }
13
14 import ietf-yang-types {
15 prefix yang;
16 }
17
18 organization
19 "FRRouting";
20 contact
21 "FRR Users List: <mailto:frog@lists.frrouting.org>
22 FRR Development List: <mailto:dev@lists.frrouting.org>";
23 description
24 "This module defines a model for managing FRR interfaces.
25
26 Copyright 2020 FRRouting
27
28 Redistribution and use in source and binary forms, with or without
29 modification, are permitted provided that the following conditions
30 are met:
31
32 1. Redistributions of source code must retain the above copyright notice,
33 this list of conditions and the following disclaimer.
34
35 2. Redistributions in binary form must reproduce the above copyright
36 notice, this list of conditions and the following disclaimer in the
37 documentation and/or other materials provided with the distribution.
38
39 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
40 \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
41 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
42 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
43 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
44 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
45 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
46 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
47 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
48 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
49 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
50
51 revision 2020-02-05 {
52 description
53 "Added operational data";
54 }
55 revision 2019-09-09 {
56 description
57 "Added interface-ref typedef";
58 }
59 revision 2018-03-28 {
60 description
61 "Initial revision.";
62 }
63
64 identity other {
65 base ietf-if:interface-type;
66 description
67 "Other type";
68 }
69
70 identity unknown {
71 base ietf-if:interface-type;
72 description
73 "Unknown type";
74 }
75
76 identity ethernet {
77 base ietf-if:interface-type;
78 description
79 "Ethernet type";
80 }
81
82 identity exper-ethernet {
83 base ietf-if:interface-type;
84 description
85 "Experimental Ethernet type";
86 }
87
88 identity loopback {
89 base ietf-if:interface-type;
90 description
91 "Loopback type";
92 }
93
94 identity pimreg {
95 base ietf-if:interface-type;
96 description
97 "PIMSM Registration.";
98 }
99
100 identity ipip {
101 base ietf-if:interface-type;
102 description
103 "IPIP Tunnel.";
104 }
105
106 identity ipip6 {
107 base ietf-if:interface-type;
108 description
109 "IPIP6 Tunnel.";
110 }
111
112 identity ipgre {
113 base ietf-if:interface-type;
114 description
115 "GRE over IP.";
116 }
117
118 typedef interface-ref {
119 type leafref {
120 path "/frr-interface:lib/frr-interface:interface/frr-interface:name";
121 require-instance false;
122 }
123 description
124 "Reference to an interface";
125 }
126
127 typedef if-flags-type {
128 type enumeration {
129 enum "up" {
130 value 1;
131 description
132 "Active and ready to transfer packets.";
133 }
134 enum "broadcast" {
135 value 2;
136 description
137 "Broadcast enabled.";
138 }
139 enum "debug" {
140 value 3;
141 description
142 "Debug mode.";
143 }
144 enum "loopback" {
145 value 4;
146 description
147 "Loopback interface.";
148 }
149 enum "point-to-point" {
150 value 5;
151 description
152 "Point-to-Point link.";
153 }
154 enum "notrailers" {
155 value 6;
156 description
157 "This flag is unused in Linux, but it exists for BSD compatibility.
158 Avoid use of trailers";
159 }
160 enum "running" {
161 value 7;
162 description
163 "Up and Running.";
164 }
165 enum "noarp" {
166 value 8;
167 description
168 "Can't perform address resolution protocol.";
169 }
170 enum "promisc" {
171 value 9;
172 description
173 "Promiscuous mode. Receive all packets.";
174 }
175 enum "allmulti" {
176 value 10;
177 description
178 "Receive all multicast packets.";
179 }
180 enum "simplex" {
181 value 11;
182 description
183 "Does not Rx or Tx at the sametime.";
184 }
185 enum "link0" {
186 value 12;
187 description
188 "Link0.";
189 }
190 enum "link1" {
191 value 13;
192 description
193 "Link1.";
194 }
195 enum "link2" {
196 value 14;
197 description
198 "Link2.";
199 }
200 enum "multicast" {
201 value 15;
202 description
203 "Supports multicast transmission.";
204 }
205 enum "notransmit" {
206 value 16;
207 description
208 "Interface is no transmit mode.";
209 }
210 enum "nortexch" {
211 value 17;
212 description
213 "No routing info exchange.";
214 }
215 enum "virtual" {
216 value 18;
217 description
218 "Virtual interface.";
219 }
220 enum "ipv4" {
221 value 19;
222 description
223 "IPv4 enabled.";
224 }
225 enum "ipv6" {
226 value 20;
227 description
228 "IPv6 enabled.";
229 }
230 }
231 }
232
233 grouping if-common-operational {
234 leaf if-index {
235 type int32 {
236 range "0..2147483647";
237 }
238 description
239 "Interface index.";
240 }
241
242 leaf mtu {
243 type uint16;
244 description
245 "The size of the largest IPV4 packet that the interface
246 will send and receive.";
247 }
248
249 leaf mtu6 {
250 type uint32;
251 description
252 "The size of the largest IPV6 packet that the interface
253 will send and receive.";
254 }
255
256 leaf speed {
257 type uint32;
258 description
259 "Interface speed.";
260 }
261
262 leaf metric {
263 type uint32;
264 description
265 "Interface metric.";
266 }
267
268 leaf flags {
269 type if-flags-type;
270 description
271 "Interface flags.";
272 }
273
274 leaf type {
275 type identityref {
276 base ietf-if:interface-type;
277 }
278 description
279 "The link type of the interface.";
280 }
281
282 leaf phy-address {
283 type yang:mac-address;
284 description
285 "The interface's MAC address.";
286 }
287 }
288
289 container lib {
290 list interface {
291 key "name";
292 description
293 "Interface.";
294 leaf name {
295 type string;
296 description
297 "Interface name.";
298 }
299
300 leaf vrf {
301 type frr-vrf:vrf-ref;
302 description
303 "VRF this interface is associated with.";
304 config false;
305 }
306
307 leaf description {
308 type string;
309 description
310 "Interface description.";
311 }
312
313 container state {
314 config false;
315 uses if-common-operational;
316 }
317 }
318 }
319 }