-- Copyright (C) 2008-2014 Super Micro Computer Inc. All Rights Reserved

-- $Id: fsdhcpRelay.mib,v 1.14 2013/07/09 12:34:08 siva Exp $

SUPERMICRO-DHCP-RLY-MIB DEFINITIONS ::= BEGIN

	IMPORTS
	   Unsigned32, MODULE-IDENTITY, OBJECT-TYPE, IpAddress, 
       Counter32, Integer32,enterprises
           FROM SNMPv2-SMI
       RowStatus,DisplayString
           FROM SNMPv2-TC
       ifIndex FROM IF-MIB;



   futureDhcpRelay MODULE-IDENTITY
       LAST-UPDATED "201209050000Z"          
       ORGANIZATION "Super Micro Computer Inc."
       CONTACT-INFO "support@Supermicro.com"
       DESCRIPTION
               "The Dhcp Relay agent MIB "
       REVISION "201209050000Z"
       DESCRIPTION
               "The Dhcp Relay agent MIB "
       ::= { enterprises supermicro-computer-inc(10876) super-switch(101) basic(1) 24 }

 
dhcpRelay        OBJECT IDENTIFIER ::= { futureDhcpRelay 1 }
dhcpRelayTable        OBJECT IDENTIFIER ::= { futureDhcpRelay 2 }


--SCALAR_TABLE_BEGIN

dhcpRelaying OBJECT-TYPE
	      SYNTAX  INTEGER {
            enable (1),
            disable (2) 
       }
	      MAX-ACCESS  read-write
	      STATUS  current
	      DESCRIPTION
		      "Only when enabled, the Relay Agent shall become active."
	      DEFVAL { disable }
	      ::= { dhcpRelay 1 }

dhcpRelayServersOnly OBJECT-TYPE
	      SYNTAX  INTEGER {
            enable (1),
            disable (2) 
       }
	      MAX-ACCESS  read-write
	      STATUS  current
	      DESCRIPTION
		      "When enabled, the Relay Agent shall forward the
         packets from the client to a specific DHCP server."
	      DEFVAL { disable }
	      ::= { dhcpRelay 2 }


dhcpRelaySecsThreshold OBJECT-TYPE
	      SYNTAX  Integer32 (0..65535)
	      MAX-ACCESS  read-write
	      STATUS  current
	      DESCRIPTION
                      "IF the secs field in the DHCP message is greater than the 
         dhcpRelaySecsThreshold, Packet get dropped at the Relay Agent"
	      DEFVAL { 0 }
	      ::= { dhcpRelay 3 }


dhcpRelayHopsThreshold OBJECT-TYPE
	      SYNTAX  Integer32 (0..16)
	      MAX-ACCESS  read-write
	      STATUS  current
	      DESCRIPTION
                      "A maximum hop count,a relay agent allow to pass through it.If
              the HopCount in the Dhcp Message is greater than the dhcpRelayHopsThreshold,
              Packet get dropped at the Relay Agent "
	      DEFVAL { 4 }
	      ::= { dhcpRelay 4 }



dhcpRelayRAIOptionControl OBJECT-TYPE
	      SYNTAX  INTEGER {
            enable (1),
            disable (2) 
       }
	      MAX-ACCESS  read-write
	      STATUS  current
	      DESCRIPTION
		      "Only when enabled, the Relay Agent shall do any processing
         related to Relay Agent Information Options - like
         inserting the necessary options while relaying a packet
         from a client to a server and examining/stripping of
         options when relaying a packet from a server to a
         client."
	      DEFVAL { disable }
	      ::= { dhcpRelay 5 }

dhcpRelayRAICircuitIDSubOptionControl OBJECT-TYPE
	      SYNTAX  INTEGER {
            enable (1),
            disable (2) 
       }
	      MAX-ACCESS  read-write
	      STATUS  current
	      DESCRIPTION
		      "When enabled, if the RAIOption is globally enabled, 
         then the Relay Agent shall insert the CircuitID sub-option,
         when necessary, while relaying packets from a client 
         to server and also examines/strips off this sub-option
         while relaying packets from a server to a client."
	      DEFVAL { disable }
	      ::= { dhcpRelay 6 }

dhcpRelayRAIRemoteIDSubOptionControl OBJECT-TYPE
	      SYNTAX  INTEGER {
            enable (1),
            disable (2) 
       }
	      MAX-ACCESS  read-write
	      STATUS  current
	      DESCRIPTION
		      "When enabled, if the RAIOption is globally enabled, 
         then the Relay Agent shall insert the RemoteID sub-option,
         when necessary, while relaying packets from a client 
         to server and also examines/strips off this sub-option
         while relaying packets from a server to a client."
	      DEFVAL { disable }
	      ::= { dhcpRelay 7 }

