IPI-VRF-MIB DEFINITIONS ::= BEGIN

IMPORTS
    MODULE-IDENTITY,
    OBJECT-TYPE,
    Unsigned32,
    enterprises,
    NOTIFICATION-TYPE
        FROM SNMPv2-SMI
    MODULE-COMPLIANCE,
    OBJECT-GROUP,
    NOTIFICATION-GROUP
        FROM SNMPv2-CONF
    StorageType,
    RowStatus
        FROM SNMPv2-TC
    InterfaceIndex
        FROM IF-MIB
    SnmpAdminString
        FROM SNMP-FRAMEWORK-MIB;
        
ipiVrfMIB MODULE-IDENTITY
    LAST-UPDATED    "201405161225Z"
    ORGANIZATION    "IP Infusion Sofware India Pvt Ltd."
    CONTACT-INFO
            "support@ipinfusion.com"    
    DESCRIPTION
        "The MIB module for provisioning and managing network
        virtualization features. 

        A VRF-Lite enabled device implements VRFs and does not require
        MPLS for end to end communication. Instead of using MPLS
        labels, VRF-Lite uses the interfaces to distinguish routes for
        different VPNs. VRF-Lite forms virtual packet-forwarding tables
        by associating one or more interfaces with each VRF, and
        interfaces cannot belong to more than one VRF at any time.

        VRF-Lite is an IP based hop-by-hop virtualization mechanism and
        it involves complex configuration of every hop in the network.
        vNET, virtual network, is also an IP based hop-by-hop mechanism
        that can provide end-to-end virtualization of the network. vNET
        greatly reduces the complexity in VRF-Lite deployment.

        This MIB module will allow the user to perform the following

          * Create and monitor VRFs
          * Group VRFs to create VRF List
          * Associate/Dis-associate interface to/from a VRF"
    REVISION        "201405161225Z"
    DESCRIPTION
        "Latest version of this MIB module."
    ::= { oaOptiSwitch 35 }

-- ************************************************************
-- MIB place Definition
-- ************************************************************
oaccess             OBJECT IDENTIFIER ::= { enterprises 6926 }
oaOptiSwitch        OBJECT IDENTIFIER ::= { oaccess 2 }

-- Top Level Object hierarchy

ipiVrfMIBObjects  OBJECT IDENTIFIER
    ::= { ipiVrfMIB 1 }


ipiVrfMIBNotifs  OBJECT IDENTIFIER
    ::= { ipiVrfMIB 0 }

ipiVrfMIBConform  OBJECT IDENTIFIER
    ::= { ipiVrfMIB 2 }

ipiVrf  OBJECT IDENTIFIER
    ::= { ipiVrfMIBObjects 1 }

ipiInterface  OBJECT IDENTIFIER
    ::= { ipiVrfMIBObjects 2 }

-- Object definitions


ipiVrfTable OBJECT-TYPE
    SYNTAX          SEQUENCE OF IpiVrfEntry 
    MAX-ACCESS      not-accessible
    STATUS          current
    DESCRIPTION
        "This table contains entries representing a VRF - Virtual
        Routing and Forwarding instance. There will be an entry for
        each VRF instance created in the system."
    ::= { ipiVrf 1 }

ipiVrfEntry OBJECT-TYPE
    SYNTAX          IpiVrfEntry
    MAX-ACCESS      not-accessible
    STATUS          current
    DESCRIPTION
        "An entry representing the information pertaining to a virtual
        routing and forwarding instance."
    INDEX           { ipiVrfIndex } 
    ::= { ipiVrfTable 1 }

IpiVrfEntry ::= SEQUENCE {
        ipiVrfIndex         Unsigned32,
        ipiVrfName          SnmpAdminString,
        ipiVrfOperStatus    INTEGER,
        ipiVrfRouteDistProt BITS,
        ipiVrfStorageType   StorageType,
        ipiVrfRowStatus     RowStatus
}

