-- *****************************************************************
-- RIVERDELTA-CABLE-SPECTRUM.MIB: Data Over Cable 
-- March created by Rachel Zhang
-- Copyright (c) 1998, 1999 by riverdelta Networks
-- All rights reserved.
-- *****************************************************************

RDN-CABLE-SPECTRUM-MIB DEFINITIONS ::= BEGIN

IMPORTS   
        riverdelta
                FROM RDN-MIB
        MODULE-IDENTITY,
        OBJECT-TYPE,
        Integer32,
        Gauge32,
        Counter32,
        NOTIFICATION-TYPE
                FROM SNMPv2-SMI
        MacAddress,
        RowStatus,
        DateAndTime
                FROM SNMPv2-TC
        OBJECT-GROUP,
        MODULE-COMPLIANCE
                FROM SNMPv2-CONF
        InterfaceIndex,
        ifIndex,
        ifAdminStatus,
        ifOperStatus
                FROM IF-MIB;
                
        
  rdnCableSpectrum MODULE-IDENTITY
        LAST-UPDATED    "200206250000Z"  -- 25th June 2002
        ORGANIZATION    "Motorola"
        CONTACT-INFO
                      " Motorola        
                        Customer Service
                       Postal: Motorola
                               Three Highwood Dr east
                               Tewksbury, MA 01876
                               U.S.A.
                               Tel:  
                        "

        DESCRIPTION
            "This is the MIB Module for Cable Spectrum Management for 
             MCNS compliant Cable Modem Termination Systems (CMTS). "

             
        ::= { riverdelta 6 }


rdnCableSpectrumObjects  OBJECT IDENTIFIER ::= { rdnCableSpectrum 1 }

rdnFlapObjects OBJECT IDENTIFIER ::= { rdnCableSpectrumObjects 1 }

rdnFlapCmCmtsStatusTable  OBJECT-TYPE 
        SYNTAX      SEQUENCE OF RdnFlapCmCmtsStatusEntry                  
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
            "This table keeps the status of the flap modems for per CMTS."
        ::= { rdnFlapObjects 1 }

rdnFlapCmCmtsStatusEntry OBJECT-TYPE
        SYNTAX      RdnFlapCmCmtsStatusEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
            "List of attributes for an entry in the rdnFlapCmCmtsStatusTable."
        INDEX { flapCmCmtsIfIndex }
        ::= { rdnFlapCmCmtsStatusTable 1 }

RdnFlapCmCmtsStatusEntry ::= SEQUENCE {
        flapCmCmtsIfIndex                      INTEGER,
        flapListMaxSize	                       Integer32,
        flapListCurrentSize                    Gauge32,
        flapAgingOutTime                       Integer32,
        flapInsertionTime                      Integer32,
        flapMissThreshold                      Integer32,
        flapPowerAdjThreshold                  Integer32,
        flapListPercentageThreshold            INTEGER,
        flapListTrapEnable                     INTEGER
	}

flapCmCmtsIfIndex OBJECT-TYPE
        SYNTAX      INTEGER ( 1..16 )
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
            "The CMTS Interface Index."
        ::= { rdnFlapCmCmtsStatusEntry 1 }

flapListMaxSize OBJECT-TYPE
        SYNTAX      Integer32 (1..8191)
        UNITS       "modems"
        MAX-ACCESS  read-write
        STATUS      current
        DESCRIPTION
            "The maximum number of flap modems. 
             The user could configure this number according to the number of 
             downstreams and the number of modem line cards in the CMTS.
             The number can range from 1 to 8191.  The default value is 100.
 
             When the number of modems exceeds the max flap list size, 
             the additional modems are ignored."
        DEFVAL { 100 }
        ::= { rdnFlapCmCmtsStatusEntry 2 }

flapListCurrentSize OBJECT-TYPE
        SYNTAX      Gauge32 (0..8191) 
        UNITS       "modems"
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The current number of modems in the flap list.  Its value 
             will be less than or equal to flapListMaxSize."
        ::= { rdnFlapCmCmtsStatusEntry 3 }

flapAgingOutTime OBJECT-TYPE
        SYNTAX      Integer32 (1..86400) 
        UNITS       "minutes"
        MAX-ACCESS  read-write
        STATUS      current
        DESCRIPTION
            "The age out time in minutes for modems in the flap table.  The number 
             of minutes range from 1 to 86400.  The default value is 1440."
        DEFVAL { 1440 }  
        ::= { rdnFlapCmCmtsStatusEntry 4 }

