-- *****************************************************************
-- QTECH-MPLS-L3VPN-BGP-MIB.mib:  Qtech Mpls L3vpn Bgp MIB file
--
-- November 2002, Wang Meng
--
-- Copyright (c) 2011 by Qtech Networks Co.,Ltd.
-- All rights reserved.
-- 
-- *****************************************************************
--

QTECH-MPLS-L3VPN-BGP-MIB DEFINITIONS ::= BEGIN
IMPORTS
   MODULE-IDENTITY,
   OBJECT-TYPE,
   Integer32
      FROM SNMPv2-SMI                                     -- [RFC2578]
   MODULE-COMPLIANCE, OBJECT-GROUP
      FROM SNMPv2-CONF                                    -- [RFC2580]
   RowStatus, StorageType
      FROM SNMPv2-TC                                      -- [RFC2579]
   InetAddress, InetAddressType
      FROM INET-ADDRESS-MIB                               -- [RFC4001]
   mplsL3VpnVrfName
      FROM MPLS-L3VPN-STD-MIB
   bgp4PathAttrIpAddrPrefix,
   bgp4PathAttrIpAddrPrefixLen,
   bgp4PathAttrPeer
      FROM BGP4-MIB
   qtechMgmt
      FROM QTECH-SMI;

-- **********************************************************************
-- * MODULE IDENTITY
-- **********************************************************************
qtechmplsL3VpnNbrMIB MODULE-IDENTITY
   LAST-UPDATED "201109160000Z"
   ORGANIZATION "Qtech Networks Co.,Ltd."
   CONTACT-INFO
                "Tel: 4008-111-000
                E-mail: service@qtech.com.cn"                  
   DESCRIPTION
        "This MIB contains managed object definitions for the
         neighbors' parameters of the
         Layer-3 Multiprotocol Label Switching Virtual
         Private Networks.

        Copyright (C) The Internet Society (2006).  This
        version of this MIB module is part of RFC4382; see
        the RFC itself for full legal notices."
  -- Revision history.
  REVISION
      "201109160000Z"
   DESCRIPTION
      "Initial version.  Published as RFC 4382."
   ::= { qtechMgmt 100 }

-- **********************************************************************
-- * qtechmplsL3VpnVrfBgpNbrTable table
-- **********************************************************************
qtechmplsL3VpnVrfBgpNbrTable  OBJECT-TYPE
    SYNTAX        SEQUENCE OF QtechmplsL3VpnVrfBgpNbrEntry
    MAX-ACCESS    not-accessible
    STATUS        current
    DESCRIPTION
       "This table specifies per-interface MPLS L3VPN
        VRF Table capability and associated information.
        Entries in this table define VRF routing instances
        associated with MPLS/VPN interfaces.  Note that
        multiple interfaces can belong to the same VRF
        instance.  The collection of all VRF instances
        comprises an actual VPN."
    ::= { qtechmplsL3VpnNbrMIB 1 }

qtechmplsL3VpnVrfBgpNbrEntry  OBJECT-TYPE
    SYNTAX        QtechmplsL3VpnVrfBgpNbrEntry
    MAX-ACCESS    not-accessible
    STATUS        current
    DESCRIPTION
       "An entry in this table is created by an LSR for
        every VRF capable of supporting MPLS L3VPN.  The
        indexing provides an ordering of VRFs per-VPN
        interface."
    INDEX       { mplsL3VpnVrfName,
                  qtechmplsL3VpnVrfBgpNbrAddr}
    ::= { qtechmplsL3VpnVrfBgpNbrTable 1 }

QtechmplsL3VpnVrfBgpNbrEntry ::= SEQUENCE {
    qtechmplsL3VpnVrfBgpNbrRole        INTEGER,
    qtechmplsL3VpnVrfBgpNbrType        InetAddressType,
    qtechmplsL3VpnVrfBgpNbrAddr        InetAddress,
    qtechmplsL3VpnVrfBgpNbrRowStatus   RowStatus,
    qtechmplsL3VpnVrfBgpNbrStorageType StorageType,
    qtechmplsL3VpnVrfBgpNbrRemoteAS    INTEGER
}

qtechmplsL3VpnVrfBgpNbrRole OBJECT-TYPE
          SYNTAX INTEGER { ce(1), pe(2) }
          MAX-ACCESS read-only
          STATUS current
          DESCRIPTION
              "This attribute shall specify the role of the bgp
                neighbor in Layer-3 Multiprotocol Label Switching
                Virtual Private Networks. "
           ::= { qtechmplsL3VpnVrfBgpNbrEntry 1 }

qtechmplsL3VpnVrfBgpNbrType OBJECT-TYPE
          SYNTAX InetAddressType
          MAX-ACCESS read-only
          STATUS current
          DESCRIPTION
              "This attribute shall specify the address family of the PE's address. "
           ::= { qtechmplsL3VpnVrfBgpNbrEntry 2 }

