summaryrefslogtreecommitdiffstats
path: root/src/share/yang/modules/ietf-dhcpv6-client@2018-09-04.yang
blob: c4faa971e11c566cc59b416f3ab670f28331591f (plain)
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
module ietf-dhcpv6-client {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-client";
  prefix "dhcpv6-client";

  import ietf-dhcpv6-options {
    prefix dhcpv6-options;
  }
  import ietf-dhcpv6-types {
    prefix dhcpv6-types;
  }
  import ietf-interfaces {
    prefix if;
  }

  organization "DHC WG";
  contact
   "cuiyong@tsinghua.edu.cn
    wangh13@mails.tsinghua.edu.cn
    lh.sunlinh@gmail.com
    ian.farrer@telekom.de
    sladjana.zechlin@telekom.de
    hezihao9512@gmail.com  ";

  description "This model defines a YANG data model that can be
    used to configure and manage a DHCPv6 client.";

  revision 2018-09-04 {
    description "";
    reference "I-D: draft-ietf-dhc-dhcpv6-yang";
  }

  revision 2018-03-04 {
    description "Resolved most issues on the DHC official
    github";
    reference "I-D: draft-ietf-dhc-dhcpv6-yang";
  }

  revision 2017-12-22 {
    description "Resolve most issues on Ian's github.";
    reference "I-D: draft-ietf-dhc-dhcpv6-yang";
  }

  revision 2017-11-24 {
      description "First version of the separated client specific
        YANG model.";
      reference "I-D: draft-ietf-dhc-dhcpv6-yang";
  }
  /*
   * Data Nodes
   */

  container client {
    presence "Enables the client";
    description "dhcpv6 client portion";

    container client-config {
      description "configuration tree of client";
      container duid {
        description "Sets the DUID";
        uses dhcpv6-types: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 if:interface-ref;
          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 {
      config "false";
      description "state tree of client";
      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 packet-stats {
        config "false";
        description "A container records
          all the packet status information
          of a specific interface.";
        leaf solicit-count {
          type uint32;
          mandatory true;
          description "solicit counter";
        }
        leaf request-count {
          type uint32;
          mandatory true;
          description "request counter";
        }
        leaf renew-count {
          type uint32;
          mandatory true;
          description "renew counter";
        }
        leaf rebind-count {
          type uint32;
          mandatory true;
          description "rebind counter";
        }
        leaf decline-count {
          type uint32;
          mandatory true;
          description "decline counter";
        }
        leaf release-count {
          type uint32;
          mandatory true;
          description "release counter";
        }
        leaf info-req-count {
          type uint32;
          mandatory true;
          description "information request counter";
        }
        leaf advertise-count {
          type uint32;
          mandatory true;
          description "advertise counter";
        }
        leaf confirm-count {
          type uint32;
          mandatory true;
          description "confirm counter";
        }
        leaf reply-count {
          type uint32;
          mandatory true;
          description "reply counter";
        }
        leaf reconfigure-count {
          type uint32;
          mandatory true;
          description "recofigure counter";
        }
      }
    }

  }

  /*
   * Notifications
   */

  notification notifications {
    description "dhcpv6 client notification module";
    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 dhcpv6-types: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 dhcpv6-types: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 dhcpv6-types: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 dhcpv6-types: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";
        }
      }

    }
  }
}