BGP4V2-MIB DEFINITIONS ::= BEGIN

    IMPORTS

        MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE,
        experimental, Gauge32, Unsigned32
            FROM SNMPv2-SMI
        InetAddressType, InetAddress, InetPortNumber,
        InetAutonomousSystemNumber, InetAddressPrefixLength
            FROM INET-ADDRESS-MIB
        TruthValue, RowPointer, TimeStamp
            FROM SNMPv2-TC
        MODULE-COMPLIANCE, OBJECT-GROUP, NOTIFICATION-GROUP
            FROM SNMPv2-CONF
        SnmpAdminString
            FROM SNMP-FRAMEWORK-MIB
        Bgp4V2IdentifierTC, Bgp4V2AddressFamilyIdentifierTC,
        Bgp4V2SubsequentAddressFamilyIdentifierTC
            FROM BGP4V2-TC-MIB;

    -- FRR/VyOS implement this MIB under experimental(5).1
    bgp4V2Exp OBJECT IDENTIFIER ::= { experimental 5 }

        bgp4V2 MODULE-IDENTITY
            LAST-UPDATED "201101170000Z"
            ORGANIZATION "IETF IDR Working Group"
            CONTACT-INFO "E-mail:  idr@ietf.org"

            DESCRIPTION
                    "The MIB module for the BGP-4 protocol.

                     Copyright (C) The IETF Trust (2011).  This
                     version of this MIB module is part of RFC XXX;
                     see the RFC itself for full legal notices."
-- RFC Editor - replace XXX with RFC number

            REVISION "201101170000Z"
            DESCRIPTION
                   "This MIB updates and replaces the BGP MIB defined in
                    RFC 4273."
            ::= { bgp4V2Exp 1 }


