From 1976bdf700b1d2fbd5c8b36699ec916e7fec098c Mon Sep 17 00:00:00 2001 From: Caitlin Choate <114622132+cchoate54@users.noreply.github.com> Date: Thu, 26 Jan 2023 15:06:05 -0800 Subject: [PATCH 01/12] Create frr-isis-sonic-config-support-hld.md --- doc/isis/frr-isis-sonic-config-support-hld.md | 174 ++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 doc/isis/frr-isis-sonic-config-support-hld.md diff --git a/doc/isis/frr-isis-sonic-config-support-hld.md b/doc/isis/frr-isis-sonic-config-support-hld.md new file mode 100644 index 0000000000..8dfc3fe774 --- /dev/null +++ b/doc/isis/frr-isis-sonic-config-support-hld.md @@ -0,0 +1,174 @@ +# FRR-ISIS SONIC CONFIG SUPPORT # + +## Table of Content + +- [FRR-ISIS SONIC CONFIG SUPPORT](#frr-isis-sonic-config-supportt) + - [Table of Content](#table-of-content) + - [Revision](#revision) + - [Scope](#scope) + - [Definitions/Abbreviations](#definitionsabbreviations) + - [Overview](#overview) + - [Requirements](#requirements) + - [Functional and Configuration Requirements](#functional-and-configuration-requirements) + - [Exemptions](#exemptions) + - [Architecture Design](#architecture-design) + - [High-Level Design](#high-level-design) + - [Design Overview](#design-overview) + - [Change Overview](#change-overview) + - [Container](#container) + - [SAI API](#sai-api) + - [Configuration and management](#configuration-and-management) + - [Manifest](#manifest) + - [CLI/YANG Model Enhancements](#cliyang-model-enhancements) + - [Config DB Enhancements](#config-db-enhancements) + - [Config DB Yang Model Changes](#config-db-yang-model-changes) + - [FRR Template Changes](#frr-template-changes) + - [Warmboot and Fastboot Design Impact](#warmboot-and-fastboot-design-impact) + - [Restrictions/Limitations](#restrictionslimitations) + - [Testing Requirements/Design](#testing-requirementsdesign) + - [Unit Test cases](#unit-test-cases) + - [System Test cases](#system-test-cases) + - [Open/Action items](#openaction-items) + +### Revision +| Rev | Date | Author | Change Description | +| :--- | :-------------- | :------ | :---------------- | +| 0.1 | January-11-2022 | C Choate | Initial version | + +### Scope + +This document describes the scope of updates needed to support adding SONiC config support for FRR-ISIS in SONiC. + +### Definitions/Abbreviations + +Table 1: Abbreviations + +| Abbreviation | Description | +| :---------- | :------------------------------------------------ | +| BGP | Border Gateway Protocol | +| BGPCFGD | Template based legacy config daemon | +| FRR | Free Range Routing Stack | +| FRRCFGD | FRR config daemon fully based on config-DB events | +| ISIS | Intermediate System to Intermediate System | + +### Overview + +This document provides information about the initial support for FRR-ISIS SONiC config support in the SONiC infrastructure. + +This is an addition to previous feature work to support FRR-BGP. Details on the initial feature design can be found at [SONiC FRR-BGP Extended Unified Configuration Management Framework](https://github.com/sonic-net/SONiC/blob/master/doc/mgmt/SONiC_Design_Doc_Unified_FRR_Mgmt_Interface.md) + +### Requirements + +#### Functional and Configuration Requirements + + 1. Extend config and management in SONiC for FRR-ISIS. + 2. Ability to configre FRR-ISIS based on configurations from config DB with frrcfgd (sonic-buildimage/src/sonic-frr-mgmt-framework) with the field frr_mgmt_framework_config set to "true" in the DEVICE_METADATA table. + 3. Retain access to FRR UI (vtysh) for managing FRR configs + 4. Configure FRR-ISIS based on configurations from config DB based on defined template files. + 5. Upon an FRR container reboot, ISIS template files will restore FRR-ISIS configs read from config DB. + 6. Provide support for config and management of FRR-ISIS features used in SONIC with new ISIS YANG models. + +#### Exemptions +SONiC CLI support for ISIS show commands are not yet included. + +### Architecture Design + +There are no changes to the existing SONiC architecture. This new feature enhances existing code to include configuration support for the isisd daemon within the FRR container. + +### High-Level Design + +#### Design Overview + +This feature will extend functionality implemented in [SONiC FRR-BGP Extended Unified Configuration Management Framework](https://github.com/sonic-net/SONiC/blob/master/doc/mgmt/SONiC_Design_Doc_Unified_FRR_Mgmt_Interface.md) to support additional SONiC FRR-ISIS features. + +The Management framework will convert the YANG-based config data into requests that will write the configs into Redis DB. Redis DB events will trigger frrcfgd when the field frr_mgmt_framework_config set to "true" in the DEVICE_METADATA table, and then frrcfgd will configure FRR-ISIS using FRR CLI commands. + +#### Change Overview + +This enhancement will support FRR-ISIS features used in SONiC and all changes will reside in the sonic-buildimage repository. Changes include: + +- SONiC FRR-ISIS YANG models and YANG validation tests + - /src/sonic-yang-models +- FRR-ISIS config template files and isisd enabled by default in the FRR container + - /dockers/docker-fpm-frr +- Enable ISIS trap messages + - /files/image_config/copp +- Added support for ISIS tables in frrcfgd and extended frrcfgd unit tests for FRR-ISIS configs + - /src/sonic-frr-mgmt-framework + +#### Container + +There will be changes in following containers, +- Extend frrcfgd support for FRR-ISIS + - sonic-mgmt-framework +- Enable the isisd daemon by default + - bgp + +### SAI API + +N/A - software feature + +### Configuration and management + +#### Manifest + +N/A + +#### CLI/YANG Model Enhancements + +There are no CLI changes made in this feature thus far. + +#### Config DB Enhancements + +Following section describes the changes to DB. + +Added new configuration tables specific to FRR_ISIS features: + +- ISIS_GLOBAL + - ISIS router globally applicable configurations +- ISIS_LEVEL + - ISIS router level specific configurations +- ISIS_INTERFACE + - ISIS router interface specific configurations + +#### Config DB Yang Model Changes + +Detailed Yang model changes can be found at + +- isis-yang-hld + +#### FRR Template Changes + +A new FRR-ISIS template, "isisd.conf.j2" has been made to support the non-integrated config management feature and will be saved in "/etc/frr/isisd.conf" on an FRR container startup. The FRR template, "frr.conf.j2" has been updated to include FRR-ISIS template file "isisd.conf.j2" to support the unified config managemnt feature. + +### Warmboot and Fastboot Design Impact + +There are no changes made to warmboot/fastboot impacting features. + +### Restrictions/Limitations + +When deleting or adding configs that have dependencies built within the yang models, those dependencies must be maintained while adding or deleting configs. If those dependencies are not met, frrcfgd may have trouble deleting the configs properly. + +### Testing Requirements/Design + +#### Unit Test cases + +Extended unit test cases to cover FRR-ISIS config features + - Test frrcfgd changes + - /src/sonic-frr-mgmt-framework/tests/test_config.py +- Test new ISIS YANG model Validation + - /src/sonic-yang-models/tests/test_sonic_yang_models.py + - /src/sonic-yang-models/tests/yang_model_tests/test_yang_model.py + +#### System Test cases +Extensive system test cases to cover FRR-ISIS config features +- Verify every YANG config input matches the desired FRR config output for frrcfgd + and template based configuration methods +- Verify configs can be deleted by config table name and individual fields +- Verify configs persist in the FRR container post container reboot + +### Open/Action items + +Is there a way to better align the custom yang models designed for SONiC FRR-ISIS with Open Config ISIS models. Not all FRR-ISIS features are compatible with Open Configs' models ? + +Could the FRR container be renamed from 'bgp' to 'frr' ? From 232d52f9ec1850a73e96f6b29b90fe1225f4222c Mon Sep 17 00:00:00 2001 From: Caitlin Choate <114622132+cchoate54@users.noreply.github.com> Date: Thu, 26 Jan 2023 15:07:10 -0800 Subject: [PATCH 02/12] Create frr-isis-sonic-yang-model-hld.md --- doc/isis/frr-isis-sonic-yang-model-hld.md | 639 ++++++++++++++++++++++ 1 file changed, 639 insertions(+) create mode 100644 doc/isis/frr-isis-sonic-yang-model-hld.md diff --git a/doc/isis/frr-isis-sonic-yang-model-hld.md b/doc/isis/frr-isis-sonic-yang-model-hld.md new file mode 100644 index 0000000000..ff1494dc95 --- /dev/null +++ b/doc/isis/frr-isis-sonic-yang-model-hld.md @@ -0,0 +1,639 @@ +# ISIS Yang Model for SONiC High Level Design Document # + +## Table of Contents +- [ISIS Yang Model for SONiC High Level Design Document](#isis-yang-model-for-sonic-high-level-design-document) + - [Table of Content](#table-of-content) + - [Revision](#revision) + - [Scope](#scope) + - [Definitions/Abbreviations](#definitionsabbreviations) + - [Overview](#overview) + - [High-Level Design](#high-level-design) + - [CONFIG DB](#config-db) + - [Global Config](#global-config) + - [Level Config](#level-config) + - [Interface Config](#interface-config) + - [YANG Model Enhancements](#yang-model-enhancements) + - [SONiC ISIS Global](#sonic-isis-global) + - [SONiC ISIS Level](#sonic-isis-level) + - [SONiC ISIS Interface](#sonic-isis-interface) + - [SONiC ISIS Defined Types](#sonic-isis-defined-types) + - [Testing Requirements/Design](#testing-requirementsdesign) + - [Open/Action items - if any](#openaction-items---if-any) + +### Revision +| Rev | Date | Author | Change Description | +| :--- | :--------- | :------ | :---------------- | +| 0.1 | Jan-11-2022 | C Choate | Initial version | + +### Scope + +This document provides general information about the initial design for the ISIS YANG model in the SONiC infrastructure. The focus of this initial support is to expand existing SONiC infrastructure for IPv4/IPv6 routing to include equivalent FRR-ISIS functionality. + +### Definitions/Abbreviations +| Abbreviation | Description | +| :---------- | :----------------------------------- | +| BFD | Bidirectional Forwarding Detection | +| CSNP | Complete Sequence Number PDU | +| ISIS | Intermediate System to Intermediate System | +| LSP | Label-Switched Path | +| MPLS | Multiprotocol Label Switching | +| MTU | Maximum Transmission Unit | +| PSNP | Partial Sequence Number PDU | +| SPF | Sender Policy Framework | +| SR | Segment Routing | + +### Overview +This document provides general information about the initial design for the ISIS YANG model in the SONiC infrastructure. + +### High-Level Design + +#### CONFIG DB + +##### Global Config +Global ISIS config options. + +``` +"ISIS_GLOBAL" + "instance" :{{string}} + "net" :{{net-address}} (OPTIONAL) + "level-capability" :{{"level-1"/"level-2"/"level-1-2"}} (OPTIONAL) + "dynamic-hostname" :{{boolean}} (OPTIONAL) + "attach-send" :{{boolean}} (OPTIONAL) + "attach-receive-ignore" :{{boolean}} (OPTIONAL) + "set-overload-bit" :{{boolean}} (OPTIONAL) + "lsp-mtu-size" :{{UINT16}} (OPTIONAL) + "spf-init-delay" :{{UINT16}} (OPTIONAL*) + "spf-short-delay" :{{UINT16}} (OPTIONAL*) + "spf-long-delay" :{{UINT16}} (OPTIONAL*) + "spf-hold-delay" :{{UINT16}} (OPTIONAL*) + "spf-time-to-learn" :{{UINT16}} (OPTIONAL*) + "log-adjacency-changes" :{{boolean}} (OPTIONAL) + +* If an SPF value is specified, all other global SPF values must also be specified + +ISIS_GLOBAL|{{instance}} +; Defines schema for global ISIS configuration attributes +key = ISIS_GLOBAL:instance ; Instance name/area tag +; field = value +net = net-address ; OSI NET address. Format: xx.xxxx.xxxx.xxxx.xx +level-capability = "level-1"/"level-2"/"level-1-2" ; ISIS level capability +dynamic-hostname = boolean ; Dynamic-hostname support. Default "true" +attach-send = boolean ; Send attached bits in LSP for inter-area traffic. Default "true" +attach-receive-ignore = boolean ; Attached bits recieved in LSP cause default route add. Default "false" +set-overload-bit = boolean ; Administratively enable the overload bit +lsp-mtu-size = UINT16 ; MTU of an LSP. Range 128..4352. Default 1487 +spf-init-delay = UINT16 ; Delay used while in QUIET state. Range 0..60000 in msec. +spf-short-delay = UINT16 ; Delay used while in SHORT_WAIT state. Range 0..60000 in msec. +spf-long-delay = UINT16 ; Delay used while in LONG_WAIT state. Range 0..60000 in msec. +spf-hold-delay = UINT16 ; Time with no received IGP events before considering IGP stable. + Range 0..60000 in msec. +spf-time-to-learn = UINT16 ; Maximum duration needed to learn all the events related to a single failure. + Range 0..60000 in msec. +log-adjacency-changes = boolean ; Log changes to the IS-IS adjacencies in this instance. Default "false" + +Tree view + +--rw ISIS_GLOBAL + | +--rw ISIS_GLOBAL_LIST* [instance] + | +--rw instance string + | +--rw net? net-address + | +--rw level-capability? level-capability + | +--rw dynamic-hostname? boolean + | +--rw attach-send? boolean + | +--rw attach-receive-ignore? boolean + | +--rw set-overload-bit? boolean + | +--rw lsp-mtu-size? UINT16 + | +--rw spf-init-delay uint16 + | +--rw spf-short-delay uint16 + | +--rw spf-long-delay uint16 + | +--rw spf-hold-down uint16 + | +--rw spf-time-to-learn uint16 + | +--rw log-adjacency-changes? boolean +``` + +##### Level Config +Level specific ISIS config options. + +``` +"ISIS_LEVEL" + "instance" :{{string}} + "level-number" :{{UINT8}} + "lsp-refresh-interval" :{{UINT16}} (OPTIONAL) + "lsp-maximum-lifetime" :{{UINT16}} (OPTIONAL) + "lsp-generation-interval" :{{UINT16}} (OPTIONAL) + "spf-minimum-interval" :{{UINT16}} (OPTIONAL) + +ISIS_LEVEL|{{instance|level-number}} +; Defines schema for ISIS level configuration attributes +key = ISIS_LEVEL:instance ; Instance name/area tag +key = ISIS_LEVEL:level-number ; Level number. ("level-1"/"level-2") +; field = value +lsp-refresh-interval = UINT16 ; LSP refresh interval. Default 900 in seconds +lsp-maximum-lifetime = UINT16 ; Maximum LSP lifetime. Range 350..65535. Default 1200 in seconds. Must be at least 300 seconds more than lsp-refresh-interval +lsp-generation-interval = UINT16 ; Minimum time allowed before LSP retransmissions. Range 1..120. Default 30 in seconds. Must be lower than lsp-refresh-interval +spf-minimum-interval = UINT16 ; Minimum time between consecutive SPFs. Range 1..120. Default 1 in seconds + +Tree view + +--rw ISIS_LEVEL + | +--rw ISIS_LEVEL_LIST* [instance level] + | +--rw instance string + | +--rw level-number level-number + | +--rw lsp-refresh-interval? uint16 + | +--rw lsp-maximum-lifetime? uint16 + | +--rw lsp-generation-interval? uint16 + | +--rw spf-minimum-interval? uint16 +``` + +##### Interface Config +Interface specific ISIS config options. + +``` +"ISIS_INTERFACE" + "instance" :{{string}} + "ifname" :{{string}} + "ipv4-routing" :{{{boolean}}} (OPTIONAL) + "ipv6-routing" :{{{boolean}}} (OPTIONAL) + "passive" :{{boolean}} (OPTIONAL) + "hello-padding" :{{{boolean}}} (OPTIONAL) + "network-type" :{{"UNKNOWN_NETWORK"/"BROADCAST_NETWORK"/"POINT_TO_POINT_NETWOR"/"LOOPBACK"}} (OPTIONAL) + "enable-bfd" :{{{boolean}}} (OPTIONAL) + "bfd-profile" :{{string}} (OPTIONAL) + "metric" :{{UINT32}} (OPTIONAL) + "csnp-interval" :{{{UINT16}}} (OPTIONAL) + "psnp-interval" :{{{UINT16}}} (OPTIONAL) + "hello-interval" :{{{UINT32}}} (OPTIONAL) + "hello-multiplier" :{{UINT16}} (OPTIONAL) + +ISIS_INTERFACE|{{instance|ifname}} +; Defines schema for ISIS interface configuration attributes +key = ISIS_INTERFACE:instance ; Instance name/area tag +key = ISIS_INTERFACE:ifname ; Interface name +; field = value +ipv4-routing = boolean ; Enable routing IPv4 traffic over this circuit +ipv6-routing = bolean ; Enable routing IPv6 traffic over this circuit +passive = bolean ; Advertise the interface in the ISIS topology, but don't allow it to form adjacencies. Default "false" +hello-padding = boolean ; Add padding to IS-IS hello PDUs +network-type = "UNKNOWN_NETWORK"/"BROADCAST_NETWORK"/"POINT_TO_POINT_NETWOR"/"LOOPBACK" +; ISIS circuit type +enable-bfd = boolean ; Monitor IS-IS peers on this circuit +bfd-profile = string ; Let BFD use a pre-configured profile +metric = UINT32 ; Metric value on a circuit for a given level. Range 0..16777215. Default 0 +csnp-interval = boolean ; Complete Sequence Number PDU (CSNP) generation interval. Range 1..600. Default 10 in seconds +psnp-interval = boolean ; Partial Sequence Number PDU (PSNP) generation interval. Range 1..120. Default 2 in seconds +hello-interval = UINT32 ; Hello interval between consecutive hello messages. Range 1..600. Default 3 in seconds +hello-multiplier = UINT16 ; Multiplier for the hello holding time. Range 2..100. Default 10 + +Tree view + +--rw ISIS_INTERFACE + | +--rw ISIS_INTERFACE_LIST* [instance ifname] + | +--rw instance string + | +--rw ifname string + | +--rw ipv4-routing? string + | +--rw ipv6-routing? string + | +--rw passive? boolean + | +--rw hello-padding? boolean + | +--rw network-type? isis:network-type + | +--rw enable-bfd? boolean + | +--rw bfd-profile? string + | +--rw metric? uint32 + | +--rw csnp-interval? uint16 + | +--rw psnp-interval? uint16 + | +--rw hello-interval? uint32 + | +--rw hello-multiplier? uint16 +``` + +#### YANG Model Enhancements + +##### SONiC ISIS Global +Global ISIS Yang container is sonic-isis.yang. + +``` + container ISIS_GLOBAL { + + list ISIS_GLOBAL_LIST { + + max-elements "1"; + + key "instance"; + + leaf instance { + type string; + description + "The identifier for this instance of ISIS. Area-tag"; + } + + leaf net { + type net-address; + description + "ISIS network entity title (NET). The first 8 bits are usually + 49 (private AFI), next 16 bits represent area, next 48 bits represent + system id and final 8 bits are set to 0."; + reference + "International Organization for Standardization, Information + technology - Open Systems Interconnection-Network service + Definition - ISO/ IEC 8348:2002."; + } + + leaf level-capability { + type level-capability; + default "level-1-2"; + description + "ISIS level capability (level-1, level-2, level-1-2)."; + } + + leaf dynamic-hostname { + type boolean; + default "true"; + description + "Dynamic hostname support for IS-IS."; + } + + leaf attach-send { + type boolean; + default "true"; + description + "If true, attached bits are sent in LSP if L1/L2 router for inter-area traffic."; + } + + leaf attach-receive-ignore { + type boolean; + default "false"; + description + "If false, attached bits received in LSP, cause default route add, if L1 router for inter-area traffic."; + } + + leaf set-overload-bit { + type boolean; + description + "Administratively enable the overload bit on this level."; + } + + leaf lsp-mtu-size { + type uint16 { + range "128..4352"; + } + default "1497"; + description + "MTU of an LSP."; + } + + leaf spf-init-delay { + type uint16 { + range "0..60000"; + } + units "msec"; + must "(not((not(../spf-init-delay)) and ../spf-short-delay and ../spf-long-delay and ../spf-hold-down and ../spf-time-to-learn))" { + error-message "SPF init delay must only be specified if all other spf parameters are specified"; + } + description + "Delay used while in QUIET state"; + } + + leaf spf-short-delay { + type uint16 { + range "0..60000"; + } + units "msec"; + must "(not((not(../spf-short-delay)) and ../spf-init-delay and ../spf-long-delay and ../spf-hold-down and ../spf-time-to-learn))" { + error-message "SPF short delay must only be specified if all other spf parameters are specified"; + } + description + "Delay used while in SHORT_WAIT state"; + } + + leaf spf-long-delay { + type uint16 { + range "0..60000"; + } + units "msec"; + must "(not((not(../spf-long-delay)) and ../spf-init-delay and ../spf-short-delay and ../spf-hold-down and ../spf-time-to-learn))" { + error-message "SPF long delay must only be specified if all other spf parameters are specified"; + } + description + "Delay used while in LONG_WAIT state"; + } + + leaf spf-hold-down { + type uint16 { + range "0..60000"; + } + units "msec"; + must "(not((not(../spf-hold-down)) and ../spf-short-delay and ../spf-long-delay and ../spf-init-delay and ../spf-time-to-learn))" { + error-message "SPF hold down must only be specified if all other spf parameters are specified"; + } + description + "Time with no received IGP events before considering IGP stable"; + } + + leaf spf-time-to-learn { + type uint16 { + range "0..60000"; + } + units "msec"; + must "(not((not(../spf-time-to-learn)) and ../spf-short-delay and ../spf-long-delay and ../spf-hold-down and ../spf-init-delay))" { + error-message "SPF time-to-learn must only be specified if all other spf parameters are specified"; + } + description + "Maximum duration needed to learn all the events related to a + single failure"; + } + + leaf log-adjacency-changes { + type boolean; + default "false"; + description + "Log changes to the IS-IS adjacencies in this instance."; + } + + } // list ISIS_GLOBAL_LIST + + } // container ISIS_GLOBAL +``` + +##### SONiC ISIS Level +ISIS Level Yang container is sonic-isis.yang. + +``` + container ISIS_LEVEL { + + list ISIS_LEVEL_LIST { + + description + "Configuration parameters related to a particular level within the + IS-IS protocol instance"; + + key "instance level-number"; + + leaf instance { + type string; + description + "The identifier for this instance of ISIS. Area-tag"; + } + + leaf level-number { + type level-number; + description + "ISIS level-number."; + } + + leaf lsp-refresh-interval { + type uint16; + units "seconds"; + default "900"; + description + "LSP refresh interval for level-1."; + } + + leaf lsp-maximum-lifetime { + type uint16 { + range "350..65535"; + } + units "seconds"; + must ". >= ../lsp-refresh-interval + 300"; + default "1200"; + description + "Maximum LSP lifetime for level-1."; + } + + leaf lsp-generation-interval { + type uint16 { + range "1..120"; + } + units "seconds"; + must ". < ../lsp-refresh-interval"; + default "30"; + description + "Minimum time allowed before level-1 LSP retransmissions."; + } + + leaf spf-minimum-interval { + type uint16 { + range "1..120"; + } + units "seconds"; + default "1"; + description + "Minimum time between consecutive level-1 SPFs."; + } + + } // list ISIS_LEVEL_LIST + + } // container ISIS_LEVEL +``` + +##### SONiC ISIS Interface +ISIS Interface Yang container is sonic-isis.yang. + +``` + container ISIS_INTERFACE { + + list ISIS_INTERFACE_LIST { + + description + "Configuration parameters related to a particular interface within the + IS-IS protocol instance"; + + key "instance ifname"; + + leaf instance { + type string; + description + "The identifier for this instance of ISIS. Area-tag"; + } + + leaf ifname { + type string; + description + "Interface for which ISIS configuration is to be applied."; + } + + leaf ipv4-routing-instance { + type string; + description + "Routing IS-IS IPv4 traffic over this circuit for the given instance."; + } + leaf ipv6-routing-instance { + type string; + description + "Routing IS-IS IPv6 traffic over this circuit for the given instance."; + } + + leaf passive { + type boolean; + default false; + description + "When set to true, the referenced interface is a passive interface + such that it is not eligible to establish adjacencies with other + systems, but is advertised into the IS-IS topology."; + } + + leaf hello-padding { + type boolean; + default false; + description + "Add padding to IS-IS hello PDUs."; + } + + leaf network-type { + type network-type; + default "BROADCAST_NETWORK"; + description + "ISIS circuit type (p2p, broadcast, loopback, unknown)."; + } + + leaf enable-bfd { + type boolean; + default "false"; + description + "Monitor IS-IS peers on this circuit."; + } + + leaf bfd-profile { + type string; + description + "Let BFD use a pre-configured profile."; + } + + leaf metric { + type uint32 { + range "0..16777215"; + } + default "0"; + description + "The metric value of this interface for this level."; + } + + leaf csnp-interval { + type uint16 { + range "1..600"; + } + units "seconds"; + default "10"; + description + "Complete Sequence Number PDU (CSNP) generation interval."; + } + + leaf psnp-interval { + type uint16 { + range "1..120"; + } + units "seconds"; + default "2"; + description + "Partial Sequence Number PDU (PSNP) generation interval."; + } + + leaf hello-interval { + type uint32 { + range "1..600"; + } + units "seconds"; + default "3"; + description + "Hello interval between consecutive hello messages. Interval will depend on multiplier."; + } + + leaf hello-multiplier { + type uint16 { + range "2..100"; + } + default "10"; + description + "Multiplier for the hello holding time."; + } + + } // list ISIS_INTERFACE + + } // container ISIS_INTERFACE +``` + +##### SONiC ISIS Defined Types +Types defined in sonic-isis.yang. + +``` + typedef net-address { + type string { + pattern "[a-fA-F0-9]{2}(\\.[a-fA-F0-9]{4}){3,9}\\.[a-fA-F0-9]{2}"; + } + description + "This type defines an OSI NET address using a pattern, + An example net-address is 49.0123.6452.1972.00"; + } + + typedef level { + type enumeration { + enum "level-1" { + value 1; + description + "This enum indicates L1-only capability."; + } + enum "level-2" { + value 2; + description + "This enum indicates L2-only capability."; + } + enum "level-1-2" { + value 3; + description + "This enum indicates capability for both levels."; + } + } + description + "This type defines IS-IS level of an object."; + } + + typedef network-type { + type enumeration { + enum "UNKNOWN_NETWORK" { + value 0; + description + "Unknown network type. Only valid as a state."; + } + enum "BROADCAST_NETWORK" { + value 1; + description + "Broadcast circuit network-type."; + } + enum "POINT_TO_POINT_NETWORK" { + value 2; + description + "Point-to-point circuit network-type."; + } + enum "LOOPBACK" { + value 3; + description + "Loopback circuit network-type. Only valid as a state."; + } + } + } + + typedef ip-routing-type { + type enumeration { + enum "routing-ipv4" { + value 0; + description + "Enable routing for IS-IS IPv4 traffic."; + } + enum "routing-ipv6" { + value 1; + description + "Enable routing for IS-IS IPV6 traffic."; + } + enum "routing-ipv4-ipv6" { + value 2; + description + "Enable routing for IS-IS IPv4 and IPV6 traffic."; + } + } +``` + +### Testing Requirements/Design + +Extended unit test cases to cover FRR-ISIS YANG features +- Test new ISIS YANG model Validation + - /src/sonic-yang-models/tests/test_sonic_yang_models.py + - /src/sonic-yang-models/tests/yang_model_tests/test_yang_model.py +Extensive system test cases to cover FRR-ISIS YANG features +- Verify configs are properly stored in Redis DB + +### Open/Action items - if any +Is there a way to better align the custom yang models designed for SONiC FRR-ISIS with Open Config ISIS models ? Not all FRR-ISIS features are compatible with Open Configs' models. From 3284f5a9dfd2f477d8295b5945f8cd029ea5b401 Mon Sep 17 00:00:00 2001 From: Caitlin Choate <114622132+cchoate54@users.noreply.github.com> Date: Fri, 27 Jan 2023 16:33:34 -0800 Subject: [PATCH 03/12] Update frr-isis-sonic-yang-model-hld.md Update frr-isis-sonic-yang-model-hld.md to include isis interface auth --- doc/isis/frr-isis-sonic-yang-model-hld.md | 73 ++++++++++++++++------- 1 file changed, 53 insertions(+), 20 deletions(-) diff --git a/doc/isis/frr-isis-sonic-yang-model-hld.md b/doc/isis/frr-isis-sonic-yang-model-hld.md index ff1494dc95..43ec6a5908 100644 --- a/doc/isis/frr-isis-sonic-yang-model-hld.md +++ b/doc/isis/frr-isis-sonic-yang-model-hld.md @@ -16,6 +16,7 @@ - [SONiC ISIS Global](#sonic-isis-global) - [SONiC ISIS Level](#sonic-isis-level) - [SONiC ISIS Interface](#sonic-isis-interface) + - [SONiC ISIS Authentication Groupings](#sonic-isis-authentication-groupings) - [SONiC ISIS Defined Types](#sonic-isis-defined-types) - [Testing Requirements/Design](#testing-requirementsdesign) - [Open/Action items - if any](#openaction-items---if-any) @@ -161,7 +162,9 @@ Interface specific ISIS config options. "csnp-interval" :{{{UINT16}}} (OPTIONAL) "psnp-interval" :{{{UINT16}}} (OPTIONAL) "hello-interval" :{{{UINT32}}} (OPTIONAL) - "hello-multiplier" :{{UINT16}} (OPTIONAL) + "hello-multiplier" :{{UINT16}} (OPTIONAL) + "authentication-key" :{{string}} + "authentication-type" :{{"TEXT"/"MD5HMAC"}} (OPTIONAL) ISIS_INTERFACE|{{instance|ifname}} ; Defines schema for ISIS interface configuration attributes @@ -181,6 +184,9 @@ csnp-interval = boolean ; Complete Sequence N psnp-interval = boolean ; Partial Sequence Number PDU (PSNP) generation interval. Range 1..120. Default 2 in seconds hello-interval = UINT32 ; Hello interval between consecutive hello messages. Range 1..600. Default 3 in seconds hello-multiplier = UINT16 ; Multiplier for the hello holding time. Range 2..100. Default 10 +authentication-key = string ; Authentication password +authentication-type = "TEXT"/"MD5HMAC" ; Authentication keychain type + Tree view +--rw ISIS_INTERFACE @@ -191,7 +197,7 @@ Tree view | +--rw ipv6-routing? string | +--rw passive? boolean | +--rw hello-padding? boolean - | +--rw network-type? isis:network-type + | +--rw network-type? network-type | +--rw enable-bfd? boolean | +--rw bfd-profile? string | +--rw metric? uint32 @@ -199,6 +205,8 @@ Tree view | +--rw psnp-interval? uint16 | +--rw hello-interval? uint32 | +--rw hello-multiplier? uint16 + | +--rw authentication-key? string + | +--rw authentication-type? "TEXT"/"MD5HMAC" ``` #### YANG Model Enhancements @@ -540,12 +548,54 @@ ISIS Interface Yang container is sonic-isis.yang. description "Multiplier for the hello holding time."; } + + uses isis-authentication; } // list ISIS_INTERFACE } // container ISIS_INTERFACE ``` +#### SONiC ISIS Authentication Groupings +Authentication leafs used to define isis authentication options. + + +``` + grouping isis-authentication { + + leaf authentication-key { + type string { + length "1..254"; + } + must "(not((not(../authentication-key)) and ../authentication-type))" { + error-message "ISIS authentication-key must only be specified if authentication-type is specified"; + } + description + "Authentication password."; + } + + leaf authentication-type { + type enumeration { + enum "TEXT" { + value 1; + description + "Clear-text password type."; + } + enum "MD5HMAC" { + value 2; + description + "MD5 password type."; + } + } + must "(not((not(../authentication-type)) and ../authentication-key))" { + error-message "ISIS authentication-type must only be specified if authentication-key is specified"; + } + description + "This grouping defines keychain configuration type."; + } + } +``` + ##### SONiC ISIS Defined Types Types defined in sonic-isis.yang. @@ -606,24 +656,7 @@ Types defined in sonic-isis.yang. } } - typedef ip-routing-type { - type enumeration { - enum "routing-ipv4" { - value 0; - description - "Enable routing for IS-IS IPv4 traffic."; - } - enum "routing-ipv6" { - value 1; - description - "Enable routing for IS-IS IPV6 traffic."; - } - enum "routing-ipv4-ipv6" { - value 2; - description - "Enable routing for IS-IS IPv4 and IPV6 traffic."; - } - } + ``` ### Testing Requirements/Design From 073e72079bbeee3f454e65b817816c9c1bb955a0 Mon Sep 17 00:00:00 2001 From: Caitlin Choate <114622132+cchoate54@users.noreply.github.com> Date: Mon, 6 Feb 2023 16:10:04 -0800 Subject: [PATCH 04/12] Update frr-isis-sonic-yang-model-hld.md syntax update --- doc/isis/frr-isis-sonic-yang-model-hld.md | 111 ++++++++++++---------- 1 file changed, 60 insertions(+), 51 deletions(-) diff --git a/doc/isis/frr-isis-sonic-yang-model-hld.md b/doc/isis/frr-isis-sonic-yang-model-hld.md index 43ec6a5908..d1f18e32d5 100644 --- a/doc/isis/frr-isis-sonic-yang-model-hld.md +++ b/doc/isis/frr-isis-sonic-yang-model-hld.md @@ -215,7 +215,7 @@ Tree view Global ISIS Yang container is sonic-isis.yang. ``` - container ISIS_GLOBAL { + container ISIS_GLOBAL { list ISIS_GLOBAL_LIST { @@ -259,20 +259,21 @@ Global ISIS Yang container is sonic-isis.yang. type boolean; default "true"; description - "If true, attached bits are sent in LSP if L1/L2 router for inter-area traffic."; + "For an L1 or L2 router, attached bits are sent in an LSP when set to true."; } leaf attach-receive-ignore { type boolean; default "false"; description - "If false, attached bits received in LSP, cause default route add, if L1 router for inter-area traffic."; + "For an L1 router, attached bits received in an LSP createa default route when set to false"; } leaf set-overload-bit { type boolean; + default "false"; description - "Administratively enable the overload bit on this level."; + "Administratively enable the overload bit."; } leaf lsp-mtu-size { @@ -281,7 +282,7 @@ Global ISIS Yang container is sonic-isis.yang. } default "1497"; description - "MTU of an LSP."; + "LSP MTU."; } leaf spf-init-delay { @@ -293,7 +294,7 @@ Global ISIS Yang container is sonic-isis.yang. error-message "SPF init delay must only be specified if all other spf parameters are specified"; } description - "Delay used while in QUIET state"; + "Delay used during QUIET state"; } leaf spf-short-delay { @@ -305,7 +306,7 @@ Global ISIS Yang container is sonic-isis.yang. error-message "SPF short delay must only be specified if all other spf parameters are specified"; } description - "Delay used while in SHORT_WAIT state"; + "Delay used during SHORT_WAIT state"; } leaf spf-long-delay { @@ -317,7 +318,7 @@ Global ISIS Yang container is sonic-isis.yang. error-message "SPF long delay must only be specified if all other spf parameters are specified"; } description - "Delay used while in LONG_WAIT state"; + "Delay used during LONG_WAIT state"; } leaf spf-hold-down { @@ -329,7 +330,7 @@ Global ISIS Yang container is sonic-isis.yang. error-message "SPF hold down must only be specified if all other spf parameters are specified"; } description - "Time with no received IGP events before considering IGP stable"; + "Period of time without IGP events before considering IGP stable"; } leaf spf-time-to-learn { @@ -341,15 +342,15 @@ Global ISIS Yang container is sonic-isis.yang. error-message "SPF time-to-learn must only be specified if all other spf parameters are specified"; } description - "Maximum duration needed to learn all the events related to a - single failure"; + "Maximum time needed to learn all of the events related to a + failure"; } leaf log-adjacency-changes { type boolean; default "false"; description - "Log changes to the IS-IS adjacencies in this instance."; + "Log changes to this instance's IS-IS adjacencies."; } } // list ISIS_GLOBAL_LIST @@ -361,7 +362,7 @@ Global ISIS Yang container is sonic-isis.yang. ISIS Level Yang container is sonic-isis.yang. ``` - container ISIS_LEVEL { + container ISIS_LEVEL { list ISIS_LEVEL_LIST { @@ -388,7 +389,7 @@ ISIS Level Yang container is sonic-isis.yang. units "seconds"; default "900"; description - "LSP refresh interval for level-1."; + "LSP refresh interval."; } leaf lsp-maximum-lifetime { @@ -399,7 +400,7 @@ ISIS Level Yang container is sonic-isis.yang. must ". >= ../lsp-refresh-interval + 300"; default "1200"; description - "Maximum LSP lifetime for level-1."; + "Maximum LSP lifetime."; } leaf lsp-generation-interval { @@ -410,7 +411,7 @@ ISIS Level Yang container is sonic-isis.yang. must ". < ../lsp-refresh-interval"; default "30"; description - "Minimum time allowed before level-1 LSP retransmissions."; + "Minimum time before an LSP retransmissions."; } leaf spf-minimum-interval { @@ -420,7 +421,7 @@ ISIS Level Yang container is sonic-isis.yang. units "seconds"; default "1"; description - "Minimum time between consecutive level-1 SPFs."; + "Minimum time between consecutive SPFs."; } } // list ISIS_LEVEL_LIST @@ -432,7 +433,7 @@ ISIS Level Yang container is sonic-isis.yang. ISIS Interface Yang container is sonic-isis.yang. ``` - container ISIS_INTERFACE { + container ISIS_INTERFACE { list ISIS_INTERFACE_LIST { @@ -457,17 +458,17 @@ ISIS Interface Yang container is sonic-isis.yang. leaf ipv4-routing-instance { type string; description - "Routing IS-IS IPv4 traffic over this circuit for the given instance."; + "Routing IS-IS IPv4 traffic over this interface for the given instance."; } leaf ipv6-routing-instance { type string; description - "Routing IS-IS IPv6 traffic over this circuit for the given instance."; + "Routing IS-IS IPv6 traffic over this interface for the given instance."; } leaf passive { type boolean; - default false; + default "false"; description "When set to true, the referenced interface is a passive interface such that it is not eligible to establish adjacencies with other @@ -476,29 +477,29 @@ ISIS Interface Yang container is sonic-isis.yang. leaf hello-padding { type boolean; - default false; + default "true"; description - "Add padding to IS-IS hello PDUs."; + "When true, padding is added to IS-IS hello PDUs."; } leaf network-type { type network-type; default "BROADCAST_NETWORK"; description - "ISIS circuit type (p2p, broadcast, loopback, unknown)."; + "ISIS interface type (p2p, broadcast, loopback, unknown)."; } leaf enable-bfd { type boolean; default "false"; description - "Monitor IS-IS peers on this circuit."; + "Monitor IS-IS peers on this interface."; } leaf bfd-profile { type string; description - "Let BFD use a pre-configured profile."; + "Set BFD to use a pre-configured profile."; } leaf metric { @@ -507,7 +508,7 @@ ISIS Interface Yang container is sonic-isis.yang. } default "0"; description - "The metric value of this interface for this level."; + "The metric value of this interface."; } leaf csnp-interval { @@ -548,7 +549,7 @@ ISIS Interface Yang container is sonic-isis.yang. description "Multiplier for the hello holding time."; } - + uses isis-authentication; } // list ISIS_INTERFACE @@ -579,12 +580,12 @@ Authentication leafs used to define isis authentication options. enum "TEXT" { value 1; description - "Clear-text password type."; + "Clear text authentication type."; } enum "MD5HMAC" { value 2; description - "MD5 password type."; + "MD5 authentication type."; } } must "(not((not(../authentication-type)) and ../authentication-key))" { @@ -592,8 +593,8 @@ Authentication leafs used to define isis authentication options. } description "This grouping defines keychain configuration type."; - } - } + } + } ``` ##### SONiC ISIS Defined Types @@ -601,34 +602,44 @@ Types defined in sonic-isis.yang. ``` typedef net-address { - type string { - pattern "[a-fA-F0-9]{2}(\\.[a-fA-F0-9]{4}){3,9}\\.[a-fA-F0-9]{2}"; + type string { + pattern "[a-fA-F0-9]{2}(\\.[a-fA-F0-9]{4}){3,9}\\.[a-fA-F0-9]{2}"; } - description - "This type defines an OSI NET address using a pattern, - An example net-address is 49.0123.6452.1972.00"; + description + "This type defines an OSI NET address, + Example: 49.0123.4567.8910.00"; } - typedef level { + typedef level-number { type enumeration { enum "level-1" { value 1; description - "This enum indicates L1-only capability."; + "L1-only capability."; } enum "level-2" { value 2; description - "This enum indicates L2-only capability."; + "L2-only capability."; } - enum "level-1-2" { - value 3; - description - "This enum indicates capability for both levels."; + } + description + "This type defines IS-IS level options for level specific configurations."; + } + + typedef level-capability { + type union { + type level-number; + type enumeration { + enum "level-1-2" { + value 3; + description + "L1 and L2 capability."; + } } } description - "This type defines IS-IS level of an object."; + "This type defines all IS-IS level options capable of being configured."; } typedef network-type { @@ -636,27 +647,25 @@ Types defined in sonic-isis.yang. enum "UNKNOWN_NETWORK" { value 0; description - "Unknown network type. Only valid as a state."; + "Unknown network type."; } enum "BROADCAST_NETWORK" { value 1; description - "Broadcast circuit network-type."; + "Broadcast interface network type."; } enum "POINT_TO_POINT_NETWORK" { value 2; description - "Point-to-point circuit network-type."; + "Point-to-point interface network type."; } enum "LOOPBACK" { value 3; description - "Loopback circuit network-type. Only valid as a state."; + "Loopback interface network type."; } } } - - ``` ### Testing Requirements/Design From 2386d7eee2d181859c1259e62f3b1ec5cd68c175 Mon Sep 17 00:00:00 2001 From: Caitlin Choate <114622132+cchoate54@users.noreply.github.com> Date: Thu, 2 Mar 2023 11:56:46 -0800 Subject: [PATCH 05/12] Update to include reference diagram and new cli commands --- doc/isis/frr-isis-sonic-config-support-hld.md | 93 ++++++++++++++++++- 1 file changed, 88 insertions(+), 5 deletions(-) diff --git a/doc/isis/frr-isis-sonic-config-support-hld.md b/doc/isis/frr-isis-sonic-config-support-hld.md index 8dfc3fe774..1380450dea 100644 --- a/doc/isis/frr-isis-sonic-config-support-hld.md +++ b/doc/isis/frr-isis-sonic-config-support-hld.md @@ -33,7 +33,7 @@ ### Revision | Rev | Date | Author | Change Description | | :--- | :-------------- | :------ | :---------------- | -| 0.1 | January-11-2022 | C Choate | Initial version | +| 0.1 | March-2-2023 | C Choate | Initial version | ### Scope @@ -69,11 +69,11 @@ This is an addition to previous feature work to support FRR-BGP. Details on the 6. Provide support for config and management of FRR-ISIS features used in SONIC with new ISIS YANG models. #### Exemptions -SONiC CLI support for ISIS show commands are not yet included. +Adding support for multi-linecard chassis is out of scope for this document. ### Architecture Design -There are no changes to the existing SONiC architecture. This new feature enhances existing code to include configuration support for the isisd daemon within the FRR container. +There are no changes to the existing SONiC architecture. This new feature enhances existing code to include configuration support for the isisd daemon within the FRR container. Testing showed that with the isisd deamon enabled, IS-IS routes are being learned directly from the FRR container without needing any changes to the existing orchagent or swss. It was observed that fpmsyncd works to push all of the IS-IS learned routes from the FRR container to SONiC DB’s. ### High-Level Design @@ -81,6 +81,10 @@ There are no changes to the existing SONiC architecture. This new feature enhanc This feature will extend functionality implemented in [SONiC FRR-BGP Extended Unified Configuration Management Framework](https://github.com/sonic-net/SONiC/blob/master/doc/mgmt/SONiC_Design_Doc_Unified_FRR_Mgmt_Interface.md) to support additional SONiC FRR-ISIS features. +![FRR-BGP-REST-GET-SEQUENCE1](https://user-images.githubusercontent.com/114622132/222537856-eefb1a13-bcc0-495b-938a-7ea3abee0c18.png) + +Diagram 1. Diagram showing the existing framework that is being extended to include support for now ISIS config schemas. This diagram is taken from and further explained in it's original feature introduction in [SONiC FRR-BGP Extended Unified Configuration Management Framework](https://github.com/sonic-net/SONiC/blob/master/doc/mgmt/SONiC_Design_Doc_Unified_FRR_Mgmt_Interface.md) to support additional SONiC FRR-ISIS features. + The Management framework will convert the YANG-based config data into requests that will write the configs into Redis DB. Redis DB events will trigger frrcfgd when the field frr_mgmt_framework_config set to "true" in the DEVICE_METADATA table, and then frrcfgd will configure FRR-ISIS using FRR CLI commands. #### Change Overview @@ -95,6 +99,10 @@ This enhancement will support FRR-ISIS features used in SONiC and all changes wi - /files/image_config/copp - Added support for ISIS tables in frrcfgd and extended frrcfgd unit tests for FRR-ISIS configs - /src/sonic-frr-mgmt-framework +- Support ISIS show commands and show command unittests + - sonic-utilities/show + - sonic-utilities/tests + #### Container @@ -116,7 +124,78 @@ N/A #### CLI/YANG Model Enhancements -There are no CLI changes made in this feature thus far. +New SONiC ISIS show commands + +|Command Description|CLI Command | +|:------------------|:-----------------| +|Show state information for all ISIS neighbors or a specified neighbor |show isis neighbors [system_id] {--verbose} | + +``` +sonic:~$ show isis neighbors +Area 1: + System Id Interface L State Holdtime SNPA +sonic1 PortChannel01202 Up 25 2020.2020.2020 +sonic2 PortChannel01212 Up 25 2020.2020.2020 +``` + +|Command Description|CLI Command | +|:------------------|:-----------------| +|Show the ISIS database globally or for a specific LSP |show isis database [lsp_id] {--verbose} | + +``` +sonic:~$ show isis database +Area 1: +IS-IS Level-2 link-state database: +LSP ID PduLen SeqNumber Chksum Holdtime ATT/P/OL +sonic1.00-00 1284 0x0000020e 0x3d7e 48072 0/0/0 +sonic1.00-01 197 0x00000136 0x4474 64797 0/0/0 +sonic2.00-00 1192 0x000001ae 0xd970 47837 0/0/0 +sonic2.00-01 367 0x00000136 0xe315 31986 0/0/0 +sonic3.00-00 1319 0x000001a9 0x3349 47881 0/0/0 +sonic3.00-00 1115 0x000002e7 0x1b38 54629 0/0/0 + 6 LSPs +``` + +|Command Description|CLI Command | +|:------------------|:-----------------| +|Show information about an ISIS node |show isis hostname | + +``` +sonic:~$ show isis hostname +vrf : default +Level System ID Dynamic Hostname +2 1000.2000.4000 sonic2 + * 1000.2000.3000 sonic +``` + +|Command Description|CLI Command | +|:------------------|:-----------------| +|Show state and configuration of ISIS for all interfaces or a specified interface |show isis interface [interface] {--verbose} | + +``` +sonic:~$ show isis interface +Area 1: + Interface CircId State Type Level + PortChannel01200x0 Up p2p L2 +``` + +|Command Description|CLI Command | +|:------------------|:-----------------| +|Show topology IS-IS paths globally or for level-1 or level-2 specifically |show isis topology {level-1\|level-2} | + +``` +sonic:~$ show isis topology +Area 1: +IS-IS paths to level-2 routers that speak IP +Vertex Type Metric Next-Hop Interface Parent +sonic1 +172.20.53.0/31 IP internal 0 sonic1(4) +172.20.52.0/31 IP internal 0 sonic1(4) +sonic2 TE-IS 10 sonic2 PortChannel0121 sonic1(4) +10.3.159.80/32 IP TE 10 sonic2 PortChannel0121 sonic2(4) +10.3.159.81/32 IP TE 10 sonic2 PortChannel0121 sonic2(4) +...... +``` #### Config DB Enhancements @@ -135,7 +214,9 @@ Added new configuration tables specific to FRR_ISIS features: Detailed Yang model changes can be found at -- isis-yang-hld + +- [ISIS Yang Model for SONiC High Level Design Document](https://github.com/sonic-net/SONiC/blob/073e72079bbeee3f454e65b817816c9c1bb955a0/doc/isis/frr-isis-sonic-yang-model-hld.md) + #### FRR Template Changes @@ -167,6 +248,8 @@ Extensive system test cases to cover FRR-ISIS config features - Verify configs can be deleted by config table name and individual fields - Verify configs persist in the FRR container post container reboot +New tests will also be published into sonic-mgmt for ISIS + ### Open/Action items Is there a way to better align the custom yang models designed for SONiC FRR-ISIS with Open Config ISIS models. Not all FRR-ISIS features are compatible with Open Configs' models ? From dea09fd03fcf4324b4a5e90c01c8919e8adc4a3c Mon Sep 17 00:00:00 2001 From: Caitlin Choate <114622132+cchoate54@users.noreply.github.com> Date: Thu, 2 Mar 2023 12:04:36 -0800 Subject: [PATCH 06/12] Updating document to fix a small type discrepancy --- doc/isis/frr-isis-sonic-yang-model-hld.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/isis/frr-isis-sonic-yang-model-hld.md b/doc/isis/frr-isis-sonic-yang-model-hld.md index d1f18e32d5..d911a419df 100644 --- a/doc/isis/frr-isis-sonic-yang-model-hld.md +++ b/doc/isis/frr-isis-sonic-yang-model-hld.md @@ -24,7 +24,7 @@ ### Revision | Rev | Date | Author | Change Description | | :--- | :--------- | :------ | :---------------- | -| 0.1 | Jan-11-2022 | C Choate | Initial version | +| 0.1 | March-02-2023 | C Choate | Initial version | ### Scope @@ -151,8 +151,8 @@ Interface specific ISIS config options. "ISIS_INTERFACE" "instance" :{{string}} "ifname" :{{string}} - "ipv4-routing" :{{{boolean}}} (OPTIONAL) - "ipv6-routing" :{{{boolean}}} (OPTIONAL) + "ipv4-routing" :{{{string}}} (OPTIONAL) + "ipv6-routing" :{{{string}}} (OPTIONAL) "passive" :{{boolean}} (OPTIONAL) "hello-padding" :{{{boolean}}} (OPTIONAL) "network-type" :{{"UNKNOWN_NETWORK"/"BROADCAST_NETWORK"/"POINT_TO_POINT_NETWOR"/"LOOPBACK"}} (OPTIONAL) @@ -171,8 +171,8 @@ ISIS_INTERFACE|{{instance|ifname}} key = ISIS_INTERFACE:instance ; Instance name/area tag key = ISIS_INTERFACE:ifname ; Interface name ; field = value -ipv4-routing = boolean ; Enable routing IPv4 traffic over this circuit -ipv6-routing = bolean ; Enable routing IPv6 traffic over this circuit +ipv4-routing = string ; Enable routing IPv4 traffic over this circuit for the given instance +ipv6-routing = string ; Enable routing IPv6 traffic over this circuit for the given instance passive = bolean ; Advertise the interface in the ISIS topology, but don't allow it to form adjacencies. Default "false" hello-padding = boolean ; Add padding to IS-IS hello PDUs network-type = "UNKNOWN_NETWORK"/"BROADCAST_NETWORK"/"POINT_TO_POINT_NETWOR"/"LOOPBACK" From 531ef1a82c26b5a86c970e597ad72b7f822b00d5 Mon Sep 17 00:00:00 2001 From: Caitlin Choate <114622132+cchoate54@users.noreply.github.com> Date: Thu, 2 Mar 2023 12:28:24 -0800 Subject: [PATCH 07/12] Small update to 'show isis interface' --- doc/isis/frr-isis-sonic-config-support-hld.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/isis/frr-isis-sonic-config-support-hld.md b/doc/isis/frr-isis-sonic-config-support-hld.md index 1380450dea..97860f0476 100644 --- a/doc/isis/frr-isis-sonic-config-support-hld.md +++ b/doc/isis/frr-isis-sonic-config-support-hld.md @@ -170,10 +170,16 @@ Level System ID Dynamic Hostname |Command Description|CLI Command | |:------------------|:-----------------| -|Show state and configuration of ISIS for all interfaces or a specified interface |show isis interface [interface] {--verbose} | +|Show state and configuration of ISIS for all interfaces or a specified interface |show isis interface [interface] {--verbose} {--display}| ``` sonic:~$ show isis interface +Area 1: + Interface CircId State Type Level + PortChannel01200x0 Up p2p L2 + +sonic:~$ show isis interface --display +[INTERFACE] options: ['Loopback0', 'Ethernet0', 'Ethernet4', 'Ethernet8', 'Ethernet12', 'Ethernet16', 'Ethernet20', 'Ethernet24', 'Ethernet28', 'Ethernet32', 'Ethernet36', 'Ethernet40', 'Ethernet44', 'Ethernet48', 'Ethernet52', 'Ethernet56', 'Ethernet60', 'Ethernet64', 'Ethernet68', 'Ethernet72', 'Ethernet76', 'Ethernet80', 'Ethernet84', 'Ethernet88', 'Ethernet92', 'Ethernet96', 'Ethernet100', 'Ethernet104', 'Ethernet108', 'Ethernet112', 'Ethernet116', 'Ethernet120', 'Ethernet124', 'PortChannel0002', 'PortChannel0003', 'PortChannel0120'] Area 1: Interface CircId State Type Level PortChannel01200x0 Up p2p L2 From 2fb57629615694599ef3a3c8c54d6dcbc06dbb0b Mon Sep 17 00:00:00 2001 From: Caitlin Choate <114622132+cchoate54@users.noreply.github.com> Date: Wed, 15 Mar 2023 19:38:14 -0700 Subject: [PATCH 08/12] Small typo fix --- doc/isis/frr-isis-sonic-yang-model-hld.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/isis/frr-isis-sonic-yang-model-hld.md b/doc/isis/frr-isis-sonic-yang-model-hld.md index d911a419df..46b5608ab4 100644 --- a/doc/isis/frr-isis-sonic-yang-model-hld.md +++ b/doc/isis/frr-isis-sonic-yang-model-hld.md @@ -266,7 +266,7 @@ Global ISIS Yang container is sonic-isis.yang. type boolean; default "false"; description - "For an L1 router, attached bits received in an LSP createa default route when set to false"; + "For an L1 router, attached bits received in an LSP create a default route when set to false"; } leaf set-overload-bit { @@ -381,7 +381,7 @@ ISIS Level Yang container is sonic-isis.yang. leaf level-number { type level-number; description - "ISIS level-number."; + "ISIS level number."; } leaf lsp-refresh-interval { From ba9cfdda2480a3faa38e2ff73e0944f536a80f4c Mon Sep 17 00:00:00 2001 From: Caitlin Choate <114622132+cchoate54@users.noreply.github.com> Date: Thu, 16 Mar 2023 09:02:40 -0700 Subject: [PATCH 09/12] Update level to level-number --- doc/isis/frr-isis-sonic-yang-model-hld.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/isis/frr-isis-sonic-yang-model-hld.md b/doc/isis/frr-isis-sonic-yang-model-hld.md index 46b5608ab4..75e361ff9d 100644 --- a/doc/isis/frr-isis-sonic-yang-model-hld.md +++ b/doc/isis/frr-isis-sonic-yang-model-hld.md @@ -135,7 +135,7 @@ spf-minimum-interval = UINT16 ; Minimum time between Tree view +--rw ISIS_LEVEL - | +--rw ISIS_LEVEL_LIST* [instance level] + | +--rw ISIS_LEVEL_LIST* [instance level-number] | +--rw instance string | +--rw level-number level-number | +--rw lsp-refresh-interval? uint16 From 6d71762af7754ec7789c8383a1564ac5dcf0fd52 Mon Sep 17 00:00:00 2001 From: cchoate Date: Tue, 11 Apr 2023 16:41:24 -0700 Subject: [PATCH 10/12] Update the documentation to reflect the latest version of the feature --- doc/isis/frr-isis-sonic-config-support-hld.md | 134 +++++- doc/isis/frr-isis-sonic-yang-model-hld.md | 427 ++++++++---------- 2 files changed, 324 insertions(+), 237 deletions(-) diff --git a/doc/isis/frr-isis-sonic-config-support-hld.md b/doc/isis/frr-isis-sonic-config-support-hld.md index 97860f0476..d7702ec2ff 100644 --- a/doc/isis/frr-isis-sonic-config-support-hld.md +++ b/doc/isis/frr-isis-sonic-config-support-hld.md @@ -33,7 +33,7 @@ ### Revision | Rev | Date | Author | Change Description | | :--- | :-------------- | :------ | :---------------- | -| 0.1 | March-2-2023 | C Choate | Initial version | +| 0.1 | April-11-2023 | C Choate | Initial version | ### Scope @@ -73,7 +73,7 @@ Adding support for multi-linecard chassis is out of scope for this document. ### Architecture Design -There are no changes to the existing SONiC architecture. This new feature enhances existing code to include configuration support for the isisd daemon within the FRR container. Testing showed that with the isisd deamon enabled, IS-IS routes are being learned directly from the FRR container without needing any changes to the existing orchagent or swss. It was observed that fpmsyncd works to push all of the IS-IS learned routes from the FRR container to SONiC DB’s. +There are no changes to the existing SONiC architecture. This new feature enhances existing code to include configuration support for the isisd daemon within the FRR container. Testing showed that with the isisd deamon enabled, ISIS routes are being learned directly from the FRR container without needing any changes to the existing orchagent or swss. It was observed that fpmsyncd works to push all of the ISIS learned routes from the FRR container to SONiC DB’s. ### High-Level Design @@ -81,7 +81,7 @@ There are no changes to the existing SONiC architecture. This new feature enhanc This feature will extend functionality implemented in [SONiC FRR-BGP Extended Unified Configuration Management Framework](https://github.com/sonic-net/SONiC/blob/master/doc/mgmt/SONiC_Design_Doc_Unified_FRR_Mgmt_Interface.md) to support additional SONiC FRR-ISIS features. -![FRR-BGP-REST-GET-SEQUENCE1](https://user-images.githubusercontent.com/114622132/222537856-eefb1a13-bcc0-495b-938a-7ea3abee0c18.png) +![FRR-BGP-Unified-mgmt-frmwrk](https://user-images.githubusercontent.com/114622132/222537856-eefb1a13-bcc0-495b-938a-7ea3abee0c18.png) Diagram 1. Diagram showing the existing framework that is being extended to include support for now ISIS config schemas. This diagram is taken from and further explained in it's original feature introduction in [SONiC FRR-BGP Extended Unified Configuration Management Framework](https://github.com/sonic-net/SONiC/blob/master/doc/mgmt/SONiC_Design_Doc_Unified_FRR_Mgmt_Interface.md) to support additional SONiC FRR-ISIS features. @@ -187,7 +187,7 @@ Area 1: |Command Description|CLI Command | |:------------------|:-----------------| -|Show topology IS-IS paths globally or for level-1 or level-2 specifically |show isis topology {level-1\|level-2} | +|Show topology IS-IS paths globally or for level-1 or level-2 specifically |show isis topology {--level-1} {--level-2} | ``` sonic:~$ show isis topology @@ -203,6 +203,122 @@ sonic2 TE-IS 10 sonic2 PortChannel0121 so ...... ``` +|Command Description|CLI Command | +|:------------------|:-----------------| +|Show summary of ISIS information |show isis summary | + +``` +sonic:~$ show isis summary +vrf : default +Process Id : 4663 +System Id : 0000.0000.0000 +Up time : 00:04:31 ago +Number of areas : 1 +Area 1: + Net: 10.0000.0000.0000.0000.0000.0000.0000.0000.0000.00 + TX counters per PDU type: + L2 IIH: 144 + L2 LSP: 4 + L2 CSNP: 29 + LSP RXMT: 0 + RX counters per PDU type: + L2 IIH: 143 + L2 LSP: 4 + Drop counters per PDU type: + L2 IIH: 1 + Advertise high metrics: Disabled + Level-1: + LSP0 regenerated: 3 + LSPs purged: 0 + SPF: + minimum interval : 1 + IPv4 route computation: + last run elapsed : 00:04:25 ago + last run duration : 111 usec + run count : 3 + IPv6 route computation: + last run elapsed : 00:04:25 ago + last run duration : 23 usec + run count : 3 + Level-2: + LSP0 regenerated: 4 + LSPs purged: 0 + SPF: + minimum interval : 1 + IPv4 route computation: + last run elapsed : 00:04:21 ago + last run duration : 45 usec + run count : 9 + IPv6 route computation: + last run elapsed : 00:04:21 ago + last run duration : 14 usec + run count : 9 +...... +``` + +|Command Description|CLI Command | +|:------------------|:-----------------| +|Show ISIS running configuration |show run isis {--verbose} {--config_db} {--namespace}| + +``` +sonic:~$ show run isis +"""Building configuration... +Current configuration: +! +frr version 8.2.2 +frr defaults traditional +hostname vlab-01 +log syslog informational +log facility local4 +no service integrated-vtysh-config +! +password zebra +enable password zebra +! +interface PortChannel101 + ip router isis 1 + ipv6 router isis 1 + isis network point-to-point +exit +! +router isis 1 + is-type level-2-only + net 49.0001.1720.1700.0002.00 + lsp-mtu 1383 + lsp-timers level-1 gen-interval 30 refresh-interval 900 max-lifetime 1200 + lsp-timers level-2 gen-interval 30 refresh-interval 305 max-lifetime 900 + log-adjacency-changes +exit +! +end + +sonic:~$ show run isis --config_db +{ + "ISIS_GLOBAL": { + "1": { + "net": "49.0001.1720.1700.0002.00", + "lsp_mtu_size": "1383", + "spf_time_to_learn": "25" + } + }, + "ISIS_LEVEL": { + "1|level-2": { + "lsp_refresh_interval": "305", + "lsp_maximum_lifetime": "900" + } + }, + "ISIS_INTERFACE": { + "1|PortChannel0101": { + "instance":"1", + "ifname": "PortChannel0120", + "network_type": "point-to-point", + "ipv4_routing_instance": "1", + "ipv6_routing_instance": "1", + } + } +} +``` + #### Config DB Enhancements Following section describes the changes to DB. @@ -242,10 +358,12 @@ When deleting or adding configs that have dependencies built within the yang mod Extended unit test cases to cover FRR-ISIS config features - Test frrcfgd changes - - /src/sonic-frr-mgmt-framework/tests/test_config.py + - sonic-buildimage/src/sonic-frr-mgmt-framework/tests/test_config.py - Test new ISIS YANG model Validation - - /src/sonic-yang-models/tests/test_sonic_yang_models.py - - /src/sonic-yang-models/tests/yang_model_tests/test_yang_model.py + - sonic-buildimage/src/sonic-yang-models/tests/test_sonic_yang_models.py + - sonic-buildimage/src/sonic-yang-models/tests/yang_model_tests/test_yang_model.py +- Test show commands for isis + - sonic-utilities/tests/isis_frr_test.py #### System Test cases Extensive system test cases to cover FRR-ISIS config features @@ -258,6 +376,4 @@ New tests will also be published into sonic-mgmt for ISIS ### Open/Action items -Is there a way to better align the custom yang models designed for SONiC FRR-ISIS with Open Config ISIS models. Not all FRR-ISIS features are compatible with Open Configs' models ? - Could the FRR container be renamed from 'bgp' to 'frr' ? diff --git a/doc/isis/frr-isis-sonic-yang-model-hld.md b/doc/isis/frr-isis-sonic-yang-model-hld.md index 75e361ff9d..aee0103fe0 100644 --- a/doc/isis/frr-isis-sonic-yang-model-hld.md +++ b/doc/isis/frr-isis-sonic-yang-model-hld.md @@ -24,7 +24,7 @@ ### Revision | Rev | Date | Author | Change Description | | :--- | :--------- | :------ | :---------------- | -| 0.1 | March-02-2023 | C Choate | Initial version | +| 0.1 | April-11-2023 | C Choate | Initial version | ### Scope @@ -56,19 +56,19 @@ Global ISIS config options. ``` "ISIS_GLOBAL" "instance" :{{string}} - "net" :{{net-address}} (OPTIONAL) - "level-capability" :{{"level-1"/"level-2"/"level-1-2"}} (OPTIONAL) - "dynamic-hostname" :{{boolean}} (OPTIONAL) - "attach-send" :{{boolean}} (OPTIONAL) - "attach-receive-ignore" :{{boolean}} (OPTIONAL) - "set-overload-bit" :{{boolean}} (OPTIONAL) - "lsp-mtu-size" :{{UINT16}} (OPTIONAL) - "spf-init-delay" :{{UINT16}} (OPTIONAL*) - "spf-short-delay" :{{UINT16}} (OPTIONAL*) - "spf-long-delay" :{{UINT16}} (OPTIONAL*) - "spf-hold-delay" :{{UINT16}} (OPTIONAL*) - "spf-time-to-learn" :{{UINT16}} (OPTIONAL*) - "log-adjacency-changes" :{{boolean}} (OPTIONAL) + "net" :{{stypes:net-address}} (OPTIONAL) + "level_capability" :{{"level-1"/"level-2"/"level-1-2"}} (OPTIONAL) + "dynamic_hostname" :{{boolean}} (OPTIONAL) + "attach_send" :{{boolean}} (OPTIONAL) + "attach_receive_ignore" :{{boolean}} (OPTIONAL) + "set_overload_bit" :{{boolean}} (OPTIONAL) + "lsp_mtu_size" :{{UINT16}} (OPTIONAL) + "spf_init_delay" :{{UINT16}} (OPTIONAL*) + "spf_short_delay" :{{UINT16}} (OPTIONAL*) + "spf_long_delay" :{{UINT16}} (OPTIONAL*) + "spf_hold_delay" :{{UINT16}} (OPTIONAL*) + "spf_time_to_learn" :{{UINT16}} (OPTIONAL*) + "log_adjacency_changes" :{{boolean}} (OPTIONAL) * If an SPF value is specified, all other global SPF values must also be specified @@ -76,39 +76,37 @@ ISIS_GLOBAL|{{instance}} ; Defines schema for global ISIS configuration attributes key = ISIS_GLOBAL:instance ; Instance name/area tag ; field = value -net = net-address ; OSI NET address. Format: xx.xxxx.xxxx.xxxx.xx -level-capability = "level-1"/"level-2"/"level-1-2" ; ISIS level capability -dynamic-hostname = boolean ; Dynamic-hostname support. Default "true" -attach-send = boolean ; Send attached bits in LSP for inter-area traffic. Default "true" -attach-receive-ignore = boolean ; Attached bits recieved in LSP cause default route add. Default "false" -set-overload-bit = boolean ; Administratively enable the overload bit -lsp-mtu-size = UINT16 ; MTU of an LSP. Range 128..4352. Default 1487 -spf-init-delay = UINT16 ; Delay used while in QUIET state. Range 0..60000 in msec. -spf-short-delay = UINT16 ; Delay used while in SHORT_WAIT state. Range 0..60000 in msec. -spf-long-delay = UINT16 ; Delay used while in LONG_WAIT state. Range 0..60000 in msec. -spf-hold-delay = UINT16 ; Time with no received IGP events before considering IGP stable. - Range 0..60000 in msec. -spf-time-to-learn = UINT16 ; Maximum duration needed to learn all the events related to a single failure. - Range 0..60000 in msec. -log-adjacency-changes = boolean ; Log changes to the IS-IS adjacencies in this instance. Default "false" +net = stypes:net-address ; OSI NET address. Format: xx.xxxx.xxxx.xxxx.xx +level_capability = "level-1"/"level-2"/"level-1-2" ; ISIS level capability +dynamic_hostname = boolean ; Dynamic-hostname support. Default "true" +attach_send = boolean ; Send attached bits in LSP for inter-area traffic. Default "true" +attach_receive_ignore = boolean ; Attached bits recieved in LSP cause default route add. Default "false" +set_overload_bit = boolean ; Administratively enable the overload bit +lsp_mtu_size = UINT16 ; MTU of an LSP. Range 128..4352. Default 1487 +spf_init_delay = UINT16 ; Delay used while in QUIET state. Range 0..60000 in msec. +spf_short_delay = UINT16 ; Delay used while in SHORT_WAIT state. Range 0..60000 in msec. +spf_long_delay = UINT16 ; Delay used while in LONG_WAIT state. Range 0..60000 in msec. +spf_hold_delay = UINT16 ; Time with no received IGP events before considering IGP stable. Range 0..60000 in msec. +spf_time_to_learn = UINT16 ; Maximum time needed to learn all of the events related to a failure. Range 0..60000 in msec. +log_adjacency_changes = boolean ; Log changes to this instance's IS-IS adjacencies. Default "false" Tree view +--rw ISIS_GLOBAL | +--rw ISIS_GLOBAL_LIST* [instance] | +--rw instance string - | +--rw net? net-address - | +--rw level-capability? level-capability - | +--rw dynamic-hostname? boolean - | +--rw attach-send? boolean - | +--rw attach-receive-ignore? boolean - | +--rw set-overload-bit? boolean - | +--rw lsp-mtu-size? UINT16 - | +--rw spf-init-delay uint16 - | +--rw spf-short-delay uint16 - | +--rw spf-long-delay uint16 - | +--rw spf-hold-down uint16 - | +--rw spf-time-to-learn uint16 - | +--rw log-adjacency-changes? boolean + | +--rw net? stypes:net-address + | +--rw level_capability? stypes:level-capability + | +--rw dynamic_hostname? boolean + | +--rw attach_send? boolean + | +--rw attach_receive_ignore? boolean + | +--rw set_overload_bit? boolean + | +--rw lsp_mtu_size? UINT16 + | +--rw spf_init_delay uint16 + | +--rw spf_short_delay uint16 + | +--rw spf_long_delay uint16 + | +--rw spf_hold_down uint16 + | +--rw spf_time_to_learn uint16 + | +--rw log_adjacency_changes? boolean ``` ##### Level Config @@ -117,31 +115,31 @@ Level specific ISIS config options. ``` "ISIS_LEVEL" "instance" :{{string}} - "level-number" :{{UINT8}} - "lsp-refresh-interval" :{{UINT16}} (OPTIONAL) - "lsp-maximum-lifetime" :{{UINT16}} (OPTIONAL) - "lsp-generation-interval" :{{UINT16}} (OPTIONAL) - "spf-minimum-interval" :{{UINT16}} (OPTIONAL) + "level_number" :{{"level-1"/"level-2"}} + "lsp_refresh_interval" :{{UINT16}} (OPTIONAL) + "lsp_maximum_lifetime" :{{UINT16}} (OPTIONAL) + "lsp_generation_interval" :{{UINT16}} (OPTIONAL) + "spf_minimum_interval" :{{UINT16}} (OPTIONAL) -ISIS_LEVEL|{{instance|level-number}} +ISIS_LEVEL|{{instance|level_number}} ; Defines schema for ISIS level configuration attributes key = ISIS_LEVEL:instance ; Instance name/area tag -key = ISIS_LEVEL:level-number ; Level number. ("level-1"/"level-2") +key = ISIS_LEVEL:level_number ; Level number. ("level-1"/"level-2") ; field = value -lsp-refresh-interval = UINT16 ; LSP refresh interval. Default 900 in seconds -lsp-maximum-lifetime = UINT16 ; Maximum LSP lifetime. Range 350..65535. Default 1200 in seconds. Must be at least 300 seconds more than lsp-refresh-interval -lsp-generation-interval = UINT16 ; Minimum time allowed before LSP retransmissions. Range 1..120. Default 30 in seconds. Must be lower than lsp-refresh-interval -spf-minimum-interval = UINT16 ; Minimum time between consecutive SPFs. Range 1..120. Default 1 in seconds +lsp_refresh_interval = UINT16 ; LSP refresh interval. Default 900 in seconds +lsp_maximum_lifetime = UINT16 ; Maximum LSP lifetime. Range 350..65535. Default 1200 in seconds. Must be at least 300 seconds more than lsp_refresh_interval +lsp_generation_interval = UINT16 ; Minimum time allowed before LSP retransmissions. Range 1..120. Default 30 in seconds. Must be lower than lsp_refresh_interval +spf_minimum_interval = UINT16 ; Minimum time between consecutive SPFs. Range 1..120. Default 1 in seconds Tree view +--rw ISIS_LEVEL - | +--rw ISIS_LEVEL_LIST* [instance level-number] + | +--rw ISIS_LEVEL_LIST* [instance level_number] | +--rw instance string - | +--rw level-number level-number - | +--rw lsp-refresh-interval? uint16 - | +--rw lsp-maximum-lifetime? uint16 - | +--rw lsp-generation-interval? uint16 - | +--rw spf-minimum-interval? uint16 + | +--rw level_number stypes:level-number + | +--rw lsp_refresh_interval? uint16 + | +--rw lsp_maximum_lifetime? uint16 + | +--rw lsp_generation_interval? uint16 + | +--rw spf_minimum_interval? uint16 ``` ##### Interface Config @@ -151,41 +149,40 @@ Interface specific ISIS config options. "ISIS_INTERFACE" "instance" :{{string}} "ifname" :{{string}} - "ipv4-routing" :{{{string}}} (OPTIONAL) - "ipv6-routing" :{{{string}}} (OPTIONAL) + "ipv4_routing_instance" :{{{string}}} (OPTIONAL) + "ipv6_routing_instance" :{{{string}}} (OPTIONAL) "passive" :{{boolean}} (OPTIONAL) - "hello-padding" :{{{boolean}}} (OPTIONAL) - "network-type" :{{"UNKNOWN_NETWORK"/"BROADCAST_NETWORK"/"POINT_TO_POINT_NETWOR"/"LOOPBACK"}} (OPTIONAL) - "enable-bfd" :{{{boolean}}} (OPTIONAL) - "bfd-profile" :{{string}} (OPTIONAL) + "hello_padding" :{{{boolean}}} (OPTIONAL) + "network_type" :{{"point-to-point"}} (OPTIONAL) + "enable_bfd" :{{{boolean}}} (OPTIONAL) + "bfd_profile" :{{string}} (OPTIONAL) "metric" :{{UINT32}} (OPTIONAL) - "csnp-interval" :{{{UINT16}}} (OPTIONAL) - "psnp-interval" :{{{UINT16}}} (OPTIONAL) - "hello-interval" :{{{UINT32}}} (OPTIONAL) - "hello-multiplier" :{{UINT16}} (OPTIONAL) - "authentication-key" :{{string}} - "authentication-type" :{{"TEXT"/"MD5HMAC"}} (OPTIONAL) + "csnp_interval" :{{{UINT16}}} (OPTIONAL) + "psnp_interval" :{{{UINT16}}} (OPTIONAL) + "hello_interval" :{{{UINT32}}} (OPTIONAL) + "hello_multiplier" :{{UINT16}} (OPTIONAL) + "authentication_key" :{{string}} + "authentication_type" :{{"clear"/"md5"}} (OPTIONAL) ISIS_INTERFACE|{{instance|ifname}} ; Defines schema for ISIS interface configuration attributes key = ISIS_INTERFACE:instance ; Instance name/area tag key = ISIS_INTERFACE:ifname ; Interface name ; field = value -ipv4-routing = string ; Enable routing IPv4 traffic over this circuit for the given instance -ipv6-routing = string ; Enable routing IPv6 traffic over this circuit for the given instance +ipv4_routing = string ; Enable routing IPv4 traffic over this interface for the given instance +ipv6_routing = string ; Enable routing IPv6 traffic over this interface for the given instance passive = bolean ; Advertise the interface in the ISIS topology, but don't allow it to form adjacencies. Default "false" -hello-padding = boolean ; Add padding to IS-IS hello PDUs -network-type = "UNKNOWN_NETWORK"/"BROADCAST_NETWORK"/"POINT_TO_POINT_NETWOR"/"LOOPBACK" -; ISIS circuit type -enable-bfd = boolean ; Monitor IS-IS peers on this circuit -bfd-profile = string ; Let BFD use a pre-configured profile -metric = UINT32 ; Metric value on a circuit for a given level. Range 0..16777215. Default 0 -csnp-interval = boolean ; Complete Sequence Number PDU (CSNP) generation interval. Range 1..600. Default 10 in seconds -psnp-interval = boolean ; Partial Sequence Number PDU (PSNP) generation interval. Range 1..120. Default 2 in seconds -hello-interval = UINT32 ; Hello interval between consecutive hello messages. Range 1..600. Default 3 in seconds -hello-multiplier = UINT16 ; Multiplier for the hello holding time. Range 2..100. Default 10 -authentication-key = string ; Authentication password -authentication-type = "TEXT"/"MD5HMAC" ; Authentication keychain type +hello_padding = boolean ; Add padding to ISIS hello PDUs +network_type = "point-to-point" ; ISIS interface type +enable_bfd = boolean ; Monitor ISIS peers on this interface +bfd_profile = string ; Let BFD use a pre-configured profile +metric = UINT32 ; Metric value. Range 0..16777215. Default 0 +csnp_interval = boolean ; Complete Sequence Number PDU (CSNP) generation interval. Range 1..600. Default 10 in seconds +psnp_interval = boolean ; Partial Sequence Number PDU (PSNP) generation interval. Range 1..120. Default 2 in seconds +hello_interval = UINT32 ; Hello interval between consecutive hello messages. Range 1..600. Default 3 in seconds +hello_multiplier = UINT16 ; Multiplier for the hello holding time. Range 2..100. Default 10 +authentication_key = string ; Authentication password +authentication_type = "clear"/"md5" ; Authentication keychain type Tree view @@ -193,20 +190,20 @@ Tree view | +--rw ISIS_INTERFACE_LIST* [instance ifname] | +--rw instance string | +--rw ifname string - | +--rw ipv4-routing? string - | +--rw ipv6-routing? string + | +--rw ipv4_routing_instance? string + | +--rw ipv6_routing_instance? string | +--rw passive? boolean - | +--rw hello-padding? boolean - | +--rw network-type? network-type - | +--rw enable-bfd? boolean - | +--rw bfd-profile? string + | +--rw hello_padding? boolean + | +--rw network_type? stypes:network-type + | +--rw enable_bfd? boolean + | +--rw bfd_profile? string | +--rw metric? uint32 - | +--rw csnp-interval? uint16 - | +--rw psnp-interval? uint16 - | +--rw hello-interval? uint32 - | +--rw hello-multiplier? uint16 - | +--rw authentication-key? string - | +--rw authentication-type? "TEXT"/"MD5HMAC" + | +--rw csnp_interval? uint16 + | +--rw psnp_interval? uint16 + | +--rw hello_interval? uint32 + | +--rw hello_multiplier? uint16 + | +--rw authentication_key? string + | +--rw authentication_type? stypes:authentication-type ``` #### YANG Model Enhancements @@ -226,57 +223,51 @@ Global ISIS Yang container is sonic-isis.yang. leaf instance { type string; description - "The identifier for this instance of ISIS. Area-tag"; + "The identifier for this instance of IS-IS. Area-tag"; } leaf net { - type net-address; + type stypes:net-address; description - "ISIS network entity title (NET). The first 8 bits are usually - 49 (private AFI), next 16 bits represent area, next 48 bits represent - system id and final 8 bits are set to 0."; - reference - "International Organization for Standardization, Information - technology - Open Systems Interconnection-Network service - Definition - ISO/ IEC 8348:2002."; + "IS-IS OSI network entity title (NET) address."; } - leaf level-capability { - type level-capability; + leaf level_capability { + type stypes:level-capability; default "level-1-2"; description - "ISIS level capability (level-1, level-2, level-1-2)."; + "IS-IS level capability (level-1, level-2, level-1-2)."; } - leaf dynamic-hostname { + leaf dynamic_hostname { type boolean; default "true"; description "Dynamic hostname support for IS-IS."; } - leaf attach-send { + leaf attach_send { type boolean; default "true"; description "For an L1 or L2 router, attached bits are sent in an LSP when set to true."; } - leaf attach-receive-ignore { + leaf attach_receive_ignore { type boolean; default "false"; description "For an L1 router, attached bits received in an LSP create a default route when set to false"; } - leaf set-overload-bit { + leaf set_overload_bit { type boolean; default "false"; description "Administratively enable the overload bit."; } - leaf lsp-mtu-size { + leaf lsp_mtu_size { type uint16 { range "128..4352"; } @@ -285,68 +276,72 @@ Global ISIS Yang container is sonic-isis.yang. "LSP MTU."; } - leaf spf-init-delay { + leaf spf_init_delay { type uint16 { range "0..60000"; } units "msec"; - must "(not((not(../spf-init-delay)) and ../spf-short-delay and ../spf-long-delay and ../spf-hold-down and ../spf-time-to-learn))" { - error-message "SPF init delay must only be specified if all other spf parameters are specified"; + must "../spf_short_delay and ../spf_long_delay and ../spf_hold_down and ../spf_time_to_learn or not(../spf_init_delay)" { + error-message + "SPF init delay must only be specified if all other SPF parameters are specified"; } description "Delay used during QUIET state"; } - leaf spf-short-delay { + leaf spf_short_delay { type uint16 { range "0..60000"; } units "msec"; - must "(not((not(../spf-short-delay)) and ../spf-init-delay and ../spf-long-delay and ../spf-hold-down and ../spf-time-to-learn))" { - error-message "SPF short delay must only be specified if all other spf parameters are specified"; + must "../spf_init_delay and ../spf_long_delay and ../spf_hold_down and ../spf_time_to_learn or not(../spf_short_delay)" { + error-message + "SPF short delay must only be specified if all other SPF parameters are specified"; } description "Delay used during SHORT_WAIT state"; } - leaf spf-long-delay { + leaf spf_long_delay { type uint16 { range "0..60000"; } units "msec"; - must "(not((not(../spf-long-delay)) and ../spf-init-delay and ../spf-short-delay and ../spf-hold-down and ../spf-time-to-learn))" { - error-message "SPF long delay must only be specified if all other spf parameters are specified"; + must "../spf_init_delay and ../spf_short_delay and ../spf_hold_down and ../spf_time_to_learn or not(../spf_long_delay)" { + error-message + "SPF long delay must only be specified if all other SPF parameters are specified"; } description "Delay used during LONG_WAIT state"; } - leaf spf-hold-down { + leaf spf_hold_down { type uint16 { range "0..60000"; } units "msec"; - must "(not((not(../spf-hold-down)) and ../spf-short-delay and ../spf-long-delay and ../spf-init-delay and ../spf-time-to-learn))" { - error-message "SPF hold down must only be specified if all other spf parameters are specified"; + must "../spf_init_delay and ../spf_short_delay and ../spf_long_delay and ../spf_time_to_learn or not(../spf_hold_down)" { + error-message + "SPF hold down must only be specified if all other SPF parameters are specified"; } description "Period of time without IGP events before considering IGP stable"; } - leaf spf-time-to-learn { + leaf spf_time_to_learn { type uint16 { range "0..60000"; } units "msec"; - must "(not((not(../spf-time-to-learn)) and ../spf-short-delay and ../spf-long-delay and ../spf-hold-down and ../spf-init-delay))" { - error-message "SPF time-to-learn must only be specified if all other spf parameters are specified"; + must "../spf_init_delay and ../spf_short_delay and ../spf_long_delay and ../spf_hold_down or not(../spf_time_to_learn)" { + error-message + "SPF time_to_learn must only be specified if all other SPF parameters are specified"; } description - "Maximum time needed to learn all of the events related to a - failure"; + "Maximum time needed to learn all of the events related to a failure"; } - leaf log-adjacency-changes { + leaf log_adjacency_changes { type boolean; default "false"; description @@ -370,21 +365,21 @@ ISIS Level Yang container is sonic-isis.yang. "Configuration parameters related to a particular level within the IS-IS protocol instance"; - key "instance level-number"; + key "instance level_number"; leaf instance { type string; description - "The identifier for this instance of ISIS. Area-tag"; + "The identifier for this instance of IS-IS. Area-tag"; } - leaf level-number { - type level-number; + leaf level_number { + type stypes:level-number; description - "ISIS level number."; + "IS-IS level number."; } - leaf lsp-refresh-interval { + leaf lsp_refresh_interval { type uint16; units "seconds"; default "900"; @@ -392,29 +387,35 @@ ISIS Level Yang container is sonic-isis.yang. "LSP refresh interval."; } - leaf lsp-maximum-lifetime { + leaf lsp_maximum_lifetime { type uint16 { range "350..65535"; } units "seconds"; - must ". >= ../lsp-refresh-interval + 300"; + must "(. >= ../lsp_refresh_interval + 300)" { + error-message + "lsp_maximum_lifetime must be at least 300 seconds greater than lsp_refresh_interval"; + } default "1200"; description "Maximum LSP lifetime."; } - leaf lsp-generation-interval { + leaf lsp_generation_interval { type uint16 { range "1..120"; } units "seconds"; - must ". < ../lsp-refresh-interval"; + must "(. < ../lsp_refresh_interval)" { + error-message + "lsp_generation_interval must be greater than lsp_refresh_interval"; + } default "30"; description "Minimum time before an LSP retransmissions."; } - leaf spf-minimum-interval { + leaf spf_minimum_interval { type uint16 { range "1..120"; } @@ -446,21 +447,21 @@ ISIS Interface Yang container is sonic-isis.yang. leaf instance { type string; description - "The identifier for this instance of ISIS. Area-tag"; + "The identifier for this instance of IS-IS. Area-tag"; } leaf ifname { type string; description - "Interface for which ISIS configuration is to be applied."; + "Interface for which IS-IS configuration is to be applied."; } - leaf ipv4-routing-instance { + leaf ipv4_routing_instance { type string; description "Routing IS-IS IPv4 traffic over this interface for the given instance."; } - leaf ipv6-routing-instance { + leaf ipv6_routing_instance { type string; description "Routing IS-IS IPv6 traffic over this interface for the given instance."; @@ -475,28 +476,27 @@ ISIS Interface Yang container is sonic-isis.yang. systems, but is advertised into the IS-IS topology."; } - leaf hello-padding { + leaf hello_padding { type boolean; default "true"; description "When true, padding is added to IS-IS hello PDUs."; } - leaf network-type { - type network-type; - default "BROADCAST_NETWORK"; + leaf network_type { + type stypes:network-type; description - "ISIS interface type (p2p, broadcast, loopback, unknown)."; + "IS-IS interface type (point-to-point)."; } - leaf enable-bfd { + leaf enable_bfd { type boolean; default "false"; description "Monitor IS-IS peers on this interface."; } - leaf bfd-profile { + leaf bfd_profile { type string; description "Set BFD to use a pre-configured profile."; @@ -511,7 +511,7 @@ ISIS Interface Yang container is sonic-isis.yang. "The metric value of this interface."; } - leaf csnp-interval { + leaf csnp_interval { type uint16 { range "1..600"; } @@ -521,7 +521,7 @@ ISIS Interface Yang container is sonic-isis.yang. "Complete Sequence Number PDU (CSNP) generation interval."; } - leaf psnp-interval { + leaf psnp_interval { type uint16 { range "1..120"; } @@ -531,7 +531,7 @@ ISIS Interface Yang container is sonic-isis.yang. "Partial Sequence Number PDU (PSNP) generation interval."; } - leaf hello-interval { + leaf hello_interval { type uint32 { range "1..600"; } @@ -541,7 +541,7 @@ ISIS Interface Yang container is sonic-isis.yang. "Hello interval between consecutive hello messages. Interval will depend on multiplier."; } - leaf hello-multiplier { + leaf hello_multiplier { type uint16 { range "2..100"; } @@ -562,66 +562,48 @@ Authentication leafs used to define isis authentication options. ``` - grouping isis-authentication { - - leaf authentication-key { - type string { - length "1..254"; - } - must "(not((not(../authentication-key)) and ../authentication-type))" { - error-message "ISIS authentication-key must only be specified if authentication-type is specified"; + grouping isis-authentication { + leaf authentication_key { + type string { + length "1..254"; } - description - "Authentication password."; - } - - leaf authentication-type { - type enumeration { - enum "TEXT" { - value 1; - description - "Clear text authentication type."; - } - enum "MD5HMAC" { - value 2; - description - "MD5 authentication type."; - } + must "(../authentication_type or not(../authentication_key))" { + error-message + "If authentication_key is specified, then authentication_type must also be specified."; } - must "(not((not(../authentication-type)) and ../authentication-key))" { - error-message "ISIS authentication-type must only be specified if authentication-key is specified"; + description + "Authentication password."; + } + + leaf authentication_type { + type stypes:authentication-type; + must "(../authentication_key or not(../authentication_type))" { + error-message + "If authentication_type is specified, then authentication_key must also be specified."; } - description - "This grouping defines keychain configuration type."; - } - } + description + "This grouping defines keychain configuration type."; + } + } ``` ##### SONiC ISIS Defined Types -Types defined in sonic-isis.yang. +Types defined in sonic-types.yang.j2. ``` typedef net-address { type string { pattern "[a-fA-F0-9]{2}(\\.[a-fA-F0-9]{4}){3,9}\\.[a-fA-F0-9]{2}"; - } + } description - "This type defines an OSI NET address, - Example: 49.0123.4567.8910.00"; + "An IS-IS OSI NET address. + An example NET address looks something like 49.0001.0143.0438.00."; } typedef level-number { type enumeration { - enum "level-1" { - value 1; - description - "L1-only capability."; - } - enum "level-2" { - value 2; - description - "L2-only capability."; - } + enum "level-1"; + enum "level-2"; } description "This type defines IS-IS level options for level specific configurations."; @@ -631,11 +613,7 @@ Types defined in sonic-isis.yang. type union { type level-number; type enumeration { - enum "level-1-2" { - value 3; - description - "L1 and L2 capability."; - } + enum "level-1-2"; } } description @@ -644,28 +622,21 @@ Types defined in sonic-isis.yang. typedef network-type { type enumeration { - enum "UNKNOWN_NETWORK" { - value 0; - description - "Unknown network type."; - } - enum "BROADCAST_NETWORK" { - value 1; - description - "Broadcast interface network type."; - } - enum "POINT_TO_POINT_NETWORK" { - value 2; - description - "Point-to-point interface network type."; - } - enum "LOOPBACK" { - value 3; - description - "Loopback interface network type."; - } + enum "point-to-point"; } + description + "Configure a circuit to operate as point-to-point + else the circuit defaults to broadcast."; } + + typedef authentication-type { + type enumeration { + enum "clear"; + enum "md5"; + } + description + "IS-IS authentication key encrypt type"; + } ``` ### Testing Requirements/Design @@ -678,4 +649,4 @@ Extensive system test cases to cover FRR-ISIS YANG features - Verify configs are properly stored in Redis DB ### Open/Action items - if any -Is there a way to better align the custom yang models designed for SONiC FRR-ISIS with Open Config ISIS models ? Not all FRR-ISIS features are compatible with Open Configs' models. + From c7f54e19ff4f050ce7aec6f7050c2742d489fd9f Mon Sep 17 00:00:00 2001 From: cchoate Date: Thu, 11 May 2023 19:05:57 -0700 Subject: [PATCH 11/12] Addressing PR comments on yang model changes and including a small section about the copp_table exemption --- doc/isis/frr-isis-sonic-config-support-hld.md | 27 +- doc/isis/frr-isis-sonic-yang-model-hld.md | 285 +++++++++++------- 2 files changed, 192 insertions(+), 120 deletions(-) diff --git a/doc/isis/frr-isis-sonic-config-support-hld.md b/doc/isis/frr-isis-sonic-config-support-hld.md index d7702ec2ff..f0dfdf484b 100644 --- a/doc/isis/frr-isis-sonic-config-support-hld.md +++ b/doc/isis/frr-isis-sonic-config-support-hld.md @@ -11,6 +11,7 @@ - [Requirements](#requirements) - [Functional and Configuration Requirements](#functional-and-configuration-requirements) - [Exemptions](#exemptions) + - [COPP_TRAP](#copp_trap) - [Architecture Design](#architecture-design) - [High-Level Design](#high-level-design) - [Design Overview](#design-overview) @@ -33,7 +34,7 @@ ### Revision | Rev | Date | Author | Change Description | | :--- | :-------------- | :------ | :---------------- | -| 0.1 | April-11-2023 | C Choate | Initial version | +| 0.1 | May-11-2023 | C Choate | Initial version | ### Scope @@ -71,6 +72,18 @@ This is an addition to previous feature work to support FRR-BGP. Details on the #### Exemptions Adding support for multi-linecard chassis is out of scope for this document. +##### COPP_TRAP +There is existing support in SONiC to add additional trap_ids to the COPP_TRAP table outlined in [Sonic Control Plane Policing configuration and management](https://github.com/sonic-net/SONiC/blob/master/doc/copp/CoPP%20Config%20and%20Management.md). To support isis within the COPP_TRAP table, it needs to be added under the 'bgp' container within the 'trap_ids' leaf like below. +''' +"COPP_TRAP": { + "bgp": { + "trap_ids": "bgp,bgpv6,isis", + "trap_group": "queue4_group1", + "always_enabled": "true" + } +} +''' + ### Architecture Design There are no changes to the existing SONiC architecture. This new feature enhances existing code to include configuration support for the isisd daemon within the FRR container. Testing showed that with the isisd deamon enabled, ISIS routes are being learned directly from the FRR container without needing any changes to the existing orchagent or swss. It was observed that fpmsyncd works to push all of the ISIS learned routes from the FRR container to SONiC DB’s. @@ -93,10 +106,8 @@ This enhancement will support FRR-ISIS features used in SONiC and all changes wi - SONiC FRR-ISIS YANG models and YANG validation tests - /src/sonic-yang-models -- FRR-ISIS config template files and isisd enabled by default in the FRR container +- Enable isisd daemon when frr_mgmt_framework_config is set to "true" - /dockers/docker-fpm-frr -- Enable ISIS trap messages - - /files/image_config/copp - Added support for ISIS tables in frrcfgd and extended frrcfgd unit tests for FRR-ISIS configs - /src/sonic-frr-mgmt-framework - Support ISIS show commands and show command unittests @@ -109,7 +120,7 @@ This enhancement will support FRR-ISIS features used in SONiC and all changes wi There will be changes in following containers, - Extend frrcfgd support for FRR-ISIS - sonic-mgmt-framework -- Enable the isisd daemon by default +- Enable the isisd daemon only when frr_mgmt_framework_config is set to "true" - bgp ### SAI API @@ -327,7 +338,7 @@ Added new configuration tables specific to FRR_ISIS features: - ISIS_GLOBAL - ISIS router globally applicable configurations -- ISIS_LEVEL +- ISIS_LEVELS - ISIS router level specific configurations - ISIS_INTERFACE - ISIS router interface specific configurations @@ -342,7 +353,7 @@ Detailed Yang model changes can be found at #### FRR Template Changes -A new FRR-ISIS template, "isisd.conf.j2" has been made to support the non-integrated config management feature and will be saved in "/etc/frr/isisd.conf" on an FRR container startup. The FRR template, "frr.conf.j2" has been updated to include FRR-ISIS template file "isisd.conf.j2" to support the unified config managemnt feature. +A new FRR-ISIS template, "isisd.conf.j2" has been made to support the non-integrated config management feature and will be saved in "/etc/frr/isisd.conf" on an FRR container startup when frr_mgmt_framework_config is set to "true". The FRR template, "frr.conf.j2" has been updated to include FRR-ISIS template file "isisd.conf.j2" to support the unified config managemnt feature. ### Warmboot and Fastboot Design Impact @@ -376,4 +387,4 @@ New tests will also be published into sonic-mgmt for ISIS ### Open/Action items -Could the FRR container be renamed from 'bgp' to 'frr' ? +Could the FRR container be renamed from 'bgp' to something like 'frr' ? diff --git a/doc/isis/frr-isis-sonic-yang-model-hld.md b/doc/isis/frr-isis-sonic-yang-model-hld.md index aee0103fe0..b589b8a9b6 100644 --- a/doc/isis/frr-isis-sonic-yang-model-hld.md +++ b/doc/isis/frr-isis-sonic-yang-model-hld.md @@ -10,11 +10,11 @@ - [High-Level Design](#high-level-design) - [CONFIG DB](#config-db) - [Global Config](#global-config) - - [Level Config](#level-config) + - [Levels Config](#levels-config) - [Interface Config](#interface-config) - [YANG Model Enhancements](#yang-model-enhancements) - [SONiC ISIS Global](#sonic-isis-global) - - [SONiC ISIS Level](#sonic-isis-level) + - [SONiC ISIS Levels](#sonic-isis-levels) - [SONiC ISIS Interface](#sonic-isis-interface) - [SONiC ISIS Authentication Groupings](#sonic-isis-authentication-groupings) - [SONiC ISIS Defined Types](#sonic-isis-defined-types) @@ -24,7 +24,7 @@ ### Revision | Rev | Date | Author | Change Description | | :--- | :--------- | :------ | :---------------- | -| 0.1 | April-11-2023 | C Choate | Initial version | +| 0.1 | May-11-2023 | C Choate | Initial version | ### Scope @@ -41,7 +41,7 @@ This document provides general information about the initial design for the ISIS | MTU | Maximum Transmission Unit | | PSNP | Partial Sequence Number PDU | | SPF | Sender Policy Framework | -| SR | Segment Routing | +| VRF | Virtual Routing and Forwarding | ### Overview This document provides general information about the initial design for the ISIS YANG model in the SONiC infrastructure. @@ -55,9 +55,10 @@ Global ISIS config options. ``` "ISIS_GLOBAL" + "vrf_name" :{{1\*15VCHAR}} "instance" :{{string}} - "net" :{{stypes:net-address}} (OPTIONAL) - "level_capability" :{{"level-1"/"level-2"/"level-1-2"}} (OPTIONAL) + "net" :{{net}} (OPTIONAL) + "level_capability" :{{"LEVEL_1"/"LEVEL_2"/"LEVEL_1_2"}} (OPTIONAL) "dynamic_hostname" :{{boolean}} (OPTIONAL) "attach_send" :{{boolean}} (OPTIONAL) "attach_receive_ignore" :{{boolean}} (OPTIONAL) @@ -72,12 +73,13 @@ Global ISIS config options. * If an SPF value is specified, all other global SPF values must also be specified -ISIS_GLOBAL|{{instance}} +ISIS_GLOBAL|{{vrf_name|instance}} ; Defines schema for global ISIS configuration attributes +key = ISIS_GLOBAL:vrf_name ; VRF name should be "default" or prefixed with "Vrf" for user VRFs key = ISIS_GLOBAL:instance ; Instance name/area tag ; field = value -net = stypes:net-address ; OSI NET address. Format: xx.xxxx.xxxx.xxxx.xx -level_capability = "level-1"/"level-2"/"level-1-2" ; ISIS level capability +net = net ; OSI NET address. Format: xx.xxxx.xxxx.xxxx.xx +level_capability = "LEVEL_1"/"LEVEL_2"/"LEVEL_1_2" ; ISIS level capability dynamic_hostname = boolean ; Dynamic-hostname support. Default "true" attach_send = boolean ; Send attached bits in LSP for inter-area traffic. Default "true" attach_receive_ignore = boolean ; Attached bits recieved in LSP cause default route add. Default "false" @@ -92,15 +94,16 @@ log_adjacency_changes = boolean ; Log changes to this instanc Tree view +--rw ISIS_GLOBAL - | +--rw ISIS_GLOBAL_LIST* [instance] + | +--rw ISIS_GLOBAL_LIST* [vrf_name instance] + | +--rw vrf_name 1\*15VCHAR | +--rw instance string - | +--rw net? stypes:net-address - | +--rw level_capability? stypes:level-capability + | +--rw net? net + | +--rw level_capability? level-capability | +--rw dynamic_hostname? boolean | +--rw attach_send? boolean | +--rw attach_receive_ignore? boolean | +--rw set_overload_bit? boolean - | +--rw lsp_mtu_size? UINT16 + | +--rw lsp_mtu_size? uint16 | +--rw spf_init_delay uint16 | +--rw spf_short_delay uint16 | +--rw spf_long_delay uint16 @@ -109,22 +112,24 @@ Tree view | +--rw log_adjacency_changes? boolean ``` -##### Level Config +##### Levels Config Level specific ISIS config options. ``` -"ISIS_LEVEL" +"ISIS_LEVELS" + "vrf_name" :{{1\*15VCHAR}} "instance" :{{string}} - "level_number" :{{"level-1"/"level-2"}} + "level_number" :{{uint8}} "lsp_refresh_interval" :{{UINT16}} (OPTIONAL) "lsp_maximum_lifetime" :{{UINT16}} (OPTIONAL) "lsp_generation_interval" :{{UINT16}} (OPTIONAL) "spf_minimum_interval" :{{UINT16}} (OPTIONAL) -ISIS_LEVEL|{{instance|level_number}} +ISIS_LEVELS|{{vrf_name|instance|level_number}} ; Defines schema for ISIS level configuration attributes +key = ISIS_GLOBAL:vrf_name ; VRF name should be "default" or prefixed with "Vrf" for user VRFs key = ISIS_LEVEL:instance ; Instance name/area tag -key = ISIS_LEVEL:level_number ; Level number. ("level-1"/"level-2") +key = ISIS_LEVEL:level_number ; Level number. (1..2) ; field = value lsp_refresh_interval = UINT16 ; LSP refresh interval. Default 900 in seconds lsp_maximum_lifetime = UINT16 ; Maximum LSP lifetime. Range 350..65535. Default 1200 in seconds. Must be at least 300 seconds more than lsp_refresh_interval @@ -132,10 +137,11 @@ lsp_generation_interval = UINT16 ; Minimum time allowed spf_minimum_interval = UINT16 ; Minimum time between consecutive SPFs. Range 1..120. Default 1 in seconds Tree view - +--rw ISIS_LEVEL - | +--rw ISIS_LEVEL_LIST* [instance level_number] + +--rw ISIS_LEVELS + | +--rw ISIS_LEVELS_LIST* [vrf_name instance level_number] + | +--rw vrf_name 1\*15VCHAR | +--rw instance string - | +--rw level_number stypes:level-number + | +--rw level_number uint8 | +--rw lsp_refresh_interval? uint16 | +--rw lsp_maximum_lifetime? uint16 | +--rw lsp_generation_interval? uint16 @@ -153,7 +159,7 @@ Interface specific ISIS config options. "ipv6_routing_instance" :{{{string}}} (OPTIONAL) "passive" :{{boolean}} (OPTIONAL) "hello_padding" :{{{boolean}}} (OPTIONAL) - "network_type" :{{"point-to-point"}} (OPTIONAL) + "network_type" :{{"POINT_TO_POINT"/"BROADCAST"}} (OPTIONAL) "enable_bfd" :{{{boolean}}} (OPTIONAL) "bfd_profile" :{{string}} (OPTIONAL) "metric" :{{UINT32}} (OPTIONAL) @@ -162,7 +168,7 @@ Interface specific ISIS config options. "hello_interval" :{{{UINT32}}} (OPTIONAL) "hello_multiplier" :{{UINT16}} (OPTIONAL) "authentication_key" :{{string}} - "authentication_type" :{{"clear"/"md5"}} (OPTIONAL) + "authentication_type" :{{"TEXT"/"MD5"}} (OPTIONAL) ISIS_INTERFACE|{{instance|ifname}} ; Defines schema for ISIS interface configuration attributes @@ -173,7 +179,7 @@ ipv4_routing = string ; Enable routing IPv4 ipv6_routing = string ; Enable routing IPv6 traffic over this interface for the given instance passive = bolean ; Advertise the interface in the ISIS topology, but don't allow it to form adjacencies. Default "false" hello_padding = boolean ; Add padding to ISIS hello PDUs -network_type = "point-to-point" ; ISIS interface type +network_type = "POINT_TO_POINT"/"BROADCAST" ; ISIS interface type enable_bfd = boolean ; Monitor ISIS peers on this interface bfd_profile = string ; Let BFD use a pre-configured profile metric = UINT32 ; Metric value. Range 0..16777215. Default 0 @@ -182,7 +188,7 @@ psnp_interval = boolean ; Partial Sequence Nu hello_interval = UINT32 ; Hello interval between consecutive hello messages. Range 1..600. Default 3 in seconds hello_multiplier = UINT16 ; Multiplier for the hello holding time. Range 2..100. Default 10 authentication_key = string ; Authentication password -authentication_type = "clear"/"md5" ; Authentication keychain type +authentication_type = "TEXT"/"MD5" ; Authentication keychain type Tree view @@ -194,7 +200,7 @@ Tree view | +--rw ipv6_routing_instance? string | +--rw passive? boolean | +--rw hello_padding? boolean - | +--rw network_type? stypes:network-type + | +--rw network_type? circuit-type | +--rw enable_bfd? boolean | +--rw bfd_profile? string | +--rw metric? uint32 @@ -203,7 +209,7 @@ Tree view | +--rw hello_interval? uint32 | +--rw hello_multiplier? uint16 | +--rw authentication_key? string - | +--rw authentication_type? stypes:authentication-type + | +--rw authentication_type? AUTH_MODE ``` #### YANG Model Enhancements @@ -218,25 +224,43 @@ Global ISIS Yang container is sonic-isis.yang. max-elements "1"; - key "instance"; + key "vrf_name instance"; + + leaf vrf_name { + type union { + type string { + pattern "default"; + } + type leafref { + path "/vrf:sonic-vrf/vrf:VRF/vrf:VRF_LIST/vrf:name"; + } + } + must "not(../../../ISIS_LEVELS/ISIS_LEVELS_LIST) or (../../../ISIS_LEVELS/ISIS_LEVELS_LIST[vrf_name=current()/../vrf_name])" { + error-message "The value of ISIS_GLOBAL 'vrf_name' must be the same as 'vrf_name' in ISIS_LEVELS."; + } + description "VRF name"; + } leaf instance { type string; description "The identifier for this instance of IS-IS. Area-tag"; + must "not(../../../ISIS_LEVELS/ISIS_LEVELS_LIST) or (../../../ISIS_LEVELS/ISIS_LEVELS_LIST[instance=current()/../instance])" { + error-message "The value of ISIS_GLOBAL 'instance' must be the same as 'instance' in ISIS_LEVELS."; + } } leaf net { - type stypes:net-address; + type net; description "IS-IS OSI network entity title (NET) address."; } leaf level_capability { - type stypes:level-capability; - default "level-1-2"; + type level-type; + default "LEVEL_1_2"; description - "IS-IS level capability (level-1, level-2, level-1-2)."; + "IS-IS level capability (LEVEL_1, LEVEL_2, LEVEL_1_2)."; } leaf dynamic_hostname { @@ -282,11 +306,9 @@ Global ISIS Yang container is sonic-isis.yang. } units "msec"; must "../spf_short_delay and ../spf_long_delay and ../spf_hold_down and ../spf_time_to_learn or not(../spf_init_delay)" { - error-message - "SPF init delay must only be specified if all other SPF parameters are specified"; + error-message "SPF init delay must only be specified if all other SPF parameters are specified"; } - description - "Delay used during QUIET state"; + description "Delay used during QUIET state"; } leaf spf_short_delay { @@ -295,11 +317,9 @@ Global ISIS Yang container is sonic-isis.yang. } units "msec"; must "../spf_init_delay and ../spf_long_delay and ../spf_hold_down and ../spf_time_to_learn or not(../spf_short_delay)" { - error-message - "SPF short delay must only be specified if all other SPF parameters are specified"; + error-message "SPF short delay must only be specified if all other SPF parameters are specified"; } - description - "Delay used during SHORT_WAIT state"; + description "Delay used during SHORT_WAIT state"; } leaf spf_long_delay { @@ -308,11 +328,9 @@ Global ISIS Yang container is sonic-isis.yang. } units "msec"; must "../spf_init_delay and ../spf_short_delay and ../spf_hold_down and ../spf_time_to_learn or not(../spf_long_delay)" { - error-message - "SPF long delay must only be specified if all other SPF parameters are specified"; + error-message "SPF long delay must only be specified if all other SPF parameters are specified"; } - description - "Delay used during LONG_WAIT state"; + description "Delay used during LONG_WAIT state"; } leaf spf_hold_down { @@ -321,11 +339,9 @@ Global ISIS Yang container is sonic-isis.yang. } units "msec"; must "../spf_init_delay and ../spf_short_delay and ../spf_long_delay and ../spf_time_to_learn or not(../spf_hold_down)" { - error-message - "SPF hold down must only be specified if all other SPF parameters are specified"; + error-message "SPF hold down must only be specified if all other SPF parameters are specified"; } - description - "Period of time without IGP events before considering IGP stable"; + description "Period of time without IGP events before considering IGP stable"; } leaf spf_time_to_learn { @@ -334,11 +350,9 @@ Global ISIS Yang container is sonic-isis.yang. } units "msec"; must "../spf_init_delay and ../spf_short_delay and ../spf_long_delay and ../spf_hold_down or not(../spf_time_to_learn)" { - error-message - "SPF time_to_learn must only be specified if all other SPF parameters are specified"; + error-message "SPF time_to_learn must only be specified if all other SPF parameters are specified"; } - description - "Maximum time needed to learn all of the events related to a failure"; + description "Maximum time needed to learn all of the events related to a failure"; } leaf log_adjacency_changes { @@ -353,30 +367,50 @@ Global ISIS Yang container is sonic-isis.yang. } // container ISIS_GLOBAL ``` -##### SONiC ISIS Level -ISIS Level Yang container is sonic-isis.yang. +##### SONiC ISIS Levels +ISIS Levels Yang container is sonic-isis.yang. ``` - container ISIS_LEVEL { +\ container ISIS_LEVELS { - list ISIS_LEVEL_LIST { + list ISIS_LEVELS_LIST { description "Configuration parameters related to a particular level within the IS-IS protocol instance"; - key "instance level_number"; + key "vrf_name instance level_number"; + + leaf vrf_name { + type union { + type string { + pattern "default"; + } + type leafref { + path "/vrf:sonic-vrf/vrf:VRF/vrf:VRF_LIST/vrf:name"; + } + } + must "not(../../../ISIS_GLOBAL/ISIS_GLOBAL_LIST) or (../../../ISIS_GLOBAL/ISIS_GLOBAL_LIST[vrf_name=current()/../vrf_name])" { + error-message "The value of ISIS_LEVELS 'vrf_name' must be the same as 'vrf_name' in ISIS_GLOBAL."; + } + description "VRF name"; + } leaf instance { type string; + must "not(../../../ISIS_GLOBAL/ISIS_GLOBAL_LIST) or (../../../ISIS_GLOBAL/ISIS_GLOBAL_LIST[instance=current()/../instance])" { + error-message "The value of ISIS_LEVELS 'instance' must be the same as 'instance' in ISIS_GLOBAL."; + } description "The identifier for this instance of IS-IS. Area-tag"; } leaf level_number { - type stypes:level-number; + type uint8 { + range "1..2"; + } description - "IS-IS level number."; + "IS-IS level number (1..2)."; } leaf lsp_refresh_interval { @@ -393,8 +427,7 @@ ISIS Level Yang container is sonic-isis.yang. } units "seconds"; must "(. >= ../lsp_refresh_interval + 300)" { - error-message - "lsp_maximum_lifetime must be at least 300 seconds greater than lsp_refresh_interval"; + error-message "lsp_maximum_lifetime must be at least 300 seconds greater than lsp_refresh_interval"; } default "1200"; description @@ -407,8 +440,7 @@ ISIS Level Yang container is sonic-isis.yang. } units "seconds"; must "(. < ../lsp_refresh_interval)" { - error-message - "lsp_generation_interval must be greater than lsp_refresh_interval"; + error-message "lsp_generation_interval must be greater than lsp_refresh_interval"; } default "30"; description @@ -425,9 +457,9 @@ ISIS Level Yang container is sonic-isis.yang. "Minimum time between consecutive SPFs."; } - } // list ISIS_LEVEL_LIST + } // list ISIS_LEVELS_LIST - } // container ISIS_LEVEL + } // container ISIS_LEVELS ``` ##### SONiC ISIS Interface @@ -445,24 +477,45 @@ ISIS Interface Yang container is sonic-isis.yang. key "instance ifname"; leaf instance { - type string; + type union { + type leafref { + path "../../../ISIS_GLOBAL/ISIS_GLOBAL_LIST/instance"; + } + type leafref { + path "../../../ISIS_LEVELS/ISIS_LEVELS_LIST/instance"; + } + } description "The identifier for this instance of IS-IS. Area-tag"; } leaf ifname { - type string; + type union { + type leafref { + path "/port:sonic-port/port:PORT/port:PORT_LIST/port:name"; + } + type leafref { + path "/lag:sonic-portchannel/lag:PORTCHANNEL/lag:PORTCHANNEL_LIST/lag:name"; + } + type leafref { + path "/lo:sonic-loopback-interface/lo:LOOPBACK_INTERFACE/lo:LOOPBACK_INTERFACE_LIST/lo:name"; + } + } description "Interface for which IS-IS configuration is to be applied."; } leaf ipv4_routing_instance { - type string; + type leafref { + path "../../../ISIS_GLOBAL/ISIS_GLOBAL_LIST/instance"; + } description "Routing IS-IS IPv4 traffic over this interface for the given instance."; } leaf ipv6_routing_instance { - type string; + type leafref { + path "../../../ISIS_GLOBAL/ISIS_GLOBAL_LIST/instance"; + } description "Routing IS-IS IPv6 traffic over this interface for the given instance."; } @@ -484,9 +537,9 @@ ISIS Interface Yang container is sonic-isis.yang. } leaf network_type { - type stypes:network-type; + type circuit-type; description - "IS-IS interface type (point-to-point)."; + "IS-IS interface type (POINT_TO_POINT, BROADCAST)."; } leaf enable_bfd { @@ -568,75 +621,83 @@ Authentication leafs used to define isis authentication options. length "1..254"; } must "(../authentication_type or not(../authentication_key))" { - error-message - "If authentication_key is specified, then authentication_type must also be specified."; + error-message "If authentication_key is specified, then authentication_type must also be specified."; } - description - "Authentication password."; + description "Authentication password."; } leaf authentication_type { - type stypes:authentication-type; + type identityref { + base AUTH_MODE; + } must "(../authentication_key or not(../authentication_type))" { - error-message - "If authentication_type is specified, then authentication_key must also be specified."; + error-message "If authentication_type is specified, then authentication_key must also be specified."; } - description - "This grouping defines keychain configuration type."; + description "This grouping defines keychain configuration type (TEXT, MD5)."; } } ``` ##### SONiC ISIS Defined Types -Types defined in sonic-types.yang.j2. +ISIS types defined are from openconfig-isis-types. ``` - typedef net-address { - type string { - pattern "[a-fA-F0-9]{2}(\\.[a-fA-F0-9]{4}){3,9}\\.[a-fA-F0-9]{2}"; - } + identity AUTH_MODE { description - "An IS-IS OSI NET address. - An example NET address looks something like 49.0001.0143.0438.00."; + "Base identify to define the authentication mode"; } - typedef level-number { + identity TEXT { + base AUTH_MODE; + description + "Simple Text Authentication"; + reference "RFC1195"; + } + + identity MD5 { + base AUTH_MODE; + description + "HMAC-MD5 Authentication"; + reference "RFC5304"; + } + + typedef circuit-type { type enumeration { - enum "level-1"; - enum "level-2"; + enum POINT_TO_POINT { + description "This enum describes a point-to-point interface"; + } + enum BROADCAST { + description "This enum describes a broadcast interface"; + } } description - "This type defines IS-IS level options for level specific configurations."; - } + "This type defines ISIS interface types "; + } - typedef level-capability { - type union { - type level-number; - type enumeration { - enum "level-1-2"; + typedef net { + type string { + pattern '[a-fA-F0-9]{2}(\.[a-fA-F0-9]{4}){3,9}\.[a-fA-F0-9]{2}'; } - } description - "This type defines all IS-IS level options capable of being configured."; + "This type defines OSI NET address. A NET should should be in + the form xx.yyyy.yyyy.yyyy.00 with up to 9 sets of yyyy."; } - typedef network-type { + typedef level-type { type enumeration { - enum "point-to-point"; + enum LEVEL_1 { + description "This enum describes ISIS level 1"; + } + enum LEVEL_2 { + description "This enum describes ISIS level 2"; + } + enum LEVEL_1_2 { + description "This enum describes ISIS level 1-2"; + } } description - "Configure a circuit to operate as point-to-point - else the circuit defaults to broadcast."; + "This type defines ISIS level types"; } - - typedef authentication-type { - type enumeration { - enum "clear"; - enum "md5"; - } - description - "IS-IS authentication key encrypt type"; - } ``` ### Testing Requirements/Design From 0b93309734312d21577805f11ce9de7535826126 Mon Sep 17 00:00:00 2001 From: cchoate Date: Thu, 18 May 2023 14:32:33 -0700 Subject: [PATCH 12/12] Addressing PR comments to add a section on adding 'isis' to COPP_TRAP table of FRR container startup --- doc/isis/frr-isis-sonic-config-support-hld.md | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/doc/isis/frr-isis-sonic-config-support-hld.md b/doc/isis/frr-isis-sonic-config-support-hld.md index f0dfdf484b..196560b66b 100644 --- a/doc/isis/frr-isis-sonic-config-support-hld.md +++ b/doc/isis/frr-isis-sonic-config-support-hld.md @@ -11,11 +11,11 @@ - [Requirements](#requirements) - [Functional and Configuration Requirements](#functional-and-configuration-requirements) - [Exemptions](#exemptions) - - [COPP_TRAP](#copp_trap) - [Architecture Design](#architecture-design) - [High-Level Design](#high-level-design) - [Design Overview](#design-overview) - [Change Overview](#change-overview) + - [COPP_TRAP](#copp_trap) - [Container](#container) - [SAI API](#sai-api) - [Configuration and management](#configuration-and-management) @@ -72,18 +72,6 @@ This is an addition to previous feature work to support FRR-BGP. Details on the #### Exemptions Adding support for multi-linecard chassis is out of scope for this document. -##### COPP_TRAP -There is existing support in SONiC to add additional trap_ids to the COPP_TRAP table outlined in [Sonic Control Plane Policing configuration and management](https://github.com/sonic-net/SONiC/blob/master/doc/copp/CoPP%20Config%20and%20Management.md). To support isis within the COPP_TRAP table, it needs to be added under the 'bgp' container within the 'trap_ids' leaf like below. -''' -"COPP_TRAP": { - "bgp": { - "trap_ids": "bgp,bgpv6,isis", - "trap_group": "queue4_group1", - "always_enabled": "true" - } -} -''' - ### Architecture Design There are no changes to the existing SONiC architecture. This new feature enhances existing code to include configuration support for the isisd daemon within the FRR container. Testing showed that with the isisd deamon enabled, ISIS routes are being learned directly from the FRR container without needing any changes to the existing orchagent or swss. It was observed that fpmsyncd works to push all of the ISIS learned routes from the FRR container to SONiC DB’s. @@ -106,14 +94,25 @@ This enhancement will support FRR-ISIS features used in SONiC and all changes wi - SONiC FRR-ISIS YANG models and YANG validation tests - /src/sonic-yang-models -- Enable isisd daemon when frr_mgmt_framework_config is set to "true" +- Enable isisd daemon and add 'isis' to the COPP_TRAP table when frr_mgmt_framework_config is set to "true" - /dockers/docker-fpm-frr -- Added support for ISIS tables in frrcfgd and extended frrcfgd unit tests for FRR-ISIS configs +- Added support for ISIS tables in frrcfgd and extended frrcfgd unit tests for FRR-ISIS configs. Added template files to allow configuration of ISIS tables and add 'isis' to the COPP_TRAP table on FRR container startup - /src/sonic-frr-mgmt-framework - Support ISIS show commands and show command unittests - sonic-utilities/show - sonic-utilities/tests +##### COPP_TRAP +There is existing support in SONiC to add additional trap_ids to the COPP_TRAP table outlined in [Sonic Control Plane Policing configuration and management](https://github.com/sonic-net/SONiC/blob/master/doc/copp/CoPP%20Config%20and%20Management.md). To support isis within the COPP_TRAP table, 'isis' needs to be added under the 'bgp' container within the 'trap_ids' leaf like below. On startup of the FRR container (bgp), if frr_mgmt_framework_config is set to "true", isis will automatically be added to the COPP_TRAP table using the template file isis_copp_trap_config.j2. On startup of the FRR container, if frr_mgmt_framework_config is set to "false", 'isis' will automatically be removed from the COPP_TRAP table. +''' +"COPP_TRAP": { + "bgp": { + "trap_ids": "bgp,bgpv6,isis", + "trap_group": "queue4_group1", + "always_enabled": "true" + } +} +''' #### Container