-- ZyXEL Communications Corporation
-- Private Enterprise MIB definition 
  
-- This file describes the ZyXEL Communications Corporation Enterprise MIB.
-- It contains ZyXEL products OIDs, and common managed objects.

-- ZYXEL-OSPF-MIB.mib
-- Revision 1.9  2016/08/12 

ZYXEL-OSPF-MIB DEFINITIONS ::= BEGIN

    IMPORTS
	OBJECT-TYPE
		FROM SNMPv2-SMI			-- RFC2578	
		
	MODULE-IDENTITY
		FROM SNMPv2-SMI
	
	RowStatus
		FROM SNMPv2-TC			-- RFC2579
		
	DisplayString                                          
	  	FROM SNMPv2-TC
	  	
	EnabledStatus
		FROM  P-BRIDGE-MIB
 	
    IpAddress
        FROM SNMPv2-SMI

	ospfIfIpAddress, ospfAddressLessIf, ospfAreaId, ospfNbrIpAddr, ospfNbrAddressLessIndex,
	ospfLsdbAreaId, ospfLsdbType, ospfLsdbLsid, ospfLsdbRouterId, ospfVirtIfAreaId, ospfVirtIfNeighbor
		FROM OSPF-MIB
	esMgmt			
		FROM ZYXEL-ES-SMI;

	zyxelOspf MODULE-IDENTITY
		LAST-UPDATED	"201207010000Z"    
		ORGANIZATION "Enterprise Solution ZyXEL"     
		CONTACT-INFO
			""	   
		DESCRIPTION
			"The subtree for Open Shortest Path First (OSPF)"
		::= { esMgmt 57 }
	
	zyxelOspfSetup     			OBJECT IDENTIFIER ::= { zyxelOspf 1 }
	zyxelOspfStatus				OBJECT IDENTIFIER ::= { zyxelOspf 2 }
	zyxelOspfNotifications		OBJECT IDENTIFIER ::= { zyxelOspf 3 }
  
-- *******************************************************************
-- *
-- * zyxelOspfSetup
-- *
-- *******************************************************************
       
-- zyxelOspfIfTable
        zyxelOspfIfTable OBJECT-TYPE
        SYNTAX	SEQUENCE OF ZyxelOspfIfEntry
        MAX-ACCESS  not-accessible
        STATUS  current
        DESCRIPTION
                 	"The table contains OSPF interface configuration."
        ::= { zyxelOspfSetup 1 }
		
		zyxelOspfIfEntry OBJECT-TYPE
        SYNTAX	ZyxelOspfIfEntry
        MAX-ACCESS	not-accessible
        STATUS	current
        DESCRIPTION    	
					"An entry contains OSPF interface configuration"
		INDEX          	{ ospfIfIpAddress, ospfAddressLessIf }
        ::= { zyxelOspfIfTable 1 }
 
        ZyxelOspfIfEntry ::=
		SEQUENCE {
        	zyOspfIfKeyId	INTEGER
		}

		zyOspfIfKeyId OBJECT-TYPE
        SYNTAX  INTEGER
        MAX-ACCESS  read-write
        STATUS  current
        DESCRIPTION
                      	"Specify the identification number of the authentication if you want to use."
        ::= { zyxelOspfIfEntry 1 }	

