-- *****************************************************************
-- FS-MPLS-L3VPN-BGP-MIB.mib:  FS Mpls L3vpn Bgp MIB file
--
-- November 2002, Wang Meng
--
-- Copyright (c) 2011 by FS.COM Inc..
-- All rights reserved.
-- 
-- *****************************************************************
--

FS-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
   fsMgmt
      FROM FS-SMI;

-- **********************************************************************
-- * MODULE IDENTITY
-- **********************************************************************
fsmplsL3VpnNbrMIB MODULE-IDENTITY
   LAST-UPDATED "201109160000Z"
   ORGANIZATION "FS.COM Inc.."
   CONTACT-INFO
                "Tel: 400-865-2852
                E-mail: https://www.fs.com/live_chat_service_mail.html"                  
   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."
   ::= { fsMgmt 100 }

-- **********************************************************************
-- * fsmplsL3VpnVrfBgpNbrTable table
-- **********************************************************************
fsmplsL3VpnVrfBgpNbrTable  OBJECT-TYPE
    SYNTAX        SEQUENCE OF FSmplsL3VpnVrfBgpNbrEntry
    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."
    ::= { fsmplsL3VpnNbrMIB 1 }

fsmplsL3VpnVrfBgpNbrEntry  OBJECT-TYPE
    SYNTAX        FSmplsL3VpnVrfBgpNbrEntry
    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,
                  fsmplsL3VpnVrfBgpNbrAddr}
    ::= { fsmplsL3VpnVrfBgpNbrTable 1 }

FSmplsL3VpnVrfBgpNbrEntry ::= SEQUENCE {
    fsmplsL3VpnVrfBgpNbrRole        INTEGER,
    fsmplsL3VpnVrfBgpNbrType        InetAddressType,
    fsmplsL3VpnVrfBgpNbrAddr        InetAddress,
    fsmplsL3VpnVrfBgpNbrRowStatus   RowStatus,
    fsmplsL3VpnVrfBgpNbrStorageType StorageType,
    fsmplsL3VpnVrfBgpNbrRemoteAS    INTEGER
}

fsmplsL3VpnVrfBgpNbrRole 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. "
           ::= { fsmplsL3VpnVrfBgpNbrEntry 1 }

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

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

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

fsmplsL3VpnVrfBgpNbrStorageType 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 }
          ::= { fsmplsL3VpnVrfBgpNbrEntry 5 }

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

-- **********************************************************************
-- * fsmplsL3VpnVrfBgpNbrattr
-- **********************************************************************
fsmplsL3VpnVrfBgpPAtrTable  OBJECT-TYPE
    SYNTAX        SEQUENCE OF FSmplsL3VpnVrfBgpPAtrEntry
    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."
    ::= { fsmplsL3VpnNbrMIB 2 }

fsmplsL3VpnVrfBgpPAtrEntry  OBJECT-TYPE
    SYNTAX        FSmplsL3VpnVrfBgpPAtrEntry
    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 }
    ::= { fsmplsL3VpnVrfBgpPAtrTable 1 }

FSmplsL3VpnVrfBgpPAtrEntry ::= SEQUENCE {
    fsmplsL3VpnVrfBgpPAtrPeerType         InetAddressType,
    fsmplsL3VpnVrfBgpPAtrIpAddrPfxType    InetAddressType,
    fsmplsL3VpnVrfBgpPAtrOrigin           INTEGER,
    fsmplsL3VpnVrfBgpPAtrASPathSegment    OCTET STRING,
    fsmplsL3VpnVrfBgpPAtrNextHopType      InetAddressType,
    fsmplsL3VpnVrfBgpPAtrNextHop          InetAddress,
    fsmplsL3VpnVrfBgpPAtrMultiExitDisc    Integer32,
    fsmplsL3VpnVrfBgpPAtrLocalPref        Integer32,
    fsmplsL3VpnVrfBgpPAtrAtomicAggregate  INTEGER,
    fsmplsL3VpnVrfBgpPAtrAggregatorAS     Integer32,
    fsmplsL3VpnVrfBgpPAtrAggrAddrType     InetAddressType,
    fsmplsL3VpnVrfBgpPAtrAggregatorAddr   InetAddress,
    fsmplsL3VpnVrfBgpPAtrCalcLocalPref    Integer32,
    fsmplsL3VpnVrfBgpPAtrBest             INTEGER,
    fsmplsL3VpnVrfBgpPAtrUnknown          OCTET STRING
}

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

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

