-
Notifications
You must be signed in to change notification settings - Fork 2
447 lines (426 loc) · 12.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
module ietf-dhcpv6-client {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-client";
prefix "dhcpv6-client";
import ietf-inet-types {
prefix inet;
revision-date "2013-07-15";
}
import ietf-yang-types {
prefix yang;
revision-date "2013-07-15";
}
import ietf-dhcpv6-options {
prefix dhcpv6-options;
revision-date "2017-11-24";
}
organization "DHC WG";
contact "[email protected]
description "This model defines a YANG data model that can be
used to configure and manage a DHCPv6 client.";
revision 2017-11-29{
description "First version of the seperation of Configuration
and State trees.";
reference "I-D: draft-ietf-dhc-dhcpv6-yang";
}
revision 2017-11-24 {
description "First version of the separated client specific
YANG model.";
}
/*
* Grouping
*/
grouping vendor-infor {
description "Vendor information.";
container vendor-info {
description "";
leaf ent-num {
type uint32;
mandatory true;
description "enterprise number";
}
leaf-list data {
type string;
description "specific vendor info";
}
}
}
grouping duid {
description "DHCP Unique Identifier";
reference "RFC3315: Section 9";
choice duid-type {
description "Selects the format for the DUID.";
case duid-llt {
description "DUID Based on Link-layer Address Plus Time";
reference "RFC3315 Section 9.2";
leaf duid-llt-hardware-type {
type uint16;
description "Hardware type as assigned by IANA (RFC826).";
}
leaf duid-llt-time {
type yang:timeticks;
description "The time value is the time that the DUID is generated
represented in seconds since midnight (UTC), January 1, 2000,
modulo 2^32.";
}
leaf duid-llt-link-layer-addr {
type yang:mac-address;
description "Link-layer address as described in RFC2464";
}
}
case duid-en {
description "DUID Assigned by Vendor Based on Enterprise Number";
reference "RFC3315 Section 9.3";
leaf duid-en-enterprise-number {
type uint32;
description "Vendor's registered Private Enterprise Number as
maintained by IANA";
}
leaf duid-en-identifier {
type string;
description "Indentifier, unique to the device that is using it";
}
}
case duid-ll {
description "DUID Based on Link-layer Address";
reference "RFC3315 Section 9.4";
leaf duid-ll-hardware-type {
type uint16;
description "Hardware type as assigned by IANA (RFC826).";
}
leaf duid-ll-time {
type yang:timeticks;
description "The time value is the time that the DUID is generated
represented in seconds since midnight (UTC), January 1, 2000,
modulo 2^32.";
}
}
}
}
grouping portset-para {
description "portset parameters";
container port-parameter {
description "port parameter";
leaf offset {
type uint8;
mandatory true;
description "offset in a port set";
}
leaf psid-len {
type uint8;
mandatory true;
description "length of a psid";
}
leaf psid {
type uint16;
mandatory true;
description "psid value";
}
}
}
grouping iaid {
container identity-associations {
config "false";
description "IA is a construct through which a server and a
client can identify, group, and manage a set of related IPv6
addresses. The key of the list is a 4-byte number IAID defined
in [RFC3315].";
list identity-association {
key iaid;
description "IA";
leaf iaid {
type uint32;
mandatory true;
description "IAID";
}
leaf ia-type {
type string;
mandatory true;
description "IA type";
}
leaf-list ipv6-addr {
type inet:ipv6-address;
description "ipv6 address";
}
leaf-list ipv6-prefix {
type inet:ipv6-prefix;
description "ipv6 prefix";
}
leaf-list prefix-length {
type uint8;
description "ipv6 prefix length";
}
leaf t1-time {
type yang:timeticks;
mandatory true;
description "t1 time";
}
leaf t2-time {
type yang:timeticks;
mandatory true;
description "t2 time";
}
leaf preferred-lifetime {
type yang:timeticks;
mandatory true;
description "preferred lifetime";
}
leaf valid-lifetime {
type yang:timeticks;
mandatory true;
description "valid lifetime";
}
}
}
}
/*
* Data Nodes
*/
container client {
description "dhcpv6 client portion";
container client-config{
description "configuration tree of client";
container duid {
description "Sets the DUID";
uses duid;
}
list client-if {
key if-name;
description "A client may have several
interfaces, it is more reasonable to
configure and manage parameters on
the interface-level. The list defines
specific client interfaces and their
data. Different interfaces are distinguished
by the key which is a configurable string
value.";
leaf if-name {
type string;
mandatory true;
description "interface name";
}
leaf cli-id {
type uint32;
mandatory true;
description "client id";
}
leaf description {
type string;
description
"description of the client interface";
}
leaf pd-function {
type boolean;
mandatory true;
description "Whether the client
can act as a requesting router
to request prefixes using prefix
delegation ([RFC3633]).";
}
leaf rapid-commit {
type boolean;
mandatory true;
description "'1' indicates a client can initiate a Solicit-Reply
message exchange by adding a Rapid Commit option in Solicit
message. '0' means the client is not allowed to add a Rapid
Commit option to request addresses in a two-message exchange
pattern.";
}
container mo-tab {
description "The management tab label indicates the operation
mode of the DHCPv6 client. 'm'=1 and 'o'=1 indicate the
client will use DHCPv6 to obtain all the configuration data.
'm'=1 and 'o'=0 are a meaningless combination. 'm'=0 and 'o'=1
indicate the client will use stateless DHCPv6 to obtain
configuration data apart from addresses/prefixes data.
'm'=0 and 'o'=0 represent the client will not use DHCPv6
but use SLAAC to achieve configuration.";
// if - not sure about the intended use here as it seems
// to be redfining what will be received in the PIO. Is
// the intention to be whether they PIO options will be
// obeyed as received or overridden?
leaf m-tab {
type boolean;
mandatory true;
description "m tab";
}
leaf o-tab {
type boolean;
mandatory true;
description "o tab";
}
}
container client-configured-options {
description "client configured options";
uses dhcpv6-options:client-option-definitions;
}
}
}
container client-state{
description "state tree of client";
config "false";
container if-other-paras {
description "A client can obtain
extra configuration data other than
address and prefix information through
DHCPv6. This container describes such
data the client was configured. The
potential configuration data may
include DNS server addresses, SIP
server domain names, etc.";
uses dhcpv6-options:server-option-definitions;
container supported-options {
// if - Unclear on what this container is used for. Maybe
// putting options as 'features' could replace this.
description "supported options";
list supported-option {
key option-code;
description "supported option";
leaf option-code {
type uint16;
mandatory true;
description "option code";
}
leaf description {
type string;
mandatory true;
description
"description of supported option";
}
}
}
}
}
}
/*
* Notifications
*/
notification notifications {
container dhcpv6-client-event {
description "dhcpv6 client event";
container ia-lease-event {
description "raised when the
client was allocated a new IA from
the server or it renew/rebind/release
its current IA";
leaf event-type {
type enumeration{
enum "allocation" {
description "allocate";
}
enum "rebind" {
description "rebind";
}
enum "renew" {
description "renew";
}
enum "release" {
description "release";
}
}
mandatory true;
description "event type";
}
container duid {
description "Sets the DUID";
uses duid;
}
leaf iaid {
type uint32;
mandatory true;
description "IAID";
}
leaf serv-name {
type string;
description "server name";
}
leaf description {
type string;
description "description of event";
}
}
container invalid-ia-detected {
description "raised when the identity
association of the client can be proved
to be invalid. Possible condition includes
duplicated address, illegal address, etc.";
container duid {
description "Sets the DUID";
uses duid;
}
leaf cli-duid {
type uint32;
mandatory true;
description "duid of client";
}
leaf iaid {
type uint32;
mandatory true;
description "IAID";
}
leaf serv-name {
type string;
description "server name";
}
leaf description {
type string;
description "description of the event";
}
}
container retransmission-failed {
description "raised when the retransmission
mechanism defined in [RFC3315] is failed.";
container duid {
description "Sets the DUID";
uses duid;
}
leaf description {
type enumeration {
enum "MRC failed" {
description "MRC failed";
}
enum "MRD failed" {
description "MRD failed";
}
}
mandatory true;
description "description of failure";
}
}
container failed-status-turn-up {
description "raised when the client receives
a message includes an unsuccessful Status Code
option.";
container duid {
description "Sets the DUID";
uses duid;
}
leaf status-code {
type enumeration {
enum "1" {
description "UnspecFail";
}
enum "2" {
description "NoAddrAvail";
}
enum "3" {
description "NoBinding";
}
enum "4" {
description "NotOnLink";
}
enum "5" {
description "UseMulticast";
}
}
mandatory true;
description "employed status code";
}
}
}
}
}