-- zyxelOspfAreaTable
        zyxelOspfAreaTable	OBJECT-TYPE
        SYNTAX	SEQUENCE OF ZyxelOspfAreaEntry
        MAX-ACCESS  not-accessible
        STATUS  current
        DESCRIPTION
                 	"The table contains OSPF area configuration."
        ::= { zyxelOspfSetup 2 }

		zyxelOspfAreaEntry	OBJECT-TYPE
        SYNTAX	ZyxelOspfAreaEntry
        MAX-ACCESS	not-accessible
        STATUS	current
        DESCRIPTION    	
					"An entry contains OSPF area configuration."
		INDEX          	{ ospfAreaId }
        ::= { zyxelOspfAreaTable 1 }

		ZyxelOspfAreaEntry ::=
		SEQUENCE {
        	zyOspfAreaName	DisplayString,
			zyOspfAreaDefaultRouteMetric	INTEGER
        }          
        zyOspfAreaName OBJECT-TYPE
        SYNTAX  DisplayString
        MAX-ACCESS  read-write
        STATUS  current
        DESCRIPTION
                      	"Specify a descriptive name (up to 32 printable ASCII characters) for identification purposes."
        ::= { zyxelOspfAreaEntry 1 }

        zyOspfAreaDefaultRouteMetric OBJECT-TYPE
        SYNTAX  INTEGER
        MAX-ACCESS  read-write
        STATUS  current
        DESCRIPTION
                      	"The metric value applied at the indicated Type of Service.  By default, this equals the least metric at the Type of Service among the interfaces to other areas."
        ::= { zyxelOspfAreaEntry 2 }

		
-- zyxelOspfRedistributeRouteTable
        zyxelOspfRedistributeRouteTable	OBJECT-TYPE
        SYNTAX	SEQUENCE OF ZyxelOspfRedistributeRouteEntry
        MAX-ACCESS  not-accessible
        STATUS  current
        DESCRIPTION
                 	"The table contains OSPF redistribute route configuration."
        ::= { zyxelOspfSetup 3 }
        
		zyxelOspfRedistributeRouteEntry OBJECT-TYPE
        SYNTAX	ZyxelOspfRedistributeRouteEntry
        MAX-ACCESS	not-accessible
        STATUS	current
        DESCRIPTION    	
					"An entry contains OSPF redistribute route configuration."
		INDEX          	{ zyOspfRedistributeRouteProtocol }
        ::= { zyxelOspfRedistributeRouteTable 1 }

        ZyxelOspfRedistributeRouteEntry ::=
		SEQUENCE {
        	zyOspfRedistributeRouteProtocol	INTEGER,
        	zyOspfRedistributeRouteState	EnabledStatus,
        	zyOspfRedistributeRouteType		INTEGER,
        	zyOspfRedistributeRouteMetric	INTEGER
        } 
		
        zyOspfRedistributeRouteProtocol OBJECT-TYPE
        SYNTAX  INTEGER{		
		rip(1),
		static(2),
		connected(3)
        }
        MAX-ACCESS  read-only
        STATUS  current
        DESCRIPTION
                      	"Route redistribution allows your switch to import and translate external routes learned through
						RIP routing protocol, configured manually (Static) and routes that are established automatically
						by having enabled IP on an interface(Connected) into the OSPF network transparently." 
        ::= { zyxelOspfRedistributeRouteEntry 1 }

        zyOspfRedistributeRouteState OBJECT-TYPE
        SYNTAX  EnabledStatus
        MAX-ACCESS  read-write
        STATUS  current
        DESCRIPTION
                      	"Enable/Disable the routing protocol to activate route redistribution for routes learned."
        ::= { zyxelOspfRedistributeRouteEntry 2 }

        zyOspfRedistributeRouteType OBJECT-TYPE
        SYNTAX  INTEGER
        MAX-ACCESS  read-write
        STATUS  current
        DESCRIPTION
                      	"Select 1 for routing protocols (such as RIP) whose external metrics are directly comparable to the internal OSPF cost. 
						When selecting a path, the internal OSPF cost is added to the AB boundary router to the external metrics. 
						Select 2 for routing protocols whose external metrics are not comparable to the OSPF cost. 
						In this case, the external cost of the AB boundary router is used in path decision to a destination."
        ::= { zyxelOspfRedistributeRouteEntry 3 }

        zyOspfRedistributeRouteMetric OBJECT-TYPE
        SYNTAX  INTEGER
        MAX-ACCESS  read-write
        STATUS  current
        DESCRIPTION
			"Specify a route cost (between 0 and 16777215)."
        ::= { zyxelOspfRedistributeRouteEntry 4 }
		
