-- Copyright (C) 2006-2012 Aricent Group . All Rights Reserved

-- /*****************************************************************
--  *                                                               *
--  * $RCSfile: fstunl.mib,v $                                      *
--  *                                                               *
--  * $Date: 2014/03/06 12:56:54 $                                  *
--  *                                                               *
--  * $Revision: 1.1 - IPv4/IPv6 Tunnel MIB based on draft          *
--                     <draft-thaler-inet-tunnel-mib-00.txt>        *
--  *                                                               *
--  ****************************************************************/


ARICENT-TUNNEL-MIB DEFINITIONS ::= BEGIN

IMPORTS
    MODULE-IDENTITY, OBJECT-TYPE,
    Integer32, Unsigned32, enterprises             FROM SNMPv2-SMI
    RowStatus, TEXTUAL-CONVENTION, DisplayString, TruthValue   FROM SNMPv2-TC
    InetAddressType, InetAddress                   FROM INET-ADDRESS-MIB
    ifIndex, InterfaceIndexOrZero                  FROM IF-MIB;

fsTunlMIB MODULE-IDENTITY
    LAST-UPDATED "201209050000Z"
    ORGANIZATION "ARICENT COMMUNICATIONS SOFTWARE"
    CONTACT-INFO "support@aricent.com"
    DESCRIPTION
        "The MIB module for management of IP (IPv4 and IPv6) Tunnels,
         independent of the specific encapsulation scheme in use."
    REVISION "201209050000Z"
    DESCRIPTION
        "The MIB module for management of IP (IPv4 and IPv6) Tunnels,
         independent of the specific encapsulation scheme in use."
    ::= { enterprises futuresoftware(2076) 95 }


FsTunlType ::= TEXTUAL-CONVENTION
    STATUS     current
    DESCRIPTION
            "The encapsulation method used by a tunnel. The value
            direct indicates that a packet is encapsulated
            directly within a normal IP header, with no
            intermediate header, and unicast to the remote tunnel
            endpoint (e.g., an RFC 2003 IP-in-IP tunnel, or an RFC
            1933 IPv6-in-IPv4 tunnel). The value minimal indicates
            that a Minimal Forwarding Header (RFC 2004) is
            inserted between the outer header and the payload
            packet. The value UDP indicates that the payload
            packet is encapsulated within a normal UDP packet
            (e.g., RFC 1234).

            The values sixToFour, sixOverFour, and isatap
            indicates that an IPv6 packet is encapsulated directly
            within an IPv4 header, with no intermediate header,
            and unicast to the destination determined by the 6to4,
            6over4, or ISATAP protocol.

            The remaining protocol-specific values indicate that a
            header of the protocol of that name is inserted
            between the outer header and the payload header.

            This type is abstracted from the IANAtunnelType."
    SYNTAX     INTEGER {
                   other(1),        -- none of the following
                   direct(2),       -- no intermediate header
                   gre(3),          -- GRE encapsulation
                   minimal(4),      -- Minimal encapsulation
                   l2tp(5),         -- L2TP encapsulation
                   pptp(6),         -- PPTP encapsulation
                   l2f(7),          -- L2F encapsulation
                   udp(8),          -- UDP encapsulation
                   atmp(9),         -- ATMP encapsulation
                   msdp(10),        -- MSDP encapsulation
                   sixToFour(11),   -- 6to4 encapsulation
                   sixOverFour(12), -- 6over4 encapsulation
                   isatap(13),      -- ISATAP encapsulation
                   teredo(14),      -- Teredo encapsulation
                   compat(15),      -- IPv6 Auto-Compatible encapsulation
                   ipv6ip(16),       -- IPv6 over IPV4 Configured encapsulation
                   openflow(17)     -- OpenFlow encapsulation
               }

FsIPv6FlowLabelOrAny ::= TEXTUAL-CONVENTION
    DISPLAY-HINT  "d"
    STATUS         current
    DESCRIPTION   "The flow identifier or Flow Label in an IPv6
                   packet header that may be used to discriminate
                   traffic flows.  The value of -1 is used to
                   indicate a wildcard, i.e. any value."
    SYNTAX         Integer32 (-1 | 0..1048575)

