Junos switch-options configuration module
Version: 2019-01-01
module junos-es-conf-switch-options { yang-version 1; namespace "http://yang.juniper.net/junos-es/conf/switch-options"; prefix jc-switch-options; import junos-common-ddl-extensions { prefix junos; revision-date "2019-01-01"; } import junos-common-types { prefix jt; revision-date "2019-01-01"; } import junos-es-conf-root { prefix jc; revision-date "2019-01-01"; } organization "Juniper Networks, Inc."; contact "yang-support@juniper.net"; description "Junos switch-options configuration module"; revision "2019-01-01" { description "Junos: 21.3R1.9"; } augment /jc:configuration { uses switch-options-group; } augment /jc:configuration/jc:groups { uses switch-options-group; } grouping switch-options-group { container switch-options { description "Options for default routing-instance of type virtual-switch"; uses juniper-def-rtb-switch-options; } // container switch-options } // grouping switch-options-group grouping juniper-def-rtb-switch-options { description "Bridge option configuration"; uses apply-advanced; container mac-table-size { junos:must "(!(((".. .. .. protocols vpls" || ".. .. .. protocols evpn") && ".. .. .. instance-type virtual-switch")))"; junos:must-message "mac-table-size needs to be specified under switch-options for a virtual-switch instance"; description "Size of MAC address forwarding table"; uses apply-advanced; leaf limit { type union { type string { pattern "<.*>|$.*"; } type uint32; } description "Maximum number of MAC addresses"; } leaf packet-action { type enumeration { enum "none" { value 0; description "Forward the packet"; } enum "drop" { value 1; description "Drop packets and do not learn. Default is forward"; } } description "Action when MAC limit is reached"; } } // container mac-table-size container mac-ip-table-size { junos:must "(!(((".. .. .. protocols vpls" || ".. .. .. protocols evpn") && ".. .. .. instance-type virtual-switch")))"; junos:must-message "mac-ip-table-size needs to be specified under switch-options for a virtual-switch instance"; description "Size of MAC+IP bindings table"; uses apply-advanced; leaf limit { type union { type string { pattern "<.*>|$.*"; } type uint32; } description "Maximum number of MAC+IP bindings"; } } // container mac-ip-table-size container interface-mac-limit { junos:must "(!(((".. .. .. protocols vpls" || ".. .. .. protocols evpn") && ".. .. .. instance-type virtual-switch")))"; junos:must-message "interface-mac-limit needs to be specified under switch-options for a virtual-switch instance"; description "Maximum MAC address learned per interface"; uses apply-advanced; leaf limit { type union { type string { pattern "<.*>|$.*"; } type uint32; } description "Maximum number of MAC addresses per interface"; } leaf packet-action { type enumeration { enum "none" { value 0; description "Forward the packet"; } enum "drop" { value 1; description "Drop packets and do not learn. Default is forward"; } enum "log" { value 2; description "Do not drop the packet but generate an alarm, an SNMP trap or a system log entry"; } enum "shutdown" { value 3; description "Disable the interface and generate an alarm, an SNMP trap or a system log entry"; } enum "drop-and-log" { value 4; description "Drop the packet and generate an alarm, an SNMP trap or a system log entry"; } } description "Action when MAC limit is reached"; } } // container interface-mac-limit container interface-mac-ip-limit { junos:must "(!(((".. .. .. protocols vpls" || ".. .. .. protocols evpn") && ".. .. .. instance-type virtual-switch")))"; junos:must-message "interface-mac-ip-limit needs to be specified under switch-options for a virtual-switch instance"; description "Maximum MAC+IP bindings learned per interface"; uses apply-advanced; leaf limit { type union { type string { pattern "<.*>|$.*"; } type uint32; } description "Maximum number of MAC+IP bindings per interface"; } } // container interface-mac-ip-limit container mac-notification { presence "enable mac-notification"; description "MAC notification options"; uses apply-advanced; leaf notification-interval { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 60"; } } units "seconds"; default "30"; description "Interval for sending MAC notifications"; } } // container mac-notification leaf mac-table-aging-time { type union { type string { pattern "<.*>|$.*"; } type uint32; } units "seconds"; description "Delay for discarding MAC address if no updates are received"; } leaf no-mac-learning { junos:must "(!(((".. .. .. protocols vpls" || ".. .. .. protocols evpn") && ".. .. .. instance-type virtual-switch")))"; junos:must-message "no-mac-learning needs to be specified under switch-options for a virtual-switch instance"; type empty; description "Disable dynamic MAC address learning"; } leaf no-normalization { type empty; description "Disable vlan id normalization for interfaces"; } leaf mac-statistics { junos:must "(!(((".. .. .. protocols vpls" || ".. .. .. protocols evpn") && ".. .. .. instance-type virtual-switch")))"; junos:must-message "mac-statistics needs to be specified under switch-options for a virtual-switch instance"; type empty; description "Enable MAC address statistics"; } container mib { presence "enable mib"; description "Snmp mib options"; uses apply-advanced; container dot1q-mib { presence "enable dot1q-mib"; description "Dot1q MIB configuration options"; uses apply-advanced; leaf port-list { type enumeration { enum "bit-map" { value 0; description "Port list is represented in bit-map format"; } enum "string" { value 1; description "Port list is represented in string format"; } } description "Port list for staticegressports and staticuntaggedports MIB"; } } // container dot1q-mib } // container mib container static-rvtep-mac { description "Configure Static MAC and remote VxLAN tunnel endpoint entries"; uses apply-advanced; list mac { key "mac_addr remote-vtep"; description "Unicast MAC address"; leaf mac_addr { type jt:mac-unicast; } leaf remote-vtep { type jt:ipaddr; description "Configure static remote VXLAN tunnel endpoints"; } } // list mac } // container static-rvtep-mac leaf service-id { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 65535"; } } description "Service ID required if multi-chassis AE is part of a bridge-domain"; } leaf ovsdb-managed { junos:must "(!("routing-instances ${instance} protocols evpn encapsulation vxlan"))"; junos:must-message "Not valid with protocols evpn encapsulation vxlan"; type empty; description "All vxlan bridge domains in routing instance are remote managed"; } container vtep-source-interface { description "Source layer-3 IFL for VXLAN"; leaf interface-name { junos:must "("interfaces $$")"; junos:must-message "Interface must be defined"; type union { type jt:interface-name; type string { pattern "<.*>|$.*"; } } } choice family { container inet { presence "enable inet"; description "IPv4 source"; uses apply-advanced; } // container inet container inet6 { presence "enable inet6"; description "IPv6 source"; uses apply-advanced; } // container inet6 } // choice family } // container vtep-source-interface container vtep-remote-interface { description "Remote VTEP interface"; uses apply-advanced; list remote-ip { key "name"; ordered-by user; description "Remote VTEP IP address"; leaf name { type jt:ipv4addr; description "IP address"; } uses apply-advanced; leaf dynamic-profile { junos:must "("dynamic-profiles $$")"; junos:must-message "Dynamic profile must be defined"; type string; description "Define associate dynamic profile"; } } // list remote-ip container default { description "To all remote vtep interface"; uses apply-advanced; leaf dynamic-profile { junos:must "("dynamic-profiles $$")"; junos:must-message "Dynamic profile must be defined"; type string; description "Define associate dynamic profile"; } } // container default } // container vtep-remote-interface list interface { key "name"; ordered-by user; description "Interface for configuring bridge-options"; leaf name { junos:must "(("interfaces $$-IFL family bridge interface-mode" || "interfaces $$-IFL family ethernet-switching"))"; junos:must-message "Only interface with 'interface-mode' are allowed in a default routing-instance"; junos:must "("interfaces $$")"; junos:must-message "Interface must be part of this routing instance"; type union { type jt:interface-name; type string { pattern "<.*>|$.*"; } } description "Interface name"; } uses apply-advanced; container interface-mac-limit { description "Maximum number of MAC addresses learned on the interface"; uses apply-advanced; leaf limit { type union { type string { pattern "<.*>|$.*"; } type uint32; } description "Maximum number of MAC addresses per interface"; } leaf disable { type empty; description "Disable interface for interface-mac-limit"; } leaf packet-action { type enumeration { enum "none" { value 0; description "Forward the packet"; } enum "drop" { value 1; description "Drop packets and do not learn. Default is forward"; } enum "log" { value 2; description "Do not drop the packet but generate an alarm, an SNMP trap or a system log entry"; } enum "shutdown" { value 3; description "Disable the interface and generate an alarm, an SNMP trap or a system log entry"; } enum "drop-and-log" { value 4; description "Drop the packet and generate an alarm, an SNMP trap or a system log entry"; } } description "Action when MAC limit is reached"; } } // container interface-mac-limit container interface-mac-ip-limit { description "Maximum number of MAC+IP bindings learned on the interface"; uses apply-advanced; leaf limit { type union { type string { pattern "<.*>|$.*"; } type uint32; } description "Maximum number of MAC+IP bindings per interface"; } } // container interface-mac-ip-limit leaf no-mac-learning { type empty; description "Disable dynamic MAC address learning"; } leaf mac-pinning { type empty; description "Enable MAC pinning"; } leaf no-mac-notification { type empty; description "Disable mac notification on this interface"; } } // list interface leaf-list remote-vtep-list { type jt:ipaddr; max-elements 1024; description "Configure static remote VXLAN tunnel endpoints"; } leaf interface-shutdown-action { type enumeration { enum "soft-shutdown" { value 0; description "Soft-shutdown restricts data-packets while control-packets are still received"; } enum "hard-shutdown" { value 1; description "Hard-shutdown restricts all packets, port will not be operational"; } } description "Interface shutdown mode for Storm-Control/Mac-Limit/Mac-Move-limit scenario"; } leaf-list remote-vtep-v6-list { type jt:ipv6addr; max-elements 1024; description "Configurate static IPv6 remote VXLAN tunnel endpoints"; } container route-distinguisher { junos:must "(".. .. protocols evpn")"; junos:must-message "protocols evpn must be defined"; description "Route distinguisher for this instance"; leaf rd-type { type string { junos:posix-pattern "^[0-9.]+L?:[0-9]+$"; junos:pattern-message "Use format 'x:y' where 'x' is an AS number followed by an optional 'L' (To indicate 4 byte AS), or an IP address and 'y' is a number. e.g. 123456L:100"; } description "Number in (16 bit:32 bit) or (32 bit 'L':16 bit) or (IP address:16 bit) format"; } } // container route-distinguisher leaf-list vrf-import { junos:must "(".. route-distinguisher")"; junos:must-message "route-distinguisher must be defined"; type jt:policy-algebra; ordered-by user; description "Import policy for VRF instance RIBs"; } leaf-list vrf-export { junos:must "(".. route-distinguisher")"; junos:must-message "route-distinguisher must be defined"; type jt:policy-algebra; ordered-by user; description "Export policy for VRF instance RIBs"; } container vrf-target { junos:must "(".. route-distinguisher")"; junos:must-message "route-distinguisher must be defined"; description "VRF target community configuration"; uses apply-advanced; leaf community { type string { junos:posix-pattern "^[a-z]+:[0-9.]+L?:[0-9]+$"; junos:pattern-message "Use format 'target:x:y' where 'x' is an AS number followed by an optional 'L' (To indicate 4 byte AS), or an IP address and 'y' is a number. e.g. target:123456L:100"; } description "Target community to use in import and export"; } leaf import { type string { junos:posix-pattern "^[a-z]+:[0-9.]+L?:[0-9]+$"; junos:pattern-message "Use format 'target:x:y' where 'x' is an AS number followed by an optional 'L' (To indicate 4 byte AS), or an IP address and 'y' is a number. e.g. target:123456L:100"; } description "Target community to use when filtering on import"; } leaf export { type string { junos:posix-pattern "^[a-z]+:[0-9.]+L?:[0-9]+$"; junos:pattern-message "Use format 'target:x:y' where 'x' is an AS number followed by an optional 'L' (To indicate 4 byte AS), or an IP address and 'y' is a number. e.g. target:123456L:100"; } description "Target community to use when marking routes on export"; } container auto { presence "enable auto"; description "Auto derive import and export target community from BGP AS & L2"; uses juniper-def-rtb-auto-import-as; } // container auto } // container vrf-target container redundant-trunk-group { description "Redundant trunk group"; uses apply-advanced; list group { key "name"; ordered-by user; description "Name of Redundant trunk group"; leaf name { type string { junos:posix-pattern "^[[:alpha:]][[:alnum:]_-]+$"; junos:pattern-message "Must be a string beginning with a letter and consisting of letters, numbers, dashes, and underscores"; length "1 .. 63"; } description "RTG name"; } uses apply-advanced; leaf preempt-cutover-timer { type union { type string { pattern "<.*>|$.*"; } type uint16 { range "1 .. 600"; } } units "seconds"; description "Hold timer for primary interface before preempting secondary interface"; } leaf description { type string { junos:posix-pattern "^[[:alpha:]][[:alnum:]_-]+$"; junos:pattern-message "Must be a string beginning with a letter and consisting of letters, numbers, dashes, and underscores"; length "1 .. 127"; } description "Text description of the RTG"; } list interface { key "name"; description "Interfaces that are part of this redundant trunk group"; leaf name { junos:must "(!("switch-options interface $$ persistent-learning"))"; junos:must-message "Persistent learning can not be configured on an interface which is part of RTG"; junos:must "(!(any "forwarding-options analyzer <*> output interface $$"))"; junos:must-message "Analyzer output and RTG can not be enabled on the same interface"; junos:must "(!((any "protocols protection-group ethernet-ring <*> east-interface control-channel $$" || any "protocols protection-group ethernet-ring <*> west-interface control-channel $$")))"; junos:must-message "ERP and RTG can not be enabled on the same interface"; type union { type jt:interface-name; type string { pattern "<.*>|$.*"; } } description "Interface name"; } uses apply-advanced; leaf primary { type empty; description "Set Primary Redundant Trunk Group interface"; } } // list interface } // list group } // container redundant-trunk-group container voip { description "Voice-over-IP configuration"; uses apply-advanced; list interface { key "name"; ordered-by user; description "Enable voice over IP on this port"; leaf name { type string; } uses apply-advanced; leaf vlan { junos:must "(!("vlans $$ vlan-range "))"; junos:must-message "Ranged vlan cannot be used by Voice-over-IP"; type string; description "VLAN for voice over IP"; } leaf forwarding-class { type string { junos:posix-pattern "^.{1,64}$"; junos:pattern-message "Must be string of 64 characters or less"; } description "Forwarding class"; } } // list interface } // container voip container unknown-unicast-forwarding { description "Set interface for forwarding of unknown unicast packets"; uses apply-advanced; list vlan { key "name"; description "VLAN for the unknown unicast packets"; leaf name { type string; description "VLAN name or VLAN Tag (1..4095)"; } uses apply-advanced; leaf interface { type union { type jt:interface-name; type string { pattern "<.*>|$.*"; } } description "Interface to send unknown unicast packets for the VLAN"; } } // list vlan } // container unknown-unicast-forwarding } // grouping juniper-def-rtb-switch-options grouping apply-advanced { description "Apply advanced configuration logic"; leaf-list apply-groups { type string; ordered-by user; description "Groups from which to inherit configuration data"; } leaf-list apply-groups-except { type string; ordered-by user; description "Don't inherit configuration data from these groups"; } list apply-macro { key "name"; ordered-by user; description "Macro and parameters for commit script expansion"; uses apply-macro-type; } // list apply-macro } // grouping apply-advanced grouping apply-macro-type { description "Macro data for commit-script expansion"; leaf name { type string; description "Name of the macro to be expanded"; } list data { key "name"; uses macro-data-type; } // list data } // grouping apply-macro-type grouping juniper-def-rtb-auto-import-as { uses apply-advanced; list import-as { key "name"; description "AS to auto import for a list of VNI ids"; leaf name { type string { junos:posix-pattern "^[0-9]+(.[0-9]+)?$"; junos:pattern-message "Use format 'x' or 'x.y' to specify number 'x' (Range 1 .. 4294967295) or number with higher 2 bytes 'x' (Range 0 .. 65535) and lower 2 bytes 'y' (Range 0 .. 65535) respectively"; } description " Autonomous system number in plain number or 'higher 16bits'.'Lower 16 bits' (asdot notation) format"; } uses apply-advanced; leaf-list vni-list { type string; description "List of VNI identifiers or all"; } } // list import-as } // grouping juniper-def-rtb-auto-import-as grouping macro-data-type { leaf name { type string; description "Keyword part of the keyword-value pair"; } leaf value { type string; description "Value part of the keyword-value pair"; } } // grouping macro-data-type } // module junos-es-conf-switch-options
© 2023 YumaWorks, Inc. All rights reserved.