netconfcentral logo

openconfig-bgp-types

HTML

openconfig-bgp-types@2017-07-30



  module openconfig-bgp-types {

    yang-version 1;

    namespace
      "http://openconfig.net/yang/bgp-types";

    prefix oc-bgp-types;

    import openconfig-types {
      prefix oc-types;
    }
    import openconfig-inet-types {
      prefix oc-inet;
    }
    import openconfig-extensions {
      prefix oc-ext;
    }

    include openconfig-bgp-errors;

    organization "OpenConfig working group";

    contact
      "OpenConfig working group
    netopenconfig@googlegroups.com";

    description
      "This module contains general data definitions for use in BGP
    policy. It can be imported by modules that make use of BGP
    attributes";

    revision "2017-07-30" {
      description
        "Clarification of add-paths send-max leaf";
      reference
        "4.0.1";

    }

    revision "2017-07-10" {
      description
        "Add error notifications; moved add-paths config; add AS
      prepend policy features; removed unneeded config leaves";
      reference
        "4.0.0";

    }

    revision "2017-02-02" {
      description
        "Bugfix to remove remaining global-level policy data";
      reference
        "3.0.1";

    }

    revision "2017-01-26" {
      description
        "Add dynamic neighbor support, migrate to OpenConfig types";
      reference
        "3.0.0";

    }

    revision "2016-06-21" {
      description "OpenConfig BGP refactor";
      reference
        "2.1.1";

    }

    oc-ext:openconfig-version "4.0.1";

    identity BGP_CAPABILITY {
      base 
      description
        "Base identity for a BGP capability";
    }

    identity MPBGP {
      base BGP_CAPABILITY;
      description
        "Multi-protocol extensions to BGP";
      reference
        "RFC2858";

    }

    identity ROUTE_REFRESH {
      base BGP_CAPABILITY;
      description
        "The BGP route-refresh functionality";
      reference
        "RFC2918";

    }

    identity ASN32 {
      base BGP_CAPABILITY;
      description
        "4-byte (32-bit) AS number functionality";
      reference
        "RFC6793";

    }

    identity GRACEFUL_RESTART {
      base BGP_CAPABILITY;
      description
        "Graceful restart functionality";
      reference
        "RFC4724";

    }

    identity ADD_PATHS {
      base BGP_CAPABILITY;
      description "BGP add-paths";
      reference
        "draft-ietf-idr-add-paths";

    }

    identity AFI_SAFI_TYPE {
      base 
      description
        "Base identity type for AFI,SAFI tuples for BGP-4";
      reference
        "RFC4760 - multiprotocol extensions for BGP-4";

    }

    identity IPV4_UNICAST {
      base AFI_SAFI_TYPE;
      description
        "IPv4 unicast (AFI,SAFI = 1,1)";
      reference
        "RFC4760";

    }

    identity IPV6_UNICAST {
      base AFI_SAFI_TYPE;
      description
        "IPv6 unicast (AFI,SAFI = 2,1)";
      reference
        "RFC4760";

    }

    identity IPV4_LABELED_UNICAST {
      base AFI_SAFI_TYPE;
      description
        "Labeled IPv4 unicast (AFI,SAFI = 1,4)";
      reference
        "RFC3107";

    }

    identity IPV6_LABELED_UNICAST {
      base AFI_SAFI_TYPE;
      description
        "Labeled IPv6 unicast (AFI,SAFI = 2,4)";
      reference
        "RFC3107";

    }

    identity L3VPN_IPV4_UNICAST {
      base AFI_SAFI_TYPE;
      description
        "Unicast IPv4 MPLS L3VPN (AFI,SAFI = 1,128)";
      reference
        "RFC4364";

    }

    identity L3VPN_IPV6_UNICAST {
      base AFI_SAFI_TYPE;
      description
        "Unicast IPv6 MPLS L3VPN (AFI,SAFI = 2,128)";
      reference
        "RFC4659";

    }

    identity L3VPN_IPV4_MULTICAST {
      base AFI_SAFI_TYPE;
      description
        "Multicast IPv4 MPLS L3VPN (AFI,SAFI = 1,129)";
      reference
        "RFC6514";

    }

    identity L3VPN_IPV6_MULTICAST {
      base AFI_SAFI_TYPE;
      description
        "Multicast IPv6 MPLS L3VPN (AFI,SAFI = 2,129)";
      reference
        "RFC6514";

    }

    identity L2VPN_VPLS {
      base AFI_SAFI_TYPE;
      description
        "BGP-signalled VPLS (AFI,SAFI = 25,65)";
      reference
        "RFC4761";

    }

    identity L2VPN_EVPN {
      base AFI_SAFI_TYPE;
      description
        "BGP MPLS Based Ethernet VPN (AFI,SAFI = 25,70)";
    }

    identity BGP_WELL_KNOWN_STD_COMMUNITY {
      base 
      description
        "Reserved communities within the standard community space
      defined by RFC1997. These communities must fall within the
      range 0x00000000 to 0xFFFFFFFF";
      reference
        "RFC1997";

    }

    identity NO_EXPORT {
      base BGP_WELL_KNOWN_STD_COMMUNITY;
      description
        "Do not export NLRI received carrying this community outside
      the bounds of this autonomous system, or this confederation if
      the local autonomous system is a confederation member AS. This
      community has a value of 0xFFFFFF01.";
      reference
        "RFC1997";

    }

    identity NO_ADVERTISE {
      base BGP_WELL_KNOWN_STD_COMMUNITY;
      description
        "All NLRI received carrying this community must not be
      advertised to other BGP peers. This community has a value of
      0xFFFFFF02.";
      reference
        "RFC1997";

    }

    identity NO_EXPORT_SUBCONFED {
      base BGP_WELL_KNOWN_STD_COMMUNITY;
      description
        "All NLRI received carrying this community must not be
      advertised to external BGP peers - including over confederation
      sub-AS boundaries. This community has a value of 0xFFFFFF03.";
      reference
        "RFC1997";

    }

    identity NOPEER {
      base BGP_WELL_KNOWN_STD_COMMUNITY;
      description
        "An autonomous system receiving NLRI tagged with this community
      is advised not to readvertise the NLRI to external bi-lateral
      peer autonomous systems. An AS may also filter received NLRI
      from bilateral peer sessions when they are tagged with this
      community value";
      reference
        "RFC3765";

    }

    typedef bgp-session-direction {
      type enumeration {
        enum "INBOUND" {
          value 0;
          description
            "Refers to all NLRI received from the BGP peer";
        }
        enum "OUTBOUND" {
          value 1;
          description
            "Refers to all NLRI advertised to the BGP peer";
        }
      }
      description
        "Type to describe the direction of NLRI transmission";
    }

    typedef bgp-well-known-community-type {
      type identityref {
        base BGP_WELL_KNOWN_STD_COMMUNITY;
      }
      description
        "Type definition for well-known IETF community attribute
      values";
      reference
        "IANA Border Gateway Protocol (BGP) Well Known Communities";

    }

    typedef bgp-std-community-type {
      type union {
        type uint32;
        type string {
          pattern
            '^(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}'
              + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):'
              + '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}'
              + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])$';
        }
      }
      description
        "Type definition for standard commmunity attributes represented as
      a integer value, or a string of the form N:M where N and M are
      integers between 0 and 65535.";
      reference
        "RFC 1997 - BGP Communities Attribute";

    }

    typedef bgp-ext-community-type {
      type union {
        type string {
          pattern
            '^(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}'
              + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):'
              + '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}'
              + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|'
              + '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|'
              + '[1-9][0-9]{1,8}|[0-9])$';
        }
        type string {
          pattern
            '^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|'
              + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|'
              + '2[0-4][0-9]|25[0-5]):'
              + '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}'
              + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])$';
        }
        type string {
          pattern
            '^(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}'
              + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|'
              + '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|'
              + '[1-9][0-9]{1,8}|[0-9]):'
              + '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}'
              + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])$';
        }
        type string {
          pattern
            '^route\-target:'
              + '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}'
              + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):'
              + '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}'
              + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|'
              + '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|'
              + '[1-9][0-9]{1,8}|[0-9])$';
        }
        type string {
          pattern
            '^route\-target:'
              + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|'
              + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|'
              + '2[0-4][0-9]|25[0-5]):'
              + '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}'
              + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])$';
        }
        type string {
          pattern
            '^route\-target:'
              + '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}'
              + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|'
              + '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|'
              + '[1-9][0-9]{1,8}|[0-9]):'
              + '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}'
              + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])$';
        }
        type string {
          pattern
            '^route\-origin:'
              + '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}'
              + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9]):'
              + '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}'
              + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|'
              + '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|'
              + '[1-9][0-9]{1,8}|[0-9])$';
        }
        type string {
          pattern
            '^route\-origin:'
              + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|'
              + '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|'
              + '2[0-4][0-9]|25[0-5]):'
              + '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}'
              + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])$';
        }
        type string {
          pattern
            '^route\-origin:'
              + '(429496729[0-5]|42949672[0-8][0-9]|4294967[0-1][0-9]{2}'
              + '|429496[0-6][0-9]{3}|42949[0-5][0-9]{4}|4294[0-8][0-9]{5}|'
              + '429[0-3][0-9]{6}|4[0-1][0-9]{7}|[1-3][0-9]{9}|'
              + '[1-9][0-9]{1,8}|[0-9]):'
              + '(6553[0-5]|655[0-2][0-9]|654[0-9]{2}|65[0-4][0-9]{2}'
              + '|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{1,3}|[0-9])$';
        }
      }
      description
        "Type definition for extended community attributes. In the case that
      common communities are utilised, they are represented as a string
      of the form:
        - <2b AS>:<4b value> per RFC4360 section 3.1
        - <4b IPv4>:<2b value> per RFC4360 section 3.2
        - <4b AS>:<2b value> per RFC5668 section 2.
        - route-target:<2b AS>:<4b value> per RFC4360 section 4
        - route-target:<4b IPv4>:<2b value> per RFC4360 section 4
        - route-origin:<2b ASN>:<4b value> per RFC4360 section 5
        - route-origin:<4b IPv4>:<2b value> per RFC4360 section 5";
      reference
        "RFC 4360 - BGP Extended Communities Attribute
         RFC 5668 - 4-Octet AS Specific BGP Extended Community";

    }

    typedef bgp-ext-community-recv-type {
      type union {
        type bgp-ext-community-type;
        type binary {
          length "8";
        }
      }
      description
        "A type definition utilised to define the extended community
      in a context where the system is receiving the extended
      community from an external source, such that the value may be
      unknown. In the case that the received extended community is
      unknown it is defined to be a 8-octet quantity formatted
      according to RFC4360:

      Type Field: 1 or 2 octets.
      Value Field: Remaining octets.

      The high-order octet of the type field is encoded such that
      bit 0 indicates whether the extended community type is IANA
      assigned; and bit 1 indicates whether the extended community
      is transitive.  The remaining bits of the high-order type
      field must be interpreted to determine whether the low-order
      type field should be parsed, or whether the entire remainder
      of the extended community is a value.";
      reference
        "RFC 4360 - BGP Extended Communities Attribute
         RFC 5668 - 4-Octet AS Specific BGP Extended Community";

    }

    typedef bgp-community-regexp-type {
      type oc-types:std-regexp;
      description
        "Type definition for communities specified as regular
      expression patterns";
    }

    typedef bgp-origin-attr-type {
      type enumeration {
        enum "IGP" {
          value 0;
          description
            "Origin of the NLRI is internal";
        }
        enum "EGP" {
          value 1;
          description
            "Origin of the NLRI is EGP";
        }
        enum "INCOMPLETE" {
          value 2;
          description
            "Origin of the NLRI is neither IGP or EGP";
        }
      }
      description
        "Type definition for standard BGP origin attribute";
      reference
        "RFC 4271 - A Border Gateway Protocol 4 (BGP-4),
        Sec 4.3";

    }

    typedef peer-type {
      type enumeration {
        enum "INTERNAL" {
          value 0;
          description "Internal (iBGP) peer";
        }
        enum "EXTERNAL" {
          value 1;
          description "External (eBGP) peer";
        }
      }
      description
        "Labels a peer or peer group as explicitly internal or
      external";
    }

    identity REMOVE_PRIVATE_AS_OPTION {
      base 
      description
        "Base identity for options for removing private autonomous
      system numbers from the AS_PATH attribute";
    }

    identity PRIVATE_AS_REMOVE_ALL {
      base REMOVE_PRIVATE_AS_OPTION;
      description
        "Strip all private autonmous system numbers from the AS_PATH.
      This action is performed regardless of the other content of the
      AS_PATH attribute, and for all instances of private AS numbers
      within that attribute.";
    }

    identity PRIVATE_AS_REPLACE_ALL {
      base REMOVE_PRIVATE_AS_OPTION;
      description
        "Replace all instances of private autonomous system numbers in
      the AS_PATH with the local BGP speaker's autonomous system
      number. This action is performed regardless of the other
      content of the AS_PATH attribute, and for all instances of
      private AS number within that attribute.";
    }

    typedef remove-private-as-option {
      type identityref {
        base REMOVE_PRIVATE_AS_OPTION;
      }
      description
        "Set of options for configuring how private AS path numbers
      are removed from advertisements";
    }

    typedef rr-cluster-id-type {
      type union {
        type uint32;
        type oc-inet:ipv4-address;
      }
      description
        "Union type for route reflector cluster ids:
      option 1: 4-byte number
      option 2: IP address";
    }

    typedef community-type {
      type enumeration {
        enum "STANDARD" {
          value 0;
          description
            "Send only standard communities";
        }
        enum "EXTENDED" {
          value 1;
          description
            "Send only extended communities";
        }
        enum "BOTH" {
          value 2;
          description
            "Send both standard and extended communities";
        }
        enum "NONE" {
          value 3;
          description
            "Do not send any community attribute";
        }
      }
      description
        "type describing variations of community attributes:
      STANDARD: standard BGP community [rfc1997]
      EXTENDED: extended BGP community [rfc4360]
      BOTH: both standard and extended community";
    }

    typedef as-path-segment-type {
      type enumeration {
        enum "AS_SEQ" {
          value 0;
          description
            "Ordered set of autonomous systems that a route in
          the UPDATE message has traversed";
        }
        enum "AS_SET" {
          value 1;
          description
            "Unordered set of autonomous systems that a route in
          the UPDATE message has traversed";
        }
        enum "AS_CONFED_SEQUENCE" {
          value 2;
          description
            "Ordered set of Member Autonomous
          Systems in the local confederation that the UPDATE message
          has traversed";
        }
        enum "AS_CONFED_SET" {
          value 3;
          description
            "Unordered set of Member Autonomous Systems
          in the local confederation that the UPDATE message has
          traversed";
        }
      }
      description
        "Defines the types of BGP AS path segments.";
    }
  }  // module openconfig-bgp-types

