-- *****************************************************************
-- QTECH-DHCP-SNOOPING-MIB.mib:  Qtech DHCP snooping MIB file
--
-- Oct. 2007, chenfeng
--
-- Copyright (c) 2007 by Qtech Networks Co.,Ltd.
-- All rights reserved.
-- 
-- *****************************************************************
--

QTECH-DHCP-SNOOPING-MIB DEFINITIONS ::= BEGIN

IMPORTS
    MODULE-IDENTITY, 
    OBJECT-TYPE,
    IpAddress,
    Unsigned32
        FROM SNMPv2-SMI

    MODULE-COMPLIANCE,
    OBJECT-GROUP
        FROM SNMPv2-CONF

    TruthValue,
    MacAddress, 
    DisplayString,
    RowStatus
        FROM SNMPv2-TC

    InterfaceIndex
        FROM IF-MIB

    VlanIndex
        FROM Q-BRIDGE-MIB 

    qtechMgmt
        FROM QTECH-SMI;

qtechDhcpSnoopingMIB MODULE-IDENTITY
    LAST-UPDATED "200710180000Z"
    ORGANIZATION "Qtech Networks Co.,Ltd."
    CONTACT-INFO
        " 
        Tel: 4008-111-000 

        E-mail: service@qtech.com.cn"
    DESCRIPTION
        "This module defines qtech DHCP snooping mibs."
    REVISION    "200710180000Z"
    DESCRIPTION
        "Initial version of this MIB module."
    ::= { qtechMgmt 42} 

qtechDhcpSnoopingMIBObjects
    OBJECT IDENTIFIER ::= { qtechDhcpSnoopingMIB 1 }
qtechDhcpSnoopingMIBConformance
    OBJECT IDENTIFIER ::= { qtechDhcpSnoopingMIB 2 }

qtechSNDhcpGlobal
    OBJECT IDENTIFIER ::= { qtechDhcpSnoopingMIBObjects 1 }
qtechSNDhcpInterface
    OBJECT IDENTIFIER ::= { qtechDhcpSnoopingMIBObjects 2 }
qtechSNDhcpBindings
    OBJECT IDENTIFIER ::= { qtechDhcpSnoopingMIBObjects 3 }
--
-- The Global group  
-- 

qtechSNDhcpFeatureEnable  OBJECT-TYPE
    SYNTAX        TruthValue
    MAX-ACCESS    read-write
    STATUS        current
    DESCRIPTION
        "This object indicates whether the DHCP Snooping feature is
        enabled. 
        Setting this object to 'false' disables the DHCP Snooping 
        feature. Setting this object to 'true' will start the DHCP Snooping 
        feature running in the device."
    ::= { qtechSNDhcpGlobal 1 }

qtechSNDhcpDatabaseUpdateInterval OBJECT-TYPE
    SYNTAX          Unsigned32
    UNITS            "seconds"
    MAX-ACCESS    read-write
    STATUS          current
    DESCRIPTION
        "This object indicates the time interval at which DHCP
         bindings information will be written to the database file
         denoted by qtechSNDhcpDatabaseFile object."
    ::= { qtechSNDhcpGlobal 2 }

qtechSNDhcpRelayAgentInfoOptEnable OBJECT-TYPE
    SYNTAX         TruthValue
    MAX-ACCESS    read-write
    STATUS          current
    DESCRIPTION
        "This object indicates if the DHCP relay agent information
        option (option 82) will be inserted to DHCP packets by
        DHCP Snooping feature.
        If this object is set to 'true', DHCP option 82 data will
        be inserted to DHCP packets.
        If this object is set to 'false', DHCP option 82 data
        will not be inserted."
    REFERENCE
        "RFC 3046, DHCP Relay Agent Information Option."
    ::= { qtechSNDhcpGlobal 3 }

qtechSNDhcpMatchMacAddressEnable OBJECT-TYPE
    SYNTAX          TruthValue
    MAX-ACCESS    read-write
    STATUS          current
    DESCRIPTION
        "This object indicates if DHCP Snooping Mac address
        matching is enabled. 
        If this object is set to 'true', DHCP Snooping Mac
        address matching is enabled.
        If this object is set to 'false', DHCP Snooping Mac
        address matching is disabled."
    ::= { qtechSNDhcpGlobal 4 }

--
-- The DHCP Snooping Interface Trust Table
--