ipiVrfIndex OBJECT-TYPE
    SYNTAX          Unsigned32 (1..65535)
    MAX-ACCESS      not-accessible
    STATUS          current
    DESCRIPTION
        "An identifier that is assigned to each VRF and is used to
        uniquely identify it. The uniqueness of this identifier is
        restricted only to this device." 
    ::= { ipiVrfEntry 1 }

ipiVrfName OBJECT-TYPE
    SYNTAX          SnmpAdminString (SIZE  (1..64))
    MAX-ACCESS      read-create
    STATUS          current
    DESCRIPTION
        "The human-readable name of the VRF instance. This name
        uniquely identifies the VRF instance in the system.

        This object is mandatory for creating an entry in this table." 
    ::= { ipiVrfEntry 2 }

ipiVrfOperStatus OBJECT-TYPE
    SYNTAX          INTEGER  {
                        up(1),
                        down(2)
                    }
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "Denotes whether a VRF is operational or not. A VRF is
        up(1) when at least one interface associated with the
        VRF, which ifOperStatus is up(1). A VRF is down(2) when:

        a. There does not exist at least one interface whose
           ifOperStatus is up(1).

        b. There are no interfaces associated with the VRF." 
    ::= { ipiVrfEntry 3 }

ipiVrfRouteDistProt OBJECT-TYPE
    SYNTAX          BITS {
                        none(0),
                        other(1),
                        static(2),    
                        ospf(3),
                        bgp(4),
                        pim(5),
                        igmp(6)
                    }
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "Denotes the route distribution protocol enabled in this
        VRF. Note that more than one routing protocol may be
        enabled at the same time." 
    ::= { ipiVrfEntry 4 }

ipiVrfStorageType OBJECT-TYPE
    SYNTAX          StorageType
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The storage type for this entry." 
    ::= { ipiVrfEntry 5 }

ipiVrfRowStatus OBJECT-TYPE
    SYNTAX          RowStatus
    MAX-ACCESS      read-create
    STATUS          current
    DESCRIPTION
        "This object is used to create, modify, and/or delete a row in
        this table." 
    ::= { ipiVrfEntry 6 }
    
ipiVrfInterfaceTable OBJECT-TYPE
    SYNTAX          SEQUENCE OF IpiVrfInterfaceEntry 
    MAX-ACCESS      not-accessible
    STATUS          current
    DESCRIPTION
        "This table contains the entries representing the interfaces
        associated with a VRF instance."
    ::= { ipiInterface 1 }

ipiVrfInterfaceEntry OBJECT-TYPE
    SYNTAX          IpiVrfInterfaceEntry
    MAX-ACCESS      not-accessible
    STATUS          current
    DESCRIPTION
        "An entry in this table represents an interface to which a VRF
        is associated. An interface  can be associated with only one VRF.
        There will be one entry per interface in this table."
    INDEX           {
                        ipiVrfInterfaceIndex
                    } 
    ::= { ipiVrfInterfaceTable 1 }

IpiVrfInterfaceEntry ::= SEQUENCE {
        ipiVrfInterfaceIndex           InterfaceIndex,
        ipiVrfInterfaceName	       SnmpAdminString,
        ipiVrfInterfaceStorageType     StorageType,
        ipiVrfInterfaceRowStatus       RowStatus
}

ipiVrfInterfaceIndex OBJECT-TYPE
    SYNTAX          InterfaceIndex (1..2147483647)
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "This is a unique index for an entry in this table. A non-zero
        index for an entry indicates the ifIndex for the corresponding
        interface entry in the ifTable. Note that this table does not 
        necessarily correspond one-to-one with all entries in the
        Interface MIB." 
    ::= { ipiVrfInterfaceEntry 1 }

ipiVrfInterfaceName OBJECT-TYPE
    SYNTAX          SnmpAdminString (SIZE  (1..64))
    MAX-ACCESS      read-create
    STATUS          current
    DESCRIPTION
        "The human-readable name of the VRF instance. This name
        uniquely identifies the VRF instance in the system." 
    ::= { ipiVrfInterfaceEntry 2 }