fsmplsL3VpnVrfBgpPAtrOrigin 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. "
           ::= { fsmplsL3VpnVrfBgpPAtrEntry 3 }

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

fsmplsL3VpnVrfBgpPAtrASPathSegment  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."
           ::= { fsmplsL3VpnVrfBgpPAtrEntry 5 }

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

fsmplsL3VpnVrfBgpPAtrMultiExitDisc 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. "
           ::= { fsmplsL3VpnVrfBgpPAtrEntry 7 }

fsmplsL3VpnVrfBgpPAtrLocalPref 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. "
           ::= { fsmplsL3VpnVrfBgpPAtrEntry 8 }

fsmplsL3VpnVrfBgpPAtrAtomicAggregate 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. "
           ::= { fsmplsL3VpnVrfBgpPAtrEntry 9 }

fsmplsL3VpnVrfBgpPAtrAggregatorAS 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."
           ::= { fsmplsL3VpnVrfBgpPAtrEntry 10 }

fsmplsL3VpnVrfBgpPAtrAggrAddrType 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."
           ::= { fsmplsL3VpnVrfBgpPAtrEntry 11 }

fsmplsL3VpnVrfBgpPAtrAggregatorAddr 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. "
           ::= { fsmplsL3VpnVrfBgpPAtrEntry 12 }

fsmplsL3VpnVrfBgpPAtrCalcLocalPref 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. "
           ::= { fsmplsL3VpnVrfBgpPAtrEntry 13 }

fsmplsL3VpnVrfBgpPAtrBest 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. "
           ::= { fsmplsL3VpnVrfBgpPAtrEntry 14 }

fsmplsL3VpnVrfBgpPAtrUnknown 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. "
           ::= { fsmplsL3VpnVrfBgpPAtrEntry 15 }
-- **********************************************************************
-- * End of fsmplsL3VpnVrfBgpPAtrTable table
-- **********************************************************************

-- Conformance Information **********************************************
fsmplsL3VpnVrfBgpNbrCom OBJECT IDENTIFIER ::= { fsmplsL3VpnNbrMIB 3 }

fsmplsL3VpnVrfBgpCompliances OBJECT IDENTIFIER ::= { fsmplsL3VpnVrfBgpNbrCom 1 }
fsmplsL3VpnVrfBgpGroups      OBJECT IDENTIFIER ::= { fsmplsL3VpnVrfBgpNbrCom 2 }

-- Compliance statements

fsmplsL3VpnVrfBgpCompliance 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 { fsmplsL3VpnVrfBgpGroup }
    ::= { fsmplsL3VpnVrfBgpCompliances 1 }

-- Units of compliance
fsmplsL3VpnVrfBgpGroup OBJECT-GROUP
    OBJECTS     {
                  fsmplsL3VpnVrfBgpNbrRole,
                  fsmplsL3VpnVrfBgpNbrType,
                  fsmplsL3VpnVrfBgpNbrAddr,
                  fsmplsL3VpnVrfBgpNbrRowStatus,
                  fsmplsL3VpnVrfBgpNbrStorageType,
                  fsmplsL3VpnVrfBgpNbrRemoteAS,
                  fsmplsL3VpnVrfBgpPAtrPeerType,
                  fsmplsL3VpnVrfBgpPAtrIpAddrPfxType,
                  fsmplsL3VpnVrfBgpPAtrOrigin,
                  fsmplsL3VpnVrfBgpPAtrASPathSegment,
                  fsmplsL3VpnVrfBgpPAtrNextHopType,
                  fsmplsL3VpnVrfBgpPAtrNextHop,
                  fsmplsL3VpnVrfBgpPAtrMultiExitDisc,
                  fsmplsL3VpnVrfBgpPAtrLocalPref,
                  fsmplsL3VpnVrfBgpPAtrAtomicAggregate,
                  fsmplsL3VpnVrfBgpPAtrAggregatorAS,
                  fsmplsL3VpnVrfBgpPAtrAggrAddrType,
                  fsmplsL3VpnVrfBgpPAtrAggregatorAddr,
                  fsmplsL3VpnVrfBgpPAtrCalcLocalPref,
                  fsmplsL3VpnVrfBgpPAtrBest,
                  fsmplsL3VpnVrfBgpPAtrUnknown
                }
    STATUS       current
    DESCRIPTION "A collection of objects providing for configuration
                 of an mpls L3VPN BGP neighbor which implements the
                 fsmplsL3VpnNbrMIB. "
    ::= { fsmplsL3VpnVrfBgpGroups 1 }

END