dhcpRelayRAISubnetMaskSubOptionControl OBJECT-TYPE
	      SYNTAX  INTEGER {
            enable (1),
            disable (2) 
       }
	      MAX-ACCESS  read-write
	      STATUS  current
	      DESCRIPTION
		      "When enabled, if the RAIOption is globally enabled, 
         then the Relay Agent shall insert the Subnet Mask sub-option,
         when necessary, while relaying packets from a client 
         to server and also examines/strips off this sub-option
         while relaying packets from a server to a client."
	      DEFVAL { disable }
	      ::= { dhcpRelay 8 }

dhcpRelayRAIOptionInserted OBJECT-TYPE
	      SYNTAX  Counter32
	      MAX-ACCESS  read-only
	      STATUS  current
	      DESCRIPTION
		      "Number of packets in which the RelayAgent inserted
         the RAIOption."
	      ::= { dhcpRelay 9 }

dhcpRelayRAICircuitIDSubOptionInserted OBJECT-TYPE
	      SYNTAX  Counter32
	      MAX-ACCESS  read-only
	      STATUS  current
	      DESCRIPTION
		      "Number of packets in which the RelayAgent inserted
         the CircuitID SubOption."
	      ::= { dhcpRelay 10 }

dhcpRelayRAIRemoteIDSubOptionInserted OBJECT-TYPE
	      SYNTAX  Counter32
	      MAX-ACCESS  read-only
	      STATUS  current
	      DESCRIPTION
		      "Number of packets in which the RelayAgent inserted
         the RemoteID SubOption."
	      ::= { dhcpRelay 11 }

dhcpRelayRAISubnetMaskSubOptionInserted OBJECT-TYPE
	      SYNTAX  Counter32
	      MAX-ACCESS  read-only
	      STATUS  current
	      DESCRIPTION
		      "Number of packets in which the RelayAgent inserted
         the SubnetMask SubOption."
	      ::= { dhcpRelay 12 }


dhcpRelayRAIOptionWronglySet OBJECT-TYPE
	      SYNTAX  Counter32
	      MAX-ACCESS  read-only
	      STATUS  current
	      DESCRIPTION
		      "Number of packets dropped by the Relay Agent because the giaddr 
         field is not set but the RAI option exists in the packet."
	      ::= { dhcpRelay 13 }

dhcpRelayRAISpaceConstraint OBJECT-TYPE
	      SYNTAX  Counter32
	      MAX-ACCESS  read-only
	      STATUS  current
	      DESCRIPTION
		      "Number of packets in which the RAI Option wasnot inserted
         by the Relay Agent because if inserted the packetsize shall 
         exceed the MTU."
	      ::= { dhcpRelay 14 }

dhcpConfigTraceLevel OBJECT-TYPE
       SYNTAX      Integer32 (0..255) 
       MAX-ACCESS  read-write
       STATUS      current
       DESCRIPTION
               "The Trace level Object which has bit masks for 
		various levels of tracing "
        DEFVAL { 1 }
       ::= { dhcpRelay 15 }

dhcpConfigDhcpCircuitOption OBJECT-TYPE
    SYNTAX       BITS {
                  routerindex(0),      -- Router Interfce Index
                  vlanid(1),           -- vlanId 
                  recvport(2)          -- port or lag port
    }
    MAX-ACCESS   read-write
    STATUS       current
    DESCRIPTION
       "This Object defines the type of information to be present in circuit id 
        sub-option.And this option can specfied  only if 
        CircuitIDSubOptionControl is enabled.It is possible to set more than 
        one bit at a time.Currently first three bits are used and remaning bits
		are reserved for future purpose.Default value for this option is
		routerindex(00000001)." 
        DEFVAL { 1 }
    ::= { dhcpRelay 16 }

dhcpRelayCounterReset OBJECT-TYPE 
	SYNTAX		INTEGER
	{
		set (1),
		notset (2)
	}
	MAX-ACCESS	read-write 
	STATUS		current 
	DESCRIPTION 
	"This object is used to reset the statistics counters.
	When set to set(1), statistics counters will be cleared. When set to notset(2), no 
	action will take place. " 

        DEFVAL { notset }

		::= { dhcpRelay 17 } 

--SCALAR_TABLE_END