ipiVrfInterfaceStorageType OBJECT-TYPE
    SYNTAX          StorageType
    MAX-ACCESS      read-only
    STATUS          current
    DESCRIPTION
        "The storage type for this entry." 
    ::= { ipiVrfInterfaceEntry 3 }

ipiVrfInterfaceRowStatus OBJECT-TYPE
    SYNTAX          RowStatus
    MAX-ACCESS      read-create
    STATUS          current
    DESCRIPTION
        "This object is used to create, modify, and/or delete a row in
        this table.

        When a row is created in this table the VRF is associated to an
        interface. When a row is deleted from this table the VRF is
        dis-associated from the interface." 
    ::= { ipiVrfInterfaceEntry 4 }
 
-- Notification definitions

ipiVrfIfUp NOTIFICATION-TYPE
    OBJECTS         {
                        ipiVrfInterfaceIndex,
                        ipiVrfName,
                        ipiVrfOperStatus
                    }
    STATUS          current
    DESCRIPTION
        "This notification is generated when:
        a. The ifOperStatus of an interface associated with a VRF
           changes to the up(1) state.
        b. When an interface with ifOperStatus = up(1) is 
           associated with a VRF.

        The interface is identified by ipiVrfInterfaceIndex and the VRF is identified by ipiVrfName varbinds respectively."
   ::= { ipiVrfMIBNotifs 1 }

ipiVrfIfDown NOTIFICATION-TYPE
    OBJECTS         {
                        ipiVrfInterfaceIndex,
                        ipiVrfName,
                        ipiVrfOperStatus
                    }
    STATUS          current
    DESCRIPTION
        "This notification is generated when:
        a. The ifOperStatus of an interface associated with a VRF 
           changes to the down(2) state.
        b. When an interface with ifOperStatus = up(1) state is 
           disassociated with a VRF.

        The interface is identified by ipiVrfInterfaceIndex and the VRF is identified by ipiVrfName varbinds respectively.

        If all the interfaces associated with the VRF are in down(2) 
        state or if there are no more interfaces associated with the
        VRF, then the ipiVrfOperStatus will have a value of down(2)."
   ::= { ipiVrfMIBNotifs 2 }

-- Units of Conformance

ipiMIBGroups  OBJECT IDENTIFIER
    ::= { ipiVrfMIBConform 1 }


ipiMIBVrfGroup OBJECT-GROUP
    OBJECTS         {
                        ipiVrfOperStatus,
                        ipiVrfStorageType,
                        ipiVrfRowStatus,
                        ipiVrfRouteDistProt,
                        ipiVrfInterfaceIndex,
                        ipiVrfInterfaceName,
                        ipiVrfInterfaceStorageType,
                        ipiVrfInterfaceRowStatus,
                        ipiVrfName
                    }
    STATUS          current
    DESCRIPTION
        "Collection of objects needed for VRF and VRF-Lite management."
    ::= { ipiMIBGroups 1 }

ipiMIBVrfNotifGroup NOTIFICATION-GROUP
   NOTIFICATIONS    {
                        ipiVrfIfUp,
                        ipiVrfIfDown
                    }
    STATUS          current
    DESCRIPTION
        "Collection of VRF notifications."
    ::= { ipiMIBGroups 2 }

ipiMIBCompliances  OBJECT IDENTIFIER
    ::= { ipiVrfMIBConform 2 }

ipiMIBCompliance MODULE-COMPLIANCE
    STATUS          current
    DESCRIPTION
        "The compliance statement for SNMP Agents which
        implement this MIB."
    MODULE          -- this module
    MANDATORY-GROUPS {
                        ipiMIBVrfGroup,
                        ipiMIBVrfNotifGroup
                    }
    ::= { ipiMIBCompliances 1 }

END


          




