junos-es-conf-forwarding-options

Junos forwarding-options configuration module

  • Version: 2019-01-01

    junos-es-conf-forwarding-options@2019-01-01


    
      module junos-es-conf-forwarding-options {
    
        yang-version 1;
    
        namespace
          "http://yang.juniper.net/junos-es/conf/forwarding-options";
    
        prefix jc-forwarding-options;
    
        import junos-common-ddl-extensions {
          prefix junos;
          revision-date "2019-01-01";
        }
        import junos-common-types {
          prefix jt;
          revision-date "2019-01-01";
        }
        import junos-es-conf-root {
          prefix jc;
          revision-date "2019-01-01";
        }
    
        organization "Juniper Networks, Inc.";
    
        contact "yang-support@juniper.net";
    
        description
          "Junos forwarding-options configuration module";
    
        revision "2019-01-01" {
          description "Junos: 21.3R1.9";
        }
    
    
        augment /jc:configuration {
          uses forwarding-options-group;
        }
    
        augment /jc:configuration/jc:groups {
          uses forwarding-options-group;
        }
    
        grouping forwarding-options-group {
          container forwarding-options {
            description
              "Configure options to control packet forwarding";
            uses juniper-forwarding-options;
          }  // container forwarding-options
        }  // grouping forwarding-options-group
    
        grouping juniper-forwarding-options {
          uses apply-advanced;
    
          list storm-control-profiles {
            key "name";
            description
              "Storm control profile for this instance";
            leaf name {
              junos:must "("forwarding-options storm-control-profiles $$ all")";
              junos:must-message "Only aggregate profiles supported";
              type string {
                length "1 .. 127";
              }
              description
                "Storm control profile name";
            }
    
            uses apply-advanced;
    
            container all {
              presence "enable all";
              description "For all BUM traffic";
              uses apply-advanced;
    
              choice bandwidth {
                leaf bandwidth-percentage {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 100";
                    }
                  }
                  description
                    "Percentage of link bandwidth";
                }
                leaf bandwidth-level {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32;
                  }
                  units "kbps";
                  description "Link bandwidth";
                }
              }  // choice bandwidth
    
              leaf burst-size {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32;
                }
                units "bytes";
                description "Burst size";
              }
    
              leaf no-broadcast {
                type empty;
                description
                  "Disable broadcast storm control";
              }
    
              leaf no-unknown-unicast {
                type empty;
                description
                  "Disable unknown unicast storm control";
              }
    
              choice no-multicast-choices {
                leaf no-multicast {
                  type empty;
                  description
                    "Disable multicast storm control";
                }
                leaf no-registered-multicast {
                  type empty;
                  description
                    "Disable registered multicast storm control";
                }
                leaf no-unregistered-multicast {
                  type empty;
                  description
                    "Disable unregistered multicast storm control";
                }
              }  // choice no-multicast-choices
            }  // container all
    
            leaf action-shutdown {
              type empty;
              description
                "Disable port for excessive storm control errors";
            }
          }  // list storm-control-profiles
    
          choice sampling-or-packet-capture {
            container sampling {
              description
                "Statistical traffic sampling options";
              uses juniper-sampling-options;
            }  // container sampling
            container packet-capture {
              description
                "Packet capture options";
              uses juniper-packet-capture-options;
            }  // container packet-capture
          }  // choice sampling-or-packet-capture
    
          list accounting {
            key "name";
            description
              "Configure accounting of traffic";
            uses juniper-packet-accounting-options;
          }  // list accounting
    
          container port-mirroring {
            description
              "Configure port mirroring of traffic";
            uses juniper-port-mirror-options;
          }  // container port-mirroring
    
          container evpn-vxlan {
            description
              "EVPN VXLAN configurations";
            uses apply-advanced;
    
            leaf shared-tunnels {
              type empty;
              description
                "Create VTEP tunnels to EVPN PE";
            }
    
            container reroute-address {
              description
                "Reroute IP address for vxlan encapsulation";
              choice family {
                container inet {
                  presence "enable inet";
                  description
                    "IPv4 address family";
                  uses apply-advanced;
    
                  leaf address {
                    type jt:ipv4addr;
                    description
                      "Reroute address for IPV4 FRR";
                  }
                }  // container inet
                container inet6 {
                  presence "enable inet6";
                  description
                    "IPv6 address family";
                  uses apply-advanced;
    
                  leaf address {
                    type jt:ipv6addr;
                    description
                      "Reroute address for IPV6 FRR";
                  }
                }  // container inet6
              }  // choice family
            }  // container reroute-address
          }  // container evpn-vxlan
    
          container multicast-replication {
            description
              "Set mode of multicast replication";
            uses apply-advanced;
    
            container evpn {
              description
                "EVPN IRB multicast related options";
              uses apply-advanced;
    
              leaf irb {
                type enumeration {
                  enum "local-only" {
                    value 0;
                    description
                      "Multicast forward in local-only mode";
                  }
                  enum "local-remote" {
                    value 1;
                    description
                      "Multicast forward in local-remote mode";
                  }
                  enum "oism" {
                    value 2;
                    description
                      "Optimized inter subnet multicast mode";
                  }
                }
              }
    
              leaf smet-nexthop-limit {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "10000 .. 40000";
                  }
                }
                description
                  "Flood traffic to all egress when count goes above limit";
              }
            }  // container evpn
          }  // container multicast-replication
    
          container load-balance {
            description
              "Configure load-balancing attributes on the forwarding path";
            uses apply-advanced;
    
            container indexed-load-balance {
              presence
                "enable indexed-load-balance";
              description
                "Use indexed permuted next hop lists for unilist and aggregate next hops";
              uses apply-advanced;
            }  // container indexed-load-balance
    
            container per-flow {
              uses apply-advanced;
            }  // container per-flow
    
            container per-prefix {
              presence "enable per-prefix";
              uses apply-advanced;
    
              leaf hash-seed {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint16 {
                    range "0 .. 65534";
                  }
                }
                default "0";
                description
                  "Specifies per-router input value for per-prefix load-balancing hash function";
              }
            }  // container per-prefix
          }  // container load-balance
    
          container hash-key {
            description
              "Select data used in the hash key";
            uses junos_hash_key;
          }  // container hash-key
    
          container enhanced-hash-key {
            description
              "Select data used in the hash key for Enhanced IP Forwarding Engines";
            uses apply-advanced;
    
            container lag-dlb {
              presence "enable lag-dlb";
              description
                "Setting dynamic load balancing options for LAG";
              uses apply-advanced;
    
              container ether-type {
                presence "enable ether-type";
                description
                  "Setting ether type for LAG DLB";
                uses apply-advanced;
    
                leaf ipv4 {
                  type empty;
                  description
                    "Ether type is ipv4";
                }
    
                leaf ipv6 {
                  type empty;
                  description
                    "Ether type is ipv6";
                }
    
                leaf mpls {
                  type empty;
                  description
                    "Ether type is mpls";
                }
              }  // container ether-type
            }  // container lag-dlb
    
            container ecmp-dlb {
              junos:must "(!(".. ecmp-resilient-hash"))";
              junos:must-message "RH and DLB cannot be configured together";
              description
                "Set load balancing options for VC-Fabric forwarding";
              uses apply-advanced;
    
              choice mode {
                leaf assigned-flow {
                  type empty;
                  description
                    "Flow-based fixed link assignment";
                }
                container flowlet {
                  presence "enable flowlet";
                  description
                    "Inactivity-based flowlet link assignment (default)";
                  uses apply-advanced;
    
                  leaf inactivity-interval {
                    type union {
                      type string {
                        pattern "<.*>|$.*";
                      }
                      type uint32;
                    }
                    default "256";
                    description
                      "Minimum inactivity interval in micro-seconds for flowlet detection";
                  }
                }  // container flowlet
                leaf per-packet {
                  type empty;
                  description
                    "Per-packet optimal spraying";
                }
              }  // choice mode
    
              container ether-type {
                presence "enable ether-type";
                description "Ether type";
                uses apply-advanced;
    
                leaf ipv4 {
                  type empty;
                  description "Set DLB for ipv4";
                }
    
                leaf ipv6 {
                  type empty;
                  description "Set DLB for ipv6";
                }
    
                leaf mpls {
                  type empty;
                  description "Set DLB for mpls";
                }
              }  // container ether-type
            }  // container ecmp-dlb
    
            container hash-seed {
              presence "enable hash-seed";
              description "Hash seed";
              uses apply-advanced;
            }  // container hash-seed
    
            container mpls {
              description
                "Configure mpls fields";
              uses apply-advanced;
    
              leaf no-incoming-port {
                type empty;
                description
                  "Exclude incoming port from the hash key";
              }
    
              leaf no-incoming-device {
                type empty;
                description
                  "Exclude incoming device from the hash key";
              }
            }  // container mpls
    
            container layer2 {
              description
                "Configure layer2 fields";
              uses apply-advanced;
    
              leaf no-incoming-port {
                type empty;
                description
                  "Exclude incoming port from the hash key";
              }
    
              leaf no-incoming-device {
                type empty;
                description
                  "Exclude incoming device from the hash key";
              }
    
              leaf no-source-mac-address {
                type empty;
                description
                  "Exclude source MAC address from the hash key";
              }
    
              leaf no-destination-mac-address {
                type empty;
                description
                  "Exclude destination MAC address from the hash key";
              }
    
              leaf no-ether-type {
                type empty;
                description
                  "Exclude ether type from the hash key";
              }
    
              leaf vlan-id {
                type empty;
                description
                  "Include incoming vlan-id in hash key";
              }
            }  // container layer2
    
            container inet {
              description
                "Configure inet4 fields";
              uses apply-advanced;
    
              leaf no-incoming-port {
                type empty;
                description
                  "Exclude incoming port from the hash key";
              }
    
              leaf no-incoming-device {
                type empty;
                description
                  "Exclude incoming device from the hash key";
              }
    
              leaf no-l4-source-port {
                type empty;
                description
                  "Exclude l4 source port from the hash key";
              }
    
              leaf no-l4-destination-port {
                type empty;
                description
                  "Exclude l4 dest port from the hash key";
              }
    
              leaf no-protocol {
                type empty;
                description
                  "Exclude protocol from the hash key";
              }
    
              leaf no-ipv4-source-address {
                type empty;
                description
                  "Exclude IPv4 source address";
              }
    
              leaf no-ipv4-destination-address {
                type empty;
                description
                  "Exclude IPv4 destination address";
              }
    
              leaf vlan-id {
                type empty;
                description
                  "Include incoming vlan-id in hash key";
              }
            }  // container inet
    
            container inet6 {
              description
                "Configure inet6 fields";
              uses apply-advanced;
    
              leaf no-incoming-port {
                type empty;
                description
                  "Exclude incoming port from the hash key";
              }
    
              leaf no-incoming-device {
                type empty;
                description
                  "Exclude incoming device from the hash key";
              }
    
              leaf no-l4-source-port {
                type empty;
                description
                  "Exclude l4 source port from the hash key";
              }
    
              leaf no-l4-destination-port {
                type empty;
                description
                  "Exclude l4 dest port from the hash key";
              }
    
              leaf no-next-header {
                type empty;
                description
                  "Exclude next header from the hash key";
              }
    
              leaf no-ipv6-source-address {
                type empty;
                description
                  "Exclude IPv6 source address";
              }
    
              leaf no-ipv6-destination-address {
                type empty;
                description
                  "Exclude IPv6 destination address";
              }
    
              leaf vlan-id {
                type empty;
                description
                  "Include vlan-id in hash key";
              }
            }  // container inet6
    
            leaf no-mpls {
              type empty;
              description
                "Disable mpls in hash key";
            }
    
            container gre {
              description "Configure for GRE ";
              uses apply-advanced;
    
              leaf key {
                type empty;
                description
                  "Include key in hash key";
              }
    
              leaf protocol {
                type empty;
                description
                  "Include protocol in hash key";
              }
            }  // container gre
    
            container services-loadbalancing {
              description
                "Select key to load balance across service PICs";
              uses apply-advanced;
    
              container family {
                description "Protocol family";
                container inet {
                  description
                    "IPv4 protocol family";
                  uses apply-advanced;
    
                  container layer-3-services {
                    description
                      "Include Layer 3 (IP) data in the hash key";
                    uses apply-advanced;
    
                    leaf source-address {
                      type empty;
                      description
                        "Include IP source address in the hash key";
                    }
    
                    leaf destination-address {
                      type empty;
                      description
                        "Include IP destination address in the hash key";
                    }
    
                    leaf incoming-interface-index {
                      type empty;
                      description
                        "Include incoming interface index in the hash key";
                    }
                  }  // container layer-3-services
                }  // container inet
    
                container inet6 {
                  description
                    "IPv6 protocol family";
                  uses apply-advanced;
    
                  container layer-3-services {
                    description
                      "Include Layer 3 (IP) data in the hash key";
                    uses apply-advanced;
    
                    leaf source-address {
                      type empty;
                      description
                        "Include IP source address in the hash key";
                    }
    
                    leaf destination-address {
                      type empty;
                      description
                        "Include IP destination address in the hash key";
                    }
    
                    leaf incoming-interface-index {
                      type empty;
                      description
                        "Include incoming interface index in the hash key";
                    }
    
                    leaf src-prefix-len {
                      type union {
                        type string {
                          pattern "<.*>|$.*";
                        }
                        type uint32 {
                          range "56 .. 127";
                        }
                      }
                      units "bits";
                      default "127";
                      description
                        "Enhanced hash key inet6 source prefix length";
                    }
                  }  // container layer-3-services
                }  // container inet6
              }  // container family
            }  // container services-loadbalancing
    
            container family {
              description "Protocol family";
              container inet {
                description
                  "IPv4 protocol family";
                uses apply-advanced;
    
                leaf incoming-interface-index {
                  type empty;
                  description
                    "Include incoming interface index in the hash key";
                }
    
                leaf no-destination-port {
                  type empty;
                  description
                    "Omit IP destination port in the hash key";
                }
    
                leaf no-source-port {
                  type empty;
                  description
                    "Omit IP source port in the hash key";
                }
    
                leaf type-of-service {
                  type empty;
                  description
                    "Include TOS byte in the hash key";
                }
    
                leaf gtp-tunnel-endpoint-identifier {
                  type empty;
                  description
                    "Include TEID in the hash key for GTP-U packets";
                }
    
                leaf l2tp-tunnel-session-identifier {
                  type empty;
                  description
                    "Include TID SID in the hash key for L2TP packets";
                }
    
                leaf session-id {
                  type empty;
                  description
                    "Include session ID in the enhanced hash key";
                }
              }  // container inet
    
              container inet6 {
                description
                  "IPv6 protocol family";
                uses apply-advanced;
    
                leaf incoming-interface-index {
                  type empty;
                  description
                    "Include incoming interface index in the hash key";
                }
    
                leaf traffic-class {
                  type empty;
                  description
                    "Include Traffic Class byte in the hash key";
                }
    
                leaf no-destination-port {
                  type empty;
                  description
                    "Omit IP destination port in the hash key";
                }
    
                leaf no-source-port {
                  type empty;
                  description
                    "Omit IP source port in the hash key";
                }
    
                leaf gtp-tunnel-endpoint-identifier {
                  type empty;
                  description
                    "Include TEID in the hash key for GTP-U packets";
                }
    
                leaf session-id {
                  type empty;
                  description
                    "Include session ID in the enhanced hash key";
                }
    
                leaf no-flow-label {
                  type empty;
                  description
                    "Omit Flow label in the hash key";
                }
    
                leaf type-of-service {
                  type empty;
                  description
                    "Include TOS byte in the hash key";
                }
              }  // container inet6
    
              container mpls {
                description
                  "MPLS protocol family";
                uses apply-advanced;
    
                leaf label-1-exp {
                  type empty;
                  description
                    "Include EXP of first MPLS label from the hash key";
                }
    
                leaf incoming-interface-index {
                  type empty;
                  description
                    "Include incoming interface index in the hash key";
                }
    
                choice pseudowire_option {
                  leaf no-ether-pseudowire {
                    type empty;
                    description
                      "Omit IP payload over ethernet PW from the hash-key";
                  }
                  container ether-pseudowire {
                    description
                      "Load-balance IP over ethernet PW";
                    leaf zero-control-word {
                      type empty;
                      description
                        "Parse zero control word in packet header";
                    }
                  }  // container ether-pseudowire
                }  // choice pseudowire_option
    
                leaf no-payload {
                  type empty;
                  description
                    "Omit MPLS payload data from the hash key";
                }
              }  // container mpls
    
              container multiservice {
                description
                  "Multiservice protocol (bridged/CCC/VPLS) family";
                uses apply-advanced;
    
                leaf incoming-interface-index {
                  type empty;
                  description
                    "Include incoming interface index in hash key";
                }
    
                leaf outer-priority {
                  type empty;
                  description
                    "Include Outer 802.1 Priority bits in the hash key";
                }
    
                leaf no-payload {
                  type empty;
                  description
                    "Omit payload data from the hash key";
                }
    
                leaf no-mac-addresses {
                  type empty;
                  description
                    "Omit source and destination MAC addresses from the hash key";
                }
              }  // container multiservice
            }  // container family
    
            container vxlan {
              description "Vxlan traffic";
              uses apply-advanced;
    
              leaf no-inner-payload {
                type empty;
                description
                  "To enable load-balancing on Vxlan traffic based on outer IP/UDP header";
              }
            }  // container vxlan
    
            list conditional-match {
              key "name";
              ordered-by user;
              description
                "Configures a conditional match";
              leaf name {
                type string;
                description "Name identifier";
              }
    
              uses apply-advanced;
    
              container offset1 {
                presence "enable offset1";
                description "Configure offset 1";
                uses apply-advanced;
    
                leaf base-offset1 {
                  type enumeration {
                    enum "start-of-L2Header" {
                      value 0;
                      description
                        "Offset will be extracted from start of L2 header";
                    }
                    enum
                      "start-of-L3-OuterHeader" {
                      value 1;
                      description
                        "Offset will be extracted from start of outer L3 header";
                    }
                    enum
                      "start-of-L3-InnerHeader" {
                      value 2;
                      description
                        "Offset will be extracted from start of inner L3 header";
                    }
                    enum "start-of-L4-Header" {
                      value 3;
                      description
                        "Offset will be extracted from start of L4 header";
                    }
                  }
                  description
                    "Configure base-offset";
                }
    
                leaf offset1-value {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint8 {
                      range "0 .. 126";
                    }
                  }
                  description
                    "Offset of the data to be extracted from the base offset. Only even number";
                }
    
                leaf matchdata1 {
                  type string {
                    junos:posix-pattern "^[[:xdigit:]]+$";
                    junos:pattern-message "Must be hexadecimal digits (0-9, a-f, A-F)";
                    length "4";
                  }
                  description
                    "Data to be matched";
                }
    
                leaf matchdata1-mask {
                  type string {
                    junos:posix-pattern "^[[:xdigit:]]+$";
                    junos:pattern-message "Must be hexadecimal digits (0-9, a-f, A-F)";
                    length "4";
                  }
                  description "Matchdata mask";
                }
              }  // container offset1
    
              container offset2 {
                presence "enable offset2";
                description "Configure offset 2";
                uses apply-advanced;
    
                leaf base-offset2 {
                  type enumeration {
                    enum "start-of-L2Header" {
                      value 0;
                      description
                        "Offset will be extracted from start of L2 header";
                    }
                    enum
                      "start-of-L3-OuterHeader" {
                      value 1;
                      description
                        "Offset will be extracted from start of outer L3 header";
                    }
                    enum
                      "start-of-L3-InnerHeader" {
                      value 2;
                      description
                        "Offset will be extracted from start of inner L3 header";
                    }
                    enum "start-of-L4-Header" {
                      value 3;
                      description
                        "Offset will be extracted from start of L4 header";
                    }
                  }
                  description
                    "Configure base-offset";
                }
    
                leaf offset2-value {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint8 {
                      range "0 .. 126";
                    }
                  }
                  description
                    "Offset of the data to be extracted from the base offset. Only even number";
                }
    
                leaf matchdata2 {
                  type string {
                    junos:posix-pattern "^[[:xdigit:]]+$";
                    junos:pattern-message "Must be hexadecimal digits (0-9, a-f, A-F)";
                    length "4";
                  }
                  description
                    "Data to be matched";
                }
    
                leaf matchdata2-mask {
                  type string {
                    junos:posix-pattern "^[[:xdigit:]]+$";
                    junos:pattern-message "Must be hexadecimal digits (0-9, a-f, A-F)";
                    length "4";
                  }
                  description "Matchdata mask";
                }
              }  // container offset2
    
              container offset3 {
                presence "enable offset3";
                description "Configure offset 3";
                uses apply-advanced;
    
                leaf base-offset3 {
                  type enumeration {
                    enum "start-of-L2Header" {
                      value 0;
                      description
                        "Offset will be extracted from start of L2 header";
                    }
                    enum
                      "start-of-L3-OuterHeader" {
                      value 1;
                      description
                        "Offset will be extracted from start of outer L3 header";
                    }
                    enum
                      "start-of-L3-InnerHeader" {
                      value 2;
                      description
                        "Offset will be extracted from start of inner L3 header";
                    }
                    enum "start-of-L4-Header" {
                      value 3;
                      description
                        "Offset will be extracted from start of L4 header";
                    }
                  }
                  description
                    "Configure base-offset";
                }
    
                leaf offset3-value {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint8 {
                      range "0 .. 126";
                    }
                  }
                  description
                    "Offset of the data to be extracted from the base offset. Only even number";
                }
    
                leaf matchdata3 {
                  type string {
                    junos:posix-pattern "^[[:xdigit:]]+$";
                    junos:pattern-message "Must be hexadecimal digits (0-9, a-f, A-F)";
                    length "4";
                  }
                  description
                    "Data to be matched";
                }
    
                leaf matchdata3-mask {
                  type string {
                    junos:posix-pattern "^[[:xdigit:]]+$";
                    junos:pattern-message "Must be hexadecimal digits (0-9, a-f, A-F)";
                    length "4";
                  }
                  description "Matchdata mask";
                }
              }  // container offset3
    
              container offset4 {
                presence "enable offset4";
                description "Configure offset 4";
                uses apply-advanced;
    
                leaf base-offset4 {
                  type enumeration {
                    enum "start-of-L2Header" {
                      value 0;
                      description
                        "Offset will be extracted from start of L2 header";
                    }
                    enum
                      "start-of-L3-OuterHeader" {
                      value 1;
                      description
                        "Offset will be extracted from start of outer L3 header";
                    }
                    enum
                      "start-of-L3-InnerHeader" {
                      value 2;
                      description
                        "Offset will be extracted from start of inner L3 header";
                    }
                    enum "start-of-L4-Header" {
                      value 3;
                      description
                        "Offset will be extracted from start of L4 header";
                    }
                  }
                  description
                    "Configure base-offset";
                }
    
                leaf offset4-value {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint8 {
                      range "0 .. 126";
                    }
                  }
                  description
                    "Offset of the data to be extracted from the base offset. Only even number";
                }
    
                leaf matchdata4 {
                  type string {
                    junos:posix-pattern "^[[:xdigit:]]+$";
                    junos:pattern-message "Must be hexadecimal digits (0-9, a-f, A-F)";
                    length "4";
                  }
                  description
                    "Data to be matched";
                }
    
                leaf matchdata4-mask {
                  type string {
                    junos:posix-pattern "^[[:xdigit:]]+$";
                    junos:pattern-message "Must be hexadecimal digits (0-9, a-f, A-F)";
                    length "4";
                  }
                  description "Matchdata mask";
                }
              }  // container offset4
            }  // list conditional-match
    
            list flex-hashing {
              key "name";
              ordered-by user;
              description "Set flex hashing";
              leaf name {
                type string;
                description "Name identifier";
              }
    
              uses apply-advanced;
    
              container ethtype {
                presence "enable ethtype";
                description
                  "Configure ether-type of packet";
                uses apply-advanced;
    
                container inet {
                  description
                    "Enable flex-hashing on ipv4";
                  uses apply-advanced;
    
                  leaf interface {
                    type union {
                      type jt:interface-name;
                      type string {
                        pattern "<.*>|$.*";
                      }
                    }
                    description
                      "Incoming interface name. This is optional parameter";
                  }
    
                  leaf conditional-match {
                    type string;
                    description
                      "Conditional match to be matched in the packet";
                  }
    
                  container hash-offset {
                    description
                      "Configure the offsets for hashing";
                    uses apply-advanced;
    
                    container offset1 {
                      presence "enable offset1";
                      description
                        "Configure offset 1 value";
                      uses apply-advanced;
    
                      leaf base-offset1 {
                        type enumeration {
                          enum
                            "start-of-L2Header" {
                            value 0;
                            description
                              "Offset will be extracted from start of L2 header";
                          }
                          enum
                            "start-of-L3-OuterHeader" {
                            value 1;
                            description
                              "Offset will be extracted from start of outer L3 header";
                          }
                          enum
                            "start-of-L3-InnerHeader" {
                            value 2;
                            description
                              "Offset will be extracted from start of inner L3 header";
                          }
                          enum
                            "start-of-L4-Header" {
                            value 3;
                            description
                              "Offset will be extracted from start of L4 header";
                          }
                        }
                        description
                          "Configure base-offset";
                      }
    
                      leaf offset1-value {
                        type union {
                          type string {
                            pattern "<.*>|$.*";
                          }
                          type uint8 {
                            range "0 .. 126";
                          }
                        }
                        description
                          "Offset of the data to be extracted from the base offset. Only even number";
                      }
    
                      leaf offset1-mask {
                        type string {
                          junos:posix-pattern "^[[:xdigit:]]+$";
                          junos:pattern-message "Must be hexadecimal digits (0-9, a-f, A-F)";
                          length "4";
                        }
                        description
                          "Mask for the hash data extracted. 2 byte mask";
                      }
    
                      container offset2 {
                        presence
                          "enable offset2";
                        description
                          "Configure offset 2 value";
                        uses apply-advanced;
    
                        leaf base-offset2 {
                          type enumeration {
                            enum
                              "start-of-L2Header" {
                              value 0;
                              description
                                "Offset will be extracted from start of L2 header";
                            }
                            enum
                              "start-of-L3-OuterHeader" {
                              value 1;
                              description
                                "Offset will be extracted from start of outer L3 header";
                            }
                            enum
                              "start-of-L3-InnerHeader" {
                              value 2;
                              description
                                "Offset will be extracted from start of inner L3 header";
                            }
                            enum
                              "start-of-L4-Header" {
                              value 3;
                              description
                                "Offset will be extracted from start of L4 header";
                            }
                          }
                          description
                            "Configure base-offset";
                        }
    
                        leaf offset2-value {
                          type union {
                            type string {
                              pattern "<.*>|$.*";
                            }
                            type uint8 {
                              range "0 .. 126";
                            }
                          }
                          description
                            "Offset of the data to be extracted from the base offset. Only even number";
                        }
    
                        leaf offset2-mask {
                          type string {
                            junos:posix-pattern "^[[:xdigit:]]+$";
                            junos:pattern-message "Must be hexadecimal digits (0-9, a-f, A-F)";
                            length "4";
                          }
                          description
                            "Mask for the hash data extracted. 2 byte mask";
                        }
                      }  // container offset2
                    }  // container offset1
                  }  // container hash-offset
                }  // container inet
    
                container inet6 {
                  description
                    "Enable flex-hashing on ipv6";
                  uses apply-advanced;
    
                  leaf interface {
                    type union {
                      type jt:interface-name;
                      type string {
                        pattern "<.*>|$.*";
                      }
                    }
                    description
                      "Incoming interface name. This is optional parameter";
                  }
    
                  leaf conditional-match {
                    type string;
                    description
                      "Conditional match to be matched in the packet";
                  }
    
                  container hash-offset {
                    description
                      "Configure the offsets for hashing";
                    uses apply-advanced;
    
                    container offset1 {
                      presence "enable offset1";
                      description
                        "Configure offset 1 value";
                      uses apply-advanced;
    
                      leaf base-offset1 {
                        type enumeration {
                          enum
                            "start-of-L2Header" {
                            value 0;
                            description
                              "Offset will be extracted from start of L2 header";
                          }
                          enum
                            "start-of-L3-OuterHeader" {
                            value 1;
                            description
                              "Offset will be extracted from start of outer L3 header";
                          }
                          enum
                            "start-of-L3-InnerHeader" {
                            value 2;
                            description
                              "Offset will be extracted from start of inner L3 header";
                          }
                          enum
                            "start-of-L4-Header" {
                            value 3;
                            description
                              "Offset will be extracted from start of L4 header";
                          }
                        }
                        description
                          "Configure base-offset";
                      }
    
                      leaf offset1-value {
                        type union {
                          type string {
                            pattern "<.*>|$.*";
                          }
                          type uint8 {
                            range "0 .. 126";
                          }
                        }
                        description
                          "Offset of the data to be extracted from the base offset. Only even number";
                      }
    
                      leaf offset1-mask {
                        type string {
                          junos:posix-pattern "^[[:xdigit:]]+$";
                          junos:pattern-message "Must be hexadecimal digits (0-9, a-f, A-F)";
                          length "4";
                        }
                        description
                          "Mask for the hash data extracted. 2 byte mask";
                      }
    
                      container offset2 {
                        presence
                          "enable offset2";
                        description
                          "Configure offset 2 value";
                        uses apply-advanced;
    
                        leaf base-offset2 {
                          type enumeration {
                            enum
                              "start-of-L2Header" {
                              value 0;
                              description
                                "Offset will be extracted from start of L2 header";
                            }
                            enum
                              "start-of-L3-OuterHeader" {
                              value 1;
                              description
                                "Offset will be extracted from start of outer L3 header";
                            }
                            enum
                              "start-of-L3-InnerHeader" {
                              value 2;
                              description
                                "Offset will be extracted from start of inner L3 header";
                            }
                            enum
                              "start-of-L4-Header" {
                              value 3;
                              description
                                "Offset will be extracted from start of L4 header";
                            }
                          }
                          description
                            "Configure base-offset";
                        }
    
                        leaf offset2-value {
                          type union {
                            type string {
                              pattern "<.*>|$.*";
                            }
                            type uint8 {
                              range "0 .. 126";
                            }
                          }
                          description
                            "Offset of the data to be extracted from the base offset. Only even number";
                        }
    
                        leaf offset2-mask {
                          type string {
                            junos:posix-pattern "^[[:xdigit:]]+$";
                            junos:pattern-message "Must be hexadecimal digits (0-9, a-f, A-F)";
                            length "4";
                          }
                          description
                            "Mask for the hash data extracted. 2 byte mask";
                        }
                      }  // container offset2
                    }  // container offset1
                  }  // container hash-offset
                }  // container inet6
    
                container mpls {
                  description
                    "Configure number of MPLS labels";
                  uses apply-advanced;
    
                  leaf num-labels {
                    type union {
                      type string {
                        pattern "<.*>|$.*";
                      }
                      type uint8 {
                        range "1 .. 5";
                      }
                    }
                    description
                      "Configure number of MPLS labels";
                  }
    
                  leaf interface {
                    type union {
                      type jt:interface-name;
                      type string {
                        pattern "<.*>|$.*";
                      }
                    }
                    description
                      "Incoming interface name. This is optional parameter";
                  }
    
                  leaf conditional-match {
                    type string;
                    description
                      "Conditional match to be matched in the packet";
                  }
    
                  container hash-offset {
                    description
                      "Configure the offsets for hashing";
                    uses apply-advanced;
    
                    container offset1 {
                      presence "enable offset1";
                      description
                        "Configure offset 1 value";
                      uses apply-advanced;
    
                      leaf base-offset1 {
                        type enumeration {
                          enum
                            "start-of-L2Header" {
                            value 0;
                            description
                              "Offset will be extracted from start of L2 header";
                          }
                          enum
                            "start-of-L3-OuterHeader" {
                            value 1;
                            description
                              "Offset will be extracted from start of outer L3 header";
                          }
                          enum
                            "start-of-L3-InnerHeader" {
                            value 2;
                            description
                              "Offset will be extracted from start of inner L3 header";
                          }
                          enum
                            "start-of-L4-Header" {
                            value 3;
                            description
                              "Offset will be extracted from start of L4 header";
                          }
                        }
                        description
                          "Configure base-offset";
                      }
    
                      leaf offset1-value {
                        type union {
                          type string {
                            pattern "<.*>|$.*";
                          }
                          type uint8 {
                            range "0 .. 126";
                          }
                        }
                        description
                          "Offset of the data to be extracted from the base offset. Only even number";
                      }
    
                      leaf offset1-mask {
                        type string {
                          junos:posix-pattern "^[[:xdigit:]]+$";
                          junos:pattern-message "Must be hexadecimal digits (0-9, a-f, A-F)";
                          length "4";
                        }
                        description
                          "Mask for the hash data extracted. 2 byte mask";
                      }
    
                      container offset2 {
                        presence
                          "enable offset2";
                        description
                          "Configure offset 2 value";
                        uses apply-advanced;
    
                        leaf base-offset2 {
                          type enumeration {
                            enum
                              "start-of-L2Header" {
                              value 0;
                              description
                                "Offset will be extracted from start of L2 header";
                            }
                            enum
                              "start-of-L3-OuterHeader" {
                              value 1;
                              description
                                "Offset will be extracted from start of outer L3 header";
                            }
                            enum
                              "start-of-L3-InnerHeader" {
                              value 2;
                              description
                                "Offset will be extracted from start of inner L3 header";
                            }
                            enum
                              "start-of-L4-Header" {
                              value 3;
                              description
                                "Offset will be extracted from start of L4 header";
                            }
                          }
                          description
                            "Configure base-offset";
                        }
    
                        leaf offset2-value {
                          type union {
                            type string {
                              pattern "<.*>|$.*";
                            }
                            type uint8 {
                              range "0 .. 126";
                            }
                          }
                          description
                            "Offset of the data to be extracted from the base offset. Only even number";
                        }
    
                        leaf offset2-mask {
                          type string {
                            junos:posix-pattern "^[[:xdigit:]]+$";
                            junos:pattern-message "Must be hexadecimal digits (0-9, a-f, A-F)";
                            length "4";
                          }
                          description
                            "Mask for the hash data extracted. 2 byte mask";
                        }
                      }  // container offset2
                    }  // container offset1
                  }  // container hash-offset
                }  // container mpls
              }  // container ethtype
            }  // list flex-hashing
          }  // container enhanced-hash-key
    
          container next-hop {
            description "Next hop throttle";
            uses apply-advanced;
    
            leaf arp-throttle {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint16 {
                  range "10 .. 100";
                }
              }
              description
                "Change the arp throttling time(seconds)";
            }
    
            leaf arp-detect {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 100000";
                }
              }
              description
                "Change the arp throttling detect time(milliseconds)";
            }
          }  // container next-hop
    
          container sflow {
            description "Sflow related";
            uses apply-advanced;
    
            container egress-multicast {
              description
                "Sflow for egress multicast";
              uses apply-advanced;
    
              leaf max-replication-rate {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "0 .. 2000";
                  }
                }
                description
                  "To configure max replication rate (0 to 2K pps)";
              }
            }  // container egress-multicast
          }  // container sflow
    
          container multicast {
            description
              "Multicast resolve and mismatch rate";
            uses apply-advanced;
    
            leaf resolve-rate {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "100 .. 1000";
                }
              }
              units "per second";
              description
                "Multicast resolve rate";
            }
    
            leaf mismatch-rate {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "50 .. 1000";
                }
              }
              units "per second";
              description
                "Multicast interface mismatch rate";
            }
          }  // container multicast
    
          container packet-capture-telemetry {
            description
              "Packet capture telemetry options";
            uses apply-advanced;
    
            container egress {
              description "Egress options";
              uses packet-capture-egress-intf-type;
            }  // container egress
          }  // container packet-capture-telemetry
    
          container explicit-null-cos {
            presence "enable explicit-null-cos";
            description
              "Configure to use MPLS explicit null exp for COS classification";
            uses apply-advanced;
    
            leaf inet {
              type empty;
              description "Include family inet";
            }
    
            leaf inet6 {
              type empty;
              description "Include family inet6";
            }
          }  // container explicit-null-cos
    
          container helpers {
            description
              "Port forwarding configuration";
            uses apply-advanced;
    
            container traceoptions {
              description
                "Trace options for helper";
              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
    
              leaf level {
                type enumeration {
                  enum "error" {
                    value 0;
                    description
                      "Match error conditions";
                  }
                  enum "warning" {
                    value 1;
                    description
                      "Match warning messages";
                  }
                  enum "notice" {
                    value 2;
                    description
                      "Match conditions that should be handled specially";
                  }
                  enum "info" {
                    value 3;
                    description
                      "Match informational messages";
                  }
                  enum "verbose" {
                    value 4;
                    description
                      "Match verbose messages";
                  }
                  enum "all" {
                    value 5;
                    description
                      "Match all levels";
                  }
                }
                default "error";
                description
                  "Level of debugging output";
              }
    
              list flag {
                key "name";
                ordered-by user;
                description
                  "Area of UDP forwarding helper process on which to enable debugging output";
                leaf name {
                  type enumeration {
                    enum "trace" {
                      value 0;
                      description
                        "Trace tracing code";
                    }
                    enum "address" {
                      value 1;
                      description
                        "Trace address management code";
                    }
                    enum "main" {
                      value 2;
                      description
                        "Trace main loop code";
                    }
                    enum "config" {
                      value 3;
                      description
                        "Trace configuration code";
                    }
                    enum "ifdb" {
                      value 4;
                      description
                        "Trace interface database code";
                    }
                    enum "io" {
                      value 5;
                      description
                        "Trace I/O code";
                    }
                    enum "rtsock" {
                      value 6;
                      description
                        "Trace routing socket code";
                    }
                    enum "ui" {
                      value 7;
                      description
                        "Trace user interface code";
                    }
                    enum "util" {
                      value 8;
                      description
                        "Trace miscellaneous utility code";
                    }
                    enum "gencfg" {
                      value 9;
                      description
                        "Trace fud gencfg message";
                    }
                    enum "domain" {
                      value 10;
                      description
                        "Trace DNS service-specific code";
                    }
                    enum "tftp" {
                      value 11;
                      description
                        "Trace TFTP service-specific code";
                    }
                    enum "bootp" {
                      value 12;
                      description
                        "Trace BOOTP/DHCP service-specific code";
                    }
                    enum "port" {
                      value 13;
                      description
                        "Trace arbitrary protocol code";
                    }
                    enum "if-rtsdb" {
                      value 14;
                      description
                        "Trace interface hierarchy rtsdb";
                    }
                    enum "all" {
                      value 15;
                      description
                        "Trace all areas of code";
                    }
                  }
                }
              }  // list flag
            }  // container traceoptions
    
            container rtsdb-client-traceoptions {
              presence
                "enable rtsdb-client-traceoptions";
              status deprecated;
              description
                "SHM rtsock database client library trace options";
              uses apply-advanced;
    
              container if-rtsdb {
                presence "enable if-rtsdb";
                description
                  "Trace interface hierarchy rtsdb";
                uses apply-advanced;
    
                list flag {
                  key "name";
                  ordered-by user;
                  description
                    "Tracing parameters";
                  leaf name {
                    type enumeration {
                      enum "init" {
                        value 0;
                        description
                          "Trace initialization";
                      }
                      enum "routing-socket" {
                        value 1;
                        description
                          "Trace routing socket messages";
                      }
                      enum "map" {
                        value 2;
                        description
                          "Trace shared memory mapping";
                      }
                      enum "all" {
                        value 3;
                        description "Trace all";
                      }
                    }
                  }
    
                  leaf disable {
                    type empty;
                    description
                      "Disable this trace flag";
                  }
                }  // list flag
              }  // container if-rtsdb
            }  // container rtsdb-client-traceoptions
    
            container domain {
              description
                "Incoming DNS request forwarding configuration";
              uses apply-advanced;
    
              leaf description {
                type string;
                description
                  "Text description of server";
              }
    
              container server {
                description "Server information";
                leaf address {
                  type jt:ipv4addr;
                  description
                    "Name or address of server to which to forward";
                }
    
                choice instance {
                  container logical-system {
                    description
                      "Logical system of server to which to forward";
                    leaf logical-system-name {
                      junos:must "("logical-systems $$")";
                      junos:must-message "referenced logical system must be defined";
                      type string {
                        junos:posix-pattern "^[a-zA-Z0-9_-]{1,63}$";
                        junos:pattern-message "Logical-system name is a string consisting of up to 63 letters, numbers, dashes and underscores";
                      }
                      description
                        "Name of logical system";
                    }
    
                    leaf routing-instance {
                      type union {
                        type string {
                          pattern "default";
                        }
                        type string {
                          junos:posix-pattern "!^((__.*__)|(all)|(.*[ ].*)|("")|(.{129,}))$";
                          junos:pattern-message "Must be a non-reserved string of 128 characters or less with no spaces.";
                        }
                      }
                      description
                        "Routing instance of server to which to forward";
                    }
                  }  // container logical-system
                  leaf routing-instance {
                    junos:must "("routing-instances $$")";
                    junos:must-message "referenced routing instance must be defined";
                    type union {
                      type string {
                        pattern "default";
                      }
                      type string {
                        junos:posix-pattern "!^((__.*__)|(all)|(.*[ ].*)|("")|(.{129,}))$";
                        junos:pattern-message "Must be a non-reserved string of 128 characters or less with no spaces.";
                      }
                    }
                    description
                      "Routing instance of server to which to forward";
                  }
                }  // choice instance
              }  // container server
    
              list interface {
                key "name";
                ordered-by user;
                description
                  "Incoming DNS request forwarding interface configuration";
                leaf name {
                  type union {
                    type jt:interface-wildcard;
                    type string {
                      pattern "<.*>|$.*";
                    }
                  }
                  description
                    "Name of interface or group of interfaces";
                }
    
                uses apply-advanced;
    
                leaf no-listen {
                  type empty;
                  description
                    "Do not listen on this interface";
                }
    
                leaf broadcast {
                  type empty;
                  description
                    "If the layer 2 interface is unknown then broadcast";
                }
    
                leaf description {
                  type string;
                  description
                    "Text description of server";
                }
    
                container server {
                  description
                    "Server information";
                  leaf address {
                    type jt:ipv4addr;
                    description
                      "Name or address of server to which to forward";
                  }
    
                  choice instance {
                    container logical-system {
                      description
                        "Logical system of server to which to forward";
                      leaf logical-system-name {
                        junos:must "("logical-systems $$")";
                        junos:must-message "referenced logical system must be defined";
                        type string {
                          junos:posix-pattern "^[a-zA-Z0-9_-]{1,63}$";
                          junos:pattern-message "Logical-system name is a string consisting of up to 63 letters, numbers, dashes and underscores";
                        }
                        description
                          "Name of logical system";
                      }
    
                      leaf routing-instance {
                        type union {
                          type string {
                            pattern "default";
                          }
                          type string {
                            junos:posix-pattern "!^((__.*__)|(all)|(.*[ ].*)|("")|(.{129,}))$";
                            junos:pattern-message "Must be a non-reserved string of 128 characters or less with no spaces.";
                          }
                        }
                        description
                          "Routing instance of server to which to forward";
                      }
                    }  // container logical-system
                    leaf routing-instance {
                      junos:must "("routing-instances $$")";
                      junos:must-message "referenced routing instance must be defined";
                      type union {
                        type string {
                          pattern "default";
                        }
                        type string {
                          junos:posix-pattern "!^((__.*__)|(all)|(.*[ ].*)|("")|(.{129,}))$";
                          junos:pattern-message "Must be a non-reserved string of 128 characters or less with no spaces.";
                        }
                      }
                      description
                        "Routing instance of server to which to forward";
                    }
                  }  // choice instance
                }  // container server
              }  // list interface
            }  // container domain
    
            container tftp {
              description
                "Incoming TFTP request forwarding configuration";
              uses apply-advanced;
    
              leaf description {
                type string;
                description
                  "Text description of server";
              }
    
              container server {
                description "Server information";
                leaf address {
                  type jt:ipv4addr;
                  description
                    "Name or address of server to which to forward";
                }
    
                choice instance {
                  container logical-system {
                    description
                      "Logical system of server to which to forward";
                    leaf logical-system-name {
                      junos:must "("logical-systems $$")";
                      junos:must-message "referenced logical system must be defined";
                      type string {
                        junos:posix-pattern "^[a-zA-Z0-9_-]{1,63}$";
                        junos:pattern-message "Logical-system name is a string consisting of up to 63 letters, numbers, dashes and underscores";
                      }
                      description
                        "Name of logical system";
                    }
    
                    leaf routing-instance {
                      type union {
                        type string {
                          pattern "default";
                        }
                        type string {
                          junos:posix-pattern "!^((__.*__)|(all)|(.*[ ].*)|("")|(.{129,}))$";
                          junos:pattern-message "Must be a non-reserved string of 128 characters or less with no spaces.";
                        }
                      }
                      description
                        "Routing instance of server to which to forward";
                    }
                  }  // container logical-system
                  leaf routing-instance {
                    junos:must "("routing-instances $$")";
                    junos:must-message "referenced routing instance must be defined";
                    type union {
                      type string {
                        pattern "default";
                      }
                      type string {
                        junos:posix-pattern "!^((__.*__)|(all)|(.*[ ].*)|("")|(.{129,}))$";
                        junos:pattern-message "Must be a non-reserved string of 128 characters or less with no spaces.";
                      }
                    }
                    description
                      "Routing instance of server to which to forward";
                  }
                }  // choice instance
              }  // container server
    
              list interface {
                key "name";
                ordered-by user;
                description
                  "Incoming TFTP request forwarding interface configuration";
                leaf name {
                  type union {
                    type jt:interface-wildcard;
                    type string {
                      pattern "<.*>|$.*";
                    }
                  }
                  description
                    "Name of interface or group of interfaces";
                }
    
                uses apply-advanced;
    
                leaf no-listen {
                  type empty;
                  description
                    "Do not listen on this interface";
                }
    
                leaf broadcast {
                  type empty;
                  description
                    "If the layer 2 interface is unknown then broadcast";
                }
    
                leaf description {
                  type string;
                  description
                    "Text description of server";
                }
    
                container server {
                  description
                    "Server information";
                  leaf address {
                    type jt:ipv4addr;
                    description
                      "Name or address of server to which to forward";
                  }
    
                  choice instance {
                    container logical-system {
                      description
                        "Logical system of server to which to forward";
                      leaf logical-system-name {
                        junos:must "("logical-systems $$")";
                        junos:must-message "referenced logical system must be defined";
                        type string {
                          junos:posix-pattern "^[a-zA-Z0-9_-]{1,63}$";
                          junos:pattern-message "Logical-system name is a string consisting of up to 63 letters, numbers, dashes and underscores";
                        }
                        description
                          "Name of logical system";
                      }
    
                      leaf routing-instance {
                        type union {
                          type string {
                            pattern "default";
                          }
                          type string {
                            junos:posix-pattern "!^((__.*__)|(all)|(.*[ ].*)|("")|(.{129,}))$";
                            junos:pattern-message "Must be a non-reserved string of 128 characters or less with no spaces.";
                          }
                        }
                        description
                          "Routing instance of server to which to forward";
                      }
                    }  // container logical-system
                    leaf routing-instance {
                      junos:must "("routing-instances $$")";
                      junos:must-message "referenced routing instance must be defined";
                      type union {
                        type string {
                          pattern "default";
                        }
                        type string {
                          junos:posix-pattern "!^((__.*__)|(all)|(.*[ ].*)|("")|(.{129,}))$";
                          junos:pattern-message "Must be a non-reserved string of 128 characters or less with no spaces.";
                        }
                      }
                      description
                        "Routing instance of server to which to forward";
                    }
                  }  // choice instance
                }  // container server
              }  // list interface
            }  // container tftp
    
            container bootp {
              junos:must "(!("system autoinstallation"))";
              junos:must-message "incompatible with 'system autoinstallation'";
              description
                "Incoming BOOTP/DHCP request forwarding configuration";
              uses apply-advanced;
    
              leaf relay-agent-option {
                type empty;
                description
                  "Use DHCP Relay Agent option in relayed BOOTP/DHCP messages";
              }
    
              leaf description {
                type string;
                description
                  "Text description of servers";
              }
    
              list server {
                key "name";
                ordered-by user;
                description "Server information";
                leaf name {
                  type jt:ipv4addr;
                  description
                    "Name or address of servers to which to forward";
                }
    
                uses apply-advanced;
    
                list logical-system {
                  key "name";
                  ordered-by user;
                  description
                    "Logical system of server to which to forward";
                  leaf name {
                    junos:must "("logical-systems $$")";
                    junos:must-message "referenced logical system must be defined";
                    type string {
                      junos:posix-pattern "^[a-zA-Z0-9_-]{1,63}$";
                      junos:pattern-message "Logical-system name is a string consisting of up to 63 letters, numbers, dashes and underscores";
                    }
                    description
                      "Name of logical system";
                  }
    
                  leaf-list routing-instance {
                    type string;
                    ordered-by user;
                    description
                      "Routing instance of server to which to forward";
                  }
                }  // list logical-system
    
                leaf-list routing-instance {
                  type string;
                  ordered-by user;
                  description
                    "Routing instance of server to which to forward";
                }
              }  // list server
    
              leaf maximum-hop-count {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 16";
                  }
                }
                default "4";
                description
                  "Maximum number of hops per packet";
              }
    
              leaf minimum-wait-time {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "0 .. 30000";
                  }
                }
                default "0";
                description
                  "Minimum number of seconds before requests are forwarded";
              }
    
              leaf client-response-ttl {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 255";
                  }
                }
                description
                  "IP time-to-live value to set in responses to client";
              }
    
              leaf vpn {
                type empty;
                description
                  "Enable vpn encryption ";
              }
    
              leaf apply-secondary-as-giaddr {
                type empty;
                description
                  "Enable DHCP relay to use secondary gateway ip on all interfaces";
              }
    
              list interface {
                key "name";
                ordered-by user;
                description
                  "Incoming BOOTP/DHCP request forwarding interface configuration";
                leaf name {
                  type union {
                    type jt:interface-wildcard;
                    type string {
                      pattern "<.*>|$.*";
                    }
                  }
                  description
                    "Name of interface or group of interfaces";
                }
    
                uses apply-advanced;
    
                leaf no-listen {
                  type empty;
                  description
                    "Do not listen on this interface";
                }
    
                leaf broadcast {
                  type empty;
                  description
                    "If the layer 2 interface is unknown then broadcast";
                }
    
                leaf description {
                  type string;
                  description
                    "Text description of servers";
                }
    
                list server {
                  key "name";
                  ordered-by user;
                  description
                    "Server information";
                  leaf name {
                    type jt:ipv4addr;
                    description
                      "Name or address of servers to which to forward";
                  }
    
                  uses apply-advanced;
    
                  list logical-system {
                    key "name";
                    ordered-by user;
                    description
                      "Logical system of server to which to forward";
                    leaf name {
                      junos:must "("logical-systems $$")";
                      junos:must-message "referenced logical system must be defined";
                      type string {
                        junos:posix-pattern "^[a-zA-Z0-9_-]{1,63}$";
                        junos:pattern-message "Logical-system name is a string consisting of up to 63 letters, numbers, dashes and underscores";
                      }
                      description
                        "Name of logical system";
                    }
    
                    leaf-list routing-instance {
                      type string;
                      ordered-by user;
                      description
                        "Routing instance of server to which to forward";
                    }
                  }  // list logical-system
    
                  leaf-list routing-instance {
                    type string;
                    ordered-by user;
                    description
                      "Routing instance of server to which to forward";
                  }
                }  // list server
    
                leaf maximum-hop-count {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 16";
                    }
                  }
                  default "4";
                  description
                    "Maximum number of hops per packet";
                }
    
                leaf minimum-wait-time {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "0 .. 30000";
                    }
                  }
                  default "0";
                  description
                    "Minimum number of seconds before requests are forwarded";
                }
    
                leaf client-response-ttl {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 255";
                    }
                  }
                  description
                    "IP time-to-live value to set in responses to client";
                }
    
                leaf vpn {
                  type empty;
                  description
                    "Enable vpn encryption ";
                }
    
                leaf apply-secondary-as-giaddr {
                  type empty;
                  description
                    "Enable DHCP relay to use secondary gateway ip on this interface";
                }
              }  // list interface
            }  // container bootp
    
            list port {
              key "name";
              ordered-by user;
              description
                "Incoming arbitrary protocol request forwarding configuration";
              leaf name {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 65535";
                  }
                }
                description
                  "Port number of the protocol to listen";
              }
    
              uses apply-advanced;
    
              leaf description {
                type string;
                description
                  "Text description of server";
              }
    
              list server {
                key "name";
                ordered-by user;
                description "Server information";
                leaf name {
                  type jt:ipv4addr;
                  description
                    "Name or address of server to which to forward";
                }
    
                uses apply-advanced;
    
                choice instance {
                  container logical-system {
                    description
                      "Logical system of server to which to forward";
                    leaf logical-system-name {
                      junos:must "("logical-systems $$")";
                      junos:must-message "referenced logical system must be defined";
                      type string {
                        junos:posix-pattern "^[a-zA-Z0-9_-]{1,63}$";
                        junos:pattern-message "Logical-system name is a string consisting of up to 63 letters, numbers, dashes and underscores";
                      }
                      description
                        "Name of logical system";
                    }
    
                    leaf routing-instance {
                      type union {
                        type string {
                          pattern "default";
                        }
                        type string {
                          junos:posix-pattern "!^((__.*__)|(all)|(.*[ ].*)|("")|(.{129,}))$";
                          junos:pattern-message "Must be a non-reserved string of 128 characters or less with no spaces.";
                        }
                      }
                      description
                        "Routing instance of server to which to forward";
                    }
                  }  // container logical-system
                  leaf routing-instance {
                    junos:must "("routing-instances $$")";
                    junos:must-message "referenced routing instance must be defined";
                    type union {
                      type string {
                        pattern "default";
                      }
                      type string {
                        junos:posix-pattern "!^((__.*__)|(all)|(.*[ ].*)|("")|(.{129,}))$";
                        junos:pattern-message "Must be a non-reserved string of 128 characters or less with no spaces.";
                      }
                    }
                    description
                      "Routing instance of server to which to forward";
                  }
                }  // choice instance
              }  // list server
    
              list interface {
                key "name";
                ordered-by user;
                description
                  "Incoming request forwarding interface configuration";
                leaf name {
                  type union {
                    type jt:interface-wildcard;
                    type string {
                      pattern "<.*>|$.*";
                    }
                  }
                  description
                    "Name of interface or group of interfaces";
                }
    
                uses apply-advanced;
    
                leaf no-listen {
                  type empty;
                  description
                    "Do not listen on this interface";
                }
    
                leaf broadcast {
                  type empty;
                  description
                    "If the layer 2 interface is unknown then broadcast";
                }
    
                leaf description {
                  type string;
                  description
                    "Text description of server";
                }
    
                list server {
                  key "name";
                  ordered-by user;
                  description
                    "Server information";
                  leaf name {
                    type jt:ipv4addr;
                    description
                      "Name or address of server to which to forward";
                  }
    
                  uses apply-advanced;
    
                  choice instance {
                    container logical-system {
                      description
                        "Logical system of server to which to forward";
                      leaf logical-system-name {
                        junos:must "("logical-systems $$")";
                        junos:must-message "referenced logical system must be defined";
                        type string {
                          junos:posix-pattern "^[a-zA-Z0-9_-]{1,63}$";
                          junos:pattern-message "Logical-system name is a string consisting of up to 63 letters, numbers, dashes and underscores";
                        }
                        description
                          "Name of logical system";
                      }
    
                      leaf routing-instance {
                        type union {
                          type string {
                            pattern "default";
                          }
                          type string {
                            junos:posix-pattern "!^((__.*__)|(all)|(.*[ ].*)|("")|(.{129,}))$";
                            junos:pattern-message "Must be a non-reserved string of 128 characters or less with no spaces.";
                          }
                        }
                        description
                          "Routing instance of server to which to forward";
                      }
                    }  // container logical-system
                    leaf routing-instance {
                      junos:must "("routing-instances $$")";
                      junos:must-message "referenced routing instance must be defined";
                      type union {
                        type string {
                          pattern "default";
                        }
                        type string {
                          junos:posix-pattern "!^((__.*__)|(all)|(.*[ ].*)|("")|(.{129,}))$";
                          junos:pattern-message "Must be a non-reserved string of 128 characters or less with no spaces.";
                        }
                      }
                      description
                        "Routing instance of server to which to forward";
                    }
                  }  // choice instance
                }  // list server
              }  // list interface
            }  // list port
          }  // container helpers
    
          container family {
            description "Protocol family";
            container inet {
              description "IPv4 parameters";
              uses apply-advanced;
    
              container filter {
                description
                  "Filtering for forwarding table";
                uses apply-advanced;
    
                leaf input {
                  type string;
                  description
                    "Name of input filter to apply for forwarded packets";
                }
    
                leaf output {
                  type string;
                  description
                    "Name of output filter to apply for forwarded packets";
                }
              }  // container filter
            }  // container inet
    
            container inet6 {
              description "IPv6 parameters";
              uses apply-advanced;
    
              container filter {
                description
                  "Filtering for forwarding table";
                uses apply-advanced;
    
                leaf input {
                  type string;
                  description
                    "Name of input filter to apply for forwarded packets";
                }
    
                leaf output {
                  type string;
                  description
                    "Name of output filter to apply for forwarded packets";
                }
              }  // container filter
    
              leaf source-checking {
                type empty;
                description
                  "Discard IPv6 packet when source address type is unspecified, loopback, multicast or link-local ";
              }
            }  // container inet6
    
            container mpls {
              description "MPLS parameters";
              uses apply-advanced;
    
              container filter {
                description
                  "Filtering for forwarding table";
                uses apply-advanced;
    
                leaf input {
                  type string;
                  description
                    "Name of input filter to apply for forwarded packets";
                }
    
                leaf output {
                  type string;
                  description
                    "Name of output filter to apply for forwarded packets";
                }
              }  // container filter
            }  // container mpls
    
            container vpls {
              description "VPLS parameters";
              uses apply-advanced;
    
              container filter {
                description
                  "Filtering for VPLS DMAC forwarding table";
                uses apply-advanced;
    
                leaf input {
                  type string;
                  description
                    "Name of input filter to apply for forwarded packets";
                }
              }  // container filter
    
              container flood {
                description
                  "Filtering for VPLS flood table";
                uses apply-advanced;
    
                leaf input {
                  type string;
                  description
                    "Name of input filter to apply for VPLS flood packets";
                }
              }  // container flood
            }  // container vpls
    
            container evpn {
              description "EVPN parameters";
              uses apply-advanced;
    
              container filter {
                description
                  "Filtering for EVPN DMAC forwarding table";
                uses apply-advanced;
    
                leaf input {
                  type string;
                  description
                    "Name of input filter to apply for forwarded packets";
                }
              }  // container filter
    
              container flood {
                description
                  "Filtering for EVPN flood table";
                uses apply-advanced;
    
                leaf input {
                  type string;
                  description
                    "Name of input filter to apply for EVPN flood packets";
                }
              }  // container flood
            }  // container evpn
          }  // container family
    
          list next-hop-group {
            key "name";
            description
              "Next hop group forwarding option";
            uses juniper-next-hop-group-options;
          }  // list next-hop-group
    
          container dhcp-relay {
            junos:must "(!("system services dhcp"))";
            junos:must-message "Incompatible with 'set system services dhcp'";
            junos:must "(!(".. .. instance-type virtual-switch"))";
            junos:must-message "forwarding-options dhcp-relay incompatible with routing-instances instance-type virtual-switch'";
            description
              "Dynamic Host Configuration Protocol relay configuration";
            uses jdhcp-relay-type;
          }  // container dhcp-relay
    
          choice load-balance-label-capability-choice {
            leaf load-balance-label-capability {
              type empty;
              description
                "Load balance label capability";
            }
            leaf no-load-balance-label-capability {
              type empty;
              description
                "Don't load balance label capability";
            }
          }  // choice load-balance-label-capability-choice
    
          list ip-options-protocol-queue {
            key "name";
            ordered-by user;
            description
              "IP Options protocol logical queue parameters";
            leaf name {
              type string;
              description "Protocol name";
            }
    
            uses apply-advanced;
    
            leaf protocol-id {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint8 {
                  range "1 .. 254";
                }
              }
              description "Protocol Identifier";
            }
    
            leaf queue-depth {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 807";
                }
              }
              description
                "Size of the protocol logical options queue";
            }
          }  // list ip-options-protocol-queue
    
          container access-security {
            description
              "Access security configuration";
            uses jdhcp-access-security-type;
          }  // container access-security
    
          container vxlan-routing {
            description
              "VXLAN Routing forwarding options";
            uses apply-advanced;
    
            leaf next-hop {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32;
              }
              description
                "Next-hop. Must be multiple of 4096. This will restart PFE";
            }
    
            leaf interface-num {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32;
              }
              description
                "Interface. Must be multiple of 2048. This will restart PFE";
            }
    
            leaf overlay-ecmp {
              type empty;
              description
                "Enable overlay ecmp for vxlan L3. This will restart PFE";
            }
    
            leaf loopback-port {
              junos:must "(all "interfaces $$ unit <*> family ethernet-switching interface-mode trunk")";
              junos:must-message "Interface-mode trunk needs to be enabled for loopback AE";
              junos:must "("chassis aggregated-devices ethernet device-count")";
              junos:must-message "Ethernet device-count needs to be configured for loopback AE";
              junos:must "("interfaces $$ aggregated-ether-options loopback")";
              junos:must-message "Loopback needs to be enabled on the AE interface";
              type string;
              description
                "AE loopback interface used for VXLAN routing. This will restart PFE";
            }
          }  // container vxlan-routing
        }  // grouping juniper-forwarding-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 jdhcp-access-security-type {
          description
            "Access security configuration";
          uses apply-advanced;
    
          container router-advertisement-guard {
            presence
              "enable router-advertisement-guard";
            description
              "Router Advertisement Guard Configuration";
            uses apply-advanced;
    
            list policy {
              key "name";
              ordered-by user;
              description
                "Router Advertisement Guard policy";
              leaf name {
                type string {
                  length "1 .. 64";
                }
                description
                  "Router Advertisement Guard policy name";
              }
    
              uses apply-advanced;
    
              container discard {
                description "Discard parameters";
                uses apply-advanced;
    
                leaf source-ip-address-list {
                  type string;
                  description
                    "IPv6 Source address list name";
                }
    
                leaf source-mac-address-list {
                  type string;
                  description
                    "Source mac address list name";
                }
    
                leaf prefix-list-name {
                  type string;
                  description "Prefix-list Name";
                }
              }  // container discard
    
              container accept {
                description "Accept parameters";
                uses apply-advanced;
    
                container match-list {
                  description
                    "List of parameters to check";
                  uses apply-advanced;
    
                  leaf source-ip-address-list {
                    type string;
                    description
                      "IPv6 Source address list name";
                  }
    
                  leaf source-mac-address-list {
                    type string;
                    description
                      "Source mac address list name";
                  }
    
                  leaf prefix-list-name {
                    type string;
                    description
                      "Prefix-list Name";
                  }
    
                  leaf match-criteria {
                    type enumeration {
                      enum "match-all" {
                        value 0;
                        description
                          "A match from every list";
                      }
                      enum "match-any" {
                        value 1;
                        description
                          "A match from any list";
                      }
                    }
                    description "Match Criteria";
                  }
                }  // container match-list
    
                container match-options {
                  presence
                    "enable match-options";
                  description
                    "List of Options to check";
                  uses apply-advanced;
    
                  container hop-limit {
                    description "Hop limit";
                    uses apply-advanced;
    
                    leaf maximum {
                      type union {
                        type string {
                          pattern "<.*>|$.*";
                        }
                        type uint32 {
                          range "1 .. 255";
                        }
                      }
                      description
                        "Maximum hop limit";
                    }
    
                    leaf minimum {
                      type union {
                        type string {
                          pattern "<.*>|$.*";
                        }
                        type uint32 {
                          range "1 .. 255";
                        }
                      }
                      description
                        "Minimum hop limit";
                    }
                  }  // container hop-limit
    
                  container route-preference {
                    description
                      "Accept route preference";
                    uses apply-advanced;
    
                    leaf maximum {
                      type enumeration {
                        enum "low" {
                          value 0;
                          description
                            "Route preference low";
                        }
                        enum "medium" {
                          value 1;
                          description
                            "Route preference medium";
                        }
                        enum "high" {
                          value 2;
                          description
                            "Route preference high";
                        }
                      }
                      description
                        "Maximum route preference";
                    }
                  }  // container route-preference
    
                  leaf managed-config-flag {
                    type empty;
                    description
                      "Check Managed config flag";
                  }
    
                  leaf other-config-flag {
                    type empty;
                    description
                      "Check Other config flag";
                  }
                }  // container match-options
              }  // container accept
            }  // list policy
    
            container interface {
              description
                "RA Guard config on Interface";
              uses apply-advanced;
    
              list intf-config {
                key "name";
                description
                  "Interface Configuration";
                uses interface-policy;
              }  // list intf-config
            }  // container interface
    
            container vlans {
              description
                "RA Guard config on Vlan";
              uses apply-advanced;
    
              list vlan-config {
                key "name";
                description
                  "Virtual LAN Configuration";
                uses vlan-policy;
              }  // list vlan-config
            }  // container vlans
          }  // container router-advertisement-guard
        }  // grouping jdhcp-access-security-type
    
        grouping interface-policy {
          description "Interface Name";
          leaf name {
            type union {
              type jt:interface-name;
              type string {
                pattern "<.*>|$.*";
              }
            }
            description "Interface Name";
          }
    
          uses apply-advanced;
    
          container policy {
            description "Attach policy";
            uses apply-advanced;
    
            leaf policy-name {
              type string;
              description
                "Router Advertisement Guard policy name";
            }
    
            choice policy-type {
              leaf stateful {
                type empty;
                description
                  "Stateful router advertisement guard";
              }
              leaf stateless {
                type empty;
                description
                  "Stateless router advertisement guard";
              }
            }  // choice policy-type
          }  // container policy
    
          container mark-interface {
            description "Mark interface";
            uses apply-advanced;
    
            choice mark-intf-type {
              leaf trusted {
                junos:must "(!(".. .. policy"))";
                junos:must-message "Trusted interfaces cannot have policy attached";
                type empty;
                description
                  "Mark interface trusted";
              }
              leaf block {
                junos:must "(!(".. .. policy"))";
                junos:must-message "Blocked interfaces cannot have policy attached";
                type empty;
                description
                  "Block router-advertisement";
              }
            }  // choice mark-intf-type
          }  // container mark-interface
        }  // grouping interface-policy
    
        grouping jdhcp-relay-type {
          description
            "Dynamic Host Configuration Protocol relay configuration";
          uses apply-advanced;
    
          leaf duplicate-clients-on-interface {
            type empty;
            status deprecated;
            description
              "Allow duplicate clients on different interfaces in a subnet";
          }
    
          container duplicate-clients-in-subnet {
            junos:must "(!(".. duplicate-clients-on-interface"))";
            junos:must-message "Cannot specify duplicate-clients-in-subnet with duplicate-clients-on-interface";
            description
              "Allow duplicate clients in a subnet";
            uses jdhcp-duplicate-clients-in-subnet-type;
          }  // container duplicate-clients-in-subnet
    
          container dhcpv6 {
            description "DHCPv6 configuration";
            uses dhcpv6-relay-type;
          }  // container dhcpv6
    
          leaf arp-inspection {
            type empty;
            description
              "Enable Dynamic ARP Inspection";
          }
    
          container forward-snooped-clients {
            junos:must "((!(".. forward-only") && (!(".. forward-only-replies") && !(any ".. group <*> forward-only"))))";
            junos:must-message "forward-only and forward-only-replies cannot be configured when forward-snooped-clients is configured";
            description
              "Forward snooped (unicast) packets";
            choice interface-type {
              leaf configured-interfaces {
                type empty;
                description
                  "Forward snooped (unicast) packets on configured interfaces";
              }
              leaf non-configured-interfaces {
                type empty;
                description
                  "Forward snooped (unicast) packets on non-configured interfaces";
              }
              leaf all-interfaces {
                type empty;
                description
                  "Forward snooped (unicast) packets on configured and non-configured interfaces";
              }
            }  // choice interface-type
          }  // container forward-snooped-clients
    
          container authentication {
            junos:must "(!("forwarding-options helpers bootp"))";
            junos:must-message "'authentication' statement cannot be included along with 'forwarding-options helpers bootp' statement";
            description "DHCP authentication";
            uses authentication-type;
          }  // container authentication
    
          container liveness-detection {
            junos:must "(!("forwarding-options helpers bootp"))";
            junos:must-message "'liveness-detection' statement cannot be included along with 'forwarding-options helpers bootp' statement";
            description
              "DHCP client liveness detection processing";
            uses dhcp-liveness-detection-type;
          }  // container liveness-detection
    
          container dynamic-profile {
            junos:must "(!("forwarding-options helpers bootp"))";
            junos:must-message "'dynamic-profile' statement cannot be included along with 'forwarding-options helpers bootp' statement";
            description "Dynamic profile to use";
            uses dynamic-profile-type;
          }  // container dynamic-profile
    
          leaf service-profile {
            type string {
              length "1 .. 128";
            }
            description
              "Dynamic profile to use for default service activation";
          }
    
          leaf access-profile {
            junos:must "("access profile $$")";
            junos:must-message "Matching access profile must be defined";
            junos:must "(!("forwarding-options helpers bootp"))";
            junos:must-message "'access-profile' statement cannot be included along with 'forwarding-options helpers bootp' statement";
            type string {
              length "1 .. 128";
            }
            description
              "Access profile to use for AAA services";
          }
    
          container short-cycle-protection {
            description
              "Short cycle lockout configuration";
            leaf lockout-min-time {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 86400";
                }
              }
              description
                "Short cycle lockout time in seconds";
            }
    
            leaf lockout-max-time {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 86400";
                }
              }
              description
                "Short cycle lockout time in seconds";
            }
          }  // container short-cycle-protection
    
          container overrides {
            junos:must "(!("forwarding-options helpers bootp"))";
            junos:must-message "'overrides' statement cannot be included along with 'forwarding-options helpers bootp' statement";
            presence "enable overrides";
            description
              "DHCP override processing";
            uses override-type;
          }  // container overrides
    
          container relay-option {
            junos:must "((!(".. relay-option-60") && !(any ".. group <*> relay-option-60")))";
            junos:must-message "Cannot specify relay-option-60 with relay-option";
            presence "enable relay-option";
            description "DHCP option processing";
            uses dhcp-generic-v4-option;
          }  // container relay-option
    
          container server-match {
            description
              "Server match processing";
            uses apply-advanced;
    
            container default-action {
              presence "enable default-action";
              description
                "Server match default action";
              uses server-match-action-choice;
            }  // container default-action
    
            list address {
              key "name";
              ordered-by user;
              description "Server address";
              leaf name {
                type jt:ipv4prefix;
                description
                  "Server address for matching";
              }
    
              uses apply-advanced;
    
              choice server-match-action-choice {
                leaf forward-only {
                  type empty;
                  description
                    "Forward without subscriber services when a match is made";
                }
                leaf create-relay-entry {
                  type empty;
                  description
                    "Create relay entry and allow subscriber services";
                }
              }  // choice server-match-action-choice
            }  // list address
          }  // container server-match
    
          container relay-option-60 {
            junos:must "(!("forwarding-options helpers bootp"))";
            junos:must-message "'relay-option-60' statement cannot be included along with 'forwarding-options helpers bootp' statement";
            junos:must "((!(".. relay-option") && !(any ".. group <*> relay-option")))";
            junos:must-message "Cannot specify relay-option with relay-option-60 ";
            presence "enable relay-option-60";
            status deprecated;
            description
              "DHCP option-60 processing";
            uses relay-option-60-type-top;
          }  // container relay-option-60
    
          container relay-option-82 {
            junos:must "(!("forwarding-options helpers bootp"))";
            junos:must-message "'relay-option-82' statement cannot be included along with 'forwarding-options helpers bootp' statement";
            presence "enable relay-option-82";
            description
              "DHCP option-82 processing";
            uses relay-option-82-type;
          }  // container relay-option-82
    
          container forward-only {
            junos:must "(!("forwarding-options helpers bootp"))";
            junos:must-message "'forward-only' statement cannot be included along with 'forwarding-options helpers bootp' statement";
            presence "enable forward-only";
            description
              "Forward DHCP packets without creating binding";
            uses forward-only-to-rc-type;
          }  // container forward-only
    
          leaf description {
            type string;
            description
              "Text description of servers";
          }
    
          leaf maximum-hop-count {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "1 .. 16";
              }
            }
            description
              "Maximum number of hops per packet";
          }
    
          leaf minimum-wait-time {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "0 .. 30000";
              }
            }
            description
              "Minimum number of seconds before requests are forwarded";
          }
    
          leaf client-response-ttl {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "1 .. 255";
              }
            }
            description
              "IP time-to-live value to set in responses to client";
          }
    
          leaf source-ip-change {
            type empty;
            description
              "Use address of egress interface as source ip";
          }
    
          leaf forward-only-replies {
            type empty;
            description
              "Forward-only replies from server to appropriate logical-system:routing-instance based on options";
          }
    
          container server-group {
            junos:must "(!("forwarding-options helpers bootp"))";
            junos:must-message "'server-group' statement cannot be included along with 'forwarding-options helpers bootp' statement";
            description
              "Define a DHCP server group";
            uses server-group-type;
          }  // container server-group
    
          container active-server-group {
            description
              "Name of DHCP server group";
            uses dhcpv4-gbl-active-sg-type;
          }  // container active-server-group
    
          container route-suppression {
            junos:must "(!(".. liveness-detection method layer2-liveness-detection"))";
            junos:must-message "Cannot specify route-suppression with liveness-detection method layer2-liveness-detection";
            junos:must "(!(".. overrides no-arp"))";
            junos:must-message "Cannot specify route-suppression with overrides no-arp";
            description
              "Suppress access-internal and/or destination route addition";
            uses dhcp-route-suppression-type;
          }  // container route-suppression
    
          list group {
            junos:must "(!("forwarding-options helpers bootp"))";
            junos:must-message "'group' statement cannot be included along with 'forwarding-options helpers bootp' statement";
            key "name";
            ordered-by user;
            description "Define a DHCP group";
            uses dhcp-group;
          }  // list group
    
          list dual-stack-group {
            key "name";
            description
              "Define a DHCP dual stack group";
            uses dhcp-dual-stack-group;
          }  // list dual-stack-group
    
          leaf no-snoop {
            junos:must "(!("legacy-snooping"))";
            junos:must-message "'no-snoop' statement cannot be included along with 'legacy-snooping' statement";
            type empty;
            description
              "Do not snoop DHCP packets";
          }
    
          leaf server-response-time {
            type union {
              type uint32;
              type string {
                pattern "<.*>|$.*";
              }
            }
            default "0";
            description
              "Number of seconds in a period of activity between the last server response and an unaswered request";
          }
    
          container lease-time-validation {
            presence
              "enable lease-time-validation";
            description
              "Configure lease time violation validation";
            uses apply-advanced;
    
            leaf lease-time-threshold {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "60 .. 2147483647";
                }
              }
              units "seconds";
              description
                "Threshold for lease time violation in seconds";
            }
    
            container violation-action {
              description
                "Lease time validation violation action";
              leaf drop {
                type empty;
                description
                  "Drop dhcpv4 offer and ack packets";
              }
            }  // container violation-action
          }  // container lease-time-validation
    
          container leasequery {
            junos:must "(".. overrides always-write-option-82")";
            junos:must-message "Must configure [overrides always-write-option-82] to overwrite circuit-id";
            junos:must "((".. relay-option-82 circuit-id" && (!(".. relay-option-82 circuit-id use-interface-description") && !(".. relay-option-82 circuit-id require-interface-description"))))";
            junos:must-message "Must configure [relay-option-82 circuit-id] without description to insert circuit-id";
            presence "enable leasequery";
            description
              "DHCP leasequery configuration";
            uses relay-leasequery-type;
          }  // container leasequery
    
          container bulk-leasequery {
            presence "enable bulk-leasequery";
            description
              "DHCP bulk leasequery configuration";
            uses relay-bulk-leasequery-v4-type;
          }  // container bulk-leasequery
    
          container active-leasequery {
            junos:must "(".. bulk-leasequery")";
            junos:must-message "Must configure bulk-leasequery";
            presence "enable active-leasequery";
            description
              "DHCPv4 active leasequery configuration";
            uses relay-active-leasequery-v4-type;
          }  // container active-leasequery
    
          container remote-id-mismatch {
            presence "enable remote-id-mismatch";
            description
              "DHCP client remote-id mismatch";
            uses dhcp-remote-id-mismatch-type;
          }  // container remote-id-mismatch
        }  // grouping jdhcp-relay-type
    
        grouping authentication-type {
          description "DHCP authentication";
          uses apply-advanced;
    
          leaf password {
            type string {
              length "1 .. 64";
            }
            description
              "Username password to use";
          }
    
          container username-include {
            description "Add username options";
            uses apply-advanced;
    
            leaf delimiter {
              type string {
                length "1";
              }
              description
                "Change delimiter/separator character";
            }
    
            leaf domain-name {
              type string {
                length "1 .. 64";
              }
              description "Add domain name";
            }
    
            leaf user-prefix {
              type string {
                length "1 .. 64";
              }
              description
                "Add user defined prefix";
            }
    
            leaf mac-address {
              type empty;
              description "Include MAC address";
            }
    
            container option-82 {
              presence "enable option-82";
              description "Include option 82";
              leaf circuit-id {
                type empty;
                description
                  "Include option 82 circuit-id (sub option 1)";
              }
    
              leaf remote-id {
                type empty;
                description
                  "Include option 82 remote-id (sub option 2)";
              }
            }  // container option-82
    
            leaf logical-system-name {
              type empty;
              description
                "Include logical system name";
            }
    
            leaf routing-instance-name {
              type empty;
              description
                "Include routing instance name";
            }
    
            container client-id {
              presence "enable client-id";
              description "Include client ID";
              leaf exclude-headers {
                type empty;
                description
                  "Exclude all the headers";
              }
    
              leaf use-automatic-ascii-hex-encoding {
                type empty;
                description
                  "Use automatic ascii hex username encoding";
              }
            }  // container client-id
    
            leaf option-60 {
              type empty;
              description "Include option 60";
            }
    
            leaf circuit-type {
              type empty;
              description "Include circuit type";
            }
    
            leaf interface-name {
              type empty;
              description
                "Include interface name";
            }
    
            leaf interface-description {
              type enumeration {
                enum "device" {
                  value 0;
                  description
                    "Add the device interface description";
                }
                enum "logical" {
                  value 1;
                  description
                    "Add the logical interface description";
                }
              }
              description
                "Include interface description";
            }
    
            leaf vlan-tags {
              type empty;
              description
                "Include the vlan tag(s)";
            }
          }  // container username-include
        }  // grouping authentication-type
    
        grouping dhcp-dual-stack-group {
          description "DHCP dual stack groups";
          leaf name {
            type string {
              junos:posix-pattern "^[A-Za-z0-9][_0-9A-Za-z-]*$";
              junos:pattern-message "Must be a non-reserved string of 64 characters or less";
              length "1 .. 64";
            }
            description "Dual stack group name";
          }
    
          uses apply-advanced;
    
          container authentication {
            description "DHCP authentication";
            uses dual-stack-authentication-type;
          }  // container authentication
    
          leaf service-profile {
            type string {
              length "1 .. 128";
            }
            description
              "Dynamic profile to use for default service activation";
          }
    
          leaf access-profile {
            type string {
              length "1 .. 128";
            }
            description
              "Access profile to be used for jdhcpd";
          }
    
          container dynamic-profile {
            description "Dynamic profile to use";
            uses dynamic-profile-type;
          }  // container dynamic-profile
    
          container liveness-detection {
            description
              "DHCP client liveness detection processing";
            uses dhcp-liveness-detection-dualstack-type;
          }  // container liveness-detection
    
          container relay-agent-interface-id {
            presence
              "enable relay-agent-interface-id";
            description
              "Interface-id option processing";
            uses v6-relay-option-interface-id-type;
          }  // container relay-agent-interface-id
    
          container relay-agent-remote-id {
            presence
              "enable relay-agent-remote-id";
            description
              "Remote-id option processing";
            uses v6-relay-option-remote-id-type;
          }  // container relay-agent-remote-id
    
          container classification-key {
            junos:must "(".. dynamic-profile")";
            junos:must-message "dynamic profile configuration in dual-stack-group is must for configuring classification-type";
            description
              "Classification key for identifying dual stack household";
            uses classification-types;
          }  // container classification-key
    
          container protocol-master {
            description
              "Select family as protocol master";
            uses jdhcp-dual-stack-protocol-mstr-type;
          }  // container protocol-master
    
          container short-cycle-protection {
            description
              "Short cycle lockout configuration";
            leaf lockout-min-time {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 86400";
                }
              }
              description
                "Short cycle lockout time in seconds";
            }
    
            leaf lockout-max-time {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 86400";
                }
              }
              description
                "Short cycle lockout time in seconds";
            }
          }  // container short-cycle-protection
        }  // grouping dhcp-dual-stack-group
    
        grouping classification-types {
          description
            "Different mechanisms to identify a single household";
          uses apply-advanced;
    
          leaf mac-address {
            type empty;
            description "MAC address of client";
          }
    
          leaf circuit-id {
            type empty;
            description "Circuit-id as key";
          }
    
          leaf remote-id {
            type empty;
            description "Remote-id as key";
          }
        }  // grouping classification-types
    
        grouping dhcp-generic-v4-option {
          description
            "Generic DHCP options processing";
          uses apply-advanced;
    
          leaf option-number {
            type enumeration {
              enum "60" {
                value 0;
                status deprecated;
                description "Option 60";
              }
              enum "77" {
                value 1;
                status deprecated;
                description "Option 77";
              }
            }
            status deprecated;
            description "Option number";
          }
    
          container equals {
            status deprecated;
            description "Generic option equals";
            uses relay-v4-option-ascii-hex;
          }  // container equals
    
          container default-action {
            status deprecated;
            description
              "Generic option default action";
            uses dhcp-v4-option-default-action;
          }  // container default-action
    
          container starts-with {
            status deprecated;
            description
              "Generic option starts with";
            uses relay-v4-option-ascii-hex;
          }  // container starts-with
    
          container option-60 {
            junos:must "(!("option-number"))";
            junos:must-message "Cannot specify option-60  with option-number";
            presence "enable option-60";
            description
              "Add option 60 processing";
            uses dhcp-generic-v4-option-type;
          }  // container option-60
    
          container option-77 {
            junos:must "(!("option-number"))";
            junos:must-message "Cannot specify option-77  with option-number";
            presence "enable option-77";
            description
              "Add option 77 processing";
            uses dhcp-generic-v4-option-type;
          }  // container option-77
    
          list option-order {
            junos:must "(!("option-number"))";
            junos:must-message "Cannot specify option-order  with option-number";
            key "name";
            ordered-by user;
            description
              "Options precedence order";
            leaf name {
              type enumeration {
                enum "60" {
                  value 0;
                  description "Option 60";
                }
                enum "77" {
                  value 1;
                  description "Option 77";
                }
              }
              description "Option number";
            }
    
            uses apply-advanced;
          }  // list option-order
        }  // grouping dhcp-generic-v4-option
    
        grouping dhcp-generic-v4-option-type {
          uses apply-advanced;
    
          container equals {
            description "Generic option equals";
            uses relay-v4-option-ascii-hex;
          }  // container equals
    
          container default-action {
            description
              "Generic option default action";
            uses dhcp-v4-option-default-action;
          }  // container default-action
    
          container starts-with {
            description
              "Generic option starts with";
            uses relay-v4-option-ascii-hex;
          }  // container starts-with
        }  // grouping dhcp-generic-v4-option-type
    
        grouping dhcp-group {
          description "DHCP groups";
          leaf name {
            type string {
              junos:posix-pattern "^[A-Za-z0-9][_0-9A-Za-z-]*$";
              junos:pattern-message "Must be a non-reserved string of 64 characters or less";
              length "1 .. 64";
            }
            description "Group name";
          }
    
          uses apply-advanced;
    
          container active-server-group {
            description
              "Name of DHCP server group";
            uses dhcpv4-gp-active-sg-type;
          }  // container active-server-group
    
          container authentication {
            description "DHCP authentication";
            uses authentication-type;
          }  // container authentication
    
          container liveness-detection {
            description
              "DHCP client liveness detection processing";
            uses dhcp-liveness-detection-type;
          }  // container liveness-detection
    
          container dynamic-profile {
            description "Dynamic profile to use";
            uses dynamic-profile-type;
          }  // container dynamic-profile
    
          leaf service-profile {
            type string {
              length "1 .. 128";
            }
            description
              "Dynamic profile to use for default service activation";
          }
    
          leaf access-profile {
            junos:must "("access profile $$")";
            junos:must-message "Matching access profile must be defined";
            type string {
              length "1 .. 128";
            }
            description
              "Access profile to use for AAA services";
          }
    
          container overrides {
            presence "enable overrides";
            description
              "DHCP override processing";
            uses override-type;
          }  // container overrides
    
          container short-cycle-protection {
            description
              "Short cycle lockout configuration";
            leaf lockout-min-time {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 86400";
                }
              }
              description
                "Short cycle lockout time in seconds";
            }
    
            leaf lockout-max-time {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 86400";
                }
              }
              description
                "Short cycle lockout time in seconds";
            }
          }  // container short-cycle-protection
    
          container server-match {
            description
              "Server match processing";
            uses apply-advanced;
    
            container default-action {
              presence "enable default-action";
              description
                "Server match default action";
              uses server-match-action-choice;
            }  // container default-action
    
            list address {
              key "name";
              ordered-by user;
              description "Server address";
              leaf name {
                type jt:ipv4prefix;
                description
                  "Server address for matching";
              }
    
              uses apply-advanced;
    
              choice server-match-action-choice {
                leaf forward-only {
                  type empty;
                  description
                    "Forward without subscriber services when a match is made";
                }
                leaf create-relay-entry {
                  type empty;
                  description
                    "Create relay entry and allow subscriber services";
                }
              }  // choice server-match-action-choice
            }  // list address
          }  // container server-match
    
          container relay-option {
            junos:must "((!(".. relay-option-60") && !(".. .. relay-option-60")))";
            junos:must-message "Cannot specify relay-option-60 with relay-option";
            presence "enable relay-option";
            description "DHCP option processing";
            uses dhcp-generic-v4-option;
          }  // container relay-option
    
          container relay-option-60 {
            junos:must "((!(".. relay-option") && !(".. .. relay-option")))";
            junos:must-message "Cannot specify relay-option with relay-option-60";
            presence "enable relay-option-60";
            status deprecated;
            description
              "DHCP option-60 processing";
            uses relay-option-60-type-group;
          }  // container relay-option-60
    
          container relay-option-82 {
            presence "enable relay-option-82";
            description
              "DHCP option-82 processing";
            uses relay-option-82-type;
          }  // container relay-option-82
    
          container forward-only {
            presence "enable forward-only";
            description
              "Forward DHCP packets without creating binding";
            uses forward-only-to-rc-type;
          }  // container forward-only
    
          container route-suppression {
            junos:must "(!(".. liveness-detection method layer2-liveness-detection"))";
            junos:must-message "Cannot specify route-suppression with liveness-detection method layer2-liveness-detection";
            junos:must "((!(".. overrides no-arp") && !(".. .. overrides no-arp")))";
            junos:must-message "Cannot specify route-suppression with overrides no-arp";
            description
              "Suppress access-internal and/or destination route addition";
            uses dhcp-route-suppression-type;
          }  // container route-suppression
    
          leaf description {
            type string;
            description
              "Text description of servers";
          }
    
          leaf maximum-hop-count {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "1 .. 16";
              }
            }
            description
              "Maximum number of hops per packet";
          }
    
          leaf minimum-wait-time {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "0 .. 30000";
              }
            }
            description
              "Minimum number of seconds before requests are forwarded";
          }
    
          leaf client-response-ttl {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "1 .. 255";
              }
            }
            description
              "IP time-to-live value to set in responses to client";
          }
    
          leaf source-ip-change {
            type empty;
            description
              "Use address of egress interface as source ip";
          }
    
          list interface {
            key "name";
            description "One or more interfaces";
            leaf name {
              type union {
                type jt:interface-name;
                type string {
                  pattern "<.*>|$.*";
                }
              }
              description "Interface name";
            }
    
            uses apply-advanced;
    
            leaf upto {
              type union {
                type jt:interface-name;
                type string {
                  pattern "<.*>|$.*";
                }
              }
              description "Interface up to";
            }
    
            leaf exclude {
              type empty;
              description
                "Exclude this interface range";
            }
    
            container overrides {
              junos:must "(!(".. exclude"))";
              junos:must-message "Cannot specify overrides with exclude";
              description
                "DHCP override processing";
              uses override-type;
            }  // container overrides
    
            container dynamic-profile {
              junos:must "(!(".. exclude"))";
              junos:must-message "Cannot specify overrides with exclude";
              description
                "Dynamic profile to use";
              uses dynamic-profile-type;
            }  // container dynamic-profile
    
            leaf service-profile {
              type string {
                length "1 .. 128";
              }
              description
                "Dynamic profile to use for default service activation";
            }
    
            leaf access-profile {
              junos:must "("access profile $$")";
              junos:must-message "Matching access profile must be defined";
              junos:must "(!(".. exclude"))";
              junos:must-message "Cannot specify overrides with exclude";
              type string {
                length "1 .. 128";
              }
              description
                "Access profile to use for AAA services";
            }
    
            container short-cycle-protection {
              description
                "Short cycle lockout configuration";
              leaf lockout-min-time {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 86400";
                  }
                }
                description
                  "Short cycle lockout time in seconds";
              }
    
              leaf lockout-max-time {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 86400";
                  }
                }
                description
                  "Short cycle lockout time in seconds";
              }
            }  // container short-cycle-protection
          }  // list interface
    
          container remote-id-mismatch {
            presence "enable remote-id-mismatch";
            description
              "DHCP client remote-id mismatch";
            uses dhcp-remote-id-mismatch-type;
          }  // container remote-id-mismatch
    
          container lease-time-validation {
            presence
              "enable lease-time-validation";
            description
              "Configure lease time violation validation";
            uses apply-advanced;
    
            leaf lease-time-threshold {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "60 .. 2147483647";
                }
              }
              units "seconds";
              description
                "Threshold for lease time violation in seconds";
            }
    
            container violation-action {
              description
                "Lease time validation violation action";
              leaf drop {
                type empty;
                description
                  "Drop dhcpv4 offer and ack packets";
              }
            }  // container violation-action
          }  // container lease-time-validation
        }  // grouping dhcp-group
    
        grouping dhcp-liveness-detection-dualstack-type {
          description
            "DHCP client liveness detection processing";
          uses apply-advanced;
    
          container failure-action {
            description
              "Liveness detection failure action options";
            uses dhcp-liveness-detection-failure-action-type;
          }  // container failure-action
    
          container method {
            description
              "Liveness detection method options";
            uses apply-advanced;
    
            choice method-choice {
              container layer2-liveness-detection {
                junos:must "((!(".. .. route-suppression") && (!(".. .. .. route-suppression") && !(".. .. .. .. route-suppression"))))";
                junos:must-message "Method not allowed with route-suppression enabled";
                description
                  "Address resolution options";
                uses dhcp-arp-nud-liveness-detection-type;
              }  // container layer2-liveness-detection
            }  // choice method-choice
          }  // container method
        }  // grouping dhcp-liveness-detection-dualstack-type
    
        grouping dhcp-arp-nud-liveness-detection-type {
          description
            "Address Resolution detection options";
          uses apply-advanced;
    
          leaf transmit-interval {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "300 .. 1800";
              }
            }
            units "seconds";
            default "300";
            description
              "Transmit interval for address resolution";
          }
    
          leaf max-consecutive-retries {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "3 .. 6";
              }
            }
            default "3";
            description "Retry attempts";
          }
        }  // grouping dhcp-arp-nud-liveness-detection-type
    
        grouping dhcp-liveness-detection-failure-action-type {
          description
            "Liveness detection failure action options";
          uses apply-advanced;
    
          choice failure-action-type {
            leaf clear-binding {
              type empty;
              description
                "Clear the client binding";
            }
            leaf clear-binding-if-interface-up {
              type empty;
              description
                "Clear the client binding only if the incoming interface is up";
            }
            leaf log-only {
              type empty;
              description
                "Maintain the client binding and log the failure event";
            }
          }  // choice failure-action-type
        }  // grouping dhcp-liveness-detection-failure-action-type
    
        grouping dhcp-liveness-detection-type {
          description
            "DHCP client liveness detection processing";
          uses apply-advanced;
    
          container failure-action {
            description
              "Liveness detection failure action options";
            uses dhcp-liveness-detection-failure-action-type;
          }  // container failure-action
    
          container method {
            description
              "Liveness detection method options";
            uses apply-advanced;
    
            choice method-choice {
              container bfd {
                description
                  "Bidirectional Forwarding Detection (BFD) options";
                uses dhcp-bfd-liveness-detection-type;
              }  // container bfd
              container layer2-liveness-detection {
                junos:must "((!(".. .. route-suppression") && (!(".. .. .. route-suppression") && !(".. .. .. .. route-suppression"))))";
                junos:must-message "Method not allowed with route-suppression enabled";
                description
                  "Address resolution options";
                uses dhcp-arp-nud-liveness-detection-type;
              }  // container layer2-liveness-detection
            }  // choice method-choice
          }  // container method
        }  // grouping dhcp-liveness-detection-type
    
        grouping dhcp-bfd-liveness-detection-type {
          description
            "Bidirectional Forwarding Detection (BFD) options";
          uses apply-advanced;
    
          leaf version {
            type enumeration {
              enum "0" {
                value 0;
                description
                  "BFD version 0 (deprecated)";
              }
              enum "1" {
                value 1;
                description "BFD version 1";
              }
              enum "automatic" {
                value 2;
                description
                  "Choose BFD version automatically";
              }
            }
            default "automatic";
            description
              "BFD protocol version number";
          }
    
          leaf minimum-interval {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "30000 .. 255000";
              }
            }
            units "milliseconds";
            description
              "Minimum transmit and receive interval";
          }
    
          leaf minimum-transmit-interval {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "30000 .. 255000";
              }
            }
            units "milliseconds";
            status deprecated;
            description
              "Minimum transmit interval";
          }
    
          leaf minimum-receive-interval {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "30000 .. 255000";
              }
            }
            units "milliseconds";
            description
              "Minimum receive interval";
          }
    
          leaf multiplier {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "1 .. 255";
              }
            }
            default "3";
            description
              "Detection time multiplier";
          }
    
          choice adaptation-choice {
            leaf no-adaptation {
              type empty;
              description "Disable adaptation";
            }
          }  // choice adaptation-choice
    
          container transmit-interval {
            description
              "Transmit-interval options";
            uses apply-advanced;
    
            leaf minimum-interval {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "30000 .. 255000";
                }
              }
              units "milliseconds";
              description
                "Minimum transmit interval";
            }
    
            leaf threshold {
              type union {
                type uint32;
                type string {
                  pattern "<.*>|$.*";
                }
              }
              units "milliseconds";
              description
                "High transmit interval triggering a trap";
            }
          }  // container transmit-interval
    
          container detection-time {
            description "Detection-time options";
            uses apply-advanced;
    
            leaf threshold {
              type union {
                type uint32;
                type string {
                  pattern "<.*>|$.*";
                }
              }
              units "milliseconds";
              description
                "High detection-time triggering a trap";
            }
          }  // container detection-time
    
          leaf session-mode {
            type enumeration {
              enum "automatic" {
                value 0;
                description
                  "Choose session-mode automatically";
              }
              enum "single-hop" {
                value 1;
                description "Use single-hop";
              }
              enum "multihop" {
                value 2;
                description "Use multihop";
              }
            }
            default "automatic";
            description
              "BFD single-hop or multihop session-mode";
          }
    
          leaf holddown-interval {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "0 .. 255000";
              }
            }
            units "milliseconds";
            default "0";
            description
              "Time to hold the session-UP notification to the client";
          }
        }  // grouping dhcp-bfd-liveness-detection-type
    
        grouping dhcp-remote-id-mismatch-type {
          description
            "DHCP client remote-id-mismatch processing";
          uses apply-advanced;
    
          leaf disconnect {
            type empty;
            description
              "Disconnect session on remote-id mismatch";
          }
        }  // grouping dhcp-remote-id-mismatch-type
    
        grouping dhcp-route-suppression-type {
          uses apply-advanced;
    
          choice dhcp-route-suppression-choice {
            leaf access-internal {
              type empty;
              description
                "Suppress access-internal and destination route addition";
            }
            leaf destination {
              type empty;
              description
                "Suppress destination route addition";
            }
          }  // choice dhcp-route-suppression-choice
        }  // grouping dhcp-route-suppression-type
    
        grouping dhcp-v4-option-default-action {
          description "Default action";
          uses apply-advanced;
    
          choice server-group-choice {
            leaf relay-server-group {
              junos:must "((".. .. .. .. .. .. server-group $$" || (".. .. .. .. .. server-group $$" || (".. .. .. .. server-group $$" || ".. .. .. server-group $$"))))";
              junos:must-message "Referenced group must be defined under [edit forwarding dhcp-relay server-group]";
              type string {
                length "1 .. 64";
              }
              description
                "Name of DHCP relay server group when match is made";
            }
            leaf local-server-group {
              junos:must "((".. .. .. .. .. .. .. .. system services dhcp-local-server group $$" || (".. .. .. .. .. .. .. system services dhcp-local-server group $$" || (".. .. .. .. .. .. system services dhcp-local-server group $$" || ".. .. .. .. .. system services dhcp-local-server group $$"))))";
              junos:must-message "Referenced group must be defined under [edit system services dhcp-local-server group]";
              type string {
                length "1 .. 64";
              }
              description
                "Name of DHCP local server group when match is made";
            }
            leaf drop {
              type empty;
              description
                "Discard when a match is made";
            }
            leaf forward-only {
              type empty;
              description
                "Forward without subscriber services when a match is made";
            }
          }  // choice server-group-choice
        }  // grouping dhcp-v4-option-default-action
    
        grouping dhcpv4-gbl-active-sg-type {
          leaf active-server-group {
            junos:must "(".. .. server-group $$")";
            junos:must-message "Referenced group must be defined under [edit forwarding-options dhcp-relay server-group]";
            type string {
              length "1 .. 64";
            }
            description
              "Name of DHCP server group";
          }
    
          leaf allow-server-change {
            type empty;
            description
              "Accept DHCP-ACK from any server in this group";
          }
        }  // grouping dhcpv4-gbl-active-sg-type
    
        grouping dhcpv4-gp-active-sg-type {
          leaf active-server-group {
            junos:must "(".. .. .. server-group $$")";
            junos:must-message "Referenced group must be defined under [edit forwarding-options dhcp-relay server-group]";
            type string {
              length "1 .. 64";
            }
            description
              "Name of DHCP server group";
          }
    
          leaf allow-server-change {
            type empty;
            description
              "Accept DHCP-ACK from any server in this group";
          }
        }  // grouping dhcpv4-gp-active-sg-type
    
        grouping dhcpv6-relay-type {
          description
            "DHCPv6 relay configuration";
          uses apply-advanced;
    
          container authentication {
            description "DHCPv6 authentication";
            uses dhcpv6-authentication-type;
          }  // container authentication
    
          container liveness-detection {
            description
              "DHCPv6 client liveness detection processing";
            uses dhcpv6-liveness-detection-type;
          }  // container liveness-detection
    
          container dynamic-profile {
            description "Dynamic profile to use";
            uses dynamic-profile-type;
          }  // container dynamic-profile
    
          leaf service-profile {
            type string {
              length "1 .. 128";
            }
            description
              "Dynamic profile to use for default service activation";
          }
    
          leaf access-profile {
            junos:must "("access profile $$")";
            junos:must-message "Matching access profile must be defined";
            type string {
              length "1 .. 128";
            }
            description
              "Access profile to use for AAA services";
          }
    
          container short-cycle-protection {
            description
              "Short cycle lockout configuration";
            leaf lockout-min-time {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 86400";
                }
              }
              description
                "Short cycle lockout time in seconds";
            }
    
            leaf lockout-max-time {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 86400";
                }
              }
              description
                "Short cycle lockout time in seconds";
            }
          }  // container short-cycle-protection
    
          container overrides {
            presence "enable overrides";
            description
              "DHCPv6 override processing";
            uses dhcpv6-override-relay-type;
          }  // container overrides
    
          container relay-option {
            presence "enable relay-option";
            description
              "DHCPv6 option processing";
            uses dhcp-generic-v6-option;
          }  // container relay-option
    
          leaf exclude-relay-agent-identifier {
            type empty;
            description
              "Exclude relay agent identifier from packets to server";
          }
    
          container server-match {
            description
              "Server match processing";
            uses apply-advanced;
    
            container default-action {
              description
                "Server match default action";
              uses server-match-action-choice;
            }  // container default-action
    
            container duid {
              description
                "Match duid processing";
              uses apply-advanced;
    
              container equals {
                description "Duid equals";
                uses server-match-v6-ascii-hex;
              }  // container equals
    
              container starts-with {
                description "Duid starts with";
                uses server-match-v6-ascii-hex;
              }  // container starts-with
            }  // container duid
    
            list address {
              key "name";
              ordered-by user;
              description "Server ipv6 address";
              leaf name {
                type jt:ipv6prefix;
                description
                  "Server ipv6 address for matching";
              }
    
              uses apply-advanced;
    
              choice server-match-action-choice {
                leaf forward-only {
                  type empty;
                  description
                    "Forward without subscriber services when a match is made";
                }
                leaf create-relay-entry {
                  type empty;
                  description
                    "Create relay entry and allow subscriber services";
                }
              }  // choice server-match-action-choice
            }  // list address
          }  // container server-match
    
          leaf relay-agent-option-79 {
            type empty;
            description
              "Add the client MAC address to the Relay Forward header.";
          }
    
          container vendor-specific-information {
            description
              "DHCPv6 option 17 vendor-specific processing";
            uses jdhcp-vendor-specific-type;
          }  // container vendor-specific-information
    
          container forward-only {
            presence "enable forward-only";
            description
              "Forward DHCPv6 packets without creating binding";
            uses forward-only-to-rc-type;
          }  // container forward-only
    
          leaf forward-only-replies {
            type empty;
            description
              "Forward-only replies from server to appropriate logical-system:routing-instance based on options";
          }
    
          container forward-snooped-clients {
            junos:must "((!(".. forward-only") && (!(".. forward-only-replies") && !(any ".. group <*> forward-only"))))";
            junos:must-message "forward-only and forward-only-replies cannot be configured when forward-snooped-clients is configured";
            description
              "Forward snooped (unicast) packets";
            choice interface-type {
              leaf configured-interfaces {
                type empty;
                description
                  "Forward snooped (unicast) packets on configured interfaces";
              }
              leaf non-configured-interfaces {
                type empty;
                description
                  "Forward snooped (unicast) packets on non-configured interfaces";
              }
              leaf all-interfaces {
                type empty;
                description
                  "Forward snooped (unicast) packets on configured and non-configured interfaces";
              }
            }  // choice interface-type
          }  // container forward-snooped-clients
    
          container route-suppression {
            description
              "Suppress access-internal and/or access route addition";
            uses dhcpv6-route-suppression-type;
          }  // container route-suppression
    
          list group {
            key "name";
            ordered-by user;
            description
              "Define a DHCPv6 relay group";
            uses dhcpv6-relay-group;
          }  // list group
    
          container relay-agent-interface-id {
            presence
              "enable relay-agent-interface-id";
            description
              "DHCPv6 interface-id option processing";
            uses v6-relay-option-interface-id-type;
          }  // container relay-agent-interface-id
    
          container relay-agent-remote-id {
            presence
              "enable relay-agent-remote-id";
            description
              "DHCPv6 remote-id option processing";
            uses v6-relay-option-remote-id-type;
          }  // container relay-agent-remote-id
    
          container server-group {
            description
              "Define a DHCPv6 server group";
            uses v6-server-group-type;
          }  // container server-group
    
          container active-server-group {
            description
              "Name of DHCPv6 server group";
            uses dhcpv6-gbl-active-sg-type;
          }  // container active-server-group
    
          leaf server-response-time {
            type union {
              type uint32;
              type string {
                pattern "<.*>|$.*";
              }
            }
            default "0";
            description
              "Number of seconds in a period of activity between the last server response and an unaswered request";
          }
    
          container lease-time-validation {
            presence
              "enable lease-time-validation";
            description
              "Configure lease time violation validation";
            uses apply-advanced;
    
            leaf lease-time-threshold {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "60 .. 2147483647";
                }
              }
              units "seconds";
              description
                "Threshold for lease time violation in seconds";
            }
    
            container violation-action {
              description
                "Lease time validation violation action";
              leaf drop {
                type empty;
                description
                  "Drop dhcpv6 advertise and reply packets";
              }
            }  // container violation-action
          }  // container lease-time-validation
    
          leaf no-snoop {
            junos:must "(!("legacy-snooping"))";
            junos:must-message "'no-snoop' statement cannot be included along with 'legacy-snooping' statement";
            type empty;
            description
              "Do not snoop DHCPV6 packets";
          }
    
          container leasequery {
            junos:must "(".. relay-agent-interface-id")";
            junos:must-message "Must configure [relay-agent-interface-id] to insert interface-id";
            presence "enable leasequery";
            description
              "DHCPv6 leasequery configuration";
            uses relay-leasequery-type;
          }  // container leasequery
    
          container bulk-leasequery {
            junos:must "(".. relay-agent-interface-id")";
            junos:must-message "Must configure [relay-agent-interface-id] to insert interface-id";
            presence "enable bulk-leasequery";
            description
              "DHCPv6 bulk leasequery configuration";
            uses relay-bulk-leasequery-v6-type;
          }  // container bulk-leasequery
    
          container active-leasequery {
            junos:must "(".. bulk-leasequery")";
            junos:must-message "Must configure bulk-leasequery";
            presence "enable active-leasequery";
            description
              "DHCPv6 active leasequery configuration";
            uses relay-active-leasequery-v6-type;
          }  // container active-leasequery
    
          container remote-id-mismatch {
            presence "enable remote-id-mismatch";
            description
              "DHCP client remote-id mismatch";
            uses dhcp-remote-id-mismatch-type;
          }  // container remote-id-mismatch
    
          container duplicate-clients {
            description
              "Allow duplicate clients";
            uses dhcpv6-duplicate-clients-type;
          }  // container duplicate-clients
        }  // grouping dhcpv6-relay-type
    
        grouping dhcp-generic-v6-option {
          description
            "Generic DHCPv6 options processing";
          uses apply-advanced;
    
          leaf option-number {
            type enumeration {
              enum "15" {
                value 0;
                status deprecated;
                description "Option 15";
              }
              enum "16" {
                value 1;
                status deprecated;
                description "Option 16";
              }
            }
            status deprecated;
            description "Option number";
          }
    
          container equals {
            status deprecated;
            description "Generic option equals";
            uses relay-v6-option-ascii-hex;
          }  // container equals
    
          container default-action {
            status deprecated;
            description
              "Generic option default action";
            uses dhcp-v6-option-default-action;
          }  // container default-action
    
          container starts-with {
            status deprecated;
            description
              "Generic option starts with";
            uses relay-v6-option-ascii-hex;
          }  // container starts-with
    
          container option-15 {
            junos:must "(!("option-number"))";
            junos:must-message "Cannot specify option-15  with option-number";
            presence "enable option-15";
            description
              "Add option 15 processing";
            uses dhcp-generic-v6-option-type;
          }  // container option-15
    
          container option-16 {
            junos:must "(!("option-number"))";
            junos:must-message "Cannot specify option-16  with option-number";
            presence "enable option-16";
            description
              "Add option 16 processing";
            uses dhcp-generic-v6-option-type;
          }  // container option-16
    
          list option-order {
            junos:must "(!("option-number"))";
            junos:must-message "Cannot specify option-order  with option-number";
            key "name";
            ordered-by user;
            description
              "Options precedence order";
            leaf name {
              type enumeration {
                enum "15" {
                  value 0;
                  description "Option 15";
                }
                enum "16" {
                  value 1;
                  description "Option 16";
                }
              }
              description "Option number";
            }
    
            uses apply-advanced;
          }  // list option-order
        }  // grouping dhcp-generic-v6-option
    
        grouping dhcp-generic-v6-option-type {
          uses apply-advanced;
    
          container equals {
            description "Generic option equals";
            uses relay-v6-option-ascii-hex;
          }  // container equals
    
          container default-action {
            description
              "Generic option default action";
            uses dhcp-v6-option-default-action;
          }  // container default-action
    
          container starts-with {
            description
              "Generic option starts with";
            uses relay-v6-option-ascii-hex;
          }  // container starts-with
        }  // grouping dhcp-generic-v6-option-type
    
        grouping dhcp-v6-option-default-action {
          description "Default action";
          uses apply-advanced;
    
          choice server-group-choice {
            leaf relay-server-group {
              junos:must "((".. .. .. .. .. .. server-group $$" || (".. .. .. .. .. server-group $$" || (".. .. .. .. server-group $$" || ".. .. .. server-group $$"))))";
              junos:must-message "Referenced group must be defined under [edit forwarding options dhcp-relay dhcpv6 server-group]";
              type string {
                length "1 .. 64";
              }
              description
                "Name of DHCP relay server group when match is made";
            }
            leaf drop {
              type empty;
              description
                "Discard when a match is made";
            }
            leaf forward-only {
              type empty;
              description
                "Forward without subscriber services when a match is made";
            }
          }  // choice server-group-choice
        }  // grouping dhcp-v6-option-default-action
    
        grouping dhcpv6-authentication-type {
          description "DHCPv6 authentication";
          uses apply-advanced;
    
          leaf password {
            type string {
              length "1 .. 64";
            }
            description
              "Username password to use";
          }
    
          container username-include {
            description "Add username options";
            uses apply-advanced;
    
            leaf delimiter {
              type string {
                length "1";
              }
              description
                "Change delimiter/separator character";
            }
    
            leaf domain-name {
              type string {
                length "1 .. 64";
              }
              description "Add domain name";
            }
    
            leaf user-prefix {
              type string {
                length "1 .. 64";
              }
              description
                "Add user defined prefix";
            }
    
            leaf mac-address {
              type empty;
              description "Include MAC address";
            }
    
            container client-id {
              presence "enable client-id";
              description "Include client ID";
              leaf exclude-headers {
                type empty;
                description
                  "Exclude all the headers";
              }
    
              leaf use-automatic-ascii-hex-encoding {
                type empty;
                description
                  "Use automatic ascii hex username encoding";
              }
            }  // container client-id
    
            container relay-agent-remote-id {
              presence
                "enable relay-agent-remote-id";
              description
                "Include the relay agent remote ID";
              uses apply-advanced;
    
              choice relay-agent-remote-id-choice {
                leaf enterprise-id {
                  type empty;
                  status deprecated;
                  description
                    "Only use enterprise-id portion of option-37";
                }
                leaf remote-id {
                  type empty;
                  status deprecated;
                  description
                    "Only use remote-id portion of option-37";
                }
              }  // choice relay-agent-remote-id-choice
            }  // container relay-agent-remote-id
    
            leaf logical-system-name {
              type empty;
              description
                "Include logical system name";
            }
    
            leaf routing-instance-name {
              type empty;
              description
                "Include routing instance name";
            }
    
            leaf relay-agent-subscriber-id {
              type empty;
              description
                "Include the relay agent subscriber ID";
            }
    
            leaf relay-agent-interface-id {
              type empty;
              description
                "Include the relay agent interface ID";
            }
    
            leaf circuit-type {
              type empty;
              description "Include circuit type";
            }
    
            leaf interface-name {
              type empty;
              description
                "Include interface name";
            }
    
            leaf interface-description {
              type enumeration {
                enum "device" {
                  value 0;
                  description
                    "Add the device interface description";
                }
                enum "logical" {
                  value 1;
                  description
                    "Add the logical interface description";
                }
              }
              description
                "Include interface description";
            }
    
            leaf vlan-tags {
              type empty;
              description
                "Include the vlan tag(s)";
            }
          }  // container username-include
        }  // grouping dhcpv6-authentication-type
    
        grouping dhcpv6-duplicate-clients-type {
          description "Allow duplicate clients";
          choice distinguish-with {
            leaf incoming-interface {
              type empty;
              description
                "Allow duplicate clients on different underlying interfaces";
            }
          }  // choice distinguish-with
        }  // grouping dhcpv6-duplicate-clients-type
    
        grouping dhcpv6-gbl-active-sg-type {
          uses apply-advanced;
    
          leaf active-server-group {
            junos:must "(".. .. server-group $$")";
            junos:must-message "Referenced group must be defined under [edit forwarding-options dhcp-relay dhcpv6 server-group]";
            type string {
              length "1 .. 64";
            }
            description
              "Name of DHCPv6 server group";
          }
        }  // grouping dhcpv6-gbl-active-sg-type
    
        grouping dhcpv6-liveness-detection-type {
          description
            "DHCPv6 client liveness detection processing";
          uses apply-advanced;
    
          container failure-action {
            description
              "Liveness detection failure action options";
            uses dhcp-liveness-detection-failure-action-type;
          }  // container failure-action
    
          container method {
            description
              "Liveness detection method options";
            uses apply-advanced;
    
            choice method-choice {
              container bfd {
                description
                  "Bidirectional Forwarding Detection (BFD) options";
                uses dhcp-bfd-liveness-detection-type;
              }  // container bfd
              container layer2-liveness-detection {
                description
                  "Neighbor discovery options";
                uses dhcp-arp-nud-liveness-detection-type;
              }  // container layer2-liveness-detection
            }  // choice method-choice
          }  // container method
        }  // grouping dhcpv6-liveness-detection-type
    
        grouping dhcpv6-override-relay-type {
          description
            "DHCPv6 relay override processing";
          uses apply-advanced;
    
          choice allow-snooped-clients-choice {
            leaf allow-snooped-clients {
              type empty;
              description
                "Allow client creation from snooped PDUs";
            }
            leaf no-allow-snooped-clients {
              type empty;
              description
                "Don't allow client creation from snooped PDUs";
            }
          }  // choice allow-snooped-clients-choice
    
          leaf delay-authentication {
            type empty;
            description
              "Delay subscriber authentication in DHCP protocol processing until request packet";
          }
    
          leaf interface-client-limit {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "1 .. 500000";
              }
            }
            description
              "Limit the number of clients allowed on an interface";
          }
    
          leaf dual-stack {
            type string {
              length "1 .. 64";
            }
            description
              "Dual stack group to use.";
          }
    
          leaf no-bind-on-request {
            type empty;
            description
              "Do not bind if stray DHCPv6 RENEW, REBIND is received";
          }
    
          container client-negotiation-match {
            description
              "Use secondary match criteria for SOLICIT PDU";
            choice match-with {
              leaf incoming-interface {
                type empty;
                description
                  "Use incoming interface";
              }
            }  // choice match-with
          }  // container client-negotiation-match
    
          leaf send-release-on-delete {
            type empty;
            description
              "Always send RELEASE to the server when a binding is deleted";
          }
    
          leaf always-process-option-request-option {
            type empty;
            description
              "Always process option even after address allocation failure";
          }
    
          leaf relay-source {
            type union {
              type jt:interface-name;
              type string {
                pattern "<.*>|$.*";
              }
            }
            description
              "Interface for relay source";
          }
    
          leaf delete-binding-on-renegotiation {
            type empty;
            description
              "Delete binding on renegotiation";
          }
    
          leaf asymmetric-lease-time {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "600 .. 86400";
              }
            }
            units "seconds";
            description
              "Use a reduced lease time for the client. In seconds";
          }
    
          leaf asymmetric-prefix-lease-time {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "600 .. 86400";
              }
            }
            units "seconds";
            description
              "Use a reduced prefix lease time for the client. In seconds";
          }
        }  // grouping dhcpv6-override-relay-type
    
        grouping dhcpv6-relay-group {
          description "DHCPv6 groups";
          leaf name {
            type string {
              junos:posix-pattern "^[A-Za-z0-9][_0-9A-Za-z-]*$";
              junos:pattern-message "Must be a non-reserved string of 64 characters or less";
              length "1 .. 64";
            }
            description "Group name";
          }
    
          uses apply-advanced;
    
          container active-server-group {
            description
              "Name of DHCPv6 server group";
            uses dhcpv6-gp-active-sg-type;
          }  // container active-server-group
    
          list dual-stack-group {
            key "name";
            description
              "Define a DHCP dual stack group";
            uses dhcp-dual-stack-group;
          }  // list dual-stack-group
    
          container authentication {
            description "DHCPv6 authentication";
            uses dhcpv6-authentication-type;
          }  // container authentication
    
          container liveness-detection {
            description
              "DHCPv6 client liveness detection processing";
            uses dhcpv6-liveness-detection-type;
          }  // container liveness-detection
    
          container dynamic-profile {
            description "Dynamic profile to use";
            uses dynamic-profile-type;
          }  // container dynamic-profile
    
          leaf service-profile {
            type string {
              length "1 .. 128";
            }
            description
              "Dynamic profile to use for default service activation";
          }
    
          leaf access-profile {
            junos:must "("access profile $$")";
            junos:must-message "Matching access profile must be defined";
            type string {
              length "1 .. 128";
            }
            description
              "Access profile to use for AAA services";
          }
    
          container short-cycle-protection {
            description
              "Short cycle lockout configuration";
            leaf lockout-min-time {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 86400";
                }
              }
              description
                "Short cycle lockout time in seconds";
            }
    
            leaf lockout-max-time {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "1 .. 86400";
                }
              }
              description
                "Short cycle lockout time in seconds";
            }
          }  // container short-cycle-protection
    
          container overrides {
            presence "enable overrides";
            description
              "DHCPv6 override processing";
            uses dhcpv6-override-relay-type;
          }  // container overrides
    
          container relay-option {
            presence "enable relay-option";
            description
              "DHCPv6 option processing";
            uses dhcp-generic-v6-option;
          }  // container relay-option
    
          container vendor-specific-information {
            description
              "DHCPv6 option 17 vendor-specific processing";
            uses jdhcp-vendor-specific-type;
          }  // container vendor-specific-information
    
          container forward-only {
            presence "enable forward-only";
            description
              "Forward DHCPv6 packets without creating binding";
            uses forward-only-to-rc-type;
          }  // container forward-only
    
          container relay-agent-interface-id {
            presence
              "enable relay-agent-interface-id";
            description
              "DHCPv6 interface-id option processing";
            uses v6-relay-option-interface-id-type;
          }  // container relay-agent-interface-id
    
          container relay-agent-remote-id {
            presence
              "enable relay-agent-remote-id";
            description
              "DHCPv6 remote-id option processing";
            uses v6-relay-option-remote-id-type;
          }  // container relay-agent-remote-id
    
          container route-suppression {
            description
              "Suppress access-internal and/or access route addition";
            uses dhcpv6-route-suppression-type;
          }  // container route-suppression
    
          leaf relay-agent-option-79 {
            type empty;
            description
              "Add the client MAC address to the Relay Forward header.";
          }
    
          list interface {
            key "name";
            description "One or more interfaces";
            leaf name {
              junos:must "((unique "forwarding-options dhcp-relay dhcpv6 group <*> interface $$" && !(any "system services dhcp-local-server dhcpv6 group <*> interface $$")))";
              junos:must-message "Interface used in other relay or server group";
              type union {
                type jt:interface-name;
                type string {
                  pattern "<.*>|$.*";
                }
              }
              description "Interface name";
            }
    
            uses apply-advanced;
    
            leaf upto {
              junos:must "(!(".. .. interface $$"))";
              junos:must-message "Range end point must not equal start";
              type union {
                type jt:interface-name;
                type string {
                  pattern "<.*>|$.*";
                }
              }
              description "Interface up to";
            }
    
            leaf exclude {
              type empty;
              description
                "Exclude this interface range";
            }
    
            leaf trace {
              junos:must "(!(".. exclude"))";
              junos:must-message "Cannot specify tracing with exclude";
              type empty;
              description
                "Enable tracing for this interface";
            }
    
            container overrides {
              junos:must "(!(".. exclude"))";
              junos:must-message "Cannot specify overrides with exclude";
              description
                "DHCPv6 override processing";
              uses dhcpv6-override-relay-type;
            }  // container overrides
    
            container dynamic-profile {
              junos:must "(!(".. exclude"))";
              junos:must-message "Cannot specify dynamic-profile with exclude";
              description
                "Dynamic profile to use";
              uses dynamic-profile-type;
            }  // container dynamic-profile
    
            leaf service-profile {
              type string {
                length "1 .. 128";
              }
              description
                "Dynamic profile to use for default service activation";
            }
    
            leaf access-profile {
              junos:must "("access profile $$")";
              junos:must-message "Matching access profile must be defined";
              junos:must "(!(".. exclude"))";
              junos:must-message "Cannot specify overrides with exclude";
              type string {
                length "1 .. 128";
              }
              description
                "Access profile to use for AAA services";
            }
    
            container short-cycle-protection {
              description
                "Short cycle lockout configuration";
              leaf lockout-min-time {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 86400";
                  }
                }
                description
                  "Short cycle lockout time in seconds";
              }
    
              leaf lockout-max-time {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 86400";
                  }
                }
                description
                  "Short cycle lockout time in seconds";
              }
            }  // container short-cycle-protection
          }  // list interface
    
          container lease-time-validation {
            presence
              "enable lease-time-validation";
            description
              "Configure lease time violation validation";
            uses apply-advanced;
    
            leaf lease-time-threshold {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "60 .. 2147483647";
                }
              }
              units "seconds";
              description
                "Threshold for lease time violation in seconds";
            }
    
            container violation-action {
              description
                "Lease time validation violation action";
              leaf drop {
                type empty;
                description
                  "Drop dhcpv6 advertise and reply packets";
              }
            }  // container violation-action
          }  // container lease-time-validation
    
          container remote-id-mismatch {
            presence "enable remote-id-mismatch";
            description
              "DHCP client remote-id mismatch";
            uses dhcp-remote-id-mismatch-type;
          }  // container remote-id-mismatch
    
          container server-match {
            description
              "Server match processing";
            uses apply-advanced;
    
            container default-action {
              description
                "Server match default action";
              uses server-match-action-choice;
            }  // container default-action
    
            container duid {
              description
                "Match duid processing";
              uses apply-advanced;
    
              container equals {
                description "Duid equals";
                uses server-match-v6-ascii-hex;
              }  // container equals
    
              container starts-with {
                description "Duid starts with";
                uses server-match-v6-ascii-hex;
              }  // container starts-with
            }  // container duid
    
            list address {
              key "name";
              ordered-by user;
              description "Server ipv6 address";
              leaf name {
                type jt:ipv6prefix;
                description
                  "Server ipv6 address for matching";
              }
    
              uses apply-advanced;
    
              choice server-match-action-choice {
                leaf forward-only {
                  type empty;
                  description
                    "Forward without subscriber services when a match is made";
                }
                leaf create-relay-entry {
                  type empty;
                  description
                    "Create relay entry and allow subscriber services";
                }
              }  // choice server-match-action-choice
            }  // list address
          }  // container server-match
        }  // grouping dhcpv6-relay-group
    
        grouping dhcpv6-gp-active-sg-type {
          uses apply-advanced;
    
          leaf active-server-group {
            junos:must "(".. .. .. server-group $$")";
            junos:must-message "Referenced group must be defined under [edit forwarding-options dhcp-relay dhcpv6 server-group]";
            type string {
              length "1 .. 64";
            }
            description
              "Name of DHCPv6 server group";
          }
        }  // grouping dhcpv6-gp-active-sg-type
    
        grouping dhcpv6-route-suppression-type {
          description
            "Suppress access-internal and/or access route addition";
          leaf access {
            type empty;
            description
              "Suppress access route addition";
          }
    
          leaf access-internal {
            type empty;
            description
              "Suppress access-internal route addition";
          }
        }  // grouping dhcpv6-route-suppression-type
    
        grouping dual-stack-authentication-type {
          description
            "DHCP dual stack authentication";
          uses apply-advanced;
    
          leaf password {
            type string {
              length "1 .. 64";
            }
            description
              "Username password to use";
          }
    
          container username-include {
            description "Add username options";
            uses apply-advanced;
    
            leaf delimiter {
              type string {
                length "1";
              }
              description
                "Change delimiter/separator character";
            }
    
            leaf domain-name {
              type string {
                length "1 .. 64";
              }
              description "Add domain name";
            }
    
            leaf user-prefix {
              type string {
                length "1 .. 64";
              }
              description
                "Add user defined prefix";
            }
    
            leaf mac-address {
              type empty;
              description "Include MAC address";
            }
    
            container client-id {
              presence "enable client-id";
              description "Include client ID";
              leaf exclude-headers {
                type empty;
                description
                  "Exclude all the headers";
              }
    
              leaf use-automatic-ascii-hex-encoding {
                type empty;
                description
                  "Use automatic ascii hex username encoding";
              }
            }  // container client-id
    
            leaf relay-agent-remote-id {
              type empty;
              description
                "Include the relay agent remote ID";
            }
    
            leaf logical-system-name {
              type empty;
              description
                "Include logical system name";
            }
    
            leaf routing-instance-name {
              type empty;
              description
                "Include routing instance name";
            }
    
            leaf relay-agent-interface-id {
              type empty;
              description
                "Include the relay agent interface ID";
            }
    
            leaf interface-name {
              type empty;
              description
                "Include interface name";
            }
    
            leaf interface-description {
              type enumeration {
                enum "device" {
                  value 0;
                  description
                    "Add the device interface description";
                }
                enum "logical" {
                  value 1;
                  description
                    "Add the logical interface description";
                }
              }
              description
                "Include interface description";
            }
    
            leaf circuit-type {
              type empty;
              description "Include circuit type";
            }
    
            leaf vlan-tags {
              type empty;
              description
                "Include the vlan tag(s)";
            }
          }  // container username-include
        }  // grouping dual-stack-authentication-type
    
        grouping dynamic-profile-type {
          description "Dynamic profile to use";
          uses apply-advanced;
    
          leaf dynamic-profile {
            junos:must "("dynamic-profiles $$")";
            junos:must-message "Dynamic profile must be defined";
            type string {
              length "1 .. 80";
            }
            description "Dynamic profile to use";
          }
    
          choice dynamic-profile-type-choice {
            leaf use-primary {
              junos:must "("dynamic-profiles $$")";
              junos:must-message "Dynamic profile must be defined";
              type string {
                length "1 .. 80";
              }
              description
                "Dynamic profile to use on the primary interface";
            }
            container aggregate-clients {
              presence
                "enable aggregate-clients";
              description
                "Aggregate client profiles";
              uses apply-advanced;
    
              choice aggregate-type {
                leaf merge {
                  type empty;
                  description
                    "Merge the client dynamic profiles";
                }
                leaf replace {
                  type empty;
                  description
                    "Replace client dynamic profiles";
                }
              }  // choice aggregate-type
            }  // container aggregate-clients
          }  // choice dynamic-profile-type-choice
        }  // grouping dynamic-profile-type
    
        grouping forward-only-to-rc-type {
          description
            "Forward DHCP packets without creating binding";
          uses apply-advanced;
    
          leaf logical-system {
            type string;
            default "current";
          }
    
          leaf routing-instance {
            type string;
            default "current";
          }
        }  // grouping forward-only-to-rc-type
    
        grouping jdhcp-dual-stack-protocol-mstr-type {
          description
            "Select family as protocol master";
          choice addr-fam {
            leaf inet {
              type empty;
              description
                "INET family has protocol master behavior";
            }
            leaf inet6 {
              type empty;
              description
                "INET6 family has protocol master behavior";
            }
          }  // choice addr-fam
        }  // grouping jdhcp-dual-stack-protocol-mstr-type
    
        grouping jdhcp-duplicate-clients-in-subnet-type {
          description
            "Allow duplicate clients in a subnet";
          choice distinguish-with {
            leaf incoming-interface {
              type empty;
              description
                "Allow duplicate clients on different interfaces in a subnet";
            }
            leaf option-82 {
              type empty;
              description
                "Allow duplicate clients using different option-82 options in a subnet";
            }
          }  // choice distinguish-with
        }  // grouping jdhcp-duplicate-clients-in-subnet-type
    
        grouping jdhcp-vendor-specific-type {
          description
            "Add vendor-specific option processing";
          uses apply-advanced;
    
          leaf host-name {
            type empty;
            description "Add router host name";
          }
    
          leaf location {
            type empty;
            description
              "Add location information expressed as interface name format";
          }
        }  // grouping jdhcp-vendor-specific-type
    
        grouping juniper-next-hop-group-options {
          leaf name {
            type string;
            description "Next hop group name";
          }
    
          uses apply-advanced;
    
          leaf group-type {
            type enumeration {
              enum "inet" {
                value 0;
                description
                  "Group of family inet next-hops";
              }
              enum "layer-2" {
                value 1;
                description
                  "Layer-2 next-hop group";
              }
              enum "inet6" {
                value 2;
                description
                  "Group of family inet6 next-hops";
              }
            }
            default "inet";
            description "Next hop group type";
          }
    
          list interface {
            key "name";
            description
              "Interfaces through which to send sampled traffic";
            uses next_hop_group_intf_type;
          }  // list interface
    
          list next-hop-subgroup {
            key "name";
            description
              "Group of interfaces through which to send sampled traffic";
            uses juniper-next-hop-subgroup-options;
          }  // list next-hop-subgroup
        }  // grouping juniper-next-hop-group-options
    
        grouping juniper-next-hop-subgroup-options {
          leaf name {
            junos:must "(".. interface")";
            junos:must-message "At least two interfaces are required for next-hop-subgroup configuration";
            type string;
            description
              "Next-hop sub-group name";
          }
    
          uses apply-advanced;
    
          list interface {
            key "name";
            max-elements 16;
            description
              "Interface through which to send the sampled traffic";
            uses next_hop_subgroup_intf_type;
          }  // list interface
        }  // grouping juniper-next-hop-subgroup-options
    
        grouping juniper-packet-accounting-options {
          leaf name {
            type string;
            description
              "Name for accounting group";
          }
    
          uses apply-advanced;
    
          container output {
            description
              "Accounting data disposition";
            uses packet_accounting_output_type;
          }  // container output
        }  // grouping juniper-packet-accounting-options
    
        grouping juniper-packet-capture-options {
          description "Packet capture options";
          uses apply-advanced;
    
          choice enable-disable {
            leaf disable {
              type empty;
              description
                "Disable packet-capture";
            }
          }  // choice enable-disable
    
          container file {
            description
              "Parameters for file that contains captured packets";
            leaf filename {
              type string {
                junos:posix-pattern "![/ %.]";
                junos:pattern-message "Must not contain '/', '%', '.' or a space";
                length "1 .. 900";
              }
              description "Name of file";
            }
    
            leaf files {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "2 .. 10000";
                }
              }
              default "10";
              description
                "Maximum number of files";
            }
    
            leaf size {
              type string;
              description "Maximum file size";
            }
    
            choice world-readable-choice {
              leaf world-readable {
                type empty;
                description
                  "Allow any user to read packet-capture files";
              }
              leaf no-world-readable {
                type empty;
                description
                  "Don't allow any user to read packet-capture files";
              }
            }  // choice world-readable-choice
          }  // container file
    
          leaf maximum-capture-size {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "68 .. 1520";
              }
            }
            units "bytes";
            default "68";
            description
              "Maximum packet size to capture";
          }
        }  // grouping juniper-packet-capture-options
    
        grouping juniper-port-mirror-options {
          uses apply-advanced;
    
          container traceoptions {
            description
              "Port-mirroring trace options";
            uses sampling_traceoptions_type;
          }  // container traceoptions
    
          leaf disable {
            type empty;
            description
              "Disable the global port-mirroring instance";
          }
    
          leaf disable-all-instances {
            type empty;
            description
              "Disable the all port-mirroring instances";
          }
    
          container input {
            description
              "Settings for sampling of input packets";
            uses pm_family_input_type;
          }  // container input
    
          container family {
            description
              "Address family of packets to mirror";
            container inet {
              description "Mirror IPv4 packets";
              uses apply-advanced;
    
              container input {
                junos:must "(!(".. .. .. input"))";
                junos:must-message "input parameters under family and outside family are mutually exclusive";
                status deprecated;
                description
                  "Settings for sampling of input packets";
                uses pm_family_input_type;
              }  // container input
    
              container output {
                description
                  "One or more next hops for port-mirrored packets";
                uses inet_pm_family_output_type;
              }  // container output
            }  // container inet
    
            container mpls {
              description "Mirror MPLS packets";
              uses apply-advanced;
    
              container input {
                junos:must "(!(".. .. .. input"))";
                junos:must-message "input parameters under family and outside family are mutually exclusive";
                status deprecated;
                description
                  "Settings for sampling of input packets";
                uses pm_family_input_type;
              }  // container input
    
              container output {
                description
                  "One or more next hops for port-mirrored packets";
                uses mpls_pm_family_output_type;
              }  // container output
            }  // container mpls
    
            container any {
              description "Mirror any packets";
              uses apply-advanced;
    
              container output {
                description
                  "One or more next hops for port-mirrored packets";
                uses any_pm_family_output_type;
              }  // container output
            }  // container any
    
            container vpls {
              description
                "Mirror Layer-2 bridged/vpls packets";
              uses apply-advanced;
    
              container input {
                junos:must "(!(".. .. ..  input"))";
                junos:must-message "input parameters under family and outside family are mutually exclusive";
                status deprecated;
                description
                  "Settings for sampling of input packets";
                uses pm_family_input_type;
              }  // container input
    
              container output {
                description
                  "Destination for port-mirrored packets";
                uses layer2_pm_family_output_type;
              }  // container output
            }  // container vpls
    
            container ccc {
              description
                "Mirror layer-2 ccc packets";
              uses apply-advanced;
    
              container input {
                junos:must "(!(".. .. ..  input"))";
                junos:must-message "input parameters under family and outside family are mutually exclusive";
                status deprecated;
                description
                  "Settings for sampling of input packets";
                uses pm_family_input_type;
              }  // container input
    
              container output {
                description
                  "Destination for port-mirrored packets";
                uses layer2_pm_family_output_type;
              }  // container output
            }  // container ccc
          }  // container family
    
          list instance {
            key "name";
            ordered-by user;
            description
              "Instance of port-mirroring parameters";
            leaf name {
              type string {
                junos:posix-pattern "!^((__.*)|(.{65,}))$";
                junos:pattern-message "Must be a non-reserved string of 64 characters or less";
                length "1 .. 63";
              }
              description
                "Name for port-mirroring instance";
            }
    
            uses apply-advanced;
    
            leaf disable {
              type empty;
              description
                "Disable the this port-mirroring instance";
            }
    
            choice input_params_or_instance {
              container input {
                description
                  "Settings for sampling of input packets";
                uses pm_family_input_type;
              }  // container input
              leaf input-parameters-instance {
                junos:must "("forwarding-options port-mirroring instance $$")";
                junos:must-message "Referenced port-mirroring instance does not exist";
                type string;
                description
                  "Name of port-mirroring instance to use for input parameters";
              }
            }  // choice input_params_or_instance
    
            container output {
              description
                "One or more next hops for port-mirrored packets";
              uses inet_pm_output_type;
            }  // container output
    
            container family {
              description
                "Address family of packets to mirror";
              container inet {
                description
                  "Mirror IPv4 packets";
                uses apply-advanced;
    
                container input {
                  junos:must "(!(".. .. .. input"))";
                  junos:must-message "input parameters under family and outside family are mutually exclusive";
                  status deprecated;
                  description
                    "Settings for sampling of input packets";
                  uses pm_family_input_type;
                }  // container input
    
                container output {
                  description
                    "One or more next hops for port-mirrored packets";
                  uses inet_pm_family_output_type;
                }  // container output
              }  // container inet
    
              container mpls {
                description
                  "Mirror MPLS packets";
                uses apply-advanced;
    
                container input {
                  junos:must "(!(".. .. .. input"))";
                  junos:must-message "input parameters under family and outside family are mutually exclusive";
                  status deprecated;
                  description
                    "Settings for sampling of input packets";
                  uses pm_family_input_type;
                }  // container input
    
                container output {
                  description
                    "One or more next hops for port-mirrored packets";
                  uses mpls_pm_family_output_type;
                }  // container output
              }  // container mpls
    
              container any {
                description "Mirror any packets";
                uses apply-advanced;
    
                container output {
                  description
                    "One or more next hops for port-mirrored packets";
                  uses any_pm_family_output_type;
                }  // container output
              }  // container any
    
              container vpls {
                description
                  "Mirror Layer-2 bridged/vpls packets";
                uses apply-advanced;
    
                container input {
                  junos:must "(!(".. .. ..  input"))";
                  junos:must-message "input parameters under family and outside family are mutually exclusive";
                  status deprecated;
                  description
                    "Settings for sampling of input packets";
                  uses pm_family_input_type;
                }  // container input
    
                container output {
                  description
                    "Destination for port-mirrored packets";
                  uses layer2_pm_family_output_type;
                }  // container output
              }  // container vpls
    
              container ccc {
                description
                  "Mirror layer-2 ccc packets";
                uses apply-advanced;
    
                container input {
                  junos:must "(!(".. .. ..  input"))";
                  junos:must-message "input parameters under family and outside family are mutually exclusive";
                  status deprecated;
                  description
                    "Settings for sampling of input packets";
                  uses pm_family_input_type;
                }  // container input
    
                container output {
                  description
                    "Destination for port-mirrored packets";
                  uses layer2_pm_family_output_type;
                }  // container output
              }  // container ccc
            }  // container family
          }  // list instance
        }  // grouping juniper-port-mirror-options
    
        grouping any_pm_family_output_type {
          uses apply-advanced;
    
          choice interface-or-next-hop-index {
            list interface {
              key "name";
              description
                "Interfaces through which to send sampled traffic";
              uses any_pm_intf_type;
            }  // list interface
    
            case case_2 {
            }  // case case_2
          }  // choice interface-or-next-hop-index
    
          container hosted-service {
            description
              "Configure Hosted Service";
            uses apply-advanced;
    
            leaf server-profile {
              junos:must "("services hosted-services server-profile $$")";
              junos:must-message "Only server profiles configured under [services hosted-services server-profile] can be configured here";
              type string {
                length "3 .. 32";
              }
              description "Server profile name";
            }
          }  // container hosted-service
        }  // grouping any_pm_family_output_type
    
        grouping any_pm_intf_type {
          leaf name {
            junos:must "(!(("interfaces $$-IFL family inet" || "interfaces $$-IFL family inet6")))";
            junos:must-message "An interface configured as family inet/inet6 cannot be configured as output interface";
            type union {
              type jt:interface-name;
              type string {
                pattern "<.*>|$.*";
              }
            }
            description
              "Interface through which to send sampled traffic";
          }
    
          uses apply-advanced;
    
          list next-hop {
            key "name";
            ordered-by user;
            description
              "Address of next hop through which to send sampled traffic";
            uses inet_next_hop_type;
          }  // list next-hop
        }  // grouping any_pm_intf_type
    
        grouping inet_next_hop_type {
          description
            "Address of next hop through which to send sampled traffic";
          leaf name {
            type jt:ipv4addr;
          }
    
          uses apply-advanced;
        }  // grouping inet_next_hop_type
    
        grouping inet_pm_family_output_type {
          uses apply-advanced;
    
          choice interface-or-next-hop-index {
            list interface {
              key "name";
              description
                "Interfaces through which to send sampled traffic";
              uses inet_pm_intf_type;
            }  // list interface
    
            case case_2 {
            }  // case case_2
          }  // choice interface-or-next-hop-index
    
          leaf no-filter-check {
            type empty;
            description
              "Do not check for filters on port-mirroring interface";
          }
    
          leaf ip-address {
            type jt:ipv4addr;
            description
              "ERSPAN Destination IP Address";
          }
        }  // grouping inet_pm_family_output_type
    
        grouping inet_pm_intf_type {
          leaf name {
            type union {
              type jt:interface-name;
              type string {
                pattern "<.*>|$.*";
              }
            }
            description
              "Interface through which to send sampled traffic";
          }
    
          uses apply-advanced;
    
          list next-hop {
            key "name";
            ordered-by user;
            description
              "Address of next hop through which to send sampled traffic";
            uses inet_next_hop_type;
          }  // list next-hop
        }  // grouping inet_pm_intf_type
    
        grouping inet_pm_output_type {
          uses apply-advanced;
        }  // grouping inet_pm_output_type
    
        grouping juniper-sampling-options {
          uses apply-advanced;
    
          choice enable-disable {
            leaf disable {
              type empty;
              description
                "Disable global sampling instance";
            }
          }  // choice enable-disable
    
          container traceoptions {
            description
              "Traffic sampling trace options";
            uses sampling_traceoptions_type;
          }  // container traceoptions
    
          container input {
            description
              "Traffic Sampling data acquisition";
            uses sampling_input_type;
          }  // container input
    
          container output {
            junos:must "(!(".. family"))";
            junos:must-message " 'sampling family <*> ' and 'sampling output' are mutually exclusive";
            junos:must "("forwarding-options sampling input")";
            junos:must-message "Sampling input configuration is not specified";
            status deprecated;
            description
              "Traffic sampling data disposition";
            uses sampling_output_type;
          }  // container output
    
          container family {
            description
              "Address family of packets to sample";
            container inet {
              description "Sample IPv4 packets";
              uses apply-advanced;
    
              choice enable-disable {
                leaf disable {
                  type empty;
                  description
                    "Disable sampling family inet";
                }
              }  // choice enable-disable
    
              container input {
                junos:must "(!(".. .. .. input"))";
                junos:must-message "instance <*> 'family <*> input' and 'instance <*> input' are mutually exclusive";
                description
                  "Settings for sampling of input packets";
                uses sampling_family_input_type;
              }  // container input
    
              container output {
                junos:must "((!("forwarding-options sampling input family inet") && (!("forwarding-options sampling input family inet6") && !("forwarding-options sampling input family mpls"))))";
                junos:must-message "output configuration mismatch with old deprecated input configuration";
                junos:must "((".. .. .. input rate" || " .. input rate"))";
                junos:must-message "sampling input rate is not specified";
                junos:must "((".. .. .. input" || ".. input"))";
                junos:must-message "Sampling input configuration is not specified";
                description
                  "Traffic sampling data disposition";
                uses sampling_instance_inet_global_output_type;
              }  // container output
            }  // container inet
    
            container inet6 {
              description "Sample IPv6 packets";
              uses apply-advanced;
    
              choice enable-disable {
                leaf disable {
                  type empty;
                  description
                    "Disable sampling family inet6";
                }
              }  // choice enable-disable
    
              container input {
                junos:must "(!(".. .. .. input"))";
                junos:must-message "instance <*> 'family <*> input' and 'instance <*> input' are mutually exclusive";
                description
                  "Settings for sampling of input packets";
                uses sampling_family_input_type;
              }  // container input
    
              container output {
                junos:must "((!("forwarding-options sampling input family inet") && (!("forwarding-options sampling input family inet6") && !("forwarding-options sampling input family mpls"))))";
                junos:must-message "output configuration mismatch with old deprecated input configuration";
                junos:must "((".. .. .. input" || ".. input"))";
                junos:must-message "Sampling input configuration is not specified";
                description
                  "Traffic sampling data disposition";
                uses sampling_family_inet6_output_type;
              }  // container output
            }  // container inet6
          }  // container family
    
          list instance {
            key "name";
            ordered-by user;
            description
              "Instance of sampling parameters";
            leaf name {
              junos:must "(!("forwarding-options port-mirroring instance $$"))";
              junos:must-message "Instance $$ is also defined under port-mirroring hierarchy";
              type string;
              description
                "Name for sampling instance";
            }
    
            uses apply-advanced;
    
            choice enable-disable {
              leaf disable {
                type empty;
                description
                  "Disable sampling instance";
              }
            }  // choice enable-disable
    
            container input {
              description
                "Traffic Sampling data acquisition";
              uses sampling_instance_input_type;
            }  // container input
    
            container family {
              description
                "Address family of packets to sample";
              container inet {
                description
                  "Sample IPv4 packets";
                uses apply-advanced;
    
                choice enable-disable {
                  leaf disable {
                    type empty;
                    status deprecated;
                    description
                      "Disable instance family inet";
                  }
                }  // choice enable-disable
    
                container input {
                  junos:must "(!(".. .. .. input"))";
                  junos:must-message "instance <*> 'family <*> input' and 'instance <*> input' are mutually exclusive";
                  description
                    "Settings for sampling of input packets";
                  uses sampling_family_input_type;
                }  // container input
    
                container output {
                  junos:must "((!("forwarding-options sampling input family inet") && (!("forwarding-options sampling input family inet6") && !("forwarding-options sampling input family mpls"))))";
                  junos:must-message "output configuration mismatch with old deprecated input configuration";
                  junos:must "((".. .. .. input" || ".. input"))";
                  junos:must-message "Sampling input configuration is not specified";
                  description
                    "Traffic sampling data disposition";
                  uses sampling_instance_inet_output_type;
                }  // container output
              }  // container inet
    
              container inet6 {
                description
                  "Sample IPv6 packets";
                uses apply-advanced;
    
                choice enable-disable {
                  leaf disable {
                    type empty;
                    status deprecated;
                    description
                      "Disable instance family inet6";
                  }
                }  // choice enable-disable
    
                container input {
                  junos:must "(!(".. .. .. input"))";
                  junos:must-message "instance <*> 'family <*> input' and 'instance <*> input' are mutually exclusive";
                  description
                    "Settings for sampling of input packets";
                  uses sampling_family_input_type;
                }  // container input
    
                container output {
                  junos:must "((!("forwarding-options sampling input family inet") && (!("forwarding-options sampling input family inet6") && !("forwarding-options sampling input family mpls"))))";
                  junos:must-message "output configuration mismatch with old deprecated input configuration";
                  junos:must "((".. .. .. input" || ".. input"))";
                  junos:must-message "Sampling input configuration is not specified";
                  description
                    "Traffic sampling data disposition";
                  uses sampling_instance_inet6_output_type;
                }  // container output
              }  // container inet6
    
              container mpls {
                description
                  "Sample mpls packets";
                uses apply-advanced;
    
                choice enable-disable {
                  leaf disable {
                    type empty;
                    status deprecated;
                    description
                      "Disable instance family mpls";
                  }
                }  // choice enable-disable
    
                container input {
                  junos:must "(!(".. .. .. input"))";
                  junos:must-message "instance <*> 'family <*> input' and 'instance <*> input' are mutually exclusive";
                  description
                    "Settings for sampling of input packets";
                  uses sampling_family_input_type;
                }  // container input
    
                container output {
                  junos:must "((!("forwarding-options sampling input family inet") && (!("forwarding-options sampling input family inet6") && !("forwarding-options sampling input family mpls"))))";
                  junos:must-message "output configuration mismatch with old deprecated input configuration";
                  junos:must "((".. .. .. input" || ".. input"))";
                  junos:must-message "Sampling input configuration is not specified";
                  description
                    "Traffic sampling data disposition";
                  uses sampling_instance_mpls_output_type;
                }  // container output
              }  // container mpls
    
              container vpls {
                status deprecated;
                description
                  "Sample vpls packets";
                uses apply-advanced;
    
                choice enable-disable {
                  leaf disable {
                    type empty;
                    description
                      "Disable instance family vpls";
                  }
                }  // choice enable-disable
    
                container input {
                  junos:must "(!(".. .. .. input"))";
                  junos:must-message "instance <*> 'family <*> input' and 'instance <*> input' are mutually exclusive";
                  description
                    "Settings for sampling of input packets";
                  uses sampling_family_input_type;
                }  // container input
    
                container output {
                  junos:must "((".. .. .. input" || ".. input"))";
                  junos:must-message "Sampling input configuration is not specified";
                  description
                    "Traffic sampling data disposition";
                  uses sampling_instance_vpls_output_type;
                }  // container output
              }  // container vpls
    
              container bridge {
                junos:must "(!(".. .. family vpls"))";
                junos:must-message "bridge and vpls families are mutually exclusive";
                description
                  "Sample bridge packets";
                uses apply-advanced;
    
                choice enable-disable {
                  leaf disable {
                    type empty;
                    description
                      "Disable instance family bridge";
                  }
                }  // choice enable-disable
    
                container input {
                  junos:must "(!(".. .. .. input"))";
                  junos:must-message "instance <*> 'family <*> input' and 'instance <*> input' are mutually exclusive";
                  description
                    "Settings for sampling of input packets";
                  uses sampling_family_input_type;
                }  // container input
    
                container output {
                  junos:must "((".. .. .. input" || ".. input"))";
                  junos:must-message "Sampling input configuration is not specified";
                  description
                    "Traffic sampling data disposition";
                  uses sampling_instance_bridge_output_type;
                }  // container output
              }  // container bridge
            }  // container family
          }  // list instance
    
          container jflow-service {
            description
              "Jflow service configuration";
            uses apply-advanced;
    
            container traceoptions {
              description
                "Jflow service trace options";
              uses jflow_service_traceoptions;
            }  // container traceoptions
          }  // container jflow-service
    
          container route-record {
            description
              "Sampling route record configuration";
            uses apply-advanced;
    
            container traceoptions {
              description
                "Sampling route record trace options";
              uses route_record_traceoptions;
            }  // container traceoptions
          }  // container route-record
        }  // grouping juniper-sampling-options
    
        grouping jflow_service_traceoptions {
          description
            "Traceoptions for jflow-service";
          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
    
          leaf level {
            type enumeration {
              enum "error" {
                value 0;
                description
                  "Match error conditions";
              }
              enum "warning" {
                value 1;
                description
                  "Match warning messages";
              }
              enum "notice" {
                value 2;
                description
                  "Match conditions that should be handled specially";
              }
              enum "info" {
                value 3;
                description
                  "Match informational messages";
              }
              enum "verbose" {
                value 4;
                description
                  "Match verbose messages";
              }
              enum "all" {
                value 5;
                description "Match all levels";
              }
            }
            default "error";
            description
              "Level of debugging output";
          }
    
          list flag {
            key "name";
            ordered-by user;
            description
              "Area of jflow-service to enable debuging output";
            leaf name {
              type enumeration {
                enum "parse" {
                  value 0;
                  description
                    "Trace parsing code";
                }
                enum "rtsock" {
                  value 1;
                  description
                    "Trace rtsock code";
                }
                enum "sm" {
                  value 2;
                  description
                    "Trace State machine code";
                }
                enum "all" {
                  value 3;
                  description
                    "Trace all area of jflow-service code";
                }
              }
            }
          }  // list flag
        }  // grouping jflow_service_traceoptions
    
        grouping junos_hash_key {
          description
            "Select data used in the hash key";
          uses apply-advanced;
    
          container family {
            description "Protocol family";
            container fcoe {
              description "FCoE protocol family";
              uses apply-advanced;
    
              container ethernet-interfaces {
                description
                  "FCoE hash-key configuration on ethernet interfaces";
                uses apply-advanced;
    
                leaf oxid {
                  type enumeration {
                    enum "enable" {
                      value 0;
                      description
                        "Include Originator Exchange ID in the hash key";
                    }
                    enum "disable" {
                      value 1;
                      description
                        "Do not include Originator Exchange ID in the hash key";
                    }
                  }
                  description
                    "Originator Exchange ID";
                }
              }  // container ethernet-interfaces
    
              container fabric-interfaces {
                description
                  "FCoE hash-key configuration on fabric interfaces";
                uses apply-advanced;
    
                leaf oxid {
                  type enumeration {
                    enum "enable" {
                      value 0;
                      description
                        "Include Originator Exchange ID in the hash key";
                    }
                    enum "disable" {
                      value 1;
                      description
                        "Do not include Originator Exchange ID in the hash key";
                    }
                  }
                  description
                    "Originator Exchange ID";
                }
              }  // container fabric-interfaces
            }  // container fcoe
    
            container inet {
              description "IPv4 protocol family";
              uses apply-advanced;
    
              container layer-3 {
                presence "enable layer-3";
                description
                  "Include Layer 3 (IP) data in the hash key";
                uses apply-advanced;
    
                leaf destination-address {
                  type empty;
                  description
                    "Include IP destination address in the hash key";
                }
              }  // container layer-3
    
              container layer-4 {
                presence "enable layer-4";
                description
                  "Include Layer 4 (TCP or UDP) data in the hash key";
                uses apply-advanced;
              }  // container layer-4
    
              leaf session-id {
                type empty;
                description
                  "Include session ID in the hash key";
              }
            }  // container inet
    
            container inet6 {
              description "IPv6 protocol family";
              uses apply-advanced;
    
              container layer-3 {
                presence "enable layer-3";
                description
                  "Include Layer 3 (IP) data in the hash key";
                uses apply-advanced;
    
                leaf destination-address {
                  type empty;
                  description
                    "Include IP destination address in the hash key";
                }
    
                leaf incoming-interface-index {
                  type empty;
                  description
                    "Include incoming interface index in the hash key";
                }
    
                leaf next-header {
                  type empty;
                  description
                    "Include IP Next Header field in the hash key";
                }
    
                leaf source-address {
                  type empty;
                  description
                    "Include IP source address in the hash key";
                }
    
                leaf traffic-class {
                  type empty;
                  description
                    "Include Traffic Class field in the hash key";
                }
              }  // container layer-3
    
              container layer-4 {
                presence "enable layer-4";
                description
                  "Include Layer 4 (TCP or UDP) data in the hash key";
                uses apply-advanced;
    
                leaf destination-port {
                  type empty;
                  description
                    "Include IP destination port in the hash key";
                }
    
                leaf source-port {
                  type empty;
                  description
                    "Include IP source port in the hash key";
                }
              }  // container layer-4
    
              leaf session-id {
                type empty;
                description
                  "Include session ID in the hash key";
              }
            }  // container inet6
    
            container mpls {
              description "MPLS protocol family";
              uses apply-advanced;
    
              choice label {
                leaf label-1 {
                  type empty;
                  description
                    "Include the first MPLS label in the hash key";
                }
                leaf all-labels {
                  type empty;
                  description
                    "Include all MPLS labels in hash key";
                }
                leaf no-labels {
                  type empty;
                  description
                    "Exclude all MPLS labels from hash key";
                }
                leaf bottom-label-1 {
                  type empty;
                  description
                    "Include the first MPLS label from bottom-of-stack in the hash key";
                }
              }  // choice label
    
              leaf label-2 {
                junos:must "(".. label-1")";
                junos:must-message "Must also specify label 1;";
                type empty;
                description
                  "Include the second MPLS label in the hash key";
              }
    
              leaf label-3 {
                junos:must "(".. label-2")";
                junos:must-message "Must also specify label 2;";
                type empty;
                description
                  "Include the third MPLS label in the hash key";
              }
    
              container payload {
                junos:must "((".. label-1" || (".. no-labels" || (".. all-labels" || ".. bottom-label-1"))))";
                junos:must-message "Either label-1, bottom-label-1, all-labels or no-labels statement is mandatory";
                description
                  "Include payload data in the hash key";
                uses apply-advanced;
    
                container ether-pseudowire {
                  presence
                    "enable ether-pseudowire";
                  description
                    "Load-balance IP over ethernet PW";
                  uses apply-advanced;
                }  // container ether-pseudowire
    
                container ip {
                  presence "enable ip";
                  description
                    "Include IPv4 or IPv6 payload data in the hash key";
                  uses apply-advanced;
    
                  choice layer-4-select {
                    choice ip-payload {
                      leaf layer-3-only {
                        type empty;
                        description
                          "Include only layer-3 IP information";
                      }
                      leaf enable {
                        type empty;
                        description
                          "Include layer3/4 IP payload in the hash key";
                      }
                      leaf disable {
                        type empty;
                        description
                          "Exclude layer3/4 IP payload in the hash key";
                      }
                    }  // choice ip-payload
                    container port-data {
                      presence
                        "enable port-data";
                      uses apply-advanced;
    
                      leaf source-msb {
                        type empty;
                        description
                          "Include the most significant byte of the source port";
                      }
    
                      leaf source-lsb {
                        type empty;
                        description
                          "Include the least significant byte of the source port";
                      }
    
                      leaf destination-msb {
                        type empty;
                        description
                          "Include the most significant byte of the destination port";
                      }
    
                      leaf destination-lsb {
                        type empty;
                        description
                          "Include the least significant byte of the destination port";
                      }
                    }  // container port-data
                  }  // choice layer-4-select
                }  // container ip
              }  // container payload
            }  // container mpls
    
            container multiservice {
              description
                "Multiservice protocol family";
              uses apply-advanced;
    
              leaf source-mac {
                type empty;
                description
                  "Include source MAC address in hash key";
              }
    
              leaf destination-mac {
                type empty;
                description
                  "Include destination MAC address in hash key";
              }
            }  // container multiservice
          }  // container family
        }  // grouping junos_hash_key
    
        grouping layer2_pm_family_output_type {
          uses apply-advanced;
    
          choice interface-or-next-hop-index {
            leaf interface {
              type union {
                type jt:interface-name;
                type string {
                  pattern "<.*>|$.*";
                }
              }
              description
                "Interface through which to send sampled traffic";
            }
            leaf next-hop-group {
              junos:must "(!(".. no-filter-check"))";
              junos:must-message "no-filter-check is not allowed with next-hop-group";
              junos:must "("forwarding-options next-hop-group $$ group-type layer-2")";
              junos:must-message "Referenced next-hop-group must be defined as layer-2 group";
              type string;
              description
                "Next-hop-group through which to send port-mirror traffic";
            }
            list routing-instance {
              key "name";
              max-elements 1;
              description "Routing instances";
              uses layer2_pm_output-routing-instance-type;
            }  // list routing-instance
            list vlan {
              key "name";
              max-elements 1;
              description
                "Outgoing VLAN for mirrored packets";
              uses pm-rspan-vlan;
            }  // list vlan
    
            case case_5 {
            }  // case case_5
          }  // choice interface-or-next-hop-index
    
          leaf no-filter-check {
            type empty;
            description
              "Do not check for filters on port-mirroring interface";
          }
        }  // grouping layer2_pm_family_output_type
    
        grouping layer2_pm_output-routing-instance-type {
          leaf name {
            type string {
              junos:posix-pattern "!^((__.*__)|(all)|(.*[ ].*)|("")|(.{129,}))$";
              junos:pattern-message "Must be a non-reserved string of 128 characters or less with no spaces.";
            }
            description "Routing instance name";
          }
    
          uses apply-advanced;
    
          list vlan {
            key "name";
            max-elements 1;
            description
              "Outgoing VLAN for mirrored packets";
            uses pm-rspan-vlan;
          }  // list vlan
        }  // grouping layer2_pm_output-routing-instance-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
    
        grouping mpls_pm_family_output_type {
          uses apply-advanced;
        }  // grouping mpls_pm_family_output_type
    
        grouping next_hop_group_intf_type {
          leaf name {
            type union {
              type jt:interface-name;
              type string {
                pattern "<.*>|$.*";
              }
            }
            description
              "Interface through which to send sampled traffic";
          }
    
          uses apply-advanced;
    
          list next-hop {
            junos:must "((".. .. group-type inet" || ".. .. group-type inet6"))";
            junos:must-message "Next-hop can be specified only for group-type inet or inet6";
            key "name";
            ordered-by user;
            description
              "Address of next hop through which to send sampled traffic";
            uses next_hop_type;
          }  // list next-hop
        }  // grouping next_hop_group_intf_type
    
        grouping next_hop_subgroup_intf_type {
          leaf name {
            type union {
              type jt:interface-name;
              type string {
                pattern "<.*>|$.*";
              }
            }
            description
              "Interface through which to send sampled traffic";
          }
    
          uses apply-advanced;
    
          list next-hop {
            junos:must "((".. .. .. group-type inet" || ".. .. .. group-type inet6"))";
            junos:must-message "Next-hop can be specified only for group-type inet or inet6";
            key "name";
            ordered-by user;
            description
              "Address of next hop through which to send sampled traffic";
            uses next_hop_type;
          }  // list next-hop
        }  // grouping next_hop_subgroup_intf_type
    
        grouping next_hop_type {
          description
            "Address of next hop through which to send sampled traffic";
          leaf name {
            type jt:ipaddr;
          }
    
          uses apply-advanced;
        }  // grouping next_hop_type
    
        grouping override-type {
          description "DHCP override processing";
          uses apply-advanced;
    
          leaf no-unicast-replies {
            junos:must "(!(".. layer2-unicast-replies"))";
            junos:must-message "no-unicast-replies cannot be configured with layer2-unicast-replies";
            type empty;
            description
              "Overwrite unicast bit in incoming packet, when present";
          }
    
          leaf allow-no-end-option {
            type empty;
            description
              "Allow packets without end-of-option";
          }
    
          container always-write-option-82 {
            presence
              "enable always-write-option-82";
            description
              "Overwrite existing value of option 82, when present";
            uses write-option-82-type;
          }  // container always-write-option-82
    
          leaf user-defined-option-82 {
            type string {
              length "1 .. 252";
            }
            description
              "Set user defined description for option-82";
          }
    
          leaf trust-option-82 {
            type empty;
            description
              "Trust options-82 option";
          }
    
          leaf disable-relay {
            type empty;
            description
              "Disable DHCP relay processing";
          }
    
          leaf no-bind-on-request {
            type empty;
            description
              "Do not bind if stray DHCP request is received";
          }
    
          leaf bootp-support {
            type empty;
            description
              "Allows relay of bootp req and reply";
          }
    
          leaf dual-stack {
            type string {
              length "1 .. 64";
            }
            description
              "Dual stack group to use.";
          }
    
          leaf asymmetric-lease-time {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "600 .. 86400";
              }
            }
            units "seconds";
            description
              "Use a reduced lease time for the client. In seconds";
          }
    
          container replace-ip-source-with {
            description
              "Replace IP source address in request and release packets";
            choice replacement-type {
              leaf giaddr {
                type empty;
                description
                  "Replace IP source address with giaddr";
              }
            }  // choice replacement-type
          }  // container replace-ip-source-with
    
          leaf send-release-on-delete {
            type empty;
            description
              "Always send RELEASE to the server when a binding is deleted";
          }
    
          leaf relay-source {
            type union {
              type jt:interface-name;
              type string {
                pattern "<.*>|$.*";
              }
            }
            description
              "Interface for relay source";
          }
    
          leaf delete-binding-on-renegotiation {
            type empty;
            description
              "Delete binding on rengotiation";
          }
        }  // grouping override-type
    
        grouping packet-capture-egress-intf-type {
          uses apply-advanced;
    
          list interface {
            key "name";
            description "Interface options";
            leaf name {
              type union {
                type jt:interface-device;
                type string {
                  pattern "<.*>|$.*";
                }
              }
              description "Interface name";
            }
    
            uses apply-advanced;
          }  // list interface
        }  // grouping packet-capture-egress-intf-type
    
        grouping packet_accounting_output_type {
          uses apply-advanced;
    
          leaf aggregate-export-interval {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "90 .. 1800";
              }
            }
            units "seconds";
            default "90";
            description
              "Interval of exporting aggregate accounting information";
          }
    
          leaf flow-inactive-timeout {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "15 .. 1800";
              }
            }
            units "seconds";
            default "60";
            description
              "Interval of inactivity that marks a flow inactive";
          }
    
          leaf flow-active-timeout {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "60 .. 1800";
              }
            }
            units "seconds";
            default "1800";
            description
              "Interval after which an active flow is exported";
          }
    
          list cflowd {
            junos:must "(all ".. interface <*> source-address")";
            junos:must-message "'forwarding-options accounting output interface source-address' must be specified with 'flow-server' and 'interface'";
            junos:must "(any ".. interface <*>")";
            junos:must-message "'forwarding-options accounting output interface' must be specified";
            key "name";
            description
              "Cflowd collector where flow records are sent";
            uses cflowd_packet_accounting_type;
          }  // list cflowd
    
          list interface {
            key "name";
            description
              "Interfaces used to send monitored information";
            uses packet_export_intf_type;
          }  // list interface
        }  // grouping packet_accounting_output_type
    
        grouping cflowd_packet_accounting_type {
          leaf name {
            type jt:ipaddr;
            description
              "Name of host collecting cflowd packets";
          }
    
          uses apply-advanced;
    
          leaf port {
            type union {
              type uint16;
              type string {
                pattern "<.*>|$.*";
              }
            }
            description
              "UDP port number on host collecting cflowd packets";
          }
    
          leaf dscp {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "DSCP can be configured for inline-jflow";
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint8 {
                range "0 .. 63";
              }
            }
            default "0";
            description
              "Numeric DSCP value in the range 0 to 63";
          }
    
          leaf forwarding-class {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "forwarding-class can be configured for inline-jflow";
            type string {
              length "1 .. 64";
            }
            description
              "Forwarding-class for exported jflow packets, applicable only for inline-jflow";
          }
    
          leaf routing-instance {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "Routing Instances can be configured for inline-jflow";
            junos:must "("routing-instances $$ instance-type vrf")";
            junos:must-message "routing instance should be defined and should be of type Virtual routing forwarding instance(VRF)";
            type string;
            description
              "Name of routing instance on which flow collector is reachable";
          }
    
          leaf version {
            type enumeration {
              enum "5" {
                value 0;
                description
                  "Export cflowd aggregates in version 5 format";
              }
              enum "8" {
                value 1;
                description
                  "Export cflowd aggregates in version 8 format";
              }
            }
            default "5";
            description
              "Format of exported cflowd aggregates";
          }
    
          leaf autonomous-system-type {
            type enumeration {
              enum "origin" {
                value 0;
                description
                  "Export origin-AS numbers";
              }
              enum "peer" {
                value 1;
                description
                  "Export peer-AS numbers";
              }
            }
            default "origin";
            description
              "Type of autonomous system number to export";
          }
    
          container aggregation {
            description
              "Aggregations to perform for exported flows (version 8 only)";
            uses aggregation_type;
          }  // container aggregation
        }  // grouping cflowd_packet_accounting_type
    
        grouping aggregation_type {
          uses apply-advanced;
    
          leaf autonomous-system {
            type empty;
            description
              "Aggregate by autonomous system number";
          }
    
          leaf protocol-port {
            type empty;
            description
              "Aggregate by protocol and port number";
          }
    
          leaf source-prefix {
            type empty;
            description
              "Aggregate by source prefix";
          }
    
          leaf destination-prefix {
            type empty;
            description
              "Aggregate by destination prefix";
          }
    
          container source-destination-prefix {
            presence
              "enable source-destination-prefix";
            description
              "Aggregate by source and destination prefix";
            uses apply-advanced;
    
            leaf caida-compliant {
              type empty;
              description
                "Compatible with Caida record format for prefix aggregation (v8)";
            }
          }  // container source-destination-prefix
        }  // grouping aggregation_type
    
        grouping packet_export_intf_type {
          leaf name {
            type union {
              type jt:interface-unit;
              type string {
                pattern "<.*>|$.*";
              }
            }
            description
              "Interfaces used to send monitored information";
          }
    
          uses apply-advanced;
    
          leaf engine-id {
            type union {
              type uint8;
              type string {
                pattern "<.*>|$.*";
              }
            }
            description
              "Identity (number) of this accounting interface";
          }
    
          leaf engine-type {
            type union {
              type uint8;
              type string {
                pattern "<.*>|$.*";
              }
            }
            description
              "Type (number) of this accounting interface";
          }
    
          leaf source-address {
            type jt:ipaddr;
            description
              "Address to use for generating monitored packets";
          }
        }  // grouping packet_export_intf_type
    
        grouping pm-rspan-vlan {
          description "RSPAN vlan for pm";
          leaf name {
            type string;
            description "VLAN name or VLAN id";
          }
    
          uses apply-advanced;
    
          leaf no-tag {
            type empty;
            description
              "Removes extra RSPAN tag from mirrored packets";
          }
        }  // grouping pm-rspan-vlan
    
        grouping pm_family_input_type {
          description
            "Input options for port mirroring";
          uses apply-advanced;
    
          leaf rate {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32;
            }
            description
              "Ratio of packets to be sampled (1 out of N)";
          }
    
          leaf run-length {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "0 .. 20";
              }
            }
            description
              "Number of samples after initial trigger";
          }
    
          leaf maximum-packet-length {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "0 .. 9216";
              }
            }
            units "bytes";
            default "0";
            description
              "Maximum length of the mirrored packet";
          }
        }  // grouping pm_family_input_type
    
        grouping relay-active-leasequery-v4-type {
          description
            "Configure active leasequery";
          uses apply-advanced;
    
          leaf topology-discover {
            junos:must "(".. peer-address")";
            junos:must-message "Must configure [peer-address] to configure topology-discover";
            type empty;
            description "Topology discovery";
          }
    
          list peer-address {
            key "name";
            ordered-by user;
            description "Server ip address";
            leaf name {
              type jt:ipaddr;
              description "Peer ip address";
            }
    
            uses apply-advanced;
          }  // list peer-address
    
          leaf timeout {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "10 .. 3600";
              }
            }
            units "seconds";
            default "120";
            description
              "Read/write timeout in seconds";
          }
    
          leaf idle-timeout {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "10 .. 3600";
              }
            }
            units "seconds";
            default "60";
            description
              "Idle timeout in seconds";
          }
        }  // grouping relay-active-leasequery-v4-type
    
        grouping relay-active-leasequery-v6-type {
          description
            "Configure active leasequery";
          uses apply-advanced;
    
          leaf topology-discover {
            junos:must "(".. peer-address")";
            junos:must-message "Must configure [peer-address] to configure topology-discover";
            type empty;
            description "Topology discovery";
          }
    
          leaf timeout {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "10 .. 3600";
              }
            }
            units "seconds";
            default "120";
            description
              "Read/write timeout in seconds";
          }
    
          leaf idle-timeout {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "10 .. 3600";
              }
            }
            units "seconds";
            default "60";
            description
              "Idle timeout in seconds";
          }
    
          list peer-address {
            key "name";
            ordered-by user;
            description "Peer ipv6 address";
            leaf name {
              type jt:ipv6addr;
              description "Peer ipv6 address";
            }
    
            uses apply-advanced;
          }  // list peer-address
        }  // grouping relay-active-leasequery-v6-type
    
        grouping relay-bulk-leasequery-v4-type {
          junos:must "(".. overrides always-write-option-82")";
          junos:must-message "Must configure [overrides always-write-option-82] to overwrite circuit-id for bulk-leasequery";
          junos:must "((".. relay-option-82 circuit-id" && !((".. relay-option-82 circuit-id use-interface-description" || ".. relay-option-82 circuit-id require-interface-description"))))";
          junos:must-message "Must configure [relay-option-82 circuit-id] without description to insert circuit-id for bulk-leasequery";
          description
            "Configure bulk leasequery";
          uses apply-advanced;
    
          leaf attempts {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "1 .. 720";
              }
            }
            default "360";
            description
              "Number of retry attempts";
          }
    
          leaf timeout {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "1 .. 10";
              }
            }
            units "seconds";
            default "10";
            description "Number of seconds";
          }
        }  // grouping relay-bulk-leasequery-v4-type
    
        grouping relay-bulk-leasequery-v6-type {
          junos:must "(".. relay-agent-interface-id")";
          junos:must-message "Must configure [relay-agent-interface-id] to insert interface-id for bulk-leasequery";
          description
            "Configure bulk leasequery";
          uses apply-advanced;
    
          leaf attempts {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "1 .. 10";
              }
            }
            default "6";
            description
              "Number of retry attempts";
          }
    
          leaf timeout {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "1 .. 10";
              }
            }
            units "seconds";
            default "10";
            description "Number of seconds";
          }
    
          container trigger {
            description
              "Trigger for bulk leasequery";
            leaf automatic {
              type empty;
              description
                "Trigger automatically";
            }
          }  // container trigger
        }  // grouping relay-bulk-leasequery-v6-type
    
        grouping relay-leasequery-type {
          description "Configure leasequery";
          uses apply-advanced;
    
          leaf attempts {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "1 .. 10";
              }
            }
            default "6";
            description
              "Number of retry attempts";
          }
    
          leaf timeout {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "1 .. 10";
              }
            }
            units "seconds";
            default "10";
            description "Number of seconds";
          }
        }  // grouping relay-leasequery-type
    
        grouping relay-option-60-type-group {
          description
            "DHCP option-60 processing";
          uses apply-advanced;
    
          container vendor-option {
            description "Add vendor option";
            uses apply-advanced;
    
            container equals {
              description "Option 60 equals";
              uses relay-option-60-match-group;
            }  // container equals
    
            container not-equals {
              status deprecated;
              description
                "Option 60 does not equal";
              uses relay-option-60-match-group;
            }  // container not-equals
    
            container starts-with {
              description
                "Option 60 starts with";
              uses relay-option-60-match-group;
            }  // container starts-with
    
            choice server-group-choice {
              leaf default-relay-server-group {
                junos:must "(".. .. .. .. server-group $$")";
                junos:must-message "Referenced group must be defined under [edit dhcp-relay server-group]";
                type string {
                  length "1 .. 64";
                }
                description
                  "Name of DHCP relay server group when match is not made";
              }
              leaf default-local-server-group {
                junos:must "(".. .. .. .. .. .. system services dhcp-local-server group $$")";
                junos:must-message "Referenced group must be defined under [edit system services dhcp-local-server group]";
                type string {
                  length "1 .. 64";
                }
                description
                  "Name of DHCP local server group when match is not made";
              }
              leaf drop {
                type empty;
                description
                  "Discard when a match is not made";
              }
              leaf forward-only {
                type empty;
                description
                  "Forward without subscriber services when a match is not made";
              }
            }  // choice server-group-choice
          }  // container vendor-option
        }  // grouping relay-option-60-type-group
    
        grouping relay-option-60-match-group {
          uses apply-advanced;
    
          list ascii {
            key "name";
            description "ASCII string";
            leaf name {
              type string {
                length "1 .. 256";
              }
              description "ASCII string";
            }
    
            uses apply-advanced;
    
            choice server-group-choice {
              leaf relay-server-group {
                junos:must "(".. .. .. .. .. .. server-group $$")";
                junos:must-message "Referenced group must be defined under [edit forwarding options dhcp-relay server-group]";
                type string {
                  length "1 .. 64";
                }
                description
                  "Name of DHCP relay server group when match is made";
              }
              leaf local-server-group {
                junos:must "(".. .. .. .. .. .. .. .. system services dhcp-local-server group $$")";
                junos:must-message "Referenced group must be defined under [edit system services dhcp-local-server group]";
                type string {
                  length "1 .. 64";
                }
                description
                  "Name of DHCP local server group when match is made";
              }
              leaf drop {
                type empty;
                description
                  "Discard when a match is made";
              }
              leaf forward-only {
                type empty;
                description
                  "Forward without subscriber services when a match is made";
              }
            }  // choice server-group-choice
          }  // list ascii
    
          list hexadecimal {
            key "name";
            description "Hexadecimal string";
            leaf name {
              type string {
                junos:posix-pattern "^[[:xdigit:]]+$";
                junos:pattern-message "Must be hexadecimal digits (0-9, a-f, A-F)";
                length "1 .. 512";
              }
              description "Hexadecimal string";
            }
    
            uses apply-advanced;
    
            choice server-group-choice {
              leaf relay-server-group {
                junos:must "(".. .. .. .. .. .. server-group $$")";
                junos:must-message "Referenced group must be defined under [edit forwarding-options dhcp-relay server-group]";
                type string {
                  length "1 .. 64";
                }
                description
                  "Name of DHCP relay server group when match is made";
              }
              leaf local-server-group {
                junos:must "(".. .. .. .. .. .. .. .. system services dhcp-local-server group $$")";
                junos:must-message "Referenced group must be defined under [edit system services dhcp-local-server group]";
                type string {
                  length "1 .. 64";
                }
                description
                  "Name of DHCP local server group when match is made";
              }
              leaf drop {
                type empty;
                description
                  "Discard when a match is made";
              }
              leaf forward-only {
                type empty;
                description
                  "Forward without subscriber services when a match is made";
              }
            }  // choice server-group-choice
          }  // list hexadecimal
        }  // grouping relay-option-60-match-group
    
        grouping relay-option-60-type-top {
          description
            "DHCP option-60 processing";
          uses apply-advanced;
    
          container vendor-option {
            description "Add vendor option";
            uses apply-advanced;
    
            container equals {
              description "Option 60 equals";
              uses relay-option-60-match-top;
            }  // container equals
    
            container not-equals {
              status deprecated;
              description
                "Option 60 does not equal";
              uses relay-option-60-match-top;
            }  // container not-equals
    
            container starts-with {
              description
                "Option 60 starts with";
              uses relay-option-60-match-top;
            }  // container starts-with
    
            choice server-group-choice {
              leaf default-relay-server-group {
                junos:must "(".. .. .. server-group $$")";
                junos:must-message "Referenced group must be defined under [edit dhcp-relay server-group]";
                type string {
                  length "1 .. 64";
                }
                description
                  "Name of DHCP relay server group when match is not made";
              }
              leaf default-local-server-group {
                junos:must "(".. .. .. .. .. system services dhcp-local-server group $$")";
                junos:must-message "Referenced group must be defined under [edit system services dhcp-local-server group]";
                type string {
                  length "1 .. 64";
                }
                description
                  "Name of DHCP local server group when match is not made";
              }
              leaf drop {
                type empty;
                description
                  "Discard when a match is not made";
              }
              leaf forward-only {
                type empty;
                description
                  "Forward without subscriber services when a match is not made";
              }
            }  // choice server-group-choice
          }  // container vendor-option
        }  // grouping relay-option-60-type-top
    
        grouping relay-option-60-match-top {
          uses apply-advanced;
    
          list ascii {
            key "name";
            description "ASCII string";
            leaf name {
              type string {
                length "1 .. 256";
              }
              description "ASCII string";
            }
    
            uses apply-advanced;
    
            choice server-group-choice {
              leaf relay-server-group {
                junos:must "(".. .. .. .. .. server-group $$")";
                junos:must-message "Referenced group must be defined under [edit forwarding options dhcp-relay server-group]";
                type string {
                  length "1 .. 64";
                }
                description
                  "Name of DHCP relay server group when match is made";
              }
              leaf local-server-group {
                junos:must "(".. .. .. .. .. .. .. system services dhcp-local-server group $$")";
                junos:must-message "Referenced group must be defined under [edit system services dhcp-local-server group]";
                type string {
                  length "1 .. 64";
                }
                description
                  "Name of DHCP local server group when match is made";
              }
              leaf drop {
                type empty;
                description
                  "Discard when a match is made";
              }
              leaf forward-only {
                type empty;
                description
                  "Forward without subscriber services when a match is made";
              }
            }  // choice server-group-choice
          }  // list ascii
    
          list hexadecimal {
            key "name";
            description "Hexadecimal string";
            leaf name {
              type string {
                junos:posix-pattern "^[[:xdigit:]]+$";
                junos:pattern-message "Must be hexadecimal digits (0-9, a-f, A-F)";
                length "1 .. 512";
              }
              description "Hexadecimal string";
            }
    
            uses apply-advanced;
    
            choice server-group-choice {
              leaf relay-server-group {
                junos:must "(".. .. .. .. .. server-group $$")";
                junos:must-message "Referenced group must be defined under [edit forwarding-options dhcp-relay server-group]";
                type string {
                  length "1 .. 64";
                }
                description
                  "Name of DHCP relay server group when match is made";
              }
              leaf local-server-group {
                junos:must "(".. .. .. .. .. .. .. system services dhcp-local-server group $$")";
                junos:must-message "Referenced group must be defined under [edit system services dhcp-local-server group]";
                type string {
                  length "1 .. 64";
                }
                description
                  "Name of DHCP local server group when match is made";
              }
              leaf drop {
                type empty;
                description
                  "Discard when a match is made";
              }
              leaf forward-only {
                type empty;
                description
                  "Forward without subscriber services when a match is made";
              }
            }  // choice server-group-choice
          }  // list hexadecimal
        }  // grouping relay-option-60-match-top
    
        grouping relay-option-82-type {
          description
            "DHCP option-82 processing";
          uses apply-advanced;
    
          container circuit-id {
            presence "enable circuit-id";
            description "Add circuit identifier";
            uses apply-advanced;
    
            container prefix {
              description
                "Add prefix to circuit/interface-id or remote-id";
              uses apply-advanced;
    
              leaf host-name {
                type empty;
                description
                  "Add router host name to circuit / interface-id or remote-id";
              }
    
              leaf logical-system-name {
                type empty;
                description
                  "Add logical system name to circuit / interface-id or remote-id";
              }
    
              leaf routing-instance-name {
                type empty;
                description
                  "Add routing instance name to circuit / interface-id or remote-id";
              }
            }  // container prefix
    
            leaf use-interface-description {
              junos:must "(!(".. require-interface-description"))";
              junos:must-message "use-interface-description may not be set with require-interface-desciption";
              type enumeration {
                enum "logical" {
                  value 0;
                  description
                    "Use the logical interface description";
                }
                enum "device" {
                  value 1;
                  description
                    "Use the device interface description";
                }
              }
              description
                "Use interface description instead of circuit identifier";
            }
    
            leaf use-vlan-id {
              junos:must "((!(".. no-vlan-interface-name") && (!(".. use-interface-description") && !(".. require-interface-description"))))";
              junos:must-message "Vlan-tag cannot be added as no-vlan-interface-name or interface-description is configured";
              type empty;
              description
                "Use VLAN id instead of name";
            }
    
            container vlan-id-only {
              junos:must "(!((".. include-irb-and-l2" || (".. keep-incoming-circuit-id" || (".. user-defined" || (".. no-vlan-interface-name" || (".. use-interface-description" || (".. use-vlan-id" || (".. prefix" || ".. require-interface-description")))))))))";
              junos:must-message "Vlan-id-only cannot be clubbed along with any other option-82 knob";
              presence "enable vlan-id-only";
              description "Use only VLAN id";
              uses apply-advanced;
            }  // container vlan-id-only
    
            leaf no-vlan-interface-name {
              type empty;
              description
                "Not include vlan or interface name";
            }
    
            leaf include-irb-and-l2 {
              type empty;
              description
                "Include IRB and L2 interface name";
            }
    
            leaf user-defined {
              junos:must "(!((".. include-irb-and-l2" || (".. keep-incoming-circuit-id" || (".. no-vlan-interface-name" || (".. use-interface-description" || (".. use-vlan-id" || (".. prefix" || ".. require-interface-description"))))))))";
              junos:must-message "The user defined description for option 82 must be defined in order to see the usage and doesnt coexist with prefix";
              type empty;
              description
                "Include user defined string";
            }
    
            leaf keep-incoming-circuit-id {
              type empty;
              description
                "Keep incoming circuit identifier";
            }
          }  // container circuit-id
    
          container remote-id {
            presence "enable remote-id";
            description "Add remote identifier";
            uses apply-advanced;
    
            container prefix {
              description
                "Add prefix to circuit/interface-id or remote-id";
              uses apply-advanced;
    
              leaf host-name {
                type empty;
                description
                  "Add router host name to circuit / interface-id or remote-id";
              }
    
              leaf logical-system-name {
                type empty;
                description
                  "Add logical system name to circuit / interface-id or remote-id";
              }
    
              leaf routing-instance-name {
                type empty;
                description
                  "Add routing instance name to circuit / interface-id or remote-id";
              }
            }  // container prefix
    
            leaf use-interface-description {
              junos:must "(!(".. require-interface-description"))";
              junos:must-message "use-interface-description may not be set with require-interface-desciption";
              type enumeration {
                enum "logical" {
                  value 0;
                  description
                    "Use the logical interface description";
                }
                enum "device" {
                  value 1;
                  description
                    "Use the device interface description";
                }
              }
              description
                "Use interface description instead of circuit identifier";
            }
    
            leaf use-vlan-id {
              junos:must "((!(".. no-vlan-interface-name") && (!(".. use-interface-description") && !(".. require-interface-description"))))";
              junos:must-message "Vlan-tag cannot be added as no-vlan-interface-name or interface-description is configured";
              type empty;
              description
                "Use VLAN id instead of name";
            }
    
            leaf no-vlan-interface-name {
              type empty;
              description
                "Not include vlan or interface name";
            }
    
            leaf include-irb-and-l2 {
              type empty;
              description
                "Include IRB and L2 interface name";
            }
    
            container hostname-only {
              junos:must "(!((".. include-irb-and-l2" || (".. keep-incoming-remote-id" || (".. no-vlan-interface-name" || (".. use-interface-description" || (".. use-vlan-id" || (".. prefix" || ".. use-string"))))))))";
              junos:must-message "Hostname-only cannot be clubbed with any other sub-option";
              presence "enable hostname-only";
              description
                "Include hostname only";
              uses apply-advanced;
            }  // container hostname-only
    
            leaf keep-incoming-remote-id {
              type empty;
              description
                "Keep incoming remote identifier";
            }
    
            leaf use-string {
              junos:must "(!((".. use-interface-description" || (".. require-interface-description" || (".. include-irb-and-l2" || (".. keep-incoming-circuit-id" || (".. no-vlan-interface-name" || ".. use-vlan-id")))))))";
              junos:must-message "use-string can only coexist with prefix";
              type string;
              description
                "Use raw string instead of the default remote id";
            }
          }  // container remote-id
    
          leaf server-id-override {
            junos:must "(!(".. link-selection"))";
            junos:must-message "server-id-override cannot be configured with link-selection";
            type empty;
            description
              "Add link-selection and server-id sub-options on packets to server";
          }
    
          leaf link-selection {
            junos:must "(!(".. server-id-override"))";
            junos:must-message "link-selection cannot be configured with server-id-override";
            type empty;
            description
              "Add link-selection suboption on packets to server";
          }
    
          leaf exclude-relay-agent-identifier {
            type empty;
            description
              "Exclude relay agent identifier from packets to server";
          }
    
          container vendor-specific {
            description
              "Add vendor-specific information";
            uses jdhcp-vendor-specific-type;
          }  // container vendor-specific
        }  // grouping relay-option-82-type
    
        grouping relay-v4-option-ascii-hex {
          uses apply-advanced;
    
          list ascii {
            key "name";
            description "ASCII string";
            leaf name {
              type string {
                length "1 .. 256";
              }
              description "ASCII string";
            }
    
            uses apply-advanced;
    
            choice server-group-choice {
              leaf relay-server-group {
                junos:must "((".. .. .. .. .. .. server-group $$" || (".. .. .. .. .. server-group $$" || (".. .. .. .. server-group $$" || ".. .. .. server-group $$"))))";
                junos:must-message "Referenced group must be defined under [edit forwarding dhcp-relay server-group]";
                type string {
                  length "1 .. 64";
                }
                description
                  "Name of DHCP relay server group when match is made";
              }
              leaf local-server-group {
                junos:must "((".. .. .. .. .. .. .. .. system services dhcp-local-server group $$" || (".. .. .. .. .. .. .. system services dhcp-local-server group $$" || (".. .. .. .. .. .. system services dhcp-local-server group $$" || ".. .. .. .. .. system services dhcp-local-server group $$"))))";
                junos:must-message "Referenced group must be defined under [edit system services dhcp-local-server group]";
                type string {
                  length "1 .. 64";
                }
                description
                  "Name of DHCP local server group when match is made";
              }
              leaf drop {
                type empty;
                description
                  "Discard when a match is made";
              }
              leaf forward-only {
                type empty;
                description
                  "Forward without subscriber services when a match is made";
              }
            }  // choice server-group-choice
          }  // list ascii
    
          list hexadecimal {
            key "name";
            description "Hexadecimal string";
            leaf name {
              type string {
                junos:posix-pattern "^[[:xdigit:]]+$";
                junos:pattern-message "Must be hexadecimal digits (0-9, a-f, A-F)";
                length "1 .. 512";
              }
              description "Hexadecimal string";
            }
    
            uses apply-advanced;
    
            choice server-group-choice {
              leaf relay-server-group {
                junos:must "((".. .. .. .. .. .. server-group $$" || (".. .. .. .. .. server-group $$" || (".. .. .. .. server-group $$" || ".. .. .. server-group $$"))))";
                junos:must-message "Referenced group must be defined under [edit forwarding dhcp-relay server-group]";
                type string {
                  length "1 .. 64";
                }
                description
                  "Name of DHCP relay server group when match is made";
              }
              leaf local-server-group {
                junos:must "((".. .. .. .. .. .. .. .. system services dhcp-local-server group $$" || (".. .. .. .. .. .. .. system services dhcp-local-server group $$" || (".. .. .. .. .. .. system services dhcp-local-server group $$" || ".. .. .. .. .. system services dhcp-local-server group $$"))))";
                junos:must-message "Referenced group must be defined under [edit system services dhcp-local-server group]";
                type string {
                  length "1 .. 64";
                }
                description
                  "Name of DHCP local server group when match is made";
              }
              leaf drop {
                type empty;
                description
                  "Discard when a match is made";
              }
              leaf forward-only {
                type empty;
                description
                  "Forward without subscriber services when a match is made";
              }
            }  // choice server-group-choice
          }  // list hexadecimal
        }  // grouping relay-v4-option-ascii-hex
    
        grouping relay-v6-option-ascii-hex {
          uses apply-advanced;
    
          list ascii {
            key "name";
            description "ASCII string";
            leaf name {
              type string {
                length "1 .. 256";
              }
              description "ASCII string";
            }
    
            uses apply-advanced;
    
            choice server-group-choice {
              leaf relay-server-group {
                junos:must "((".. .. .. .. .. .. server-group $$" || (".. .. .. .. .. server-group $$" || (".. .. .. .. server-group $$" || ".. .. .. server-group $$"))))";
                junos:must-message "Referenced group must be defined under [edit forwarding options dhcp-relay dhcpv6 server-group]";
                type string {
                  length "1 .. 64";
                }
                description
                  "Name of DHCP relay server group when match is made";
              }
              leaf drop {
                type empty;
                description
                  "Discard when a match is made";
              }
              leaf forward-only {
                type empty;
                description
                  "Forward without subscriber services when a match is made";
              }
            }  // choice server-group-choice
          }  // list ascii
    
          list hexadecimal {
            key "name";
            description "Hexadecimal string";
            leaf name {
              type string {
                junos:posix-pattern "^[[:xdigit:]]+$";
                junos:pattern-message "Must be hexadecimal digits (0-9, a-f, A-F)";
                length "1 .. 512";
              }
              description "Hexadecimal string";
            }
    
            uses apply-advanced;
    
            choice server-group-choice {
              leaf relay-server-group {
                junos:must "((".. .. .. .. .. .. server-group $$" || (".. .. .. .. .. server-group $$" || (".. .. .. .. server-group $$" || ".. .. .. server-group $$"))))";
                junos:must-message "Referenced group must be defined under [edit forwarding options dhcp-relay dhcpv6 server-group]";
                type string {
                  length "1 .. 64";
                }
                description
                  "Name of DHCP relay server group when match is made";
              }
              leaf drop {
                type empty;
                description
                  "Discard when a match is made";
              }
              leaf forward-only {
                type empty;
                description
                  "Forward without subscriber services when a match is made";
              }
            }  // choice server-group-choice
          }  // list hexadecimal
        }  // grouping relay-v6-option-ascii-hex
    
        grouping route_record_traceoptions {
          description
            "Traceoptions for sampling route record";
          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
    
          leaf level {
            type enumeration {
              enum "error" {
                value 0;
                description
                  "Match error conditions";
              }
              enum "warning" {
                value 1;
                description
                  "Match warning messages";
              }
              enum "notice" {
                value 2;
                description
                  "Match conditions that should be handled specially";
              }
              enum "info" {
                value 3;
                description
                  "Match informational messages";
              }
              enum "verbose" {
                value 4;
                description
                  "Match verbose messages";
              }
              enum "all" {
                value 5;
                description "Match all levels";
              }
            }
            default "error";
            description
              "Level of debugging output";
          }
    
          list flag {
            key "name";
            ordered-by user;
            description
              "Area of route-record to enable debuging output";
            leaf name {
              type enumeration {
                enum "parse" {
                  value 0;
                  description
                    "Trace parsing code";
                }
                enum "all" {
                  value 1;
                  description
                    "Trace all area of jflow-service code";
                }
              }
            }
          }  // list flag
        }  // grouping route_record_traceoptions
    
        grouping sampling_family_inet6_output_type {
          description
            "Configure output options for packet sampling";
          uses apply-advanced;
    
          leaf aggregate-export-interval {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "90 .. 1800";
              }
            }
            units "seconds";
            default "90";
            description
              "Interval of exporting aggregate accounting information";
          }
    
          list flow-server {
            junos:must "((!(any ".. interface <*>") || all ".. interface <*> source-address"))";
            junos:must-message "'output interface source-address' must be specified with 'flow-server' and 'interface'";
            key "name";
            max-elements 8;
            description
              "Configure sending traffic aggregates in cflowd format";
            uses cflowd_sampling_inet6_sampling_type;
          }  // list flow-server
    
          container inline-jflow {
            junos:must "(any ".. flow-server <*>")";
            junos:must-message "'flow-server' must be specified with the inline Jflow";
            presence "enable inline-jflow";
            description
              "Inline processing of sampled packets";
            uses packet_export_inline;
          }  // container inline-jflow
        }  // grouping sampling_family_inet6_output_type
    
        grouping cflowd_sampling_inet6_sampling_type {
          leaf name {
            type jt:ipaddr;
            description
              "Name of host collecting cflowd packets";
          }
    
          uses apply-advanced;
    
          leaf port {
            type union {
              type uint16;
              type string {
                pattern "<.*>|$.*";
              }
            }
            description
              "UDP port number on host collecting cflowd packets";
          }
    
          leaf dscp {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "DSCP can be configured for inline-jflow";
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint8 {
                range "0 .. 63";
              }
            }
            default "0";
            description
              "Numeric DSCP value in the range 0 to 63";
          }
    
          leaf forwarding-class {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "forwarding-class can be configured for inline-jflow";
            type string {
              length "1 .. 64";
            }
            description
              "Forwarding-class for exported jflow packets, applicable only for inline-jflow";
          }
    
          leaf routing-instance {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "Routing Instances can be configured for inline-jflow";
            junos:must "("routing-instances $$ instance-type vrf")";
            junos:must-message "routing instance should be defined and should be of type Virtual routing forwarding instance(VRF)";
            type string;
            description
              "Name of routing instance on which flow collector is reachable";
          }
    
          leaf autonomous-system-type {
            type enumeration {
              enum "origin" {
                value 0;
                description
                  "Export origin-AS numbers";
              }
              enum "peer" {
                value 1;
                description
                  "Export peer-AS numbers";
              }
            }
            default "origin";
            description
              "Type of autonomous system number to export";
          }
    
          container aggregation {
            junos:must "(!(any ".. .. flow-server <*> version9"))";
            junos:must-message "Select only one version";
            description
              "Aggregations to perform for exported flows (version 8 only)";
            uses aggregation_type;
          }  // container aggregation
    
          choice local-dump-choice {
            leaf local-dump {
              type empty;
              description
                "Dump cflowd records to log file before exporting";
            }
            leaf no-local-dump {
              type empty;
              description
                "Don't dump cflowd records to log file before exporting";
            }
          }  // choice local-dump-choice
    
          leaf source-address {
            type jt:ipv4addr;
            description
              "Source IPv4 address for cflowd packets";
          }
    
          container version9 {
            junos:must "((!(any ".. .. .. .. inet output flow-server <*> version") || !(any ".. .. .. .. inet output interface <*>")))";
            junos:must-message "Select only one version or configure only RE based samping under family inet";
            junos:must "((any ".. .. interface <*>" || ".. .. inline-jflow"))";
            junos:must-message "Service PIC or inline-jflow (j-series and SRX only) must be specified for version9";
            presence "enable version9";
            description
              "Export data in version 9 format";
            uses apply-advanced;
    
            container template {
              description
                "Template configuration";
              uses apply-advanced;
    
              leaf template-name {
                junos:must "("services flow-monitoring version9 template $$ ipv6-template")";
                junos:must-message "Template type must match input protocol";
                type string;
                description "Template name";
              }
            }  // container template
          }  // container version9
        }  // grouping cflowd_sampling_inet6_sampling_type
    
        grouping packet_export_inline {
          uses apply-advanced;
    
          leaf source-address {
            type jt:ipaddr;
            description
              "Address to use for generating monitored packets";
          }
    
          leaf flow-export-rate {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "1 .. 3200";
              }
            }
            description
              "Flow export rate of monitored packets in kpps";
          }
        }  // grouping packet_export_inline
    
        grouping sampling_family_input_type {
          description
            "Configure input options for packet sampling";
          uses apply-advanced;
    
          leaf rate {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32;
            }
            description
              "Ratio of packets to be sampled (1 out of N)";
          }
    
          leaf run-length {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "0 .. 20";
              }
            }
            default "0";
            description
              "Number of samples after initial trigger";
          }
    
          leaf max-packets-per-second {
            type union {
              type uint16;
              type string {
                pattern "<.*>|$.*";
              }
            }
            default "1000";
            description
              "Threshold of samples per second before dropping";
          }
    
          leaf maximum-packet-length {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "0 .. 9192";
              }
            }
            units "bytes";
            default "0";
            description
              "Maximum length of the sampled packet";
          }
        }  // grouping sampling_family_input_type
    
        grouping sampling_input_type {
          description
            "Configure input options for packet sampling";
          uses apply-advanced;
    
          leaf rate {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32;
            }
            description
              "Ratio of packets to be sampled (1 out of N)";
          }
    
          leaf run-length {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "0 .. 20";
              }
            }
            default "0";
            description
              "Number of samples after initial trigger";
          }
    
          leaf max-packets-per-second {
            type union {
              type uint16;
              type string {
                pattern "<.*>|$.*";
              }
            }
            default "1000";
            description
              "Threshold of samples per second before dropping";
          }
    
          leaf maximum-packet-length {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "0 .. 9192";
              }
            }
            units "bytes";
            default "0";
            description
              "Maximum length of the sampled packet";
          }
    
          container family {
            presence "enable family";
            status deprecated;
            description "Protocol family";
          }  // container family
        }  // grouping sampling_input_type
    
        grouping sampling_instance_bridge_output_type {
          description
            "Configure output options for packet sampling";
          uses apply-advanced;
    
          list flow-server {
            junos:must "(".. inline-jflow")";
            junos:must-message "Output 'inline Jflow' should be configured with flow-server";
            key "name";
            max-elements 8;
            description
              "Configure sending traffic aggregates in cflowd format";
            uses cflowd_instance_bridge_sampling_type;
          }  // list flow-server
    
          container inline-jflow {
            junos:must "(any ".. flow-server <*>")";
            junos:must-message "'flow-server' must be specified with the inline Jflow";
            presence "enable inline-jflow";
            description
              "Inline processing of sampled packets";
            uses packet_export_inline_instance;
          }  // container inline-jflow
        }  // grouping sampling_instance_bridge_output_type
    
        grouping cflowd_instance_bridge_sampling_type {
          leaf name {
            type jt:ipaddr;
            description
              "Name of host collecting cflowd packets";
          }
    
          uses apply-advanced;
    
          leaf port {
            type union {
              type uint16;
              type string {
                pattern "<.*>|$.*";
              }
            }
            description
              "UDP port number on host collecting cflowd packets";
          }
    
          leaf dscp {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "DSCP can be configured for inline-jflow";
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint8 {
                range "0 .. 63";
              }
            }
            default "0";
            description
              "Numeric DSCP value in the range 0 to 63";
          }
    
          leaf forwarding-class {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "forwarding-class can be configured for inline-jflow";
            type string {
              length "1 .. 64";
            }
            description
              "Forwarding-class for exported jflow packets, applicable only for inline-jflow";
          }
    
          leaf routing-instance {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "Routing Instances can be configured for inline-jflow";
            junos:must "("routing-instances $$ instance-type vrf")";
            junos:must-message "routing instance should be defined and should be of type Virtual routing forwarding instance(VRF)";
            type string;
            description
              "Name of routing instance on which flow collector is reachable";
          }
    
          container version-ipfix {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "inline Jflow must be specified for version-ipfix";
            presence "enable version-ipfix";
            description
              "Export data in version ipfix format";
            uses apply-advanced;
    
            container template {
              description
                "Template configuration";
              uses apply-advanced;
    
              leaf template-name {
                junos:must "("services flow-monitoring version-ipfix template $$ bridge-template")";
                junos:must-message "Template type must match input protocol";
                junos:must "((!(".. .. .. .. inline-jflow source-address") || (".. .. .. .. inline-jflow source-address" && all ".. .. .. .. flow-server <*> version-ipfix template $$")))";
                junos:must-message "All the collector under same family should share the same template in Inline-Jflow";
                type string;
                description "Template name";
              }
            }  // container template
          }  // container version-ipfix
        }  // grouping cflowd_instance_bridge_sampling_type
    
        grouping packet_export_inline_instance {
          uses apply-advanced;
    
          leaf source-address {
            type jt:ipaddr;
            description
              "Address to use for generating monitored packets";
          }
    
          leaf flow-export-rate {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "1 .. 3200";
              }
            }
            description
              "Flow export rate of monitored packets in kpps";
          }
        }  // grouping packet_export_inline_instance
    
        grouping sampling_instance_inet6_output_type {
          description
            "Configure output options for packet sampling";
          uses apply-advanced;
    
          leaf aggregate-export-interval {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "90 .. 1800";
              }
            }
            units "seconds";
            default "90";
            description
              "Interval of exporting aggregate accounting information";
          }
    
          list flow-server {
            junos:must "((!(any ".. interface <*>") || all ".. interface <*> source-address"))";
            junos:must-message "'output interface source-address' must be specified with 'flow-server' and 'interface'";
            key "name";
            max-elements 8;
            description
              "Configure sending traffic aggregates in cflowd format";
            uses cflowd_instance_inet6_sampling_type;
          }  // list flow-server
    
          container inline-jflow {
            junos:must "(any ".. flow-server <*>")";
            junos:must-message "'flow-server' must be specified with the inline Jflow";
            presence "enable inline-jflow";
            description
              "Inline processing of sampled packets";
            uses packet_export_inline_instance;
          }  // container inline-jflow
        }  // grouping sampling_instance_inet6_output_type
    
        grouping cflowd_instance_inet6_sampling_type {
          leaf name {
            type jt:ipaddr;
            description
              "Name of host collecting cflowd packets";
          }
    
          uses apply-advanced;
    
          leaf port {
            type union {
              type uint16;
              type string {
                pattern "<.*>|$.*";
              }
            }
            description
              "UDP port number on host collecting cflowd packets";
          }
    
          leaf dscp {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "DSCP can be configured for inline-jflow";
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint8 {
                range "0 .. 63";
              }
            }
            default "0";
            description
              "Numeric DSCP value in the range 0 to 63";
          }
    
          leaf forwarding-class {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "forwarding-class can be configured for inline-jflow";
            type string {
              length "1 .. 64";
            }
            description
              "Forwarding-class for exported jflow packets, applicable only for inline-jflow";
          }
    
          leaf routing-instance {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "Routing Instances can be configured for inline-jflow";
            junos:must "("routing-instances $$ instance-type vrf")";
            junos:must-message "routing instance should be defined and should be of type Virtual routing forwarding instance(VRF)";
            type string;
            description
              "Name of routing instance on which flow collector is reachable";
          }
    
          leaf autonomous-system-type {
            type enumeration {
              enum "origin" {
                value 0;
                description
                  "Export origin-AS numbers";
              }
              enum "peer" {
                value 1;
                description
                  "Export peer-AS numbers";
              }
            }
            default "origin";
            description
              "Type of autonomous system number to export";
          }
    
          container aggregation {
            junos:must "(!(any ".. .. flow-server <*> version9"))";
            junos:must-message "Select only one version";
            description
              "Aggregations to perform for exported flows (version 8 only)";
            uses aggregation_type;
          }  // container aggregation
    
          choice local-dump-choice {
            leaf local-dump {
              type empty;
              description
                "Dump cflowd records to log file before exporting";
            }
            leaf no-local-dump {
              type empty;
              description
                "Don't dump cflowd records to log file before exporting";
            }
          }  // choice local-dump-choice
    
          leaf source-address {
            type jt:ipv4addr;
            description
              "Source IPv4 address for cflowd packets";
          }
    
          container version9 {
            junos:must "((!(any ".. .. .. .. inet output flow-server <*> version") || !(any ".. .. .. .. inet output interface <*>")))";
            junos:must-message "Select only one version or configure only RE based samping under family inet";
            junos:must "((any ".. .. interface <*>" || ".. .. inline-jflow"))";
            junos:must-message "Service PIC or inline-jflow (j-series and SRX only) must be specified for version9";
            presence "enable version9";
            description
              "Export data in version 9 format";
            uses apply-advanced;
    
            container template {
              description
                "Template configuration";
              uses apply-advanced;
    
              leaf template-name {
                junos:must "("services flow-monitoring version9 template $$ ipv6-template")";
                junos:must-message "Template type must match input protocol";
                junos:must "((!(".. .. .. .. inline-jflow source-address") || (".. .. .. .. inline-jflow source-address" && all ".. .. .. .. flow-server <*> version9 template $$")))";
                junos:must-message "All the collector under same family should share the same template in Inline-Jflow";
                type string;
                description "Template name";
              }
            }  // container template
          }  // container version9
    
          container version-ipfix {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "inline Jflow must be specified for version-ipfix";
            presence "enable version-ipfix";
            description
              "Export data in version ipfix format";
            uses apply-advanced;
    
            container template {
              description
                "Template configuration";
              uses apply-advanced;
    
              leaf template-name {
                junos:must "("services flow-monitoring version-ipfix template $$ ipv6-template")";
                junos:must-message "Template type must match input protocol";
                junos:must "((!(".. .. .. .. inline-jflow source-address") || (".. .. .. .. inline-jflow source-address" && all ".. .. .. .. flow-server <*> version-ipfix template $$")))";
                junos:must-message "All the collector under same family should share the same template in Inline-Jflow";
                type string;
                description "Template name";
              }
            }  // container template
          }  // container version-ipfix
        }  // grouping cflowd_instance_inet6_sampling_type
    
        grouping sampling_instance_inet_global_output_type {
          description
            "Configure output options for packet sampling";
          uses apply-advanced;
    
          leaf aggregate-export-interval {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "90 .. 1800";
              }
            }
            units "seconds";
            default "90";
            description
              "Interval of exporting aggregate accounting information";
          }
    
          container file {
            junos:must "(!(any ".. extension-service <*>"))";
            junos:must-message "This configuration is not required with 'extension-service'";
            description
              "Configure parameters for dumping sampled packets";
            choice enable-disable {
              leaf disable {
                type empty;
                description
                  "Disable sampled packet dumps";
              }
            }  // choice enable-disable
    
            leaf filename {
              type string {
                junos:posix-pattern "![/ %]";
                junos:pattern-message "Must not contain '/', % or a space";
                length "1 .. 1024";
              }
              description
                "Name of file to contain sampled packet dumps";
            }
    
            leaf files {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "2 .. 10000";
                }
              }
              default "10";
              description
                "Maximum number of sampled packet dump files";
            }
    
            leaf size {
              type string;
              description
                "Maximum sample dump file size";
            }
    
            choice world-readable-choice {
              leaf world-readable {
                type empty;
                description
                  "Allow any user to read the sampled dump";
              }
              leaf no-world-readable {
                type empty;
                description
                  "Don't allow any user to read the sampled dump";
              }
            }  // choice world-readable-choice
    
            choice stamp-choice {
              leaf stamp {
                type empty;
                description
                  "Timestamp every packet in the dump";
              }
              leaf no-stamp {
                type empty;
                description
                  "Don't timestamp every packet in the dump";
              }
            }  // choice stamp-choice
          }  // container file
    
          container port-mirroring {
            junos:must "(!(any ".. extension-service <*>"))";
            junos:must-message "This configuration is not required with 'extension-service'";
            presence "enable port-mirroring";
            description
              "Configure sending sampled traffic out through an interface";
            uses inet_pm_family_output_type;
          }  // container port-mirroring
    
          list flow-server {
            junos:must "((!(any ".. interface <*>") || all ".. interface <*> source-address"))";
            junos:must-message "'output interface source-address' must be specified with 'flow-server' and 'interface'";
            key "name";
            max-elements 8;
            description
              "Configure sending traffic aggregates in cflowd format";
            uses cflowd_sampling_inet_type;
          }  // list flow-server
    
          container inline-jflow {
            junos:must "(any ".. flow-server <*>")";
            junos:must-message "'flow-server' must be specified with the inline Jflow";
            presence "enable inline-jflow";
            description
              "Inline processing of sampled packets";
            uses packet_export_inline;
          }  // container inline-jflow
        }  // grouping sampling_instance_inet_global_output_type
    
        grouping cflowd_sampling_inet_type {
          leaf name {
            type jt:ipaddr;
            description
              "Name of host collecting cflowd packets";
          }
    
          uses apply-advanced;
    
          leaf port {
            type union {
              type uint16;
              type string {
                pattern "<.*>|$.*";
              }
            }
            description
              "UDP port number on host collecting cflowd packets";
          }
    
          leaf dscp {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "DSCP can be configured for inline-jflow";
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint8 {
                range "0 .. 63";
              }
            }
            default "0";
            description
              "Numeric DSCP value in the range 0 to 63";
          }
    
          leaf forwarding-class {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "forwarding-class can be configured for inline-jflow";
            type string {
              length "1 .. 64";
            }
            description
              "Forwarding-class for exported jflow packets, applicable only for inline-jflow";
          }
    
          leaf routing-instance {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "Routing Instances can be configured for inline-jflow";
            junos:must "("routing-instances $$ instance-type vrf")";
            junos:must-message "routing instance should be defined and should be of type Virtual routing forwarding instance(VRF)";
            type string;
            description
              "Name of routing instance on which flow collector is reachable";
          }
    
          leaf autonomous-system-type {
            type enumeration {
              enum "origin" {
                value 0;
                description
                  "Export origin-AS numbers";
              }
              enum "peer" {
                value 1;
                description
                  "Export peer-AS numbers";
              }
            }
            default "origin";
            description
              "Type of autonomous system number to export";
          }
    
          container aggregation {
            junos:must "(!(any ".. .. flow-server <*> version9"))";
            junos:must-message "Select only one version";
            description
              "Aggregations to perform for exported flows (version 8 only)";
            uses aggregation_type;
          }  // container aggregation
    
          choice local-dump-choice {
            leaf local-dump {
              type empty;
              description
                "Dump cflowd records to log file before exporting";
            }
            leaf no-local-dump {
              type empty;
              description
                "Don't dump cflowd records to log file before exporting";
            }
          }  // choice local-dump-choice
    
          leaf source-address {
            type jt:ipv4addr;
            description
              "Source IPv4 address for cflowd packets";
          }
    
          container version9 {
            junos:must "((!(any ".. .. .. .. inet output flow-server <*> version") || !(any ".. .. .. .. inet output interface <*>")))";
            junos:must-message "Select only one version or configure only RE based samping under family inet";
            junos:must "((any ".. .. interface <*>" || ".. .. inline-jflow"))";
            junos:must-message "Service PIC or inline-jflow (j-series and SRX only) must be specified for version9";
            presence "enable version9";
            description
              "Export data in version 9 format";
            uses apply-advanced;
    
            container template {
              description
                "Template configuration";
              uses apply-advanced;
    
              leaf template-name {
                junos:must "(("services flow-monitoring version9 template $$ ipv4-template" || "services flow-monitoring version9 template $$ peer-as-billing-template"))";
                junos:must-message "Template type must match input protocol";
                type string;
                description "Template name";
              }
            }  // container template
          }  // container version9
    
          container version-ipfix {
            presence "enable version-ipfix";
            status deprecated;
            description
              "Export data in version ipfix format";
            uses apply-advanced;
    
            container template {
              description
                "Template configuration";
              uses apply-advanced;
    
              leaf template-name {
                type string;
                description "Template name";
              }
            }  // container template
          }  // container version-ipfix
    
          leaf version {
            junos:must "(!(any ".. .. flow-server <*> version9"))";
            junos:must-message "Select only one version";
            type enumeration {
              enum "5" {
                junos:must "("system ntp")";
                junos:must-message " NTP must be configured for sampling v5/8/500 to work properly";
                value 0;
                description
                  "Export cflowd aggregates in version 5 format";
              }
              enum "8" {
                junos:must "("system ntp")";
                junos:must-message " NTP must be configured for sampling v5/8/500 to work properly";
                value 1;
                description
                  "Export cflowd aggregates in version 8 format";
              }
              enum "500" {
                junos:must "(!(".. .. interface"))";
                junos:must-message "This feature is only supported for RE based sampling";
                junos:must "("system ntp")";
                junos:must-message " NTP must be configured for sampling v5/8/500 to work properly";
                value 2;
                description
                  "Export cflowd aggregates in ASN 500 format";
              }
            }
            default "5";
            description
              "Format of exported cflowd aggregates";
          }
        }  // grouping cflowd_sampling_inet_type
    
        grouping sampling_instance_inet_output_type {
          description
            "Configure output options for packet sampling";
          uses apply-advanced;
    
          leaf aggregate-export-interval {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "90 .. 1800";
              }
            }
            units "seconds";
            default "90";
            description
              "Interval of exporting aggregate accounting information";
          }
    
          list flow-server {
            junos:must "((!(any ".. interface <*>") || all ".. interface <*> source-address"))";
            junos:must-message "'output interface source-address' must be specified with 'flow-server' and 'interface'";
            junos:must "((".. interface" || ".. inline-jflow"))";
            junos:must-message "Output 'interface' or 'inline Jflow' should be configured with flow-server";
            key "name";
            max-elements 8;
            description
              "Configure sending traffic aggregates in cflowd format";
            uses cflowd_instance_inet_sampling_type;
          }  // list flow-server
    
          container inline-jflow {
            junos:must "(any ".. flow-server <*>")";
            junos:must-message "'flow-server' must be specified with the inline Jflow";
            presence "enable inline-jflow";
            description
              "Inline processing of sampled packets";
            uses packet_export_inline_instance;
          }  // container inline-jflow
        }  // grouping sampling_instance_inet_output_type
    
        grouping cflowd_instance_inet_sampling_type {
          leaf name {
            type jt:ipaddr;
            description
              "Name of host collecting cflowd packets";
          }
    
          uses apply-advanced;
    
          leaf port {
            type union {
              type uint16;
              type string {
                pattern "<.*>|$.*";
              }
            }
            description
              "UDP port number on host collecting cflowd packets";
          }
    
          leaf dscp {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "DSCP can be configured for inline-jflow";
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint8 {
                range "0 .. 63";
              }
            }
            default "0";
            description
              "Numeric DSCP value in the range 0 to 63";
          }
    
          leaf forwarding-class {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "forwarding-class can be configured for inline-jflow";
            type string {
              length "1 .. 64";
            }
            description
              "Forwarding-class for exported jflow packets, applicable only for inline-jflow";
          }
    
          leaf routing-instance {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "Routing Instances can be configured for inline-jflow";
            junos:must "("routing-instances $$ instance-type vrf")";
            junos:must-message "routing instance should be defined and should be of type Virtual routing forwarding instance(VRF)";
            type string;
            description
              "Name of routing instance on which flow collector is reachable";
          }
    
          leaf autonomous-system-type {
            type enumeration {
              enum "origin" {
                value 0;
                description
                  "Export origin-AS numbers";
              }
              enum "peer" {
                value 1;
                description
                  "Export peer-AS numbers";
              }
            }
            default "origin";
            description
              "Type of autonomous system number to export";
          }
    
          container aggregation {
            junos:must "(!(any ".. .. flow-server <*> version9"))";
            junos:must-message "Select only one version";
            description
              "Aggregations to perform for exported flows (version 8 only)";
            uses aggregation_type;
          }  // container aggregation
    
          choice local-dump-choice {
            leaf local-dump {
              type empty;
              description
                "Dump cflowd records to log file before exporting";
            }
            leaf no-local-dump {
              type empty;
              description
                "Don't dump cflowd records to log file before exporting";
            }
          }  // choice local-dump-choice
    
          leaf source-address {
            type jt:ipv4addr;
            description
              "Source IPv4 address for cflowd packets";
          }
    
          container version9 {
            junos:must "((!(any ".. .. .. .. inet output flow-server <*> version") || !(any ".. .. .. .. inet output interface <*>")))";
            junos:must-message "Select only one version or configure only RE based samping under family inet";
            junos:must "((any ".. .. interface <*>" || ".. .. inline-jflow"))";
            junos:must-message "Service PIC or inline-jflow (j-series and SRX only) must be specified for version9";
            presence "enable version9";
            description
              "Export data in version 9 format";
            uses apply-advanced;
    
            container template {
              description
                "Template configuration";
              uses apply-advanced;
    
              leaf template-name {
                junos:must "("services flow-monitoring version9 template $$ ipv4-template")";
                junos:must-message "Template type must match input protocol";
                junos:must "((!(".. .. .. .. inline-jflow source-address") || (".. .. .. .. inline-jflow source-address" && all ".. .. .. .. flow-server <*> version9 template $$")))";
                junos:must-message "All the collector under same family should share the same template in Inline-Jflow";
                type string;
                description "Template name";
              }
            }  // container template
          }  // container version9
    
          container version-ipfix {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "inline Jflow must be specified for version-ipfix";
            presence "enable version-ipfix";
            description
              "Export data in version ipfix format";
            uses apply-advanced;
    
            container template {
              description
                "Template configuration";
              uses apply-advanced;
    
              leaf template-name {
                junos:must "("services flow-monitoring version-ipfix template $$ ipv4-template")";
                junos:must-message "Template type must match input protocol";
                junos:must "((!(".. .. .. .. inline-jflow source-address") || (".. .. .. .. inline-jflow source-address" && all ".. .. .. .. flow-server <*> version-ipfix template $$")))";
                junos:must-message "All the collector under same family should share the same template in Inline-Jflow";
                type string;
                description "Template name";
              }
            }  // container template
          }  // container version-ipfix
    
          leaf version {
            junos:must "(!(any ".. .. .. .. .. family mpls output flow-server <*> version9"))";
            junos:must-message "Select only one version";
            junos:must "(!(any ".. .. .. .. .. family inet6 output flow-server <*> version9"))";
            junos:must-message "Select only one version";
            junos:must "(!(any ".. .. .. .. .. family inet output flow-server <*> version9"))";
            junos:must-message "Select only one version";
            junos:must "(!(any ".. .. flow-server <*> version-ipfix"))";
            junos:must-message "Select only one version";
            junos:must "(!(any ".. .. flow-server <*> version9"))";
            junos:must-message "Select only one version";
            type enumeration {
              enum "5" {
                junos:must "("system ntp")";
                junos:must-message " NTP must be configured for sampling v5/8/500 to work properly";
                value 0;
                description
                  "Export cflowd aggregates in version 5 format";
              }
              enum "8" {
                junos:must "("system ntp")";
                junos:must-message " NTP must be configured for sampling v5/8/500 to work properly";
                value 1;
                description
                  "Export cflowd aggregates in version 8 format";
              }
            }
            default "5";
            description
              "Format of exported cflowd aggregates";
          }
        }  // grouping cflowd_instance_inet_sampling_type
    
        grouping sampling_instance_input_type {
          description
            "Configure input options for packet sampling";
          uses apply-advanced;
    
          leaf rate {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32;
            }
            description
              "Ratio of packets to be sampled (1 out of N)";
          }
    
          leaf run-length {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "0 .. 20";
              }
            }
            default "0";
            description
              "Number of samples after initial trigger";
          }
    
          leaf max-packets-per-second {
            type union {
              type uint16;
              type string {
                pattern "<.*>|$.*";
              }
            }
            default "1000";
            description
              "Threshold of samples per second before dropping";
          }
    
          leaf maximum-packet-length {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "0 .. 9192";
              }
            }
            units "bytes";
            default "0";
            description
              "Maximum length of the sampled packet";
          }
        }  // grouping sampling_instance_input_type
    
        grouping sampling_instance_mpls_output_type {
          description
            "Configure output options for packet sampling";
          uses apply-advanced;
    
          leaf aggregate-export-interval {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "90 .. 1800";
              }
            }
            units "seconds";
            default "90";
            description
              "Interval of exporting aggregate accounting information";
          }
    
          list flow-server {
            junos:must "((!(any ".. interface <*>") || all ".. interface <*> source-address"))";
            junos:must-message "'output interface source-address' must be specified with 'flow-server' and 'interface'";
            junos:must "((".. interface" || ".. inline-jflow"))";
            junos:must-message "Output 'interface' or 'inline Jflow' should be configured with flow-server";
            key "name";
            max-elements 8;
            description
              "Configure sending traffic aggregates in cflowd format";
            uses cflowd_instance_mpls_sampling_type;
          }  // list flow-server
    
          container inline-jflow {
            junos:must "(any ".. flow-server <*>")";
            junos:must-message "'flow-server' must be specified with the inline Jflow";
            presence "enable inline-jflow";
            description
              "Inline processing of sampled packets";
            uses packet_export_inline_instance;
          }  // container inline-jflow
        }  // grouping sampling_instance_mpls_output_type
    
        grouping cflowd_instance_mpls_sampling_type {
          leaf name {
            type jt:ipaddr;
            description
              "Name of host collecting cflowd packets";
          }
    
          uses apply-advanced;
    
          leaf port {
            type union {
              type uint16;
              type string {
                pattern "<.*>|$.*";
              }
            }
            description
              "UDP port number on host collecting cflowd packets";
          }
    
          leaf dscp {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "DSCP can be configured for inline-jflow";
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint8 {
                range "0 .. 63";
              }
            }
            default "0";
            description
              "Numeric DSCP value in the range 0 to 63";
          }
    
          leaf forwarding-class {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "forwarding-class can be configured for inline-jflow";
            type string {
              length "1 .. 64";
            }
            description
              "Forwarding-class for exported jflow packets, applicable only for inline-jflow";
          }
    
          leaf routing-instance {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "Routing Instances can be configured for inline-jflow";
            junos:must "("routing-instances $$ instance-type vrf")";
            junos:must-message "routing instance should be defined and should be of type Virtual routing forwarding instance(VRF)";
            type string;
            description
              "Name of routing instance on which flow collector is reachable";
          }
    
          leaf autonomous-system-type {
            type enumeration {
              enum "origin" {
                value 0;
                description
                  "Export origin-AS numbers";
              }
              enum "peer" {
                value 1;
                description
                  "Export peer-AS numbers";
              }
            }
            default "origin";
            description
              "Type of autonomous system number to export";
          }
    
          container aggregation {
            junos:must "(!(any ".. .. flow-server <*> version9"))";
            junos:must-message "Select only one version";
            description
              "Aggregations to perform for exported flows (version 8 only)";
            uses aggregation_type;
          }  // container aggregation
    
          choice local-dump-choice {
            leaf local-dump {
              type empty;
              description
                "Dump cflowd records to log file before exporting";
            }
            leaf no-local-dump {
              type empty;
              description
                "Don't dump cflowd records to log file before exporting";
            }
          }  // choice local-dump-choice
    
          leaf source-address {
            type jt:ipv4addr;
            description
              "Source IPv4 address for cflowd packets";
          }
    
          container version-ipfix {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "inline Jflow must be specified for version-ipfix";
            presence "enable version-ipfix";
            description
              "Export data in version ipfix format";
            uses apply-advanced;
    
            container template {
              description
                "Template configuration";
              uses apply-advanced;
    
              leaf template-name {
                junos:must "(("services flow-monitoring version-ipfix template $$ mpls-template" || ("services flow-monitoring version-ipfix template $$ mpls-ipv4-template" || "services flow-monitoring version-ipfix template $$ mpls-ipvx-template")))";
                junos:must-message "Template type must match input protocol";
                junos:must "((!(".. .. .. .. inline-jflow source-address") || (".. .. .. .. inline-jflow source-address" && all ".. .. .. .. flow-server <*> version-ipfix template $$")))";
                junos:must-message "All the collector under same family should share the same template in Inline-Jflow";
                type string;
                description "Template name";
              }
            }  // container template
          }  // container version-ipfix
        }  // grouping cflowd_instance_mpls_sampling_type
    
        grouping sampling_instance_vpls_output_type {
          description
            "Configure output options for packet sampling";
          uses apply-advanced;
    
          list flow-server {
            junos:must "(".. inline-jflow")";
            junos:must-message "Output 'inline Jflow' should be configured with flow-server";
            key "name";
            max-elements 8;
            description
              "Configure sending traffic aggregates in cflowd format";
            uses cflowd_instance_vpls_sampling_type;
          }  // list flow-server
    
          container inline-jflow {
            junos:must "(any ".. flow-server <*>")";
            junos:must-message "'flow-server' must be specified with the inline Jflow";
            presence "enable inline-jflow";
            description
              "Inline processing of sampled packets";
            uses packet_export_inline_instance;
          }  // container inline-jflow
        }  // grouping sampling_instance_vpls_output_type
    
        grouping cflowd_instance_vpls_sampling_type {
          leaf name {
            type jt:ipaddr;
            description
              "Name of host collecting cflowd packets";
          }
    
          uses apply-advanced;
    
          leaf port {
            type union {
              type uint16;
              type string {
                pattern "<.*>|$.*";
              }
            }
            description
              "UDP port number on host collecting cflowd packets";
          }
    
          leaf dscp {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "DSCP can be configured for inline-jflow";
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint8 {
                range "0 .. 63";
              }
            }
            default "0";
            description
              "Numeric DSCP value in the range 0 to 63";
          }
    
          leaf forwarding-class {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "forwarding-class can be configured for inline-jflow";
            type string {
              length "1 .. 64";
            }
            description
              "Forwarding-class for exported jflow packets, applicable only for inline-jflow";
          }
    
          leaf routing-instance {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "Routing Instances can be configured for inline-jflow";
            junos:must "("routing-instances $$ instance-type vrf")";
            junos:must-message "routing instance should be defined and should be of type Virtual routing forwarding instance(VRF)";
            type string;
            description
              "Name of routing instance on which flow collector is reachable";
          }
    
          container version-ipfix {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "inline Jflow must be specified for version-ipfix";
            presence "enable version-ipfix";
            description
              "Export data in version ipfix format";
            uses apply-advanced;
    
            container template {
              description
                "Template configuration";
              uses apply-advanced;
    
              leaf template-name {
                junos:must "("services flow-monitoring version-ipfix template $$ vpls-template")";
                junos:must-message "Template type must match input protocol";
                junos:must "((!(".. .. .. .. inline-jflow source-address") || (".. .. .. .. inline-jflow source-address" && all ".. .. .. .. flow-server <*> version-ipfix template $$")))";
                junos:must-message "All the collector under same family should share the same template in Inline-Jflow";
                type string;
                description "Template name";
              }
            }  // container template
          }  // container version-ipfix
        }  // grouping cflowd_instance_vpls_sampling_type
    
        grouping sampling_output_type {
          description
            "Configure output options for packet sampling";
          uses apply-advanced;
    
          leaf aggregate-export-interval {
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint32 {
                range "90 .. 1800";
              }
            }
            units "seconds";
            default "90";
            description
              "Interval of exporting aggregate accounting information";
          }
    
          container file {
            junos:must "(!(any ".. extension-service <*>"))";
            junos:must-message "This configuration is not required with 'extension-service'";
            description
              "Configure parameters for dumping sampled packets";
            choice enable-disable {
              leaf disable {
                type empty;
                description
                  "Disable sampled packet dumps";
              }
            }  // choice enable-disable
    
            leaf filename {
              type string {
                junos:posix-pattern "![/ %]";
                junos:pattern-message "Must not contain '/', % or a space";
                length "1 .. 1024";
              }
              description
                "Name of file to contain sampled packet dumps";
            }
    
            leaf files {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "2 .. 10000";
                }
              }
              default "10";
              description
                "Maximum number of sampled packet dump files";
            }
    
            leaf size {
              type string;
              description
                "Maximum sample dump file size";
            }
    
            choice world-readable-choice {
              leaf world-readable {
                type empty;
                description
                  "Allow any user to read the sampled dump";
              }
              leaf no-world-readable {
                type empty;
                description
                  "Don't allow any user to read the sampled dump";
              }
            }  // choice world-readable-choice
    
            choice stamp-choice {
              leaf stamp {
                type empty;
                description
                  "Timestamp every packet in the dump";
              }
              leaf no-stamp {
                type empty;
                description
                  "Don't timestamp every packet in the dump";
              }
            }  // choice stamp-choice
          }  // container file
    
          container port-mirroring {
            junos:must "(!(any ".. extension-service <*>"))";
            junos:must-message "This configuration is not required with 'extension-service'";
            presence "enable port-mirroring";
            description
              "Configure sending sampled traffic out through an interface";
            uses inet_pm_family_output_type;
          }  // container port-mirroring
    
          list flow-server {
            junos:must "((!(any ".. interface <*>") || all ".. interface <*> source-address"))";
            junos:must-message "'output interface source-address' must be specified with 'flow-server' and 'interface'";
            key "name";
            max-elements 8;
            description
              "Configure sending traffic aggregates in cflowd format";
            uses cflowd_sampling_type;
          }  // list flow-server
    
          container inline-jflow {
            junos:must "(any ".. flow-server <*>")";
            junos:must-message "'flow-server' must be specified with the inline Jflow";
            presence "enable inline-jflow";
            description
              "Inline processing of sampled packets";
            uses packet_export_inline;
          }  // container inline-jflow
        }  // grouping sampling_output_type
    
        grouping cflowd_sampling_type {
          leaf name {
            type jt:ipaddr;
            description
              "Name of host collecting cflowd packets";
          }
    
          uses apply-advanced;
    
          leaf port {
            type union {
              type uint16;
              type string {
                pattern "<.*>|$.*";
              }
            }
            description
              "UDP port number on host collecting cflowd packets";
          }
    
          leaf dscp {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "DSCP can be configured for inline-jflow";
            type union {
              type string {
                pattern "<.*>|$.*";
              }
              type uint8 {
                range "0 .. 63";
              }
            }
            default "0";
            description
              "Numeric DSCP value in the range 0 to 63";
          }
    
          leaf forwarding-class {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "forwarding-class can be configured for inline-jflow";
            type string {
              length "1 .. 64";
            }
            description
              "Forwarding-class for exported jflow packets, applicable only for inline-jflow";
          }
    
          leaf routing-instance {
            junos:must "(".. .. inline-jflow")";
            junos:must-message "Routing Instances can be configured for inline-jflow";
            junos:must "("routing-instances $$ instance-type vrf")";
            junos:must-message "routing instance should be defined and should be of type Virtual routing forwarding instance(VRF)";
            type string;
            description
              "Name of routing instance on which flow collector is reachable";
          }
    
          leaf autonomous-system-type {
            type enumeration {
              enum "origin" {
                value 0;
                description
                  "Export origin-AS numbers";
              }
              enum "peer" {
                value 1;
                description
                  "Export peer-AS numbers";
              }
            }
            default "origin";
            description
              "Type of autonomous system number to export";
          }
    
          container aggregation {
            junos:must "(!(any ".. .. flow-server <*> version9"))";
            junos:must-message "Select only one version";
            description
              "Aggregations to perform for exported flows (version 8 only)";
            uses aggregation_type;
          }  // container aggregation
    
          choice local-dump-choice {
            leaf local-dump {
              type empty;
              description
                "Dump cflowd records to log file before exporting";
            }
            leaf no-local-dump {
              type empty;
              description
                "Don't dump cflowd records to log file before exporting";
            }
          }  // choice local-dump-choice
    
          leaf source-address {
            type jt:ipv4addr;
            description
              "Source IPv4 address for cflowd packets";
          }
    
          container version9 {
            junos:must "(!(any ".. .. flow-server <*> version"))";
            junos:must-message "Select only one version";
            junos:must "((any ".. .. interface <*>" || ".. .. inline-jflow"))";
            junos:must-message "Service PIC or inline-jflow (j-series and SRX only) must be specified for version9";
            presence "enable version9";
            description
              "Export data in version 9 format";
            uses apply-advanced;
    
            container template {
              description
                "Template configuration";
              uses apply-advanced;
    
              leaf template-name {
                junos:must "((("services flow-monitoring version9 template $$ ipv4-template" && "forwarding-options sampling input family inet") || (("services flow-monitoring version9 template $$ ipv6-template" && "forwarding-options sampling input family inet6") || (("services flow-monitoring version9 template $$ mpls-template" && "forwarding-options sampling input family mpls") || (("services flow-monitoring version9 template $$ mpls-ipv4-template" && "forwarding-options sampling input family mpls") || ("services flow-monitoring version9 template $$ mpls-ipvx-template" && "forwarding-options sampling input family mpls"))))))";
                junos:must-message "Template type must match input protocol";
                type string;
                description "Template name";
              }
            }  // container template
          }  // container version9
    
          container version-ipfix {
            presence "enable version-ipfix";
            status deprecated;
            description
              "Export data in version ipfix format";
            uses apply-advanced;
    
            container template {
              description
                "Template configuration";
              uses apply-advanced;
    
              leaf template-name {
                type string;
                description "Template name";
              }
            }  // container template
          }  // container version-ipfix
    
          leaf version {
            junos:must "("forwarding-options sampling input family inet")";
            junos:must-message "input 'family inet' must be configured";
            junos:must "(!(any ".. .. flow-server <*> version9"))";
            junos:must-message "Select only one version";
            type enumeration {
              enum "5" {
                junos:must "("system ntp")";
                junos:must-message " NTP must be configured for sampling v5/8/500 to work properly";
                value 0;
                description
                  "Export cflowd aggregates in version 5 format";
              }
              enum "8" {
                junos:must "("system ntp")";
                junos:must-message " NTP must be configured for sampling v5/8/500 to work properly";
                value 1;
                description
                  "Export cflowd aggregates in version 8 format";
              }
              enum "500" {
                junos:must "(!(".. .. interface"))";
                junos:must-message "This feature is only supported for RE based sampling";
                junos:must "("system ntp")";
                junos:must-message " NTP must be configured for sampling v5/8/500 to work properly";
                value 2;
                description
                  "Export cflowd aggregates in ASN 500 format";
              }
            }
            default "5";
            description
              "Format of exported cflowd aggregates";
          }
        }  // grouping cflowd_sampling_type
    
        grouping sampling_traceoptions_type {
          description
            "Configure packet sampling traceoptions";
          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
        }  // grouping sampling_traceoptions_type
    
        grouping server-group-type {
          uses apply-advanced;
    
          list server-group {
            key "name";
            ordered-by user;
            description
              "One or more server groups";
            leaf name {
              type string {
                junos:posix-pattern "^[A-Za-z0-9][_0-9A-Za-z-]*$";
                junos:pattern-message "Must be a non-reserved string of 64 characters or less";
                length "1 .. 64";
              }
              description "Server group name";
            }
    
            uses apply-advanced;
    
            list address {
              key "name";
              max-elements 32;
              ordered-by user;
              description
                "IP Address of one or more DHCP servers";
              leaf name {
                type jt:ipaddr;
                description
                  "IP Address of DHCP server";
              }
    
              uses apply-advanced;
            }  // list address
          }  // list server-group
        }  // grouping server-group-type
    
        grouping server-match-action-choice {
          uses apply-advanced;
    
          choice v4-action-choice {
            leaf forward-only {
              type empty;
              description
                "Forward without subscriber services";
            }
            leaf create-relay-entry {
              type empty;
              description
                "Create relay entry and allow subscriber services";
            }
          }  // choice v4-action-choice
        }  // grouping server-match-action-choice
    
        grouping server-match-v6-ascii-hex {
          uses apply-advanced;
    
          list ascii {
            key "name";
            description "ASCII string";
            leaf name {
              type string {
                length "1 .. 256";
              }
              description "ASCII string";
            }
    
            uses apply-advanced;
    
            choice server-match-action-choice {
              leaf forward-only {
                type empty;
                description
                  "Forward without subscriber services when a match is made";
              }
              leaf create-relay-entry {
                type empty;
                description
                  "Create relay entry and allow subscriber services";
              }
            }  // choice server-match-action-choice
          }  // list ascii
    
          list hexadecimal {
            key "name";
            description "Hexadecimal string";
            leaf name {
              type string {
                junos:posix-pattern "^[[:xdigit:]]+$";
                junos:pattern-message "Must be hexadecimal digits (0-9, a-f, A-F)";
                length "1 .. 512";
              }
              description "Hexadecimal string";
            }
    
            uses apply-advanced;
    
            choice server-match-action-choice {
              leaf forward-only {
                type empty;
                description
                  "Forward without subscriber services when a match is made";
              }
              leaf create-relay-entry {
                type empty;
                description
                  "Create relay entry and allow subscriber services";
              }
            }  // choice server-match-action-choice
          }  // list hexadecimal
        }  // grouping server-match-v6-ascii-hex
    
        grouping v6-relay-option-interface-id-type {
          description "Interface ID processing";
          uses apply-advanced;
    
          container prefix {
            description
              "Add prefix to circuit/interface-id or remote-id";
            uses apply-advanced;
    
            leaf host-name {
              type empty;
              description
                "Add router host name to circuit / interface-id or remote-id";
            }
    
            leaf logical-system-name {
              type empty;
              description
                "Add logical system name to circuit / interface-id or remote-id";
            }
    
            leaf routing-instance-name {
              type empty;
              description
                "Add routing instance name to circuit / interface-id or remote-id";
            }
          }  // container prefix
    
          leaf use-interface-description {
            junos:must "(!(".. require-interface-description"))";
            junos:must-message "use-interface-description may not be set with require-interface-desciption";
            type enumeration {
              enum "logical" {
                value 0;
                description
                  "Use the logical interface description";
              }
              enum "device" {
                value 1;
                description
                  "Use the device interface description";
              }
            }
            description
              "Use interface description instead of circuit identifier";
          }
    
          leaf use-vlan-id {
            junos:must "((!(".. no-vlan-interface-name") && (!(".. use-interface-description") && !(".. require-interface-description"))))";
            junos:must-message "Vlan-tag cannot be added as no-vlan-interface-name or interface-description is configured";
            type empty;
            description
              "Use VLAN id instead of name";
          }
    
          leaf no-vlan-interface-name {
            type empty;
            description
              "Not include vlan or interface name";
          }
    
          leaf include-irb-and-l2 {
            type empty;
            description
              "Include IRB and L2 interface name";
          }
    
          container use-option-82 {
            presence "enable use-option-82";
            description
              "Use option-82 circuit-id for interface-id";
            uses v6-relay-option-cid-rid-action;
          }  // container use-option-82
    
          container keep-incoming-interface-id {
            presence
              "enable keep-incoming-interface-id";
            description
              "Keep incoming interface identifier";
            uses v6-relay-option-cid-rid-action;
          }  // container keep-incoming-interface-id
        }  // grouping v6-relay-option-interface-id-type
    
        grouping v6-relay-option-cid-rid-action {
          uses apply-advanced;
    
          leaf strict {
            type empty;
            description
              "Drop packet if id not present";
          }
        }  // grouping v6-relay-option-cid-rid-action
    
        grouping v6-relay-option-remote-id-type {
          description "Remote ID processing";
          uses apply-advanced;
    
          container prefix {
            description
              "Add prefix to circuit/interface-id or remote-id";
            uses apply-advanced;
    
            leaf host-name {
              type empty;
              description
                "Add router host name to circuit / interface-id or remote-id";
            }
    
            leaf logical-system-name {
              type empty;
              description
                "Add logical system name to circuit / interface-id or remote-id";
            }
    
            leaf routing-instance-name {
              type empty;
              description
                "Add routing instance name to circuit / interface-id or remote-id";
            }
          }  // container prefix
    
          leaf use-interface-description {
            junos:must "(!(".. require-interface-description"))";
            junos:must-message "use-interface-description may not be set with require-interface-desciption";
            type enumeration {
              enum "logical" {
                value 0;
                description
                  "Use the logical interface description";
              }
              enum "device" {
                value 1;
                description
                  "Use the device interface description";
              }
            }
            description
              "Use interface description instead of circuit identifier";
          }
    
          leaf use-vlan-id {
            junos:must "((!(".. no-vlan-interface-name") && (!(".. use-interface-description") && !(".. require-interface-description"))))";
            junos:must-message "Vlan-tag cannot be added as no-vlan-interface-name or interface-description is configured";
            type empty;
            description
              "Use VLAN id instead of name";
          }
    
          leaf no-vlan-interface-name {
            type empty;
            description
              "Not include vlan or interface name";
          }
    
          leaf include-irb-and-l2 {
            type empty;
            description
              "Include IRB and L2 interface name";
          }
    
          container use-option-82 {
            presence "enable use-option-82";
            description
              "Use option-82 remote-id for v6 remote-id";
            uses v6-relay-option-cid-rid-action;
          }  // container use-option-82
    
          leaf keep-incoming-remote-id {
            type empty;
            description
              "Keep incoming remote identifier";
          }
        }  // grouping v6-relay-option-remote-id-type
    
        grouping v6-server-group-type {
          uses apply-advanced;
    
          list server-group {
            key "name";
            ordered-by user;
            description
              "One or more server groups";
            leaf name {
              type string {
                junos:posix-pattern "^[A-Za-z0-9][_0-9A-Za-z-]*$";
                junos:pattern-message "Must be a non-reserved string of 64 characters or less";
                length "1 .. 64";
              }
              description
                "DHCPv6 Server group name";
            }
    
            uses apply-advanced;
    
            list address {
              key "name";
              max-elements 32;
              ordered-by user;
              description
                "IP Address of one or more DHCP servers";
              leaf name {
                type jt:ipaddr;
                description
                  "IP Address of DHCP server";
              }
    
              uses apply-advanced;
            }  // list address
          }  // list server-group
        }  // grouping v6-server-group-type
    
        grouping vlan-policy {
          description "Virtual LAN";
          leaf name {
            type string;
            description "VLAN id";
          }
    
          uses apply-advanced;
    
          container policy {
            description "Attach policy";
            uses apply-advanced;
    
            leaf policy-name {
              type string;
              description
                "Router Advertisement Guard policy name";
            }
    
            choice policy-type {
              leaf stateful {
                type empty;
                description
                  "Stateful router advertisement guard";
              }
              leaf stateless {
                type empty;
                description
                  "Stateless router advertisement guard";
              }
            }  // choice policy-type
          }  // container policy
        }  // grouping vlan-policy
    
        grouping write-option-82-type {
          uses apply-advanced;
        }  // grouping write-option-82-type
      }  // module junos-es-conf-forwarding-options
    

© 2023 YumaWorks, Inc. All rights reserved.