3 namespace "http://frrouting.org/yang/ospfd";
10 import ietf-inet-types {
14 import frr-interface {
18 import frr-route-map {
22 import frr-route-types {
23 prefix frr-route-types;
29 "FRR Users List: <mailto:frog@lists.frrouting.org>
30 FRR Development List: <mailto:dev@lists.frrouting.org>";
32 "This module defines a model for managing FRR OSPFd information.
33 This YANG module augments the basic routing with additional
42 base frr-rt:routing-protocol;
44 "'OSPF' routing ospf-protocol.";
47 /* Policy types to be removed later, once policy Yang finalized */
52 typedef access-list-ref {
56 typedef ospf-area-id {
58 type inet:ipv4-address;
61 description "OSPF Area ID.";
64 grouping nssa-grouping {
66 presence "Present if the nssa is enabled";
71 "Do not inject inter-area routes into nssa";
74 leaf translate-always {
78 "NSSA-ABR to always translate";
81 leaf translate-candidate {
85 "NSSA-ABR for translate election";
88 leaf translate-never {
92 "NSSA-ABR to never translate";
97 grouping range-grouping {
102 "A list of range objects";
104 type inet:ipv4-prefix;
112 "Advertise this range";
119 "Do not advertise this range";
127 "Metric for this range";
131 type inet:ipv4-prefix;
133 "Network prefix to be announced instead of range";
139 grouping stub-grouping {
141 presence "Present when area is stub";
146 "Do not inject inter-area routes into stub";
151 grouping shortcut-grouping {
157 "Default shortcutting behavior";
163 "Disable shortcutting through the area";
169 "Enable shortcutting through the area";
174 grouping authentication-group {
175 container authentication {
176 presence "Enable authentication.";
178 "Enable authentication on this virtual link.";
179 leaf message-digest {
182 "Use message-digest authentication.";
188 "Use null authentication.";
192 list message-digest-key {
203 "The OSPF password.";
207 leaf authentication-key {
210 "The OSPF password.";
214 grouping virtual-link-group {
216 key "neighbor area-id";
218 "Virtual link parameters.";
220 type inet:ipv4-address;
222 "Router ID of the remote ABR.";
230 uses authentication-group;
237 "Interval time after which a neighbor is declared down.";
240 leaf hello-interval {
246 "Time between HELLO packets.";
249 leaf retransmit-interval {
255 "Time between retransmitting lost link state advertisements.";
258 leaf transmit-delay {
264 "Link state transmit delay.";
270 grouping area-groupings {
275 "A list of area objects";
280 container authentication {
281 presence "Enable authentication";
282 leaf message-digest {
285 "Use message-digest authentication";
294 "Advertised default summary cost";
298 type access-list-ref;
300 "Filter for networks announced to other areas.";
304 type access-list-ref;
306 "Filter for networks from other areas announced to the specified one.";
309 container filter-list {
313 "Filter networks between OSPF areas.";
331 uses shortcut-grouping;
333 uses virtual-link-group;
338 /* router ospf attributes */
339 grouping route-ospf-leaf-attributes {
340 leaf auto-cost-reference-bandwidth {
346 "The reference bandwidth in terms of Mbits per second.";
353 "ARP for neighbor table entry.";
356 leaf capability-opaque {
363 leaf compatible-rfc1583 {
366 "Compatible with RFC 1583.";
369 leaf default-metric {
374 "Metric of redistributed routes.";
377 leaf write-multiplier {
382 "Maximum number of interfaces serviced per write.";
385 container router-info {
391 "Enable the Router Information functionality with AS flooding scope.";
398 "Enable the Router Information functionality with Area flooding scope.";
405 grouping metric-common-group {
411 "OSPF default metric.";
424 "Metric type (1/2).";
428 type frr-route-map:route-map-ref;
430 "Route map reference.";
434 grouping default-info-group {
435 container default-information {
439 "Advertise a default route";
445 "Always advertise default route.";
448 uses metric-common-group;
452 grouping redistribute-group {
456 type frr-route-types:frr-route-types-v4;
461 uses metric-common-group;
465 grouping distance-group {
481 "Distance for external routes.";
489 "Distance for inter-area routes.";
497 "Distance for intra-area routes.";
503 grouping distribute-list-group {
504 container distribute-list {
510 "Filter networks in routing updates.";
514 type frr-route-types:frr-route-types-v4;
522 grouping max-metric-group {
523 container max-metric {
524 container router-lsa {
526 "Advertise own Router-LSA with infinite distance (stub router).";
527 leaf administrative {
530 "Administratively applied, for an indefinite period.";
538 "Advertise stub-router prior to full shutdown of OSPF.";
546 "Automatically advertise stub Router-LSA on startup of OSPF.";
552 grouping mpls-te-group {
557 "Enable the MPLS-TE functionality.";
560 leaf router-address {
561 type inet:ipv4-address;
563 "Stable IP address of the advertising router.";
570 "AS native mode self originate INTER-AS LSA with Type 11 (as flooding scope).";
576 "AREA native mode self originate INTER-AS LSA with Type 10 (area flooding scope).";
582 grouping ospf-group {
589 "Alternative ABR, Cisco implementation.";
594 "Alternative ABR, IBM implementation.";
604 "Standard behavior (RFC2328).";
612 "Enable the Opaque-LSA capability (RFC2370)";
615 leaf rfc1583compatibility {
618 "Enable the RFC 1583 compatibility flag.";
622 type inet:ipv4-address;
624 "Router-id for the OSPF process.";
627 leaf write-multiplier {
637 grouping timer-group {
639 leaf refresh-interval {
645 "The maximum time between distinct originations of any particular
646 LSA, value in units seconds.";
649 leaf lsa-min-arrival {
653 units "milliseconds";
655 "Minimum delay in receiving new version of an LSA.";
663 units "milliseconds";
665 "LSA delay between transmissions.";
672 units "milliseconds";
674 "Delay from first change received till SPF calculation.";
680 grouping segment-routing-group {
681 container segment-routing {
682 container global-block {
684 "Segment Routing Global Block label range.";
686 must "../upper-bound > .";
694 must ". > ../lower-bound";
704 "Local blocks to be advertised.";
706 must "../upper-bound > .";
710 "Lower value in the label range.";
713 must ". > ../lower-bound";
717 "Upper value in the label range.";
726 "Maximum Stack Depth for this router.";
732 "Enable Segment Routing.";
740 "SID index for this prefix.";
744 type inet:ipv4-prefix;
749 leaf last-hop-behavior {
751 enum "explicit-null" {
754 "Use explicit-null for the SID.";
759 "Do not use Penultimate Hop Popping (PHP)
765 "Use PHP for the SID.";
770 "Configure last hop behavior.";
776 grouping ospf-list-group {
782 type inet:ipv4-address;
784 "Neighbor IP address.";
790 "Neighbor Priority.";
799 "Dead Neighbor Polling interval.";
806 "Enable routing on list of IP network.";
808 type inet:ipv4-prefix;
810 "Prefix on which routing needs to be enabled.";
816 "Area ID for this network.";
820 list passive-interface {
823 "Suppress routing updates on list interface.";
825 type frr-interface:interface-ref;
827 "Suppress routing updates on an interface.";
831 type inet:ipv4-address;
833 "Interface address.";
838 grouping interface-ospf-attribute-group {
845 uses authentication-group;
855 container dead-interval {
864 leaf hello-multiplier {
872 leaf hello-interval {
878 "Time between HELLO packets.";
881 leaf retransmit-interval {
887 "Time between retransmitting lost link state advertisements.";
890 leaf transmit-delay {
896 "Link state transmit delay.";
902 "Disable MTU mismatch detection on this interface.";
912 grouping interface-ospf-group {
933 enum "non-broadcast" {
936 enum "point-to-multipoint" {
939 enum "point-to-point" {
945 uses interface-ospf-attribute-group;
947 list interface-address {
950 type inet:ipv4-address;
952 "Address of interface";
955 uses interface-ospf-attribute-group;
960 augment "/frr-rt:routing/frr-rt:control-plane-protocols/frr-rt:control-plane-protocol" {
962 when "../frr-rt:type = 'frr-ospfd:ospf'" {
964 "This container is only valid for the 'OSPF' routing
968 uses route-ospf-leaf-attributes;
970 uses default-info-group;
972 uses redistribute-group;
976 uses distribute-list-group;
978 uses max-metric-group;
986 uses segment-routing-group;
988 uses ospf-list-group;
995 * Per-interface configuration data
997 augment "/frr-interface:lib/frr-interface:interface" {
1000 "OSPF interface parameters.";
1001 uses interface-ospf-group;