-- Notifications
    bgp4V2Notifications OBJECT IDENTIFIER ::= { bgp4V2 0 }

    -- Objects

    bgp4V2Objects OBJECT IDENTIFIER ::= { bgp4V2 1 }

 --
    -- Per-peer session management information.
    --

    bgp4V2PeerTable OBJECT-TYPE
        SYNTAX     SEQUENCE OF Bgp4V2PeerEntry
        MAX-ACCESS not-accessible
        STATUS     current
        DESCRIPTION
            "BGP peer table.  This table contains, one entry per BGP
             peer, information about the connections with BGP peers."
        ::= { bgp4V2Objects 2 }

    bgp4V2PeerEntry OBJECT-TYPE
        SYNTAX     Bgp4V2PeerEntry
        MAX-ACCESS not-accessible
        STATUS     current
        DESCRIPTION
            "Entry containing information about the connection with
             a remote BGP peer."
        INDEX {
            bgp4V2PeerInstance,
            bgp4V2PeerRemoteAddrType,
            bgp4V2PeerRemoteAddr
        }
        ::= { bgp4V2PeerTable 1 }

    Bgp4V2PeerEntry ::= SEQUENCE {
        -- INDEX information
        bgp4V2PeerInstance
            Unsigned32,
        bgp4V2PeerLocalAddrType
            InetAddressType,
        bgp4V2PeerLocalAddr
            InetAddress,
        bgp4V2PeerRemoteAddrType
            InetAddressType,
        bgp4V2PeerRemoteAddr
            InetAddress,

        -- Local
        bgp4V2PeerLocalPort
            InetPortNumber,
        bgp4V2PeerLocalAs
            InetAutonomousSystemNumber,
        bgp4V2PeerLocalIdentifier
            Bgp4V2IdentifierTC,

        -- Remote
        bgp4V2PeerRemotePort
            InetPortNumber,
        bgp4V2PeerRemoteAs
            InetAutonomousSystemNumber,
        bgp4V2PeerRemoteIdentifier
            Bgp4V2IdentifierTC,

        -- Session status
        bgp4V2PeerAdminStatus
            INTEGER,
        bgp4V2PeerState
            INTEGER,
        bgp4V2PeerDescription
            SnmpAdminString
    }

    bgp4V2PeerInstance OBJECT-TYPE
        SYNTAX     Unsigned32 (1..4294967295)
        MAX-ACCESS not-accessible
        STATUS     current
        DESCRIPTION
            "The routing instance index.

             Some BGP implementations permit the creation of
             multiple instances of a BGP routing process. An
             example includes routers running BGP/MPLS IP Virtual
             Private Networks.

             Implementations that do not support multiple
             routing instances should return 1 for this object."
        ::= { bgp4V2PeerEntry 1 }

    bgp4V2PeerLocalAddrType OBJECT-TYPE
        SYNTAX     InetAddressType
        MAX-ACCESS not-accessible
        STATUS     current
        DESCRIPTION
            "The address family of the local end of the peering
             session."
        ::= { bgp4V2PeerEntry 2 }

    bgp4V2PeerLocalAddr OBJECT-TYPE
        SYNTAX     InetAddress
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "The local IP address of this entry's BGP connection."
        ::= { bgp4V2PeerEntry 3 }

    bgp4V2PeerRemoteAddrType OBJECT-TYPE
        SYNTAX     InetAddressType
        MAX-ACCESS not-accessible
        STATUS     current
        DESCRIPTION
            "The address family of the remote end of the peering
             session."
        ::= { bgp4V2PeerEntry 4 }

    bgp4V2PeerRemoteAddr OBJECT-TYPE
        SYNTAX     InetAddress
        MAX-ACCESS not-accessible
        STATUS     current
        DESCRIPTION
            "The remote IP address of this entry's BGP peer."
        ::= { bgp4V2PeerEntry 5 }

    bgp4V2PeerLocalPort OBJECT-TYPE
        SYNTAX     InetPortNumber
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "The local port for the TCP connection between the BGP
             peers."
        ::= { bgp4V2PeerEntry 6 }

    bgp4V2PeerLocalAs OBJECT-TYPE
        SYNTAX     InetAutonomousSystemNumber
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "Some implementations of BGP can represent themselves
             as multiple ASes. This is the AS that this peering
             session is representing itself as to the remote peer."
        ::= { bgp4V2PeerEntry 7 }

    bgp4V2PeerLocalIdentifier OBJECT-TYPE
        SYNTAX     Bgp4V2IdentifierTC
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "The BGP Identifier of the local system for this peering
             session.  It is REQUIRED that all bgp4V2PeerLocalIdentifier
             values for the same bgp4V2PeerInstance be identical."
        REFERENCE
            "RFC 4271, Section 4.2, 'BGP Identifier'."
        ::= { bgp4V2PeerEntry 8 }

    bgp4V2PeerRemotePort OBJECT-TYPE
        SYNTAX     InetPortNumber
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "The remote port for the TCP connection between the BGP
             peers.

             Note that the objects bgp4V2PeerLocalAddr,
             bgp4V2PeerLocalPort, bgp4V2PeerRemoteAddr and
             bgp4V2PeerRemotePort provide the appropriate reference to
             the standard MIB TCP connection table, or even the ipv6
             TCP MIB as in RFC 4022."
        REFERENCE
            "RFC 2012 - SNMPv2 Management Information Base for the
             Transmission Control Protocol using SMIv2.
             RFC 4022 - IP Version 6 Management Information Base
             for the Transmission Control Protocol."
        ::= { bgp4V2PeerEntry 9 }

    bgp4V2PeerRemoteAs OBJECT-TYPE
        SYNTAX     InetAutonomousSystemNumber
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "The remote autonomous system number received in the BGP
             OPEN message."
        REFERENCE
            "RFC 4271, Section 4.2."
        ::= { bgp4V2PeerEntry 10 }

    bgp4V2PeerRemoteIdentifier OBJECT-TYPE
        SYNTAX     Bgp4V2IdentifierTC
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "The BGP Identifier of this entry's remote BGP peer.

             This entry should be 0.0.0.0 unless the
             bgp4V2PeerState is in the openconfirm or the
             established state."
        REFERENCE
            "RFC 4271, Section 4.2, 'BGP Identifier'."
        ::= { bgp4V2PeerEntry 11 }

    bgp4V2PeerAdminStatus OBJECT-TYPE
        SYNTAX     INTEGER {
            halted(1),
            running(2)
        }
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "Whether or not the BGP FSM for this remote peer is
             halted or running. The BGP FSM for a remote peer is
             halted after processing a Stop event. Likewise, it is
             in the running state after a Start event.

             The bgp4V2PeerState will generally be in the idle state
             when the FSM is halted, although some extensions such
             as Graceful Restart will leave the peer in the Idle
             state but with the FSM running."
        REFERENCE
            "RFC 4271, Section 8.1.2."
        ::= { bgp4V2PeerEntry 12 }

    bgp4V2PeerState OBJECT-TYPE
        SYNTAX     INTEGER {
            idle(1),
            connect(2),
            active(3),
            opensent(4),
            openconfirm(5),
            established(6)
        }
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "The BGP peer connection state."
        REFERENCE
            "RFC 4271, Section 8.2.2."
        ::= { bgp4V2PeerEntry 13 }


    bgp4V2PeerDescription OBJECT-TYPE
        SYNTAX     SnmpAdminString
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "A user configured description identifying this peer.  When
             this object is not the empty string, this object SHOULD
             contain a description that is unique within a given BGP
             instance for this peer."
        ::= { bgp4V2PeerEntry 14 }

    --
    -- Per-peer error management information.
    --

    bgp4V2PeerErrorsTable OBJECT-TYPE
        SYNTAX     SEQUENCE OF Bgp4V2PeerErrorsEntry
        MAX-ACCESS not-accessible
        STATUS     current
        DESCRIPTION
            "On a per-peer basis, this table reflects the last
             protocol-defined error encountered and reported on
             the peer session."
        ::= { bgp4V2Objects 3 }

    bgp4V2PeerErrorsEntry OBJECT-TYPE
        SYNTAX     Bgp4V2PeerErrorsEntry
        MAX-ACCESS not-accessible
        STATUS     current
        DESCRIPTION
            "Each entry contains information about errors sent
             and received for a particular BGP peer."
        AUGMENTS {
            bgp4V2PeerEntry
        }
        ::= { bgp4V2PeerErrorsTable 1 }

    Bgp4V2PeerErrorsEntry ::= SEQUENCE {
        bgp4V2PeerLastErrorCodeReceived
            Unsigned32,
        bgp4V2PeerLastErrorSubCodeReceived
            Unsigned32,
        bgp4V2PeerLastErrorReceivedTime
            TimeStamp,
        bgp4V2PeerLastErrorReceivedText
            SnmpAdminString,
        bgp4V2PeerLastErrorReceivedData
            OCTET STRING,
        bgp4V2PeerLastErrorCodeSent
            Unsigned32,
        bgp4V2PeerLastErrorSubCodeSent
            Unsigned32,
        bgp4V2PeerLastErrorSentTime
            TimeStamp,
        bgp4V2PeerLastErrorSentText
            SnmpAdminString,
        bgp4V2PeerLastErrorSentData
            OCTET STRING
    }

    bgp4V2PeerLastErrorCodeReceived OBJECT-TYPE
        SYNTAX     Unsigned32 (0..255)
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "The last error code received from this peer via
             NOTIFICATION message on this connection.  If no
             error has occurred, this field is zero."
        REFERENCE
            "RFC 4271, Section 4.5.
             RFC 4486 optionally supported.
             RFC 3362, Section 5 optionally supported."
        ::= { bgp4V2PeerErrorsEntry 1 }

    bgp4V2PeerLastErrorSubCodeReceived OBJECT-TYPE
        SYNTAX     Unsigned32 (0..255)
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "The last subcode received from this peer via NOTIFICATION
             message on this connection.  If no error has occurred, this
             field is zero."
        REFERENCE
            "RFC 4271, Section 4.5.
             RFC 4486 optionally supported.
             RFC 3362, Section 5 optionally supported."
        ::= { bgp4V2PeerErrorsEntry 2 }

    bgp4V2PeerLastErrorReceivedTime OBJECT-TYPE
        SYNTAX     TimeStamp
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "The timestamp that the last NOTIFICATION was received from
             this peer."
        REFERENCE
            "RFC 4271, Section 4.5."
        ::= { bgp4V2PeerErrorsEntry 3 }

    bgp4V2PeerLastErrorReceivedText OBJECT-TYPE
        SYNTAX     SnmpAdminString
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "This object contains an implementation specific
             explanation of the error that was reported."
        ::= { bgp4V2PeerErrorsEntry 4 }

    bgp4V2PeerLastErrorReceivedData OBJECT-TYPE
        SYNTAX     OCTET STRING (SIZE(0..4075))
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "The last error code's data seen by this peer.

             Per RFC 2578, some implementations may have limitations
             dealing with OCTET STRINGS larger than 255.  Thus, this
             data may be truncated."
        REFERENCE
            "RFC 4271, Section 4.5,
             RFC 2578, Section 7.1.2,
             RFC 4486 optionally supported.
             RFC 3362, Section 5 optionally supported."
        ::= { bgp4V2PeerErrorsEntry 5 }

    bgp4V2PeerLastErrorCodeSent OBJECT-TYPE
        SYNTAX     Unsigned32 (0..255)
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "The last error code sent to this peer via NOTIFICATION
             message on this connection.  If no error has occurred, this
             field is zero."
        REFERENCE
            "RFC 4271, Section 4.5.
             RFC 4486 optionally supported.
             RFC 3362, Section 5 optionally supported."
        ::= { bgp4V2PeerErrorsEntry 6 }

    bgp4V2PeerLastErrorSubCodeSent OBJECT-TYPE
        SYNTAX     Unsigned32 (0..255)
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "The last subcode sent to this peer via NOTIFICATION
             message on this connection.  If no error has
             occurred, this field is zero."
        REFERENCE
            "RFC 4271, Section 4.5.
             RFC 4486 optionally supported.
             RFC 3362, Section 5 optionally supported."
        ::= { bgp4V2PeerErrorsEntry 7 }

    bgp4V2PeerLastErrorSentTime OBJECT-TYPE
        SYNTAX     TimeStamp
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "The timestamp that the last NOTIFICATION was sent to
             this peer."
        REFERENCE
            "RFC 4271, Section 4.5."
        ::= { bgp4V2PeerErrorsEntry 8 }

    bgp4V2PeerLastErrorSentText OBJECT-TYPE
        SYNTAX     SnmpAdminString
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "This object contains an implementation specific
             explanation of the error that is being reported."
        ::= { bgp4V2PeerErrorsEntry 9 }

    bgp4V2PeerLastErrorSentData OBJECT-TYPE
        SYNTAX     OCTET STRING (SIZE(0..4075))
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "The last error code's data sent to this peer.

             Per RFC 2578, some implementations may have limitations
             dealing with OCTET STRINGS larger than 255.  Thus, this
             data may be truncated."
        REFERENCE
            "RFC 4271, Section 4.5,
             RFC 2578, Section 7.1.2
             RFC 4486 optionally supported.
             RFC 3362, Section 5 optionally supported."
        ::= { bgp4V2PeerErrorsEntry 10 }

 --
    -- Per-peer Event Times
    --

    bgp4V2PeerEventTimesTable OBJECT-TYPE
        SYNTAX     SEQUENCE OF Bgp4V2PeerEventTimesEntry
        MAX-ACCESS not-accessible
        STATUS     current
        DESCRIPTION
            "A table reporting the per-peering session amount
             of time elapsed and update events since the peering
             session advanced into the established state."
        ::= { bgp4V2Objects 4 }

    bgp4V2PeerEventTimesEntry OBJECT-TYPE
        SYNTAX     Bgp4V2PeerEventTimesEntry
        MAX-ACCESS not-accessible
        STATUS     current
        DESCRIPTION
            "Each row contains a set of statistics about time
             spent and events encountered in the peer session
             established state."
        AUGMENTS {
            bgp4V2PeerEntry
        }
        ::= { bgp4V2PeerEventTimesTable 1 }

    Bgp4V2PeerEventTimesEntry ::= SEQUENCE {
        bgp4V2PeerFsmEstablishedTime
            Gauge32,
        bgp4V2PeerInUpdatesElapsedTime
            Gauge32
    }

    bgp4V2PeerFsmEstablishedTime OBJECT-TYPE
        SYNTAX     Gauge32
        UNITS      "seconds"
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "This timer indicates how long (in seconds) this peer
             has been in the established state or how long since this
             peer was last in the established state.  It is set to
             zero when a new peer is configured or when the router is
             booted.  If the peer has never reached the established
             state, the value remains zero."
        REFERENCE
            "RFC 4271, Section 8."
        ::= { bgp4V2PeerEventTimesEntry 1 }

    bgp4V2PeerInUpdatesElapsedTime OBJECT-TYPE
        SYNTAX     Gauge32
        UNITS      "seconds"
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "Elapsed time (in seconds) since the last BGP UPDATE
             message was received from the peer.  Each time
             bgpPeerInUpdates is incremented, the value of this
             object is set to zero (0)."
        REFERENCE
            "RFC 4271, Section 4.3.
             RFC 4271, Section 8.2.2, Established state."
        ::= { bgp4V2PeerEventTimesEntry 2 }

