ELTEX-ARP-INTERFACE-TABLE-MIB DEFINITIONS ::= BEGIN

-- Title:      Eltex IP Router Private Extension
-- Version:    1.0
-- Date:       05 Feb 2021

IMPORTS
    ipNetToMediaEntry                           FROM IP-MIB
    OBJECT-TYPE, IpAddress, Unsigned32          FROM SNMPv2-SMI
    TimeInterval, MacAddress                    FROM SNMPv2-TC
    InterfaceIndexOrZero                        FROM IF-MIB
    eltMesArpSpec                               FROM ELTEX-MES-IP;


eltIpNetToMediaTable OBJECT-TYPE
    SYNTAX  SEQUENCE OF EltIpNetToMediaEntry
    MAX-ACCESS  not-accessible
    STATUS  current
    DESCRIPTION
         ""
    ::= { eltMesArpSpec 2 }

eltIpNetToMediaEntry OBJECT-TYPE
    SYNTAX  EltIpNetToMediaEntry
    MAX-ACCESS  not-accessible
    STATUS  current
    DESCRIPTION
        "This table augments existing table ipNetToMediaTable"
    AUGMENTS   { ipNetToMediaEntry }
              ::= { eltIpNetToMediaTable 1 }

EltIpNetToMediaEntry ::= SEQUENCE {
    eltIpNetToMediaUnnumberedChildIfIndex    INTEGER,
    eltIpNetToMediaSrcFlag                   INTEGER
}

eltIpNetToMediaUnnumberedChildIfIndex OBJECT-TYPE
    SYNTAX     INTEGER (0..2147483647)
    MAX-ACCESS read-only
    STATUS     deprecated
    DESCRIPTION
           "The interface on which this entry's equivalence is
            effective.  The interface identified by a particular value
            of this index is the same interface as identified by the
            same value of the IF-MIB's ifIndex.
            
            This field can only be used for ifIndex of the
            ip unnumbered child interface."
    ::= { eltIpNetToMediaEntry 1 }

eltIpNetToMediaSrcFlag OBJECT-TYPE
    SYNTAX     INTEGER {
                none(0),              -- none of the following
                local(1),             -- added via local interface
                controlPlane(2),      -- added via L2RIB, Control plane Adjacencies
                es(3),                -- added via L2RIB, from ES neighbor
                localES(4),           -- added via L2RIB, from ES neighbor and local interface
                agingES(5)            -- the entry was deleted from the ES neighbor 
                                      -- and the deletion timer was started
               }
    MAX-ACCESS read-only
    STATUS     deprecated
    DESCRIPTION
           "Source flag for more information about how the entry was added."
    ::= { eltIpNetToMediaEntry 2 }

--
-- ARP suppression-cache table.
--
-- This table contains MAC-IP entry for ARP suppression in VXLAN networks.
--

  eltIpArpSuppressionCacheTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF EltIpArpSuppressionCacheEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION "Table for suppressing broadcast ARP request in VXLAN networks.

                 These table contains MAC-IP entries learning by vlan with ARP 
                 suppression option and vxlan tunnels."
    ::= { eltMesArpSpec 3 }

  eltIpArpSuppressionCacheEntry OBJECT-TYPE
    SYNTAX      EltIpArpSuppressionCacheEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION "Entry containing information about learning MAC-IP."
    INDEX { eltIpArpSuppressionCacheVlanTag,
            eltIpArpSuppressionCacheIpAddress }
    ::= { eltIpArpSuppressionCacheTable 1 }

  EltIpArpSuppressionCacheEntry ::= SEQUENCE {
      eltIpArpSuppressionCacheVlanTag        INTEGER,
      eltIpArpSuppressionCacheIpAddress      IpAddress,
      eltIpArpSuppressionCacheMacAddress     MacAddress,
      eltIpArpSuppressionCachePort           InterfaceIndexOrZero,
      eltIpArpSuppressionCacheFlags          INTEGER,
      eltIpArpSuppressionCacheStatus         INTEGER,
      eltIpArpSuppressionCacheNhAddr         IpAddress,
      eltIpArpSuppressionCacheAge            TimeInterval
    }

  eltIpArpSuppressionCacheVlanTag OBJECT-TYPE
    SYNTAX      INTEGER (1..4094)
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION "Vlan tag in which the entry was learned."
    ::= { eltIpArpSuppressionCacheEntry 1 }

  eltIpArpSuppressionCacheIpAddress OBJECT-TYPE
    SYNTAX      IpAddress
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION "Host ip address."
    ::= { eltIpArpSuppressionCacheEntry 2 }

  eltIpArpSuppressionCacheMacAddress OBJECT-TYPE
    SYNTAX      MacAddress
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION "The MAC address host."
    ::= { eltIpArpSuppressionCacheEntry 3 }

  eltIpArpSuppressionCachePort OBJECT-TYPE
    SYNTAX      InterfaceIndexOrZero
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION "Port through which the ARP message was received. If this record was 
                 received from VTEP, then the value will be NULL."
    ::= { eltIpArpSuppressionCacheEntry 4 }

  eltIpArpSuppressionCacheFlags OBJECT-TYPE
    SYNTAX      INTEGER {
                  local(1),     -- local host
                  remote(2)     -- host received from VXLAN
                }
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION "Indication of the source through which the entry was learned."
    ::= { eltIpArpSuppressionCacheEntry 5 }

  eltIpArpSuppressionCacheStatus OBJECT-TYPE
    SYNTAX      INTEGER {
                  active(1),
                  inactive(2)
                }
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION "Indicates whether the entry is used to suppress ARP requests 
                 with a target IP equal to eltIpArpSuppressionCacheIpAddress.

                 The following description is relevant for local entries, remote entries 
                 will always be active.

                 The entry becomes inactive when the MAC is removed from the device. 
                 When switching to the inactive state, sent to the peers withdraw MAC-IP route in BGP UPDATE,
                 the entry will be deleted after half of the aging timer has expired.
                 In the inactive state, ARP requests with an equal target IP will not be suppressed.
                 If the MAC address is learned again and a MAC-IP entry exists in the ARP suppression-cache,
                 the entry becomes active and sent to the peers BGP UPDATE with the MAC-IP route."
    ::= { eltIpArpSuppressionCacheEntry 6 }

  eltIpArpSuppressionCacheNhAddr OBJECT-TYPE
    SYNTAX     IpAddress
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION "Next hop for MAC-IP entry in VXLAN tunnel."
    ::= { eltIpArpSuppressionCacheEntry 7 }

  eltIpArpSuppressionCacheAge OBJECT-TYPE
    SYNTAX      TimeInterval
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION "The time elapsed in second since the ARP message was 
                 received from this host.

                 For remote entry, the field contains the elapsed time since the BGP 
                 update was received."
    ::= { eltIpArpSuppressionCacheEntry 8 }

  eltIpArpSuppressionInactiveTimeOut OBJECT-TYPE
    SYNTAX      Unsigned32 (30..40000000)
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION "This variable defines the ARP suppression-cache table timeout."
    DEFVAL  { 300 }
    ::= { eltMesArpSpec 4 }

  eltIpArpSuppressionNumOfEntries OBJECT-TYPE
    SYNTAX      Unsigned32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION "Displays how many MAC-IP entries stored in ARP suppression-cache table."
    ::= { eltMesArpSpec 5 }

END