--IPADDRESS_TABLE_BEGIN

      dhcpRelaySrvAddressTable   OBJECT-TYPE 
            SYNTAX SEQUENCE OF DhcpRelaySrvAddressEntry
            MAX-ACCESS not-accessible
            STATUS current
            DESCRIPTION 
                    "This table contains the IP addresses of the DHCP Server 
		    to which the Relay Agent needs to forward the packets from 
		    the client. This object becomes active only when 
		    dhcpRelayServersOnly is enabled."
            ::= { dhcpRelayTable 1 }

       dhcpRelaySrvAddressEntry OBJECT-TYPE 
            SYNTAX DhcpRelaySrvAddressEntry
            MAX-ACCESS not-accessible
            STATUS current
            DESCRIPTION 
                    " "
            INDEX { dhcpRelaySrvIpAddress }
            ::= { dhcpRelaySrvAddressTable 1 }

--
       DhcpRelaySrvAddressEntry ::=
       SEQUENCE {
                    dhcpRelaySrvIpAddress            IpAddress,
                    dhcpRelaySrvAddressRowStatus     RowStatus
                 }

dhcpRelaySrvIpAddress OBJECT-TYPE
    SYNTAX IpAddress
    MAX-ACCESS not-accessible
    STATUS current 
    DESCRIPTION
        "The IP Address of the DHCP server."
    ::=  { dhcpRelaySrvAddressEntry 1 }  


dhcpRelaySrvAddressRowStatus OBJECT-TYPE
    SYNTAX RowStatus
    MAX-ACCESS read-write
    STATUS current 
    DESCRIPTION
        "RowStatus of this entry."
    ::=  { dhcpRelaySrvAddressEntry 2 }  


--IPADDRESS_TABLE_END

--INTERFACE_TABLE_BEGIN

  dhcpRelayIfTable   OBJECT-TYPE
            SYNTAX SEQUENCE OF DhcpRelayIfEntry
            MAX-ACCESS not-accessible
            STATUS current
            DESCRIPTION
            "This table holds the circuit id SubOption configured over the
            interface.This option will be inserted for dhcp request packets 
            received on this interface based on the status of 
            dhcpRelayRAICircuitIDSubOptionControl.Using this table,the dhcp 
            broadcast response is sent on the appropriate interface over which 
            the broadcast dhcp request was received."
            ::= { dhcpRelayTable 2 }

       dhcpRelayIfEntry OBJECT-TYPE
            SYNTAX DhcpRelayIfEntry
            MAX-ACCESS not-accessible
            STATUS current
            DESCRIPTION
                    "Contains configured dhcp relay information suboptions"  
            INDEX { ifIndex }
            ::= { dhcpRelayIfTable 1 }

--

       DhcpRelayIfEntry ::=
       SEQUENCE {
                    dhcpRelayIfCircuitId    Unsigned32,
                    dhcpRelayIfRemoteId     DisplayString,
                    dhcpRelayIfRowStatus    RowStatus
                    
                 }

dhcpRelayIfCircuitId OBJECT-TYPE
    SYNTAX Unsigned32
    MAX-ACCESS read-write
    STATUS current
    DESCRIPTION
        "Circuit Id value configured over this interface.Configuring 
        with zero value will reset the circuit id configuration for this  
        interface.Circuit id will be inserted to dhcp request packet received 
        on this interface if dhcpRelayRAICircuitIDSubOptionControl is enabled.
        Current implementation restricts circuit-id to interface indices alone"
    ::=  { dhcpRelayIfEntry 1 }

dhcpRelayIfRemoteId OBJECT-TYPE
    SYNTAX DisplayString
    MAX-ACCESS read-write
    STATUS current
    DESCRIPTION
        "Remote Id value configured over this interface.String of length zero
        will reset the configuration.Value other than XYZ (which is the 
        considered as default value internally) can be configured for this
        object.Configuring with <MGMT_IP_ADDR> string will replace the 
	remote Id with Default VLAN IP address and configuring with 
	<SYS_NAME> will replace the remote_id with System_name. 
	Remote ID will be inserted to dhcp request packet received
        on this interface if dhcpRelayRAIRemoteIDSubOptionControl is enabled"
    ::=  { dhcpRelayIfEntry 2 }

dhcpRelayIfRowStatus OBJECT-TYPE
    SYNTAX RowStatus
    MAX-ACCESS read-write
    STATUS current
    DESCRIPTION
        "Row status of this table"
    ::=  { dhcpRelayIfEntry 3 }

END