qtechmplsL3VpnVrfBgpNbrAddr OBJECT-TYPE
          SYNTAX InetAddress
          MAX-ACCESS read-write
          STATUS current
          DESCRIPTION
              "This attribute shall specify the address of the PE. "
           ::= { qtechmplsL3VpnVrfBgpNbrEntry 3 }

qtechmplsL3VpnVrfBgpNbrRowStatus OBJECT-TYPE
          SYNTAX RowStatus
          MAX-ACCESS read-create
          STATUS current
          DESCRIPTION
              "This attribute is used to change or delete one row of this table. "
           ::= { qtechmplsL3VpnVrfBgpNbrEntry 4 }

qtechmplsL3VpnVrfBgpNbrStorageType OBJECT-TYPE
          SYNTAX        StorageType
          MAX-ACCESS    read-only
          STATUS        current
          DESCRIPTION
              "The storage type for this VPN bgp neighbor.
               Conceptual rows having the value 'permanent'
               need not allow write access to any columnar
               objects in the row."
          REFERENCE
              "See RFC4382."
          DEFVAL { volatile }
          ::= { qtechmplsL3VpnVrfBgpNbrEntry 5 }

qtechmplsL3VpnVrfBgpNbrRemoteAS OBJECT-TYPE
          SYNTAX     INTEGER (0..65535)
          MAX-ACCESS read-write
          STATUS     current
          DESCRIPTION
                  "The remote autonomous system number."
          ::= { qtechmplsL3VpnVrfBgpNbrEntry 6 }
-- **********************************************************************
-- * End of qtechmplsL3VpnVrfBgpNbrTable table
-- **********************************************************************

-- **********************************************************************
-- * qtechmplsL3VpnVrfBgpNbrattr
-- **********************************************************************
qtechmplsL3VpnVrfBgpPAtrTable  OBJECT-TYPE
    SYNTAX        SEQUENCE OF QtechmplsL3VpnVrfBgpPAtrEntry
    MAX-ACCESS    not-accessible
    STATUS        current
    DESCRIPTION
       "This table specifies per-interface MPLS L3VPN
        VRF Table capability and associated information.
        Entries in this table define VRF routing instances
        associated with MPLS/VPN interfaces.  Note that
        multiple interfaces can belong to the same VRF
        instance.  The collection of all VRF instances
        comprises an actual VPN."
    ::= { qtechmplsL3VpnNbrMIB 2 }

qtechmplsL3VpnVrfBgpPAtrEntry  OBJECT-TYPE
    SYNTAX        QtechmplsL3VpnVrfBgpPAtrEntry
    MAX-ACCESS    not-accessible
    STATUS        current
    DESCRIPTION
       "An entry in this table is created by an LSR for
        every VRF capable of supporting MPLS L3VPN.  The
        indexing provides an ordering of VRFs per-VPN
        interface."
    INDEX       { mplsL3VpnVrfName,
                  bgp4PathAttrIpAddrPrefix,
                  bgp4PathAttrIpAddrPrefixLen,
                  bgp4PathAttrPeer }
    ::= { qtechmplsL3VpnVrfBgpPAtrTable 1 }

QtechmplsL3VpnVrfBgpPAtrEntry ::= SEQUENCE {
    qtechmplsL3VpnVrfBgpPAtrPeerType         InetAddressType,
    qtechmplsL3VpnVrfBgpPAtrIpAddrPfxType    InetAddressType,
    qtechmplsL3VpnVrfBgpPAtrOrigin           INTEGER,
    qtechmplsL3VpnVrfBgpPAtrASPathSegment    OCTET STRING,
    qtechmplsL3VpnVrfBgpPAtrNextHopType      InetAddressType,
    qtechmplsL3VpnVrfBgpPAtrNextHop          InetAddress,
    qtechmplsL3VpnVrfBgpPAtrMultiExitDisc    Integer32,
    qtechmplsL3VpnVrfBgpPAtrLocalPref        Integer32,
    qtechmplsL3VpnVrfBgpPAtrAtomicAggregate  INTEGER,
    qtechmplsL3VpnVrfBgpPAtrAggregatorAS     Integer32,
    qtechmplsL3VpnVrfBgpPAtrAggrAddrType     InetAddressType,
    qtechmplsL3VpnVrfBgpPAtrAggregatorAddr   InetAddress,
    qtechmplsL3VpnVrfBgpPAtrCalcLocalPref    Integer32,
    qtechmplsL3VpnVrfBgpPAtrBest             INTEGER,
    qtechmplsL3VpnVrfBgpPAtrUnknown          OCTET STRING
}