Summary

  
openconfig-bgp-errors  
  
Organization OpenConfig working group
  
Submodule openconfig-bgp-errors
Version 2017-07-30
File openconfig-bgp-errors.yang
  
  
Cooked /cookedmodules/openconfig-bgp-errors/2017-07-30
YANG /src/openconfig-bgp-errors@2017-07-30.yang
XSD /xsd/openconfig-bgp-errors@2017-07-30.xsd
  
Abstract This module defines BGP NOTIFICATION message error codes and subcodes
  
Contact
OpenConfig working group
netopenconfig@googlegroups.com
  
openconfig-bgp-types  
  
Organization OpenConfig working group
  
Module openconfig-bgp-types
Version 2017-07-30
File openconfig-bgp-types.yang
  
Prefix oc-bgp-types
Namespace http://openconfig.net/yang/bgp-types
  
Cooked /cookedmodules/openconfig-bgp-types/2017-07-30
YANG /src/openconfig-bgp-types@2017-07-30.yang
XSD /xsd/openconfig-bgp-types@2017-07-30.xsd
  
Abstract This module contains general data definitions for use in BGP policy. It can be imported by modules that make use of BGP attribut...
  
Contact
OpenConfig working group
netopenconfig@googlegroups.com

Description

 
openconfig-bgp-errors
This module defines BGP NOTIFICATION message error codes
and subcodes
 
