diff --git a/standard/ietf/RFC/example-dhcpv6-class-select.yang b/standard/ietf/RFC/example-dhcpv6-class-select.yang new file mode 120000 index 000000000..c44604dd3 --- /dev/null +++ b/standard/ietf/RFC/example-dhcpv6-class-select.yang @@ -0,0 +1 @@ +example-dhcpv6-class-select@2022-06-20.yang \ No newline at end of file diff --git a/standard/ietf/RFC/example-dhcpv6-class-select@2022-06-20.yang b/standard/ietf/RFC/example-dhcpv6-class-select@2022-06-20.yang new file mode 100644 index 000000000..c14c57dba --- /dev/null +++ b/standard/ietf/RFC/example-dhcpv6-class-select@2022-06-20.yang @@ -0,0 +1,299 @@ +module example-dhcpv6-class-select { + yang-version 1.1; + namespace "https://example.com/ns/" + + "example-dhcpv6-class-select"; + prefix dhc6-class-sel; + + import ietf-inet-types { + prefix inet; + } + import ietf-interfaces { + prefix if; + } + import ietf-dhcpv6-common { + prefix dhc6; + } + import ietf-dhcpv6-server { + prefix dhc6-srv; + } + + organization + "IETF Dynamic Host Configuration (DHC) Working Group"; + contact + "WG Web: + WG List: + Author: Yong Cui + Author: Linhui Sun + Editor: Ian Farrer + Author: Sladjana Zeichlin + Author: Zihao He + Author: Michal Nowikowski "; + description + "This YANG module defines components for the definition and + configuration of the client class selector function for a + DHCPv6 server. As this functionality varies greatly between + different implementations, the module provided as an example + only. + + Copyright (c) 2022 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject to + the license terms contained in, the Revised BSD License set + forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 9243 + (https://www.rfc-editor.org/info/rfc9243); see the RFC itself + for full legal notices."; + + revision 2022-06-20 { + description + "Initial revision."; + reference + "RFC 9243: A YANG Data Model for DHCPv6 Configuration"; + } + + /* + * Groupings + */ + + grouping client-class-id { + description + "Definitions of client message classification for + authorization and assignment purposes."; + leaf client-class-name { + type string; + mandatory true; + description + "Unique identifier for client class identification list + entries."; + } + choice id-type { + mandatory true; + description + "Definitions for different client identifier types."; + case client-id-id { + leaf client-id { + type string; + mandatory true; + description + "String literal client identifier."; + } + description + "Client class selection based on a string literal client + identifier."; + } + case received-interface-id { + description + "Client class selection based on the incoming interface + of the DHCPv6 message."; + leaf received-interface { + type if:interface-ref; + description + "Reference to the interface entry for the incoming + DHCPv6 message."; + } + } + case packet-source-address-id { + description + "Client class selection based on the source address of + the DHCPv6 message."; + leaf packet-source-address { + type inet:ipv6-address; + mandatory true; + description + "Source address of the DHCPv6 message."; + } + } + case packet-destination-address-id { + description + "Client class selection based on the destination address + of the DHCPv6 message."; + leaf packet-destination-address { + type inet:ipv6-address; + mandatory true; + description + "Destination address of the DHCPv6 message."; + } + } + case relay-link-address-id { + description + "Client class selection based on the prefix of the + link-address field in the relay agent message header."; + leaf relay-link-address { + type inet:ipv6-prefix; + mandatory true; + description + "Prefix of the link-address field in the relay agent + message header."; + } + } + case relay-peer-address-id { + description + "Client class selection based on the value of the + peer-address field in the relay agent message header."; + leaf relay-peer-address { + type inet:ipv6-prefix; + mandatory true; + description + "Prefix of the peer-address field in the relay agent + message header."; + } + } + case relay-interface-id { + description + "Client class selection based on a received instance of + OPTION_INTERFACE_ID (18)."; + leaf relay-interface { + type string; + description + "An opaque value of arbitrary length generated by the + relay agent to identify one of the relay agent's + interfaces."; + } + } + case user-class-option-id { + description + "Client class selection based on the value of the + OPTION_USER_CLASS (15) and its user-class-data field."; + leaf user-class-data { + type string; + mandatory true; + description + "User Class value to match."; + } + } + case vendor-class-present-id { + description + "Client class selection based on the presence of + OPTION_VENDOR_CLASS (16) in the received message."; + leaf vendor-class-present { + type boolean; + mandatory true; + description + "Presence of OPTION_VENDOR_CLASS (16) in the received + message."; + } + } + case vendor-class-option-enterprise-number-id { + description + "Client class selection based on the value of the + enterprise-number field in OPTION_VENDOR_CLASS (16)."; + leaf vendor-class-option-enterprise-number { + type uint32; + mandatory true; + description + "Value of the enterprise-number field."; + } + } + case vendor-class-option-data { + description + "Client class selection based on the value of a data + field within a vendor-class-data entry for a matching + enterprise-number field in OPTION_VENDOR_CLASS (16)."; + container vendor-class-option-data { + description + "Vendor class option data container."; + leaf enterprise-number { + type uint32; + description + "The vendor's registered Enterprise Number, as + maintained by IANA."; + } + leaf vendor-class-data-id { + type uint8; + description + "Vendor class data ID."; + } + leaf vendor-class-data { + type string; + description + "Opaque field for matching the client's vendor class + data."; + } + } + } + case client-duid-id { + description + "Client class selection based on the value of the + received client DUID."; + leaf duid { + type dhc6:duid; + description + "Client DUID."; + } + } + } + } + + /* + * Augmentations + */ + + augment "/dhc6-srv:dhcpv6-server/dhc6-srv:class-selector" { + description + "Augment class selector functions to the DHCPv6 server + module."; + container client-classes { + description + "Client classes to augment."; + list class { + key "client-class-name"; + description + "List of the client class identifiers applicable to + clients served by this address pool."; + uses client-class-id; + } + } + } + + augment "/dhc6-srv:dhcpv6-server/" + + "dhc6-srv:allocation-ranges/dhc6-srv:allocation-range" { + description + "Augment class selector functions to the DHCPv6 server + allocation-ranges."; + leaf-list client-class { + type leafref { + path "/dhc6-srv:dhcpv6-server/dhc6-srv:" + + "class-selector/client-classes/class/client-class-name"; + } + description + "Leafrefs to client classes."; + } + } + + augment "/dhc6-srv:dhcpv6-server/dhc6-srv:" + + "allocation-ranges/dhc6-srv:allocation-range/dhc6-srv:" + + "address-pools/dhc6-srv:address-pool" { + description + "Augment class selector functions to the DHCPv6 server + address-pools."; + leaf-list client-class { + type leafref { + path "/dhc6-srv:dhcpv6-server/dhc6-srv:" + + "class-selector/client-classes/class/client-class-name"; + } + description + "Leafrefs to client classes."; + } + } + + augment "/dhc6-srv:dhcpv6-server/dhc6-srv:" + + "allocation-ranges/dhc6-srv:allocation-range/dhc6-srv:" + + "prefix-pools/dhc6-srv:prefix-pool" { + description + "Augment class selector functions to the DHCPv6 + server prefix-pools."; + leaf-list client-class { + type leafref { + path "/dhc6-srv:dhcpv6-server/dhc6-srv:" + + "class-selector/client-classes/class/client-class-name"; + } + description + "Leafrefs to client classes."; + } + } +} diff --git a/standard/ietf/RFC/example-dhcpv6-opt-sip-serv.yang b/standard/ietf/RFC/example-dhcpv6-opt-sip-serv.yang new file mode 120000 index 000000000..52215326a --- /dev/null +++ b/standard/ietf/RFC/example-dhcpv6-opt-sip-serv.yang @@ -0,0 +1 @@ +example-dhcpv6-opt-sip-serv@2022-06-20.yang \ No newline at end of file diff --git a/standard/ietf/RFC/example-dhcpv6-opt-sip-serv@2022-06-20.yang b/standard/ietf/RFC/example-dhcpv6-opt-sip-serv@2022-06-20.yang new file mode 100644 index 000000000..0d317d2fa --- /dev/null +++ b/standard/ietf/RFC/example-dhcpv6-opt-sip-serv@2022-06-20.yang @@ -0,0 +1,124 @@ +module example-dhcpv6-opt-sip-serv { + yang-version 1.1; + namespace "https://example.com/ns/" + + "example-dhcpv6-opt-sip-serv"; + prefix sip-srv; + + import ietf-inet-types { + prefix inet; + } + import ietf-dhcpv6-server { + prefix dhc6-srv; + } + + organization + "IETF Dynamic Host Configuration (DHC) Working Group"; + contact + "WG Web: + WG List: + Author: Yong Cui + Author: Linhui Sun + Editor: Ian Farrer + Author: Sladjana Zeichlin + Author: Zihao He + Author: Michal Nowikowski "; + description + "This YANG module contains DHCPv6 options defined in RFC 8415 + that can be used by DHCPv6 servers. + + Copyright (c) 2022 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject to + the license terms contained in, the Revised BSD License set + forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 9243 + (https://www.rfc-editor.org/info/rfc9243); see the RFC itself + for full legal notices."; + + revision 2022-06-20 { + description + "Initial revision."; + reference + "RFC 9243: A YANG Data Model for DHCPv6 Configuration"; + } + + /* + * Groupings + */ + + grouping sip-server-domain-name-list-option-group { + description + "OPTION_SIP_SERVER_D (21) SIP Servers Domain-Name List."; + reference + "RFC 3319: Dynamic Host Configuration Protocol + (DHCPv6) Options for Session Initiation Protocol (SIP) + Servers"; + container sip-server-domain-name-list-option { + description + "OPTION_SIP_SERVER_D (21) SIP Servers Domain Name List + Option."; + list sip-server { + key "sip-serv-id"; + description + "SIP server information."; + leaf sip-serv-id { + type uint8; + description + "SIP server list identifier."; + } + leaf sip-serv-domain-name { + type inet:domain-name; + description + "SIP server domain name."; + } + } + } + } + + grouping sip-server-address-list-option-group { + description + "OPTION_SIP_SERVER_A (22) SIP Servers IPv6 Address List."; + reference + "RFC 3319: Dynamic Host Configuration Protocol + (DHCPv6) Options for Session Initiation Protocol (SIP) + Servers"; + container sip-server-address-list-option { + description + "OPTION_SIP_SERVER_A (22) SIP Servers IPv6 Address List + Option."; + list sip-server { + key "sip-serv-id"; + description + "SIP server information."; + leaf sip-serv-id { + type uint8; + description + "SIP server list entry identifier."; + } + leaf sip-serv-addr { + type inet:ipv6-address; + description + "SIP server IPv6 address."; + } + } + } + } + + /* + * Augmentations + */ + + augment "/dhc6-srv:dhcpv6-server/dhc6-srv:option-sets/" + + "dhc6-srv:option-set" { + description + "Augment the option definition groupings to the server + module."; + uses sip-server-domain-name-list-option-group; + uses sip-server-address-list-option-group; + } +} diff --git a/standard/ietf/RFC/example-dhcpv6-server-conf.yang b/standard/ietf/RFC/example-dhcpv6-server-conf.yang new file mode 120000 index 000000000..db2a84ddc --- /dev/null +++ b/standard/ietf/RFC/example-dhcpv6-server-conf.yang @@ -0,0 +1 @@ +example-dhcpv6-server-conf@2022-06-20.yang \ No newline at end of file diff --git a/standard/ietf/RFC/example-dhcpv6-server-conf@2022-06-20.yang b/standard/ietf/RFC/example-dhcpv6-server-conf@2022-06-20.yang new file mode 100644 index 000000000..08636d75f --- /dev/null +++ b/standard/ietf/RFC/example-dhcpv6-server-conf@2022-06-20.yang @@ -0,0 +1,244 @@ +module example-dhcpv6-server-conf { + yang-version 1.1; + namespace "https://example.com/ns/" + + "example-dhcpv6-server-conf"; + prefix dhc6-srv-conf; + + import ietf-inet-types { + prefix inet; + } + import ietf-interfaces { + prefix if; + } + import ietf-dhcpv6-server { + prefix dhc6-srv; + } + + organization + "IETF Dynamic Host Configuration (DHC) Working Group"; + contact + "WG Web: + WG List: + Author: Yong Cui + Author: Linhui Sun + Editor: Ian Farrer + Author: Sladjana Zeichlin + Author: Zihao He + Author: Michal Nowikowski "; + description + "This YANG module defines components for the configuration and + management of vendor-/implementation-specific DHCPv6 server + functionality. As this functionality varies greatly between + different implementations, the module is provided as an example + only. + + Copyright (c) 2022 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject to + the license terms contained in, the Revised BSD License set + forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 9243 + (https://www.rfc-editor.org/info/rfc9243); see the RFC itself + for full legal notices."; + + revision 2022-06-20 { + description + "Initial revision."; + reference + "RFC 9243: A YANG Data Model for DHCPv6 Configuration"; + } + + /* + * Groupings + */ + + grouping config { + description + "Parameters necessary for the configuration of a DHCPv6 + server."; + container serv-attributes { + description + "Contains basic attributes necessary for running a DHCPv6 + server."; + leaf name { + type string; + description + "Name of the DHCPv6 server."; + } + leaf description { + type string; + description + "Description of the DHCPv6 server."; + } + leaf ipv6-listen-port { + type uint16; + default "547"; + description + "UDP port that the server will listen on."; + } + choice listening-interfaces { + default "all-interfaces"; + description + "Configures which interface or addresses the server will + listen for incoming messages on."; + case all-interfaces { + container all-interfaces { + presence "true"; + description + "Configures the server to listen for incoming messages + on all IPv6 addresses (unicast and multicast) on all + of its network interfaces."; + } + } + case interface-list { + leaf-list interfaces { + type if:interface-ref; + description + "List of interfaces on which the server will listen + for incoming messages. Messages addressed to any + valid IPv6 address (unicast and multicast) will be + received."; + } + } + case address-list { + leaf-list address-list { + type inet:ipv6-address; + description + "List of IPv6 address(es) on which the server will + listen for incoming DHCPv6 messages."; + } + } + } + leaf-list interfaces-config { + type if:interface-ref; + default "if:interfaces/if:interface/if:name"; + description + "A leaf list of interfaces on which the server should + listen."; + } + container lease-storage { + description + "Configures how the server will store leases."; + choice storage-type { + description + "The type of storage that will be used for lease + information."; + case memfile { + description + "Configuration for storing leases information in a + Comma-Separated Value (CSV) file."; + leaf memfile-name { + type string; + description + "Specifies the absolute location of the lease file. + The format of the string follows the semantics of + the relevant operating system."; + } + leaf memfile-lfc-interval { + type uint64; + description + "Specifies the interval in seconds, at which the + server will perform a lease file cleanup (LFC)."; + } + } + case mysql { + leaf mysql-name { + type string; + description + "Name of the MySQL database, running on the + localhost."; + } + leaf mysql-username { + type string; + description + "User name of the account under which the server + will access the database."; + } + leaf mysql-password { + type string; + description + "Password of the account under which the server + will access the database."; + } + leaf mysql-port { + type inet:port-number; + default "3306"; + description + "If the database is located on a different system, + the port number may be specified."; + } + leaf mysql-lfc-interval { + type uint64; + description + "Specifies the interval in seconds, at which the + server will perform a lease file cleanup (LFC)."; + } + leaf mysql-connect-timeout { + type uint64; + description + "Defines the timeout interval for connecting to the + database. A longer interval can be specified if the + database is remote."; + } + } + case postgresql { + leaf postgresql-name { + type string; + description + "Name of the PostgreSQL database, running on the + localhost."; + } + leaf postgresql-username { + type string; + description + "User name of the account under which the server + will access the database."; + } + leaf postgresql-password { + type string; + description + "Password of the account under which the server + will access the database."; + } + leaf postgresql-port { + type inet:port-number; + default "5432"; + description + "If the database is located on a different system, + the port number may be specified."; + } + leaf postgresql-lfc-interval { + type uint64; + description + "Specifies the interval in seconds, at which the + server will perform a lease file cleanup (LFC)."; + } + leaf postgresql-connect-timeout { + type uint64; + description + "Defines the timeout interval for connecting to the + database. A longer interval can be specified if the + database is remote."; + } + } + } + } + } + } + + /* + * Augmentations + */ + + augment "/dhc6-srv:dhcpv6-server/dhc6-srv:vendor-config" { + description + "Augment the server-specific YANG module to the + ietf-dhcpv6-server module."; + uses config; + } +} diff --git a/standard/ietf/RFC/ietf-ospfv3-extended-lsa.yang b/standard/ietf/RFC/ietf-ospfv3-extended-lsa.yang new file mode 120000 index 000000000..af694276a --- /dev/null +++ b/standard/ietf/RFC/ietf-ospfv3-extended-lsa.yang @@ -0,0 +1 @@ +ietf-ospfv3-extended-lsa@2024-06-07.yang \ No newline at end of file diff --git a/standard/ietf/RFC/ietf-ospfv3-extended-lsa@2024-06-07.yang b/standard/ietf/RFC/ietf-ospfv3-extended-lsa@2024-06-07.yang new file mode 100644 index 000000000..5c946696d --- /dev/null +++ b/standard/ietf/RFC/ietf-ospfv3-extended-lsa@2024-06-07.yang @@ -0,0 +1,849 @@ +module ietf-ospfv3-extended-lsa { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-ospfv3-extended-lsa"; + prefix ospfv3-e-lsa; + + import ietf-routing-types { + prefix rt-types; + reference + "RFC 8294: Common YANG Data Types for the Routing Area"; + } + import ietf-inet-types { + prefix inet; + reference + "RFC 6991: Common YANG Data Types"; + } + import ietf-routing { + prefix rt; + reference + "RFC 8349: A YANG Data Model for Routing + Management (NMDA Version)"; + } + import ietf-ospf { + prefix ospf; + reference + "RFC 9129: YANG Data Model for the OSPF Protocol"; + } + + organization + "IETF LSR - Link State Routing Working Group"; + contact + "WG Web: + WG List: + + Author: Acee Lindem + + Author: Sharmila Palani + + Author: Yingzhen Qu + "; + description + "This YANG module defines the configuration and operational + state for OSPFv3 Extended LSAs, which is common across all + vendor implementations. The semantics and encodings for + OSPFv3 Extended LSAs are described in RFC 8362. OSPFv3 + Extended LSAs provide extensible TLV-based LSAs for the base + LSA types defined in RFC 5340. + + This YANG data model conforms to the Network Management + Datastore Architecture (NMDA) as described in RFC 8342. + + Copyright (c) 2024 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject to + the license terms contained in, the Revised BSD License set + forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 9587; see the + RFC itself for full legal notices."; + + reference + "RFC 9587: YANG Data Model for OSPFv3 Extended Link State + Advertisements (LSAs)"; + + revision 2024-06-07 { + description + "Initial revision."; + reference + "RFC 9587: YANG Data Model for OSPFv3 Extended Link State + Advertisements (LSAs)"; + } + + /* + * OSPFv3 Extended LSA Type Identities + */ + + identity ospfv3-e-router-lsa { + base ospf:ospfv3-lsa-type; + description + "OSPFv3 E-Router-LSA - Type 0xA021."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 4.1"; + } + + identity ospfv3-e-network-lsa { + base ospf:ospfv3-lsa-type; + description + "OSPFv3 E-Network-LSA - Type 0xA022."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 4.2"; + } + + identity ospfv3-e-summary-lsa-type { + base ospf:ospfv3-lsa-type; + description + "OSPFv3 Extended Summary LSA types: + E-Inter-Area-Prefix-LSA and E-Inter-Area-Router-LSA."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Sections 4.3 and 4.4"; + } + + identity ospfv3-e-inter-area-prefix-lsa { + base ospfv3-e-summary-lsa-type; + description + "OSPFv3 E-Inter-Area-Prefix-LSA - Type 0xA023."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 4.3"; + } + + identity ospfv3-e-inter-area-router-lsa { + base ospfv3-e-summary-lsa-type; + description + "OSPFv3 E-Inter-Area-Router-LSA - Type 0xA024."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 4.4"; + } + + identity ospfv3-e-external-lsa-type { + base ospf:ospfv3-lsa-type; + description + "OSPFv3 Extended External LSA types: + E-AS-External-LSA and E-NSSA-LSA (where + NSSA expands to Not-So-Stubby-Area)."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Sections 4.5 and 4.6"; + } + + identity ospfv3-e-as-external-lsa { + base ospfv3-e-external-lsa-type; + description + "OSPFv3 E-AS-External-LSA - Type 0xC025."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 4.5"; + } + + identity ospfv3-e-nssa-lsa { + base ospfv3-e-external-lsa-type; + description + "OSPFv3 E-NSSA-LSA - Type 0xA027."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 4.6"; + } + + identity ospfv3-e-link-lsa { + base ospf:ospfv3-lsa-type; + description + "OSPFv3 E-Link-LSA - Type 0x8028."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 4.7"; + } + + identity ospfv3-e-intra-area-prefix-lsa { + base ospf:ospfv3-lsa-type; + description + "OSPFv3 E-Intra-Area-Prefix-LSA - Type 0xA029."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 4.8"; + } + + identity ospfv3-e-prefix-option { + description + "Base identity for OSPFv3 prefix options."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 3.1"; + } + + identity nu-bit { + base ospfv3-e-prefix-option; + description + "When set, the prefix should be excluded + from IPv6 unicast calculations."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 3.1 + RFC 5340: OSPF for IPv6, Appendix A.4.1.1"; + } + + identity la-bit { + base ospfv3-e-prefix-option; + description + "When set, the prefix is actually an IPv6 interface + address of the advertising router."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 3.1 + RFC 5340: OSPF for IPv6, Appendix A.4.1.1"; + } + + identity p-bit { + base ospfv3-e-prefix-option; + description + "When set, the NSSA prefix should be translated to an + E-AS-External-LSA and advertised by the translating + NSSA Border Router."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 3.1 + RFC 5340: OSPF for IPv6, Appendix A.4.1.1"; + } + + identity dn-bit { + base ospfv3-e-prefix-option; + description + "When set, the E-Inter-Area-Prefix-LSA or + E-AS-External-LSA prefix has been advertised as an + L3VPN prefix."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 3.1 + RFC 5340: OSPF for IPv6, Appendix A.4.1.1"; + } + + identity n-bit { + base ospfv3-e-prefix-option; + description + "When set, the prefix is a host address that identifies + the advertising router."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 3.1 + RFC 5340: OSPF for IPv6, Appendix A.4.1.1"; + } + + identity ospfv3-e-external-prefix-option { + description + "Base identity for OSPFv3 external prefix options."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 3.6"; + } + + identity e-bit { + base ospfv3-e-external-prefix-option; + description + "When the E-bit is set, the metric specified is a Type 2 + external metric. This means the metric is considered larger + than any intra-AS path. When the E-bit is clear, the + specified metric is a Type 1 external metric. This means + that it is expressed in the same units as other LSAs (i.e., + the same units as the interface costs in Router-LSAs)."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 3.6"; + } + + grouping unknown-sub-tlv { + description + "Unknown TLV grouping."; + container unknown-sub-tlv { + uses ospf:tlv; + description + "Unknown External TLV sub-TLV."; + } + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 6.3"; + } + + grouping ospfv3-lsa-prefix { + description + "OSPFv3 LSA prefix."; + leaf prefix { + type inet:ip-prefix; + description + "LSA prefix."; + } + container prefix-options { + leaf-list prefix-options { + type identityref { + base ospfv3-e-prefix-option; + } + description + "OSPFv3 prefix options flag list. This list will + contain the identities for the OSPFv3 options + that are set for the OSPFv3 prefix."; + } + description + "Prefix options."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 3.1"; + } + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 3"; + } + + grouping external-prefix-tlv { + container external-prefix-tlv { + description + "External-Prefix TLV."; + container flags { + leaf-list ospfv3-e-external-prefix-bits { + type identityref { + base ospfv3-e-external-prefix-option; + } + description + "OSPFv3 External-Prefix TLV bits list."; + } + description + "External prefix flags."; + } + leaf metric { + type ospf:ospf-metric; + description + "External prefix metric."; + } + uses ospfv3-lsa-prefix; + list sub-tlvs { + description + "External-Prefix TLV sub-TLVs."; + container ipv6-fwd-addr-sub-tlv { + description + "IPv6-Forwarding-Address sub-TLV for + E-AS-External-LSAs and E-NSSA-LSAs for the IPv6 + address family."; + leaf forwarding-address { + type inet:ipv6-address; + description + "IPv6 forwarding address."; + } + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 3.10"; + } + container ipv4-fwd-addr-sub-tlv { + description + "IPv4-Forwarding-Address sub-TLV for + E-AS-External-LSAs and E-NSSA-LSAs for the IPv4 + address family."; + leaf forwarding-address { + type inet:ipv4-address; + description + "IPv4 forwarding address."; + } + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 3.11"; + } + container route-tag-sub-tlv { + description + "Route-Tag sub-TLV."; + leaf route-tag { + type uint32; + description + "Route tag."; + } + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 3.12"; + } + uses unknown-sub-tlv; + } + } + description + "External-Prefix TLV grouping."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 3.6"; + } + + grouping intra-area-prefix-tlv { + container intra-prefix-tlv { + description + "Intra-Area-Prefix-LSA TLV."; + leaf metric { + type ospf:ospf-metric; + description + "Intra-Area Prefix metric."; + } + uses ospfv3-lsa-prefix; + list sub-tlvs { + description + "Intra-Area-Prefix TLV sub-TLVs."; + uses unknown-sub-tlv; + } + } + description + "Intra-Area-Prefix TLV grouping."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 3.7"; + } + + grouping ipv6-link-local-addr-tlv { + container ipv6-link-local-addr-tlv { + description + "IPv6 Link-Local Address TLV."; + leaf link-local-address { + type inet:ipv6-address; + description + "IPv6 Link-Local address."; + } + list sub-tlvs { + description + "IPv6 Link-Local Address TLV sub-TLVs."; + uses unknown-sub-tlv; + } + } + description + "IPv6 Link-Local Address TLV grouping."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 3.8"; + } + + grouping ipv4-link-local-addr-tlv { + container ipv4-link-local-addr-tlv { + description + "IPv4 Link-Local Address TLV."; + leaf link-local-address { + type inet:ipv4-address; + description + "IPv4 Link-Local address."; + } + list sub-tlvs { + description + "IPv4 Link-Local Address TLV sub-TLVs."; + uses unknown-sub-tlv; + } + } + description + "IPv4 Link-Local Address TLV grouping."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 3.9"; + } + + /* Configuration */ + + augment "/rt:routing/rt:control-plane-protocols" + + "/rt:control-plane-protocol/ospf:ospf" { + when "../rt:type = 'ospf:ospfv3'" { + description + "This augments the OSPFv3 routing protocol when used."; + } + description + "This augments the OSPFv3 protocol instance-level + configuration with Extended LSA support. When enabled, + OSPFv3 Extended LSAs will be advertised and OSPFv3 Legacy + LSAs will not be advertised. When disabled, OSPFv3 Legacy + LSAs will be advertised. However, OSPFv3 Extended LSAs + could still be advertised in Extended LSA Sparse Mode to + support incrementally deployed features as described in + Section 6.2 of RFC 8362."; + leaf extended-lsa-support { + type boolean; + default "false"; + description + "Enable OSPFv3 Extended LSA support for the OSPFv3 + domain."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Appendix A - Global Configuration Support"; + } + } + + augment "/rt:routing/rt:control-plane-protocols/" + + "rt:control-plane-protocol/ospf:ospf/ospf:" + + "areas/ospf:area" { + when "../../../rt:type = 'ospf:ospfv3'" { + description + "This augments the OSPFv3 protocol area-level + configuration when used."; + } + description + "This augments the OSPFv3 protocol area-level + configuration with Extended LSA support."; + leaf extended-lsa-support { + type boolean; + must "derived-from(../ospf:area-type,'stub-nssa-area') or " + + "(current() = 'true') or " + + "(../../../extended-lsa-support = 'false')" { + description + "For regular areas, i.e., areas where AS-scoped LSAs + are flooded, disabling AreaExtendedLSASupport at the + area level is prohibited when ExtendedLSASupport is + enabled at the instance level. E-AS-External-LSAs + are flooded into all OSPFv3 regular areas (i.e., not + a stub or an NSSA), and disabling support at the + area level is not possible."; + } + description + "This augments the OSPFv3 protocol area-level + configuration with Extended LSA support. When enabled, + OSPFv3 Extended LSAs will be advertised and OSPFv3 Legacy + LSAs will not be advertised. When disabled, OSPFv3 + Legacy LSAs will be advertised. However, OSPFv3 Extended + LSAs could still be advertised in Extended LSA Sparse + Mode to support incrementally deployed features as + described in Section 6.2 of RFC 8362. If not specified, + Extended LSA support status is inherited from the + instance-level configuration."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Appendix B - Area Configuration Support"; + } + } + + /* + * Link State Database (LSDB) Augmentations + */ + + augment "/rt:routing/" + + "rt:control-plane-protocols/rt:control-plane-protocol/" + + "ospf:ospf/ospf:areas/ospf:area/" + + "ospf:interfaces/ospf:interface/ospf:database/" + + "ospf:link-scope-lsa-type/ospf:link-scope-lsas/" + + "ospf:link-scope-lsa/ospf:version/ospf:ospfv3/" + + "ospf:ospfv3/ospf:body" { + when "../../../../../../../../../../../" + + "rt:type = 'ospf:ospfv3'" { + description + "This augmentation is only valid for OSPFv3."; + } + description + "This augmentation adds OSPFv3 Link-scoped Extended LSAs + to the operational state for an interface Link State + Database (LSDB)."; + container e-link { + when "../../ospf:header/ospf:type = " + + "'ospfv3-e-lsa:ospfv3-e-link-lsa'" { + description + "Only applies to E-Link-LSAs."; + } + description + "E-Link-LSA contents."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 4.7"; + leaf rtr-priority { + type uint8; + description + "Router priority for the interface."; + } + uses ospf:ospfv3-lsa-options; + list e-link-tlvs { + description + "E-Link-LSA TLVs."; + container unknown-tlv { + uses ospf:tlv; + description + "Unknown E-Link TLV."; + } + uses intra-area-prefix-tlv; + uses ipv6-link-local-addr-tlv; + uses ipv4-link-local-addr-tlv; + } + } + } + + augment "/rt:routing/" + + "rt:control-plane-protocols/rt:control-plane-protocol/" + + "ospf:ospf/ospf:areas/ospf:area/ospf:database/" + + "ospf:area-scope-lsa-type/ospf:area-scope-lsas/" + + "ospf:area-scope-lsa/ospf:version/ospf:ospfv3/" + + "ospf:ospfv3/ospf:body" { + when "../../../../../../../../../" + + "rt:type = 'ospf:ospfv3'" { + description + "This augmentation is only valid for OSPFv3."; + } + description + "This augmentation adds OSPFv3 Area-scoped Extended LSAs + to the operational state for an area LSDB."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 4"; + container e-router { + when "../../ospf:header/ospf:type = " + + "'ospfv3-e-lsa:ospfv3-e-router-lsa'" { + description + "Only valid for OSPFv3 E-Router-LSAs."; + } + description + "OSPFv3 E-Router-LSA contents."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 4.1"; + uses ospf:ospf-router-lsa-bits; + uses ospf:ospfv3-lsa-options; + list e-router-tlvs { + description + "E-Router-LSA TLVs."; + container unknown-tlv { + uses ospf:tlv; + description + "Unknown E-Router TLV."; + } + container link-tlv { + description + "E-Router-LSA TLV."; + leaf interface-id { + type uint32; + description + "Interface ID for link."; + } + leaf neighbor-interface-id { + type uint32; + description + "Neighbor's Interface ID for link."; + } + leaf neighbor-router-id { + type rt-types:router-id; + description + "Neighbor's Router ID for link."; + } + leaf type { + type ospf:router-link-type; + description + "Link type: 1 - Point-to-Point Link + 2 - Transit Network Link + 3 - Stub Network Link + 4 - Virtual Link."; + } + leaf metric { + type ospf:ospf-link-metric; + description + "Link metric."; + } + list sub-tlvs { + description + "Link TLV sub-TLVs."; + uses unknown-sub-tlv; + } + } + } + } + container e-network { + when "../../ospf:header/ospf:type = " + + "'ospfv3-e-lsa:ospfv3-e-network-lsa'" { + description + "Only applies to E-Network-LSAs."; + } + description + "E-Network-LSA contents."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 4.2"; + uses ospf:ospfv3-lsa-options; + list e-network-tlvs { + description + "E-Network-LSA TLVs."; + container unknown-tlv { + uses ospf:tlv; + description + "Unknown E-Network TLV."; + } + container attached-router-tlv { + description + "Attached-Routers TLV."; + leaf-list adjacent-neighbor-router-id { + type rt-types:router-id; + description + "Adjacent neighbor's Router ID."; + } + } + } + } + container e-nssa { + when "../../ospf:header/ospf:type = " + + "'ospfv3-e-lsa:ospfv3-e-nssa-lsa'" { + description + "Only applies to E-NSSA-LSAs."; + } + description + "E-NSSA-LSA contents."; + list e-external-tlvs { + description + "E-NSSA-LSA TLVs."; + container unknown-tlv { + uses ospf:tlv; + description + "Unknown E-External TLV."; + } + uses external-prefix-tlv; + } + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 4.6"; + } + container e-inter-area-prefix { + when "../../ospf:header/ospf:type = " + + "'ospfv3-e-lsa:ospfv3-e-inter-area-prefix-lsa'" { + description + "Only applies to E-Inter-Area-Prefix-LSAs."; + } + description + "E-Inter-Area-Prefix-LSA contents."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 4.3"; + list e-inter-prefix-tlvs { + description + "E-Inter-Area-Prefix-LSA TLVs."; + container unknown-tlv { + uses ospf:tlv; + description + "Unknown E-Inter-Area-Prefix TLV."; + } + container inter-prefix-tlv { + description + "Unknown E-Inter-Area-Prefix-LSA TLV."; + leaf metric { + type ospf:ospf-metric; + description + "Inter-Area Prefix metric."; + } + uses ospfv3-lsa-prefix; + list sub-tlvs { + description + "Inter-Area-Prefix TLV sub-TLVs."; + uses unknown-sub-tlv; + } + } + } + } + container e-inter-area-router { + when "../../ospf:header/ospf:type = " + + "'ospfv3-e-lsa:ospfv3-e-inter-area-router-lsa'" { + description + "Only applies to E-Inter-Area-Router-LSAs."; + } + description + "E-Inter-Area-Router-LSA contents."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 4.4"; + list e-inter-router-tlvs { + description + "E-Inter-Area-Router-LSA TLVs."; + container unknown-tlv { + uses ospf:tlv; + description + "Unknown E-Inter-Area-Router TLV."; + } + container inter-router-tlv { + description + "Unknown E-Inter-Area-Router-LSA TLV."; + uses ospf:ospfv3-lsa-options; + leaf metric { + type ospf:ospf-metric; + description + "Inter-Area Router metric."; + } + leaf destination-router-id { + type rt-types:router-id; + description + "Destination Router ID."; + } + list sub-tlvs { + description + "Inter-Area-Router TLV sub-TLVs."; + uses unknown-sub-tlv; + } + } + } + } + container e-intra-area-prefix { + when "../../ospf:header/ospf:type = " + + "'ospfv3-e-lsa:ospfv3-e-intra-area-prefix-lsa'" { + description + "Only applies to E-Intra-Area-Prefix-LSAs."; + } + description + "E-Intra-Area-Prefix-LSA contents."; + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 4.8"; + leaf referenced-ls-type { + type uint16; + description + "Referenced Link State type."; + } + leaf referenced-link-state-id { + type uint32; + description + "Referenced Link State ID."; + } + leaf referenced-adv-router { + type rt-types:router-id; + description + "Referenced advertising router."; + } + list e-intra-prefix-tlvs { + description + "E-Intra-Area-Prefix-LSA TLVs."; + container unknown-tlv { + uses ospf:tlv; + description + "Unknown E-Intra-Area-Prefix TLV."; + } + uses intra-area-prefix-tlv; + } + } + } + + augment "/rt:routing/" + + "rt:control-plane-protocols/rt:control-plane-protocol/" + + "ospf:ospf/ospf:database/" + + "ospf:as-scope-lsa-type/ospf:as-scope-lsas/" + + "ospf:as-scope-lsa/ospf:version/ospf:ospfv3/" + + "ospf:ospfv3/ospf:body" { + when "../../../../../../../" + + "rt:type = 'ospf:ospfv3'" { + description + "This augmentation is only valid for OSPFv3."; + } + description + "This augmentation adds OSPFv3 AS-scoped Extended LSAs to + the operational state for an AS instance-level LSDB."; + container e-as-external { + when "../../ospf:header/ospf:type = " + + "'ospfv3-e-lsa:ospfv3-e-as-external-lsa'" { + description + "Only applies to E-AS-External-LSAs."; + } + description + "E-AS-External-LSA contents."; + list e-external-tlvs { + description + "E-AS-External-LSA TLVs."; + container unknown-tlv { + uses ospf:tlv; + description + "Unknown E-External TLV."; + } + uses external-prefix-tlv; + } + reference + "RFC 8362: OSPFv3 Link State Advertisement (LSA) + Extensibility, Section 4.5"; + } + } +} diff --git a/standard/ietf/RFC/ietf-rip.yang b/standard/ietf/RFC/ietf-rip.yang new file mode 120000 index 000000000..841322d0a --- /dev/null +++ b/standard/ietf/RFC/ietf-rip.yang @@ -0,0 +1 @@ +ietf-rip@2020-02-20.yang \ No newline at end of file diff --git a/standard/ietf/RFC/ietf-rip@2020-02-20.yang b/standard/ietf/RFC/ietf-rip@2020-02-20.yang new file mode 100644 index 000000000..816053d35 --- /dev/null +++ b/standard/ietf/RFC/ietf-rip@2020-02-20.yang @@ -0,0 +1,1132 @@ +module ietf-rip { + yang-version 1.1; + namespace "urn:ietf:params:xml:ns:yang:ietf-rip"; + prefix rip; + + import ietf-inet-types { + prefix inet; + } + import ietf-yang-types { + prefix yang; + } + import ietf-interfaces { + prefix if; + } + import ietf-ip { + prefix ip; + } + import ietf-routing { + prefix rt; + } + import ietf-key-chain { + prefix key-chain; + } + import ietf-bfd-types { + prefix bfd-types; + } + import ietf-ospf { + prefix ospf; + } + import ietf-isis { + prefix isis; + } + + organization + "IETF Routing Area Working Group (rtgwg)"; + contact + "WG Web: + WG List: + + Editor: Xufeng Liu + + + Editor: Prateek Sarda + + + Editor: Vikram Choudhary + "; + description + "This YANG module defines a model for managing Routing + Information Protocol (RIP), including RIP version 2 and RIPng. + + Copyright (c) 2020 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject to + the license terms contained in, the Simplified BSD License set + forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 8695; see the + RFC itself for full legal notices."; + + revision 2020-02-20 { + description + "Initial revision."; + reference + "RFC 8695: A YANG Data Model for Routing Information Protocol + (RIP). + RFC 2453: RIP Version 2. + RFC 2080: RIPng for IPv6. + RFC 1724: RIP Version 2 MIB Extension."; + } + + /* + * Features + */ + + feature bfd { + description + "This feature indicates that the RIP implementation on the + system supports BFD (Bidirectional Forwarding Detection)."; + } + + feature explicit-neighbors { + description + "This feature indicates that the system supports explicit + neighbor configuration on a RIP interface."; + } + + feature global-statistics { + description + "This feature indicates that the system supports collecting + global statistics data related to RIP."; + } + + feature interface-statistics { + description + "This feature indicates that the system supports collecting + per-interface statistics data related to RIP."; + } + + /* + * Typedefs + */ + + typedef prefix-set-ref { + type string; + description + "A type for a reference to a prefix set. + The string value is the name identifier for uniquely + identifying the referenced prefix set, which contains a list + of prefixes that a routing policy can applied. The definition + of such a prefix set is outside the scope of this document."; + } + + typedef route-policy-ref { + type string; + description + "A type for a reference to a route policy. + The string value is the name identifier for uniquely + identifying the referenced routing policy, which contains one + or more policy rules that can be used for a routing decision. + The definition of such a routing policy is outside the scope + of this document."; + } + + /* + * Identities + */ + + identity rip { + base rt:routing-protocol; + description + "Identity for the Routing Information Protocol."; + } + + identity ripv2 { + base rip:rip; + description + "Identity for RIPv2 (RIP version 2)."; + } + + identity ripng { + base rip:rip; + description + "Identity for RIPng."; + } + + /* + * Groupings + */ + + grouping originate-default-route-container { + description + "Container for settings on whether to originate the default + route in RIP routing instance."; + container originate-default-route { + description + "Injects the default route into the RIP (RIPv2 or RIPng) + routing instance."; + leaf enabled { + type boolean; + default "false"; + description + "'true' if originating default route is enabled."; + } + leaf route-policy { + type route-policy-ref; + description + "The conditions of the route policy are applied to the + default route."; + } + } + } + + grouping redistribute-container { + description + "Container of redistribute attributes."; + container redistribute { + description + "Redistributes routes learned from other routing protocols + into the RIP routing instance."; + list bgp { + key "asn"; + description + "Redistributes routes from the specified BGP (Border + Gateway Protocol) autonomous system (AS) into the RIP + routing instance."; + leaf asn { + type inet:as-number; + description + "BGP autonomous system (AS) number."; + } + uses redistribute-route-policy-attributes; + } + container cg-nat { + presence "Present if Carrier-Grade Network Address + Translation (CGNAT) routes are redistributed."; + description + "Carrier-Grade Network Address Translation (CGNAT) + routes."; + uses redistribute-route-policy-attributes; + } + container connected { + presence "Present if directly attached network routes are + redistributed."; + description + "Redistributes directly attached networks into the RIP + routing instance."; + uses redistribute-route-policy-attributes; + } + container ipsec { + presence "Present if IP security routing instance routes + are redistributed."; + description + "Redistributes routes from the IP security routing + instance into the RIP routing instance."; + uses redistribute-route-policy-attributes; + } + list isis { + key "instance"; + description + "Redistributes IS-IS routes."; + leaf instance { + type leafref { + path "../../../../../rt:control-plane-protocol/rt:name"; + } + must "derived-from-or-self(" + + "../../../../../rt:control-plane-protocol" + + "[rt:name = current()]/rt:type, 'isis:isis')" { + description + "The type of the routing protocol must be 'isis'."; + } + description + "Redistributes routes from the specified IS-IS routing + instance into the RIP routing instance."; + } + leaf level { + type enumeration { + enum 1 { + description + "IS-IS level 1 routes."; + } + enum 2 { + description + "IS-IS level 2 routes."; + } + enum 1-2 { + description + "IS-IS level 1-2 routes."; + } + } + description + "IS-IS level."; + } + uses redistribute-route-policy-attributes; + } + container nat { + presence "Present if Network Address Translation (NAT) routes + are redistributed."; + description + "Redistributes Network Address Translation (NAT) + routes into the RIP routing instance."; + uses redistribute-route-policy-attributes; + } + list ospfv2 { + when "derived-from-or-self(../../../rt:type, 'rip:ripv2')" { + description + "Applicable to RIPv2."; + } + key "instance"; + description + "Redistributes routes from the specified OSPFv2 routing + instance into the RIPv2 routing instance."; + leaf instance { + type leafref { + path "../../../../../rt:control-plane-protocol/rt:name"; + } + must "derived-from-or-self(" + + "../../../../../rt:control-plane-protocol" + + "[rt:name = current()]/rt:type, 'ospf:ospfv2')" { + description + "The type of the routing protocol must be 'ospfv2'."; + } + description + "OSPFv2 instance ID. Redistributes routes from the + specified OSPFv2 routing instance into the RIPv2 routing + instance."; + } + leaf route-type { + type ospf:route-type; + description + "Redistributes only those OSPFv2 routes matching the + specified route type into the RIPv2 routing instance."; + } + uses redistribute-route-policy-attributes; + } + list ospfv3 { + when "derived-from-or-self(../../../rt:type, 'rip:ripng')" { + description + "Applicable to RIPng."; + } + key "instance"; + description + "Redistributes routes from the specified OSPFv3 routing + instance into the RIPng routing instance."; + leaf instance { + type leafref { + path "../../../../../rt:control-plane-protocol/rt:name"; + } + must "derived-from-or-self(" + + "../../../../../rt:control-plane-protocol" + + "[rt:name = current()]/rt:type, 'ospf:ospfv3')" { + description + "The type of the routing protocol must be 'ospfv3'."; + } + description + "OSPFv3 instance ID. Redistributes routes from the + specified OSPFv3 routing instance into the RIPng routing + instance."; + } + leaf route-type { + type ospf:route-type; + description + "Redistributes only those OSPFv3 routes matching the + specified route type into the RIPng routing instance."; + } + uses redistribute-route-policy-attributes; + } + list ripv2 { + when "derived-from-or-self(../../../rt:type, 'rip:ripv2')" { + description + "Applicable to RIPv2."; + } + key "instance"; + description + "Redistributes routes from another RIPv2 routing instance + into the current RIPv2 routing instance."; + leaf instance { + type leafref { + path "../../../../../rt:control-plane-protocol/rt:name"; + } + must "derived-from-or-self(" + + "../../../../../rt:control-plane-protocol" + + "[rt:name = current()]/rt:type, 'rip:ripv2')" { + description + "The type of the routing protocol must be 'ripv2'."; + } + description + "Redistributes routes from the specified RIPv2 routing + instance into the RIPv2 routing instance."; + } + uses redistribute-route-policy-attributes; + } + list ripng { + when "derived-from-or-self(../../../rt:type, 'rip:ripng')" { + description + "Applicable to RIPng."; + } + key "instance"; + description + "Redistributes routes from another RIPng routing instance + into the current RIPng routing instance."; + leaf instance { + type leafref { + path "../../../../../rt:control-plane-protocol/rt:name"; + } + must "derived-from-or-self(" + + "../../../../../rt:control-plane-protocol" + + "[rt:name = current()]/rt:type, 'rip:ripng')" { + description + "The type of the routing protocol must be 'ripng'."; + } + description + "Redistributes routes from the specified RIPng routing + instance into the RIPng routing instance."; + } + uses redistribute-route-policy-attributes; + } + container static { + presence "Present if redistributing static routes."; + description + "Redistributes static routes into the RIP routing + instance."; + uses redistribute-route-policy-attributes; + } + } + // redistribute + } + // redistribute-container + + grouping redistribute-route-policy-attributes { + description + "Attributes for redistributing a route policy."; + leaf metric { + type uint8 { + range "0..16"; + } + description + "Metric used for the redistributed route. If a metric is + not specified, the metric configured with the + default-metric attribute in RIP router configuration is + used. If the default-metric attribute has not been + configured, the default metric for redistributed routes + is 1."; + } + leaf route-policy { + type route-policy-ref; + description + "Applies the conditions of the specified route policy to + routes that are redistributed into the RIP routing + instance."; + } + } + // redistribute-route-policy-attributes + + grouping timers-container { + description + "Container for settings of basic timers"; + container timers { + must 'invalid-interval >= (update-interval * 3)' { + description + "invalid-interval must be at least three times the value + for the update-interval argument."; + } + must 'flush-interval > invalid-interval' { + description + "flush-interval must be larger than the value for the + invalid-interval argument."; + } + description + "Timers for the specified RIPv2 or RIPng instance or + interface."; + leaf update-interval { + type uint16 { + range "1..32767"; + } + units "seconds"; + default "30"; + description + "Interval at which RIPv2 or RIPng updates are sent."; + } + leaf invalid-interval { + type uint16 { + range "1..32767"; + } + units "seconds"; + default "180"; + description + "Interval before a route is declared invalid after no + updates are received. This value is at least three times + the value for the update-interval argument."; + } + leaf holddown-interval { + type uint16 { + range "1..32767"; + } + units "seconds"; + default "180"; + description + "Interval before better routes are released."; + } + leaf flush-interval { + type uint16 { + range "1..32767"; + } + units "seconds"; + default "240"; + description + "Interval before a route is flushed from the routing + table. This value must be larger than the value for the + invalid-interval argument."; + } + } + // timers + } + // timers-container + + grouping global-attributes { + description + "Global configuration and state attributes."; + uses originate-default-route-container; + leaf default-metric { + type uint8 { + range "0..16"; + } + default "1"; + description + "Set the default metric."; + } + leaf distance { + type uint8 { + range "1..255"; + } + default "120"; + description + "The administrative distance of the RIPv2 or RIPng for the + current RIPv2 or RIPng instance."; + } + leaf triggered-update-threshold { + type uint8 { + range "1..30"; + } + units "seconds"; + default "5"; + description + "This attribute is used to suppress triggered updates. + When the arrival of a regularly scheduled update matches the + number of seconds or is less than the number seconds + configured with this attribute, the triggered update is + suppressed."; + } + leaf maximum-paths { + type uint8 { + range "1..16"; + } + default "8"; + description + "The number of multiple equal-cost RIPv2 or RIPng routes + that can be used as the best paths for balancing the load + of outgoing traffic packets."; + } + leaf output-delay { + type uint8 { + range "1..50"; + } + units "milliseconds"; + description + "A delay time between packets sent in multipacket + RIPv2 or RIPng updates."; + } + } + // global-attributes + + grouping distribute-lists { + description + "Grouping for distribute lists."; + list distribute-list { + key "prefix-set-name direction"; + description + "List of distribute-lists, which are used to filter incoming + or outgoing routing updates."; + leaf prefix-set-name { + type prefix-set-ref; + description + "Reference to a prefix list to be applied to RIPv2 or + RIPng packets."; + } + leaf direction { + type enumeration { + enum in { + description + "Apply the distribute-list to incoming routes."; + } + enum out { + description + "Apply the distribute-list to outgoing routes."; + } + } + description + "Direction of the routing updates."; + } + leaf if-name { + type if:interface-ref; + description + "Reference to an interface to which the prefix list is + applied."; + } + } + // distribute-list + } + // distribute-lists + + grouping route-attributes { + description + "Grouping for route attributes."; + leaf redistributed { + type boolean; + description + "Redistributed routes."; + } + leaf route-type { + type enumeration { + enum connected { + description + "Connected route."; + } + enum external { + description + "External route."; + } + enum external-backup { + description + "External backup route."; + } + enum rip { + description + "RIP route."; + } + } + description + "Route type."; + } + leaf metric { + type uint8 { + range "0..16"; + } + description + "Route metric."; + } + leaf expire-time { + type uint16; + description + "Expiration time."; + } + leaf deleted { + type boolean; + description + "Deleted route."; + } + leaf holddown { + type boolean; + description + "Holddown route."; + } + leaf need-triggered-update { + type boolean; + description + "The route needs triggered update."; + } + leaf inactive { + type boolean; + description + "The route is inactive."; + } + leaf flush-expire-before-holddown { + type boolean; + description + "The flush timer expired before holddown time."; + } + } + // route-attributes + + /* + * Configuration data and operational state data nodes + */ + + augment "/rt:routing/rt:control-plane-protocols/" + + "rt:control-plane-protocol" { + when "derived-from(rt:type, 'rip:rip')" { + description + "This augment is only valid for a routing protocol instance + of RIP (type 'ripv2' or 'ripng')."; + } + description + "RIP augmentation."; + container rip { + description + "RIP data."; + uses global-attributes; + uses distribute-lists; + uses redistribute-container; + uses timers-container; + container interfaces { + description + "Containing a list of RIP interfaces."; + list interface { + key "interface"; + description + "List of RIP interfaces."; + leaf interface { + type if:interface-ref; + must "(derived-from-or-self(" + + "../../../../rt:type, 'rip:ripv2') and " + + "/if:interfaces/if:interface[if:name=current()]/" + + "ip:ipv4) or " + + "(derived-from-or-self(" + + "../../../../rt:type, 'rip:ripng') and " + + "/if:interfaces/if:interface[if:name=current()]/" + + "ip:ipv6)" { + error-message "Invalid interface type."; + description + "RIPv2 can be enabled on IPv4 interface, and + RIPng can be enabled on IPv6 interface."; + } + description + "Enable RIP on this interface."; + } + container authentication { + when "derived-from-or-self(" + + "../../../../rt:type, 'rip:ripv2')" { + description + "Only applicable to RIPv2."; + } + description + "Enables authentication and specifies the + authentication scheme for the RIP interface."; + choice auth-type-selection { + description + "Specify the authentication scheme."; + reference + "RFC8177: YANG Data Model for Key Chains."; + case auth-key-chain { + leaf key-chain { + type key-chain:key-chain-ref; + description + "key-chain name."; + } + } + case auth-key { + leaf key { + type string; + description + "Key string in ASCII format."; + } + leaf crypto-algorithm { + type identityref { + base key-chain:crypto-algorithm; + } + description + "Cryptographic algorithm associated with the + key."; + } + } + } + } + container bfd { + if-feature "bfd"; + description + "BFD configuration."; + uses bfd-types:client-cfg-parms; + } + leaf cost { + type uint8 { + range "1..16"; + } + default "1"; + description + "Interface cost."; + } + container neighbors { + if-feature "explicit-neighbors"; + description + "Specifies the RIP neighbors. Useful for a + non-broadcast multiple access (NBMA) network."; + list neighbor { + key "address"; + description + "Specify a RIP neighbor on a non-broadcast network."; + leaf address { + type inet:ip-address; + description + "Neighbor IP address."; + } + } + } + leaf no-listen { + type empty; + description + "Disables listening to, and processing of, RIPv2 or + RIPng packets on the specified interface."; + } + uses originate-default-route-container; + leaf passive { + type empty; + description + "Disables sending of RIPv2 or RIPng packets on the + specified interface."; + } + leaf split-horizon { + type enumeration { + enum disabled { + description + "Disables split-horizon processing."; + } + enum simple { + description + "Enables simple split-horizon processing."; + } + enum poison-reverse { + description + "Enables split-horizon processing with poison + reverse."; + } + } + default "simple"; + description + "Controls RIPv2 or RIPng split-horizon processing on + the specified interface."; + } + container summary-address { + description + "Summarizes information about RIPv2 or RIPng routes + sent over the specified interface in RIPv2 or RIPng + update packets."; + leaf address { + type inet:ip-prefix; + description + "Specifies the IP address and the prefix length that + identify the routes to be summarized. The IP + address can be specified in either IPv4 or IPv6 + format, as specified in RFC6991."; + } + leaf metric { + type uint8 { + range "0..16"; + } + description + "Metric used for the route. If this attribute is not + used, the value set through the default-metric + attribute in RIPv2 or RIPng router configuration is + used for the route."; + } + } + uses timers-container; + + /* Operational state */ + leaf oper-status { + type enumeration { + enum up { + description + "RIPv2 or RIPng is operational on this interface."; + } + enum down { + description + "RIPv2 or RIPng is not operational on this + interface."; + } + } + config false; + description + "Operational state."; + } + leaf next-full-update { + type uint32; + config false; + description + "Next full update time."; + } + leaf valid-address { + type boolean; + config false; + description + "The interface has a valid address."; + } + container statistics { + if-feature "interface-statistics"; + config false; + description + "Interface statistics counters."; + leaf discontinuity-time { + type yang:date-and-time; + description + "The time on the most recent occasion at which any + one or more of the statistics counters suffered a + discontinuity. If no such discontinuities have + occurred since the last re-initialization of the + local management subsystem, then this node contains + the time the local management subsystem + re-initialized itself."; + } + leaf bad-packets-rcvd { + type yang:counter32; + description + "The number of RIP invalid packets received by + the RIP process that were subsequently discarded + for any reason (e.g., a version 0 packet, or an + unknown command type)."; + } + leaf bad-routes-rcvd { + type yang:counter32; + description + "The number of routes, in valid RIP packets, + which were ignored for any reason (e.g., unknown + address family, or invalid metric)."; + } + leaf updates-sent { + type yang:counter32; + description + "The number of triggered RIP updates actually + sent on this interface. This explicitly does + NOT include full updates sent containing new + information."; + } + } + } + // interface + } + // interfaces + + /* Operational state */ + leaf next-triggered-update { + type uint32; + config false; + description + "Next triggered update."; + } + leaf num-of-routes { + type uint32; + config false; + description + "The number of routes."; + } + container ipv4 { + when "derived-from-or-self(../../rt:type, 'rip:ripv2')" { + description + "IPv4 address family is supported by RIPv2."; + } + config false; + description + "IPv4 address family information."; + container neighbors { + description + "IPv4 neighbor information."; + list neighbor { + key "ipv4-address"; + description + "A RIPv2 neighbor."; + leaf ipv4-address { + type inet:ipv4-address; + description + "IP address that a RIP neighbor is using as its + source address."; + } + leaf last-update { + type yang:date-and-time; + description + "The time when the most recent RIP update was + received from this neighbor."; + } + leaf bad-packets-rcvd { + type yang:counter32; + description + "The number of RIP invalid packets received from + this neighbor that were subsequently discarded + for any reason (e.g., a version 0 packet, or an + unknown command type)."; + } + leaf bad-routes-rcvd { + type yang:counter32; + description + "The number of routes received from this neighbor, + in valid RIP packets that were ignored for any + reason (e.g., unknown address family, or invalid + metric)."; + } + } + // neighbor + } + // neighbors + + container routes { + description + "IPv4 route information."; + list route { + key "ipv4-prefix"; + description + "A RIPv2 IPv4 route."; + leaf ipv4-prefix { + type inet:ipv4-prefix; + description + "IPv4 address and prefix length, in the format + specified in RFC6991."; + } + leaf next-hop { + type inet:ipv4-address; + description + "Next hop IPv4 address."; + } + leaf interface { + type if:interface-ref; + description + "The interface that the route uses."; + } + uses route-attributes; + } + // route + } + // routes + } + // ipv4 + + container ipv6 { + when "derived-from-or-self(../../rt:type, 'rip:ripng')" { + description + "IPv6 address family is supported by RIPng."; + } + config false; + description + "IPv6 address family information."; + container neighbors { + description + "IPv6 neighbor information."; + list neighbor { + key "ipv6-address"; + description + "A RIPng neighbor."; + leaf ipv6-address { + type inet:ipv6-address; + description + "IP address that a RIP neighbor is using as its + source address."; + } + leaf last-update { + type yang:date-and-time; + description + "The time when the most recent RIP update was + received from this neighbor."; + } + leaf bad-packets-rcvd { + type yang:counter32; + description + "The number of RIP invalid packets received from + this neighbor that were subsequently discarded + for any reason (e.g., a version 0 packet, or an + unknown command type)."; + } + leaf bad-routes-rcvd { + type yang:counter32; + description + "The number of routes received from this neighbor, + in valid RIP packets that were ignored for any + reason (e.g., unknown address family, or invalid + metric)."; + } + } + // neighbor + } + // neighbors + + container routes { + description + "IPv6 route information."; + list route { + key "ipv6-prefix"; + description + "A RIPng IPv6 route."; + leaf ipv6-prefix { + type inet:ipv6-prefix; + description + "IPv6 address and prefix length, in the format + specified in RFC6991."; + } + leaf next-hop { + type inet:ipv6-address; + description + "Next hop IPv6 address."; + } + leaf interface { + type if:interface-ref; + description + "The interface that the route uses."; + } + uses route-attributes; + } + // route + } + // routes + } + // ipv6 + + container statistics { + if-feature "global-statistics"; + config false; + description + "Global statistics counters."; + leaf discontinuity-time { + type yang:date-and-time; + description + "The time on the most recent occasion at which any one + or more of the statistics counters suffered a + discontinuity. If no such discontinuities have occurred + since the last re-initialization of the local + management subsystem, then this node contains the time + the local management subsystem re-initialized itself."; + } + leaf requests-rcvd { + type yang:counter32; + description + "The number of requests received by RIP."; + } + leaf requests-sent { + type yang:counter32; + description + "The number of requests sent by RIP."; + } + leaf responses-rcvd { + type yang:counter32; + description + "The number of responses received by RIP."; + } + leaf responses-sent { + type yang:counter32; + description + "The number of responses sent by RIP."; + } + } + // statistics + } + // rip + } + + /* + * RPCs + */ + + rpc clear-rip-route { + description + "Clears RIP routes from the IP routing table and routes + redistributed into RIP for the specified RIP instance + or for all RIP instances in the current context."; + input { + leaf rip-instance { + type leafref { + path "/rt:routing/rt:control-plane-protocols/" + + "rt:control-plane-protocol/rt:name"; + } + description + "Instance name identifying a specific RIP instance. + This leaf is optional for the RPC. + If it is specified, the RPC will clear all routes in the + specified RIP instance; + if it is not specified, the RPC will clear all routes in + all RIP instances."; + } + } + } + // clear-rip-route + +}