fsTunlMIBObjects OBJECT IDENTIFIER ::= { fsTunlMIB 1 }

fsTunl      OBJECT IDENTIFIER ::= { fsTunlMIBObjects 1 }

-- the IP Tunnel MIB-Group
--
-- a collection of objects providing information about
-- IP Tunnels

fsTunlIfTable OBJECT-TYPE
    SYNTAX     SEQUENCE OF FsTunlIfEntry
    MAX-ACCESS not-accessible
    STATUS     current
    DESCRIPTION
            "The (conceptual) table containing information on
            configured tunnels."
    ::= { fsTunl 1 }

fsTunlIfEntry OBJECT-TYPE
    SYNTAX     FsTunlIfEntry
    MAX-ACCESS not-accessible
    STATUS     current
    DESCRIPTION
            "The (conceptual) table containing information on
            configured tunnels.  This table can be used to map a
            set of tunnel endpoints to the associated ifIndex
            value.  It can also be used for row creation."
        INDEX  { fsTunlIfAddressType,
                 fsTunlIfLocalInetAddress,
                 fsTunlIfRemoteInetAddress,
                 fsTunlIfEncapsMethod,
                 fsTunlIfConfigID }
    ::= { fsTunlIfTable 1 }

FsTunlIfEntry ::= SEQUENCE {
    fsTunlIfAddressType             InetAddressType,
    fsTunlIfLocalInetAddress        InetAddress,
    fsTunlIfRemoteInetAddress       InetAddress,
    fsTunlIfEncapsMethod            FsTunlType,
    fsTunlIfConfigID                Integer32,
    fsTunlIfHopLimit                Integer32,
    fsTunlIfSecurity                INTEGER,
    fsTunlIfTOS                     Integer32,
    fsTunlIfFlowLabel               FsIPv6FlowLabelOrAny,
    fsTunlIfMTU                     Integer32,
    fsTunlIfDirFlag                 INTEGER,
    fsTunlIfDirection               INTEGER,
    fsTunlIfEncaplmt                Unsigned32,
    fsTunlIfEncapOption             INTEGER,
    fsTunlIfIndex                   InterfaceIndexOrZero,
    fsTunlIfAlias                   DisplayString,
    fsTunlIfCksumFlag               TruthValue,  
    fsTunlIfPmtuFlag                TruthValue,  
    fsTunlIfStatus                  RowStatus
}

fsTunlIfAddressType OBJECT-TYPE
    SYNTAX     InetAddressType
    MAX-ACCESS not-accessible
    STATUS     current
    DESCRIPTION
            "The type of address in the corresponding
            fsTunlIfLocalInetAddress and fsTunlIfRemoteInetAddress
            objects."
    ::= { fsTunlIfEntry 1 }

fsTunlIfLocalInetAddress OBJECT-TYPE
    SYNTAX     InetAddress
    MAX-ACCESS not-accessible 
    STATUS     current
    DESCRIPTION
            "The address of the local endpoint of the tunnel
            (i.e., the source address used in the outer IP
            header).  If the address is unknown, the value is
            0.0.0.0 for IPv4 or :: for IPv6."
    ::= { fsTunlIfEntry 2 }

fsTunlIfRemoteInetAddress OBJECT-TYPE
    SYNTAX     InetAddress
    MAX-ACCESS not-accessible 
    STATUS     current
    DESCRIPTION
            "The address of the remote endpoint of the tunnel
            (i.e., the destination address used in the outer IP
            header).  If the address is unknown or the tunnel is
            not a point-to-point link (e.g., if it is a 6to4
            tunnel), the value is 0.0.0.0 for tunnels over IPv4 or
            :: for tunnels over IPv6."
    ::= { fsTunlIfEntry 3 }

fsTunlIfEncapsMethod OBJECT-TYPE
    SYNTAX     FsTunlType
    MAX-ACCESS not-accessible 
    STATUS     current
    DESCRIPTION
            "The encapsulation method used by the tunnel."
    ::= { fsTunlIfEntry 4 }