qtechSNDhcpIfTrustTable OBJECT-TYPE
    SYNTAX         SEQUENCE OF QtechSNDhcpIfTrustEntry
    MAX-ACCESS   not-accessible
    STATUS         current
    DESCRIPTION
        "A table provides the mechanism to configure the trust
        state for DHCP Snooping purpose at each physical interface
        capable of this feature. Some of the interfaces
        (but not limited to) for which this feature might be
        applicable are: ifType = ethernetCsmacd(6)." 
    ::= { qtechSNDhcpInterface 1 }
 
qtechSNDhcpIfTrustEntry OBJECT-TYPE
    SYNTAX         QtechSNDhcpIfTrustEntry 
    MAX-ACCESS   not-accessible
    STATUS         current
    DESCRIPTION
        "A row instance contains the configuration to enable
        or disable trust state for DHCP Snooping at each physical
        interface capable of this feature." 
    INDEX { qtechSNDhcpIfTrustIndex }
    ::= { qtechSNDhcpIfTrustTable 1 }

QtechSNDhcpIfTrustEntry ::= SEQUENCE {
    qtechSNDhcpIfTrustIndex        InterfaceIndex,
    qtechSNDhcpIfTrustEnable       TruthValue 
}

qtechSNDhcpIfTrustIndex OBJECT-TYPE
        SYNTAX         InterfaceIndex
        MAX-ACCESS   not-accessible
        STATUS         current
        DESCRIPTION
            " "
        ::= { qtechSNDhcpIfTrustEntry 1 }  
     
qtechSNDhcpIfTrustEnable OBJECT-TYPE
    SYNTAX        TruthValue
    MAX-ACCESS  read-write
    STATUS        current
    DESCRIPTION
        "This object indicates whether the interface is trusted for
        DHCP Snooping purpose. 
        If this object is set to 'true', the interface is trusted.
        DHCP packets coming to this interface will be forwarded
        without checking.
        If this object is set to 'false', the interface is not
        trusted. DHCP packets coming to this interface will be
        subjected to DHCP checks." 
    ::= { qtechSNDhcpIfTrustEntry 2 }

--
-- The DHCP Snooping Interface Suppression Table
--

qtechSNDhcpIfSuppressionTable OBJECT-TYPE
    SYNTAX         SEQUENCE OF QtechSNDhcpIfSuppressionEntry
    MAX-ACCESS   not-accessible
    STATUS         current
    DESCRIPTION
        "A table provides the mechanism to configure the suppression
        state for DHCP Snooping purpose at each physical interface
        capable of this feature. Some of the interfaces
        (but not limited to) for which this feature might be
        applicable are: ifType = ethernetCsmacd(6)." 
    ::= { qtechSNDhcpInterface 2 }
 
qtechSNDhcpIfSuppressionEntry OBJECT-TYPE
    SYNTAX         QtechSNDhcpIfSuppressionEntry 
    MAX-ACCESS   not-accessible
    STATUS         current
    DESCRIPTION
        "A row instance contains the configuration to enable
        or disable suppression state for DHCP Snooping at each physical
        interface capable of this feature." 
    INDEX { qtechSNDhcpIfSuppressionIndex }
    ::= { qtechSNDhcpIfSuppressionTable 1 }

QtechSNDhcpIfSuppressionEntry ::= SEQUENCE {
    qtechSNDhcpIfSuppressionIndex               InterfaceIndex,
    qtechSNDhcpIfSuppressionEnable       TruthValue 
}

qtechSNDhcpIfSuppressionIndex OBJECT-TYPE
        SYNTAX        InterfaceIndex
        MAX-ACCESS  not-accessible
        STATUS        current
        DESCRIPTION
            "This object indicates the interface open Suppression"
        ::= { qtechSNDhcpIfSuppressionEntry 1 }  
     
qtechSNDhcpIfSuppressionEnable OBJECT-TYPE
    SYNTAX         TruthValue
    MAX-ACCESS   read-write
    STATUS         current
    DESCRIPTION
        "This object indicates whether the interface is suppression for
        DHCP Snooping purpose. 
        If this object is set to 'true', the interface is suppressed.
        DHCP packets coming to this interface will be ingnored.
        If this object is set to 'false', the interface is not
        suppressed. DHCP packets coming to this interface will be
        processed by DHCP Snooping."
    ::= { qtechSNDhcpIfSuppressionEntry 2 }

--
--   The DHCP Address Binding Table
--

