Junos class-of-service configuration module
Version: 2019-01-01
module junos-conf-class-of-service { yang-version 1; namespace "http://yang.juniper.net/junos/conf/class-of-service"; prefix jc-class-of-service; 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-conf-root { prefix jc; revision-date "2019-01-01"; } organization "Juniper Networks, Inc."; contact "yang-support@juniper.net"; description "Junos class-of-service configuration module"; revision "2019-01-01" { description "Junos: 21.3R1.9"; } augment /jc:configuration { uses class-of-service-group; } augment /jc:configuration/jc:groups { uses class-of-service-group; } grouping class-of-service-group { container class-of-service { description "Class-of-service configuration"; uses juniper-class-of-service-options; } // container class-of-service } // grouping class-of-service-group grouping juniper-class-of-service-options { uses apply-advanced; container classifiers { description "Classify incoming packets based on code point value"; uses apply-advanced; list dscp { key "name"; ordered-by user; description "Differentiated Services code point classifier"; leaf name { junos:must "((".. forwarding-class" || ".. import"))"; junos:must-message "'At least one 'forwarding class' or 'import' classifier definition is required for classifier configuration"; type string { length "1 .. 64"; } description "Classifier name"; } uses apply-advanced; leaf import { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Include this classifier in this definition"; } list forwarding-class { key "name"; description "Define a classification of code point aliases"; leaf name { type string { length "1 .. 64"; } description "Forwarding class name"; } uses apply-advanced; list loss-priority { key "name"; description "Classify code points to a loss priority"; leaf name { type enumeration { enum "low" { value 0; description "Code points to classify to loss priority low"; } enum "high" { value 1; description "Code points to classify to loss priority high"; } enum "medium-low" { value 2; description "Code points to classify to loss priority medium-low"; } enum "medium-high" { value 3; description "Code points to classify to loss priority medium-high"; } } } leaf-list code-points { type string; ordered-by user; description "List of code point aliases and/or bit strings"; } } // list loss-priority } // list forwarding-class } // list dscp list dscp-ipv6 { key "name"; ordered-by user; description "Differentiated Services code point classifier IPv6"; leaf name { junos:must "((".. forwarding-class" || ".. import"))"; junos:must-message "'At least one 'forwarding class' or 'import' classifier definition is required for classifier configuration"; type string { length "1 .. 64"; } description "Classifier name"; } uses apply-advanced; leaf import { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Include this classifier in this definition"; } list forwarding-class { key "name"; description "Define a classification of code point aliases"; leaf name { type string { length "1 .. 64"; } description "Forwarding class name"; } uses apply-advanced; list loss-priority { key "name"; description "Classify code points to a loss priority"; leaf name { type enumeration { enum "low" { value 0; description "Code points to classify to loss priority low"; } enum "high" { value 1; description "Code points to classify to loss priority high"; } enum "medium-low" { value 2; description "Code points to classify to loss priority medium-low"; } enum "medium-high" { value 3; description "Code points to classify to loss priority medium-high"; } } } leaf-list code-points { type string; ordered-by user; description "List of code point aliases and/or bit strings"; } } // list loss-priority } // list forwarding-class } // list dscp-ipv6 list exp { key "name"; ordered-by user; description "MPLS EXP classifier"; leaf name { junos:must "((".. forwarding-class" || ".. import"))"; junos:must-message "'At least one 'forwarding class' or 'import' classifier definition is required for classifier configuration"; type string { length "1 .. 64"; } description "Classifier name"; } uses apply-advanced; leaf import { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Include this classifier in this definition"; } list forwarding-class { key "name"; description "Define a classification of code point aliases"; leaf name { type string { length "1 .. 64"; } description "Forwarding class name"; } uses apply-advanced; list loss-priority { key "name"; description "Classify code points to a loss priority"; leaf name { type enumeration { enum "low" { value 0; description "Code points to classify to loss priority low"; } enum "high" { value 1; description "Code points to classify to loss priority high"; } enum "medium-low" { value 2; description "Code points to classify to loss priority medium-low"; } enum "medium-high" { value 3; description "Code points to classify to loss priority medium-high"; } } } leaf-list code-points { type string; ordered-by user; description "List of code point aliases and/or bit strings"; } } // list loss-priority } // list forwarding-class } // list exp list ieee-802.1 { key "name"; ordered-by user; description "IEEE-802.1 classifier"; leaf name { junos:must "((".. forwarding-class" || ".. import"))"; junos:must-message "'At least one 'forwarding class' or 'import' classifier definition is required for classifier configuration"; type string { length "1 .. 64"; } description "Classifier name"; } uses apply-advanced; leaf import { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Include this classifier in this definition"; } list forwarding-class { key "name"; description "Define a classification of code point aliases"; leaf name { type string { length "1 .. 64"; } description "Forwarding class name"; } uses apply-advanced; list loss-priority { key "name"; description "Classify code points to a loss priority"; leaf name { type enumeration { enum "low" { value 0; description "Code points to classify to loss priority low"; } enum "high" { value 1; description "Code points to classify to loss priority high"; } enum "medium-low" { value 2; description "Code points to classify to loss priority medium-low"; } enum "medium-high" { value 3; description "Code points to classify to loss priority medium-high"; } } } leaf-list code-points { type string; ordered-by user; description "List of code point aliases and/or bit strings"; } } // list loss-priority } // list forwarding-class } // list ieee-802.1 list inet-precedence { key "name"; ordered-by user; description "IPv4 precedence classifier"; leaf name { junos:must "((".. forwarding-class" || ".. import"))"; junos:must-message "'At least one 'forwarding class' or 'import' classifier definition is required for classifier configuration"; type string { length "1 .. 64"; } description "Classifier name"; } uses apply-advanced; leaf import { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Include this classifier in this definition"; } list forwarding-class { key "name"; description "Define a classification of code point aliases"; leaf name { type string { length "1 .. 64"; } description "Forwarding class name"; } uses apply-advanced; list loss-priority { key "name"; description "Classify code points to a loss priority"; leaf name { type enumeration { enum "low" { value 0; description "Code points to classify to loss priority low"; } enum "high" { value 1; description "Code points to classify to loss priority high"; } enum "medium-low" { value 2; description "Code points to classify to loss priority medium-low"; } enum "medium-high" { value 3; description "Code points to classify to loss priority medium-high"; } } } leaf-list code-points { type string; ordered-by user; description "List of code point aliases and/or bit strings"; } } // list loss-priority } // list forwarding-class } // list inet-precedence list ieee-802.1ad { key "name"; ordered-by user; description "IEEE-802.1ad (DEI) classifier"; leaf name { junos:must "((".. forwarding-class" || ".. import"))"; junos:must-message "'At least one 'forwarding class' or 'import' classifier definition is required for classifier configuration"; type string { length "1 .. 64"; } description "Classifier name"; } uses apply-advanced; leaf import { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Include this classifier in this definition"; } list forwarding-class { key "name"; description "Define a classification of code point aliases"; leaf name { type string { length "1 .. 64"; } description "Forwarding class name"; } uses apply-advanced; list loss-priority { key "name"; description "Classify code points to a loss priority"; leaf name { type enumeration { enum "low" { value 0; description "Code points to classify to loss priority low"; } enum "high" { value 1; description "Code points to classify to loss priority high"; } enum "medium-low" { value 2; description "Code points to classify to loss priority medium-low"; } enum "medium-high" { value 3; description "Code points to classify to loss priority medium-high"; } } } leaf-list code-points { type string; ordered-by user; description "List of code point aliases and/or bit strings"; } } // list loss-priority } // list forwarding-class } // list ieee-802.1ad } // container classifiers container traffic-class-map { description "Packet input priority map based on incoming packets code point"; uses apply-advanced; list inet-precedence { key "name"; description "IPv4 precedence traffic-class-map"; leaf name { junos:must "(".. traffic-class")"; junos:must-message "'At least one 'traffic-class' definition is required for traffic-class-map"; type string { length "1 .. 64"; } description "Traffic-class-map name"; } uses apply-advanced; list traffic-class { key "name"; description "Map code points to a input packet priority"; leaf name { type enumeration { enum "real-time" { value 0; description "Code points map to traffic-class real-time"; } enum "network-control" { value 1; description "Code points map to traffic-class network-control"; } enum "best-effort" { value 2; description "Code points map to traffic-class best-effort"; } } } leaf-list code-points { type string; ordered-by user; description "List of code point aliases and/or bit strings"; } } // list traffic-class } // list inet-precedence list dscp { key "name"; description "Differentiated Services code point traffic-class-map"; leaf name { junos:must "(".. traffic-class")"; junos:must-message "'At least one 'traffic-class' definition is required for traffic-class-map"; type string { length "1 .. 64"; } description "Traffic-class-map name"; } uses apply-advanced; list traffic-class { key "name"; description "Map code points to a input packet priority"; leaf name { type enumeration { enum "real-time" { value 0; description "Code points map to traffic-class real-time"; } enum "network-control" { value 1; description "Code points map to traffic-class network-control"; } enum "best-effort" { value 2; description "Code points map to traffic-class best-effort"; } } } leaf-list code-points { type string; ordered-by user; description "List of code point aliases and/or bit strings"; } } // list traffic-class } // list dscp list exp { key "name"; description "MPLS EXP traffic-class-map"; leaf name { junos:must "(".. traffic-class")"; junos:must-message "'At least one 'traffic-class' definition is required for traffic-class-map"; type string { length "1 .. 64"; } description "Traffic-class-map name"; } uses apply-advanced; list traffic-class { key "name"; description "Map code points to a input packet priority"; leaf name { type enumeration { enum "real-time" { value 0; description "Code points map to traffic-class real-time"; } enum "network-control" { value 1; description "Code points map to traffic-class network-control"; } enum "best-effort" { value 2; description "Code points map to traffic-class best-effort"; } } } leaf-list code-points { type string; ordered-by user; description "List of code point aliases and/or bit strings"; } } // list traffic-class } // list exp list ieee-802.1 { key "name"; description "IEEE-802.1 traffic-class-map"; leaf name { junos:must "(".. traffic-class")"; junos:must-message "'At least one 'traffic-class' definition is required for traffic-class-map"; type string { length "1 .. 64"; } description "Traffic-class-map name"; } uses apply-advanced; list traffic-class { key "name"; description "Map code points to a input packet priority"; leaf name { type enumeration { enum "real-time" { value 0; description "Code points map to traffic-class real-time"; } enum "network-control" { value 1; description "Code points map to traffic-class network-control"; } enum "best-effort" { value 2; description "Code points map to traffic-class best-effort"; } } } leaf-list code-points { type string; ordered-by user; description "List of code point aliases and/or bit strings"; } } // list traffic-class } // list ieee-802.1 list ieee-802.1ad { key "name"; description "IEEE-802.1ad (DEI) traffic-class-map"; leaf name { junos:must "(".. traffic-class")"; junos:must-message "'At least one 'traffic-class' definition is required for traffic-class-map"; type string { length "1 .. 64"; } description "Traffic-class-map name"; } uses apply-advanced; list traffic-class { key "name"; description "Map code points to a input packet priority"; leaf name { type enumeration { enum "real-time" { value 0; description "Code points map to traffic-class real-time"; } enum "network-control" { value 1; description "Code points map to traffic-class network-control"; } enum "best-effort" { value 2; description "Code points map to traffic-class best-effort"; } } } leaf-list code-points { type string; ordered-by user; description "List of code point aliases and/or bit strings"; } } // list traffic-class } // list ieee-802.1ad } // container traffic-class-map list policy-map { key "name"; max-elements 65535; description "Policy-map describing the packet marking rule"; leaf name { type string { length "1 .. 64"; } description "Policy-map name"; } uses apply-advanced; list inet-precedence { junos:must "((!(".. dscp") && !("..dsvp-v6")))"; junos:must-message "Both INET-Precedence and DSCP marking type not allowed in same policy"; key "name"; description "IPv4 INET-Precedence Policy-map code point"; leaf name { type enumeration { enum "proto-ip" { value 0; description "Default marking behavior"; } enum "proto-mpls" { value 1; description "Enable IP header marking for IP->MPLS packet"; } } description "Optional flag to specify marking behavior"; } leaf code-point { type string { junos:posix-pattern "^(([01]{3})|([a-zA-Z].{0,63}))$"; junos:pattern-message "Not 3-bit pattern or code point alias"; } description "List of code point aliases and/or bit strings"; } } // list inet-precedence list dscp { junos:must "(!(".. inet-precedence"))"; junos:must-message "Both INET-Precedence and DSCP marking type not allowed in same policy"; key "name"; description "IPv4 Differentiated Services Policy-map code point"; leaf name { type enumeration { enum "proto-ip" { value 0; description "Default marking behavior"; } enum "proto-mpls" { value 1; description "Enable IP header marking for IP->MPLS packet"; } } description "Optional flag to specify marking behavior"; } leaf code-point { type string { junos:posix-pattern "^(([01]{6})|([a-zA-Z].{0,63}))$"; junos:pattern-message "Not 6-bit pattern or code point alias"; } description "List of code point aliases and/or bit strings"; } } // list dscp list dscp-ipv6 { key "name"; description "IPv6 Differentiated Services Policy-map code point"; leaf name { type enumeration { enum "proto-ip" { value 0; description "Default marking behavior"; } enum "proto-mpls" { value 1; description "Enable IP header marking for IP->MPLS packet"; } } description "Optional flag to specify marking behavior"; } leaf code-point { type string { junos:posix-pattern "^(([01]{6})|([a-zA-Z].{0,63}))$"; junos:pattern-message "Not 6-bit pattern or code point alias"; } description "List of code point aliases and/or bit strings"; } } // list dscp-ipv6 list exp { key "name"; description "MPLS EXP Policy-map code point"; leaf name { type enumeration { enum "all-label" { value 0; description "Default marking behavior"; } enum "outer-label" { value 1; description "Marking on only outer MPLS label"; } } description "Optional flag to specify marking behavior"; } leaf code-point { type string { junos:posix-pattern "^(([01]{3})|([a-zA-Z].{0,63}))$"; junos:pattern-message "Not 3-bit pattern or code point alias"; } description "List of code point aliases and/or bit strings"; } } // list exp list ieee-802.1 { junos:must "(!(".. ieee-802.1ad"))"; junos:must-message "Both IEEE-802.1 and IEEE-802.1ad marking type not allowed in same policy"; key "name"; description "IEEE-802.1 Policy-map code point"; leaf name { type enumeration { enum "outer" { value 0; description "Marking on outer VLAN tag"; } enum "outer-and-inner" { value 1; description "Marking on both outer and inner VLAN tag"; } } description "Optional flag to specify marking behavior"; } leaf code-point { type string { junos:posix-pattern "^(([01]{3})|([a-zA-Z].{0,63}))$"; junos:pattern-message "Not 3-bit pattern or code point alias"; } description "List of code point aliases and/or bit strings"; } } // list ieee-802.1 list ieee-802.1ad { junos:must "(!(".. ieee-802.1"))"; junos:must-message "Both IEEE-802.1 and IEEE-802.1ad marking type not allowed in same policy"; key "name"; description "IEEE-802.1ad Policy-map code point"; leaf name { type enumeration { enum "outer" { value 0; description "Marking on outer VLAN tag"; } enum "outer-and-inner" { value 1; description "Marking on both outer and inner VLAN tag"; } } description "Optional flag to specify marking behavior"; } leaf code-point { type string { junos:posix-pattern "^(([01]{4})|([a-zA-Z].{0,63}))$"; junos:pattern-message "Not 4-bit pattern or code point alias"; } description "IEEE-802.1ad (DEI) Policy-map code point"; } } // list ieee-802.1ad } // list policy-map list forwarding-class-map { key "name"; description "Map forwarding class to queue number for interfaces"; leaf name { type string { length "1 .. 64"; } description "Interface specific forwarding class name"; } uses apply-advanced; list class { key "name"; description "Forwarding class"; leaf name { type string { length "1 .. 64"; } description "Name of forwarding class"; } leaf queue-num { type union { type string { pattern "<.*>|$.*"; } type uint32; } description "Queue number"; } leaf restricted-queue { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "0 .. 3"; } } description "Restricted queue number"; } } // list class } // list forwarding-class-map container loss-priority-maps { description "Map loss priority of incoming packets based on code point value"; uses apply-advanced; list frame-relay-de { key "name"; description "Frame relay discard eligible bit loss priority map"; leaf name { type string { length "1 .. 64"; } description "Loss priority map name"; } uses apply-advanced; list loss-priority { key "name"; description "Map code points to a loss priority"; leaf name { type enumeration { enum "low" { value 0; description "Code points to classify to low loss priority"; } enum "high" { value 1; description "Code points to classify to high loss priority"; } enum "medium-low" { value 2; description "Code points to classify to medium-low loss priority"; } enum "medium-high" { value 3; description "Code points to classify to medium-high loss priority"; } } } leaf-list code-points { type string; ordered-by user; description "List of bit strings"; } } // list loss-priority } // list frame-relay-de } // container loss-priority-maps container loss-priority-rewrites { description "Rewrite code point of outgoing packet based on loss priority"; uses apply-advanced; list frame-relay-de { key "name"; description "Frame relay discard eligible bit loss priority rewrite"; leaf name { type string { length "1 .. 64"; } description "Loss priority rewrite name"; } uses apply-advanced; list loss-priority { key "name"; description "Code point marking based on loss priority"; leaf name { type enumeration { enum "low" { value 0; description "Marking when loss priority is low"; } enum "high" { value 1; description "Marking when loss priority is high"; } enum "medium-low" { value 2; description "Marking when loss priority is medium-low"; } enum "medium-high" { value 3; description "Marking when loss priority is medium-high"; } } } leaf code-point { type string { junos:posix-pattern "^[01]$"; junos:pattern-message "Must be 0 or 1"; } description "Code point aliases or bit string"; } } // list loss-priority } // list frame-relay-de } // container loss-priority-rewrites container code-point-aliases { description "Mapping of code point aliases to bit strings"; uses apply-advanced; list dscp { key "name"; description "Differentiated Services code point aliases"; leaf name { type string { junos:posix-pattern "^([a-zA-Z].{0,63})$"; junos:pattern-message "Must be string of 64 characters or less beginning with letter"; } description "DSCP alias name"; } leaf bits { type string { junos:posix-pattern "^([01]{6})$"; junos:pattern-message "Must be of form xxxxxx, where x is 1 or 0"; } description "DSCP 6-bit pattern"; } } // list dscp list dscp-ipv6 { key "name"; description "Differentiated Services code point aliases IPv6"; leaf name { type string { junos:posix-pattern "^([a-zA-Z].{0,63})$"; junos:pattern-message "Must be string of 64 characters or less beginning with letter"; } description "DSCP IPv6 alias name"; } leaf bits { type string { junos:posix-pattern "^([01]{6})$"; junos:pattern-message "Must be of form xxxxxx, where x is 1 or 0"; } description "DSCP 6-bit pattern"; } } // list dscp-ipv6 list exp { key "name"; description "MPLS EXP code point aliases"; leaf name { type string { junos:posix-pattern "^([a-zA-Z].{0,63})$"; junos:pattern-message "Must be string of 64 characters or less beginning with letter"; } description "EXP alias name"; } leaf bits { type string { junos:posix-pattern "^([01]{3})$"; junos:pattern-message "Must be of form xxx, where x is 0 or 1"; } description "EXP 3-bit pattern"; } } // list exp list ieee-802.1 { key "name"; description "IEEE-802.1 code point aliases"; leaf name { type string { junos:posix-pattern "^([a-zA-Z].{0,63})$"; junos:pattern-message "Must be string of 64 characters or less beginning with letter"; } description "IEEE-802.1 alias name"; } leaf bits { type string { junos:posix-pattern "^([01]{3})$"; junos:pattern-message "Must be of form xxx, where x is 0 or 1"; } description "IEEE-802.1 3-bit pattern"; } } // list ieee-802.1 list inet-precedence { key "name"; description "IPv4 precedence code point aliases"; leaf name { type string { junos:posix-pattern "^([a-zA-Z].{0,63})$"; junos:pattern-message "Must be string of 64 characters or less beginning with letter"; } description "IPv4 precedence alias name"; } leaf bits { type string { junos:posix-pattern "^([01]{3})$"; junos:pattern-message "Must be of form xxx, where x is 0 or 1"; } description "IPv4 precedence 3-bit pattern"; } } // list inet-precedence list ieee-802.1ad { key "name"; description "IEEE-802.1ad (DEI) code point aliases"; leaf name { type string { junos:posix-pattern "^([a-zA-Z].{0,63})$"; junos:pattern-message "Must be string of 64 characters or less beginning with letter"; } description "IEEE-802.1ad (DEI) alias name"; } leaf bits { type string { junos:posix-pattern "^([01]{4})$"; junos:pattern-message "Must be of form xxxx, where x is 0 or 1"; } description "IEEE-802.1ad (DEI) 4-bit pattern"; } } // list ieee-802.1ad list inet6-precedence { key "name"; description "IPv6 precedence code point aliases"; leaf name { type string { junos:posix-pattern "^([a-zA-Z].{0,63})$"; junos:pattern-message "Must be string of 64 characters or less beginning with letter"; } description "IPv6 precedence alias name"; } leaf bits { type string { junos:posix-pattern "^([01]{3})$"; junos:pattern-message "Must be of form xxx, where x is 0 or 1"; } description "IPv6 precedence 3-bit pattern"; } } // list inet6-precedence } // container code-point-aliases container translation-table { description "Translation table"; uses apply-advanced; list to-802.1p-from-dscp { key "name"; description "DSCP to 802.1 translation table"; leaf name { type string { length "1 .. 64"; } description "Translation table name"; } uses apply-advanced; list to-code-point { key "name"; description "IEEE 802.1 code point"; leaf name { type string { junos:posix-pattern "^(([01]{3})|([a-zA-Z].{0,63}))$"; junos:pattern-message "Not 3-bit pattern or code point alias"; } description "IEEE 802.1 code point"; } leaf-list from-code-points { type string; ordered-by user; description "DSCP code point"; } } // list to-code-point } // list to-802.1p-from-dscp list to-inet-precedence-from-inet-precedence { key "name"; description "INET PRECEDENCE to INET PRECEDENCE translation table"; leaf name { type string { length "1 .. 64"; } description "Translation table name"; } uses apply-advanced; list to-code-point { key "name"; description "INET PRECEDENCE code point"; leaf name { type string { junos:posix-pattern "^(([01]{3})|([a-zA-Z].{0,63}))$"; junos:pattern-message "Not 3-bit pattern or code point alias"; } description "INET PRECEDENCE code point"; } leaf-list from-code-points { type union { type string { pattern "\*"; } type string; } ordered-by user; description "INET PRECEDENCE code point"; } } // list to-code-point } // list to-inet-precedence-from-inet-precedence list to-dscp-from-dscp { key "name"; description "DSCP to DSCP translation table"; leaf name { type string { length "1 .. 64"; } description "Translation table name"; } uses apply-advanced; list to-code-point { key "name"; description "DSCP code point"; leaf name { type string { junos:posix-pattern "^(([01]{6})|([a-zA-Z].{0,63}))$"; junos:pattern-message "Not 6-bit pattern or code point alias"; } description "DSCP code point"; } leaf-list from-code-points { type union { type string { pattern "\*"; } type string; } ordered-by user; description "DSCP code point"; } } // list to-code-point } // list to-dscp-from-dscp list to-dscp-ipv6-from-dscp-ipv6 { key "name"; description "DSCP-IPV6 to DSCP-IPV6 translation table"; leaf name { type string { length "1 .. 64"; } description "Translation table name"; } uses apply-advanced; list to-code-point { key "name"; description "DSCP-IPV6 code point"; leaf name { type string { junos:posix-pattern "^(([01]{6})|([a-zA-Z].{0,63}))$"; junos:pattern-message "Not 6-bit pattern or code point alias"; } description "DSCP-IPV6 code point"; } leaf-list from-code-points { type union { type string { pattern "\*"; } type string; } ordered-by user; description "DSCP-IPV6 code point"; } } // list to-code-point } // list to-dscp-ipv6-from-dscp-ipv6 list to-exp-from-exp { key "name"; description "EXP to EXP translation table"; leaf name { type string { length "1 .. 64"; } description "Translation table name"; } uses apply-advanced; list to-code-point { key "name"; description "EXP code point"; leaf name { type string { junos:posix-pattern "^(([01]{3})|([a-zA-Z].{0,63}))$"; junos:pattern-message "Not 3-bit pattern or code point alias"; } description "EXP code point"; } leaf-list from-code-points { type union { type string { pattern "\*"; } type string; } ordered-by user; description "EXP code point"; } } // list to-code-point } // list to-exp-from-exp } // container translation-table container host-outbound-traffic { description "Classify and mark host traffic to forwarding engine"; uses apply-advanced; leaf forwarding-class { type string { length "1 .. 64"; } description "Classification of host traffic to forwarding engine"; } leaf dscp-code-point { type string { junos:posix-pattern "^(([01]{6})|([a-zA-Z].{0,63}))$"; junos:pattern-message "Not 6-bit pattern or code point alias"; } description "Static DSCP code point of egress host traffic"; } leaf override-firewall { type empty; description "Override firewall filter actions for RE generated traffic"; } container translation-table { description "Translation table for host outbound packets"; leaf to-802.1p-from-dscp { type string { length "1 .. 64"; } description "DSCP to 802.1 translation table"; } } // container translation-table container tcp { presence "enable tcp"; description "Settings for host outbound TCP packets"; uses apply-advanced; leaf raise-internet-control-priority { type empty; description "Place packets with IP Precedence set to Internet control into Q3 (network-control)"; } } // container tcp container ieee-802.1 { presence "enable ieee-802.1"; description "Mark IEEE 802.1p for host output traffic"; uses apply-advanced; leaf rewrite-rules { type empty; description "Mark IEEE 802.1p for host outbound traffic using rewrite-rules"; } leaf default { type string { junos:posix-pattern "^(([01]{3})|([a-zA-Z].{0,63}))$"; junos:pattern-message "Not 3-bit pattern or code point alias"; } description "Mark IEEE 802.1p for host outbound traffic default value"; } } // container ieee-802.1 container protocol { description "Settings for specific host outbound protocol packets"; uses apply-advanced; container isis-over-gre { description "Settings for ISIS over GRE packets"; uses apply-advanced; leaf dscp-code-point { type string { junos:posix-pattern "^(([01]{6})|([a-zA-Z].{0,63}))$"; junos:pattern-message "Not 6-bit pattern or code point alias"; } description "Static DSCP code point of egress host traffic"; } } // container isis-over-gre } // container protocol } // container host-outbound-traffic container queue-drop-fairness { presence "enable queue-drop-fairness"; description "Egress Fair Queuing behaviour on VOQ based systems"; uses apply-advanced; choice fairness-val { leaf off { type empty; description "Disable Egress Fair Queuing behaviour on VOQ based systems"; } leaf on { type empty; description "Enable Egress Fair Queuing behaviour on VOQ based systems"; } } // choice fairness-val } // container queue-drop-fairness list drop-profiles { key "name"; description "Random Early Drop (RED) data point map"; leaf name { type string { length "1 .. 64"; } description "Drop profile name"; } uses apply-advanced; list fill-level { key "name"; description "Fill-level value of data point"; leaf name { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "0 .. 100"; } } description "Percentage the queue is full"; } leaf drop-probability { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "0 .. 100"; } } description "Probability packet will be dropped"; } } // list fill-level container interpolate { description "Data points interpolated"; uses apply-advanced; leaf-list fill-level { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "0 .. 100"; } } ordered-by user; description "Data points for queue full percentage"; } leaf-list drop-probability { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "0 .. 100"; } } ordered-by user; description "Data points for packet drop probability"; } } // container interpolate } // list drop-profiles list adaptive-shapers { key "name"; description "Define the list of trigger types and associated rates"; leaf name { type string { length "1 .. 64"; } description "Adaptive shaper name"; } uses apply-advanced; list trigger { key "name"; description "List of trigger types"; leaf name { type enumeration { enum "becn" { value 0; description "Backward explicit congestion notification"; } } } container shaping-rate { description "Shaping rate for the trigger"; choice rate-choice { leaf absolute-rate { type string; units "bits per second"; description "Shaping rate as an absolute rate"; } leaf percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 100"; } } description "Shaping rate as a percentage"; } } // choice rate-choice } // container shaping-rate } // list trigger } // list adaptive-shapers list virtual-channels { key "name"; description "Define the list of virtual channels"; leaf name { type string { length "1 .. 64"; } description "Virtual channel name"; } uses apply-advanced; } // list virtual-channels list virtual-channel-groups { key "name"; description "Define list of virtual channel groups"; leaf name { type string { length "1 .. 64"; } description "Virtual channel group name"; } uses apply-advanced; list channel { key "name"; description "Configure virtual channel for this group"; leaf name { type string { length "1 .. 64"; } description "Virtual channel group name"; } uses apply-advanced; leaf scheduler-map { type string { length "1 .. 64"; } description "Scheduler map applied to this virtual channel"; } container shaping-rate { description "Shaping rate for the trigger"; choice rate-choice { leaf absolute-rate { type string; units "bits per second"; description "Adaptive shaping rate as an absolute rate"; } leaf percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 100"; } } description "Adaptive shaping rate as a percentage"; } } // choice rate-choice } // container shaping-rate leaf default { type empty; description "Default virtual channel"; } } // list channel } // list virtual-channel-groups leaf copy-plp-all { type empty; description "Turn on loss-precedence copying including IP multicast"; } leaf tri-color { type empty; description "Enable tricolor marking"; } leaf non-strict-priority-scheduling { type empty; description "Enable non-strict-priority scheduling"; } container shared-buffer { description "Shared buffer configuration"; uses apply-advanced; leaf percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "5 .. 100"; } } description "Percentage of shared buffer to be used"; } } // container shared-buffer container forwarding-classes { description "One or more mappings of forwarding class to queue number"; uses apply-advanced; list class { junos:must "(!(".. queue"))"; junos:must-message "'queue' and 'class' cannot coexist"; key "name"; max-elements 16; description "Forwarding class to map to queue number"; leaf name { type string { length "1 .. 64"; } description "Name of forwarding class"; } leaf queue-num { type union { type string { pattern "<.*>|$.*"; } type uint32; } description "Queue number"; } leaf priority { type enumeration { enum "low" { value 0; description "Low fabric priority"; } enum "high" { value 1; description "High fabric priority"; } } description "Fabric priority"; } leaf policing-priority { type enumeration { enum "normal" { value 0; description "Normal policing priority"; } enum "premium" { value 1; description "Premium policing priority"; } } description "Policing priority for hierarchical policers"; } leaf no-loss { type empty; description "This is no traffic loss class"; } leaf pfc-priority { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "0 .. 7"; } } description "PFC priority (FC id's)"; } } // list class list queue { key "name"; description "Queue number to map to forwarding class"; leaf name { type union { type string { pattern "<.*>|$.*"; } type uint32; } description "Queue number"; } leaf class-name { type string { length "1 .. 64"; } description "Forwarding class name"; } leaf priority { type enumeration { enum "low" { value 0; description "Fabric priority low"; } enum "high" { value 1; description "Fabric priority high"; } } description "Fabric priority"; } leaf policing-priority { type enumeration { enum "normal" { value 0; description "Normal policing priority"; } enum "premium" { value 1; description "Premium policing priority"; } } description "Policing priority for hierarchical policers"; } } // list queue } // container forwarding-classes container restricted-queues { description "Map forwarding classes to restricted queues"; uses apply-advanced; list forwarding-class { key "name"; description "Forwarding class to map to a restricted queue"; leaf name { type string { length "1 .. 64"; } description "Forwarding class name"; } leaf rqueue-num { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "0 .. 3"; } } description "Restricted queue number"; } } // list forwarding-class } // container restricted-queues list traffic-control-profiles { key "name"; description "Traffic shaping and scheduling profiles"; leaf name { type string { length "1 .. 64"; } description "Traffic control profile name"; } uses apply-advanced; leaf scheduler-map { type string { length "1 .. 64"; } description "Mapping of forwarding classes to packet schedulers"; } leaf strict-priority-scheduler { type empty; description "Enable strict priority scheduler."; } leaf atm-service { type enumeration { enum "cbr" { value 0; description "Constant bit rate"; } enum "rtvbr" { value 1; description "Real-time variable bit rate"; } enum "nrtvbr" { value 2; description "Non-real-time variable bit rate"; } } description "ATM service category"; } leaf peak-rate { type string; units "cps"; description "ATM Peak Cell Rate (PCR)"; } leaf sustained-rate { type string; units "cps"; description "ATM Sustained Cell Rate (SCR)"; } leaf max-burst-size { type union { type string { pattern "<.*>|$.*"; } type uint64 { range "1 .. 4000"; } } units "cells"; description "ATM Maximum Burst Size (MBS)"; } container shaping-rate { description "Shaping rate"; choice shaping_rate_choice { leaf rate { junos:must "(!("interfaces ${interface} aggregated-ether-options link-speed mixed"))"; junos:must-message "Scheduler shaping-rate in bits per second is incompatible with link-speed mixed"; type string; units "bits per second"; description "Shaping rate as an absolute rate"; } leaf percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 100"; } } description "Shaping rate as a percentage"; } } // choice shaping_rate_choice leaf burst-size { type string; units "bytes"; description "Shaping rate burst size"; } } // container shaping-rate container overhead-accounting { description "Overhead accounting"; leaf mode { type string { length "1 .. 64"; } } leaf bytes { type union { type string { pattern "<.*>|$.*"; } type int32 { range "-120 .. 124"; } } description "Byte adjust value"; } leaf frame-mode-bytes { junos:must "(!(".. bytes"))"; junos:must-message "cannot specify both bytes and frame-mode-bytes"; type union { type string { pattern "<.*>|$.*"; } type int32 { range "-120 .. 124"; } } description "Overhead bytes when in frame-mode"; } leaf cell-mode-bytes { junos:must "(!(".. bytes"))"; junos:must-message "cannot specify both bytes and cell-mode-bytes"; type union { type string { pattern "<.*>|$.*"; } type int32 { range "-120 .. 124"; } } description "Overhead bytes when in cell-mode"; } } // container overhead-accounting container shaping-rate-priority-strict-high { description "Shaping rate for strict high priority traffic"; choice shaping_rate_choice { leaf rate { type string; units "bits per second"; description "Shaping rate in bits per second"; } leaf percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 100"; } } description "Shaping rate as a percentage"; } } // choice shaping_rate_choice leaf burst-size { type string; units "bytes"; description "Shaping rate burst size"; } } // container shaping-rate-priority-strict-high container shaping-rate-priority-high { description "Shaping rate for high priority traffic"; choice shaping_rate_choice { leaf rate { type string; units "bits per second"; description "Shaping rate in bits per second"; } leaf percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 100"; } } description "Shaping rate as a percentage"; } } // choice shaping_rate_choice leaf burst-size { type string; units "bytes"; description "Shaping rate burst size"; } } // container shaping-rate-priority-high container shaping-rate-priority-medium { description "Shaping rate for medium priority traffic"; choice shaping_rate_choice { leaf rate { type string; units "bits per second"; description "Shaping rate in bits per second"; } leaf percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 100"; } } description "Shaping rate as a percentage"; } } // choice shaping_rate_choice leaf burst-size { type string; units "bytes"; description "Shaping rate burst size"; } } // container shaping-rate-priority-medium container shaping-rate-priority-medium-low { description "Shaping rate for medium low priority traffic"; choice shaping_rate_choice { leaf rate { type string; units "bits per second"; description "Shaping rate in bits per second"; } leaf percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 100"; } } description "Shaping rate as a percentage"; } } // choice shaping_rate_choice leaf burst-size { type string; units "bytes"; description "Shaping rate burst size"; } } // container shaping-rate-priority-medium-low container shaping-rate-priority-low { description "Shaping rate for low priority traffic"; choice shaping_rate_choice { leaf rate { type string; units "bits per second"; description "Shaping rate in bits per second"; } leaf percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 100"; } } description "Shaping rate as a percentage"; } } // choice shaping_rate_choice leaf burst-size { type string; units "bytes"; description "Shaping rate burst size"; } } // container shaping-rate-priority-low container shaping-rate-excess-high { description "Shaping rate for excess high traffic"; choice shaping_rate_choice { leaf rate { type string; units "bits per second"; description "Shaping rate in bits per second"; } leaf percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 100"; } } description "Shaping rate as a percentage"; } } // choice shaping_rate_choice leaf burst-size { type string; units "bytes"; description "Shaping rate burst size"; } } // container shaping-rate-excess-high container shaping-rate-excess-low { description "Shaping rate for excess low traffic"; choice shaping_rate_choice { leaf rate { type string; units "bits per second"; description "Shaping rate in bits per second"; } leaf percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 100"; } } description "Shaping rate as a percentage"; } } // choice shaping_rate_choice leaf burst-size { type string; units "bytes"; description "Shaping rate burst size"; } } // container shaping-rate-excess-low container shaping-rate-excess-medium-high { description "Shaping rate for excess medium-high traffic"; choice shaping_rate_choice { leaf rate { type string; units "bits per second"; description "Shaping rate in bits per second"; } leaf percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 100"; } } description "Shaping rate as a percentage"; } } // choice shaping_rate_choice leaf burst-size { type string; units "bytes"; description "Shaping rate burst size"; } } // container shaping-rate-excess-medium-high container shaping-rate-excess-medium-low { description "Shaping rate for excess medium-low traffic"; choice shaping_rate_choice { leaf rate { type string; units "bits per second"; description "Shaping rate in bits per second"; } leaf percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 100"; } } description "Shaping rate as a percentage"; } } // choice shaping_rate_choice leaf burst-size { type string; units "bytes"; description "Shaping rate burst size"; } } // container shaping-rate-excess-medium-low container guaranteed-rate { description "Guaranteed rate"; choice guaranteed_rate_choice { leaf rate { type string; units "bits per second"; description "Guaranteed rate as an absolute rate"; } leaf percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 100"; } } description "Guaranteed rate as a percentage"; } } // choice guaranteed_rate_choice leaf burst-size { type string; units "bytes"; description "Guaranteed rate burst size"; } } // container guaranteed-rate container excess-rate { junos:must "(!((".. excess-rate-high" || (".. excess-rate-low" || (".. excess-rate-medium-high" || ".. excess-rate-medium-low")))))"; junos:must-message "cannot specify both excess-rate and excess-rate-high or excess-rate-low or excess-rate-medium-high or excess-rate-medium-low"; description "Excess bandwidth sharing proportion"; choice excess_rate_choice { leaf proportion { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "0 .. 1000"; } } description "Excess rate as a proportion"; } leaf percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 100"; } } description "Excess rate as a percentage"; } } // choice excess_rate_choice } // container excess-rate container excess-rate-high { junos:must "(!(".. excess-rate"))"; junos:must-message "cannot specify both excess-rate and excess-rate-high"; description "Excess bandwidth sharing for excess-high priority"; choice excess_rate_choice { leaf proportion { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "0 .. 1000"; } } description "Excess rate as a proportion"; } leaf percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 100"; } } description "Excess rate as a percentage"; } } // choice excess_rate_choice } // container excess-rate-high container excess-rate-medium-high { junos:must "(!(".. excess-rate"))"; junos:must-message "cannot specify both excess-rate and excess-rate-medium-high"; description "Excess bandwidth sharing for excess-medium-high priority"; choice excess_rate_choice { leaf proportion { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "0 .. 1000"; } } description "Excess rate as a proportion"; } leaf percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 100"; } } description "Excess rate as a percentage"; } } // choice excess_rate_choice } // container excess-rate-medium-high container excess-rate-low { junos:must "(!(".. excess-rate"))"; junos:must-message "cannot specify both excess-rate and excess-rate-low"; description "Excess bandwidth sharing for excess-low priority"; choice excess_rate_choice { leaf proportion { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "0 .. 1000"; } } description "Excess rate as a proportion"; } leaf percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 100"; } } description "Excess rate as a percentage"; } } // choice excess_rate_choice } // container excess-rate-low container excess-rate-medium-low { junos:must "(!(".. excess-rate"))"; junos:must-message "cannot specify both excess-rate and excess-rate-medium-low"; description "Excess bandwidth sharing for excess-medium-low priority"; choice excess_rate_choice { leaf proportion { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "0 .. 1000"; } } description "Excess rate as a proportion"; } leaf percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 100"; } } description "Excess rate as a percentage"; } } // choice excess_rate_choice } // container excess-rate-medium-low choice delay_buffer_sizing { container delay-buffer-rate { description "Delay buffer rate"; choice delay_buffer_rate_choice { leaf rate { type string; units "bits per second"; description "Delay buffer rate as an absolute rate"; } leaf percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 100"; } } description "Delay buffer rate as a percentage"; } leaf cps { type string; units "cells per second"; description "Delay buffer rate as an absolute cells per second rate"; } } // choice delay_buffer_rate_choice } // container delay-buffer-rate } // choice delay_buffer_sizing container adjust-minimum { description "Minimum shaping-rate when adjusted"; leaf rate { type string; units "bits per second"; description "Minimum shaping rate in bits per second"; } } // container adjust-minimum } // list traffic-control-profiles list forwarding-class-sets { key "name"; description "Forwarding class sets"; leaf name { type string { length "1 .. 64"; } description "Forwarding class set"; } uses apply-advanced; list class { key "name"; description "Forwarding class"; leaf name { type string { length "1 .. 64"; } description "Class name"; } uses apply-advanced; } // list class } // list forwarding-class-sets list congestion-notification-profile { key "name"; description "Congestion notification profile"; leaf name { type string { length "1 .. 64"; } description "Congestion notification name"; } uses apply-advanced; container pfc-watchdog { junos:must "(".. output")"; junos:must-message "pfc-watchdog configurations mandate output config"; presence "enable pfc-watchdog"; description "Configure pfc-watchdog parameters"; uses apply-advanced; leaf poll-interval { type union { type string { pattern "<.*>|$.*"; } type uint16 { range "100 .. 1000"; } } units "milliseconds"; description "Pfc watchdog poll interval timings"; } leaf detection { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "2 .. 10"; } } description "Pfc Number of poll periods"; } leaf recovery { type union { type string { pattern "<.*>|$.*"; } type uint16 { range "200 .. 1000"; } } units "milliseconds"; description "Pfc watchdog recovery time interval"; } leaf watchdog-action { type enumeration { enum "drop" { value 0; description "Pfc watchdog action drop"; } } description "Configure pfc-wathdog action"; } } // container pfc-watchdog container input { description "Input congestion notification components"; uses apply-advanced; leaf cable-length { type string; units "metre"; description "Length of cable in metre"; } list pfc-account { key "name"; description "PFC account configurations"; leaf name { type string { length "1 .. 64"; } description "PFC account name"; } uses apply-advanced; leaf xon { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "0 .. 100000"; } } description "Specifies account threshold for resume in microseconds of source port speed"; } leaf xoff { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "0 .. 100000"; } } description "Specifies account threshold for pause in microseconds of source port speed"; } leaf-list pfc-priority { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "0 .. 7"; } } ordered-by user; description "PFC priorities( set of priorities)"; } } // list pfc-account container ieee-802.1 { description "IEEE 802.1 code point"; uses apply-advanced; list code-point { key "name"; max-elements 8; description "IEEE 802.1 code point"; leaf name { type string { junos:posix-pattern "^([01]{3})$"; junos:pattern-message "Must be of form xxx, where x is 0 or 1"; } description "IEEE 802.1 code point"; } uses apply-advanced; leaf pfc { type empty; description "PFC"; } leaf pfc-account-name { type string { length "1 .. 64"; } description "Attach PFC account to code point"; } leaf mru { junos:must "(".. pfc")"; junos:must-message "MRU not allowed without PFC"; type string; units "bytes"; description "Max Receive Size of packet for this code point"; } choice qfc-control { case case_1 { } // case case_1 container qcn { presence "enable qcn"; description "QCN"; uses apply-advanced; container defense-mode-edge { description "Choose the defense mode edge"; uses apply-advanced; container alternate-priority { description "Choose the alternate priority for defense mode edge"; uses apply-advanced; leaf bits { type string { junos:posix-pattern "^([01]{3})$"; junos:pattern-message "Must be of form xxx, where x is 0 or 1"; } description "IEEE 802.1 code point"; } } // container alternate-priority } // container defense-mode-edge } // container qcn } // choice qfc-control } // list code-point } // container ieee-802.1 container dscp { description "DSCP code point"; uses apply-advanced; list code-point { key "name"; max-elements 64; description "DSCP code point"; leaf name { type string { junos:posix-pattern "^([01]{6})$"; junos:pattern-message "Must be of form xxxxxx, where x is 0 or 1"; } description "DSCP code point"; } uses apply-advanced; leaf pfc { type empty; description "PFC"; } leaf pfc-account-name { type string { length "1 .. 64"; } description "Attach PFC account to code point"; } leaf mru { junos:must "(".. pfc")"; junos:must-message "MRU not allowed without PFC"; type string; units "bytes"; description "Max Receive Size of packet for this code point"; } } // list code-point } // container dscp } // container input container output { description "Output congestion notification components"; uses apply-advanced; list class { key "name"; max-elements 16; description "Forwarding class"; leaf name { type string { length "1 .. 64"; } description "Class name"; } uses apply-advanced; leaf remove-cntag { type empty; description "Remove cntag for this forwarding class"; } } // list class container ieee-802.1 { description "IEEE 802.1 code point"; uses apply-advanced; list code-point { key "name"; max-elements 8; description "IEEE 802.1 code point"; leaf name { type string { junos:posix-pattern "^([01]{3})$"; junos:pattern-message "Must be of form xxx, where x is 0 or 1"; } description "IEEE 802.1 code point"; } uses apply-advanced; leaf-list flow-control-queue { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "0 .. 7"; } } ordered-by user; description "Flow control queue( set of queues)"; } } // list code-point } // container ieee-802.1 } // container output } // list congestion-notification-profile container system-defaults { description "System defaults"; uses apply-advanced; container classifiers { description "System wide Classifiers applied to incoming packets"; uses apply-advanced; container exp { description "EXP classifier"; leaf classifier-name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of classifier to be applied"; } } // container exp } // container classifiers container traffic-control-profiles { description "Default traffic control profiles"; uses apply-advanced; container interface-set-input { description "Default input traffic control profile for dynamic interface-set"; leaf profile-name { type string { length "1 .. 64"; } description "Name of traffic control profile"; } } // container interface-set-input container interface-set-output { description "Default output traffic control profile for dynamic interface-set"; leaf profile-name { type string { length "1 .. 64"; } description "Name of traffic control profile"; } } // container interface-set-output } // container traffic-control-profiles } // container system-defaults container dynamic-class-of-service-options { description "Dynamic class-of-service options"; uses apply-advanced; list vendor-specific-tags { key "name"; description "Enable vendor specific tags"; leaf name { type enumeration { enum "actual-data-rate-downstream" { value 0; description "Enable shaping based on actual-data-rate-downstream"; } enum "access-loop-encapsulation" { value 1; description "Enable overhead-accounting based on access-loop-encapsulation"; } enum "apply-to-interface-set" { value 2; description "Apply adjusted rate to the underlying interface-set"; } } } uses apply-advanced; } // list vendor-specific-tags } // container dynamic-class-of-service-options container interfaces { description "Apply class-of-service options to interfaces"; uses apply-advanced; list interface-set { key "name"; description "Interface set traffic-control-profile attachment"; leaf name { type string { length "1 .. 64"; } description "Name of the interface set"; } uses apply-advanced; leaf internal-node { type empty; description "Internal node"; } container input-excess-bandwidth-share { description "Input Excess bandwidth sharing policy"; choice input_excess_bandwidth_share { leaf proportional { type string; units "bits per second"; description "Maximum Queue Bandwidth"; } leaf equal { type empty; description "Equal sharing of excess bandwidth"; } } // choice input_excess_bandwidth_share } // container input-excess-bandwidth-share container excess-bandwidth-share { description "Output Excess bandwidth sharing policy"; choice output_excess_bandwidth_share { leaf proportional { type string; units "bits per second"; description "Maximum Queue Bandwidth"; } leaf equal { type empty; description "Equal sharing of excess bandwidth"; } } // choice output_excess_bandwidth_share } // container excess-bandwidth-share container input-traffic-control-profile { description "Input traffic control profile for the interface set"; leaf profile-name { type string { length "1 .. 64"; } description "Name of the input traffic control profile associated with the interface set"; } } // container input-traffic-control-profile container input-traffic-control-profile-remaining { description "Input traffic control profile for the remaining traffic on an interface set"; leaf profile-name { type string { length "1 .. 64"; } description "Name of the input traffic control profile associated with the remaining traffic for the interface set"; } } // container input-traffic-control-profile-remaining container output-traffic-control-profile { description "Output traffic control profile for the interface set"; leaf profile-name { type string { length "1 .. 64"; } description "Name of the output traffic control profile associated with the interface set"; } } // container output-traffic-control-profile container output-traffic-control-profile-remaining { description "Output traffic control profile for the remaining traffic on an interface set"; leaf profile-name { type string { length "1 .. 64"; } description "Name of the output traffic control profile associated with the remaining traffic for the interface set"; } } // container output-traffic-control-profile-remaining } // list interface-set list interface { key "name"; uses cos_interfaces_type; } // list interface } // container interfaces list routing-instances { key "name"; description "Apply CoS options to routing instances with VRF table label"; leaf name { junos:must "((!(".. classifiers") || (!("routing-instances $$") || ("routing-instances $$ vrf-table-label" || ("routing-instances $$ protocols vpls no-tunnel-services" || "routing-instances $$ routing-options localize")))))"; junos:must-message "'vrf-table-label' or 'no-tunnel-services' or 'routing-options localize' for this routing instance is required for classifier configuration"; type string { junos:posix-pattern "!^(([*]{1,})|(__.*__)|(.{129,}))$"; junos:pattern-message "Must be a non-reserved string of 128 characters or less"; } description "Routing instance name (or wildcard)"; } uses apply-advanced; container classifiers { description "Classifiers applied to incoming packets"; uses apply-advanced; leaf no-default { type empty; description "Do not apply default classifiers to this interface"; } container exp { description "EXP classifier"; leaf classifier-name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of classifier to be applied"; } } // container exp container ieee-802.1 { description "IEEE-802.1 classifier"; leaf classifier-name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of classifier to be applied"; } leaf encapsulated { junos:must "(".. vlan-tag")"; junos:must-message "vlan-tag must be specified"; type empty; description "Inner or outer ethernet header"; } leaf vlan-tag { type enumeration { enum "outer" { value 0; description "Classification based on outer VLAN tag"; } enum "inner" { value 1; description "Classification based on inner VLAN tag"; } } description "VLAN tag used for classification"; } } // container ieee-802.1 container dscp { description "Differentiated Services code point classifier"; leaf classifier-name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of classifier to be applied"; } } // container dscp container dscp-ipv6 { description "Differentiated Services code point classifier IPv6"; leaf classifier-name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of classifier to be applied"; } } // container dscp-ipv6 } // container classifiers container rewrite-rules { description "Rewrite rules applied to outgoing packets"; uses apply-advanced; choice _802_rewrites { container ieee-802.1 { description "IEEE-802.1 rewrite rule"; leaf rewrite-rule-name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of rewrite rule to be applied"; } leaf encapsulated { junos:must "(".. vlan-tag")"; junos:must-message "vlan-tag must be specified"; type empty; description "Inner ethernet header"; } leaf vlan-tag { type enumeration { enum "outer" { value 0; description "Rewrite rule applies to outer VLAN tag"; } enum "outer-and-inner" { value 1; description "Rewrite rule applies to outer and inner VLAN tag"; } } description "One or more VLAN tags to which rewrite rule applies"; } } // container ieee-802.1 container ieee-802.1ad { description "IEEE-802.1ad (DEI) rewrite rule"; leaf rewrite-rule-name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of rewrite rule to be applied"; } leaf encapsulated { junos:must "(".. vlan-tag")"; junos:must-message "vlan-tag must be specified"; type empty; description "Inner ethernet header"; } leaf vlan-tag { type enumeration { enum "outer" { value 0; description "Rewrite rule applies to outer VLAN tag"; } enum "outer-and-inner" { value 1; description "Rewrite rule applies to outer and inner VLAN tag"; } } description "One or more VLAN tags to which rewrite rule applies"; } } // container ieee-802.1ad } // choice _802_rewrites } // container rewrite-rules container policy-map { description "Policy-map describing the packet marking rule"; leaf policy-map-name { type string; description "Name of Policy-map to be applied"; } } // container policy-map } // list routing-instances container rewrite-rules { description "Write code point value of outgoing packets"; uses apply-advanced; list dscp { key "name"; ordered-by user; description "Differentiated Services code point rewrite rule"; leaf name { junos:must "((".. forwarding-class" || ".. import"))"; junos:must-message "'At least one 'forwarding class' or 'import' rewrite definition is required for rewrite configuration"; type string { length "1 .. 64"; } description "Rewrite rule name"; } uses apply-advanced; leaf import { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Include this rewrite rule in this definition"; } list forwarding-class { key "name"; description "Markings for named forwarding class"; leaf name { type string { length "1 .. 64"; } description "Forwarding class name"; } uses apply-advanced; list loss-priority { key "name"; description "Code point marking based on loss priority"; leaf name { type enumeration { enum "low" { value 0; description "Marking when loss priority is low"; } enum "high" { value 1; description "Marking when loss priority is high"; } enum "medium-low" { value 2; description "Marking when loss priority is medium-low"; } enum "medium-high" { value 3; description "Marking when loss priority is medium-high"; } } } leaf code-point { type string { junos:posix-pattern "^(([01]{6})|([a-zA-Z].{0,63}))$"; junos:pattern-message "Not 6-bit pattern or code point alias"; } description "Code point aliases or bit string"; } } // list loss-priority } // list forwarding-class } // list dscp list dscp-ipv6 { key "name"; ordered-by user; description "Differentiated Services code point rewrite rule IPv6"; leaf name { junos:must "((".. forwarding-class" || ".. import"))"; junos:must-message "'At least one 'forwarding class' or 'import' rewrite definition is required for rewrite configuration"; type string { length "1 .. 64"; } description "Rewrite rule name"; } uses apply-advanced; leaf import { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Include this rewrite rule in this definition"; } list forwarding-class { key "name"; description "Markings for named forwarding class"; leaf name { type string { length "1 .. 64"; } description "Forwarding class name"; } uses apply-advanced; list loss-priority { key "name"; description "Code point marking based on loss priority"; leaf name { type enumeration { enum "low" { value 0; description "Marking when loss priority is low"; } enum "high" { value 1; description "Marking when loss priority is high"; } enum "medium-low" { value 2; description "Marking when loss priority is medium-low"; } enum "medium-high" { value 3; description "Marking when loss priority is medium-high"; } } } leaf code-point { type string { junos:posix-pattern "^(([01]{6})|([a-zA-Z].{0,63}))$"; junos:pattern-message "Not 6-bit pattern or code point alias"; } description "Code point aliases or bit string"; } } // list loss-priority } // list forwarding-class } // list dscp-ipv6 list exp { key "name"; ordered-by user; description "MPLS EXP rewrite rule"; leaf name { junos:must "((".. forwarding-class" || ".. import"))"; junos:must-message "'At least one 'forwarding class' or 'import' rewrite definition is required for rewrite configuration"; type string { length "1 .. 64"; } description "Rewrite rule name"; } uses apply-advanced; leaf import { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Include this rewrite rule in this definition"; } list forwarding-class { key "name"; description "Markings for named forwarding class"; leaf name { type string { length "1 .. 64"; } description "Forwarding class name"; } uses apply-advanced; list loss-priority { key "name"; description "Code point marking based on loss priority"; leaf name { type enumeration { enum "low" { value 0; description "Marking when loss priority is low"; } enum "high" { value 1; description "Marking when loss priority is high"; } enum "medium-low" { value 2; description "Marking when loss priority is medium-low"; } enum "medium-high" { value 3; description "Marking when loss priority is medium-high"; } } } leaf code-point { type string { junos:posix-pattern "^(([01]{3})|([a-zA-Z].{0,63}))$"; junos:pattern-message "Not 3-bit pattern or code point alias"; } description "Code point aliases or bit string"; } } // list loss-priority } // list forwarding-class } // list exp list ieee-802.1 { key "name"; ordered-by user; description "IEEE-802.1 rewrite rule"; leaf name { junos:must "((".. forwarding-class" || ".. import"))"; junos:must-message "'At least one 'forwarding class' or 'import' rewrite definition is required for rewrite configuration"; type string { length "1 .. 64"; } description "Rewrite rule name"; } uses apply-advanced; leaf import { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Include this rewrite rule in this definition"; } list forwarding-class { key "name"; description "Markings for named forwarding class"; leaf name { type string { length "1 .. 64"; } description "Forwarding class name"; } uses apply-advanced; list loss-priority { key "name"; description "Code point marking based on loss priority"; leaf name { type enumeration { enum "low" { value 0; description "Marking when loss priority is low"; } enum "high" { value 1; description "Marking when loss priority is high"; } enum "medium-low" { value 2; description "Marking when loss priority is medium-low"; } enum "medium-high" { value 3; description "Marking when loss priority is medium-high"; } } } leaf code-point { type string { junos:posix-pattern "^(([01]{3})|([a-zA-Z].{0,63}))$"; junos:pattern-message "Not 3-bit pattern or code point alias"; } description "Code point aliases or bit string"; } } // list loss-priority } // list forwarding-class } // list ieee-802.1 list inet-precedence { key "name"; ordered-by user; description "IPv4 precedence rewrite rule"; leaf name { junos:must "((".. forwarding-class" || ".. import"))"; junos:must-message "'At least one 'forwarding class' or 'import' rewrite definition is required for rewrite configuration"; type string { length "1 .. 64"; } description "Rewrite rule name"; } uses apply-advanced; leaf import { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Include this rewrite rule in this definition"; } list forwarding-class { key "name"; description "Markings for named forwarding class"; leaf name { type string { length "1 .. 64"; } description "Forwarding class name"; } uses apply-advanced; list loss-priority { key "name"; description "Code point marking based on loss priority"; leaf name { type enumeration { enum "low" { value 0; description "Marking when loss priority is low"; } enum "high" { value 1; description "Marking when loss priority is high"; } enum "medium-low" { value 2; description "Marking when loss priority is medium-low"; } enum "medium-high" { value 3; description "Marking when loss priority is medium-high"; } } } leaf code-point { type string { junos:posix-pattern "^(([01]{3})|([a-zA-Z].{0,63}))$"; junos:pattern-message "Not 3-bit pattern or code point alias"; } description "Code point aliases or bit string"; } } // list loss-priority } // list forwarding-class } // list inet-precedence list frame-relay-de { key "name"; ordered-by user; description "Frame relay discard eligible bit rewrite rule"; leaf name { junos:must "((".. forwarding-class" || ".. import"))"; junos:must-message "'At least one 'forwarding class' or 'import' rewrite definition is required for rewrite configuration"; type string { length "1 .. 64"; } description "Rewrite rule name"; } uses apply-advanced; leaf import { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Include this rewrite rule in this definition"; } list forwarding-class { key "name"; description "Markings for named forwarding class"; leaf name { type string { length "1 .. 64"; } description "Forwarding class name"; } uses apply-advanced; list loss-priority { key "name"; description "Code point marking based on loss priority"; leaf name { type enumeration { enum "low" { value 0; description "Marking when loss priority is low"; } enum "high" { value 1; description "Marking when loss priority is high"; } enum "medium-low" { value 2; description "Marking when loss priority is medium-low"; } enum "medium-high" { value 3; description "Marking when loss priority is medium-high"; } } } leaf code-point { type string { junos:posix-pattern "^[01]$"; junos:pattern-message "Must be 0 or 1"; } description "Code point aliases or bit string"; } } // list loss-priority } // list forwarding-class } // list frame-relay-de list ieee-802.1ad { key "name"; ordered-by user; description "IEEE-802.1ad (DEI) rewrite rule"; leaf name { junos:must "((".. forwarding-class" || ".. import"))"; junos:must-message "'At least one 'forwarding class' or 'import' rewrite definition is required for rewrite configuration"; type string { length "1 .. 64"; } description "Rewrite rule name"; } uses apply-advanced; leaf import { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Include this rewrite rule in this definition"; } list forwarding-class { key "name"; description "Markings for named forwarding class"; leaf name { type string { length "1 .. 64"; } description "Forwarding class name"; } uses apply-advanced; list loss-priority { key "name"; description "Code point marking based on loss priority"; leaf name { type enumeration { enum "low" { value 0; description "Marking when loss priority is low"; } enum "high" { value 1; description "Marking when loss priority is high"; } enum "medium-low" { value 2; description "Marking when loss priority is medium-low"; } enum "medium-high" { value 3; description "Marking when loss priority is medium-high"; } } } leaf code-point { type string { junos:posix-pattern "^(([01]{4})|([a-zA-Z].{0,63}))$"; junos:pattern-message "Not 4-bit pattern or code point alias"; } description "Code point aliases or bit string"; } } // list loss-priority } // list forwarding-class } // list ieee-802.1ad list inet6-precedence { key "name"; ordered-by user; description "IPv6 precedence rewrite rule"; leaf name { junos:must "((".. forwarding-class" || ".. import"))"; junos:must-message "'At least one 'forwarding class' or 'import' rewrite definition is required for rewrite configuration"; type string { length "1 .. 64"; } description "Rewrite rule name"; } uses apply-advanced; leaf import { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Include this rewrite rule in this definition"; } list forwarding-class { key "name"; description "Markings for named forwarding class"; leaf name { type string { length "1 .. 64"; } description "Forwarding class name"; } uses apply-advanced; list loss-priority { key "name"; description "Code point marking based on loss priority"; leaf name { type enumeration { enum "low" { value 0; description "Marking when loss priority is low"; } enum "high" { value 1; description "Marking when loss priority is high"; } enum "medium-low" { value 2; description "Marking when loss priority is medium-low"; } enum "medium-high" { value 3; description "Marking when loss priority is medium-high"; } } } leaf code-point { type string { junos:posix-pattern "^(([01]{3})|([a-zA-Z].{0,63}))$"; junos:pattern-message "Not 3-bit pattern or code point alias"; } description "Code point aliases or bit string"; } } // list loss-priority } // list forwarding-class } // list inet6-precedence } // container rewrite-rules container fabric { description "Define CoS parameters of switch fabric"; uses apply-advanced; container scheduler-map { description "Mapping of fabric traffic to packet schedulers"; uses apply-advanced; list priority { key "name"; description "Fabric traffic priority"; leaf name { type enumeration { enum "low" { value 0; description "Low priority fabric traffic"; } enum "high" { value 1; description "High priority fabric traffic"; } } } leaf scheduler { type string { length "1 .. 64"; } description "Scheduler name"; } } // list priority } // container scheduler-map } // container fabric list scheduler-maps { key "name"; description "Mapping of forwarding classes to packet schedulers"; leaf name { type string { length "1 .. 64"; } description "Scheduler map name"; } uses apply-advanced; list forwarding-class { key "name"; description "Forwarding class name to map to scheduler"; leaf name { type string { length "1 .. 64"; } description "Forwarding class name"; } leaf scheduler { type string { length "1 .. 64"; } description "Scheduler name"; } } // list forwarding-class } // list scheduler-maps list fragmentation-maps { key "name"; description "Mapping of forwarding class to fragmentation options"; leaf name { type string { length "1 .. 64"; } description "Fragmentation map name"; } uses apply-advanced; list forwarding-class { key "name"; description "Forwarding class name to map to fragmentation options"; leaf name { type string { length "1 .. 64"; } description "Forwarding class name"; } uses apply-advanced; choice fragmentation-control { leaf fragment-threshold { type union { type string { pattern "<.*>|$.*"; } type uint16 { range "64 .. 9192"; } } units "bytes"; description "Fragmentation threshold"; } leaf no-fragmentation { type empty; description "Don't allow fragmentation"; } } // choice fragmentation-control leaf multilink-class { type union { type string { pattern "<.*>|$.*"; } type uint16 { range "0 .. 7"; } } description "Multilink-Class assigned to the forwarding class"; } leaf drop-timeout { type union { type string { pattern "<.*>|$.*"; } type uint16 { range "0 .. 2000"; } } units "milliseconds"; description "Drop timeout"; } } // list forwarding-class } // list fragmentation-maps list schedulers { key "name"; description "Packet schedulers"; leaf name { type string { length "1 .. 64"; } description "Scheduler name"; } uses apply-advanced; container transmit-rate { description "Transmit rate"; uses apply-advanced; choice transmit_rate_choice { leaf rate { junos:must "(!("interfaces ${interface} aggregated-ether-options link-speed mixed"))"; junos:must-message "Scheduler transmit-rate in bits per second is incompatible with link-speed mixed"; type string; units "bits per second"; description "Transmit rate as rate"; } leaf percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "0 .. 100"; } } description "Transmit rate as percentage"; } container remainder { presence "enable remainder"; description "Remainder available"; uses apply-advanced; leaf percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "0 .. 100"; } } default "0"; } } // container remainder } // choice transmit_rate_choice choice rate_limit_choice { leaf exact { type empty; description "Enforce exact transmit rate"; } leaf rate-limit { type empty; description "Enforce rate limit that uses policer"; } } // choice rate_limit_choice } // container transmit-rate container excess-rate { junos:must "((!((".. transmit-rate exact" && ".. excess-rate")) && (!((".. transmit-rate rate-limit" && ".. excess-rate")) && !((".. priority $$={strict-high}" && ".. excess-rate")))))"; junos:must-message "Cannot specify excess-rate with transmit-rate exact/rate-limit or strict-high priority"; description "Excess bandwidth sharing proportion"; choice excess_rate_choice { leaf proportion { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "0 .. 1000"; } } description "Excess rate as a proportion"; } leaf percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 100"; } } description "Excess rate as a percentage"; } } // choice excess_rate_choice } // container excess-rate container shaping-rate { junos:must "(!((".. transmit-rate rate-limit" && ".. shaping-rate")))"; junos:must-message "only one option (shaping-rate or transmit-rate rate-limit) can be configured at a time"; junos:must "(!((".. transmit-rate exact" && ".. shaping-rate")))"; junos:must-message "only one option (shaping-rate or transmit-rate exact) can be configured at a time"; description "Shaping rate"; choice shaping_rate_choice { leaf rate { junos:must "(!("interfaces ${interface} aggregated-ether-options link-speed mixed"))"; junos:must-message "Scheduler shaping-rate in bits per second is incompatible with link-speed mixed"; type string; units "bits per second"; description "Shaping rate as an absolute rate"; } leaf percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 100"; } } description "Shaping rate as a percentage"; } } // choice shaping_rate_choice leaf burst-size { type string; units "bytes"; description "Shaping rate burst size"; } } // container shaping-rate container buffer-size { description "Queue transmission buffer size"; uses apply-advanced; choice buffer_size_choice { leaf percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "0 .. 100"; } } description "Buffer size as a percentage"; } container remainder { presence "enable remainder"; description "Remainder of buffer size available"; uses apply-advanced; leaf percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "0 .. 100"; } } default "0"; } } // container remainder leaf shared { type empty; description "Shared buffer allocation"; } leaf temporal { type string; units "microseconds"; description "Buffer size as temporal value"; } } // choice buffer_size_choice choice buffer_limit { leaf exact { type empty; description "Enforce exact buffer size"; } } // choice buffer_limit container buffer-partition { presence "enable buffer-partition"; description "Partition buffer size among multicast and unicast"; uses apply-advanced; container multicast { presence "enable multicast"; description "Specify multicast fraction of reserved buffer"; uses apply-advanced; leaf percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "0 .. 100"; } } default "50"; } } // container multicast } // container buffer-partition } // container buffer-size container shared-buffer { description "Queue transmission shared-buffer"; uses apply-advanced; container maximum { presence "enable maximum"; description "Control the amount of shared buffer a given queue can consume"; uses apply-advanced; leaf percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "0 .. 100"; } } default "0"; description "Maximum shared buffer size as a percentage"; } container multicast { presence "enable multicast"; description "Control the amount of shared buffer mcast pkts consume"; uses apply-advanced; leaf percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "0 .. 100"; } } default "0"; description "Maximum shared buffer size as a percentage"; } } // container multicast } // container maximum } // container shared-buffer leaf priority { type string { length "1 .. 64"; } description "Scheduling priority"; } leaf excess-priority { junos:must "((!((".. transmit-rate exact" && (".. excess-priority $$={high}" || (".. excess-priority $$={low}" || (".. excess-priority $$={medium-high}" || ".. excess-priority $$={medium-low}"))))) && (!((".. transmit-rate rate-limit" && (".. excess-priority $$={high}" || (".. excess-priority $$={low}" || (".. excess-priority $$={medium-high}" || ".. excess-priority $$={medium-low}"))))) && !((".. priority $$={strict-high}" && (".. excess-priority $$={high}" || (".. excess-priority $$={low}" || (".. excess-priority $$={medium-high}" || ".. excess-priority $$={medium-low}"))))))))"; junos:must-message "Cannot specify excess-priority with transmit-rate exact/rate-limit or strict-high priority"; type string { length "1 .. 64"; } description "Priority in the excess region"; } list drop-profile-map { key "loss-priority protocol"; description "Assign drop profile to a loss priority and protocol"; leaf loss-priority { type enumeration { enum "low" { value 0; description "Loss priority low"; } enum "high" { value 1; description "Loss priority high"; } enum "medium-low" { value 2; description "Loss priority medium-low"; } enum "medium-high" { value 3; description "Loss priority medium-high"; } enum "any" { value 4; description "Ignore loss priority when assigning drop profile"; } } description "Loss priority value"; } leaf protocol { type enumeration { enum "tcp" { value 0; description "TCP protocol only"; } enum "non-tcp" { value 1; description "Non-TCP protocols only"; } enum "any" { value 2; description "Ignore protocol type when assigning drop profile"; } } description "Protocol type"; } leaf drop-profile { type string { length "1 .. 64"; } description "Name of drop profile to apply"; } } // list drop-profile-map leaf explicit-congestion-notification { type empty; description "Enable or Disable Explicit Congestion Notification"; } container ecn-enhanced { description "Configure enhanced explicit congestion notification parameters"; uses apply-advanced; leaf no-pfc-assist { junos:must "(".. .. explicit-congestion-notification")"; junos:must-message "explicit-congestion-notification must be configured"; type empty; description "Enable or disable PFC assist for explicit congestion notification"; } } // container ecn-enhanced leaf adjust-percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "0 .. 100"; } } units "percent"; description "Percent of a bandwidth adjustment applied to a queue"; } leaf adjust-minimum { type string; units "bits per second"; description "Minimum shaping-rate when adjusted"; } leaf queue-monitoring { type empty; description "Enable queue depth monitoring"; } } // list schedulers list adjustment-control-profiles { key "name"; description "Adjustment control profiles"; leaf name { type string { length "1 .. 64"; } description "Adjustment control profile name"; } uses apply-advanced; list application { key "name"; description "Applications that can perform adjustments"; leaf name { type enumeration { enum "ancp" { value 0; description "Access Node Configuration Protocol"; } enum "radius-coa" { value 1; description "RADIUS Change of Authorization"; } enum "pppoe-tags" { value 2; description "Point to Point Protocol over Ethernet IA Tags"; } enum "dhcp-tags" { value 3; description "Dynamic Host Configuration Protocol Tags"; } } description "Applications that can perform adjustments"; } leaf priority { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "1 .. 10"; } } description "Priority for the application; 1 is the highest"; } leaf algorithm { type enumeration { enum "adjust-less" { value 0; description "Adjust if less than the configured value"; } enum "adjust-less-or-equal" { value 1; description "Adjust if <= the configured value"; } enum "adjust-greater" { value 2; description "Adjust if greater than the configured value"; } enum "adjust-greater-or-equal" { value 3; description "Adjust if >= the configured value"; } enum "adjust-always" { value 4; description "Adjust unconditionally"; } enum "adjust-never" { value 5; description "Do not perform adjustments"; } } description "Adjustment algorithm for the application"; } } // list application } // list adjustment-control-profiles container traceoptions { description "Trace options for class-of-service process"; uses apply-advanced; leaf no-remote-trace { junos:must "("system tracing")"; junos:must-message "'no-remote-trace' is valid only when [system tracing] is configured"; type empty; description "Disable remote tracing"; } container file { description "Trace file information"; leaf filename { type string { junos:posix-pattern "![/ %]"; junos:pattern-message "Must not contain '/', % or a space"; length "1 .. 1024"; } description "Name of file in which to write trace information"; } leaf size { type string; description "Maximum trace file size"; } leaf files { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "2 .. 1000"; } } default "3"; description "Maximum number of trace files"; } choice world-readable-choice { leaf world-readable { type empty; description "Allow any user to read the log file"; } leaf no-world-readable { type empty; description "Don't allow any user to read the log file"; } } // choice world-readable-choice leaf match { type jt:regular-expression; description "Regular expression for lines to be logged"; } } // container file list flag { key "name"; description "Tracing parameters"; leaf name { type enumeration { enum "init" { value 0; description "Trace initialization events"; } enum "show" { value 1; description "Trace show command servicing"; } enum "route-socket" { value 2; description "Trace route-socket events"; } enum "parse" { value 3; description "Trace parser processing"; } enum "process" { value 4; description "Trace configuration processing"; } enum "util" { value 5; description "Trace utilities"; } enum "restart" { value 6; description "Trace restart processing"; } enum "snmp" { value 7; description "Trace SNMP-related processing"; } enum "hardware-database" { value 8; description "Trace chassis hardware database related processing"; } enum "asynch" { value 9; description "Trace asynchronous configuration processing"; } enum "dynamic" { value 10; description "Trace dynamic CoS functions"; } enum "cos-adjustment" { value 11; description "Trace CoS rate adjustments"; } enum "performance-monitor" { value 12; description "Trace performance monitor counters"; } enum "chassis-scheduler" { value 13; description "Trace chassis stream scheduler processing"; } enum "cn-util" { value 14; description "Trace utilities for congestion-notification"; } enum "snmp-timeouts" { value 15; description "Trace SNMP COSD kernel timeouts"; } enum "all" { value 16; description "Trace everything"; } enum "feature-capability" { value 17; description "Trace feature capability"; } enum "application" { value 18; description "Trace Junos application programming"; } enum "jvision" { value 19; description "Cos Junos Jvision traces"; } } } } // list flag } // container traceoptions container forwarding-policy { description "Class-of-service forwarding policy"; uses apply-advanced; list next-hop-map { key "name"; ordered-by user; description "Class-of-service next-hop map"; leaf name { type string { junos:posix-pattern "^.{1,64}$"; junos:pattern-message "Must be string of 64 characters or less"; } description "Name to identify next-hop map"; } uses apply-advanced; list forwarding-class { key "name"; ordered-by user; description "Forwarding class from which to map"; leaf name { type string { junos:posix-pattern "^.{1,64}$"; junos:pattern-message "Must be string of 64 characters or less"; } description "Forwarding class"; } uses apply-advanced; leaf-list next-hop { type union { type jt:ipaddr-or-interface; type string { pattern "<.*>|$.*"; } } ordered-by user; description "Next-hop identifier to which to map"; } leaf-list lsp-next-hop { type string; ordered-by user; description "Regular expression for LSP next hop"; } leaf non-lsp-next-hop { type empty; description "Any non-RSVP LSP next hop"; } leaf non-labelled-next-hop { type empty; description "Any non-labelled next hop"; } leaf discard { type empty; description "Discard next hop"; } } // list forwarding-class container forwarding-class-default { description "Next Hop For traffic which does not meet any FC in the next-hop-map"; uses apply-advanced; leaf-list next-hop { type union { type jt:ipaddr-or-interface; type string { pattern "<.*>|$.*"; } } ordered-by user; description "Next-hop identifier to which to map"; } leaf-list lsp-next-hop { type string; ordered-by user; description "Regular expression for LSP next hop"; } leaf non-lsp-next-hop { type empty; description "Any non-RSVP LSP next hop"; } leaf non-labelled-next-hop { type empty; description "Any non-labelled next hop"; } leaf discard { type empty; description "Discard next hop"; } } // container forwarding-class-default } // list next-hop-map list class { key "name"; ordered-by user; description "Class-of-service description"; leaf name { type string { junos:posix-pattern "^.{1,64}$"; junos:pattern-message "Must be string of 64 characters or less"; } description "Name to identify class of service"; } uses apply-advanced; container classification-override { description "Define classification overrides"; uses apply-advanced; leaf forwarding-class { type string { junos:posix-pattern "^.{1,64}$"; junos:pattern-message "Must be string of 64 characters or less"; } description "Forwarding class name"; } } // container classification-override } // list class } // container forwarding-policy } // grouping juniper-class-of-service-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 cos_interfaces_type { description "Physical interface"; leaf name { junos:must "((!(".. classifiers") || !(".. forwarding-class")))"; junos:must-message "Forwarding-class and BA Classifiers not allowed on the same physical interface together"; junos:must "((!((any ".. unit <*> rewrite-rules dscp-ipv6" || any ".. unit <*> rewrite-rules inet6-precedence <*> protocol $$={mpls}")) || !(".. output-forwarding-class-map")))"; junos:must-message "DSCP-IPv6 rewrite or IPv6 Precedence for MPLS traffic and forwarding class map not allowed on same interface"; junos:must "((!((any ".. unit <*> rewrite-rules dscp" || any ".. unit <*> rewrite-rules inet-precedence <*> protocol $$={mpls}")) || !(".. output-forwarding-class-map")))"; junos:must-message "DSCP rewrite or IP Precedence rewrite for MPLS traffic and forwarding class map not allowed on same interface"; junos:must "((!(any ".. unit <*> output-forwarding-class-map") || !(".. output-forwarding-class-map")))"; junos:must-message "Cannot configure forwarding-class-map statement on both physical and logical interface"; junos:must "((!((any ".. unit <*> scheduler-map" || (any ".. unit <*> input-scheduler-map" || (any ".. unit <*> output-traffic-control-profile" || any ".. unit <*> input-traffic-control-profile")))) || !((".. scheduler-map" || ".. input-scheduler-map"))))"; junos:must-message "Cannot configure scheduler-map or traffic-control-profile statement on both physical and logical interface"; junos:must "((!((".. scheduler-map" || ".. input-scheduler-map")) || (!("interfaces $$") || !(("interfaces $$ per-unit-scheduler" || ("interfaces $$ shared-scheduler" || "interfaces $$ hierarchical-scheduler"))))))"; junos:must-message "'per-unit-scheduler', 'hierarchical-scheduler', or 'shared scheduler' is not compatible with scheduler map/input scheduler map on an interface"; junos:must "((!(any ".. unit <*> input-traffic-control-profile") || (!("interfaces $$") || ("interfaces $$ per-unit-scheduler" || ("interfaces $$ shared-scheduler" || ("interfaces $$ hierarchical-scheduler" || any "interfaces $$ unit <*> pppoe-options"))))))"; junos:must-message "'per-unit-scheduler', 'hierarchical-scheduler',or 'shared scheduler' for this interface is required for input-traffic-control-profile configuration on interface unit"; junos:must "((!(any ".. unit <*> output-traffic-control-profile") || (!("interfaces $$") || ("interfaces $$ per-unit-scheduler" || ("interfaces $$ shared-scheduler" || ("interfaces $$ hierarchical-scheduler" || ("interfaces $$ cascade-port" || (any "interfaces $$ unit <*> pppoe-options" || (any "interfaces <ps*>" || any "interfaces $$ unit <*> demux-options")))))))))"; junos:must-message "'per-unit-scheduler', 'hierarchical-scheduler', or 'shared scheduler' for this interface is required for output-traffic-control-profile configuration on interface unit"; junos:must "((!(any ".. unit <*> shaping-rate") || (!("interfaces $$") || ("interfaces $$ per-unit-scheduler" || ("interfaces $$ shared-scheduler" || ("interfaces $$ hierarchical-scheduler" || (any "interfaces $$ unit <*> pppoe-options" || any "interfaces $$ unit <*> demux-options")))))))"; junos:must-message "'per-unit-scheduler', 'hierarchical-scheduler', or 'shared scheduler' for this interface is required for bandwidth configuration on interface unit"; junos:must "((!(any ".. unit <*> virtual-channel-group") || (!("interfaces $$") || "interfaces $$ per-unit-scheduler")))"; junos:must-message "'per-unit-scheduler' for this interface is required for virtual-channel-group on interface unit"; junos:must "((!((any ".. unit <*> scheduler-map" || any ".. unit <*> input-scheduler-map")) || (!("interfaces $$") || ("interfaces $$ per-unit-scheduler" || ("interfaces $$ shared-scheduler" || ("interfaces $$ hierarchical-scheduler" || ("interfaces $$ cascade-port" || (any "interfaces $$ unit <*> pppoe-options" || any "interfaces $$ unit <*> demux-options"))))))))"; junos:must-message "'per-unit-scheduler', 'hierarchical-scheduler', or 'shared-scheduler' for this interface is required for scheduler map on interface unit"; type union { type jt:interface-device-wildcard; type string { pattern "<.*>|$.*"; } } description "Interface name (or wildcard)"; } uses apply-advanced; list forwarding-class-set { junos:must "(!(".. scheduler-map"))"; junos:must-message "Scheduler-map and forwarding-class-set not allowed on same interface together "; key "name"; max-elements 4; description "Map forwarding class sets to output traffic control profile"; leaf name { type string { length "1 .. 64"; } description "Forwarding class sets name"; } uses apply-advanced; container output-traffic-control-profile { description "Output traffic control profile for the interface"; leaf profile-name { type string { length "1 .. 64"; } description "Name of the output traffic control profile associated with the interface"; } } // container output-traffic-control-profile } // list forwarding-class-set leaf congestion-notification-profile { type string { length "1 .. 64"; } description "Congestion notification profile for the interface"; } leaf scheduler-map { type string { length "1 .. 64"; } description "Output scheduler map"; } leaf input-scheduler-map { type string { length "1 .. 64"; } description "Input scheduler map"; } leaf scheduler-map-chassis { type union { type string { pattern "derived"; } type string { length "1 .. 64"; } } description "Scheduler map applied to chassis queues (not PIC queues)"; } leaf output-forwarding-class-map { junos:must "(!(("interfaces ${interface} per-unit-scheduler" || ("interfaces ${interface} shared-scheduler" || "interfaces ${interface} hierarchical-scheduler"))))"; junos:must-message "'per-unit-scheduler', 'hierarchical-scheduler', or 'shared scheduler' is not compatible with output-forwarding-class-map on an interface"; type string { length "1 .. 64"; } description "Output forwarding class map name"; } container shaping-rate { junos:must "(!("interfaces ${interface} aggregated-ether-options link-speed mixed"))"; junos:must-message "CoS features are incompatible with link-speed mixed"; description "Output shaping rate"; leaf rate { type string; units "bits per second"; description "Shaping rate as an absolute rate"; } } // container shaping-rate container input-excess-bandwidth-share { description "Input Excess bandwidth sharing policy"; choice input_excess_bandwidth_share { leaf proportional { type string; units "bits per second"; description "Maximum Queue Bandwidth"; } leaf equal { type empty; description "Equal sharing of excess bandwidth"; } } // choice input_excess_bandwidth_share } // container input-excess-bandwidth-share container excess-bandwidth-share { description "Output Excess bandwidth sharing policy"; choice output_excess_bandwidth_share { leaf proportional { type string; units "bits per second"; description "Maximum Queue Bandwidth"; } leaf equal { type empty; description "Equal sharing of excess bandwidth"; } } // choice output_excess_bandwidth_share } // container excess-bandwidth-share container input-shaping-rate { junos:must "(!("interfaces ${interface} aggregated-ether-options link-speed mixed"))"; junos:must-message "CoS features are incompatible with link-speed mixed"; description "Input shaping rate"; leaf rate { type string; units "bits per second"; description "Input shaping rate as an absolute rate"; } } // container input-shaping-rate container input-traffic-control-profile { junos:must "(!((".. input-scheduler-map" || ".. input-shaping-rate")))"; junos:must-message "input-traffic-control-profile cannot be configured if any of the following are configured: input-scheduler-map, input-shaping-rate"; description "Input traffic control profile"; leaf profile-name { type string { length "1 .. 64"; } description "Name of the traffic control profile"; } } // container input-traffic-control-profile container input-traffic-control-profile-remaining { junos:must "(!((".. scheduler-map" || ".. shaping-rate")))"; junos:must-message "input-traffic-control-profile cannot be configured if any of the following are configured: scheduler-map, shaping-rate"; description "Input traffic control profile for remaining traffic on the ifd"; leaf profile-name { type string { length "1 .. 64"; } description "Name of the traffic control profile"; } } // container input-traffic-control-profile-remaining container output-traffic-control-profile { junos:must "(!((".. scheduler-map" || ".. shaping-rate")))"; junos:must-message "output-traffic-control-profile cannot be configured if any of the following are configured: scheduler-map, shaping-rate"; description "Output traffic control profile"; leaf profile-name { type string { length "1 .. 64"; } description "Name of the traffic control profile"; } } // container output-traffic-control-profile container output-traffic-control-profile-remaining { junos:must "(!((".. scheduler-map" || ".. shaping-rate")))"; junos:must-message "output-traffic-control-profile cannot be configured if any of the following are configured: scheduler-map, shaping-rate"; description "Output traffic control profile for remaining traffic on the ifd"; leaf profile-name { type string { length "1 .. 64"; } description "Name of the traffic control profile"; } } // container output-traffic-control-profile-remaining container member-link-scheduler { junos:must "(!("interfaces ${interface} aggregated-ether-options link-speed mixed"))"; junos:must-message "CoS features are incompatible with link-speed mixed"; description "Scheduler parameter model for member link"; choice model { leaf scale { type empty; description "Scale scheduler parameters on aggregate interface"; } leaf replicate { type empty; description "Copy scheduler parameters from aggregate interface"; } } // choice model } // container member-link-scheduler container traffic-class-map { description "Packet code point to input priority mapping"; uses apply-advanced; container inet-precedence { description "IPv4 precedence code point traffic-class-map"; uses apply-advanced; leaf traffic-class-map-name { type string { length "1 .. 64"; } description "Name of traffic-class-map to be applied on IFD"; } } // container inet-precedence container dscp { description "Differentiated services code point traffic-class-map"; uses apply-advanced; leaf traffic-class-map-name { type string { length "1 .. 64"; } description "Name of traffic-class-map to be applied on IFD"; } } // container dscp container exp { description "MPLS experimental code point traffic-class-map"; uses apply-advanced; leaf traffic-class-map-name { type string { length "1 .. 64"; } description "Name of traffic-class-map to be applied on IFD"; } } // container exp container ieee-802.1 { junos:must "(!(".. ieee-802.1ad"))"; junos:must-message "ieee-802.1ad and ieee-802.1 not allowed on same IFD"; description "IEEE-802.1 code point traffic-class-map"; uses apply-advanced; leaf traffic-class-map-name { type string { length "1 .. 64"; } description "Name of traffic-class-map to be applied on IFD"; } leaf vlan-tag { type enumeration { enum "outer" { value 0; description "Traffic-class-map based on outer VLAN tag"; } enum "inner" { value 1; description "Traffic-class-map based on inner VLAN tag"; } } description "VLAN tag used for traffic-class-map"; } } // container ieee-802.1 container ieee-802.1ad { junos:must "(!(".. ieee-802.1"))"; junos:must-message "ieee-802.1ad and ieee-802.1 not allowed on same IFD"; description "IEEE-802.1ad (DEI) code point traffic-class-map"; uses apply-advanced; leaf traffic-class-map-name { type string { length "1 .. 64"; } description "Name of traffic-class-map to be applied on IFD"; } leaf vlan-tag { type enumeration { enum "outer" { value 0; description "Traffic-class-map based on outer VLAN tag"; } enum "inner" { value 1; description "Traffic-class-map based on inner VLAN tag"; } } description "VLAN tag used for traffic-class-map"; } } // container ieee-802.1ad } // container traffic-class-map container exclude-queue-overhead-bytes { presence "enable exclude-queue-overhead-bytes"; description "Exclude the overhead bytes from the queue statistics"; uses apply-advanced; leaf include-hierarchy { type empty; description "Perform overhead adjustment on IFD and all children"; } } // container exclude-queue-overhead-bytes container logical-interface-aggregate-statistics { presence "enable logical-interface-aggregate-statistics"; description "Logical interface aggregate queue statistics"; } // container logical-interface-aggregate-statistics list unit { key "name"; description "Logical interface unit (or wildcard)"; leaf name { type union { type string { pattern "\*"; } type union { type string { pattern "<.*>|$.*"; } type uint32 { range "0 .. 1073741823"; } } } description "Logical unit number"; } uses apply-advanced; leaf output-forwarding-class-map { junos:must "(!(".. rewrite-rules dscp-ipv6"))"; junos:must-message "DSCP-IPv6 rewrite and forwarding class map not allowed on same unit"; junos:must "(!(any ".. rewrite-rules inet-precedence <*> protocol $$={mpls}"))"; junos:must-message "IP-Prec rewrite for IPv4 packets entering MPLS tunnel and forwarding class map not allowed on same unit"; junos:must "(!(".. rewrite-rules dscp"))"; junos:must-message "DSCP rewrite and forwarding class map not allowed on same unit"; junos:must "(("interfaces ${interface} hierarchical-scheduler" || ("interfaces ${interface} per-unit-scheduler" || ("interfaces ${interface} shared-scheduler" || "interfaces ${interface} unit ${unit} atm-scheduler-map"))))"; junos:must-message "'per-unit-scheduler', 'hierarchical-scheduler', 'shared-scheduler' or 'unit <*> atm-scheduler-map for this interface is required for forwarding class map on interface unit"; type string { length "1 .. 64"; } description "Output forwarding class map name"; } leaf forwarding-class { type string { length "1 .. 64"; } description "Forwarding class assigned to incoming packets"; } leaf virtual-channel-group { junos:must "(!((".. scheduler-map" || (".. shaping-rate" || ".. adaptive-shaper"))))"; junos:must-message "virtual-channel-group cannot be configured if scheduler-map or shaping-rate or adaptive-shaper is configured under logical interface"; type string { length "1 .. 64"; } description "Virtual channel group applied to this logical interface"; } leaf vc-shared-scheduler { junos:must "(any "protocols r2cp radio <*> radio-interface ${interface}.${unit}")"; junos:must-message "interface must be configured in protocol r2cp to use vc-shared-scheduler"; junos:must "(".. virtual-channel-group")"; junos:must-message "virtual-channel-group must be configured"; type empty; description "Virtual channel group shared scheduler indicator"; } leaf scheduler-map { junos:must "(!("interfaces ${interface} hierarchical-scheduler"))"; junos:must-message "scheduler-map cannot be configured on a logical interface when the hierarchical-scheduler is configured: use a traffic-control-profile which references the scheduler-map"; type string { length "1 .. 64"; } description "Output scheduler map"; } leaf input-scheduler-map { junos:must "(!("interfaces ${interface} hierarchical-scheduler"))"; junos:must-message "input-scheduler-map cannot be configured on a logical interface when the hierarchical-scheduler is configured"; type string { length "1 .. 64"; } description "Input scheduler map"; } leaf fragmentation-map { type string { length "1 .. 64"; } description "Fragmentation map applied to this logical interface"; } leaf adaptive-shaper { type string { length "1 .. 64"; } description "Adaptive shaper applied to this logical interface"; } container shaping-rate { junos:must "(!("interfaces ${interface} hierarchical-scheduler"))"; junos:must-message "shaping-rate cannot be configured on a logical interface when the hierarchical-scheduler is configured: use a traffic-control-profile which specifies the shaping-rate"; presence "enable shaping-rate"; description "Output shaping rate"; choice shaping_rate_choice { leaf rate { junos:must "(!("interfaces ${interface} aggregated-ether-options link-speed mixed"))"; junos:must-message "Scheduler shaping-rate in bits per second is incompatible with link-speed mixed"; type string; units "bits per second"; description "Shaping rate as an absolute rate"; } leaf percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "0 .. 100"; } } description "Shaping rate as a percentage"; } } // choice shaping_rate_choice } // container shaping-rate container input-shaping-rate { junos:must "(!("interfaces ${interface} hierarchical-scheduler"))"; junos:must-message "input-shaping-rate cannot be configured on a logical interface when the hierarchical-scheduler is configured"; description "Input shaping rate"; choice shaping_rate_choice { leaf rate { type string; units "bits per second"; description "Shaping rate as an absolute rate"; } leaf percent { type union { type string { pattern "<.*>|$.*"; } type uint32 { range "0 .. 100"; } } description "Shaping rate as a percentage"; } } // choice shaping_rate_choice } // container input-shaping-rate container input-traffic-control-profile { junos:must "(!((".. input-scheduler-map" || (".. input-shaping-rate" || (".. adaptive-shaper" || ".. virtual-channel-group")))))"; junos:must-message "input-traffic-control-profile cannot be configured if any of the following are configured under logical interface: input-scheduler-map, input-shaping-rate, adaptive-shaper, virtual-channel-group"; description "Input traffic control profile"; leaf profile-name { type string { length "1 .. 64"; } description "Name of traffic control profile"; } leaf shared-instance { junos:must "("interfaces ${interface} shared-scheduler")"; junos:must-message "Requires [edit interface <interface name> shared-scheduler]"; type string { length "1 .. 64"; } description "Name of the shared instance"; } } // container input-traffic-control-profile container output-traffic-control-profile { junos:must "(!((".. scheduler-map" || (".. shaping-rate" || (".. adaptive-shaper" || ".. virtual-channel-group")))))"; junos:must-message "output-traffic-control-profile cannot be configured if any of the following are configured under logical interface: scheduler-map, shaping-rate, adaptive-shaper, virtual-channel-group"; description "Output traffic control profile"; leaf profile-name { type string { length "1 .. 64"; } description "Name of the traffic control profile"; } leaf shared-instance { junos:must "("interfaces ${interface} shared-scheduler")"; junos:must-message "Requires [edit interface <interface name> shared-scheduler]"; type string { length "1 .. 64"; } description "Name of the shared instance"; } } // container output-traffic-control-profile container output-traffic-control-profile-remaining { junos:must "(!((".. scheduler-map" || ".. shaping-rate")))"; junos:must-message "output-traffic-control-profile-remaining cannot be configured if any of the following are configured: scheduler-map, shaping-rate"; description "Output traffic control profile for remaining traffic on the ifl"; leaf profile-name { type string { junos:posix-pattern "^.{1,64}$"; junos:pattern-message "Must be string of 64 characters or less"; } description "Name of the traffic control profile"; } } // container output-traffic-control-profile-remaining container report-ingress-shaping-rate { description "Report ingress shaping rate"; choice report_ingress_shaping_rate_choice { leaf rate { type string; units "bits per second"; description "Ingress shaping rate as an absolute value"; } } // choice report_ingress_shaping_rate_choice } // container report-ingress-shaping-rate container classifiers { description "Classifiers applied to incoming packets"; uses apply-advanced; leaf no-default { type empty; description "Do not apply default classifiers to this interface"; } list dscp { key "name"; description "Differentiated Services code point classifier"; leaf name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of classifier to be applied"; } uses apply-advanced; leaf-list family { type string; ordered-by user; description "Family for DSCP classifier"; } } // list dscp list dscp-ipv6 { key "name"; description "Differentiated Services code point classifier IPv6"; leaf name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of classifier to be applied"; } uses apply-advanced; leaf-list family { type string; ordered-by user; description "Family for DSCP Ipv6 classifier"; } } // list dscp-ipv6 container exp { description "EXP classifier"; leaf classifier-name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of classifier to be applied"; } } // container exp container ieee-802.1 { description "IEEE-802.1 classifier"; leaf classifier-name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of classifier to be applied"; } leaf vlan-tag { type enumeration { enum "outer" { value 0; description "Classification based on outer VLAN tag"; } enum "inner" { value 1; description "Classification based on inner VLAN tag"; } enum "transparent" { value 2; description "Classification based on hidden VLAN tag"; } } description "VLAN tag used for classification"; } } // container ieee-802.1 container inet-precedence { description "IPv4 precedence classifier"; leaf classifier-name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of classifier to be applied"; } } // container inet-precedence container ieee-802.1ad { junos:must "(!(".. ieee-802.1"))"; junos:must-message "ieee-802.1ad and ieee-802.1 not allowed on same unit"; description "IEEE-802.1ad (DEI) classifier"; leaf classifier-name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of classifier to be applied"; } leaf vlan-tag { type enumeration { enum "outer" { value 0; description "Classification based on outer VLAN tag"; } enum "inner" { value 1; description "Classification based on inner VLAN tag"; } } description "VLAN tag used for classification"; } } // container ieee-802.1ad } // container classifiers container ingress-rewrite-rules { description "Rewrite rules applied to outgoing packets of the ingress interface"; uses apply-advanced; list dscp { junos:must "(!(".. inet-precedence"))"; junos:must-message "DSCP and inet-precedence not allowed on same unit"; key "name"; description "Differentiated Services code point rewrite rule"; leaf name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of rewrite rule to be applied"; } } // list dscp container dscp-ipv6 { description "Differentiated Services code point rewrite rule IPv6"; leaf rewrite-rule-name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of rewrite rule to be applied"; } } // container dscp-ipv6 list inet-precedence { key "name"; description "IPv4 precedence rewrite rule"; leaf name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of rewrite rule to be applied"; } } // list inet-precedence } // container ingress-rewrite-rules container loss-priority-maps { description "Loss priority maps applied to incoming packets"; uses apply-advanced; container frame-relay-de { description "Frame Relay discard eligible bit loss priority map"; leaf lpmap-name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of loss priority map to be applied"; } } // container frame-relay-de } // container loss-priority-maps container rewrite-rules { description "Rewrite rules applied to outgoing packets"; uses apply-advanced; list dscp { junos:must "(!(".. inet-precedence"))"; junos:must-message "DSCP and inet-precedence not allowed on same unit"; key "name"; description "Differentiated Services code point rewrite rule"; leaf name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of rewrite rule to be applied"; } leaf-list protocol { type enumeration { enum "mpls" { value 0; description "Apply to IPv4 packets entering MPLS tunnel"; } enum "gtp-inet-outer" { value 1; description "Apply to outer IP header"; } enum "gtp-inet-both" { value 2; description "Apply to both IP header"; } enum "inet-outer" { value 3; description "Apply to outer IP header"; } enum "inet-both" { value 4; description "Apply to both IP header"; } } ordered-by user; description "Specify protocol matching criteria"; } } // list dscp list dscp-ipv6 { junos:must "(!(".. inet6-precedence"))"; junos:must-message "IPv6 DSCP and inet6-precedence not allowed on same unit"; key "name"; description "Differentiated Services code point rewrite rule IPv6"; leaf name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of rewrite rule to be applied"; } leaf-list protocol { type enumeration { enum "mpls" { value 0; description "Apply to IPv6 packets entering MPLS tunnel"; } enum "gtp-inet-outer" { value 1; description "Apply to outer IP header"; } enum "gtp-inet-both" { value 2; description "Apply to both IP header"; } } ordered-by user; description "Specify protocol matching criteria"; } } // list dscp-ipv6 list exp { key "name"; description "EXP rewrite rule"; leaf name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of rewrite rule to be applied"; } leaf-list protocol { type enumeration { enum "mpls-any" { value 0; description "Apply to MPLS packets, write MPLS header only"; } enum "mpls-inet-both" { value 1; description "Apply to IPv4 MPLS packets, write MPLS and IPv4 header"; } enum "mpls-inet-both-non-vpn" { value 2; description "Apply to IPv4 MPLS packets, write MPLS and IPv4 header for only non VPN traffic"; } } ordered-by user; description "Specify protocol matching criteria"; } } // list exp container ieee-802.1 { description "IEEE-802.1 rewrite rule"; leaf rewrite-rule-name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of rewrite rule to be applied"; } leaf vlan-tag { type enumeration { enum "outer" { value 0; description "Rewrite rule applies to outer VLAN tag"; } enum "outer-and-inner" { value 1; description "Rewrite rule applies to both outer and inner VLAN tags"; } } description "One or more VLAN tags to which rewrite rule applies"; } } // container ieee-802.1 list inet-precedence { key "name"; description "IPv4 precedence rewrite rule"; leaf name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of rewrite rule to be applied"; } leaf-list protocol { type enumeration { enum "mpls" { value 0; description "Apply to IPv4 packets entering MPLS tunnel"; } enum "gtp-inet-outer" { value 1; description "Apply to outer IP header"; } enum "gtp-inet-both" { value 2; description "Apply to both IP header"; } enum "inet-outer" { value 3; description "Apply to outer IP header"; } enum "inet-both" { value 4; description "Apply to both IP header"; } } ordered-by user; description "Specify protocol matching criteria"; } } // list inet-precedence container exp-swap-push-push { description "Copy incoming EXP into all swap-push-push labels"; leaf rewrite-rule-name { type enumeration { enum "default" { value 0; description "Apply default rewrite rule"; } } description "Name of rewrite rule to be applied"; } } // container exp-swap-push-push container exp-push-push-push { description "Top-label EXP rewrite rule for push-push-push operation"; leaf rewrite-rule-name { type enumeration { enum "default" { value 0; description "Apply default rewrite rule"; } } description "Name of rewrite rule to be applied"; } } // container exp-push-push-push container frame-relay-de { description "Frame relay discard eligible bit rewrite rule"; leaf rewrite-rule-name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of rewrite rule to be applied"; } } // container frame-relay-de container ieee-802.1ad { junos:must "(!(".. ieee-802.1"))"; junos:must-message "ieee-802.1ad and ieee-802.1 not allowed on same unit"; description "IEEE-802.1ad (DEI) rewrite rule"; uses apply-advanced; leaf rewrite-rule-name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of rewrite rule to be applied"; } leaf vlan-tag { type enumeration { enum "outer" { value 0; description "Rewrite rule applies to outer VLAN tag"; } enum "outer-and-inner" { value 1; description "Rewrite rule applies to both outer and inner VLAN tags"; } } description "One or more VLAN tags to which rewrite rule applies"; } } // container ieee-802.1ad list inet6-precedence { key "name"; description "IPv6 precedence rewrite rule"; leaf name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of rewrite rule to be applied"; } leaf-list protocol { type enumeration { enum "mpls" { value 0; description "Apply to IPv6 packets entering MPLS tunnel"; } } ordered-by user; description "Specify protocol matching criteria"; } } // list inet6-precedence } // container rewrite-rules container loss-priority-rewrites { description "Loss priority rewrites applied to outgoing packets"; uses apply-advanced; container frame-relay-de { description "Frame Relay discard eligible bit loss priority rewrite"; leaf lprewrite-name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of loss priority rewrite to be applied"; } } // container frame-relay-de } // container loss-priority-rewrites container translation-table { description "Translation tables applied to incoming packets"; uses apply-advanced; container to-inet-precedence-from-inet-precedence { junos:must "(!(".. to-dscp-from-dscp"))"; junos:must-message "to-dscp-from-dscp and to-inet-precedence-from-inet-precedence not allowed on same unit"; junos:must "(!(".. .. classifiers dscp"))"; junos:must-message "to-inet-precedence-from-inet-precedence Translation table cannot be configured if DSCP classifier is configured."; description "IPv4 precedence translation table"; leaf translation-table-name { type string { length "1 .. 64"; } description "Name of translation table to be applied"; } } // container to-inet-precedence-from-inet-precedence container to-dscp-from-dscp { junos:must "(!(".. .. classifiers inet-precedence"))"; junos:must-message "to-dscp-from-dscp translation table cannot be configured if inet-precedence classifier is configured."; description "Differentiated Services code point translation table"; leaf translation-table-name { type string { length "1 .. 64"; } description "Name of translation table to be applied"; } } // container to-dscp-from-dscp container to-dscp-ipv6-from-dscp-ipv6 { description "Differentiated Services code point IPV6 translation table"; leaf translation-table-name { type string { length "1 .. 64"; } description "Name of translation table to be applied"; } } // container to-dscp-ipv6-from-dscp-ipv6 container to-exp-from-exp { description "EXP translation table"; leaf translation-table-name { type string { length "1 .. 64"; } description "Name of translation table to be applied"; } } // container to-exp-from-exp } // container translation-table container policy-map { description "Policy-map describing the packet marking rule"; leaf policy-map-name { type string; description "Name of Policy-map to be applied"; } } // container policy-map } // list unit container classifiers { description "Classifiers applied to incoming packets"; uses apply-advanced; list dscp { key "name"; description "Differentiated Services code point classifier"; leaf name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of classifier to be applied"; } uses apply-advanced; } // list dscp list dscp-ipv6 { key "name"; description "Differentiated Services code point classifier IPv6"; leaf name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of classifier to be applied"; } uses apply-advanced; } // list dscp-ipv6 container ieee-802.1 { description "IEEE-802.1 classifier"; leaf classifier-name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of classifier to be applied"; } leaf vlan-tag { type enumeration { enum "outer" { value 0; description "Classification based on outer VLAN tag"; } enum "inner" { value 1; description "Classification based on inner VLAN tag"; } } description "VLAN tag used for classification"; } } // container ieee-802.1 container ieee-802.1ad { description "IEEE-802.1ad (DEI) classifier"; leaf classifier-name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of classifier to be applied"; } leaf vlan-tag { type enumeration { enum "outer" { value 0; description "Classification based on outer VLAN tag"; } enum "inner" { value 1; description "Classification based on inner VLAN tag"; } } description "VLAN tag used for classification"; } } // container ieee-802.1ad container inet-precedence { description "IPv4 precedence classifier"; leaf classifier-name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of classifier to be applied"; } } // container inet-precedence } // container classifiers leaf forwarding-class { type string { junos:posix-pattern "^.{1,64}$"; junos:pattern-message "Must be string of 64 characters or less"; } description "Forwarding class assigned to incoming packets"; } container rewrite-rules { description "Rewrite rules applied to outgoing packets"; uses apply-advanced; list dscp { junos:must "(!(".. inet-precedence"))"; junos:must-message "DSCP and inet-precedence not allowed on same unit"; key "name"; description "Differentiated Services code point rewrite rule"; leaf name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of rewrite rule to be applied"; } } // list dscp list dscp-ipv6 { junos:must "(!(".. inet6-precedence"))"; junos:must-message "IPv6 DSCP and inet6-precedence not allowed on same unit"; key "name"; description "Differentiated Services code point rewrite rule IPv6"; leaf name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of rewrite rule to be applied"; } } // list dscp-ipv6 container ieee-802.1 { description "IEEE-802.1 rewrite rule"; leaf rewrite-rule-name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of rewrite rule to be applied"; } } // container ieee-802.1 container ieee-802.1ad { description "IEEE-802.1ad (DEI) rewrite rule"; uses apply-advanced; leaf rewrite-rule-name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of rewrite rule to be applied"; } leaf vlan-tag { type enumeration { enum "outer" { value 0; description "Rewrite rule applies to outer VLAN tag"; } } description "One or more VLAN tags to which rewrite rule applies"; } } // container ieee-802.1ad list inet-precedence { key "name"; description "IPv4 precedence rewrite rule"; leaf name { type union { type string { pattern "default"; } type string { length "1 .. 64"; } } description "Name of rewrite rule to be applied"; } } // list inet-precedence } // container rewrite-rules container multi-destination { description "Multi-destination class of service"; uses apply-advanced; container classifiers { junos:must "(!(".. forwarding-class"))"; junos:must-message "Either Forwarding-class or Classifiers can be configured"; description "Classifier applied to multi-destination traffic"; uses apply-advanced; container ieee-802.1 { description "IEEE-802.1P classifier"; leaf classifier-name { type string { length "1 .. 64"; } description "Name of classifier to be applied"; } } // container ieee-802.1 container dscp { junos:must "(!(".. inet-precedence"))"; junos:must-message "Either DSCP or Inet-Precedence can be configured"; description "Differentiated services code point classifier"; leaf classifier-name { type string { length "1 .. 64"; } description "Name of classifier to be applied"; } } // container dscp container dscp-ipv6 { description "Differentiated services code point classifier IPv6"; leaf classifier-name { type string { length "1 .. 64"; } description "Name of classifier to be applied"; } } // container dscp-ipv6 container inet-precedence { description "IPv4 precedence classifier"; leaf classifier-name { type string { length "1 .. 64"; } description "Name of classifier to be applied"; } } // container inet-precedence } // container classifiers leaf forwarding-class { type string { junos:posix-pattern "^.{1,64}$"; junos:pattern-message "Must be string of 64 characters or less"; } description "Forwarding class assigned to incoming Multi-destination packets"; } } // container multi-destination } // grouping cos_interfaces_type 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-conf-class-of-service
© 2023 YumaWorks, Inc. All rights reserved.