fsTunlIfConfigID OBJECT-TYPE
    SYNTAX     Integer32 (1..2147483647)
    MAX-ACCESS not-accessible
    STATUS     current
    DESCRIPTION
            "An identifier used to distinguish between multiple
            tunnels of the same encapsulation method, with the
            same endpoints.  If the encapsulation protocol only
            allows one tunnel per set of endpoint addresses (such
            as for GRE or IP-in-IP), the value of this object is
            1.  For encapsulation methods (such as L2F) which
            allow multiple parallel tunnels, the manager is
            responsible for choosing any ID which does not
            conflict with an existing row, such as choosing a
            random number."
    ::= { fsTunlIfEntry 5 }

fsTunlIfHopLimit OBJECT-TYPE
    SYNTAX     Integer32 (0..255)
    MAX-ACCESS read-write
    STATUS     current
    DESCRIPTION
            "The IPv4 TTL or IPv6 Hop Limit to use in the outer IP
            header.  A value of 0 indicates that the value is
            copied from the payload's header."
    ::= { fsTunlIfEntry 6 }

fsTunlIfSecurity OBJECT-TYPE
    SYNTAX     INTEGER {
                   none(1),   -- no security
                   ipsec(2),  -- IPSEC security
                   other(3)
               }
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
            "The method used by the tunnel to secure the outer IP
            header.  The value ipsec indicates that IPsec is used
            between the tunnel endpoints for authentication or
            encryption or both.  More specific security-related
            information may be available in a MIB for the security
            protocol in use."
    ::= { fsTunlIfEntry 7 }

fsTunlIfTOS OBJECT-TYPE
    SYNTAX     Integer32 (-2..63)
    MAX-ACCESS read-write
    STATUS     current
    DESCRIPTION
            "The method used to set the high 6 bits of the IPv4
            TOS or IPv6 Traffic Class in the outer IP header.  A
            value of -1 indicates that the bits are copied from
            the payload's header. A value of -2 indicates that a
            traffic conditioner is invoked and more information
            may be available in a traffic conditioner MIB.  A
            value between 0 and 63 inclusive indicates that the
            bit field is set to the indicated value."
    ::= { fsTunlIfEntry 8 }

fsTunlIfFlowLabel OBJECT-TYPE
    SYNTAX     FsIPv6FlowLabelOrAny
    MAX-ACCESS read-write
    STATUS     current
    DESCRIPTION
            "The method used to set the IPv6 Flow Label value.
            This object need not be present in rows where
            fsTunlIfAddressType indicates the tunnel is over IPv6.
            A value of -1 indicates that a traffic conditioner is
            invoked and more information may be available in a
            traffic conditioner MIB.  Any other value indicates
            that the Flow Label field is set to the indicated
            value."
    ::= { fsTunlIfEntry 9 }

fsTunlIfMTU  OBJECT-TYPE
    SYNTAX  Integer32 (0 | 1280..1500)
    MAX-ACCESS  read-only
    STATUS  current
    DESCRIPTION
           "Configured MTU of the specific tunnel entry. If set as 0,
            the outgoing Link MTU will be used."
    ::= { fsTunlIfEntry 10 }

fsTunlIfDirFlag OBJECT-TYPE 
    SYNTAX  INTEGER
    {
         unidirectional (1),
         bidirectional  (2)
    }
    MAX-ACCESS  read-write
    STATUS  current
    DESCRIPTION
           "Flag defining whether the configured tunnel is
            unidirectional or bi-directional."
    DEFVAL  { bidirectional }
    ::= { fsTunlIfEntry 11 }

fsTunlIfDirection OBJECT-TYPE
    SYNTAX  INTEGER
    {
         incoming (1),
         outgoing (2)
    }
    MAX-ACCESS  read-write
    STATUS  current
    DESCRIPTION
         "Flag defining whether the uni-directional tunnel 
          configured is incoming or out going."
    DEFVAL  { outgoing }
    ::= { fsTunlIfEntry 12 }

