Tomáš Pecka | 2a4ea7b | 2021-03-30 17:01:37 +0200 | [diff] [blame] | 1 | submodule ietf-ipv6-router-advertisements { |
| 2 | yang-version "1.1"; |
| 3 | |
| 4 | belongs-to ietf-ipv6-unicast-routing { |
| 5 | prefix "v6ur"; |
| 6 | } |
| 7 | |
| 8 | import ietf-inet-types { |
| 9 | prefix "inet"; |
| 10 | } |
| 11 | |
| 12 | import ietf-interfaces { |
| 13 | prefix "if"; |
| 14 | description |
| 15 | "An 'ietf-interfaces' module version that is compatible with |
| 16 | the Network Management Datastore Architecture (NMDA) |
| 17 | is required."; |
| 18 | } |
| 19 | |
| 20 | import ietf-ip { |
| 21 | prefix "ip"; |
| 22 | description |
| 23 | "An 'ietf-ip' module version that is compatible with |
| 24 | the Network Management Datastore Architecture (NMDA) |
| 25 | is required."; |
| 26 | } |
| 27 | |
| 28 | organization |
| 29 | "IETF NETMOD (Network Modeling) Working Group"; |
| 30 | contact |
| 31 | "WG Web: <https://datatracker.ietf.org/wg/netmod/> |
| 32 | WG List: <mailto:rtgwg@ietf.org> |
| 33 | |
| 34 | Editor: Ladislav Lhotka |
| 35 | <mailto:lhotka@nic.cz> |
| 36 | Acee Lindem |
| 37 | <mailto:acee@cisco.com> |
| 38 | Yingzhen Qu |
| 39 | <mailto:yingzhen.qu@huawei.com>"; |
| 40 | |
| 41 | description |
| 42 | "This YANG module augments the 'ietf-ip' module with |
| 43 | parameters for IPv6 Router Advertisements. The model fully |
| 44 | conforms to the Network Management Datastore |
| 45 | Architecture (NMDA). |
| 46 | |
| 47 | Copyright (c) 2018 IETF Trust and the persons |
| 48 | identified as authors of the code. All rights reserved. |
| 49 | |
| 50 | Redistribution and use in source and binary forms, with or |
| 51 | without modification, is permitted pursuant to, and subject |
| 52 | to the license terms contained in, the Simplified BSD License |
| 53 | set forth in Section 4.c of the IETF Trust's Legal Provisions |
| 54 | Relating to IETF Documents |
| 55 | (https://trustee.ietf.org/license-info). |
| 56 | |
| 57 | This version of this YANG module is part of RFC 8349; see |
| 58 | the RFC itself for full legal notices."; |
| 59 | |
| 60 | reference |
| 61 | "RFC 4861: Neighbor Discovery for IP version 6 (IPv6)"; |
| 62 | |
| 63 | revision 2018-03-13 { |
| 64 | description |
| 65 | "Network Management Datastore Architecture (NMDA) revision."; |
| 66 | reference |
| 67 | "RFC 8349: A YANG Data Model for Routing Management |
| 68 | (NMDA Version)"; |
| 69 | } |
| 70 | |
| 71 | revision 2016-11-04 { |
| 72 | description |
| 73 | "Initial revision."; |
| 74 | reference |
| 75 | "RFC 8022: A YANG Data Model for Routing Management"; |
| 76 | } |
| 77 | |
| 78 | augment "/if:interfaces/if:interface/ip:ipv6" { |
| 79 | description |
| 80 | "Augments interface configuration with parameters of IPv6 |
| 81 | Router Advertisements."; |
| 82 | container ipv6-router-advertisements { |
| 83 | description |
| 84 | "Support for IPv6 Router Advertisements."; |
| 85 | leaf send-advertisements { |
| 86 | type boolean; |
| 87 | default "false"; |
| 88 | description |
| 89 | "A flag indicating whether or not the router sends |
| 90 | periodic Router Advertisements and responds to |
| 91 | Router Solicitations."; |
| 92 | reference |
| 93 | "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) |
| 94 | - AdvSendAdvertisements"; |
| 95 | } |
| 96 | leaf max-rtr-adv-interval { |
| 97 | type uint16 { |
| 98 | range "4..65535"; |
| 99 | } |
| 100 | units "seconds"; |
| 101 | default "600"; |
| 102 | description |
| 103 | "The maximum time allowed between sending unsolicited |
| 104 | multicast Router Advertisements from the interface."; |
| 105 | reference |
| 106 | "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) |
| 107 | - MaxRtrAdvInterval"; |
| 108 | } |
| 109 | leaf min-rtr-adv-interval { |
| 110 | type uint16 { |
| 111 | range "3..1350"; |
| 112 | } |
| 113 | units "seconds"; |
| 114 | must ". <= 0.75 * ../max-rtr-adv-interval" { |
| 115 | description |
| 116 | "The value MUST NOT be greater than 75% of |
| 117 | 'max-rtr-adv-interval'."; |
| 118 | } |
| 119 | description |
| 120 | "The minimum time allowed between sending unsolicited |
| 121 | multicast Router Advertisements from the interface. |
| 122 | |
| 123 | The default value to be used operationally if this |
| 124 | leaf is not configured is determined as follows: |
| 125 | |
| 126 | - if max-rtr-adv-interval >= 9 seconds, the default |
| 127 | value is 0.33 * max-rtr-adv-interval; |
| 128 | |
| 129 | - otherwise, it is 0.75 * max-rtr-adv-interval."; |
| 130 | reference |
| 131 | "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) |
| 132 | - MinRtrAdvInterval"; |
| 133 | } |
| 134 | leaf managed-flag { |
| 135 | type boolean; |
| 136 | default "false"; |
| 137 | description |
| 138 | "The value to be placed in the 'Managed address |
| 139 | configuration' flag field in the Router |
| 140 | Advertisement."; |
| 141 | reference |
| 142 | "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) |
| 143 | - AdvManagedFlag"; |
| 144 | } |
| 145 | leaf other-config-flag { |
| 146 | type boolean; |
| 147 | default "false"; |
| 148 | description |
| 149 | "The value to be placed in the 'Other configuration' |
| 150 | flag field in the Router Advertisement."; |
| 151 | reference |
| 152 | "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) |
| 153 | - AdvOtherConfigFlag"; |
| 154 | } |
| 155 | leaf link-mtu { |
| 156 | type uint32; |
| 157 | default "0"; |
| 158 | description |
| 159 | "The value to be placed in MTU options sent by the |
| 160 | router. A value of zero indicates that no MTU options |
| 161 | are sent."; |
| 162 | reference |
| 163 | "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) |
| 164 | - AdvLinkMTU"; |
| 165 | } |
| 166 | leaf reachable-time { |
| 167 | type uint32 { |
| 168 | range "0..3600000"; |
| 169 | } |
| 170 | units "milliseconds"; |
| 171 | default "0"; |
| 172 | description |
| 173 | "The value to be placed in the Reachable Time field in |
| 174 | the Router Advertisement messages sent by the router. |
| 175 | A value of zero means unspecified (by this router)."; |
| 176 | reference |
| 177 | "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) |
| 178 | - AdvReachableTime"; |
| 179 | } |
| 180 | leaf retrans-timer { |
| 181 | type uint32; |
| 182 | units "milliseconds"; |
| 183 | default "0"; |
| 184 | description |
| 185 | "The value to be placed in the Retrans Timer field in |
| 186 | the Router Advertisement messages sent by the router. |
| 187 | A value of zero means unspecified (by this router)."; |
| 188 | reference |
| 189 | "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) |
| 190 | - AdvRetransTimer"; |
| 191 | } |
| 192 | leaf cur-hop-limit { |
| 193 | type uint8; |
| 194 | description |
| 195 | "The value to be placed in the Cur Hop Limit field in |
| 196 | the Router Advertisement messages sent by the router. |
| 197 | A value of zero means unspecified (by this router). |
| 198 | |
| 199 | If this parameter is not configured, the device SHOULD |
| 200 | use the IANA-specified value for the default IPv4 |
| 201 | Time to Live (TTL) parameter that was in effect at the |
| 202 | time of implementation."; |
| 203 | reference |
| 204 | "RFC 3232: Assigned Numbers: RFC 1700 is Replaced by |
| 205 | an On-line Database |
| 206 | RFC 4861: Neighbor Discovery for IP version 6 (IPv6) |
| 207 | - AdvCurHopLimit |
| 208 | IANA: IP Parameters |
| 209 | (https://www.iana.org/assignments/ip-parameters)"; |
| 210 | } |
| 211 | leaf default-lifetime { |
| 212 | type uint16 { |
| 213 | range "0..65535"; |
| 214 | } |
| 215 | units "seconds"; |
| 216 | description |
| 217 | "The value to be placed in the Router Lifetime field of |
| 218 | Router Advertisements sent from the interface, in |
| 219 | seconds. It MUST be either zero or between |
| 220 | max-rtr-adv-interval and 9000 seconds. A value of zero |
| 221 | indicates that the router is not to be used as a |
| 222 | default router. These limits may be overridden by |
| 223 | specific documents that describe how IPv6 operates over |
| 224 | different link layers. |
| 225 | |
| 226 | If this parameter is not configured, the device SHOULD |
| 227 | use a value of 3 * max-rtr-adv-interval."; |
| 228 | reference |
| 229 | "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) |
| 230 | - AdvDefaultLifetime"; |
| 231 | } |
| 232 | container prefix-list { |
| 233 | description |
| 234 | "Support for prefixes to be placed in Prefix |
| 235 | Information options in Router Advertisement messages |
| 236 | sent from the interface. |
| 237 | |
| 238 | Prefixes that are advertised by default but do not |
| 239 | have their entries in the child 'prefix' list are |
| 240 | advertised with the default values of all parameters. |
| 241 | |
| 242 | The link-local prefix SHOULD NOT be included in the |
| 243 | list of advertised prefixes."; |
| 244 | reference |
| 245 | "RFC 4861: Neighbor Discovery for IP version 6 (IPv6) |
| 246 | - AdvPrefixList"; |
| 247 | list prefix { |
| 248 | key "prefix-spec"; |
| 249 | description |
| 250 | "Support for an advertised prefix entry."; |
| 251 | leaf prefix-spec { |
| 252 | type inet:ipv6-prefix; |
| 253 | description |
| 254 | "IPv6 address prefix."; |
| 255 | } |
| 256 | choice control-adv-prefixes { |
| 257 | default "advertise"; |
| 258 | description |
| 259 | "Either (1) the prefix is explicitly removed from the |
| 260 | set of advertised prefixes or (2) the parameters with |
| 261 | which the prefix is advertised are specified (default |
| 262 | case)."; |
| 263 | leaf no-advertise { |
| 264 | type empty; |
| 265 | description |
| 266 | "The prefix will not be advertised. |
| 267 | |
| 268 | This can be used for removing the prefix from |
| 269 | the default set of advertised prefixes."; |
| 270 | } |
| 271 | case advertise { |
| 272 | leaf valid-lifetime { |
| 273 | type uint32; |
| 274 | units "seconds"; |
| 275 | default "2592000"; |
| 276 | description |
| 277 | "The value to be placed in the Valid Lifetime |
| 278 | in the Prefix Information option. The |
| 279 | designated value of all 1's (0xffffffff) |
| 280 | represents infinity."; |
| 281 | reference |
| 282 | "RFC 4861: Neighbor Discovery for IP version 6 |
| 283 | (IPv6) - AdvValidLifetime"; |
| 284 | } |
| 285 | leaf on-link-flag { |
| 286 | type boolean; |
| 287 | default "true"; |
| 288 | description |
| 289 | "The value to be placed in the on-link flag |
| 290 | ('L-bit') field in the Prefix Information |
| 291 | option."; |
| 292 | reference |
| 293 | "RFC 4861: Neighbor Discovery for IP version 6 |
| 294 | (IPv6) - AdvOnLinkFlag"; |
| 295 | } |
| 296 | leaf preferred-lifetime { |
| 297 | type uint32; |
| 298 | units "seconds"; |
| 299 | must ". <= ../valid-lifetime" { |
| 300 | description |
| 301 | "This value MUST NOT be greater than |
| 302 | valid-lifetime."; |
| 303 | } |
| 304 | default "604800"; |
| 305 | description |
| 306 | "The value to be placed in the Preferred |
| 307 | Lifetime in the Prefix Information option. |
| 308 | The designated value of all 1's (0xffffffff) |
| 309 | represents infinity."; |
| 310 | reference |
| 311 | "RFC 4861: Neighbor Discovery for IP version 6 |
| 312 | (IPv6) - AdvPreferredLifetime"; |
| 313 | } |
| 314 | leaf autonomous-flag { |
| 315 | type boolean; |
| 316 | default "true"; |
| 317 | description |
| 318 | "The value to be placed in the Autonomous Flag |
| 319 | field in the Prefix Information option."; |
| 320 | reference |
| 321 | "RFC 4861: Neighbor Discovery for IP version 6 |
| 322 | (IPv6) - AdvAutonomousFlag"; |
| 323 | } |
| 324 | } |
| 325 | } |
| 326 | } |
| 327 | } |
| 328 | } |
| 329 | } |
| 330 | |
| 331 | /* |
| 332 | * The subsequent data nodes are obviated and obsoleted |
| 333 | * by the Network Management Datastore Architecture |
| 334 | * as described in RFC 8342. |
| 335 | */ |
| 336 | augment "/if:interfaces-state/if:interface/ip:ipv6" { |
| 337 | status obsolete; |
| 338 | description |
| 339 | "Augments interface state data with parameters of IPv6 |
| 340 | Router Advertisements."; |
| 341 | container ipv6-router-advertisements { |
| 342 | status obsolete; |
| 343 | description |
| 344 | "Parameters of IPv6 Router Advertisements."; |
| 345 | leaf send-advertisements { |
| 346 | type boolean; |
| 347 | status obsolete; |
| 348 | description |
| 349 | "A flag indicating whether or not the router sends |
| 350 | periodic Router Advertisements and responds to |
| 351 | Router Solicitations."; |
| 352 | } |
| 353 | leaf max-rtr-adv-interval { |
| 354 | type uint16 { |
| 355 | range "4..1800"; |
| 356 | } |
| 357 | units "seconds"; |
| 358 | status obsolete; |
| 359 | description |
| 360 | "The maximum time allowed between sending unsolicited |
| 361 | multicast Router Advertisements from the interface."; |
| 362 | } |
| 363 | leaf min-rtr-adv-interval { |
| 364 | type uint16 { |
| 365 | range "3..1350"; |
| 366 | } |
| 367 | units "seconds"; |
| 368 | status obsolete; |
| 369 | description |
| 370 | "The minimum time allowed between sending unsolicited |
| 371 | multicast Router Advertisements from the interface."; |
| 372 | } |
| 373 | leaf managed-flag { |
| 374 | type boolean; |
| 375 | status obsolete; |
| 376 | description |
| 377 | "The value that is placed in the 'Managed address |
| 378 | configuration' flag field in the Router Advertisement."; |
| 379 | } |
| 380 | leaf other-config-flag { |
| 381 | type boolean; |
| 382 | status obsolete; |
| 383 | description |
| 384 | "The value that is placed in the 'Other configuration' flag |
| 385 | field in the Router Advertisement."; |
| 386 | } |
| 387 | leaf link-mtu { |
| 388 | type uint32; |
| 389 | status obsolete; |
| 390 | description |
| 391 | "The value that is placed in MTU options sent by the |
| 392 | router. A value of zero indicates that no MTU options |
| 393 | are sent."; |
| 394 | } |
| 395 | leaf reachable-time { |
| 396 | type uint32 { |
| 397 | range "0..3600000"; |
| 398 | } |
| 399 | units "milliseconds"; |
| 400 | status obsolete; |
| 401 | description |
| 402 | "The value that is placed in the Reachable Time field in |
| 403 | the Router Advertisement messages sent by the router. A |
| 404 | value of zero means unspecified (by this router)."; |
| 405 | } |
| 406 | leaf retrans-timer { |
| 407 | type uint32; |
| 408 | units "milliseconds"; |
| 409 | status obsolete; |
| 410 | description |
| 411 | "The value that is placed in the Retrans Timer field in the |
| 412 | Router Advertisement messages sent by the router. A value |
| 413 | of zero means unspecified (by this router)."; |
| 414 | } |
| 415 | leaf cur-hop-limit { |
| 416 | type uint8; |
| 417 | status obsolete; |
| 418 | description |
| 419 | "The value that is placed in the Cur Hop Limit field in the |
| 420 | Router Advertisement messages sent by the router. A value |
| 421 | of zero means unspecified (by this router)."; |
| 422 | } |
| 423 | leaf default-lifetime { |
| 424 | type uint16 { |
| 425 | range "0..9000"; |
| 426 | } |
| 427 | units "seconds"; |
| 428 | status obsolete; |
| 429 | description |
| 430 | "The value that is placed in the Router Lifetime field of |
| 431 | Router Advertisements sent from the interface, in seconds. |
| 432 | A value of zero indicates that the router is not to be |
| 433 | used as a default router."; |
| 434 | } |
| 435 | container prefix-list { |
| 436 | status obsolete; |
| 437 | description |
| 438 | "A list of prefixes that are placed in Prefix Information |
| 439 | options in Router Advertisement messages sent from the |
| 440 | interface. |
| 441 | |
| 442 | By default, these are all prefixes that the router |
| 443 | advertises via routing protocols as being on-link for the |
| 444 | interface from which the advertisement is sent."; |
| 445 | list prefix { |
| 446 | key "prefix-spec"; |
| 447 | status obsolete; |
| 448 | description |
| 449 | "Advertised prefix entry and its parameters."; |
| 450 | leaf prefix-spec { |
| 451 | type inet:ipv6-prefix; |
| 452 | status obsolete; |
| 453 | description |
| 454 | "IPv6 address prefix."; |
| 455 | } |
| 456 | leaf valid-lifetime { |
| 457 | type uint32; |
| 458 | units "seconds"; |
| 459 | status obsolete; |
| 460 | description |
| 461 | "The value that is placed in the Valid Lifetime in the |
| 462 | Prefix Information option. The designated value of |
| 463 | all 1's (0xffffffff) represents infinity. |
| 464 | |
| 465 | An implementation SHOULD keep this value constant in |
| 466 | consecutive advertisements, except when it is |
| 467 | explicitly changed in configuration."; |
| 468 | } |
| 469 | leaf on-link-flag { |
| 470 | type boolean; |
| 471 | status obsolete; |
| 472 | description |
| 473 | "The value that is placed in the on-link flag ('L-bit') |
| 474 | field in the Prefix Information option."; |
| 475 | } |
| 476 | leaf preferred-lifetime { |
| 477 | type uint32; |
| 478 | units "seconds"; |
| 479 | status obsolete; |
| 480 | description |
| 481 | "The value that is placed in the Preferred Lifetime in |
| 482 | the Prefix Information option, in seconds. The |
| 483 | designated value of all 1's (0xffffffff) represents |
| 484 | infinity. |
| 485 | |
| 486 | An implementation SHOULD keep this value constant in |
| 487 | consecutive advertisements, except when it is |
| 488 | explicitly changed in configuration."; |
| 489 | } |
| 490 | leaf autonomous-flag { |
| 491 | type boolean; |
| 492 | status obsolete; |
| 493 | description |
| 494 | "The value that is placed in the Autonomous Flag field |
| 495 | in the Prefix Information option."; |
| 496 | } |
| 497 | } |
| 498 | } |
| 499 | } |
| 500 | } |
| 501 | } |