qtechSNDhcpAddressBindTable OBJECT-TYPE
    SYNTAX         SEQUENCE OF QtechSNDhcpAddressBindEntry
    MAX-ACCESS   not-accessible
    STATUS         current
    DESCRIPTION
        "A table provides the mechanism to configure the DHCP Snooping 
        binding database set as IP+MAC Address binding."
    ::= { qtechSNDhcpInterface 3 }
 
qtechSNDhcpAddressBindEntry OBJECT-TYPE
    SYNTAX         QtechSNDhcpAddressBindEntry 
    MAX-ACCESS   not-accessible
    STATUS         current
    DESCRIPTION
        "A row instance contains the configuration to enable
        or disable address bind for DHCP Snooping at each physical
        interface capable of this feature." 
    INDEX { qtechSNDhcpAddressBindIndex }
    ::= { qtechSNDhcpAddressBindTable 1 }

QtechSNDhcpAddressBindEntry ::= SEQUENCE {
    qtechSNDhcpAddressBindIndex        InterfaceIndex,
    qtechSNDhcpAddressBindEnable       TruthValue 
}

qtechSNDhcpAddressBindIndex OBJECT-TYPE
        SYNTAX        InterfaceIndex
        MAX-ACCESS  not-accessible
        STATUS        current
        DESCRIPTION
            "This object indicates the interface open Address binding."
        ::= { qtechSNDhcpAddressBindEntry 1 }  

qtechSNDhcpAddressBindEnable OBJECT-TYPE
    SYNTAX         TruthValue
    MAX-ACCESS   read-write
    STATUS         current
    DESCRIPTION
        "This object indicates if DHCP Snooping Address Binding
        is enabled.
        Setting this object to 'true', DHCP binding entry is set as
        Address binding entrys; Otherwise, this funciton is disabled."
    ::= { qtechSNDhcpAddressBindEntry 2 }
    
qtechDhcpSnpFalsePktStatisticTable  OBJECT-TYPE
    SYNTAX SEQUENCE OF QtechDhcpSnpFalsePktStatisticEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "The false packets statistic information table."
    ::= { qtechSNDhcpInterface 4 }

       
qtechDhcpSnpFalsePktStatisticEntry OBJECT-TYPE
    SYNTAX QtechDhcpSnpFalsePktStatisticEntry
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION
        "An entry in the snooping false packets statistic information table."
    INDEX { qtechDhcpSnpStatisticIfIndex, qtechDhcpSnpStatisticVlanIndex }
    ::= { qtechDhcpSnpFalsePktStatisticTable 1 }
        
QtechDhcpSnpFalsePktStatisticEntry ::=
    SEQUENCE {
        qtechDhcpSnpStatisticIfIndex        InterfaceIndex,
        qtechDhcpSnpStatisticVlanIndex      VlanIndex,
        qtechDhcpSnpStatisticIfDescr        DisplayString,
        qtechDhcpSnpStatisticVlanId         VlanIndex,  
        qtechChaddrNomatchSrcMacDhcpPktNum  Counter32,
        qtechArpNomatchSnpBindTblPktNum     Counter32,
        qtechIpNomatchSnpBindTblPktNum      Counter32,
        qtechNomatchSnpBindTblDhcpPktNum    Counter32,
        qtechUntrustedReplyPktNum           Counter32,
        qtechDhcpPktIfRateDiscardNum        Counter32      
    }
    
qtechDhcpSnpStatisticIfIndex OBJECT-TYPE
    SYNTAX        InterfaceIndex
    MAX-ACCESS    not-accessible
    STATUS        current
    DESCRIPTION
        "The index of the interfaces."
    ::= { qtechDhcpSnpFalsePktStatisticEntry 1 }      
    
qtechDhcpSnpStatisticVlanIndex OBJECT-TYPE
    SYNTAX  VlanIndex
    MAX-ACCESS not-accessible
    STATUS current
    DESCRIPTION 
        "The vlan Id."
    ::= { qtechDhcpSnpFalsePktStatisticEntry 2 }      

qtechDhcpSnpStatisticIfDescr OBJECT-TYPE
    SYNTAX  DisplayString(SIZE(0..255))
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION 
        "The description of the interfaces."
    ::= { qtechDhcpSnpFalsePktStatisticEntry 3 }      
    
qtechDhcpSnpStatisticVlanId OBJECT-TYPE
    SYNTAX  VlanIndex
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION 
        "The vlan Id."
    ::= { qtechDhcpSnpFalsePktStatisticEntry 4 }
      