qtechmplsL3VpnVrfBgpPAtrPeerType OBJECT-TYPE
          SYNTAX InetAddressType
          MAX-ACCESS read-only
          STATUS current
          DESCRIPTION
              "This attribute shall specify the address family of the peer's address. "
           ::= { qtechmplsL3VpnVrfBgpPAtrEntry 1 }

qtechmplsL3VpnVrfBgpPAtrIpAddrPfxType OBJECT-TYPE
          SYNTAX InetAddressType
          MAX-ACCESS read-only
          STATUS current
          DESCRIPTION
              "This attribute shall specify the address family of the address. "
           ::= { qtechmplsL3VpnVrfBgpPAtrEntry 2 }

qtechmplsL3VpnVrfBgpPAtrOrigin OBJECT-TYPE
          SYNTAX INTEGER { igp(1), egp(2), incomplete(3) }
          MAX-ACCESS read-only
          STATUS current
          DESCRIPTION
              "This attribute shall specify the origin of the path. "
           ::= { qtechmplsL3VpnVrfBgpPAtrEntry 3 }

qtechmplsL3VpnVrfBgpPAtrNextHop OBJECT-TYPE
          SYNTAX InetAddress
          MAX-ACCESS read-only
          STATUS current
          DESCRIPTION
              "This attribute shall specify the address of the border router. "
           ::= { qtechmplsL3VpnVrfBgpPAtrEntry 4 }

qtechmplsL3VpnVrfBgpPAtrASPathSegment  OBJECT-TYPE
          SYNTAX OCTET STRING (SIZE (2..255))
          MAX-ACCESS read-only
          STATUS current
          DESCRIPTION
              "This sequence is discription by a trible group
               <type, length, value>. The length of the type
               member is one octet. Its possible values are as
               follow:
                  AS_SET: unordered set of ASs a route in the
                          UPDATE message has traversed.
                  AS_SEQUENCEordered set of ASs a route in the
                               UPDATE message has traversed.
               The length of the length member is alse one octet,
               indicating the count of the as. The value member
               includes one or more as number and every as number
               is discriped by a pair of octets, caculated according
               to the following formula:
                  first-byte-of-pair = ASNumber / 256;
                  second-byte-of-pair = ASNumber & 255."
           ::= { qtechmplsL3VpnVrfBgpPAtrEntry 5 }

qtechmplsL3VpnVrfBgpPAtrNextHopType OBJECT-TYPE
          SYNTAX InetAddressType
          MAX-ACCESS read-only
          STATUS current
          DESCRIPTION
              "This attribute shall specify the address family of the border router's
              address. "
           ::= { qtechmplsL3VpnVrfBgpPAtrEntry 6 }

qtechmplsL3VpnVrfBgpPAtrMultiExitDisc OBJECT-TYPE
          SYNTAX Integer32 (-1..2147483647)
          MAX-ACCESS read-only
          STATUS current
          DESCRIPTION
              "This attribute shall specify the med value of an advertised route.
              When it is set to -1, it indicates that this attribute is not exsiting. "
           ::= { qtechmplsL3VpnVrfBgpPAtrEntry 7 }

qtechmplsL3VpnVrfBgpPAtrLocalPref OBJECT-TYPE
          SYNTAX Integer32 (-1..2147483647)
          MAX-ACCESS read-only
          STATUS current
          DESCRIPTION
              "The originating BGP4 speaker's degree of preference for an advertised route
              When it is setto -1, it indicates that this attribute is not exsiting. "
           ::= { qtechmplsL3VpnVrfBgpPAtrEntry 8 }

qtechmplsL3VpnVrfBgpPAtrAtomicAggregate OBJECT-TYPE
          SYNTAX INTEGER { lessSpecificRrouteNotSelected(1), lessSpecificRouteSelected(2) }
          MAX-ACCESS read-only
          STATUS current
          DESCRIPTION
              "The originating BGP4 speaker's aggrating attribute for an advertised route. "
           ::= { qtechmplsL3VpnVrfBgpPAtrEntry 9 }

qtechmplsL3VpnVrfBgpPAtrAggregatorAS OBJECT-TYPE
          SYNTAX Integer32 (0..65535)
          MAX-ACCESS read-only
          STATUS current
          DESCRIPTION
              "The prev BGP4 speaker's as number, who excude the aggregation of the advertised
              route.  when it is set to 0, it indicates the attribute not exists."
           ::= { qtechmplsL3VpnVrfBgpPAtrEntry 10 }

qtechmplsL3VpnVrfBgpPAtrAggrAddrType OBJECT-TYPE
          SYNTAX InetAddressType
          MAX-ACCESS read-only
          STATUS current
          DESCRIPTION
              "The attribute shall specify the address family of the aggregated address for the
              advertised route."
           ::= { qtechmplsL3VpnVrfBgpPAtrEntry 11 }