-- zyxelOspfVirtualLinkTable
        zyxelOspfVirtualLinkTable	OBJECT-TYPE
        SYNTAX	SEQUENCE OF ZyxelOspfVirtualLinkEntry
        MAX-ACCESS  not-accessible
        STATUS  current
        DESCRIPTION
			"The table contains OSPF virtual link configuration."
        ::= { zyxelOspfSetup 4 }
        
		zyxelOspfVirtualLinkEntry OBJECT-TYPE
        SYNTAX	ZyxelOspfVirtualLinkEntry
        MAX-ACCESS	not-accessible
        STATUS	current
        DESCRIPTION    	
			"An entry contains OSPF virtual link configuration."
		INDEX          	{ ospfVirtIfAreaId, ospfVirtIfNeighbor }
        ::= { zyxelOspfVirtualLinkTable 1 }

        ZyxelOspfVirtualLinkEntry ::=
		SEQUENCE {
        	zyOspfVirtualLinkName	DisplayString,
        	zyOspfVirtualLinkKeyId	INTEGER
        }          
        zyOspfVirtualLinkName OBJECT-TYPE
        SYNTAX  DisplayString
        MAX-ACCESS  read-write
        STATUS  current
        DESCRIPTION
			"Specify a descriptive name (up to 32 printable ASCII characters) for identification purpose."
        ::= { zyxelOspfVirtualLinkEntry 1 }

        zyOspfVirtualLinkKeyId OBJECT-TYPE
        SYNTAX  INTEGER
        MAX-ACCESS  read-write
        STATUS  current
        DESCRIPTION
                      	"Specify the identification number of the authentication you want to use."
        ::= { zyxelOspfVirtualLinkEntry 2 }

-- zyxelOspfMaxNumberOfSummaryAddress
		zyOspfMaxNumberOfSummaryAddress OBJECT-TYPE
        SYNTAX  INTEGER
        MAX-ACCESS  read-only
        STATUS  current
        DESCRIPTION
                    "The maximum number of summary address that can be created."
		::= { zyxelOspfSetup 5 }		

-- zyxelOspfSummaryAddressTable
	    zyxelOspfSummaryAddressTable  OBJECT-TYPE
	    SYNTAX	SEQUENCE OF ZyxelOspfSummaryAddressEntry 
	    MAX-ACCESS  not-accessible
	    STATUS  current
	    DESCRIPTION
	             	"The table contains OSPF summary address configuration."
	    ::= { zyxelOspfSetup 6 }	

		zyxelOspfSummaryAddressEntry  OBJECT-TYPE
        SYNTAX	ZyxelOspfSummaryAddressEntry 
        MAX-ACCESS	not-accessible
        STATUS	current
        DESCRIPTION    	
					"An entry contains OSPF summary address configuration."
        INDEX          	{zyOspfSummaryAddressIpAddress , zyOspfSummaryAddressMaskBits}
        ::= { zyxelOspfSummaryAddressTable 1 }

        ZyxelOspfSummaryAddressEntry ::=
        SEQUENCE {
            zyOspfSummaryAddressIpAddress	IpAddress,
            zyOspfSummaryAddressMaskBits	INTEGER,                
            zyOspfSummaryAddressRowStatus	RowStatus            
        }

        zyOspfSummaryAddressIpAddress OBJECT-TYPE
        SYNTAX  IpAddress
        MAX-ACCESS  not-accessible
        STATUS  current
        DESCRIPTION
                      	"Specify a network IP address which can cover more than one network in order to reduce the routing table size. 
						For example, you can use 192.168.8.0/22 instead of using 192.168.8.0/24, 192.168.9.0/24, 192.168.10.0/24, and 192.168.11.0/24. 
						The third octet of these four network IP addresses is 00001000, 00001001, 00001010, 00001011 respectively. 
						The first 6 digits (000010) are the common part among these IP addresses. 
						So 192.168.8.0/22 can represent all of these networks."
        ::= { zyxelOspfSummaryAddressEntry 1 }

        zyOspfSummaryAddressMaskBits OBJECT-TYPE
        SYNTAX  INTEGER
        MAX-ACCESS  not-accessible
        STATUS  current
        DESCRIPTION
                      	"Specify the subnet mask for this summary IP address which can cover multiple networks."
        ::= { zyxelOspfSummaryAddressEntry 2 }
                                 
        zyOspfSummaryAddressRowStatus OBJECT-TYPE
        SYNTAX  RowStatus
        MAX-ACCESS  read-create
        STATUS  current
        DESCRIPTION
                      	"This object allow entries to be created and deleted from the summary address table."
        ::= { zyxelOspfSummaryAddressEntry 3 }