qtechChaddrNomatchSrcMacDhcpPktNum OBJECT-TYPE
    SYNTAX  Counter32
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION 
        "The false packets(chaddr in Dhcp packets is not same with source mac-address in
        ethernet frame) count."
    ::= { qtechDhcpSnpFalsePktStatisticEntry 5 }   
      
qtechArpNomatchSnpBindTblPktNum OBJECT-TYPE
    SYNTAX  Counter32
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION 
        "The false Arp packets match in snooping bind table count."
    ::= { qtechDhcpSnpFalsePktStatisticEntry 6 }   
       
qtechIpNomatchSnpBindTblPktNum OBJECT-TYPE
    SYNTAX  Counter32
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION 
        "The false Ip packets do not match snooping bind table count."
    ::= { qtechDhcpSnpFalsePktStatisticEntry 7 }   

qtechNomatchSnpBindTblDhcpPktNum OBJECT-TYPE
    SYNTAX  Counter32
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION 
        "The Dhcp request packets do not match the snooping bind table."
    ::= { qtechDhcpSnpFalsePktStatisticEntry 8 }   
      
qtechUntrustedReplyPktNum OBJECT-TYPE
    SYNTAX  Counter32
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION 
        "The untrusted port Dhcp reply packets count."
    ::= { qtechDhcpSnpFalsePktStatisticEntry 9 }

qtechDhcpPktIfRateDiscardNum OBJECT-TYPE
    SYNTAX     Counter32
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "DHCP packets that discarded for the rate limit on the interface. "
    ::= { qtechDhcpSnpFalsePktStatisticEntry 10 }

--
--   The DHCP Bindings Table
--

qtechSNDhcpBindingsTable OBJECT-TYPE
    SYNTAX         SEQUENCE OF QtechSNDhcpBindingsEntry
    MAX-ACCESS   not-accessible
    STATUS         current
    DESCRIPTION
        "A table provides the DHCP bindings information learnt by
        the device." 
    ::= { qtechSNDhcpBindings 1 }
 
qtechSNDhcpBindingsEntry OBJECT-TYPE
    SYNTAX         QtechSNDhcpBindingsEntry 
    MAX-ACCESS   not-accessible
    STATUS         current
    DESCRIPTION
        "A row instance contains the Mac address, IP address type,
        IP address, VLAN number, interface number, leased time and
        status of this instance." 
    INDEX { qtechSNDhcpBindingsVlan, 
            qtechSNDhcpBindingsMacAddress,
            qtechSNDhcpBindingsAddrType }
    ::= { qtechSNDhcpBindingsTable 1 }

QtechSNDhcpBindingsEntry ::= SEQUENCE {
    qtechSNDhcpBindingsVlan            VlanIndex,
    qtechSNDhcpBindingsMacAddress      MacAddress, 
    qtechSNDhcpBindingsAddrType        INTEGER,
    qtechSNDhcpBindingsIpAddress       IpAddress,
    qtechSNDhcpBindingsInterface       InterfaceIndex,
    qtechSNDhcpBindingsLeasedTime      Unsigned32,
    qtechSNDhcpBindingsStatus          RowStatus
}
 
qtechSNDhcpBindingsVlan OBJECT-TYPE
    SYNTAX         VlanIndex
    MAX-ACCESS     not-accessible 
    STATUS         current
    DESCRIPTION
        "This object indicates the VLAN to which a DHCP client host
         belongs."
    ::= { qtechSNDhcpBindingsEntry 1 }

qtechSNDhcpBindingsMacAddress OBJECT-TYPE
    SYNTAX         MacAddress 
    MAX-ACCESS     not-accessible 
    STATUS         current
    DESCRIPTION
        "This object indicates the MAC address of a DHCP client
         host." 
    ::= { qtechSNDhcpBindingsEntry 2 }

qtechSNDhcpBindingsAddrType OBJECT-TYPE
    SYNTAX INTEGER{
        dynamic(1),     -- Dynamic Addresss bind, Dynamic get from DHCP Snooping address binding database;
        static(2)       -- Static Address bind, Added by Administrator;
    }
    MAX-ACCESS   not-accessible
    STATUS         current
    DESCRIPTION
        "This object indicates the type of IP+MAC binding address denoted
        in qtechSNDhcpBindingsIpAddress object." 
    ::= { qtechSNDhcpBindingsEntry 3 }