qtechmplsL3VpnVrfBgpPAtrAggregatorAddr OBJECT-TYPE
          SYNTAX InetAddress
          MAX-ACCESS read-only
          STATUS current
          DESCRIPTION
              "The attribute shall specify the address of the prev BGP4 speaker's as number, who
              excude the aggregation of the advertised route. When it is set to 0, it indicates
              this attribute not exists. "
           ::= { qtechmplsL3VpnVrfBgpPAtrEntry 12 }

qtechmplsL3VpnVrfBgpPAtrCalcLocalPref OBJECT-TYPE
          SYNTAX Integer32 (-1..2147483647)
          MAX-ACCESS read-only
          STATUS current
          DESCRIPTION
              "The attribute shall specify the degree of preference calculated by the origin
              BGP4 speaker for an advertised route. When it is set to -1, it indicates this
              attribute not exists. "
           ::= { qtechmplsL3VpnVrfBgpPAtrEntry 13 }

qtechmplsL3VpnVrfBgpPAtrBest OBJECT-TYPE
          SYNTAX INTEGER { false(1), true(2) }
          MAX-ACCESS read-only
          STATUS current
          DESCRIPTION
              "The attribute shall specify when the advertised route is the best route. "
           ::= { qtechmplsL3VpnVrfBgpPAtrEntry 14 }

qtechmplsL3VpnVrfBgpPAtrUnknown OBJECT-TYPE
          SYNTAX OCTET STRING (SIZE(0..255))
          MAX-ACCESS read-only
          STATUS current
          DESCRIPTION
              "The attribute shall specify the unkown attribute of the advertised route.
               When its length is 0, it indicates that it does not exists. And the
               context beyond the max length will not be recorded. "
           ::= { qtechmplsL3VpnVrfBgpPAtrEntry 15 }
-- **********************************************************************
-- * End of qtechmplsL3VpnVrfBgpPAtrTable table
-- **********************************************************************

-- Conformance Information **********************************************
qtechmplsL3VpnVrfBgpNbrCom OBJECT IDENTIFIER ::= { qtechmplsL3VpnNbrMIB 3 }

qtechmplsL3VpnVrfBgpCompliances OBJECT IDENTIFIER ::= { qtechmplsL3VpnVrfBgpNbrCom 1 }
qtechmplsL3VpnVrfBgpGroups      OBJECT IDENTIFIER ::= { qtechmplsL3VpnVrfBgpNbrCom 2 }

-- Compliance statements

qtechmplsL3VpnVrfBgpCompliance MODULE-COMPLIANCE
    STATUS       current
    DESCRIPTION "The compliance statement for mpls L3VPN BGP neighbors which
                 implement the MPLS-L3VPN-PRIVATE-MIB.
                "
    MODULE       -- this module
        MANDATORY-GROUPS { qtechmplsL3VpnVrfBgpGroup }
    ::= { qtechmplsL3VpnVrfBgpCompliances 1 }

-- Units of compliance
qtechmplsL3VpnVrfBgpGroup OBJECT-GROUP
    OBJECTS     {
                  qtechmplsL3VpnVrfBgpNbrRole,
                  qtechmplsL3VpnVrfBgpNbrType,
                  qtechmplsL3VpnVrfBgpNbrAddr,
                  qtechmplsL3VpnVrfBgpNbrRowStatus,
                  qtechmplsL3VpnVrfBgpNbrStorageType,
                  qtechmplsL3VpnVrfBgpNbrRemoteAS,
                  qtechmplsL3VpnVrfBgpPAtrPeerType,
                  qtechmplsL3VpnVrfBgpPAtrIpAddrPfxType,
                  qtechmplsL3VpnVrfBgpPAtrOrigin,
                  qtechmplsL3VpnVrfBgpPAtrASPathSegment,
                  qtechmplsL3VpnVrfBgpPAtrNextHopType,
                  qtechmplsL3VpnVrfBgpPAtrNextHop,
                  qtechmplsL3VpnVrfBgpPAtrMultiExitDisc,
                  qtechmplsL3VpnVrfBgpPAtrLocalPref,
                  qtechmplsL3VpnVrfBgpPAtrAtomicAggregate,
                  qtechmplsL3VpnVrfBgpPAtrAggregatorAS,
                  qtechmplsL3VpnVrfBgpPAtrAggrAddrType,
                  qtechmplsL3VpnVrfBgpPAtrAggregatorAddr,
                  qtechmplsL3VpnVrfBgpPAtrCalcLocalPref,
                  qtechmplsL3VpnVrfBgpPAtrBest,
                  qtechmplsL3VpnVrfBgpPAtrUnknown
                }
    STATUS       current
    DESCRIPTION "A collection of objects providing for configuration
                 of an mpls L3VPN BGP neighbor which implements the
                 qtechmplsL3VpnNbrMIB. "
    ::= { qtechmplsL3VpnVrfBgpGroups 1 }

END