-- zyxelOspfGeneralGroup        
		zyxelOspfGeneralGroup OBJECT IDENTIFIER ::= { zyxelOspfSetup 7 }

		zyOspfDistance OBJECT-TYPE
			SYNTAX   INTEGER
			MAX-ACCESS   read-write
			STATUS   current
			DESCRIPTION
			   "The administrative distance of OSPF routes."		   
		::= { zyxelOspfGeneralGroup 1 }

-- zyOspfDefaultInformationOriginateState
		zyOspfDefaultInformationOriginateState OBJECT-TYPE
        SYNTAX  EnabledStatus
        MAX-ACCESS  read-write
        STATUS  current
        DESCRIPTION
                    "Enable/Disable default-information originate."
		::= { zyxelOspfSetup 8 }	

-- zyOspfDefaultInformationOriginateAlways
		zyOspfDefaultInformationOriginateAlways OBJECT-TYPE
        SYNTAX  EnabledStatus
        MAX-ACCESS  read-write
        STATUS  current
        DESCRIPTION
                    "Enable/Disable default-information always originate."
		::= { zyxelOspfSetup 9 }

-- zyOspfDefaultInformationOriginateMetric
		zyOspfDefaultInformationOriginateMetric OBJECT-TYPE
        SYNTAX  INTEGER
        MAX-ACCESS  read-write
        STATUS  current
        DESCRIPTION
                    "Specify a route cost (between 0 and 16777215)."
		::= { zyxelOspfSetup 10 }

-- zyOspfDefaultInformationOriginateMetricType
		zyOspfDefaultInformationOriginateMetricType OBJECT-TYPE
        SYNTAX  INTEGER
        MAX-ACCESS  read-write
        STATUS  current
        DESCRIPTION
                    "Select 1 for routing protocols whose external metrics are directly comparable to the internal OSPF cost. 
					When selecting a path, the internal OSPF cost is added to the ASBR to the external metrics. 
					(internal cost + external cost)
					Select 2 for routing protocols whose external metrics are not comparable to the OSPF cost. In this case, 
					the external cost of the ASBR is used in path decision to a destination.  (external cost)"
		::= { zyxelOspfSetup 11 }

-- *******************************************************************
-- *
-- * zyxelOspfStatus
-- *
-- *******************************************************************