qtechSNDhcpBindingsIpAddress OBJECT-TYPE
    SYNTAX         IpAddress
    MAX-ACCESS   read-create
    STATUS         current
    DESCRIPTION
        "This object indicates the allocated IP address of
        a DHCP client host."
    ::= { qtechSNDhcpBindingsEntry 4 }

qtechSNDhcpBindingsInterface OBJECT-TYPE
    SYNTAX         InterfaceIndex
    MAX-ACCESS   read-create
    STATUS         current
    DESCRIPTION
        "This object indicates the interface where a DHCP client
        host connects to."
    ::= { qtechSNDhcpBindingsEntry 5 }

qtechSNDhcpBindingsLeasedTime OBJECT-TYPE
    SYNTAX        Unsigned32
    UNITS          "seconds" 
    MAX-ACCESS  read-only
    STATUS        current
    DESCRIPTION
        "This object indicates the leased time of this DHCP
        bindings."
    ::= { qtechSNDhcpBindingsEntry 6 }

qtechSNDhcpBindingsStatus OBJECT-TYPE
    SYNTAX         RowStatus 
    MAX-ACCESS   read-create
    STATUS         current
    DESCRIPTION
        "This object is used to to manage the deletion of rows
        in this table. This object only supports active(1) and
        destroy(6) value. 
        Whenever a DHCP binding is learnt by the device, an
        entry will be created by the device in this table with
        its RowStatus object set to active(1). Setting this
        object value to destroy(6) will clear the DHCP bindings
        information represented by this row instance."
    ::= { qtechSNDhcpBindingsEntry 7 }

qtechDhcpTrapMacAddress OBJECT-TYPE
    SYNTAX         MacAddress 
    MAX-ACCESS     accessible-for-notify
    STATUS         current
    DESCRIPTION
        "Dhcp trap macaddress"
    ::= { qtechDhcpSnoopingMIBObjects 4 }
    

-- dhcp snooping traps
qtechDhcpSnoopingMIBTraps  OBJECT IDENTIFIER ::= { qtechDhcpSnoopingMIB 0 }
                                 
qtechDhcpSnoopingNoResponseTrap NOTIFICATION-TYPE
    OBJECTS { 
        qtechDhcpTrapMacAddress
    }
    STATUS current
    DESCRIPTION
          "Send trap when dhcp request packets not been response."
    ::= { qtechDhcpSnoopingMIBTraps 1 }


qtechDhcpSnoopingMIBCompliances OBJECT IDENTIFIER ::= { qtechDhcpSnoopingMIBConformance 1 }
qtechDhcpSnoopingMIBGroups      OBJECT IDENTIFIER ::= { qtechDhcpSnoopingMIBConformance 2 }


-- compliance statements

qtechDhcpSnoopingMIBCompliance MODULE-COMPLIANCE
        STATUS  current
        DESCRIPTION
                "The compliance statement for entities which implement
                the Qtech Dhcp Snooping MIB"
        MODULE  -- this module
                MANDATORY-GROUPS { qtechDhcpSnoopingMIBGroup
                 }
        ::= { qtechDhcpSnoopingMIBCompliances 1 }
                
-- units of conformance

qtechDhcpSnoopingMIBGroup OBJECT-GROUP
        OBJECTS {
          qtechSNDhcpFeatureEnable,
          qtechSNDhcpDatabaseUpdateInterval,
          qtechSNDhcpRelayAgentInfoOptEnable,
          qtechSNDhcpMatchMacAddressEnable,
          qtechSNDhcpIfTrustEnable,
          qtechSNDhcpIfSuppressionEnable,
          qtechSNDhcpAddressBindEnable,
          qtechDhcpSnpStatisticIfDescr,
          qtechDhcpSnpStatisticVlanId,  
          qtechChaddrNomatchSrcMacDhcpPktNum,
          qtechArpNomatchSnpBindTblPktNum,
          qtechIpNomatchSnpBindTblPktNum,
          qtechNomatchSnpBindTblDhcpPktNum,
          qtechUntrustedReplyPktNum,
          qtechDhcpPktIfRateDiscardNum,  
          qtechSNDhcpBindingsIpAddress,
          qtechSNDhcpBindingsInterface,
          qtechSNDhcpBindingsLeasedTime,
          qtechSNDhcpBindingsStatus,
          qtechDhcpTrapMacAddress
        }
        STATUS  current
        DESCRIPTION
                "A collection of objects providing snooping Dhcp configure ."
        ::= { qtechDhcpSnoopingMIBGroups 1 }
        
END