idnits 2.17.1 draft-vassilev-netmod-network-bridge-05.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 271 has weird spacing: '...address yan...' == Line 274 has weird spacing: '...address yan...' == Line 277 has weird spacing: '...rw type eth...' == Line 290 has weird spacing: '...address yan...' == Line 293 has weird spacing: '...address yan...' == (6 more instances...) -- The document date (February 17, 2021) is 1162 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Unused Reference: 'RFC6241' is defined on line 1627, but no explicit reference was found in the text == Unused Reference: 'RFC6991' is defined on line 1632, but no explicit reference was found in the text Summary: 0 errors (**), 0 flaws (~~), 9 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group V. Vassilev 3 Internet-Draft Lightside Instruments AS 4 Intended status: Standards Track February 17, 2021 5 Expires: August 21, 2021 7 A YANG Data Model for Network Bridge Management 8 draft-vassilev-netmod-network-bridge-05 10 Abstract 12 This document introduces new YANG model of a flow capable network 13 bridge. 15 Status of This Memo 17 This Internet-Draft is submitted in full conformance with the 18 provisions of BCP 78 and BCP 79. 20 Internet-Drafts are working documents of the Internet Engineering 21 Task Force (IETF). Note that other groups may also distribute 22 working documents as Internet-Drafts. The list of current Internet- 23 Drafts is at https://datatracker.ietf.org/drafts/current/. 25 Internet-Drafts are draft documents valid for a maximum of six months 26 and may be updated, replaced, or obsoleted by other documents at any 27 time. It is inappropriate to use Internet-Drafts as reference 28 material or to cite them other than as "work in progress." 30 This Internet-Draft will expire on August 21, 2021. 32 Copyright Notice 34 Copyright (c) 2021 IETF Trust and the persons identified as the 35 document authors. All rights reserved. 37 This document is subject to BCP 78 and the IETF Trust's Legal 38 Provisions Relating to IETF Documents 39 (https://trustee.ietf.org/license-info) in effect on the date of 40 publication of this document. Please review these documents 41 carefully, as they describe your rights and restrictions with respect 42 to this document. Code Components extracted from this document must 43 include Simplified BSD License text as described in Section 4.e of 44 the Trust Legal Provisions and are provided without warranty as 45 described in the Simplified BSD License. 47 Table of Contents 49 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 50 1.1. Terminology . . . . . . . . . . . . . . . . . . . . . . . 2 51 1.1.1. YANG . . . . . . . . . . . . . . . . . . . . . . . . 2 52 1.1.2. Tree Diagrams . . . . . . . . . . . . . . . . . . . . 3 53 1.2. Problem Statement . . . . . . . . . . . . . . . . . . . . 3 54 1.3. Solution . . . . . . . . . . . . . . . . . . . . . . . . 3 55 1.3.1. Forwarding . . . . . . . . . . . . . . . . . . . . . 3 56 1.3.2. Scheduling . . . . . . . . . . . . . . . . . . . . . 4 57 2. Network Bridge Module Tree Diagram . . . . . . . . . . . . . 6 58 3. Network Bridge Flows Module Tree Diagram . . . . . . . . . . 6 59 4. Network Bridge Scheduler Module Tree Diagram . . . . . . . . 9 60 5. Network Bridge Module YANG . . . . . . . . . . . . . . . . . 11 61 6. Network Bridge Flows Module YANG . . . . . . . . . . . . . . 13 62 7. Network Bridge Scheduler Module YANG . . . . . . . . . . . . 23 63 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 34 64 8.1. NETWORK BRIDGE YANG Modules . . . . . . . . . . . . . . . 34 65 9. Security Considerations . . . . . . . . . . . . . . . . . . . 35 66 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 35 67 10.1. Normative References . . . . . . . . . . . . . . . . . . 35 68 10.2. Informational References . . . . . . . . . . . . . . . . 35 69 Appendix A. Example . . . . . . . . . . . . . . . . . . . . . . 35 70 A.1. Model . . . . . . . . . . . . . . . . . . . . . . . . . . 36 71 A.2. Scheduler diagram . . . . . . . . . . . . . . . . . . . . 38 72 A.3. Topology . . . . . . . . . . . . . . . . . . . . . . . . 39 73 A.4. CLI listing . . . . . . . . . . . . . . . . . . . . . . . 39 74 A.5. Configuration Data Instance . . . . . . . . . . . . . . . 41 75 A.6. Companion YANG Data Model for Implementations Not 76 Compliant with NMDA . . . . . . . . . . . . . . . . . . . 51 77 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 54 79 1. Introduction 81 There is a need for a YANG model for management of network bridges. 82 The model should allow the variety of existing forwarding and 83 scheduling technologies to be defined as interoperable modules that 84 can be interconnected and extended. 86 1.1. Terminology 88 1.1.1. YANG 90 The following terms are defined in [RFC7950]: 92 o must statement 94 o augment statement 95 o context node 97 o container 99 o data node 101 o key leaf 103 o leaf 105 o leaf-list 107 o list 109 1.1.2. Tree Diagrams 111 Tree diagrams used in this document follow the notation defined in 112 [RFC8340]. 114 1.2. Problem Statement 116 This document attempts to address the problem of defining YANG model 117 of a network bridge that can be used as common framework by different 118 forwarding and scheduling implementations. 120 1.3. Solution 122 A Network bridge has more then 1 ingress and 1 or more egress ports. 123 It has 1 or more traffic classes. The proposed model splits the 124 design into 2 components - 1) Forwarding component and 2) Scheduling 125 component. The forwarding component is connected to all ingress 126 ports and forwards traffic from them to the scheduler instances 127 connected to the egress ports. The scheduling component is a set of 128 scheduler instances - topologies of interconnected aggregators and 129 filters connected to a single egress port and as many as 130 ingress_ports_count*traffic_class_count datapaths from the forwarding 131 component. 133 1.3.1. Forwarding 135 The simple idea of creating a YANG model for a subset of the original 136 [OpenFlow] specification is used as base for the model for management 137 of the Forwarding Information Base (FIB) of the bridge. 139 1.3.2. Scheduling 141 The scheduler(s) have 1 or more input datapaths and 1 output. To 142 each datapath the forwarding component can forward flows. Many 143 different scheduler implementations have structure based on common 144 modular abstractions flow meters, delay lines, queues, gates and gate 145 control logic that determines the gate states based on variables 146 defined in the flow meter, the delay line or the queue or signals and 147 timers available to the gate control logic algorithm. The concept is 148 illustrated with the following model of a 2 ingress ports, 2 traffic 149 classes implementation of a 2 class strict priority scheduling 150 bridge: 152 ingress0 ingress1 153 V V 154 | | 155 +------------------------------+ 156 | FIB | 157 | class0 class1 | 158 | 0->0 1->0 0->0 1->0 | 159 +------------------------------+ 160 | | | | 161 {M} {M} {M} {M} 162 | | | | 163 \ / \ / 164 \ / \ / 165 +-------+ +-------+ 166 | Queue | | Queue | 167 |=======| |=======| 168 |=======| |=======| 169 |=======| |=======| 170 |=======| |=======| 171 +-------+ +-------+ 172 | | 173 G0 G1 174 +-----------------------------+ 175 | C | 176 | strict-priority | 177 +-----------------------------+ 178 | 179 V 180 egress* 182 The common structure of a scheduler module (S) consisting of topology 183 of consecutive flow-meters (M), gates (G) connected to a common gate 184 control - (C) with a single egress port. A new module type 185 representing delay line (D) is added to the structure of the 186 scheduler before Q. The delay line (D) is important for time- 187 sensitive scheduler models where propagation delays, store-and- 188 forward delays and even programmable delays in some cases need to be 189 represented. For certain time sensitive applications it is important 190 to differentiate between different ports due to rate conversion, 191 store and forward and other factors influencing the behavior of the 192 bridge. This is why the concept of a port class is introduced in the 193 model. 195 v v 196 | | 197 {M0} {Mn} 198 | | 199 +---+ +---+ 200 | D | | D | 201 | e | | e | 202 | l | | l | 203 | a | | a | 204 | y | | y | 205 +---+ +---+ 206 | | 207 +-----+ +-----+ 208 | Q0 | | Qn | 209 |=====| |=====| 210 |=====| ... |=====| 211 |=====| |=====| 212 |=====| |=====| 213 +-----+ +-----+ 214 | | 215 G0 Gn 216 +--------------------+ 217 | C | 218 +--------------------+ 219 | 220 v 222 Depending on the scheduler design the ingress flows can specify 223 different D and Q parameters e.g. D.time=0 means no delay, Q.len=0 224 means no buffering and immediate drop of packets in case the gate is 225 closed. With the submodules collapsed to an integral generic gate 226 controller module (GC) the diagram becomes much simpler. 228 ingress0 ingress1 229 V V 230 | | 231 +------------------------------+ 232 | FIB | 233 | class0 class1 | 234 | 0->0 1->0 0->0 1->0 | 235 +------------------------------+ 236 | | | | 237 +-----------------------------+ 238 | GC | 239 +-----------------------------+ 240 | 241 V 242 egress0 244 Complex scheduler designs exist that can combine several different 245 gate controllers into complex topology. This concept is demonstrated 246 in the example bridge. 248 2. Network Bridge Module Tree Diagram 250 module: ietf-network-bridge 251 +--rw bridge 252 +--rw ports 253 +--rw port* [name] 254 +--rw name string 255 +--rw index? uint64 257 augment /if:interfaces/if:interface: 258 +--rw port-name? -> /bridge/ports/port/name 260 3. Network Bridge Flows Module Tree Diagram 262 module: ietf-network-bridge-flows 263 +--rw packet-in-message 264 | +--rw packet-in-reason? identityref 265 | +--rw ingress? netbr:port-ref 266 | +--rw payload? binary 267 | +--rw match 268 | +--rw in-port? netbr:port-ref 269 | +--rw ethernet-match 270 | | +--rw ethernet-source! 271 | | | +--rw address yang:mac-address 272 | | | +--rw mask? yang:mac-address 273 | | +--rw ethernet-destination! 274 | | | +--rw address yang:mac-address 275 | | | +--rw mask? yang:mac-address 276 | | +--rw ethernet-type! 277 | | +--rw type ether-type 278 | +--rw vlan-match 279 | +--rw vlan-id! 280 | | +--rw vlan-id-present? boolean 281 | | +--rw vlan-id? vlan-id 282 | +--rw vlan-pcp? vlan-pcp 283 +--rw flows 284 +--rw flow* [id] 285 +--rw id flow-id 286 +--rw match 287 | +--rw in-port? netbr:port-ref 288 | +--rw ethernet-match 289 | | +--rw ethernet-source! 290 | | | +--rw address yang:mac-address 291 | | | +--rw mask? yang:mac-address 292 | | +--rw ethernet-destination! 293 | | | +--rw address yang:mac-address 294 | | | +--rw mask? yang:mac-address 295 | | +--rw ethernet-type! 296 | | +--rw type ether-type 297 | +--rw vlan-match 298 | +--rw vlan-id! 299 | | +--rw vlan-id-present? boolean 300 | | +--rw vlan-id? vlan-id 301 | +--rw vlan-pcp? vlan-pcp 302 +--rw actions 303 | +--rw action* [order] 304 | +--rw order int32 305 | +--rw (action)? 306 | +--:(output-action-case) 307 | | +--rw output-action 308 | | +--rw out-port? netbr:port-ref 309 | | +--rw max-length? uint16 310 | +--:(controller-action-case) 311 | | +--rw controller-action 312 | | +--rw max-length? uint16 313 | +--:(drop-action-case) 314 | | +--rw drop-action! 315 | +--:(pop-vlan-action-case) 316 | | +--rw pop-vlan-action! 317 | +--:(push-vlan-action-case) 318 | | +--rw push-vlan-action 319 | | +--rw ethernet-type? ether-type 320 | | +--rw pcp? vlan-pcp 321 | | +--rw cfi? vlan-cfi 322 | | +--rw vlan-id? vlan-id 323 | +--:(set-vlan-cfi-action-case) 324 | | +--rw set-vlan-cfi-action 325 | | +--rw vlan-cfi? vlan-cfi 326 | +--:(set-vlan-id-action-case) 327 | | +--rw set-vlan-id-action 328 | | +--rw vlan-id? vlan-id 329 | +--:(set-vlan-pcp-action-case) 330 | | +--rw set-vlan-pcp-action 331 | | +--rw vlan-pcp? vlan-pcp 332 | +--:(strip-vlan-action-case) 333 | +--rw strip-vlan-action! 334 +--ro flow-statistics 335 +--ro packet-count? yang:counter64 336 +--ro byte-count? yang:counter64 338 rpcs: 339 +---x transmit-packet 340 +---w input 341 +---w egress? netbr:port-ref 342 +---w ingress? netbr:port-ref 343 +---w payload? binary 344 +---w action* [order] 345 +---w order int32 346 +---w (action)? 347 +--:(output-action-case) 348 | +---w output-action 349 | +---w out-port? netbr:port-ref 350 | +---w max-length? uint16 351 +--:(controller-action-case) 352 | +---w controller-action 353 | +---w max-length? uint16 354 +--:(drop-action-case) 355 | +---w drop-action! 356 +--:(pop-vlan-action-case) 357 | +---w pop-vlan-action! 358 +--:(push-vlan-action-case) 359 | +---w push-vlan-action 360 | +---w ethernet-type? ether-type 361 | +---w pcp? vlan-pcp 362 | +---w cfi? vlan-cfi 363 | +---w vlan-id? vlan-id 364 +--:(set-vlan-cfi-action-case) 365 | +---w set-vlan-cfi-action 366 | +---w vlan-cfi? vlan-cfi 367 +--:(set-vlan-id-action-case) 368 | +---w set-vlan-id-action 369 | +---w vlan-id? vlan-id 370 +--:(set-vlan-pcp-action-case) 371 | +---w set-vlan-pcp-action 372 | +---w vlan-pcp? vlan-pcp 373 +--:(strip-vlan-action-case) 374 +---w strip-vlan-action! 376 notifications: 377 +---n packet-received 378 +--ro packet-in-reason? identityref 379 +--ro ingress? netbr:port-ref 380 +--ro payload? binary 381 +--ro match 382 +--ro in-port? netbr:port-ref 383 +--ro ethernet-match 384 | +--ro ethernet-source! 385 | | +--ro address yang:mac-address 386 | | +--ro mask? yang:mac-address 387 | +--ro ethernet-destination! 388 | | +--ro address yang:mac-address 389 | | +--ro mask? yang:mac-address 390 | +--ro ethernet-type! 391 | +--ro type ether-type 392 +--ro vlan-match 393 +--ro vlan-id! 394 | +--ro vlan-id-present? boolean 395 | +--ro vlan-id? vlan-id 396 +--ro vlan-pcp? vlan-pcp 398 4. Network Bridge Scheduler Module Tree Diagram 400 module: ietf-network-bridge-scheduler 401 augment /flow:flows/flow:flow: 402 +--rw traffic-class? 403 | -> /netbr:bridge/sched:traffic-classes/traffic-class 404 augment /netbr:bridge/netbr:ports/netbr:port: 405 +--rw class? port-class-ref 406 +--rw class-instance-index? uint32 407 augment /netbr:bridge: 408 +--rw default-traffic-class? traffic-class-ref 409 +--rw default-port-class? traffic-class-ref 410 +--rw traffic-classes 411 | +--rw traffic-class* identityref 412 +--rw port-classes 413 +--rw port-class* identityref 414 augment /if:interfaces/if:interface: 415 +--rw scheduler 416 +--rw gate-controllers 417 +--rw gate-controller* [id] 418 +--rw id string 419 +--rw type identityref 420 +--rw inputs 421 | +--rw input* [class index] 422 | +--rw class identityref 423 | +--rw index uint32 424 | +--ro queued-pkts? uint64 425 | +--ro queued-bytes? uint64 426 | +--ro discards? uint64 427 | +--ro overflow-discards? uint64 428 | +--ro error-discards? uint64 429 +--rw input-classes 430 +--rw input-class* [class] 431 +--rw class identityref 432 +--ro queued-pkts? uint64 433 +--ro queued-bytes? uint64 434 +--ro discards? uint64 435 +--ro overflow-discards? uint64 436 +--ro error-discards? uint64 437 augment /netbr:bridge: 438 +--rw scheduler-classes 439 +--rw scheduler-class* [egress-port-class] 440 +--rw egress-port-class sched:port-class-ref 441 +--rw inputs 442 | +--rw input* [traffic-class ingress-port-class] 443 | +--rw traffic-class traffic-class-ref 444 | +--rw ingress-port-class port-class-ref 445 | +--rw gate-controller? leafref 446 | +--rw input-class? leafref 447 | +--rw base-index? uint32 448 +--rw gate-controllers 449 +--rw gate-controller* [id] 450 +--rw id string 451 +--rw type identityref 452 +--rw inputs 453 | +--rw input* [class] 454 | +--rw class identityref 455 | +--rw instance-count? uint32 456 | +--rw constant-propagation-delay? uint64 457 | +--rw configurable-delay-line? uint64 458 | +--rw queue-len? uint32 459 +--rw output 460 +--rw gate-controller? leafref 461 +--rw input-class? leafref 462 +--rw index? uint32 464 5. Network Bridge Module YANG 466 file "ietf-network-bridge@2021-02-17.yang" 468 module ietf-network-bridge { 469 namespace "urn:ietf:params:xml:ns:yang:ietf-network-bridge"; 470 prefix netbr; 472 import ietf-interfaces { 473 prefix if; 474 } 476 organization 477 "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; 478 contact 479 "WG Web: 480 WG List: 482 Editor: Vladimir Vassilev 483 "; 484 description 485 "This module contains a collection of YANG definitions for 486 description and management of network bridges. 488 Copyright (c) 2020 IETF Trust and the persons identified as 489 authors of the code. All rights reserved. 491 Redistribution and use in source and binary forms, with or 492 without modification, is permitted pursuant to, and subject 493 to the license terms contained in, the Simplified BSD 494 License set forth in Section 4.c of the IETF Trust's 495 Legal Provisions Relating to IETF Documents 496 (http://trustee.ietf.org/license-info). 498 This version of this YANG module is part of RFC XXXX; see 499 the RFC itself for full legal notices."; 501 revision 2021-02-17 { 502 description 503 "Initial revision."; 504 reference 505 "RFC XXXX: Network Bridge"; 506 } 508 typedef port-ref { 509 type leafref { 510 path "/if:interfaces/if:interface/netbr:port-name"; 511 } 512 description 513 "This type is used by data models that need to reference 514 configured bridge ports."; 515 } 517 augment "/if:interfaces/if:interface" { 518 description 519 "Bridge port specific data."; 520 leaf port-name { 521 type leafref { 522 path "/netbr:bridge/netbr:ports/netbr:port/netbr:name"; 523 } 524 description 525 "Reference to the bridge port"; 526 } 527 } 529 container bridge { 530 description 531 "Bridge parameters."; 532 container ports { 533 description 534 "Member ports."; 535 list port { 536 key "name"; 537 unique "index"; 538 description 539 "The list of bridge ports on the device."; 540 leaf name { 541 type string; 542 description 543 "Name of the port."; 544 } 545 leaf index { 546 type uint64; 547 description 548 "Index of the port."; 549 } 550 } 551 } 552 } 553 } 555 557 6. Network Bridge Flows Module YANG 559 file "ietf-network-bridge-flows@2021-02-17.yang" 561 module ietf-network-bridge-flows { 562 namespace "urn:ietf:params:xml:ns:yang:ietf-network-bridge-flows"; 563 prefix flow; 565 import ietf-network-bridge { 566 prefix netbr; 567 } 568 import ietf-inet-types { 569 prefix inet; 570 } 571 import ietf-yang-types { 572 prefix yang; 573 } 575 organization 576 "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; 577 contact 578 "WG Web: 579 WG List: 581 Editor: Vladimir Vassilev 582 "; 583 description 584 "This module contains a collection of YANG definitions for 585 description and management of network bridge based on 586 flows. 588 Copyright (c) 2020 IETF Trust and the persons identified as 589 authors of the code. All rights reserved. 591 Redistribution and use in source and binary forms, with or 592 without modification, is permitted pursuant to, and subject 593 to the license terms contained in, the Simplified BSD 594 License set forth in Section 4.c of the IETF Trust's 595 Legal Provisions Relating to IETF Documents 596 (http://trustee.ietf.org/license-info). 598 This version of this YANG module is part of RFC XXXX; see 599 the RFC itself for full legal notices."; 601 revision 2021-02-17 { 602 description 603 "Unreleased revision."; 604 reference 605 "RFC XXXX: Network Bridge"; 606 } 608 identity packet-in-reason { 609 description 610 "Base identity for all the available packet in reasons."; 611 } 613 identity no-match { 614 base packet-in-reason; 615 description 616 "No matching flow in the classifier"; 617 } 619 identity send-to-controller { 620 base packet-in-reason; 621 description 622 "Explicit instruction to send packet to controller"; 623 } 625 identity invalid-ttl { 626 base packet-in-reason; 627 description 628 "Packet with invalid TTL"; 629 } 631 typedef vlan-pcp { 632 type uint8 { 633 range "0..7"; 634 } 635 description 636 "IEEE 802.1p priority. It indicates the frame priority level. 637 Values are from 0 (best effort) to 7 (highest); 638 1 represents the lowest priority."; 639 } 641 typedef vlan-id { 642 type uint16 { 643 range "0..4095"; 644 } 645 description 646 "IETF 802.1q VLAN tag id."; 647 } 649 typedef ether-type { 650 type uint16; 651 description 652 "Length/Type field of the generated Ethernet packet."; 654 reference 655 "IEEE 802-2014 Clause 9.2"; 656 } 658 typedef vlan-cfi { 659 type int32; 660 description 661 "Canonical Format Identifier (CFI) field 662 (shall be 0 for Ethernet switches) of the 663 transmitted 802.1q VLAN tag."; 664 } 666 typedef flow-id { 667 type inet:uri; 668 description 669 "Flow identifier."; 670 } 672 grouping address { 673 description 674 "IP address."; 675 choice address { 676 description 677 "Address choice."; 678 case ipv4 { 679 leaf ipv4-address { 680 type inet:ipv4-prefix; 681 description 682 "IPv4 address."; 683 } 684 } 685 case ipv6 { 686 leaf ipv6-address { 687 type inet:ipv6-prefix; 688 description 689 "IPv6 address."; 690 } 691 } 692 } 693 } 695 grouping action-list { 696 description 697 "Action list grouping."; 698 list action { 699 key "order"; 700 description 701 "Contains action with corresponding order index."; 703 leaf order { 704 type int32; 705 description 706 "Order index."; 707 } 708 uses action; 709 } 710 } 712 grouping action { 713 description 714 "Grouping of all action data definitions."; 715 choice action { 716 description 717 "Choice with alternative action cases."; 718 case output-action-case { 719 container output-action { 720 description 721 "Contains output action specific data."; 722 leaf out-port { 723 type netbr:port-ref; 724 description 725 "Port on which the packet is sent."; 726 } 727 leaf max-length { 728 type uint16; 729 description 730 "Packets above this length are discarded."; 731 } 732 } 733 } 734 case controller-action-case { 735 container controller-action { 736 description 737 "Contains controller action specific data."; 738 leaf max-length { 739 type uint16; 740 description 741 "Packets above this length are discarted."; 742 } 743 } 744 } 745 case drop-action-case { 746 container drop-action { 747 presence "Drop action case"; 748 description 749 "Drop action presence container."; 750 } 752 } 753 case pop-vlan-action-case { 754 container pop-vlan-action { 755 presence "Pop-vlan action case."; 756 description 757 "Pop-vlan presence container"; 758 } 759 } 760 case push-vlan-action-case { 761 container push-vlan-action { 762 description 763 "Contains push-vlan action specific data."; 764 leaf ethernet-type { 765 type ether-type; 766 description 767 "Tag protocol identifier (TPID) as defined in 768 IEEE 802.1q"; 769 } 770 leaf pcp { 771 type vlan-pcp; 772 description 773 "Specifies the IEEE 802.1p Priority Code Point (PCP) value 774 of the pushed 802.1q VLAN tag."; 775 } 776 leaf cfi { 777 type vlan-cfi; 778 description 779 "Configures the Canonical Format Identifier (CFI) field 780 (shall be 0 for Ethernet switches) of the transmitted 781 802.1q VLAN tag."; 782 } 783 leaf vlan-id { 784 type vlan-id; 785 description 786 "Specifies the VLAN ID as defined in IEEE 802.1q of the 787 pushed VLAN tag."; 788 } 789 } 790 } 791 case set-vlan-cfi-action-case { 792 container set-vlan-cfi-action { 793 description 794 "Contains set-vlan-cfi action specific data. The 795 set-vlan-cfi action is used to replace CFI field 796 on already tagged packets."; 797 leaf vlan-cfi { 798 type vlan-cfi; 799 description 800 "Configures the Canonical Format Identifier (CFI) field 801 to set on the transmitted 802.1q VLAN tagged packet."; 802 } 803 } 804 } 805 case set-vlan-id-action-case { 806 container set-vlan-id-action { 807 description 808 "Contains set-vlan-id action specific data. The set-vlan-id 809 action is used to replace VLAN ID field on already tagged 810 packets."; 811 leaf vlan-id { 812 type vlan-id; 813 description 814 "Specifies the VLAN ID to set on the 802.1q VLAN tagged 815 packet."; 816 } 817 } 818 } 819 case set-vlan-pcp-action-case { 820 container set-vlan-pcp-action { 821 description 822 "Contains set-vlan-pcp action specific data. The 823 set-vlan-pcp action is used to replace VLAN PCP 824 field on already tagged packets."; 825 leaf vlan-pcp { 826 type vlan-pcp; 827 description 828 "Specifies the IEEE 802.1p Priority Code Point 829 (PCP) value to set on the 802.1q VLAN tagged 830 packet."; 831 } 832 } 833 } 834 case strip-vlan-action-case { 835 container strip-vlan-action { 836 presence "Strip-vlan action case"; 837 description 838 "Strip-vlan presence container."; 839 } 840 } 841 } 842 } 844 grouping mac-address-filter { 845 description 846 "Defines address and mask pair for 847 definition of basic MAC address filter rules."; 849 leaf address { 850 type yang:mac-address; 851 mandatory true; 852 description 853 "MAC address to compare with."; 854 } 855 leaf mask { 856 type yang:mac-address; 857 description 858 "The mask specifies the bits to compare. 859 All bits that are 1s are significant."; 860 } 861 } 863 grouping ethernet-match-fields { 864 description 865 "Defines data for specification of filter rules for Ethernet 866 frames based on source and destination MAC addresses and 867 the ethernet type field."; 868 container ethernet-source { 869 presence "Match field is active and set"; 870 description 871 "Ethernet source address."; 872 uses mac-address-filter; 873 } 874 container ethernet-destination { 875 presence "Match field is active and set"; 876 description 877 "Ethernet destination address."; 878 uses mac-address-filter; 879 } 880 container ethernet-type { 881 presence "Match field is active and set"; 882 description 883 "Ethernet frame type."; 884 leaf type { 885 type ether-type; 886 mandatory true; 887 description 888 "Type field of the Ethernet frame."; 889 } 890 } 891 } 893 grouping vlan-match-fields { 894 description 895 "Defines data for specification of filter rules for 896 VLAN tagged or not Ethernet frames based on the 897 presence of VLAN tag, the value of the VLAN ID and 898 VLAN PCP fields."; 899 container vlan-id { 900 presence "Match field is active and set"; 901 description 902 "Match 802.1q VLAN ID."; 903 leaf vlan-id-present { 904 type boolean; 905 description 906 "If set to false match packets with different 907 VLAN ID then the specified in the vlan-id leaf."; 908 } 909 leaf vlan-id { 910 type vlan-id; 911 description 912 "802.1q VLAN ID to match. The match rule can 913 be inverted by setting vlan-id-present to 914 false."; 915 } 916 } 917 leaf vlan-pcp { 918 type vlan-pcp; 919 description 920 "Match 802.1p VLAN Priority code point (PCP) field."; 921 } 922 } 924 grouping match { 925 description 926 "Defines data for specification of filter rules."; 927 leaf in-port { 928 type netbr:port-ref; 929 description 930 "Input port to match."; 931 } 932 container ethernet-match { 933 description 934 "Ethernet match rules."; 935 uses ethernet-match-fields; 936 } 937 container vlan-match { 938 description 939 "VLAN match rules."; 940 uses vlan-match-fields; 941 } 942 } 944 grouping raw-packet { 945 description 946 "Basic packet structure."; 947 leaf ingress { 948 type netbr:port-ref; 949 description 950 "Port the packet was received on."; 951 } 952 leaf payload { 953 type binary; 954 description 955 "Payload of the packet."; 956 } 957 } 959 grouping packet-in { 960 description 961 "Input packet event data: 962 ingress port, payload, event reason."; 963 leaf packet-in-reason { 964 type identityref { 965 base packet-in-reason; 966 } 967 description 968 "Reason identity: 969 no-match, send-to-controller, invalid-ttl or another 970 reason for the corresponding packet-in event."; 971 } 972 uses raw-packet; 973 } 975 grouping ethernet-packet { 976 description 977 "Ethernet packet headers structure."; 978 leaf source { 979 type yang:mac-address; 980 description 981 "MAC source address."; 982 } 983 leaf destination { 984 type yang:mac-address; 985 description 986 "MAC destination address."; 987 } 988 } 990 grouping flow { 991 description 992 "The definition of a flow has a name, 993 match container specifying filter rules and 994 ordered list of actions to be performed on 995 each packet."; 996 leaf id { 997 type flow-id; 998 description 999 "Flow identifier."; 1000 } 1001 container match { 1002 description 1003 "Filter rules for the flow."; 1004 uses match; 1005 } 1006 container actions { 1007 description 1008 "Ordered list of actions."; 1009 uses action-list; 1010 } 1011 } 1013 rpc transmit-packet { 1014 description 1015 "Sending packet out."; 1016 input { 1017 leaf egress { 1018 type netbr:port-ref; 1019 description 1020 "Egress port the packet will be transmitted from."; 1021 } 1022 uses raw-packet; 1023 uses action-list; 1024 } 1025 } 1027 notification packet-received { 1028 description 1029 "Delivery of incoming packet."; 1030 uses packet-in; 1031 container match { 1032 description 1033 "Match data that triggered the source of the 1034 packet-received event."; 1035 uses match; 1036 } 1037 } 1039 container packet-in-message { 1040 description 1041 "Container with the last packet-in reported. 1042 Useful for basic monitoring."; 1043 uses packet-in; 1044 container match { 1045 description 1046 "Match data that triggered the source of the 1047 last packet-received event."; 1048 uses match; 1049 } 1050 } 1051 container flows { 1052 description 1053 "Contains the list of all configured flows."; 1054 list flow { 1055 key "id"; 1056 description 1057 ""; 1058 uses flow; 1059 container flow-statistics { 1060 config false; 1061 description 1062 "Contains flow counters."; 1063 leaf packet-count { 1064 type yang:counter64; 1065 description 1066 "Packets matched."; 1067 } 1068 leaf byte-count { 1069 type yang:counter64; 1070 description 1071 "Sum of the bytes of all matched packets."; 1072 } 1073 } 1074 } 1075 } 1076 } 1078 1080 7. Network Bridge Scheduler Module YANG 1082 file "ietf-network-bridge-scheduler@2021-02-17.yang" 1084 module ietf-network-bridge-scheduler { 1085 namespace "urn:ietf:params:xml:ns:yang:ietf-network-bridge-scheduler"; 1086 prefix sched; 1088 import ietf-network-bridge { 1089 prefix netbr; 1090 } 1091 import ietf-network-bridge-flows { 1092 prefix flow; 1093 } 1094 import ietf-interfaces { 1095 prefix if; 1096 } 1098 organization 1099 "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; 1100 contact 1101 "WG Web: 1102 WG List: 1104 Editor: Vladimir Vassilev 1105 "; 1106 description 1107 "This module contains a collection of YANG definitions for 1108 description and management of network bridge schedulers. 1110 Copyright (c) 2020 IETF Trust and the persons identified as 1111 authors of the code. All rights reserved. 1113 Redistribution and use in source and binary forms, with or 1114 without modification, is permitted pursuant to, and subject 1115 to the license terms contained in, the Simplified BSD 1116 License set forth in Section 4.c of the IETF Trust's 1117 Legal Provisions Relating to IETF Documents 1118 (http://trustee.ietf.org/license-info). 1120 This version of this YANG module is part of RFC XXXX; see 1121 the RFC itself for full legal notices."; 1123 revision 2021-02-17 { 1124 description 1125 "Initial revision."; 1126 reference 1127 "RFC XXXX: Network Bridge"; 1128 } 1130 identity gate-controller { 1131 description 1132 "Represents the gate control block type e.g. round-robin, 1133 priority-based, time-aware-802dot1qbv etc."; 1134 } 1136 identity aggregator { 1137 base gate-controller; 1138 description 1139 "Abstract identity that all gate control blocks with multiple 1140 inputs and single output use as basetype e.g. round-robin, 1141 priority-based, time-aware-802dot1qbv etc."; 1142 } 1144 identity filter { 1145 base gate-controller; 1146 description 1147 "Abstract identity that all gate control blocks with corresponding 1148 input and output instances use as basetype e.g. rate-limiters, 1149 simple propagation delays, shapers etc."; 1150 } 1152 identity gate-controller-input { 1153 description 1154 "Identifies gate controller input type."; 1155 } 1157 identity private-queue-aggregator-input { 1158 base gate-controller-input; 1159 description 1160 "Abstract input identifier for gate controller 1161 inputs of the aggregator type where all 1162 instances of the input types derived from 1163 this identifier have their own private queue."; 1164 } 1166 identity shared-queue-aggregator-input { 1167 base gate-controller-input; 1168 description 1169 "Abstract input identifier for gate controller 1170 inputs of the aggregator type where all 1171 instances of the input types derived from 1172 this identifier have shared queue."; 1173 } 1175 identity filter-input { 1176 base gate-controller-input; 1177 description 1178 "Abstract input identifier for gate controller 1179 inputs of the filter type."; 1180 } 1182 identity traffic-class { 1183 description 1184 "Identifies traffic class."; 1186 } 1188 identity port-class { 1189 description 1190 "Identifies port class. Ports that belong to a class 1191 will have the same scheduler-class on their egress 1192 and have identical flow path through the rest of 1193 the scheduler classes."; 1194 } 1196 typedef port-class-ref { 1197 type leafref { 1198 path "/netbr:bridge/sched:port-classes/sched:port-class"; 1199 } 1200 description 1201 "This type is used by data models that need to reference 1202 configured port-class."; 1203 } 1205 typedef traffic-class-ref { 1206 type leafref { 1207 path "/netbr:bridge/sched:traffic-classes/sched:traffic-class"; 1208 } 1209 description 1210 "This type is used by data models that need to reference 1211 configured traffic-class."; 1212 } 1214 grouping gate-controller-input-config { 1215 description 1216 "Common gate controller input configuration data definitions."; 1217 leaf constant-propagation-delay { 1218 type uint64; 1219 units "picoseconds"; 1220 description 1221 "Constant delay attributed to delays in the gate-controller."; 1222 } 1223 leaf configurable-delay-line { 1224 type uint64; 1225 units "picoseconds"; 1226 description 1227 "Some gate controllers can delay the flow of packets with 1228 configurable delay which is added to the constant 1229 propagation-delay. Only inputs with zero queue lengths 1230 have deterministic delays equal to the sum of the 1231 constant-propagation-delay and the configurable-delay-line 1232 leafs. Inputs with queues have variable higher delay with 1233 dynamic component based on the controllers logic."; 1235 } 1236 leaf queue-len { 1237 type uint32; 1238 units "bytes"; 1239 description 1240 "Length of the queue."; 1241 } 1242 } 1244 grouping gate-controller-queue-state { 1245 description 1246 "Common gate controller queue state data definitions."; 1247 leaf queued-pkts { 1248 type uint64; 1249 config false; 1250 description 1251 "Number of packets queued."; 1252 } 1253 leaf queued-bytes { 1254 type uint64; 1255 config false; 1256 description 1257 "Number of bytes of the packets queued."; 1258 } 1259 leaf discards { 1260 type uint64; 1261 config false; 1262 description 1263 "The total number of discarded packets that were 1264 received on this input. This includes but is not 1265 limited to the overflow-discards. For example 1266 gate-controllers can start discarding certain 1267 packets before the input queue is filled. These 1268 discards are not registered as overflow-discards. 1270 The lower 32 bits of the sum of all discards 1271 counters part of a scheduler are equal to the 1272 /if:interfaces/if:interface/if:statistics/if:out-discards 1273 counter for the corresponding interface."; 1274 } 1275 leaf overflow-discards { 1276 type uint64; 1277 config false; 1278 description 1279 "Unintended discard caused by overflow of 1280 the input queue of the gate controller."; 1281 } 1282 leaf error-discards { 1283 type uint64; 1284 config false; 1285 description 1286 "Unintended discards caused by error 1287 in the scheduler."; 1288 } 1289 } 1291 augment "/flow:flows/flow:flow" { 1292 description 1293 "Adds traffic-class to the flow model."; 1294 leaf traffic-class { 1295 type leafref { 1296 path "/netbr:bridge/sched:traffic-classes/sched:traffic-class"; 1297 } 1298 description 1299 "Specifies the traffic class of a flow. 1300 When not present the default traffic class is used."; 1301 } 1302 } 1304 augment "/netbr:bridge/netbr:ports/netbr:port" { 1305 description 1306 "Adds port class and class-instance-index leafs."; 1307 leaf class { 1308 type port-class-ref; 1309 description 1310 "A port class allows discrimination of ports based on features 1311 and supported scheduler options."; 1312 } 1313 leaf class-instance-index { 1314 type uint32; 1315 description 1316 "Index enumerating the instances of the same port class."; 1317 } 1318 } 1320 augment "/netbr:bridge" { 1321 description 1322 "Adds scheduler specific data to the bridge model."; 1323 leaf default-traffic-class { 1324 type traffic-class-ref; 1325 description 1326 "Specifies the traffic-class for flows without 1327 /flow:flows/flow:flow/sched:traffic-class leaf."; 1328 } 1329 leaf default-port-class { 1330 type traffic-class-ref; 1331 description 1332 "Specifies the traffic-class for flows without 1333 /flow:flows/flow:flow/sched:traffic-class leaf."; 1334 } 1335 container traffic-classes { 1336 description 1337 "Contains the leaf-list of available traffic classes."; 1338 leaf-list traffic-class { 1339 type identityref { 1340 base traffic-class; 1341 } 1342 description 1343 "Leaf-list of available traffic classes."; 1344 } 1345 } 1346 container port-classes { 1347 description 1348 "Contains the leaf-list of available port classes."; 1349 leaf-list port-class { 1350 type identityref { 1351 base port-class; 1352 } 1353 description 1354 "Leaf-list of available port classes."; 1355 } 1356 } 1357 } 1359 augment "/if:interfaces/if:interface" { 1360 description 1361 "Augments the interface model with scheduler specific data."; 1362 container scheduler { 1363 description 1364 "Each egress capable interface has scheduler. The scheduler 1365 is a tree of interconnected gate controllers."; 1366 container gate-controllers { 1367 description 1368 "Contains the list of gate controllers."; 1369 list gate-controller { 1370 key "id"; 1371 description 1372 "The gate controller model can be augmented by 1373 external modules defining custom gate controller 1374 types."; 1375 leaf id { 1376 type string; 1377 description 1378 "Gate controller identifier."; 1380 } 1381 leaf type { 1382 type identityref { 1383 base gate-controller; 1384 } 1385 mandatory true; 1386 description 1387 "Gate controller type."; 1388 } 1389 container inputs { 1390 description 1391 "Contains the list of inputs."; 1392 list input { 1393 key "class index"; 1394 description 1395 "Double key list. There can be multiple 1396 instances of each input class."; 1397 leaf class { 1398 type identityref { 1399 base gate-controller-input; 1400 } 1401 description 1402 "Input class."; 1403 } 1404 leaf index { 1405 type uint32; 1406 description 1407 "Index of the input instance of the corresponding 1408 input class."; 1409 } 1410 uses gate-controller-queue-state; 1411 } 1412 } 1413 container input-classes { 1414 description 1415 "Contains the list of input-classes."; 1416 list input-class { 1417 key "class"; 1418 description 1419 "Contains configuration and state data that is common 1420 for all instances of certain input class."; 1421 leaf class { 1422 type identityref { 1423 base gate-controller-input; 1424 } 1425 description 1426 "Input class."; 1427 } 1428 uses gate-controller-queue-state; 1429 } 1430 } 1431 } 1432 } 1433 } 1434 } 1436 augment "/netbr:bridge" { 1437 description 1438 "Augments the bridge module with 1439 scheduler specific configuration data."; 1440 container scheduler-classes { 1441 description 1442 "Contains list of scheduler-classes."; 1443 list scheduler-class { 1444 key "egress-port-class"; 1445 description 1446 "All ports of same class inherit the scheduler configuration. 1447 The instance specific scheduler configuration defined under 1448 /interfaces/interface/scheduler can override this 1449 configuration."; 1450 leaf egress-port-class { 1451 type sched:port-class-ref; 1452 description 1453 "The port class the scheduler coonfiguration 1454 applies for."; 1455 } 1456 container inputs { 1457 description 1458 "Contains list of inputs."; 1459 list input { 1460 key "traffic-class ingress-port-class"; 1461 description 1462 "Double key list. There can be multiple 1463 instances of each input class."; 1464 leaf traffic-class { 1465 type traffic-class-ref; 1466 description 1467 "Reference to traffic class."; 1468 } 1469 leaf ingress-port-class { 1470 type port-class-ref; 1471 description 1472 "Reference to port class."; 1473 } 1474 leaf gate-controller { 1475 type leafref { 1476 path "../../../gate-controllers/gate-controller/id"; 1477 } 1478 description 1479 "Reference to gate controller id."; 1480 } 1481 leaf input-class { 1482 type leafref { 1483 path "../../../gate-controllers/gate-controller" 1484 + "[id=current()/../gate-controller]" 1485 + "/inputs/input/class"; 1486 } 1487 description 1488 "Reference to a input class defined for the specified 1489 gate controller."; 1490 } 1491 leaf base-index { 1492 type uint32; 1493 default "0"; 1494 description 1495 "Base index for the inputs of this class."; 1496 } 1497 } 1498 } 1499 container gate-controllers { 1500 description 1501 "Contains the list of gate controllers."; 1502 list gate-controller { 1503 key "id"; 1504 description 1505 "The gate controller model can be augmented by 1506 external modules defining custom gate controller 1507 types."; 1508 leaf id { 1509 type string; 1510 description 1511 "Gate controller identifier."; 1512 } 1513 leaf type { 1514 type identityref { 1515 base gate-controller; 1516 } 1517 mandatory true; 1518 description 1519 "Gate controller type."; 1520 } 1521 container inputs { 1522 description 1523 "Contains the list of inputs."; 1525 list input { 1526 key "class"; 1527 description 1528 "Double key list. There can be multiple 1529 instances of each input class."; 1530 leaf class { 1531 type identityref { 1532 base gate-controller-input; 1533 } 1534 mandatory true; 1535 description 1536 "Input class."; 1537 } 1538 leaf instance-count { 1539 type uint32; 1540 description 1541 "Number of input instances of the specified 1542 class."; 1543 } 1544 uses gate-controller-input-config; 1545 } 1546 } 1547 container output { 1548 description 1549 "Configuration of the gate-controller input 1550 the output is connected to."; 1551 leaf gate-controller { 1552 type leafref { 1553 path "../../../gate-controller/id"; 1554 } 1555 description 1556 "Specifies the gate-controller 1557 this output is connected to."; 1558 } 1559 leaf input-class { 1560 type leafref { 1561 path "../../../gate-controller" 1562 + "[id=current()/../gate-controller]/" 1563 + "inputs/input/class"; 1564 } 1565 description 1566 "Specifies the input-class of the gate-controller 1567 the input this output is connected to."; 1568 } 1569 leaf index { 1570 type uint32; 1571 description 1572 "In case the gate-controller is aggregator this is the 1573 index of the only input it is connected to from the 1574 specified class. 1575 If the gate-controller is filter with more then one 1576 input-output pairs this is the base index and the 1577 remaining indexes are connected to consecutive input 1578 indexes of the specified input class."; 1579 } 1580 } 1581 } 1582 } 1583 } 1584 } 1585 } 1586 } 1588 1590 8. IANA Considerations 1592 8.1. NETWORK BRIDGE YANG Modules 1594 This document registers 3 YANG modules in the YANG Module Names 1595 registry [RFC7950]. 1597 name: ietf-network-bridge 1598 namespace: 1599 urn:ietf:params:xml:ns:yang:ietf-network-bridge 1600 prefix: netbr 1601 // RFC Ed. remove this line and replace XXXX in next line 1602 reference: RFC XXXX 1604 name: ietf-network-bridge-flows 1605 namespace: 1606 urn:ietf:params:xml:ns:yang:ietf-network-bridge-flows 1607 prefix: flow 1608 // RFC Ed. remove this line and replace XXXX in next line 1609 reference: RFC XXXX 1611 name: ietf-network-bridge-scheduler 1612 namespace: 1613 urn:ietf:params:xml:ns:yang:ietf-network-bridge-scheduler 1614 prefix: sched 1615 // RFC Ed. remove this line and replace XXXX in next line 1616 reference: RFC XXXX 1618 9. Security Considerations 1620 This document does not introduce any new security concerns in 1621 addition to those specified in [RFC7950], section 15. 1623 10. References 1625 10.1. Normative References 1627 [RFC6241] Enns, R., Ed., Bjorklund, M., Ed., Schoenwaelder, J., Ed., 1628 and A. Bierman, Ed., "Network Configuration Protocol 1629 (NETCONF)", RFC 6241, DOI 10.17487/RFC6241, June 2011, 1630 . 1632 [RFC6991] Schoenwaelder, J., Ed., "Common YANG Data Types", 1633 RFC 6991, DOI 10.17487/RFC6991, July 2013, 1634 . 1636 [RFC7950] Bjorklund, M., Ed., "The YANG 1.1 Data Modeling Language", 1637 RFC 7950, DOI 10.17487/RFC7950, August 2016, 1638 . 1640 [RFC8340] Bjorklund, M. and L. Berger, Ed., "YANG Tree Diagrams", 1641 BCP 215, RFC 8340, DOI 10.17487/RFC8340, March 2018, 1642 . 1644 10.2. Informational References 1646 [OpenFlow] 1647 "Open Networking Foundation", ""OpenFlow Switch 1648 Specification"", December 2009, 1649 . 1653 [RFC8342] Bjorklund, M., Schoenwaelder, J., Shafer, P., Watsen, K., 1654 and R. Wilton, "Network Management Datastore Architecture 1655 (NMDA)", RFC 8342, DOI 10.17487/RFC8342, March 2018, 1656 . 1658 Appendix A. Example 1660 Example bridge with signaling, video0, video1 and best-effort traffic 1661 classes. 1663 A.1. Model 1665 module example-bridge { 1666 yang-version 1.1; 1667 namespace "http://example.com/ns/example-bridge"; 1668 prefix example; 1670 import ietf-network-bridge { 1671 prefix netbr; 1672 } 1673 import ietf-network-bridge-scheduler { 1674 prefix sched; 1675 } 1677 organization 1678 "example.com"; 1679 description 1680 "Example of bridge."; 1682 revision 2018-07-15 { 1683 description 1684 "Initial."; 1685 } 1687 identity video0 { 1688 base sched:traffic-class; 1689 } 1691 identity video1 { 1692 base sched:traffic-class; 1693 } 1695 identity signaling { 1696 base sched:traffic-class; 1697 } 1699 identity best-effort { 1700 base sched:traffic-class; 1701 } 1703 identity default-port { 1704 base sched:port-class; 1705 } 1707 //Strict priority aggregator with 3 classes: 1708 identity strict-priority-aggregator { 1709 base sched:aggregator; 1710 } 1711 identity pri0 { 1712 base sched:shared-queue-aggregator-input; 1713 base strict-priority-aggregator; 1714 } 1716 identity pri1 { 1717 base sched:shared-queue-aggregator-input; 1718 base strict-priority-aggregator; 1719 } 1721 identity pri2 { 1722 base sched:shared-queue-aggregator-input; 1723 base strict-priority-aggregator; 1724 } 1726 //Cyclic timeslot schedule aggregator with 2 timeslots: 1727 identity cyclic-timeslot-schedule-aggregator { 1728 base sched:aggregator; 1729 } 1731 identity timeslot0 { 1732 base sched:shared-queue-aggregator-input; 1733 base cyclic-timeslot-schedule-aggregator; 1734 } 1736 identity timeslot1 { 1737 base sched:shared-queue-aggregator-input; 1738 base cyclic-timeslot-schedule-aggregator; 1739 } 1741 augment "/netbr:bridge/sched:scheduler-classes/sched:scheduler-class" 1742 + "/sched:gate-controllers/sched:gate-controller" { 1743 when "./sched:type = 'example:cyclic-timeslot-schedule-aggregator'"; 1744 leaf period { 1745 type uint32; 1746 units "nanoseconds"; 1747 } 1748 leaf time-slot0-interval { 1749 type uint32; 1750 units "nanoseconds"; 1751 } 1752 leaf time-slot1-interval { 1753 type uint32; 1755 units "nanoseconds"; 1756 } 1757 } 1758 //Rate limiter - filter: 1759 identity rate-limiter { 1760 base sched:filter; 1761 } 1763 identity in { 1764 base sched:filter-input; 1765 base rate-limiter; 1766 } 1768 augment "/netbr:bridge/sched:scheduler-classes/sched:scheduler-class" 1769 + "/sched:gate-controllers/sched:gate-controller" { 1770 when "./sched:type = 'example:rate-limiter'"; 1771 leaf interval { 1772 type uint32; 1773 units "nanoseconds"; 1774 } 1775 leaf limit { 1776 type uint32; 1777 units "octets"; 1778 } 1779 } 1780 } 1782 A.2. Scheduler diagram 1784 The scheduler toplogy and the gate controller instances are specified 1785 in the operational configuration data that can be modified or not 1786 depending on the underlying implementation. The single letter 1787 identifiers for the gate-controllers have the following identities: 1789 o r1,r2 - rate-limiter instances 1791 o a - trivial aggregator instance (implemented using strict- 1792 priority-aggregator) 1794 o t - cyclic-timeslot-schedule-aggregator instance 1796 o p - strict-priority-aggregator instance 1797 signaling video0 video1 best-effort 1798 v v v v 1799 | | | | 1800 +--+ +-----------+ / 1801 |r1| | t | / 1802 +--+ +-----------+ / 1803 | | / 1804 +-+ | / 1805 |a| | / 1806 +-+ | / 1807 | / / 1808 +--+ / / 1809 |r2| / / 1810 +--+ / / 1811 | / / 1812 +---------------+ 1813 | p | 1814 +---------------+ 1815 | 1816 v 1818 A.3. Topology 1820 The example flow configuration is for the topology in the diagram 1821 below. 1823 +-------+ p0 +-------+ p1 +-------+ 1824 | host0 |------| br0 |-----| host1 | 1825 +-------+ +-------+ +-------+ 1826 p2| 1827 +-------+ 1828 | host2 | 1829 +-------+ 1831 A.4. CLI listing 1833 CLI commands configuring flows and assigning flows to traffic- 1834 classes: 1836 > create /flows/flow[id='video0'] -- \ 1837 match/vlan-match/vlan-id/vlan-id=10 \ 1838 actions/action[order='0']/output-action/out-port=p2 1839 > merge /flows/flow[id='video0'] -- traffic-class=video0 1840 > create /flows/flow[id='video1'] -- \ 1841 match/vlan-match/vlan-id/vlan-id=11 \ 1842 actions/action[order='0']/output-action/out-port=p2 1843 > merge /flows/flow[id='video1'] -- traffic-class=video1 1844 > create /flows/flow[id='best-effort-to-host0'] -- \ 1845 match/ethernet-match/ethernet-destination\ 1846 /address=00:01:02:03:00:00 \ 1847 actions/action[order='0']/output-action/out-port=p0 1848 > merge /flows/flow[id='best-effort-to-host0'] -- \ 1849 traffic-class=best-effort 1850 > create /flows/flow[id='best-effort-to-host1'] -- \ 1851 match/ethernet-match/ethernet-destination\ 1852 /address=00:01:02:03:00:01 \ 1853 actions/action[order='0']/output-action/out-port=p1 1854 > merge /flows/flow[id='best-effort-to-host1'] -- \ 1855 traffic-class=best-effort 1856 > create /flows/flow[id='best-effort-to-host2'] -- \ 1857 match/ethernet-match/ethernet-destination\ 1858 /address=00:01:02:03:00:02 \ 1859 actions/action[order='0']/output-action/out-port=p2 1860 > merge /flows/flow[id='best-effort-to-host2'] -- \ 1861 traffic-class=best-effort 1862 > create /flows/flow[id='ptp-to-host0'] -- \ 1863 match/ethernet-match/ethernet-destination\ 1864 /address=00:01:02:03:00:00 \ 1865 actions/action[order='0']/output-action/out-port=p0 1866 > merge /flows/flow[id='ptp-to-host0'] -- \ 1867 traffic-class=signaling 1868 > create /flows/flow[id='ptp-to-host1'] -- \ 1869 match/ethernet-match/ethernet-destination\ 1870 /address=00:01:02:03:00:01 \ 1871 actions/action[order='0']/output-action/out-port=p1 1872 > merge /flows/flow[id='ptp-to-host1'] -- \ 1873 traffic-class=signaling 1874 > create /flows/flow[id='ptp-to-host2'] -- \ 1875 match/ethernet-match/ethernet-destination\ 1876 /address=00:01:02:03:00:02 \ 1877 actions/action[order='0']/output-action/out-port=p2 1878 > merge /flows/flow[id='ptp-to-host2'] -- \ 1879 traffic-class=signaling 1880 > commit 1882 CLI commands configuring and monitorig the scheduler: 1884 > replace /bridge/scheduler-classes/scheduler-class/gate-controllers\ 1885 /gate-controller[id='p']/inputs/input/queue-len value=1048576 1886 > replace /bridge/scheduler-classes/scheduler-class/gate-controllers\ 1887 /gate-controller[id='t']/time-slot0-interval value=5000000 1888 > commit 1889 > xget /interfaces/interface[name='if2']/scheduler/gate-controllers\ 1890 /gate-controller[id='r1']/inputs/input[index='1']/overflow-discards 1891 ... 1892 overflow-discards 33 1893 ... 1894 > xget /interfaces/interface[name='if2']/scheduler/gate-controllers\ 1895 /gate-controller[id='p']/input-classes/ 1896 input-class[class='pri2']/overflow-discards 1897 ... 1898 overflow-discards 1000000 1899 ... 1901 A.5. Configuration Data Instance 1903 1904 1905 1906 1907 1908 p0 1909 0 1910 1913 example:default-port 1914 1916 0 1917 1918 1919 p1 1920 1 1921 1924 example:default-port 1925 1927 1 1928 1929 1930 p2 1931 2 1932 1935 example:default-port 1936 1938 2 1939 1940 1941 1944 example:best-effort 1945 1948 example:best-effort 1949 1952 1954 example:best-effort 1955 1957 example:signaling 1958 1960 example:video0 1961 1963 example:video1 1964 1965 1968 1969 example:default-port 1970 1971 1974 1975 1977 example:default-port 1978 1979 1980 1982 example:best-effort 1983 1985 example:default-port 1986 p 1987 1989 example:pri2 1990 0 1991 1992 1993 1995 example:signaling 1996 1998 example:default-port 1999 r1 2000 2002 example:in 2003 0 2004 2005 2006 2008 example:video0 2009 2011 example:default-port 2012 t 2013 2015 example:timeslot0 2016 0 2017 2018 2019 2021 example:video1 2022 2024 example:default-port 2025 t 2026 2028 example:timeslot1 2029 0 2030 2031 2032 2033 2034 a 2035 2037 example:strict-priority-aggregator 2038 2039 2040 2042 example:pri0 2043 3 2044 2048 2045 2046 2047 2048 r2 2049 2051 example:in 2052 0 2053 2054 2055 2056 p 2057 2058 example:strict-priority-aggregator 2059 2060 2061 2063 example:pri0 2064 1 2065 2048 2066 2067 2068 2070 example:pri1 2071 1 2072 32768 2073 2074 2075 2077 example:pri2 2078 3 2079 1048576 2080 2081 2082 2083 2084 r1 2085 2087 example:rate-limiter 2088 2089 2090 2092 example:in 2093 3 2094 2095 2096 2097 a 2098 2100 example:pri0 2101 0 2102 2103 2104 10000000 2105 2106 12500 2107 2108 2109 r2 2110 2111 example:rate-limiter 2112 2113 2114 2116 example:in 2117 1 2118 2119 2120 2121 p 2122 2124 example:pri0 2125 0 2126 2127 2128 10000000 2129 2130 125000 2131 2132 2133 t 2134 2135 example:cyclic-timeslot-schedule-aggregator 2136 2137 2138 2140 example:timeslot0 2141 3 2142 1048576 2143 2144 2145 2147 example:timeslot1 2148 3 2149 1048576 2150 2151 2152 2153 p 2154 2156 example:pri0 2157 2 2158 2159 2160 10000000 2161 2163 5000000 2164 2166 5000000 2167 2168 2169 2170 2171 2172 2173 2174 best-effort-to-host0 2175 2176 2177 2178
00:01:02:03:00:00
2179
2180
2181
2182 2183 2184 0 2185 2186 p0 2187 2188 2189 2190 2193 example:best-effort 2194
2195 2196 best-effort-to-host1 2197 2198 2199 2200
00:01:02:03:00:01
2201
2202
2203
2204 2205 2206 0 2207 2208 p1 2209 2210 2211 2212 2215 example:best-effort 2216
2217 2218 best-effort-to-host2 2219 2220 2221 2222
00:01:02:03:00:02
2223
2224
2225
2226 2227 2228 0 2229 2230 p2 2231 2232 2233 2234 2237 example:best-effort 2238
2239 2240 ptp-to-host0 2241 2242 2243 2244
00:01:02:03:00:00
2245
2246
2247
2248 2249 2250 0 2251 2252 p0 2253 2254 2255 2256 2259 example:signaling 2260
2261 2262 ptp-to-host1 2263 2264 2265 2266
00:01:02:03:00:01
2267
2269
2270
2271 2272 2273 0 2274 2275 p1 2276 2277 2278 2279 2282 example:signaling 2283
2284 2285 ptp-to-host2 2286 2287 2288 2289
00:01:02:03:00:02
2290
2291
2292
2293 2294 2295 0 2296 2297 p2 2298 2299 2300 2301 2304 example:signaling 2305
2306 2307 video0 2308 2309 2310 2311 10 2312 2313 2314 2315 2316 2317 0 2318 2319 p2 2320 2321 2322 2323 2326 example:video0 2327 2328 2329 video1 2330 2331 2332 2333 11 2334 2335 2336 2337 2338 2339 0 2340 2341 p2 2342 2343 2344 2345 2348 example:video1 2349 2350
2351 2352 2353 if0 2354 2356 ianaift:ethernetCsmacd 2357 2359 p0 2360 2361 2362 if1 2363 2364 ianaift:ethernetCsmacd 2365 2367 p1 2368 2369 2370 if2 2371 2372 ianaift:ethernetCsmacd 2373 2375 p2 2376 2377 2378 2379 2380
2382 A.6. Companion YANG Data Model for Implementations Not Compliant with 2383 NMDA 2385 The YANG modules defined in this document are designed to be used in 2386 conjunction with implementations that support the Network Management 2387 Datastore Architecture (NMDA) as defined in [RFC8342]. In order to 2388 allow implementations to use the data model even in cases when NMDA 2389 is not supported, the following companion module is defined. 2391 file "ietf-network-bridge-scheduler- 2392 state@2021-02-17.yang" 2394 module ietf-network-bridge-scheduler-state { 2395 namespace 2396 "urn:ietf:params:xml:ns:yang:ietf-network-bridge-scheduler-state"; 2397 prefix sched-state; 2399 import ietf-interfaces { 2400 prefix if; 2401 } 2402 import ietf-network-bridge-scheduler { 2403 prefix sched; 2404 } 2406 organization 2407 "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; 2408 contact 2409 "WG Web: 2410 WG List: 2412 Editor: Vladimir Vassilev 2413 "; 2414 description 2415 "This module contains /if:interfaces-state/if:interface 2416 augmentation which mirrors the 'scheduler' container 2417 as the one part of the 'ietf-network-bridge-scheduler' 2418 but contains only read-only state data. The data model is 2419 not needed when the underlying implementation infrastructure 2420 supports the Network Management Datastore Architecture (NMDA). 2422 Copyright (c) 2020 IETF Trust and the persons identified as 2423 authors of the code. All rights reserved. 2425 Redistribution and use in source and binary forms, with or 2426 without modification, is permitted pursuant to, and subject 2427 to the license terms contained in, the Simplified BSD 2428 License set forth in Section 4.c of the IETF Trust's 2429 Legal Provisions Relating to IETF Documents 2430 (http://trustee.ietf.org/license-info). 2432 This version of this YANG module is part of RFC XXXX; see 2433 the RFC itself for full legal notices."; 2435 revision 2021-02-17 { 2436 description 2437 "Initial revision."; 2438 reference 2439 "RFC XXXX: Network Bridge"; 2440 } 2442 augment "/if:interfaces-state/if:interface" { 2443 description 2444 "Augments the interface model with scheduler specific data."; 2445 container scheduler { 2446 description 2447 "Each egress capable interface has scheduler. The scheduler 2448 is a tree of interconnected gate controllers."; 2449 container gate-controllers { 2450 description 2451 "Contains the list of gate controllers."; 2452 list gate-controller { 2453 key "id type"; 2454 description 2455 "The gate controller model can be augmented by 2456 external modules defining custom gate controller 2457 types."; 2458 leaf id { 2459 type string; 2460 description 2461 "Gate controller identifier."; 2462 } 2463 leaf type { 2464 type identityref { 2465 base sched:gate-controller; 2466 } 2467 mandatory true; 2468 description 2469 "Gate controller type."; 2470 } 2471 container inputs { 2472 description 2473 "Contains the list of inputs."; 2474 list input { 2475 key "class index"; 2476 description 2477 "Double key list. There can be multiple 2478 instances of each input class."; 2479 leaf class { 2480 type identityref { 2481 base sched:gate-controller-input; 2482 } 2483 description 2484 "Input class."; 2485 } 2486 leaf index { 2487 type uint32; 2488 description 2489 "Index of the input instance of the corresponding 2490 input class."; 2491 } 2492 uses sched:gate-controller-queue-state; 2493 } 2494 } 2495 container input-classes { 2496 description 2497 "Contains the list of input-classes."; 2498 list input-class { 2499 key "class"; 2500 description 2501 "Contains the list of input-classes."; 2502 leaf class { 2503 type identityref { 2504 base sched:gate-controller-input; 2505 } 2506 description 2507 "Input class."; 2508 } 2509 uses sched:gate-controller-queue-state; 2510 } 2511 } 2512 } 2513 } 2514 } 2515 } 2516 } 2518 2520 Author's Address 2522 Vladimir Vassilev 2523 Lightside Instruments AS 2525 Email: vladimir@lightside-instruments.com