--
    -- BGP NLRI
    --

    bgp4V2NlriTable OBJECT-TYPE
        SYNTAX     SEQUENCE OF Bgp4V2NlriEntry
        MAX-ACCESS not-accessible
        STATUS     current
        DESCRIPTION
            "The BGP-4 Received Path Attribute Table contains
             information about paths to destination networks
             received from all BGP4 peers."
        REFERENCE
            "RFC 4271, Sections 3.2 and 9."
        ::= { bgp4V2Objects 9 }

    bgp4V2NlriEntry OBJECT-TYPE
        SYNTAX     Bgp4V2NlriEntry
        MAX-ACCESS not-accessible
        STATUS     current
        DESCRIPTION
            "Information about a path to a network."
        INDEX {
            bgp4V2PeerInstance,
            bgp4V2NlriAfi,
            bgp4V2NlriSafi,
            bgp4V2NlriPrefixType,
            bgp4V2NlriPrefix,
            bgp4V2NlriPrefixLen,
            bgp4V2PeerRemoteAddrType,
            bgp4V2PeerRemoteAddr,
            bgp4V2NlriIndex
        }
        ::= { bgp4V2NlriTable 1 }

    Bgp4V2NlriEntry ::= SEQUENCE {
        bgp4V2NlriIndex
            Unsigned32,
        bgp4V2NlriAfi
            Bgp4V2AddressFamilyIdentifierTC,
        bgp4V2NlriSafi
            Bgp4V2SubsequentAddressFamilyIdentifierTC,
        bgp4V2NlriPrefixType
            InetAddressType,
        bgp4V2NlriPrefix
            InetAddress,
        bgp4V2NlriPrefixLen
            InetAddressPrefixLength,
        bgp4V2NlriBest
            TruthValue,
        bgp4V2NlriCalcLocalPref
            Unsigned32,
        bgp4V2NlriOrigin
            INTEGER,
        bgp4V2NlriNextHopAddrType
            InetAddressType,
        bgp4V2NlriNextHopAddr
            InetAddress,
        bgp4V2NlriLinkLocalNextHopAddrType
            InetAddressType,
        bgp4V2NlriLinkLocalNextHopAddr
            InetAddress,
        bgp4V2NlriLocalPrefPresent
            TruthValue,
        bgp4V2NlriLocalPref
            Unsigned32,
        bgp4V2NlriMedPresent
            TruthValue,
        bgp4V2NlriMed
            Unsigned32,
        bgp4V2NlriAtomicAggregate
            TruthValue,
        bgp4V2NlriAggregatorPresent
            TruthValue,
        bgp4V2NlriAggregatorAS
            InetAutonomousSystemNumber,
        bgp4V2NlriAggregatorAddr
            Bgp4V2IdentifierTC,
        bgp4V2NlriAsPathCalcLength
            Unsigned32,
        bgp4V2NlriAsPathString
            SnmpAdminString,
        bgp4V2NlriAsPath
            OCTET STRING,
        bgp4V2NlriPathAttrUnknown
            OCTET STRING
    }

    bgp4V2NlriIndex OBJECT-TYPE
        SYNTAX     Unsigned32
        MAX-ACCESS not-accessible
        STATUS     current
        DESCRIPTION
            "This index allows for multiple instances of a base
             prefix for a certain AFI-SAFI from a given peer."
        ::= { bgp4V2NlriEntry 1 }

    bgp4V2NlriAfi OBJECT-TYPE
        SYNTAX     Bgp4V2AddressFamilyIdentifierTC
        MAX-ACCESS not-accessible
        STATUS     current
        DESCRIPTION
            "The address family of the prefix for this NLRI."
        REFERENCE
            "RFC 4760 - Multiprotocol Extensions for BGP-4"
        ::= { bgp4V2NlriEntry 2 }

    bgp4V2NlriSafi OBJECT-TYPE
        SYNTAX     Bgp4V2SubsequentAddressFamilyIdentifierTC
        MAX-ACCESS not-accessible
        STATUS     current
        DESCRIPTION
            "The subsequent address family of the prefix for this NLRI."
        REFERENCE
            "RFC 4760 - Multiprotocol Extensions for BGP-4"
        ::= { bgp4V2NlriEntry 3 }

    bgp4V2NlriPrefixType OBJECT-TYPE
        SYNTAX     InetAddressType
        MAX-ACCESS not-accessible
        STATUS     current
        DESCRIPTION
            "The type of the IP address prefix in the Network Layer
             Reachability Information field."
        ::= { bgp4V2NlriEntry 4 }

    bgp4V2NlriPrefix OBJECT-TYPE
        SYNTAX     InetAddress
        MAX-ACCESS not-accessible
        STATUS     current
        DESCRIPTION
            "An IP address prefix in the Network Layer Reachability
             Information field."
        REFERENCE
            "RFC 4271, Section 4.3."
        ::= { bgp4V2NlriEntry 5 }

    bgp4V2NlriPrefixLen OBJECT-TYPE
        SYNTAX     InetAddressPrefixLength
        MAX-ACCESS not-accessible
        STATUS     current
        DESCRIPTION
            "Length in bits of the address prefix in the Network Layer
             Reachability Information field."
        ::= { bgp4V2NlriEntry 6 }

    bgp4V2NlriBest OBJECT-TYPE
        SYNTAX     TruthValue
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "An indication of whether or not this route was chosen as
             the best BGP4 route for this destination."
        REFERENCE
            "RFC 4271, Section 9.1.2."
        ::= { bgp4V2NlriEntry 7 }

    bgp4V2NlriCalcLocalPref OBJECT-TYPE
        SYNTAX     Unsigned32
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "The degree of preference calculated by the receiving BGP4
             speaker for an advertised route."
        REFERENCE
            "RFC 4271, Section 9.1.1"
        ::= { bgp4V2NlriEntry 8 }

    bgp4V2NlriOrigin OBJECT-TYPE
        SYNTAX     INTEGER {
            igp(1),
            egp(2),
            incomplete(3)
        }
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "The ultimate origin of the path information."
        REFERENCE
            "RFC 4271, Section 4.3.
             RFC 4271, Section 5.1.1."
        ::= { bgp4V2NlriEntry 9 }

    bgp4V2NlriNextHopAddrType OBJECT-TYPE
        SYNTAX     InetAddressType
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "The address family of the address for the border router
             that should be used to access the destination network."
        ::= { bgp4V2NlriEntry 10 }

    bgp4V2NlriNextHopAddr OBJECT-TYPE
        SYNTAX     InetAddress (SIZE(4..20))
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "The address of the border router that should be used to
             access the destination network."
        REFERENCE
            "RFC 4271, Section 4.3,
             RFC 4271, Section 5.1.3,
             RFC 2545, Section 3."
        ::= { bgp4V2NlriEntry 11 }

    bgp4V2NlriLinkLocalNextHopAddrType OBJECT-TYPE
        SYNTAX     InetAddressType
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "The address type for IPv6 link local addresses."
        REFERENCE
            "RFC 2545, Section 3."
        ::= { bgp4V2NlriEntry 12 }

    bgp4V2NlriLinkLocalNextHopAddr OBJECT-TYPE
        SYNTAX     InetAddress
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "This value contains an IPv6 link local address and is
             present only when receiving RFC 2545 style double nexthops."
        REFERENCE
            "RFC 2545, Section 3."
        ::= { bgp4V2NlriEntry 13 }

    bgp4V2NlriLocalPrefPresent OBJECT-TYPE
        SYNTAX     TruthValue
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "This value is true when the LOCAL_PREF value was sent in
             the UPDATE message."
        ::= { bgp4V2NlriEntry 14 }

    bgp4V2NlriLocalPref OBJECT-TYPE
        SYNTAX     Unsigned32
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "The originating BGP4 speakers degree of preference for an
             advertised route."
        REFERENCE
            "RFC 4271, Section 4.3.
             RFC 4271, Section 5.1.5."
        ::= { bgp4V2NlriEntry 15 }

    bgp4V2NlriMedPresent OBJECT-TYPE
        SYNTAX     TruthValue
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "This value is true when the MED value was sent in the
             UPDATE message."
        ::= { bgp4V2NlriEntry 16 }

    bgp4V2NlriMed OBJECT-TYPE
        SYNTAX     Unsigned32
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "This metric is used to discriminate between multiple exit
             points to an adjacent autonomous system."
        REFERENCE
            "RFC 4271, Section 4.3.
             RFC 4271, Section 5.1.4."
        ::= { bgp4V2NlriEntry 17 }

    bgp4V2NlriAtomicAggregate OBJECT-TYPE
        SYNTAX     TruthValue
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "This value is true when the ATOMIC_AGGREGATE Path Attribute
             is present."
        REFERENCE
            "RFC 4271, Sections 5.1.6 and 9.1.4."
        ::= { bgp4V2NlriEntry 18 }

    bgp4V2NlriAggregatorPresent OBJECT-TYPE
        SYNTAX     TruthValue
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "This value is true when the AGGREGATOR path attribute was
             sent in the UPDATE message."
        ::= { bgp4V2NlriEntry 19 }

    bgp4V2NlriAggregatorAS OBJECT-TYPE
        SYNTAX     InetAutonomousSystemNumber
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "The AS number of the last BGP4 speaker that performed route
             aggregation."
        REFERENCE
            "RFC 4271, Section 5.1.7.
             RFC 4271, Section 9.2.2.2."
        ::= { bgp4V2NlriEntry 20 }

    bgp4V2NlriAggregatorAddr OBJECT-TYPE
        SYNTAX     Bgp4V2IdentifierTC
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "The IP address of the last BGP4 speaker that performed
             route aggregation."
        REFERENCE
            "RFC 4271, Section 5.1.7.
             RFC 4271, Section 9.2.2.2."
        ::= { bgp4V2NlriEntry 21 }

    bgp4V2NlriAsPathCalcLength OBJECT-TYPE
        SYNTAX     Unsigned32
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "This value represents the calculated length of the AS Path
             according to the rules of the BGP specification."
        REFERENCE
            "RFC 4271, Section 9.1.2.2.a"
        ::= { bgp4V2NlriEntry 22 }

    bgp4V2NlriAsPathString OBJECT-TYPE
        SYNTAX     SnmpAdminString
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "This is a string depicting the autonomous system path to
             this network which was received from the peer which
             advertised it."
        ::= { bgp4V2NlriEntry 23 }

    bgp4V2NlriAsPath OBJECT-TYPE
        SYNTAX     OCTET STRING (SIZE(2..4072))
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "The contents of the BGP-4 AS_PATH Path Attribute in
             canonical form."
        REFERENCE
            "RFC 4271, Section 4.3.
             RFC 5065, Section 5.
             RFC 4893."
        ::= { bgp4V2NlriEntry 24 }

    bgp4V2NlriPathAttrUnknown OBJECT-TYPE
        SYNTAX     OCTET STRING (SIZE(0..4072))
        MAX-ACCESS read-only
        STATUS     current
        DESCRIPTION
            "Path Attributes not understood by this implementation
             SHOULD be presented in this object."
        REFERENCE
            "RFC 4271, Section 4.3."
        ::= { bgp4V2NlriEntry 25 }

--
    -- Notifications
    --

    bgp4V2EstablishedNotification NOTIFICATION-TYPE
        OBJECTS {
            bgp4V2PeerState,
            bgp4V2PeerLocalPort,
            bgp4V2PeerRemotePort
        }
        STATUS current
        DESCRIPTION
            "The BGP Established event is generated when the BGP FSM
             enters the established state."
        ::= { bgp4V2Notifications 1 }

    bgp4V2BackwardTransitionNotification NOTIFICATION-TYPE
        OBJECTS {
            bgp4V2PeerState,
            bgp4V2PeerLocalPort,
            bgp4V2PeerRemotePort,
            bgp4V2PeerLastErrorCodeReceived,
            bgp4V2PeerLastErrorSubCodeReceived,
            bgp4V2PeerLastErrorReceivedText
        }
        STATUS current
        DESCRIPTION
            "The BGPBackwardTransition Event is generated when the BGP
             FSM moves from a higher numbered state to a lower numbered
             state."
        ::= { bgp4V2Notifications 2 }

END