-- zyxelOspfIfInfoTable
        zyxelOspfIfInfoTable	OBJECT-TYPE
        SYNTAX	SEQUENCE OF ZyxelOspfIfInfoEntry
        MAX-ACCESS  not-accessible
        STATUS  current
        DESCRIPTION
                 	"The table contains OSPF interface information."
        ::= { zyxelOspfStatus 1 }
        
		zyxelOspfIfInfoEntry OBJECT-TYPE
        SYNTAX	ZyxelOspfIfInfoEntry
        MAX-ACCESS	not-accessible
        STATUS	current
        DESCRIPTION    	
					"An entry contains OSPF interface information."
		INDEX          	{ ospfIfIpAddress, ospfAddressLessIf }
        ::= { zyxelOspfIfInfoTable 1 }

        ZyxelOspfIfInfoEntry ::=
		SEQUENCE {
        	zyOspfIfInfoMaskbits					INTEGER,
        	zyOspfIfInfoDesignatedRouterID			IpAddress,
        	zyOspfIfInfoBackupDesignatedRouterID	IpAddress,
            zyOspfIfInfoNbrCount					INTEGER,
            zyOspfIfInfoAdjacentNbrCount			INTEGER,
            zyOspfIfInfoHelloDueTime				DisplayString
        }          

        zyOspfIfInfoMaskbits OBJECT-TYPE
        SYNTAX  INTEGER
        MAX-ACCESS  read-only
        STATUS  current
        DESCRIPTION
                      	"The subnet mask bits of an IP routing domain that is associated to this interface."
        ::= { zyxelOspfIfInfoEntry 1 }

        zyOspfIfInfoDesignatedRouterID OBJECT-TYPE
        SYNTAX  IpAddress
        MAX-ACCESS  read-only
        STATUS  current
        DESCRIPTION
                      	"The IP Address of the Designated Router."
        ::= { zyxelOspfIfInfoEntry 2 }

        zyOspfIfInfoBackupDesignatedRouterID OBJECT-TYPE
        SYNTAX  IpAddress
        MAX-ACCESS  read-only
        STATUS  current
        DESCRIPTION
                      	"The IP Address of the Backup Designated Router."
        ::= { zyxelOspfIfInfoEntry 3 }

        zyOspfIfInfoNbrCount OBJECT-TYPE
        SYNTAX  INTEGER
        MAX-ACCESS  read-only
        STATUS  current
        DESCRIPTION
                      	"Regardless of state, counting all adjacent neighbors."
        ::= { zyxelOspfIfInfoEntry 4 }
        
        zyOspfIfInfoAdjacentNbrCount OBJECT-TYPE
        SYNTAX  INTEGER
        MAX-ACCESS  read-only
        STATUS  current
        DESCRIPTION
                      	"Counting the adjacent neighbor if its state is full."
        ::= { zyxelOspfIfInfoEntry 5 }

        zyOspfIfInfoHelloDueTime OBJECT-TYPE
        SYNTAX  DisplayString
        MAX-ACCESS  read-only
        STATUS  current
        DESCRIPTION
                      	"The interface would send hello packet when the due time is timeout."
        ::= { zyxelOspfIfInfoEntry 6 }
		
-- zyxelOspfNbrTable
        zyxelOspfNbrTable	OBJECT-TYPE
        SYNTAX	SEQUENCE OF ZyxelOspfNbrEntry
        MAX-ACCESS  not-accessible
        STATUS  current
        DESCRIPTION
                 	"The table contains OSPF neighbor information."
        ::= { zyxelOspfStatus 2 }
        
		zyxelOspfNbrEntry	OBJECT-TYPE
        SYNTAX	ZyxelOspfNbrEntry
        MAX-ACCESS	not-accessible
        STATUS	current
        DESCRIPTION    	
					"An entry contains OSPF neighbor information."
		INDEX          	{ ospfNbrIpAddr, ospfNbrAddressLessIndex }
        ::= { zyxelOspfNbrTable 1 }

        ZyxelOspfNbrEntry ::=
		SEQUENCE {
        	zyOspfNbrRole				INTEGER,
        	zyOspfNbrDeadtime			DisplayString,
        	zyOspfNbrInterface			IpAddress,
        	zyOspfNbrRetransmitLSA		INTEGER,
        	zyOspfNbrRequestLSA			INTEGER,
        	zyOspfNbrDatabaseSummaryLSA	INTEGER
        }
        
        zyOspfNbrRole OBJECT-TYPE
        SYNTAX  INTEGER{		
		dr(1),
		backup(2),
		drOther(3)
        }
        MAX-ACCESS  read-only
        STATUS  current
        DESCRIPTION
                      	"This variable display the neighbor role."
        ::= { zyxelOspfNbrEntry 1 }

        zyOspfNbrDeadtime OBJECT-TYPE
        SYNTAX  DisplayString
        MAX-ACCESS  read-only
        STATUS  current
        DESCRIPTION
                      	"The neighbor would be disconnect when the dead time is timeout.
						The dead time would be reset when the switch receives hello packet from the neighbor."
        ::= { zyxelOspfNbrEntry 2 }

        zyOspfNbrInterface OBJECT-TYPE
        SYNTAX  IpAddress
        MAX-ACCESS  read-only
        STATUS  current
        DESCRIPTION
                      	"The interface is connected with the neighbor."
        ::= { zyxelOspfNbrEntry 3 }

        zyOspfNbrRetransmitLSA OBJECT-TYPE
        SYNTAX  INTEGER
        MAX-ACCESS  read-only
        STATUS  current
        DESCRIPTION
                      	"The list of LSAs that have been flooded but not acknowledged on this adjacency.  
                      	These will be retransmitted at intervals until they are acknowledged, or until the adjacency is destroyed."
        ::= { zyxelOspfNbrEntry 4 }

        zyOspfNbrRequestLSA OBJECT-TYPE
        SYNTAX  INTEGER
        MAX-ACCESS  read-only
        STATUS  current
        DESCRIPTION
                      	"The list of LSAs that need to be received from this neighbor in order to synchronize the 
                      	two neighbors' link-state databases. This list is created as Database Description packets
                      	 are received, and is then sent to the neighbor in Link State Request packets.  The list 
                      	 is depleted as appropriate Link State Update packets are received."
        ::= { zyxelOspfNbrEntry 5 }

        zyOspfNbrDatabaseSummaryLSA OBJECT-TYPE
        SYNTAX  INTEGER
        MAX-ACCESS  read-only
        STATUS  current
        DESCRIPTION
                      	"The complete list of LSAs that make up the area link-state database, 
                      	at the moment the neighbor goes into Database Exchange state.  This list is sent to 
                      	the neighbor in DatabaseDescription packets."
        ::= { zyxelOspfNbrEntry 6 }
		