flapInsertionTime OBJECT-TYPE
        SYNTAX      Integer32 (1..86400)
        UNITS       "seconds"
        MAX-ACCESS  read-write
        STATUS      current
        DESCRIPTION
           "The interval of time that begins when the cable modem initially 
            ranges, reboots, and ends when it starts initial maintenance again.
            If the interval of time is less than what is specified in
            flapInsertionTime, the flapCmInsertionFails and cmFlapCounts 
            will increment. 

            The valid range is from 1 to 86400 seconds.  The default value is 60."

        DEFVAL { 60 }
        ::= { rdnFlapCmCmtsStatusEntry 5 }

flapMissThreshold OBJECT-TYPE
        SYNTAX      Integer32 (1..12)
        UNITS       "modem"
        MAX-ACCESS  read-write
        STATUS      current
        DESCRIPTION 
             "Specifies the maximum threshold for the number of consecutive miss
              counts during a polling cycle.  If the flap miss counts goes over 
              this threshold, the modem will be added into the flap list. 
              
              Polling is maintained between the CMTS and the cable modem  
              every 10 seconds.  The flapMissThreshold specifies the maximum 
              number of consecutive missed counts during one station maintenance
              poll interval.  If there are more than 16 consecutive miss counts 
              during one polling cycle, the modem will de-insert and attempt to 
              range again.
                                  
              The value ranges from 1 to 12 consecutive counts. 
              The default value is 6." 
        DEFVAL { 6 }
        ::= { rdnFlapCmCmtsStatusEntry 6 }
        
flapPowerAdjThreshold OBJECT-TYPE
        SYNTAX      Integer32 (1..10)
        UNITS       "dB"
        MAX-ACCESS  read-write
        STATUS      current
        DESCRIPTION
            " The power adjustment threshold for a CM
              to raise and lower it's transmit power during
              normal operation.

              When a modem's power adjustment goes above or below 
              the flapPowerAdjThreshold the CM will be added into
              the flap list.  The flapCmPowerAdjustments and cmFlapCounts
              will be incremented as well.
           
              flapPowerAdjThreshold values of 2 dB and below are low
              enough to continuously increment the flapCmPowerAdjustments
              under normal conditions. 
              
              The values range from 1 to 10.  The default is 2. "
         DEFVAL { 2 }
        ::= { rdnFlapCmCmtsStatusEntry 7 }     

flapListPercentageThreshold OBJECT-TYPE
        SYNTAX      INTEGER (1..100)
        MAX-ACCESS  read-write
        STATUS      current
        DESCRIPTION " The percentage CM miss threshold.
                      If CM miss percentage goes over this threshold and
                      flapListTrapEnable is set, a flap list trap will 
                      be send out to notify this event
                    "
        DEFVAL {10}
        ::= { rdnFlapCmCmtsStatusEntry 8 }

flapListTrapEnable OBJECT-TYPE
        SYNTAX     INTEGER { enabled(1), disabled(2) }
        MAX-ACCESS read-write
        STATUS     current
        DESCRIPTION
            "This object controls flap list trap. If its value is set to 
             enabled(1), a trap will be sent out when the CM miss
             percentage goes over the flapListPercentageThreshold;
             Otherwise no flap list trap will be sent out.
             By default, this object has the value enabled(1).
            "
        DEFVAL { enabled }
        ::= { rdnFlapCmCmtsStatusEntry 9 }
                                        
-- The flap CM table holds the CM flap information for each CMTS                                        
rdnFlapCmTable OBJECT-TYPE
        SYNTAX      SEQUENCE OF RdnFlapCmEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
            "This table keeps the records of modem state changes. 
             An entry can be deleted from the table but can not be 
             added to the table."
        ::= { rdnFlapObjects 2 }

rdnFlapCmEntry OBJECT-TYPE
        SYNTAX      RdnFlapCmEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
            "List of attributes for an entry in the rdnFlapTable."
        INDEX { flapCmIndex }
        ::= { rdnFlapCmTable 1 }

RdnFlapCmEntry ::= SEQUENCE {
            flapCmIndex                InterfaceIndex,
            cmtsIfIndex                INTEGER,
            flapCmMacAddress           MacAddress,
            flapCmUpstreamIfIndex      InterfaceIndex,
            flapCmDownstreamIfIndex    InterfaceIndex,
            flapCmInsertionFails       Counter32, 
            flapCmHits                 Counter32,
            flapCmMisses               Counter32,
            flapCmPowerAdjustments     Counter32,
            cmFlapCounts                Counter32,
            cmLastFlapTime             DateAndTime,
            cmFlapCreateTime           DateAndTime,
            cmFlapRowStatus            RowStatus
        }