openconfig-bgp-types
This module contains general data definitions for use in BGP
policy. It can be imported by modules that make use of BGP
attributes

Typedefs

Typedef Base type Abstract
as-path-segment-type enumeration Defines the types of BGP AS path segments.
bgp-community-regexp-type string Type definition for communities specified as regular expression patterns
bgp-ext-community-recv-type union A type definition utilised to define the extended community in a context where the system is receiving the extended community from an external source, such that the value may be unknown. In the case that the received extended community is unknown it is de...
bgp-ext-community-type union Type definition for extended community attributes. In the case that common communities are utilised, they are represented as a string of the form: - <2b AS>:<4b value> per RFC4360 section 3.1 - <4b IPv4>:<2b value> per RFC4360 section 3.2 - <4b AS>:<2b...
bgp-origin-attr-type enumeration Type definition for standard BGP origin attribute
bgp-session-direction enumeration Type to describe the direction of NLRI transmission
bgp-std-community-type union Type definition for standard commmunity attributes represented as a integer value, or a string of the form N:M where N and M are integers between 0 and 65535.
bgp-well-known-community-type identityref Type definition for well-known IETF community attribute values
community-type enumeration type describing variations of community attributes: STANDARD: standard BGP community [rfc1997] EXTENDED: extended BGP community [rfc4360] BOTH: both standard and extended community
peer-type enumeration Labels a peer or peer group as explicitly internal or external
remove-private-as-option identityref Set of options for configuring how private AS path numbers are removed from advertisements
rr-cluster-id-type union Union type for route reflector cluster ids: option 1: 4-byte number option 2: IP address