-- zyxelOspfLsdbTable
        zyxelOspfLsdbTable	OBJECT-TYPE
        SYNTAX	SEQUENCE OF ZyxelOspfLsdbEntry
        MAX-ACCESS  not-accessible
        STATUS  current
        DESCRIPTION
                 	"The table contains OSPF link state database information."
        ::= { zyxelOspfStatus 3 }
        
		zyxelOspfLsdbEntry	OBJECT-TYPE
        SYNTAX	ZyxelOspfLsdbEntry
        MAX-ACCESS	not-accessible
        STATUS	current
        DESCRIPTION    	
        			"An entry contains OSPF link state database information."
		INDEX          	{ ospfLsdbAreaId, ospfLsdbType, ospfLsdbLsid, ospfLsdbRouterId }
        ::= { zyxelOspfLsdbTable 1 }

        ZyxelOspfLsdbEntry ::=
		SEQUENCE {
        	zyOspfLsdbLinkCount			INTEGER,
        	zyOspfLsdbRouteIpAddress	IpAddress,
        	zyOspfLsdbRouteMaskBits		INTEGER
        }          
        zyOspfLsdbLinkCount OBJECT-TYPE
        SYNTAX  INTEGER
        MAX-ACCESS  read-only
        STATUS  current
        DESCRIPTION
                      	"Display how many link in this Link State Database."
        ::= { zyxelOspfLsdbEntry 1 }

        zyOspfLsdbRouteIpAddress OBJECT-TYPE
        SYNTAX  IpAddress
        MAX-ACCESS  read-only
        STATUS  current
        DESCRIPTION
                      	"Display the ip address of routing domain in this Link State Database."
        ::= { zyxelOspfLsdbEntry 2 }

        zyOspfLsdbRouteMaskBits OBJECT-TYPE
        SYNTAX  INTEGER
        MAX-ACCESS  read-only
        STATUS  current
        DESCRIPTION
                      	"Display the mask bits of routing domain in this Link State Database."
        ::= { zyxelOspfLsdbEntry 3 }
		
-- *******************************************************************
-- *
-- * zyxelOspfNotifications
-- *
-- *******************************************************************
    
	   zyOspfExceedMaxDynamicRoutePath NOTIFICATION-TYPE
	   STATUS  current
       DESCRIPTION
               "Receive LSA route path is over maximum LSA. "
       ::= { zyxelOspfNotifications 1 }
		
END