flapCmIndex OBJECT-TYPE
        SYNTAX      InterfaceIndex
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
            " Index for Cable Modem."
        ::= { rdnFlapCmEntry 1 }

cmtsIfIndex OBJECT-TYPE
        SYNTAX      INTEGER ( 1..16 )
        MAX-ACCESS  read-only 
        STATUS      current
        DESCRIPTION
            "The CMTS Interface Index."
        ::= { rdnFlapCmEntry 2 }


flapCmMacAddress OBJECT-TYPE
        SYNTAX      MacAddress
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "MAC address of the Cable Modem's Cable interface. Identifies 
             a flap-list entry for a flapping Cable Modem."
        ::= { rdnFlapCmEntry 3 }


flapCmUpstreamIfIndex OBJECT-TYPE
        SYNTAX      InterfaceIndex 
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The ifIndex of the Cable upstream interface whose ifType is 
             docsCableUpstream(129).  The CMTS detects a flapping Cable 
             Modem from its Cable upstream interface."
        ::= { rdnFlapCmEntry 4 }

flapCmDownstreamIfIndex OBJECT-TYPE
        SYNTAX      InterfaceIndex 
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The ifIndex of the Cable downstream interface whose ifType is 
             docsCableDownstream(128)."  
        ::= { rdnFlapCmEntry 5 }

flapCmInsertionFails OBJECT-TYPE
        SYNTAX      Counter32 
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "When the Cable Modem initially ranges, reboots and initially
            ranges again within the specified insertion time, this counter
            will increment.

              The cmFlapCounts increment along with this counter."

        REFERENCE
            "Data over Cable Radio Frequency Interface specification,
             Section 7.2."
        ::= { rdnFlapCmEntry 6 }
        

flapCmHits OBJECT-TYPE
        SYNTAX      Counter32 
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The number of times the CMTS receives the Ranging request 
             from the Cable Modem."
        ::= { rdnFlapCmEntry 7 }

flapCmMisses OBJECT-TYPE
        SYNTAX      Counter32 
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The number of times the CMTS misses the Ranging request 
             from the Cable Modem. The CMTS can check up to 16 consecutive 
             times for a ranging request message during one polling cycle.

             Misses are not desirable since this is usually an 
             indication of a return path problem; however, 
             having a small number of misses is normal.

             Ideally, the Hit should be much greater than the Miss counts."
        ::= { rdnFlapCmEntry 8 }

flapCmPowerAdjustments OBJECT-TYPE
        SYNTAX      Counter32 
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            " When the power adjustment changed above or below the 
             power adjustment threshold this counter will increment.
             
             The Flap Count (cmFlapCounts) will increment when this
             counter increments."
        REFERENCE
            "Data over Cable Radio Frequency Interface specification,
             Section 7.2."
        ::= { rdnFlapCmEntry 9 }

cmFlapCounts OBJECT-TYPE
        SYNTAX      Counter32 
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The total number of times a CM flaps 
             Under following three situations, this counter 
             will increase:  
             (1) When flapCmInsertionFails is increased the flap counts
                 will increase.
             (2) When the CMTS receives the number of consecutive misses
                 specified in the flapMissThreshold, the flap counts 
                 will increase. 
             (3) When flapPowerAdjustments is increased the flap counts 
                 will increase."
        REFERENCE
            "Data over Cable Radio Frequency Interface specification,
             Appendix B."
        ::= { rdnFlapCmEntry 10  }
        
        
cmLastFlapTime OBJECT-TYPE
        SYNTAX      DateAndTime 
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The last time stamp cm flaps"
          
        ::= { rdnFlapCmEntry 11 }

cmFlapCreateTime OBJECT-TYPE
        SYNTAX      DateAndTime 
        MAX-ACCESS  read-only
        STATUS      current
        DESCRIPTION
            "The time stamp when new flap CM is added to the table. "

        ::= { rdnFlapCmEntry 12 }

