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

Fix issue DAN-169 #11

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ Depends: ${misc:Depends}, ${yang:Depends}
Description: ISIS operational YANG module
The YANG module package for vyatta-op-frr-isis-v1-yang


Package: vyatta-protocols-frr-isis-v1-yang
Architecture: all
Depends:frr,
Expand Down Expand Up @@ -248,3 +247,14 @@ Depends:
${yang:Depends}
Description: FRR next hop parameters for routing instances YANG package
The YANG module package for vyatta-protocols-frr-next-hop-routing-instance-v1

Package: vyatta-protocols-frr-link-params-v1-yang
Architecture: all
Depends:frr,
vyatta-cfg (>= 0.18.56),vyatta-frr-vci,
vyatta-protocols-frr (>= ${source:Version}),
${misc:Depends},
${yang:Depends}
Conflicts: vyatta-protocols-link-params-v1-yang
Description: FRR LINK-PARAMS yang module package
The YANG module package for vyatta-protocols-frr-link-params-v1
1 change: 1 addition & 0 deletions debian/vyatta-frr-vci.component
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Modules=vyatta-protocols-frr-bgp-v1, \
vyatta-protocols-frr-ldp-v1, \
vyatta-protocols-frr-ospf-v1, \
vyatta-protocols-frr-isis-v1, \
vyatta-protocols-frr-link-params-v1, \
vyatta-protocols-frr-ospf-routing-instance-v1, \
vyatta-protocols-frr-switch-vif-ospf-v1, \
vyatta-protocols-frr-ospfv3-v1, \
Expand Down
1 change: 1 addition & 0 deletions debian/vyatta-protocols-frr-link-params-v1-yang.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yang/vyatta-protocols-frr-link-params-v1.yang usr/share/configd/yang/
16 changes: 16 additions & 0 deletions scripts/frr/configs/commands/zebra.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"/interfaces/@element/link-params/@enter": "link-params",
"/interfaces/@element/link-params/@exit": "exit-link-params",
"/interfaces/@element/link-params/enable": "enable",
"/interfaces/@element/link-params/admin-grp": "admin-grp {/@text}",
"/interfaces/@element/link-params/ava-bw": "ava-bw {/@text}",
"/interfaces/@element/link-params/delay": "delay {/@text}",
"/interfaces/@element/link-params/delay-variation": "delay-variation {/@text}",
"/interfaces/@element/link-params/max-bw": "max-bw {/@text}",
"/interfaces/@element/link-params/max-rsv-bw": "max-rsv-bw {/@text}",
"/interfaces/@element/link-params/metric": "metric {/@text}",
"/interfaces/@element/link-params/packet-loss": "packet-loss {/@text}",
"/interfaces/@element/link-params/res-bw": "res-bw {/@text}",
"/interfaces/@element/link-params/unrsv-bw": "unrsv-bw {/@text}",
"/interfaces/@element/link-params/use-bw": "use-bw {/@text}"
}
229 changes: 229 additions & 0 deletions yang/vyatta-protocols-frr-link-params-v1.yang
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
module vyatta-protocols-frr-link-params-v1 {
namespace "urn:vyatta.com:mgmt:vyatta-protocols-frr-link-params:1";
prefix vyatta-protocols-frr-link-params-v1;

import vyatta-types-v1 {
prefix types;
}
import configd-v1 {
prefix configd;
}
import vyatta-interfaces-v1 {
prefix if;
}
import vyatta-interfaces-dataplane-v1 {
prefix interfaces-dataplane;
}
import vyatta-interfaces-loopback-v1 {
prefix interfaces-loopback;
}
import vyatta-interfaces-switch-v1 {
prefix interfaces-switch;
}

organization "Niral Networks Private Limited";
contact
"Niral Networks
Postal: Sigma Soft Tech Park, Whitefield Main Road,
Bengaluru, India 560066
Web: www.niralnetworks.com";

description
"Copyright (c) 2019-2021, Niral Networks Intellectual Property.
All rights reserved.

Redistribution and use in source and binary forms, with or
without modification, are permitted provided that the following
conditions are met:

1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

SPDX-License-Identifier: BSD-3-Clause
The YANG module package for vyatta-protocols-frr-link-params-v1";

revision 2021-03-02 {
description
"Initial revision";
}

grouping link-params {
container link-params {
configd:help "Configure interface link parameters";
leaf admin-group {
type string {
pattern "0[Xx][a-fA-F0-9]+";
}
configd:help "Administrative group membership";
description "Administrative group membership";
}
leaf available-bandwidth {
type uint64;
units "Bytes/second";
configd:help "Unidirectional Available Bandwidth (Bytes/second)";
description "Unidirectional Available Bandwidth. This field carries the available bandwidth on a
link, forwarding adjacency, or bundled link. For a link or forwarding adjacency, available
bandwidth is defined to be residual bandwidth minus the measured bandwidth used for the actual
forwarding of non-RSVP-TE LSP packets. For a bundled link, available bandwidth is defined to be
the sum of the component link available bandwidths minus the measured bandwidth used for the actual
forwarding of non-RSVP-TE Label Switched Paths packets [draft-ietf-isis-te-metrics-extension-03].";
must "../max-bandwidth" {
error-message "Maximum Bandwidth must be set";
}
must "../available-bandwidth <= ../max-bandwidth" {
error-message "Available Bandwidth cannot be greater than Maximum Bandwidth";
}
}
leaf delay {
type uint32 {
range "0..16777215";
Copy link

Choose a reason for hiding this comment

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

nanoseconds? Years?

Copy link
Author

Choose a reason for hiding this comment

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

The units have already been added in the previous commit i.e (micro-second).

}
units "micro-second";
configd:help "Unidirectional Average Link Delay (micro-second)";
description "Unidirectional Average Link Delay";
}
leaf delay-variation {
type uint32 {
range "0..16777215";
Copy link

Choose a reason for hiding this comment

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

Units?

Copy link
Author

Choose a reason for hiding this comment

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

The units have already been added in the previous commit i.e (micro-second).

}
units "micro-second";
configd:help "Unidirectional Link Delay Variation (micro-second)";
description "Unidirectional Link Delay Variation";
}
leaf max-bandwidth {
type uint64;
units "Bytes/second";
configd:help "Maximum bandwidth that can be used (Bytes/second)";
description "Maximum bandwidth that can be used";
}
leaf max-reserved-bandwidth {
Copy link

Choose a reason for hiding this comment

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

Can this exceed max-bandwidth? If not then perhaps a must statement enforcing this would be wise.

Copy link

Choose a reason for hiding this comment

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

How do these 2 relate to available-bandwidth, residual, unreserved and utilised?

Copy link
Author

Choose a reason for hiding this comment

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

  1. I've enforced must statement in each of the bandwidths. Before configuring other bandwidths the max-bandwidth has to be set in order to compare the values i.e (max-bandwidth >= ).
  2. I have described the bandwidth-related fields following draft-ietf-isis-te-metrics-extension-03.

Copy link

Choose a reason for hiding this comment

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

What determines the max bandwidth that can be used? Is this an inherent property of the link, or, like ADSL, depends on how well the link is working at a given time?

Copy link
Author

Choose a reason for hiding this comment

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

I am not sure about it. In frr the max-bandwidth is set upon setting link-param however in Danos CLI user can provide max-bandwidth according to the need.

Copy link

Choose a reason for hiding this comment

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

How can you code a feature when you don't know what it means???

type uint64;
units "Bytes/second";
configd:help "Maximum bandwidth that may be reserved (Bytes/second)";
description "Maximum bandwidth that may be reserved. It is the bandwidth that can
theoretically be reserved";
must "../max-bandwidth" {
error-message "Maximum Bandwidth must be set";
}
must "../max-reserved-bandwidth <= ../max-bandwidth" {
error-message "Maximum Reservable Bandwidth cannot be greater than Maximum Bandwidth";
}
}
leaf mpls-te-metric {
type uint32 {
range "1..max";
}
configd:help "Link metric for MPLS-TE purpose";
description "Link metric for MPLS-TE purpose";
}
leaf neighbor {
type types:ipv4-address;
configd:help "Configure remote ASBR information (Neighbor IP address and AS number)";
description "Configure remote ASBR information (Neighbor IP address and AS number)";
}
leaf packet-loss {
type uint32 {
range 0..100;
}
units "Percentage";
configd:help "Unidirectional Link Packet Loss (Percentage)";
description "Unidirectional Link Packet Loss (Percentage)";
}
leaf residual-bandwidth {
type uint64;
units "Bytes/second";
configd:help "Unidirectional Residual Bandwidth (Bytes/second)";
description "Unidirectional Residual Bandwidth. For a link or forwarding adjacency, residual
bandwidth is defined to be Maximum Bandwidth [RFC3630] minus the bandwidth currently allocated
to RSVP-TE LSPs. For a bundled link, residual bandwidth is defined to be the sum of the
Copy link

Choose a reason for hiding this comment

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

Where is the bandwidth allocated to RSVP-TE LSPs defined? What if there is a mismatch?

Copy link
Author

Choose a reason for hiding this comment

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

I have found this description in draft-ietf-isis-te-metrics-extension-03. Do I have to define bandwidth allocated to RSVP-TE LSP too in this DAN-169 fix?

Copy link

Choose a reason for hiding this comment

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

You aren't convincing me that you fully understand what all these fields mean, nor how they relate to each other. I am not convinced that this data model is complete / consistent, and until I am persuaded that it is, I cannot approve.

component link residual bandwidths [draft-ietf-isis-te-metrics-extension-03.txt].";
must "../max-bandwidth" {
error-message "Maximum Bandwidth must be set";
}
must "../residual-bandwidth <= ../max-bandwidth" {
error-message "Residual Bandwidth cannot be greater than Maximum Bandwidth";
}
}
container unreserved-bandwidth {
Copy link

Choose a reason for hiding this comment

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

If max-bandwidth is X, it seems you can have X unreserved bandwidth at each of the 8 priority levels, making 8X?

Copy link
Author

Choose a reason for hiding this comment

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

image
In each of the priority levels, the bandwidth can be set equal to max-bandwidth. The same way has been implemented in FRR.

Copy link

Choose a reason for hiding this comment

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

That's as maybe. I'd like you to explain to me why this is correct, rather than just saying it's done this way somewhere else.

Copy link
Author

Choose a reason for hiding this comment

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

The [RFC3630] has been followed here wherein section 2.5.8 it stated about Unreserved Bandwidth as follows:

The Unreserved Bandwidth sub-TLV specifies the amount of bandwidth not yet reserved at each of the eight priority levels in IEEE floating-point format. The values correspond to the bandwidth that can be reserved with a setup priority of 0 through 7, arranged in increasing order with priority 0 occurring at the start of the sub-TLV, and priority 7 at the end of the sub-TLV. The initial values (before any bandwidth is reserved) are all set to the Maximum Reservable Bandwidth. Each value will be less than or equal to the Maximum Reservable Bandwidth. The units are bytes per second.
The Unreserved Bandwidth sub-TLV is TLV type 8, and is 32 octets in length.

Copy link

Choose a reason for hiding this comment

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

I'm still not convinced this is config as opposed to state information.

Copy link

Choose a reason for hiding this comment

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

or at least information that should be dynamically derived not set in stone in the config

configd:help "Unreserved bandwidth at each priority level";
description "Unreserved bandwidth at each priority level. Unreserved Bandwidth [RFC3630], is
subtracted from the Maximum Reservable Bandwidth (the bandwidth that can theoretically
Copy link

Choose a reason for hiding this comment

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

bad alignment

Copy link
Author

Choose a reason for hiding this comment

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

I've aligned the description.

be reserved) [RFC3630] and provides per-QoS-class [draft-ietf-isis-te-metrics-extension-03]";
list priority {
configd:help "Priority";
description "8 sets of priority levels";
key "tagnode";
leaf tagnode {
type uint32 {
range "0..7";
}
configd:help "Priority";
description "8 sets of priority levels";
}
leaf bandwidth {
type uint64;
units "Bytes/second";
configd:help "Bandwidth (Bytes/second)";
description "Bandwidth (Bytes/second) for each priority levels";
must "../../../max-bandwidth" {
Copy link

Choose a reason for hiding this comment

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

bad alignment

Copy link
Author

Choose a reason for hiding this comment

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

It has been aligned

Copy link

Choose a reason for hiding this comment

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

Still looks to be 2 spaces too far to the left ...

Copy link
Author

Choose a reason for hiding this comment

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

The changes have been reflected in the last commit

error-message "Maximum Bandwidth must be set";
}
must "../bandwidth <= ../../../max-bandwidth" {
error-message "Unreserved Bandwidth cannot be greater than Maximum Bandwidth";
}
}
}
}
leaf utilised-bandwidth {
Copy link

Choose a reason for hiding this comment

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

Is this config or state? Please provide a better description.

Copy link
Author

Choose a reason for hiding this comment

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

Fuller description has been provided for utilised bandwidth following draft-ietf-isis-te-metrics-extension-03.

Copy link

Choose a reason for hiding this comment

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

This still sounds more like state than config - 'as measured in the router' is state not config AFAICT.

Copy link
Author

@akashniral akashniral May 28, 2021

Choose a reason for hiding this comment

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

This similar command is there in vtysh shell where I can use this to adjust utilized-bandwidth in Bytes/second and was req in Danos CLI and in the draft-ietf-isis-te-metrics-extension-03 the above description is given of the same therefore I've provided that description.

type uint64;
units "Bytes/second";
configd:help "Unidirectional Utilised Bandwidth (Bytes/second)";
description "Unidirectional Utilised Bandwidth. This field carries the bandwidth utilization
on a link, forwarding adjacency, or bundled link. For a link or forwarding adjacency, bandwidth
utilization represent the actual utilization of the link (i.e.: as measured in the router). For a
bundled link, bandwidth utilization is defined to be the sum of the component link bandwidth utilization
[draft-ietf-isis-te-metrics-extension-03.txt].";
must "../max-bandwidth" {
error-message "Maximum Bandwidth must be set";
}
must "../utilised-bandwidth <= ../max-bandwidth" {
error-message "Utilised Bandwidth cannot be greater than Maximum Bandwidth";
}

}
}
}

augment /if:interfaces/interfaces-dataplane:dataplane {
uses link-params;
}
augment /if:interfaces/interfaces-dataplane:dataplane/interfaces-dataplane:vif/interfaces-dataplane:ip {
uses link-params;
}
augment /if:interfaces/interfaces-loopback:loopback {
uses link-params;
}
augment /if:interfaces/interfaces-switch:switch/interfaces-switch:vif {
uses link-params;
}
}