fsTunlIfEncaplmt OBJECT-TYPE
    SYNTAX  Unsigned32
    MAX-ACCESS  read-write
    STATUS  current
    DESCRIPTION
        "The limit on how many further levels of nesting a tunnel
         packet is permitted to undergo - not counting the
         encapsulation in which the option itself is contained.
         Default value recommended is 4. If this option is not to
         be configured set this object to '0xff' else set to
         the value required."
    DEFVAL  { 4 }
    ::= { fsTunlIfEntry 13 }

fsTunlIfEncapOption OBJECT-TYPE
    SYNTAX  INTEGER
    {
          enable(1),
          disable(2)
    }
    MAX-ACCESS  read-write
    STATUS  current
    DESCRIPTION
        "Flag indicating if Encapsulation option needs to be added
         or not in a tunnelled packet."
    DEFVAL  { disable }
    ::= { fsTunlIfEntry 14 }

fsTunlIfIndex OBJECT-TYPE
    SYNTAX     InterfaceIndexOrZero
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
            "If the value of fsTunlIfStatus for this row
            is active, then this object contains the value of
            ifIndex corresponding to the tunnel interface.  A
            value of 0 is not legal in the active state, and means
            that the interface index has not yet been assigned."
    ::= { fsTunlIfEntry 15 }

fsTunlIfAlias   OBJECT-TYPE
       SYNTAX      DisplayString (SIZE(0..64))
       MAX-ACCESS  read-write
       STATUS      current
       DESCRIPTION
            "If the value of fsTunlIfStatus for this row
            is active, then this object contains the value of
            ifAlias corresponding to the tunnel interface.
            The value of fsTunlIfIndex is assigned based on 
            the corresponding fsTunlIfAlias entry in ifMainTable."
    ::= { fsTunlIfEntry 16 }

fsTunlIfCksumFlag OBJECT-TYPE
    SYNTAX     TruthValue
    MAX-ACCESS read-write
    STATUS     current
    DESCRIPTION
          "Flag indicating if checksum needs to be set in GRE header
           for GRE encapsulation type"
    DEFVAL  { false }
    ::= { fsTunlIfEntry 17 }

fsTunlIfPmtuFlag OBJECT-TYPE
    SYNTAX     TruthValue
    MAX-ACCESS read-write
    STATUS     current
    DESCRIPTION
          "Flag indicating if path-mtu-discovery needs to be enabled on the 
           tunnel interface. When enabled, path-mtu-discovery is done to set 
           the MTU of the tunnel interface. When disabled, the outgoing link
           MTU will be used"
    DEFVAL  { false }
    ::= { fsTunlIfEntry 18 }

fsTunlIfStatus OBJECT-TYPE
    SYNTAX     RowStatus
    MAX-ACCESS read-create
    STATUS     current
    DESCRIPTION
            "The status of this row, by which new entries may be
            created, or old entries deleted from this table.
 
            To create a row in this table for an encapsulation
            method which does not support multiple parallel
            tunnels with the same endpoints, the management
            station should simply use a fsTunlInetConfigID of 1,
            and set fsTunlInetConfigStatus to createAndGo.  For
            encapsulation methods such as L2F which allow multiple
            parallel tunnels, the management station may select a
            pseudo-random number to use as the fsTunlInetConfigID
            and set fsTunlInetConfigStatus to createAndGo.  In the
            event that this ID is already in use and an
            inconsistentValue is returned in response to the set
            operation, the management station should simply select
            a new pseudo-random number and retry the operation.

            Creating a row in this table will cause an interface
            index to be assigned by the agent in an
            implementation-dependent manner, and corresponding
            rows will be instantiated in the ifTable and the
            fsTunlIfTable.  The status of this row will become
            active as soon as the agent assigns the interface
            index, regardless of whether the interface is
            operationally up.

            Deleting a row in this table will likewise delete the
            corresponding row in the ifTable and in the
            fsTunlIfTable."
    ::= { fsTunlIfEntry 19 }
END