cmFlapRowStatus OBJECT-TYPE
        SYNTAX      RowStatus
        MAX-ACCESS  read-write
        STATUS      current
        DESCRIPTION
            "Controls and reflects the status of rows in this table.

             When a new flap cable modem is detected, and does 
             not exist in flap list and
             flapListCurrentSize is less than flapListMaxSize,
             an entry will be created in this table. 
             The instance of this object will be set to active(1).  
             All flapping modems have the status of active(1).

             Active entries are removed from the table if they are aged out.
             The age out time is defined in flapAgingOutTime
             When a row is set to destroy(6), it will remove the entry 
             immediately.

             To prevent an entry from being aged out, the entry should be
             set to notInService(2). The entry will remain in the table
             until this instance is set to destroy. 
             
             The user is allowed set an entry from active to notInService 
             or from notInService to destroy
             A user is not allowed to change a notInService entry to active.

             createAndGo(4) and createAndWait(5) are not supported."
        ::= { rdnFlapCmEntry 13 }

flapListTrap NOTIFICATION-TYPE
        OBJECTS { ifIndex, ifAdminStatus, ifOperStatus }
        STATUS  current
        DESCRIPTION "a flap list trap signifies that SNMPv2 entity,
                     acting in an agent role, has detected that the
                     percentage of flap cm for one of the cmts board
                     has gone over the flapListPercentageThreshold
                    "
        ::= { rdnFlapObjects 3 }

flapTrapType OBJECT-TYPE
        SYNTAX       INTEGER {
                        power(1),
                        ranging(2),
                        insertion(3)
                     }
        MAX-ACCESS   read-only
        STATUS       current
        DESCRIPTION
        "Reason for flapping
         power       - The power threshold was exceeded.
         ranging     - Missing ranging requests went beyond threshold
         insertion   - Modem re-ranged within insertion time threshold.

         This is a place holder for the reason parameter for the modem to go
         into flap list. This should return ZERO when read. This just allows us
         to include a flapping reason in the modem flap trap varbind.
        " 
        ::= { rdnFlapObjects 4 }

flapModemTrap NOTIFICATION-TYPE
        OBJECTS  { flapCmMacAddress,
                   flapTrapType
                 }
        STATUS   current
        DESCRIPTION "This Trap will be sent whenever the modem goes into the
                     flapping list for some reason. 'flapCmMacAddress'
                     gives the Mac Address of the modem. 'flapTrapType' gives
                     the cause for the modem to go into the flap list.
                    "
        ::= { rdnFlapObjects 5 }
        
--
-- Notification group 
-- 

rdnCableSpectrumNotificationPrefix OBJECT IDENTIFIER ::= 
                                { rdnCableSpectrum 2 }
cableSpectrumMIBNotifications                    OBJECT IDENTIFIER ::= 
                                { rdnCableSpectrumNotificationPrefix 0 }


--
-- Conformance statement
--

rdnCableSpectrumConformance  OBJECT IDENTIFIER ::= 
                                        { rdnCableSpectrum 3 }
rdnCableSpectrumCompliances  OBJECT IDENTIFIER ::= 
                                        { rdnCableSpectrumConformance 1 }
rdnCableSpectrumGroups       OBJECT IDENTIFIER ::= 
                                        { rdnCableSpectrumConformance 2 }

-- compliance statements

compliance MODULE-COMPLIANCE
        STATUS     current
        DESCRIPTION
            "The compliance statement for devices that implement MCNS
             compliant Radio Frequency Interfaces and Spectrum Management
             features."
        MODULE  -- rdnCableSpectrum
        MANDATORY-GROUPS {
                flapGroup
        }

        ::= { rdnCableSpectrumCompliances 1 }

-- units of conformance

rdnFlapGroup OBJECT-GROUP
        OBJECTS {
                flapListMaxSize,
                flapListCurrentSize,
                flapAgingOutTime,
                flapInsertionTime, 
                flapMissThreshold,
                flapPowerAdjThreshold,
                cmtsIfIndex,
                flapCmMacAddress,
                flapCmUpstreamIfIndex,
                flapCmDownstreamIfIndex,
                flapCmInsertionFails, 
                flapCmHits,
                flapCmMisses,
                flapCmPowerAdjustments,
                cmFlapCounts,
                cmLastFlapTime,
                cmFlapCreateTime,
                cmFlapRowStatus,
                flapListPercentageThreshold,
                flapListTrapEnable
               }
        STATUS    current
        DESCRIPTION
            "Group of objects implemented in Cable Modem Termination Systems
             providing Flap List information."
        ::= { rdnCableSpectrumGroups 1 }


END

