aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/yang/openconfig/openconfig-if-ip-ext.yang
blob: a5b720b54139ec601511744b03be4fec1d14e2be (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
module openconfig-if-ip-ext {

  yang-version "1";

  // namespace
  namespace "http://openconfig.net/yang/interfaces/ip-ext";

  prefix "oc-ip-ext";

  import openconfig-interfaces { prefix oc-if; }
  import openconfig-if-ip { prefix oc-ip; }
  import openconfig-extensions { prefix oc-ext; }


  // meta
  organization "OpenConfig working group";

  contact
    "OpenConfig working group
    www.openconfig.net";

  description
    "This module adds extensions to the base IP configuration and
    operational state model to support additional use cases.";

  oc-ext:openconfig-version "2.3.0";

  revision "2018-01-05" {
    description
      "Add logical loopback to interface.";
    reference "2.3.0";
  }

  revision "2017-12-21" {
    description
      "Added IPv6 router advertisement configuration.";
    reference "2.1.0";
  }

  revision "2017-07-14" {
    description
      "Added Ethernet/IP state data; Add dhcp-client;
      migrate to OpenConfig types modules; Removed or
      renamed opstate values";
    reference "2.0.0";
  }

  revision "2016-12-22" {
    description
      "Fixes to Ethernet interfaces model";
    reference "1.1.0";
  }


  // grouping statements

  grouping ipv6-autoconf-config {
    description
      "Configuration data for IPv6 address autoconfiguration";

    leaf create-global-addresses {
      type boolean;
      default true;
      description
        "[adapted from IETF IP model RFC 7277]

        If enabled, the host creates global addresses as
        described in RFC 4862.";
      reference
        "RFC 4862: IPv6 Stateless Address Autoconfiguration
                  Section 5.5";
    }
    leaf create-temporary-addresses {
      type boolean;
      default false;
      description
      "[adapted from IETF IP model RFC 7277]

      If enabled, the host creates temporary addresses as
      described in RFC 4941.";
      reference
        "RFC 4941: Privacy Extensions for Stateless Address
                  Autoconfiguration in IPv6";
    }

    leaf temporary-valid-lifetime {
      type uint32;
      units "seconds";
      default 604800;
      description
        "[adapted from IETF IP model RFC 7277]

        The time period during which the temporary address
        is valid.";
      reference
        "RFC 4941: Privacy Extensions for Stateless Address
                  Autoconfiguration in IPv6
                  - TEMP_VALID_LIFETIME";
    }

    leaf temporary-preferred-lifetime {
      type uint32;
      units "seconds";
      default 86400;
      description
        "[adapted from IETF IP model RFC 7277]

        The time period during which the temporary address is
        preferred.";
      reference
        "RFC 4941: Privacy Extensions for Stateless Address
                  Autoconfiguration in IPv6
                  - TEMP_PREFERRED_LIFETIME";
    }
  }

  grouping ipv6-autoconf-state {
    description
      "Operational state data for IPv6 address autoconfiguration";

    //TODO: placeholder for additional opstate for IPv6 autoconf
  }

  grouping ipv6-autoconf-top {
    description
      "Top-level grouping for IPv6 address autoconfiguration";

    container autoconf {
      description
        "Top-level container for IPv6 autoconf";

      container config {
        description
          "[adapted from IETF IP model RFC 7277]

          Parameters to control the autoconfiguration of IPv6
          addresses, as described in RFC 4862.";
        reference
          "RFC 4862: IPv6 Stateless Address Autoconfiguration";

        uses ipv6-autoconf-config;
      }

      container state {

        config false;

        description
          "Operational state data ";

        uses ipv6-autoconf-config;
        uses ipv6-autoconf-state;
      }
    }
  }

  // data definition statements

  // augment statements

  augment "/oc-if:interfaces/oc-if:interface/oc-if:subinterfaces/" +
    "oc-if:subinterface/oc-ip:ipv6" {
      description
        "Adds address autoconfiguration to the base IP model";

      uses ipv6-autoconf-top;
    }

}