idnits 2.17.1 draft-fan-yang-mac-00.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 126 has weird spacing: '...Address yan...' == Line 151 has weird spacing: '...uleName str...' == Line 159 has weird spacing: '...maximum uin...' == Line 171 has weird spacing: '...reshold uin...' == Line 175 has weird spacing: '...maximum uin...' == (3 more instances...) == The document doesn't use any RFC 2119 keywords, yet seems to have RFC 2119 boilerplate text. -- The document date (December 27, 2016) is 2676 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) No issues found here. Summary: 0 errors (**), 0 flaws (~~), 8 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group H. Fan 3 Internet-Draft Huawei 4 Intended status: Standards Track 5 Expires: June 30, 2017 December 27, 2016 7 A Yang Data Model for MAC Management 8 draft-fan-yang-mac-00 10 Abstract 12 This memo proposes a yang model for MAC management. 14 Requirements Language 16 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 17 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 18 document are to be interpreted as described in RFC 2119 [RFC2119]. 20 Status of This Memo 22 This Internet-Draft is submitted in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF). Note that other groups may also distribute 27 working documents as Internet-Drafts. The list of current Internet- 28 Drafts is at http://datatracker.ietf.org/drafts/current/. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 This Internet-Draft will expire on June 30, 2017. 37 Copyright Notice 39 Copyright (c) 2016 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents 44 (http://trustee.ietf.org/license-info) in effect on the date of 45 publication of this document. Please review these documents 46 carefully, as they describe your rights and restrictions with respect 47 to this document. Code Components extracted from this document must 48 include Simplified BSD License text as described in Section 4.e of 49 the Trust Legal Provisions and are provided without warranty as 50 described in the Simplified BSD License. 52 Table of Contents 54 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 2 55 2. The Design of the MAC Data Model . . . . . . . . . . . . . . . 2 56 3. Definition of ietf-mac module . . . . . . . . . . . . . . . . 5 57 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 27 58 5. Security Considerations . . . . . . . . . . . . . . . . . . . 28 59 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 28 60 7. Normative References . . . . . . . . . . . . . . . . . . . . . 28 61 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 28 63 1. Introduction 65 IP network elements normally maintain a MAC table where the 66 information of MAC address, and the associated VLAN number and 67 interfaces are maintianed. When forwarding a packet, the device can 68 use the informaiton in the MAC table to find out the egress quickly 69 so as to reduce the broadcast quickly. 71 The records in a MAC table can be generated either automatically or 72 by managers. This memo proposes a yang model enabling managers to 73 mange the records in the MAC talbe of a network device. 75 2. The Design of the MAC Data Model 77 module: ietf-mac 78 +--rw mac 79 +--rw globalAttribute 80 | +--rw macAgeTimeEnable? macAgeTimeType 81 | +--rw macAgingTime? uint32 82 +--rw vlanFdbs 83 | +--rw vlanFdb* [macAddress vlanId slotId] 84 | +--rw macAddress yang:mac-address 85 | +--rw vlanId macVlanId 86 | +--rw slotId string 87 | +--rw macType macType 88 | +--rw outIfName? string 89 | +--ro outNickname string 90 | +--rw isCeDefault? boolean 91 | +--rw ceVlanId? macVlanId 92 | +--rw isFlood? boolean 93 | +--rw isIMac? boolean 94 | +--ro learnedPeriod? uint32 95 | +--rw outPeerIPs 96 | +--ro outPeerIP* [outPeerIP] 98 | +--ro outPeerIP inet:ip-address 99 +--rw vsiFdbs 100 | +--rw vsiFdb* [vsiName slotId vlanid macAddress] 101 | +--rw vsiName string 102 | +--rw slotId string 103 | +--rw vlanid uint16 104 | +--rw vlanifName? string 105 | +--rw pevid? macVlanId 106 | +--rw cevid? macVlanId 107 | +--rw macAddress yang:mac-address 108 | +--rw macType macType 109 | +--rw outIfType macOutIfType 110 | +--rw outIfName string 111 | +--rw pwId? uint32 112 | +--rw pwEncap macPwEncapType 113 | +--rw peerIp? inet:ip-address 114 | +--rw pwName? string 115 | +--rw isIMac boolean 116 | +--ro learnedPeriod? uint32 117 +--rw vsiFdbDynamics 118 | +--ro vsiFdbDynamic* [vsiName slotId vlanid 119 macAddress outIfName] 120 | +--ro vsiName string 121 | +--ro slotId string 122 | +--ro vlanid uint16 123 | +--ro vlanifName? string 124 | +--ro pevid? macVlanId 125 | +--ro cevid? macVlanId 126 | +--ro macAddress yang:mac-address 127 | +--ro macType macType 128 | +--ro outIfType macOutIfType 129 | +--ro outIfName string 130 | +--ro pwId? uint32 131 | +--ro pwEncap macPwEncapType 132 | +--ro peerIp inet:ip-address 133 | +--ro pwName? string 134 | +--ro isIMac boolean 135 +--rw bdFdbs 136 | +--rw bdFdb* [slotId macAddress bdId] 137 | +--rw slotId string 138 | +--rw macAddress yang:mac-address 139 | +--rw bdId uint32 140 | +--rw macType macType 141 | +--rw outIfName string 142 | +--rw unTag? boolean 143 | +--rw peDefault? boolean 144 | +--rw ceDefault? boolean 145 | +--rw vid? macVlanId 146 | +--rw cevid? macVlanId 148 | +--ro learnedPeriod? uint32 149 +--rw macLimitRules 150 | +--rw macLimitRule* [ruleName] 151 | +--rw ruleName string 152 | +--rw maximum uint32 153 | +--rw rate? uint16 154 | +--rw action? macLimitForward 155 | +--rw alarm? macEnableStatus 156 +--rw vlanMacLimits 157 | +--rw vlanMacLimit* [vlanId] 158 | +--rw vlanId macVlanId 159 | +--rw maximum uint32 160 | +--rw rate? uint16 161 | +--rw action? macLimitForward 162 | +--rw alarm? macEnableStatus 163 +--rw vsiMacLimits 164 | +--rw vsiMacLimit* [vsiName] 165 | +--rw vsiName string 166 | +--rw maximum uint32 167 | +--rw rate? uint16 168 | +--rw action? macLimitForward 169 | +--rw alarm? macEnableStatus 170 | +--rw upThreshold uint8 171 | +--rw downThreshold uint8 172 +--rw bdMacLimits 173 | +--rw bdMacLimit* [bdId] 174 | +--rw bdId uint32 175 | +--rw maximum uint32 176 | +--rw rate? uint16 177 | +--rw action? macLimitForward 178 | +--rw alarm? macEnableStatus 179 +--rw ifMacLimits 180 | +--rw ifMacLimit* [ifName limitType] 181 | +--rw ifName string 182 | +--rw limitType limitType 183 | +--rw ruleName? -> /mac/macLimitRules 184 /macLimitRule/ruleName 185 | +--rw maximum uint32 186 | +--rw rate? uint16 187 | +--rw action? macLimitForward 188 | +--rw alarm? macEnableStatus 189 +--rw ifVlanMacLimits 190 +--ro ifVlanMacLimit* [ifName vlanBegin limitType] 191 +--ro ifName string 192 +--ro vlanBegin macVlanId 193 +--ro vlanEnd? macVlanId 194 +--ro limitType limitType 195 +--ro ruleName? -> /mac/macLimitRules 196 /macLimitRule/ruleName 197 +--ro maximum uint32 199 +--ro rate uint16 200 +--ro action? macLimitForward 201 +--ro alarm? macEnableStatus 203 3. Definition of ietf-mac module 205 file "ietf-mac@2016-12-23.yang" 206 module ietf-mac { 207 namespace "http://www.huawei.com/netconf/vrp/huawei-mac"; 208 prefix mac; 210 import ietf-inet-types { 211 prefix "inet"; 212 } 213 import ietf-yang-types { 214 prefix yang; 215 } 217 organization 218 "Huawei Technologies Co.,Ltd."; 219 contact 220 "Huawei Industrial Base Bantian, Longgang Shenzhen 518129 221 People's Republic of China 222 Website: http://www.huawei.com Email: support@huawei.com"; 223 description 224 "MAC address forwarding."; 226 revision 2016-12-30 { 227 description 228 "Init revision"; 229 reference "Huawei private."; 230 } 232 typedef macVlanId { 233 type uint16 { 234 range "1..4094"; 235 } 236 description 237 "VLAN Id."; 238 } 240 typedef macType { 241 type enumeration { 242 enum "static" { 244 value 0; 245 description 246 "Static MAC address entry."; 247 } 248 enum "dynamic" { 249 value 1; 250 description 251 "Dynamic MAC address entry."; 252 } 253 enum "blackHole" { 254 value 2; 255 description 256 "Blackhole MAC address entry"; 257 } 258 enum "sticky" { 259 value 3; 260 description 261 "sticky MAC address entry"; 262 } 263 } 264 description 265 "MAC address type."; 266 } 268 typedef limitType { 269 type enumeration { 270 enum "macLimit" { 271 value 0; 272 description 273 "Interface MAC rule limit."; 274 } 275 enum "macApply" { 276 value 1; 277 description 278 "Interface MAC rule application."; 279 } 280 } 281 description 282 "MAC address limit type."; 283 } 284 typedef macLimitForward { 285 type enumeration { 286 enum "forward" { 287 value 0; 288 description 289 "Forward."; 290 } 291 enum "discard" { 292 value 1; 293 description 294 "Discard."; 296 } 297 } 298 description 299 "MAC address limit forward type."; 300 } 302 typedef macEnableStatus { 303 type enumeration { 304 enum "enable" { 305 value 0; 306 description 307 "Enable."; 308 } 309 enum "disable" { 310 value 1; 311 description 312 "Disable."; 313 } 314 } 315 description 316 "MAC enable type."; 317 } 319 typedef macOutIfType { 320 type enumeration { 321 enum "ac" { 322 value 0; 323 description 324 "AC."; 325 } 326 enum "pw" { 327 value 1; 328 description 329 "PW."; 330 } 331 } 332 description 333 "MAC out if type."; 334 } 336 typedef macPwEncapType { 337 type enumeration { 338 enum "ethernet" { 339 value 0; 340 description 341 "Ethernet."; 342 } 343 enum "vlan" { 344 value 1; 345 description 346 "VLAN."; 347 } 348 } 349 description 350 "MAC encapsulation type."; 351 } 353 typedef directionType { 354 type enumeration { 355 enum "inbound" { 356 value 0; 357 description 358 "Inbound."; 359 } 360 enum "outbound" { 361 value 1; 362 description 363 "Outbound."; 364 } 365 } 366 description 367 "Direction type."; 368 } 370 typedef discardType { 371 type enumeration { 372 enum "broadcastDiscard" { 373 value 0; 374 description 375 "Discard broadcast."; 376 } 377 enum "unknownMulticastDiscard" { 378 value 1; 379 description 380 "Discard unknown multicast."; 381 } 382 enum "unknownUnicastDiscard" { 383 value 2; 384 description 385 "Discard Unknown unicast."; 386 } 387 } 388 description 389 "Discard type."; 390 } 392 typedef broadcastDomainType { 393 type enumeration { 394 enum "VLAN" { 395 value 0; 396 description 397 "VLAN Type."; 398 } 399 enum "VSI" { 400 value 1; 401 description 402 "VSI Type."; 403 } 404 enum "BD" { 406 value 2; 407 description 408 "BD Type."; 409 } 410 } 411 description 412 "Domain type."; 413 } 415 typedef macAgeTimeType { 416 type enumeration { 417 enum "enable" { 418 value 0; 419 description 420 "Enable MAC address global aging."; 421 } 422 enum "disable" { 423 value 1; 424 description 425 "Disable MAC address global aging."; 426 } 428 } 429 description 430 "MAC address age time type."; 431 } 433 container mac { 434 description 435 "MAC address forwarding. "; 436 container globalAttribute { 437 description 438 "MAC global attribute."; 439 leaf macAgeTimeEnable { 440 type macAgeTimeType; 441 default "enable"; 442 description 443 "Whether MAC address aging is enabled."; 445 } 446 leaf macAgingTime { 447 when "not(../macAgeTimeEnable='disable') or 448 ../macAgeTimeEnable='enable'"; 449 type uint32 { 450 range "60..1000000"; 451 } 452 default "300"; 453 description 454 "Aging time."; 455 } 456 } 457 container vlanFdbs { 458 description 459 "VLAN forwarding table."; 460 list vlanFdb { 461 key "macAddress vlanId slotId"; 462 description 463 "VLAN forwarding entry."; 464 leaf macAddress { 465 type yang:mac-address; 466 description 467 "MAC address in the format of H-H-H."; 468 } 469 leaf vlanId { 470 type macVlanId; 471 description 472 "VLAN ID."; 473 } 474 leaf slotId { 475 type string { 476 length "1..24"; 477 } 478 description 479 "Slot ID."; 480 } 481 leaf macType { 482 type macType; 483 must "((../macType='static' or ../macType='blackHole') )"; 484 mandatory true; 485 description 486 "MAC address type, such as blackhole, static, and dynamic."; 487 } 488 leaf outIfName { 489 when "not(../macType='blackHole') or ../macType='static'"; 490 type string; 491 description 492 "Outbound interface name."; 494 } 495 leaf outNickname { 496 type string { 497 length "1..31"; 498 } 499 config false; 500 mandatory true; 501 description 502 "Nickname."; 503 } 504 leaf isCeDefault { 505 when "not(../macType='blackHole')"; 506 type boolean; 507 default "false"; 508 description 509 "CE default VLAN."; 510 } 511 leaf ceVlanId { 512 when "not(../macType='blackHole') or ../isCeDefault='false' 513 and ../macType='static'"; 514 type macVlanId; 515 description 516 "User VLAN ID."; 517 } 518 leaf isFlood { 519 type boolean; 520 default "false"; 521 description 522 "Flooding MAC."; 523 } 524 leaf isIMac { 525 type boolean; 526 default "false"; 527 description 528 "Ingress MAC."; 529 } 530 leaf learnedPeriod { 531 type uint32 { 532 range "0..4294967294"; 533 } 534 default "0"; 535 config false; 536 description 537 "Dynamic MAC Holding Time."; 538 } 539 container outPeerIPs { 540 description 541 "Out Peer IPs."; 543 list outPeerIP { 544 key "outPeerIP"; 545 config false; 546 description 547 "Out Peer IP."; 548 leaf outPeerIP { 549 type inet:ip-address; 550 description 551 "Out Peer IP."; 552 } 553 } 554 } 555 } 556 } 557 container vsiFdbs { 558 description 559 "VSI forwarding table."; 560 list vsiFdb { 561 key "vsiName slotId vlanid macAddress"; 562 description 563 "VSI Forwarding entry."; 564 leaf vsiName { 565 type string { 566 length "1..31"; 567 } 568 description 569 "VSI Name."; 570 } 571 leaf slotId { 572 type string { 573 length "1..24"; 574 } 575 description 576 "Slot ID."; 577 } 578 leaf vlanid { 579 type uint16 { 580 range "0..4094"; 581 } 582 description 583 "VLAN ID."; 584 } 585 leaf vlanifName { 586 when "not(../outIfType='pw' or ../macType='blackHole') 587 or ../outIfType='ac' and ../macType='static'"; 588 type string; 590 description 591 "VLANIF interface."; 592 } 593 leaf pevid { 594 when "not(../outIfType='pw' or ../macType='blackHole') 595 or ../outIfType='ac' and ../macType='static'"; 596 type macVlanId; 597 description 598 "Outer VLAN tag."; 599 } 600 leaf cevid { 601 when "not(../outIfType='pw' or ../macType='blackHole') 602 or ../outIfType='ac' and ../macType='static'"; 603 type macVlanId; 604 description 605 "Inner VLAN tag."; 606 } 607 leaf macAddress { 608 type yang:mac-address; 609 description 610 "MAC address in the format of H-H-H."; 611 } 612 leaf macType { 613 type macType; 614 must "((../macType='static' or ../macType='blackHole') )"; 615 mandatory true; 616 description 617 "MAC Type of an interface."; 618 } 619 leaf outIfType { 620 when "not(../macType='blackHole') or ../macType='static'"; 621 type macOutIfType; 622 mandatory true; 623 description 624 "Outbound interface type."; 625 } 626 leaf outIfName { 627 when "not(../outIfType='pw' or ../macType='blackHole' 628 or ../outIfType='pw' and ../macType='static') 629 or ../outIfType='ac' and ../macType='static'"; 630 type string; 631 mandatory true; 632 description 633 "Outbound interface name."; 634 } 635 leaf pwId { 636 when "not(../macType='blackHole' or ../outIfType='ac' 637 and ../macType='static') or ../outIfType='pw' 638 and ../macType='static'"; 639 type uint32 { 640 range "1..4294967295"; 641 } 643 description 644 "PW ID."; 645 } 646 leaf pwEncap { 647 when "not(../macType='blackHole' or ../outIfType='ac' 648 and ../macType='static') or ../outIfType='pw' 649 and ../macType='static'"; 650 type macPwEncapType; 651 mandatory true; 652 description 653 "PW encapsulation type."; 654 } 655 leaf peerIp { 656 when "not(../macType='blackHole' or ../outIfType='ac' 657 and ../macType='static') or ../outIfType='pw' 658 and ../macType='static'"; 659 type inet:ip-address; 660 description 661 "Peer IP address."; 662 } 663 leaf pwName { 664 type string { 665 length "1..31"; 666 } 667 description 668 "PW Name."; 669 } 670 leaf isIMac { 671 type boolean; 672 mandatory true; 673 description 674 "Ingress MAC."; 675 } 676 leaf learnedPeriod { 677 type uint32 { 678 range "0..4294967294"; 679 } 680 default "0"; 681 config false; 682 description 683 "Dynamic MAC Holding Time."; 684 } 685 } 686 } 687 container vsiFdbDynamics { 688 description 689 "VSI Forwarding Table on Slot."; 691 list vsiFdbDynamic { 692 key "vsiName slotId vlanid macAddress outIfName"; 693 config false; 694 description 695 "VSI Forwarding Table on Slot."; 696 leaf vsiName { 697 type string { 698 length "1..31"; 699 } 700 description 701 "VSI Name."; 702 } 703 leaf slotId { 704 type string { 705 length "1..24"; 706 } 707 description 708 "Slot ID."; 709 } 710 leaf vlanid { 711 type uint16 { 712 range "0..4094"; 713 } 714 description 715 "VLAN ID."; 717 } 718 leaf vlanifName { 719 type string; 720 description 721 "VLANIF interface."; 722 } 723 leaf pevid { 724 type macVlanId; 725 description 726 "Outer VLAN tag."; 727 } 728 leaf cevid { 729 type macVlanId; 730 description 731 "Inner VLAN tag."; 732 } 733 leaf macAddress { 734 type yang:mac-address; 735 description 736 "MAC address in the format of H-H-H."; 737 } 738 leaf macType { 739 type macType; 741 mandatory true; 742 description 743 "MAC Type of an interface."; 744 } 745 leaf outIfType { 746 type macOutIfType; 747 mandatory true; 748 description 749 "Outbound interface type."; 750 } 751 leaf outIfName { 752 type string; 753 description 754 "Outbound interface name."; 755 } 756 leaf pwId { 757 type uint32 { 758 range "1..4294967295"; 759 } 760 description 761 "PW ID."; 762 } 763 leaf pwEncap { 764 type macPwEncapType; 765 mandatory true; 766 description 767 "PW encapsulation type."; 768 } 769 leaf peerIp { 770 type inet:ip-address; 771 mandatory true; 772 description 773 "Peer IP address."; 774 } 775 leaf pwName { 776 type string { 777 length "1..31"; 778 } 779 description 780 "PW Name."; 781 } 782 leaf isIMac { 784 type boolean; 785 mandatory true; 786 description 787 "Ingress MAC."; 788 } 789 } 790 } 791 container bdFdbs { 792 description 793 "BD forwarding entries."; 794 list bdFdb { 795 key "slotId macAddress bdId"; 796 description 797 "BD forwarding entry."; 798 leaf slotId { 799 type string { 800 length "1..50"; 801 } 802 description 803 "Slot number."; 804 } 805 leaf macAddress { 806 type yang:mac-address; 807 description 808 "MAC address of a bridge domain."; 809 } 810 leaf bdId { 811 type uint32 { 812 range "1..16777215"; 814 } 815 description 816 "ID of a bridge domain."; 817 } 818 leaf macType { 819 type macType; 820 must "((../macType='static' or ../macType='blackHole') )"; 821 mandatory true; 822 description 823 "MAC address type of a bridge domain."; 824 } 825 leaf outIfName { 826 when "not(../macType='blackHole') or ../unTag='false' 827 and ../peDefault='false' and ../ceDefault='false' 828 and ../macType='static'"; 829 type string; 830 mandatory true; 831 description 832 "Outbound interface name."; 833 } 835 leaf unTag { 836 when "not(../macType='blackHole') or ../unTag='false' 837 and ../peDefault='false' and ../ceDefault='false' 838 and ../macType='static'"; 839 type boolean; 840 default "false"; 841 description 842 "Packets without VLAN tags."; 843 } 844 leaf peDefault { 845 when "not(../macType='blackHole' or ../unTag='true') 846 or ../unTag='false' and ../peDefault='false' 847 and ../ceDefault='false' and ../macType='static'"; 848 type boolean; 849 default "false"; 850 description 851 "PE default VLAN."; 852 } 853 leaf ceDefault { 854 when "not(../peDefault='true' or ../macType='blackHole' 855 or ../unTag='true') or ../unTag='false' 856 and ../peDefault='false' and ../ceDefault='false' 857 and ../macType='static'"; 858 type boolean; 859 default "false"; 860 description 861 "CE default VLAN."; 863 } 864 leaf vid { 865 when "not(../peDefault='true' or ../macType='blackHole' 866 or ../unTag='true') or ../unTag='false' 867 and ../peDefault='false' and ../ceDefault='false' 868 and ../macType='static'"; 869 type macVlanId; 870 description 871 "Outer VLAN tag."; 872 } 873 leaf cevid { 874 when "not(../peDefault='true' or ../ceDefault='true' 875 or ../macType='blackHole' or ../unTag='true') 876 or ../unTag='false' and ../peDefault='false' 877 and ../ceDefault='false' and ../macType='static'"; 878 type macVlanId; 879 description 880 "Inner VLAN tag."; 881 } 882 leaf learnedPeriod { 883 type uint32 { 884 range "0..4294967294"; 885 } 886 default "0"; 887 config false; 888 description 889 "Dynamic MAC Holding Time."; 890 } 891 } 892 } 893 container macLimitRules { 894 description 895 "Global MAC address learning limit rule."; 896 list macLimitRule { 898 key "ruleName"; 899 description 900 "Global MAC address learning limit."; 901 leaf ruleName { 902 type string { 903 length "1..31"; 904 } 905 description 906 "Global MAC address learning limit rule name."; 907 } 908 leaf maximum { 909 type uint32 { 910 range "0..131072"; 912 } 913 must "not(../rate=0) or (../rate=0 and ../maximum>0)"; 914 mandatory true; 915 description 916 "Maximum number of MAC addresses that can be learned."; 917 } 918 leaf rate { 919 type uint16 { 920 range "0..1000"; 921 } 922 must "not(../maximum=0) or (../maximum=0 and ../rate>0)"; 923 default "0"; 924 description 925 "Interval at which MAC addresses are learned."; 926 } 927 leaf action { 928 type macLimitForward; 929 default "discard"; 930 description 931 "Discard or forward after the number of learned MAC 932 addresses reaches the maximum number."; 933 } 934 leaf alarm { 935 type macEnableStatus; 936 default "enable"; 937 description 938 "Whether an alarm is generated after the number of 939 learned MAC addresses reaches the maximum number."; 940 } 941 } 942 } 943 container vlanMacLimits { 944 description 945 "VLAN MAC address limit list."; 946 list vlanMacLimit { 947 key "vlanId"; 948 description 950 "VLAN MAC address limit."; 951 leaf vlanId { 952 type macVlanId; 953 description 954 "VLAN ID."; 955 } 956 leaf maximum { 957 type uint32 { 958 range "0..130048"; 959 } 960 must "not(../rate=0) or (../rate=0 and ../maximum>0)"; 961 mandatory true; 962 description 963 "Maximum number of MAC addresses that can be learned 964 in a VLAN."; 965 } 966 leaf rate { 967 type uint16 { 968 range "0..1000"; 969 } 970 must "not(../maximum=0) or (../maximum=0 and ../rate>0)"; 971 default "0"; 972 description 973 "Interval at which MAC addresses are learned in a VLAN."; 974 } 975 leaf action { 976 type macLimitForward; 977 default "discard"; 978 description 979 "Discard or forward after the number of learned MAC 980 addresses reaches the maximum number in a VLAN."; 981 } 982 leaf alarm { 983 type macEnableStatus; 984 default "enable"; 985 description 986 "Whether an alarm is generated after the number of learned 987 MAC addresses reaches the maximum number in a VLAN."; 988 } 989 } 990 } 991 container vsiMacLimits { 992 description 993 "VSI MAC address limit list."; 994 list vsiMacLimit { 995 key "vsiName"; 996 description 997 "VSI MAC address limit."; 998 leaf vsiName { 999 type string { 1000 length "1..31"; 1002 } 1003 description 1004 "VSI name."; 1005 } 1006 leaf maximum { 1007 type uint32 { 1008 range "0..524288"; 1009 } 1010 must "not(../rate=0) or (../rate=0 and ../maximum>0)"; 1011 mandatory true; 1012 description 1013 "Maximum number of MAC addresses that can be learned in a 1014 VSI."; 1015 } 1016 leaf rate { 1017 type uint16 { 1018 range "0..1000"; 1019 } 1020 must "not(../maximum=0) or (../maximum=0 and ../rate>0)"; 1021 default "0"; 1022 description 1023 "Interval at which MAC addresses are learned in a VSI."; 1024 } 1025 leaf action { 1026 type macLimitForward; 1027 default "discard"; 1028 description 1029 "Discard or forward after the number of learned MAC 1030 addresses reaches the maximum number in a VSI."; 1031 } 1032 leaf alarm { 1033 type macEnableStatus; 1034 default "disable"; 1035 description 1036 "Whether an alarm is generated after the number of learned 1037 MAC addresses reaches the maximum number in a VSI."; 1038 } 1039 leaf upThreshold { 1040 type uint8 { 1041 range "80..100"; 1042 } 1043 must "(../upThreshold>=../downThreshold)"; 1044 mandatory true; 1045 description 1046 "Upper limit for the number of MAC addresses."; 1047 } 1048 leaf downThreshold { 1049 type uint8 { 1050 range "60..100"; 1051 } 1052 mandatory true; 1054 description 1055 "Upper limit for the number of MAC addresses."; 1057 } 1058 } 1059 } 1061 container bdMacLimits { 1062 description 1063 "BD MAC address limit list."; 1064 list bdMacLimit { 1065 key "bdId"; 1066 description 1067 "BD MAC address limit."; 1068 leaf bdId { 1069 type uint32 { 1070 range "1..16777215"; 1071 } 1072 description 1073 "Specifies the ID of a bridge domain."; 1074 } 1075 leaf maximum { 1076 type uint32 { 1077 range "0..130048"; 1078 } 1079 must "not(../rate=0) or (../rate=0 and ../maximum>0)"; 1080 mandatory true; 1081 description 1082 "Maximum number of MAC addresses that can be learned in a 1083 BD."; 1084 } 1085 leaf rate { 1086 type uint16 { 1087 range "0..1000"; 1088 } 1089 default "0"; 1090 description 1091 "Interval at which MAC addresses are learned in a BD."; 1092 } 1093 leaf action { 1094 type macLimitForward; 1095 default "discard"; 1096 description 1097 "Forward or discard the packet."; 1098 } 1099 leaf alarm { 1100 type macEnableStatus; 1101 default "enable"; 1102 description 1103 "Whether an alarm is generated after the number of learned 1104 MAC addresses reaches the maximum number."; 1106 } 1107 } 1108 } 1110 container ifMacLimits { 1111 description 1112 "Interface MAC address limit list."; 1113 list ifMacLimit { 1114 key "ifName limitType"; 1115 description 1116 "Interface MAC address limit."; 1117 leaf ifName { 1118 type string; 1119 description 1120 "Interface name."; 1121 } 1122 leaf limitType { 1123 type limitType; 1124 description 1125 "Interface MAC limit type."; 1126 } 1127 leaf ruleName { 1128 type leafref { 1129 path "/mac/macLimitRules/macLimitRule/ruleName"; 1130 } 1131 description 1132 "Rule name."; 1133 } 1134 leaf maximum { 1135 when "not(../limitType='macApply') 1136 or ../limitType='macLimit'"; 1137 type uint32 { 1138 range "0..131072"; 1139 } 1140 must "not(../rate=0) or (../rate=0 and ../maximum>0)"; 1141 mandatory true; 1142 description 1143 "Maximum number of MAC addresses that can be learned 1144 on an interface."; 1145 } 1146 leaf rate { 1147 when "not(../limitType='macApply') 1148 or ../limitType='macLimit'"; 1149 type uint16 { 1150 range "0..1000"; 1151 } 1152 must "not(../maximum=0) or (../maximum=0 and ../rate>0)"; 1153 default "0"; 1154 description 1155 "Interval (ms) at which MAC addresses are learned on 1156 an interface."; 1157 } 1159 leaf action { 1160 when "not(../limitType='macApply') 1161 or ../limitType='macLimit'"; 1162 type macLimitForward; 1163 default "discard"; 1164 description 1165 "Discard or forward after the number of learned MAC 1166 addresses reaches the maximum number on an interface"; 1167 } 1168 leaf alarm { 1169 when "not(../limitType='macApply') 1170 or ../limitType='macLimit'"; 1171 type macEnableStatus; 1172 default "enable"; 1173 description 1174 "Whether an alarm is generated after the number of learned 1175 MAC addresses reaches the maximum number on an interface."; 1176 } 1177 } 1178 } 1179 container ifVlanMacLimits { 1180 description 1181 "Interface + VLAN MAC address limit list."; 1182 list ifVlanMacLimit { 1183 key "ifName vlanBegin limitType"; 1184 config false; 1185 description 1186 "Interface + VLAN MAC address limit."; 1187 leaf ifName { 1188 type string; 1189 description 1190 "Name of an interface. "; 1191 } 1192 leaf vlanBegin { 1193 type macVlanId; 1194 description 1195 "Start VLAN ID."; 1196 } 1197 leaf vlanEnd { 1198 type macVlanId; 1199 must "(../vlanEnd>=../vlanBegin) 1200 or not(../limitType='macApply')"; 1201 description 1202 "End VLAN ID."; 1203 } 1204 leaf limitType { 1205 type limitType; 1206 description 1207 "Interface MAC limit type."; 1208 } 1209 leaf ruleName { 1210 type leafref { 1211 path "/mac/macLimitRules/macLimitRule/ruleName"; 1213 } 1214 description 1215 "Rule name."; 1216 } 1217 leaf maximum { 1218 when "not(../limitType='macApply') 1219 or ../limitType='macLimit'"; 1220 type uint32 { 1221 range "0..131072"; 1222 } 1223 mandatory true; 1224 description 1225 "Maximum number of MAC addresses that can be learned on 1226 an interface."; 1227 } 1228 leaf rate { 1229 when "not(../limitType='macApply') 1230 or ../limitType='macLimit'"; 1231 type uint16 { 1232 range "0..1000"; 1233 } 1234 mandatory true; 1235 description 1236 "Interval (ms) at which MAC addresses are learned on 1237 an interface."; 1238 } 1239 leaf action { 1240 when "not(../limitType='macApply') 1241 or ../limitType='macLimit'"; 1242 type macLimitForward; 1243 default "discard"; 1244 description 1245 "Discard or forward the packet."; 1246 } 1247 leaf alarm { 1248 when "not(../limitType='macApply') 1249 or ../limitType='macLimit'"; 1251 type macEnableStatus; 1252 default "enable"; 1253 description 1254 "Whether an alarm is generated after the number of learned 1255 MAC addresses reaches the maximum number."; 1256 } 1257 } 1258 } 1259 } 1260 } 1261 1263 4. IANA Considerations 1265 This document makes no request of IANA. 1267 Note to RFC Editor: this section may be removed on publication as an 1268 RFC. 1270 5. Security Considerations 1272 TBD 1274 6. Acknowledgements 1276 Authors would like to thank the comments and suggestions from Dacheng 1277 Zhang. 1279 7. Normative References 1281 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1282 Requirement Levels", BCP 14, RFC 2119, 1283 DOI 10.17487/RFC2119, March 1997, 1284 . 1286 Author's Address 1288 Huihua Fan 1289 Huawei 1291 EMail: fanhuihua@huawei.com