summaryrefslogtreecommitdiffstats
path: root/src/share/yang/modules/ietf-dhcpv6-options@2018-09-04.yang
blob: 76169f1e43542253143b6d20b2da4d8506c704ee (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
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
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
module ietf-dhcpv6-options {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-options";
  prefix "dhcpv6-options";

  import ietf-inet-types {
    prefix inet;
  }
  import ietf-yang-types {
    prefix yang;
  }
  import ietf-dhcpv6-types {
    prefix dhcpv6-types;
  }

  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 DHCPv6 options.";

  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 DHCPv6 options
      YANG model.";
    reference "I-D:draft-ietf-dhc-dhcpv6-yang";
  }

  /*
   * Features
   */

  //  features for server options
        feature server-unicast-op {
                description "Support for Server Unicast option";
        }
        feature sip-server-domain-name-list-op {
                description "Support for SIP Server Domain Name List option";
        }
        feature sip-server-address-list-op {
                description "Support for SIP Server Address List option";
        }
  feature dns-servers-op {
    description "Support for DNS Servers Option";
  }
        feature domain-searchlist-op {
                description "Support for Domain Search List Option";
        }
        feature nis-config-op {
                description "Support for Network Information Service (NIS)
                        Servers option";
        }
        feature nis-plus-config-op {
                description "Support for Network Information Service V2 (NIS+)
                        Servers option";
        }
        feature nis-domain-name-op {
                description "Support for Network Information Service (NIS)
                        Domain Name option";
        }
        feature nis-plus-domain-name-op {
                description "Support for Network Information Service V2 (NIS+)
                        Server option";
        }
        feature sntp-server-op {
                description "Support for Simple Network Protocol Configuration
                        (SNTP) Servers option";
        }
        feature info-refresh-time-op {
                description "Support for Information Refresh Time option";
        }
        feature client-fqdn-op {
                description "Support for Client FQDN option";
        }
        feature posix-timezone-op {
                description "Support for New POIX Timezone option";
        }
        feature tzdb-timezone-op {
                description "Support for New TZDB Timezone option";
        }
        feature ntp-server-op {
                description "Support for Network Time Protocol (NTP)
                        Server option";
        }
        feature boot-file-url-op {
                description "Support for Boot File URL option";
        }
        feature boot-file-param-op {
                description "Support for Boot File Parameters option";
        }
        feature aftr-name-op {
                description "Support for Address Family Transition
                        Router (AFTR) option";
        }
        feature kbr-default-name-op {
                description "Support for Kerberos Default Name
                        Option";
        }
        feature kbr-kdc-op {
                description "Support for Kerberos KDC option";
        }
        feature sol-max-rt-op {
                description "Support for SOL_MAX_RT option";
        }
        feature inf-max-rt-op {
                description "Support for INF_MAX_RT option";
        }
        feature addr-selection-op {
                description "Support for Address Selection opiton";
        }
        feature pcp-server-op {
                description "Support for Port Control Protocol (PCP)
                        option";
        }
        feature s46-rule-op {
                description "Support for S46 Rule option";
        }
        feature s46-br-op {
                description "Support for S46 Border Relay (BR) option";
        }
        feature s46-dmr-op {
                description "Support for S46 Default Mapping Rule
                        (DMR) option";
        }
        feature s46-v4-v6-binding-op {
                description "Support for S46 IPv4/IPv6 Address
                        Bind option";
        }

        // features for relay-supplied options
        feature erp-local-domain-name-op {
                description "Support for ERP Local Domain Name option";
        }

        // features for client options
        feature option-request-op {
                description "Support for Option Request option";
        }
        feature rapid-commit-op {
                description "Support for Rapid Commit option";
        }
        feature user-class-op {
                description "Support for User Class option";
        }
        feature vendor-class-op {
                description "Support for Vendor Class option";
        }
        feature client-arch-type-op {
                description "Support for Client System Architecture
                        Type option";
        }
        feature client-network-interface-identifier-op {
                description "Support for Client Network Interface
                        Identifier option";
        }
        feature kbr-principal-name-op {
                description "Support for Kerberos Principal
                        Name option";
        }
        feature kbr-realm-name-op {
                description "Support Kerberos Realm Name option";
        }
        feature client-link-layer-addr-op {
                description "Support for Client Link-Layer Address
                        Option";
        }

        // features for custom options
        feature operator-op-ipv6-address {
                description "Support for Option with IPv6 Addresses";
        }
        feature operator-op-single-flag {
                description "Support for Option with Single Flag";
        }
        feature operator-op-ipv6-prefix {
                description "Support for Option with IPv6 Prefix";
        }
        feature operator-op-int32 {
                description "Support for Opion with 32-bit
                        Integer Value";
        }
        feature operator-op-int16 {
                description "Support for Opion with 16-bit Integer Value";
        }
        feature operator-op-int8 {
                description "Support for Opion with 8-bit Integer Value";
        }
        feature operator-op-uri {
                description "Support for Opion with URI";
        }
        feature operator-op-textstring {
                description "Support for Opion with Text String";
        }
        feature operator-op-var-data {
                description "Support for Opion with Variable-Length Data";
        }
        feature operator-op-dns-wire {
                description "Support for Opion with DNS Wire
                        Format Domain Name List";
        }

  /*
   * Groupings
   */

  grouping server-option-definitions {
    description "Contains definitions for options configured on the
      DHCPv6 server which will be supplied to clients.";

    container server-unicast-option {
      if-feature server-unicast-op;
      presence "Enable this option";
      description "OPTION_UNICAST (12) Server Unicast Option";
      reference "RFC3315: Dynamic Host Configuration Protocol for
        IPv6 (DHCPv6)";
      leaf server-address {
        type inet:ipv6-address;
        description "server ipv6 address";
      }
    }

    container sip-server-domain-name-list-option {
      if-feature sip-server-domain-name-list-op;
      presence "Enable this option";
      description "OPTION_SIP_SERVER_D (21) SIP Servers Domain Name List";
      reference "RFC3319: Dynamic Host Configuration Protocol
        (DHCPv6) Options for Session Initiation Protocol (SIP) Servers";
      leaf sip-serv-domain-name {
        type string;
        mandatory true;
        description "sip server domain name";
      }
    }

    container sip-server-address-list-option {
      if-feature sip-server-address-list-op;
      presence "Enable this option";
      description "OPTION_SIP_SERVER_A (22) SIP Servers IPv6 Address List";
      reference "RFC3319: Dynamic Host Configuration Protocol (DHCPv6)
        Options for Session Initiation Protocol (SIP) Servers";
      list sip-server {
        key sip-serv-id;
        description "sip server info";
        leaf sip-serv-id {
          type uint8;
          mandatory true;
          description "sip server id";
        }
        leaf sip-serv-addr {
          type inet:ipv6-address;
          mandatory true;
          description "sip server addr";
        }
      }
    }

    container dns-servers-option {
      if-feature dns-servers-op;
      presence "Enable this option";
      description "OPTION_DNS_SERVERS (23) DNS recursive Name Server option";
      reference "RFC3646: DNS Configuration options for Dynamic Host Configuration
        Protocol for IPv6 (DHCPv6)";
      list dns-server {
        key dns-serv-id;
        description "dns server info";
        leaf dns-serv-id {
          type uint8;
          mandatory true;
          description "DNS server list entry ID.";
        }
        leaf dns-serv-addr {
          type inet:ipv6-address;
          mandatory true;
          description "DNS server address.";
        }
      }
    }

    container domain-searchlist-option {
      if-feature domain-searchlist-op;
      presence "Enable this option";
      description "OPTION_DOMAIN_LIST (24) Domain Search List Option";
      reference "RFC3646: DNS Configuration options for Dynamic
        Host Configuration Protocol for IPv6 (DHCPv6)";
      list domain-searchlist {
        key domain-searchlist-id;
        description "dns server info";
        leaf domain-searchlist-id {
          type uint8;
          mandatory true;
          description "Domain seachlist entry ID.";
        }
        leaf domain-search-list-entry {
          type string;
          mandatory true;
          description "Domain search list entry.";
        }
      }
    }
    container nis-config-option {
      if-feature nis-config-op;
      presence "Enable this option";
      description "OPTION_NIS_SERVERS (27) Network Information Service (NIS)
        Servers Option.";
      reference "RFC3898: Network Information Service (NIS) Configuration
        Options for Dynamic Host Configuration Protocol for IPv6 (DHCPv6)";
      list nis-server {
        key nis-serv-id;
        description "nis server info";
        leaf nis-serv-id {
          type uint8;
          mandatory true;
          description "nis server id";
        }
        leaf nis-serv-addr {
          type inet:ipv6-address;
          mandatory true;
          description "nis server addr";
        }
      }
    }

    container nis-plus-config-option {
      if-feature nis-plus-config-op;
      presence "Enable this option";
      description "OPTION_NISP_SERVERS (28): Network Information Service V2
        (NIS+) Servers Option.";
      reference "RFC3989: Network Information Service (NIS) Configuration
        Options for Dynamic Host Configuration Protocol for IPv6 (DHCPv6)";
      list nis-plus-server {
        key nis-plus-serv-id;
        description "NIS+ server information.";
        leaf nis-plus-serv-id {
          type uint8;
          mandatory true;
          description "nisp server id";
        }
        leaf nis-plus-serv-addr {
          type inet:ipv6-address;
          mandatory true;
          description "nisp server addr";
        }
      }
    }

    container nis-domain-name-option {
      if-feature nis-domain-name-op;
      presence "Enable this option";
      description "OPTION_NIS_DOMAIN_NAME (29) Network Information
        Service (NIS) Domain Name Option";
      reference "RFC3989: Network Information Service (NIS)
        Configuration Options for Dynamic Host Configuration Protocol
        for IPv6 (DHCPv6)";
      leaf nis-domain-name {
        type string;
        description "The Network Information Service (NIS) Domain Name
          option is used by the server to convey client's NIS Domain Name
          info to the client.";
      }
    }

    container nis-plus-domain-name-option {
      if-feature nis-plus-domain-name-op;
      presence "Enable this option";
      description "OPTION_NISP_DOMAIN_NAME (30) Network Information
        Service V2 (NIS+) Domain Name Option";
      reference "RFC3989: Network Information Service (NIS)
        Configuration Options for Dynamic Host Configuration Protocol
        for IPv6 (DHCPv6)";
      leaf nis-plus-domain-name {
        type string;
        description "The Network Information Service V2 (NIS+) Domain Name
        option is used by the server to convey client's NIS+ Domain Name
        info to the client.";
      }
    }


    container sntp-server-option {
      if-feature sntp-server-op;
      presence "Enable this option";
      description "OPTION_SNTP_SERVERS (31) Simple Network Time Protocol
        (SNTP) Servers Option";
      reference "RFC4075: Simple Network Time Protocol (SNTP) Configuration
        Option for DHCPv6";
      list sntp-server {
        key sntp-serv-id;
        description "sntp server info";
        leaf sntp-serv-id {
          type uint8;
          mandatory true;
          description "sntp server id";
        }
        leaf sntp-serv-addr {
          type inet:ipv6-address;
          mandatory true;
          description "sntp server addr";
        }
      }
    }

    container info-refresh-time-option {
      if-feature info-refresh-time-op;
      presence "Enable this option";
      description "OPTION_INFORMATION_REFRESH_TIME (32) Information Refresh
        Time option.";
      reference "RFC4242: Information Refresh Time Option for Dynamic Host
        Configuration Protocol for IPv6 (DHCPv6";
      leaf info-refresh-time {
        type yang:timeticks;
        mandatory true;
        description "The refresh time.";
      }
    }

    container client-fqdn-option {
      if-feature client-fqdn-op;
      presence "Enable this option";
      description "OPTION_CLIENT_FQDN (39) DHCPv6 Client FQDN Option";
      reference "RFC4704: The Dynamic Host Configuration Protocol for IPv6
        (DHCPv6) Client Fully Qualified Domain Name (FQDN) Option";
      leaf server-initiate-update {
        type boolean;
        mandatory true;
        description "server initiate";
      }
      leaf client-initiate-update {
        type boolean;
        mandatory true;
        description "client initiate";
      }
      leaf modify-name-from-cli {
        type boolean;
        mandatory true;
        description "modify by client";
      }
    }

    container posix-timezone-option {
      if-feature posix-timezone-op;
      presence "Enable this option";
      description "OPTION_NEW_POSIX_TIMEZONE (41) Posix Timezone option";
      reference "RFC4833: Timezone Options for DHCP";
      leaf tz-posix {
        type string;
        mandatory true;
        description "TZ Posix IEEE 1003.1 String";
      }
    }

    container tzdb-timezone-option {
      if-feature tzdb-timezone-op;
      presence "Enable this option";
      description "OPTION_NEW_TZDB_TIMEZONE (42) Timezone Database option";
      reference "RFC4822: Timezone Options for DHCP";
      leaf tz-database {
        type string;
        mandatory true;
        description "Reference to the TZ Database";
      }
    }

    container ntp-server-option {
      //This option looks like it needs work to correctly model the
      //option as defined in the RFC.

      // Zihao - Re-modelled so it only contains one time source suboption

      if-feature ntp-server-op;
      presence "Enable this option";
      description "OPTION_NTP_SERVER (56) NTP Server Option for DHCPv6";
      reference "RFC5908: Network Time Protocol (NTP) Server Option for
        DHCPv6";
      list ntp-server {
        key ntp-serv-id;
        description "ntp server info";
        leaf ntp-serv-id {
          type uint8;
          mandatory true;
          description "NTP server id";
        }
        choice ntp-time-source-suboption {
                description "Select a NTP time source suboption.";
                case server-address {
                leaf-list ntp-serv-addr-suboption {
                  type inet:ipv6-address;
                  description "NTP server addr";
              }
          }
                case server-multicast-address {
                        leaf-list ntp-serv-mul-addr-suboption {
              type inet:ipv6-address;
                    description "NTP server multicast addr";
            }
                }
                case server-fqdn {
                        leaf-list ntp-serv-fqdn-suboption {
              type string;
              description "NTP server fqdn";
            }
                }
        }
      }
    }

        container boot-file-url-option {
                if-feature boot-file-url-op;
                presence "Enable this option";
                description "OPT_BOOTFILE_URL (59) Boot File URL Option";
                reference "RFC5970: DHCPv6 Options for Network Boot";
                list boot-file {
                        key boot-file-id;
                        description "boot file info";
                        leaf boot-file-id {
                                type uint8;
                                mandatory true;
                                description "boot file id";
                        }
        leaf-list suitable-arch-type {
          type uint16;
          description "architecture type";
        }
        leaf-list suitable-net-if {
                type uint32;
                description "network interface";
        }
                        leaf boot-file-url {
                                type string;
                                mandatory true;
                                description "url for boot file";
                        }
                }
        }

        container boot-file-param-option {
                if-feature boot-file-param-op;
                presence "Enable this option";
                description "OPT_BOOTFiLE_PARAM (60) Boot File Parameters Option";
                reference "RFC5970: DHCPv6 Options for Network Boot";
      list boot-file-paras {
        key para-id;
        description "boot file parameters";
        leaf para-id {
          type uint8;
          mandatory true;
          description "parameter id";
        }
        leaf parameter {
          type string;
          mandatory true;
          description "parameter value";
        }
      }
        }

    container aftr-name-option {
      if-feature aftr-name-op;
      presence "Enable this option";
      description "OPTION_AFTR_NAME (64) AFTR-Name DHCPv6 Option";
      reference "RFC6334: Dynamic Host Configuration Protocol for IPv6
        (DHCPv6) Option for Dual-Stack Lite";
      leaf tunnel-endpoint-name {
        type string;
        mandatory true;
        description "aftr name";
      }
    }

    container kbr-default-name-option {
        if-feature kbr-default-name-op;
        presence "Enable this option";
        description "OPTION_KRB_DEFAULT_REALM_NAME (77) Kerberos Default Realm Name Option";
        reference "RFC6784: Kerberos Options for DHCPv6";
      leaf default-realm-name {
        type string;
        mandatory true;
        description "default realm name";
      }
    }

    container kbr-kdc-option {
        if-feature kbr-kdc-op;
        presence "Enable this option";
        description "OPTION_KRB_KDC (78) Kerberos KDB Option";
        reference "RFC6784: Kerberos Options for DHCPv6";
      list kdc-info {
        key kdc-id;
        description "kdc info";
        leaf kdc-id {
          type uint8;
          mandatory true;
          description "kdc id";
        }
        leaf priority {
          type uint16;
          mandatory true;
          description "priority";
        }
        leaf weight {
          type uint16;
          mandatory true;
          description "weight";
        }
        leaf transport-type {
          type uint8;
          mandatory true;
          description "transport type";
        }
        leaf port-number {
          type uint16;
          mandatory true;
          description "port number";
        }
        leaf kdc-ipv6-addr {
          type inet:ipv6-address;
          mandatory true;
          description "kdc ipv6 addr";
        }
        leaf realm-name {
          type string;
          mandatory true;
          description "realm name";
        }
      }
    }

    container sol-max-rt-option {
      if-feature sol-max-rt-op;
      presence "Enable this option";
      description "OPTION_SOL_MAX_RT (82) sol max rt option";
      reference "RFC7083: Modification to Default Values of
        SOL_MAX_RT and INF_MAX_RT";
        leaf sol-max-rt-value {
          type yang:timeticks;
          mandatory true;
          description "sol max rt value";
        }
    }

    container inf-max-rt-option {
      if-feature inf-max-rt-op;
      presence "Enable this option";
      description "OPTION_INF_MAX_RT (83) inf max rt option";
      reference "RFC7083: Modification to Default Values of
        SOL_MAX_RT and INF_MAX_RT";
      leaf inf-max-rt-value {
        type yang:timeticks;
        mandatory true;
        description "inf max rt value";
      }
    }

    container addr-selection-option {
      if-feature addr-selection-op;
      presence "Enable this option";
      description "OPTION_ADDRSEL (84) and OPTION_ADDRSEL_TABLE (85)";
      reference "RFC7078: Distributing Address Selection Policy Using
        DHCPv6";
      // if - Needs checking to see if this matches the RFC - there
      // are two options here.
      // Zihao - I think this matches RFC7078
      leaf a-bit-set {
        type boolean;
        mandatory true;
        description "a bit";
      }
      leaf p-bit-set {
        type boolean;
        mandatory true;
        description "p bit";
      }
      list policy-table {
        key policy-id;
        description "policy table";
        leaf policy-id {
          type uint8;
          mandatory true;
          description "policy id";
        }
        leaf label {
          type uint8;
          mandatory true;
          description "label";
        }
        leaf precedence {
          type uint8;
          mandatory true;
          description "precedence";
        }
        leaf prefix-len {
          type uint8;
          mandatory true;
          description "prefix length";
        }
        leaf prefix {
          type inet:ipv6-prefix;
          mandatory true;
          description "prefix";
        }
      }
    }

    container pcp-server-option {
      if-feature pcp-server-op;
      presence "Enable this option";
      description "OPTION_V6_PCP_SERVER (86) pcp server option";
      reference "RFC7291: DHCP Options for the Port Control
        Protocol (PCP)";
      list pcp-server {
        key pcp-serv-id;
        description "pcp server info";
        leaf pcp-serv-id {
          type uint8;
          mandatory true;
          description "pcp server id";
        }
        leaf pcp-serv-addr {
          type inet:ipv6-address;
          mandatory true;
          description "pcp server addr";
        }
      }
    }

    container s46-rule-option {
      if-feature s46-rule-op;
      presence "Enable this option";
      description "OPTION_S46_RULE (89) S46 rule option";
      reference "RFC7598: DHCPv6 Options for Configuration of
        Softwire Address and Port-Mapped Clients";
      list s46-rule {
        key rule-id;
        description "s46 rule";
        leaf rule-id {
          type uint8;
          mandatory true;
          description "rule id";
        }
        leaf rule-type {
          type enumeration {
            enum "BMR" {
              description "BMR";
            }
            enum "FMR" {
              description "FMR";
            }
          }
          mandatory true;
          description "rule type";
        }
        leaf prefix4-len {
          type uint8;
          mandatory true;
          description "ipv4 prefix length";
        }
        leaf ipv4-prefix {
          type inet:ipv4-prefix;
          mandatory true;
          description "ipv4 prefix";
        }
        leaf prefix6-len {
          type uint8;
          mandatory true;
          description "ipv6 prefix length";
        }
        leaf ipv6-prefix {
          type inet:ipv6-prefix;
          mandatory true;
          description "ipv6 prefix";
        }
        uses dhcpv6-types:portset-para;
      }
    }

    container s46-br-option {
      if-feature s46-br-op;
      presence "Enable this option";
      description "OPTION_S46_BR (90) S46 BR Option";
      reference "RFC7598: DHCPv6 Options for Configuration of
        Softwire Address and Port-Mapped Clients";
      list br {
        key br-id;
        description "br info";
        leaf br-id {
          type uint8;
          mandatory true;
          description "br id";
        }
        leaf br-ipv6-addr {
          type inet:ipv6-address;
          mandatory true;
          description "br ipv6 addr";
        }
      }
    }

    container s46-dmr-option {
      if-feature s46-dmr-op;
      presence "Enable this option";
      description "OPTION_S46_DMR (91) S46 DMR Option";
      reference "RFC7598: DHCPv6 Options for Configuration of
        Softwire Address and Port-Mapped Clients";
      list dmr {
        key dmr-id;
        description "dmr info";
        leaf dmr-id {
          type uint8;
          mandatory true;
          description "dmr id";
        }
        leaf dmr-prefix-len {
          type uint8;
          mandatory true;
          description "dmr prefix length";
        }
        leaf dmr-ipv6-prefix {
          type inet:ipv6-prefix;
          mandatory true;
          description "dmr ipv6 prefix";
        }
      }
    }

    container s46-v4-v6-binding-option {
      if-feature s46-v4-v6-binding-op;
      presence "Enable this option";
      description "OPTION_S46_V4V6BIND (92) S46 IPv4/IPv6 Address
        Binding option";
      reference "RFC7598: DHCPv6 Options for Configuration of
        Softwire Address and Port-Mapped Clients";
      list ce {
        key ce-id;
        description "ce info";
        leaf ce-id {
          type uint8;
          mandatory true;
          description "ce id";
        }
        leaf ipv4-addr {
          type inet:ipv4-address;
          mandatory true;
          description "ce ipv4 addr";
        }
        leaf bind-prefix6-len {
          type uint8;
          mandatory true;
          description "bind ipv6 prefix
            length";
        }
        leaf bind-ipv6-prefix {
          type inet:ipv6-address;
          mandatory true;
          description "bind ipv6 prefix";
        }
        uses dhcpv6-types:portset-para;
      }
    }

  }
  //if - NB - The list of options needs to be updated.


  grouping relay-supplied-option-definitions {
    // if - The structure here needs to be checked and probably reworked.
    description "OPTION_RSOO (66) Relay-Supplied Options option";
    reference "RFC6422: Relay-Supplied DHCP Options";
    container erp-local-domain-name-option {
      if-feature erp-local-domain-name-op;
      presence "Enable this option";
      description "OPTION_ERP_LOCAL_DOMAIN_NAME (65) DHCPv6 ERP Local
        Domain Name Option";
      reference "RFC6440: The EAP Re-authentication Protocol (ERP)
        Local Domain Name DHCPv6 Option";
      list erp-for-client {
        key cli-id;
        description "erp for client";
        leaf cli-id {
          type uint32;
          mandatory true;
          description "client id";
        }
        container duid {
          description "Sets the DUID";
          // uses duid;
          // if - Maybe DUID definition needs to be moved to this module.
          uses dhcpv6-types:duid;
        }
        leaf erp-name {
          type string;
          mandatory true;
          description "erp name";
        }
      }
    }
  }

  grouping client-option-definitions {
    description "Contains definitions for options configured on the
      DHCPv6 client which will be sent to the server.";

    list new-or-standard-cli-option {
      key option-code;
      description "new or standard client option";
      leaf option-code {
        type uint16;
        mandatory true;
        description "option code";
      }
      leaf option-name {
        type string;
        mandatory true;
        description "option name";
      }
      leaf option-description {
        type string;
        mandatory true;
        description "description of client
          option";
      }
      leaf option-reference {
        type string;
        description "the reference of option";
      }
      leaf option-value {
        type string;
        mandatory true;
        description "the option value";
      }
    }

    container option-request-option {
      if-feature option-request-op;
      presence "Enable this option";
      description "OPTION_ORO (6) Option Request Option";
      reference "RFC3315: Dynamic Host Configuration Protocol for
      IPv6 (DHCPv6)";
      list oro-option {
        key option-code;
        description "oro option";
        leaf option-code {
          type uint16;
          mandatory true;
          description "option code";
        }
        leaf description {
          type string;
          mandatory true;
          description "description of oro
            options";
        }
      }
    }

    container user-class-option {
      if-feature user-class-op;
      presence "Enable this option";
      description "OPTION_USER_CLASS (15) User Class Option";
      reference "RFC3315: Dynamic Host Configuration Protocol
        for IPv6 (DHCPv6)";
      list user-class {
        key user-class-id;
        description "user class";
        leaf user-class-id {
          type uint8;
          mandatory true;
          description "user class id";
        }
        leaf user-class-data {
          type string;
          mandatory true;
          description "The information contained in the data area
            of this option is contained in one or more opaque
            fields that represent the user class or classes of
            which the client is a member. ";
        }
      }
    }

    container vendor-class-option {
      if-feature vendor-class-op;
      presence "Enable this option";
      description "OPTION_VENDOR_CLASS (16) Vendor Class Option";
      reference "RFC3315: Dynamic Host Configuration Protocol
        for IPv6 (DHCPv6)";
      leaf enterprise-number {
        type uint32;
        mandatory true;
        description "enterprise number";
      }
      list vendor-class {
          key vendor-class-id;
          description "vendor class";
        leaf vendor-class-id {
          type uint8;
          mandatory true;
          description "vendor class id";
        }
        leaf vendor-class-data {
          type string;
          mandatory true;
          description "The vendor-class-data is composed of a series of
            separate items, each of which describes some characteristic
            of the client's hardware configuration. Examples of
            vendor-class-data instances might include the version of the
            operating system the client is running or the amount of memory
            installed on the client.";
        }
      }
    }

    container client-fqdn-option {
      if-feature client-fqdn-op;
      presence "Enable this option";
      description "OPTION_CLIENT_FQDN (39) The Dynamic Host
        Configuration Protocol for IPv6 (DHCPv6) Client Fully
        Qualified Domain Name (FQDN) Option";
      reference "RFC4704: The Dynamic Host Configuration Protocol
        for IPv6 (DHCPv6) Client Fully Qualified Domain Name (FQDN)
        Option";
      leaf fqdn {
        type string;
        mandatory true;
        description "fqdn";
      }
      leaf server-initiate-update {
        type boolean;
        mandatory true;
        description "whether server initiate";
      }
      leaf client-initiate-update {
        type boolean;
        mandatory true;
        description "whether client initiate";
      }
    }

    container client-arch-type-option {
      if-feature client-arch-type-op;
      presence "Enable this option";
      description "OPTION_CLIENT_ARCH_TYPE (61) Client System
        Architecture Type Option";
      reference "RFC5970: DHCPv6 Options for Network Boot";
      list architecture-types {
        key type-id;
        description "architecture types";
        leaf type-id {
          type uint16;
          mandatory true;
          description "type id";
        }
        leaf most-preferred {
          type boolean;
          mandatory true;
          description "most preferred flag";
        }
      }
    }

    container client-network-interface-identifier-option {
      if-feature client-network-interface-identifier-op;
      presence "Enable this option";
      description "OPTION_NII (62) Client Network Interface
          Identifier Option";
      reference "RFC5970: DHCPv6 Options for Network Boot";
      leaf type {
        type uint8;
        mandatory true;
        description "type";
      }
      leaf major {
        type uint8;
        mandatory true;
        description "major";
      }
      leaf minor {
        type uint8;
        mandatory true;
        description "minor";
      }
    }

    container kbr-principal-name-option {
      if-feature kbr-principal-name-op;
      presence "Enable this option";
      description "OPTION_KRB_PRINCIPAL_NAME (75) Kerberos
        Principal Name Option";
      reference "RFC6784: Kerberos Options for DHCPv6";
      list principle-name {
          key principle-name-id;
          description "principle name";
          leaf principle-name-id {
                  type uint8;
                  mandatory true;
                  description "principle name id";
          }
          leaf name-type {
                  type int32;
                  mandatory true;
                  description "This field specifies the type of name that follows.";
          }
          leaf name-string {
                  type string;
                  mandatory true;
                  description "This field encodes a sequence of components that form
                          a name, each component encoded as a KerberoString";
          }
      }
    }

    container kbr-realm-name-option {
        if-feature kbr-realm-name-op;
        presence "Enable this option";
        description "OPTION_KRB_REALM_NAME (76) Kerberos Realm Name Option";
        reference "RFC6784: Kerberos Options for DHCPv6";
        leaf realm-name {
                type string;
                mandatory true;
                description "realm name";
        }
    }

    container client-link-layer-addr-option {
      if-feature client-link-layer-addr-op;
      presence "Enable this option";
      description "OPTION_CLIENT_LINKLAYER_ADDR (79) DHCPv6 Client
        Link-Layer Address Option";
      reference "RFC6939: Client Link-Layer Address Option in
        DHCPv6";
      leaf link-layer-type {
        type uint16;
        mandatory true;
        description "Client link-layer address type. The link-layer
          type MUST be a valid hardware type assigned by the IANA,
          as described in [RFC0826]";
      }
      leaf link-layer-addr {
        type string;
        mandatory true;
        description "Client link-layer address";
      }
    }

  }


  grouping custom-option-definitions {
    description "operator customized options";

    container operator-option-ipv6-address {
      if-feature operator-op-ipv6-address;
      presence "Enable this option";
      description "operator ipv6 address option";
      reference "RFC7227: Guidelines for Creating New DHCPv6 Options";
      list operator-ipv6-addr {
        key operator-ipv6-addr-id;
        description "operator ipv6 address info";
        leaf operator-ipv6-addr-id {
          type uint8;
          mandatory true;
          description "operator ipv6 address id";
        }
        leaf operator-ipv6-addr {
          type inet:ipv6-address;
          mandatory true;
          description "operator ipv6 address id";
        }
      }
    }

    container operator-option-single-flag {
      if-feature operator-op-single-flag;
      presence "Enable this option";
      description "operator single flag";
      reference "RFC7227: Guidelines for Creating New DHCPv6
        Options";
      list flag {
        key flag-id;
        description "operator single flag info";
        leaf flag-id {
          type uint8;
          mandatory true;
          description "operator single flag id";
        }
        leaf flag-value{
          type boolean;
          mandatory true;
          description "operator single flag value";
        }
      }
    }

    container operator-option-ipv6-prefix {
      if-feature operator-op-ipv6-prefix;
      presence "Enable this option";
      description "operator ipv6 prefix option";
      reference "RFC7227: Guidelines for Creating New DHCPv6
        Options";
      list operator-ipv6-prefix {
        key operator-ipv6-prefix-id;
        description "operator ipv6 prefix info";
        leaf operator-ipv6-prefix-id {
          type uint8;
          mandatory true;
          description "operator ipv6 prefix id";
        }
        leaf operator-ipv6-prefix6-len {
          type uint8;
          mandatory true;
          description "operator ipv6 prefix length";
        }
        leaf operator-ipv6-prefix {
          type inet:ipv6-prefix;
          mandatory true;
          description "operator ipv6 prefix";
        }
      }
    }

    container operator-option-int32 {
      if-feature operator-op-int32;
      presence "Enable this option";
      description "operator integer 32 option";
      reference "RFC7227: Guidelines for Creating New DHCPv6
        Options";
      list int32val {
        key int32val-id;
        description "operator integer 32 info";
        leaf int32val-id {
          type uint8;
          mandatory true;
          description "operator integer 32 id";
        }
        leaf int32val {
          type uint32;
          mandatory true;
          description "operator integer 32 value";
        }
      }
    }

    container operator-option-int16 {
      if-feature operator-op-int16;
      presence "Enable this option";
      description "operator integer 16 option";
      reference "RFC7227: Guidelines for Creating New DHCPv6
        Options";
      list int16val {
        key int16val-id;
        description "operator integer 16 info";
        leaf int16val-id {
          type uint8;
          mandatory true;
          description "operator integer 16 id";
        }
        leaf int16val {
          type uint16;
          mandatory true;
          description "operator integer 16 value";
        }
      }
    }

    container operator-option-int8 {
      if-feature operator-op-int8;
      presence "Enable this option";
      description "operator integer 8 option";
      reference "RFC7227: Guidelines for Creating New DHCPv6
        Options";
      list int8val {
        key int8val-id;
        description "operator integer 8 info";
        leaf int8val-id {
          type uint8;
          mandatory true;
          description "operator integer 8 id";
        }
        leaf int8val {
          type uint8;
          mandatory true;
          description "operator integer 8 value";
        }
      }
    }

    container operator-option-uri {
      if-feature operator-op-uri;
      presence "Enable this option";
      description "operator uri option";
      reference "RFC7227: Guidelines for Creating New DHCPv6 Options";
      list uri{
        key uri-id;
        description "operator uri info";
        leaf uri-id {
          type uint8;
          mandatory true;
          description "operator uri id";
        }
        leaf uri {
          type string;
          mandatory true;
          description "operator uri value";
        }
      }
    }

    container operator-option-textstring {
      if-feature operator-op-textstring;
      presence "Enable this option";
      description "operator itext string option";
      reference "RFC7227: Guidelines for Creating New DHCPv6 Options";
      list textstring{
        key textstring-id;
        description "operator text string info";
        leaf textstring-id {
          type uint8;
          mandatory true;
          description "operator text string id";
        }
        leaf textstring {
          type string;
          mandatory true;
          description "operator text string value";
        }
      }
    }

    container operator-option-var-data {
      if-feature operator-op-var-data;
      presence "Enable this option";
      description "operator variable length data option";
      reference "RFC7227: Guidelines for Creating New DHCPv6 Options";
      list int32val {
        key var-data-id;
        description "operator ivariable length data info";
        leaf var-data-id {
          type uint8;
          mandatory true;
          description "operator variable length id";
        }
        leaf var-data {
          type binary;
          mandatory true;
          description "operator variable length value";
        }
      }
    }

    container operator-option-dns-wire {
      if-feature operator-op-dns-wire;
      presence "Enable this option";
      description "operator dns wire format domain name list option";
      reference "RFC7227: Guidelines for Creating New DHCPv6
        Options";
      list operator-option-dns-wire {
        key operator-option-dns-wire-id;
        description "operator dns wire format info";
        leaf operator-option-dns-wire-id {
          type uint8;
          mandatory true;
          description "operator dns wire format id";
        }
        leaf operator-option-dns-wire{
          type binary;
          mandatory true;
          description "operator dns wire format value";
        }
      }
    }

  }
}