Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addition of BFD sessions subtree under interface in openconfig-bfd.yang #1137

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Pull-eckermann
Copy link

@Pull-eckermann Pull-eckermann commented Jun 20, 2024

Creation of a BFD single-hop session subtree at interface level, so that BFD sessions can be created besides routing protocols, as stated in RFC-9127.

Change Scope

  • Creation of BFD sessions subtree at interface level, witch allows the configuration of single-hop BFD sessions under the specified interface with well specified local-address and remote-address , outside the multiple BFD clients scope. Multiple BFD sessions can be created in the same interface.
  • This change is backwards compatible.

Platform Implementations

  • IPInfusion OcNOS implementation: OcNOS BFD yang model ipi-bfd-interface.yang. Please refer to the bfd-interface-sessions-top grouping. Also, CLI configuration example can be faund in the BFD Configuration Guide
  • RFC 9127 implementation: The RFC 9127 specifies at section 2.6 the yang.tree of the subtree for single-hop BFD sessions configuration that allows the creation of the sessions attached to a interface, represented as a list key. This was a inspiration for this pull-request. Also the actual OpenCOnfig model does not allow configuration of BFD sessions outside the multiple BFD clients scope, but this RFC states that it should be possible.

Creation of a BFD single-hop session subtree at interface level, so that BFD sessions can be created besides routing protocols, as stated in RFC-9127 (https://datatracker.ietf.org/doc/rfc9127/)
@Pull-eckermann Pull-eckermann requested a review from a team as a code owner June 20, 2024 20:16
Fix typo "single-hope" to "single-hop"
Copy link
Contributor

@robshakir robshakir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the well-formed submission. Generally, looks reasonable to me, assuming I understand the context (question below).

There's one implementation listed here -- are there others that allow static non-protocol-related single hop sessions to be configured?

We should probably clarify what happens if both the per-protocol BFD enabled leaves are used as well as this configuration.

release/models/bfd/openconfig-bfd.yang Outdated Show resolved Hide resolved
release/models/bfd/openconfig-bfd.yang Outdated Show resolved Hide resolved
release/models/bfd/openconfig-bfd.yang Outdated Show resolved Hide resolved
release/models/bfd/openconfig-bfd.yang Outdated Show resolved Hide resolved
release/models/bfd/openconfig-bfd.yang Outdated Show resolved Hide resolved
release/models/bfd/openconfig-bfd.yang Outdated Show resolved Hide resolved
release/models/bfd/openconfig-bfd.yang Outdated Show resolved Hide resolved
Update description of contatiner interface/sessions to specify that these are statically configured single-hop sessions.
Also changed session/config/enabled leaf to session/config/admin-down to be more especific.
@Pull-eckermann
Copy link
Author

Thanks for the well-formed submission. Generally, looks reasonable to me, assuming I understand the context (question below).

There's one implementation listed here -- are there others that allow static non-protocol-related single hop sessions to be configured?

We should probably clarify what happens if both the per-protocol BFD enabled leaves are used as well as this configuration.

Q1: yes, after some search I've found a CLI configuration example for Huawei system at this link in section Configuring Single-Hop BFD.
Also, in the huawei-bfd.yang file we can see that this type of configuration is allowed in the static and auto-generated scenarios. THis can be find in "choice multicast-or-unicast-ip" for the unicast case, or in the "choice auto-session-link-type" for ip case. This configuration allows the creation of a static single-hop specifying the interface, source and destination address.

Q2: Probably system checks for two concurrent sessions if source and dest addresses are the same and if so, prioritize the session that was firstly established.

@wenovus
Copy link
Contributor

wenovus commented Jun 25, 2024

/gcbrun

@OpenConfigBot
Copy link

OpenConfigBot commented Jun 25, 2024

No major YANG version changes in commit 72c371e

Fix issues in openconfig-bfd.yang sessions subtree under interfaces and add revision date.
Update reference number for revision date
@wenovus
Copy link
Contributor

wenovus commented Jun 28, 2024

/gcbrun

Copy link
Contributor

@robshakir robshakir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of small changes, and then LGTM.

Leaving to @dplore to ensure last-call process.

@@ -26,7 +26,14 @@ module openconfig-bfd {
"An OpenConfig model of Bi-Directional Forwarding Detection (BFD)
configuration and operational state.";

oc-ext:openconfig-version "0.3.0";
oc-ext:openconfig-version "0.3.1";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're adding a feature here, let's make this be a minor release - i.e., this should be 0.4.0.

the single-hop BFD session specified.";
}

leaf admin-down {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've generally used enabled as this leaf's name -- and have zero called admin-down, so let's go for some consistency here and use enabled.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was also raised some time ago whether or not this should have been corrected for those that veered but current stats look like:

$ find . -name "*.yang" | xargs grep -E "leaf enable(d?) {" | awk '{print $3}' | sort | uniq -c
     15 enable
     51 enabled

}
description
"A reference to the remote-address for the BFD single-hop
session";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
session";
session.";

}
description
"A reference to the local-address for the BFD single-hop
session";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
session";
session.";

@LimeHat
Copy link

LimeHat commented Jun 29, 2024

@Pull-eckermann could you please elaborate on the original problem statement?

Creation of a BFD single-hop session subtree at interface level, so that BFD sessions can be created besides routing protocols, as stated in RFC-9127.

Creation of BFD sessions subtree at interface level, witch allows the configuration of single-hop BFD sessions under the specified interface with well specified local-address and remote-address ,

I would disagree with that interpretation of the RFC9127 and BFD protocol behavior for a number of reasons.

Firstly, the protocol behavior is defined in RFCs 5880-5882.

RFC5880, section 3.1:

Addressing and Session Establishment

   A BFD session is established based on the needs of the application
   that will be making use of it.  It is up to the application to
   determine the need for BFD, and the addresses to use -- there is no
   discovery mechanism in BFD. 

RFC5881 tells us that the session must be associated with a protocol:

   In this application, there will be only a single BFD session between
   two systems over a given interface (logical or physical) for a
   particular protocol.  The BFD session must be bound to this
   interface.  As such, both sides of a session MUST take the "Active"
   role (sending initial BFD Control packets with a zero value of Your
   Discriminator), and any BFD packet from the remote machine with a
   zero value of Your Discriminator MUST be associated with the session
   bound to the remote system, interface, and protocol.

RFC5882 tells us that the protocol is expected to bootstrap the session:

 The service interface with BFD is straightforward.  The application
   supplies session parameters (neighbor address, time parameters,
   protocol options), and BFD provides the session state, of which the
   most interesting transitions are to and from the Up state.  The
   application is expected to bootstrap the BFD session, as BFD has no
   discovery mechanism.

In addition,

  1. RFC9127 talks about the configuration of source & destination addresses primarily in the context of multihop and microbfd sessions (see sections 2.1.1-2.1.3)
  2. Section 2.1 of RFC9127 states that these configuration parameters are designed so that BFD clients (such as routing protocols) can program the BFD module via the API call using the model. This is not typically used in OC.

Also, probably you want to use RFC9314 instead of 9127 as a reference.

To summarize, while technically the rfc9127 yang model does not prevent the creation of the config as you describe, I don't believe it is designed for the purpose you stated.
Is there any other normative reference that allows the creation of independent BFD sessions that are not tied to any protocol or function the way you describe it?

To me, it seems that you're trying to "standardize" a non-standard implementation that requires a fixed provisioning of the destination IP via this pull request.

I disagree with the proposal in its current form.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

6 participants