MIB to OID

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Brif8
Posts: 9
Joined: Sat Apr 22, 2006 5:27 pm

MIB to OID

Post by Brif8 »

Hi There

I have the MIBs for a Sonicwall Firewall
I have no idea what a OID is (i'm new to SNMP)
and the number string 1.2.3.4.6.7.8etc......

If someone could help me get my MIBs setup or is able to create downloadable templates I'll share the Sonicwall MIBs

Thanks
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Brif8
Posts: 9
Joined: Sat Apr 22, 2006 5:27 pm

Post by Brif8 »

Thanks for the reply

but where do you get
this portion from ?

HOST-RESOURCES-MIB::hrStorageTable
in the command

snmptable -c <community> -v 1 <host> HOST-RESOURCES-MIB::hrStorageTable

I'm trying to understand the .mib file I have and I don't get this part from here I'm sure it will pull together
Brif8
Posts: 9
Joined: Sat Apr 22, 2006 5:27 pm

Post by Brif8 »

I'm attaching the MIB file
======================
-- *****************************************************************
-- SONICWALL-FIREWALL-IP-STATISTICS
--
-- June 2002, Initial Version, Srikanth Nayani
-- Apr 2003, Change Postal, Susan Yan
--
-- Copyright (c) 2001 - 2003 by SonicWall, Inc.
-- All rights reserved.
-- *****************************************************************

SONICWALL-FIREWALL-IP-STATISTICS-MIB DEFINITIONS ::= BEGIN


IMPORTS
DisplayString,
TEXTUAL-CONVENTION FROM SNMPv2-TC

IpAddress,
snmpModules,
OBJECT-TYPE,
NOTIFICATION-TYPE,
MODULE-IDENTITY FROM SNMPv2-SMI
Counter FROM RFC1155-SMI

sonicwallFw FROM SONICWALL-SMI;

sonicwallFwStatsModule MODULE-IDENTITY
LAST-UPDATED "200304220000Z"
ORGANIZATION "SonicWall, Inc."
CONTACT-INFO
" SonicWall Inc.

Postal: 1143 Borregas Avenue
Sunnyvale, CA 94089
USA

Tel: +1 408 745 9600
Fax: +1 408 745 9300

E-mail: product@sonicwall.com"
DESCRIPTION
"The MIB Module for SonicWALL Firewall Ipsec Statistics."
REVISION "200304220000Z"
DESCRIPTION
"Initial Version"
::= { sonicwallFw 3 }

sonicwallFwVPNStats OBJECT IDENTIFIER ::= {sonicwallFwStatsModule 2}

sonicwallFwVpnIPSecStats OBJECT IDENTIFIER ::= {sonicwallFwVPNStats 1}


-- =======================
-- sonic IPsec Statistics Table
-- =======================

sonicSAStatTable OBJECT-TYPE
SYNTAX SEQUENCE OF SonicSAStatEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"This table provides statistics for each Security Association."
::= { sonicwallFwVpnIPSecStats 1 }

sonicSAStatEntry OBJECT-TYPE
SYNTAX SonicSAStatEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"Entries in table cannot be added or deleted. This table is
completely controlled by the agent. Each SA statistics will be
represented by an entry in this table. "
INDEX { sonicIpsecSaIndex}
::= { sonicSAStatTable 1 }

SonicSAStatEntry ::= SEQUENCE {
sonicIpsecSaIndex Counter,
sonicSAStatPeerGateway IpAddress,
sonicSAStatSrcAddrBegin IpAddress,
sonicSAStatSrcAddrEnd IpAddress,
sonicSAStatDstAddrBegin IpAddress,
sonicSAStatDstAddrEnd IpAddress,
sonicSAStatCreateTime DisplayString,
sonicSAStatEncryptPktCount Counter,
sonicSAStatEncryptByteCount Counter,
sonicSAStatDecryptPktCount Counter,
sonicSAStatDecryptByteCount Counter,
sonicSAStatInFragPktCount Counter,
sonicSAStatOutFragPktCount Counter,
sonicSAStatUserName DisplayString
}


sonicIpsecSaIndex OBJECT-TYPE
SYNTAX Counter
MAX-ACCESS read-only
STATUS current
DESCRIPTION
" Phase2 SA index."
::= { sonicSAStatEntry 1 }

sonicSAStatPeerGateway OBJECT-TYPE
SYNTAX IpAddress
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Peer gateway address where the tunnel gets terminated ."
::= { sonicSAStatEntry 2 }

sonicSAStatSrcAddrBegin OBJECT-TYPE
SYNTAX IpAddress
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"First address of the Source network for the phase2 SA ."
::= { sonicSAStatEntry 3 }

sonicSAStatSrcAddrEnd OBJECT-TYPE
SYNTAX IpAddress
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Last address of the Source network for the phase2 SA ."
::= { sonicSAStatEntry 4 }

sonicSAStatDstAddrBegin OBJECT-TYPE
SYNTAX IpAddress
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"First address of the destination network for the phase2 SA ."
::= { sonicSAStatEntry 5 }

sonicSAStatDstAddrEnd OBJECT-TYPE
SYNTAX IpAddress
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Last address of the destination network for the phase2 SA ."
::= { sonicSAStatEntry 6 }

sonicSAStatCreateTime OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Time this phase2 SA was actually created in GMT."
::= { sonicSAStatEntry 7 }

sonicSAStatEncryptPktCount OBJECT-TYPE
SYNTAX Counter
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Total encrypted packet count for this phase2 SA."
::= { sonicSAStatEntry 8 }

sonicSAStatEncryptByteCount OBJECT-TYPE
SYNTAX Counter
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Total encrypted byte count for this phase2 SA."
::= { sonicSAStatEntry 9 }

sonicSAStatDecryptPktCount OBJECT-TYPE
SYNTAX Counter
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Total decrypted packet count for this phase2 SA."
::= { sonicSAStatEntry 10}

sonicSAStatDecryptByteCount OBJECT-TYPE
SYNTAX Counter
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Total decrypted byte count for this phase2 SA."
::= { sonicSAStatEntry 11 }

sonicSAStatInFragPktCount OBJECT-TYPE
SYNTAX Counter
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Incoming Fragmented packet count for this phase2 SA"
::= { sonicSAStatEntry 12 }

sonicSAStatOutFragPktCount OBJECT-TYPE
SYNTAX Counter
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Outgoing Fragmented packet count for this phase2 SA"
::= { sonicSAStatEntry 13 }


sonicSAStatUserName OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Name of the security policy used for creating this phase2 SA."
::= { sonicSAStatEntry 14 }


END
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Brif8 wrote:Thanks for the reply

but where do you get
this portion from ?

HOST-RESOURCES-MIB::hrStorageTable
in the command

snmptable -c <community> -v 1 <host> HOST-RESOURCES-MIB::hrStorageTable

I'm trying to understand the .mib file I have and I don't get this part from here I'm sure it will pull together
So please try

Code: Select all

snmptable -c <community> -v 1 <host> sonicSAStatTable
You should get the ASN.1 OID, when using

Code: Select all

snmptable -c <community> -v 1 -On <host> sonicSAStatTable
Reinhard
Brif8
Posts: 9
Joined: Sat Apr 22, 2006 5:27 pm

Post by Brif8 »

snmptable -c snmpinfo -v 1 my.ip.address sonicSAStatTable
sonicSAStatTable: Unknown Object Identifier (Sub-id not found: (top) -> sonicSAStatTable)

snmptable -c snmpinfo -v 1 -On my.ip.address sonicSAStatTable
sonicSAStatTable: Unknown Object Identifier (Sub-id not found: (top) -> sonicSAStatTable)
melchandra
Cacti User
Posts: 311
Joined: Tue Jun 29, 2004 12:52 pm
Location: Indiana

Post by melchandra »

You won't be able to use the names of the MIB objects (sonicSAStatTable) until you copy the MIB file into the appropriate location for the snmptable utility to read it.

You can use the -m option to load one specific file
You can use the -M option to load a directory of mib files
The default location for files (at least on my RHEL 4) is /usr/share/snmp/mibs

So either use one of the options, or copy the mib file into that directory and then you should be set.
Dave
Brif8
Posts: 9
Joined: Sat Apr 22, 2006 5:27 pm

Post by Brif8 »

Hi

I had / have the files line the /usr/share/snmp/mibs

-rw-r--r-- 1 root root 5775 Apr 19 10:26 SNMPv2-TM.txt
-rwxrw-r-- 1 root root 22949 Dec 21 13:10 SW-FIREWALL-TRAP.mib <<<
-rwxrw-r-- 1 root root 1171 Dec 21 13:10 SW-SMI.mib <<<
-rw-r--r-- 1 root root 10765 Apr 19 10:26 TCP-MIB.txt
-rw-r--r-- 1 root root 16414 Apr 19 10:26 TRANSPORT-ADDRESS-MIB.txt
-rw-r--r-- 1 root root 2163 Apr 19 10:26 UCD-DEMO-MIB.txt
-rw-r--r-- 1 root root 3796 Apr 19 10:26 UCD-DISKIO-MIB.txt
-rw-r--r-- 1 root root 3010 Apr 19 10:26 UCD-DLMOD-MIB.txt
-rw-r--r-- 1 root root 8118 Apr 19 10:26 UCD-IPFWACC-MIB.txt
-rw-r--r-- 1 root root 35242 Apr 19 10:26 UCD-SNMP-MIB.txt
-rw-r--r-- 1 root root 4076 Apr 19 10:26 UDP-MIB.txt
-rwxrw-r-- 1 root root 5414 Dec 21 13:10 sonic_stats.mib <<<

I also tried snmptable -m sonic_stats.mib

snmptable -m sonic_stats.mib
Cannot find module (sonic_stats.mib): At line 0 in (none)
No hostname specified.
USAGE: snmptable [OPTIONS] AGENT TABLE-OID

Version: 5.2.1.2
Web: http://www.net-snmp.org/
Email: net-snmp-coders@lists.sourceforge.net

OPTIONS:
-h, --help display this help message
-H display configuration file directives understood
-v 1|2c|3 specifies SNMP version to use
-V, --version display package version number
....
....
....


snmptable -m ./SW-FIREWALL-TRAP.txt -c snmpinfo -v 1 my.ip.address sonicSAStatTable
sonicSAStatTable: Unknown Object Identifier (Sub-id not found: (top) -> sonicSAStatTable)


snmptable -m ./sonic_stats.txt -c snmpinfo -v 1 -On my.ip.address sonicSAStatTable
Was that a table? .1.3.6.1.4.1.8741.1.3.2.1.1


What else am I missing, sorry for the obivous but as stated before I have never dealt with SNMP before.

Thanks
Barry
Last edited by Brif8 on Mon Apr 24, 2006 10:10 am, edited 1 time in total.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please try option -M /usr/share/snmp/mibs (that reads the whole dir, may produce lots of error for all broken MIB files, but don't care)
Reinhard
Brif8
Posts: 9
Joined: Sat Apr 22, 2006 5:27 pm

Post by Brif8 »

snmptable -M /usr/share/snmp/mibs -c snmpinfo -v 1 -On my.ip.address sonicSAStatTable
sonicSAStatTable: Unknown Object Identifier (Sub-id not found: (top) -> sonicSAStatTable)


snmptable -M /usr/share/snmp/mibs -c snmpinfo -v 1 my.ip.address sonicSAStatTable
sonicSAStatTable: Unknown Object Identifier (Sub-id not found: (top) -> sonicSAStatTable)

/usr/share/snmp/mibs
-rwxrw-r-- 1 root root 22949 Dec 21 13:10 SW-FIREWALL-TRAP.mib
-rwxr--r-- 1 root root 22949 Apr 24 10:59 SW-FIREWALL-TRAP.txt
-rwxrw-r-- 1 root root 1171 Dec 21 13:10 SW-SMI.mib
-rwxr--r-- 1 root root 1171 Apr 24 10:59 SW-SMI.txt
-rwxrw-r-- 1 root root 5414 Dec 21 13:10 sonic_stats.mib
-rwxr--r-- 1 root root 5414 Apr 24 10:59 sonic_stats.txt


What am I missing ?????? :oops: :cry:
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Don't know. Please pm all your Sonic MIBs. I'll have a look at them to get the ASN.1 OID that's needed with cacti
Reinhard
Brif8
Posts: 9
Joined: Sat Apr 22, 2006 5:27 pm

Post by Brif8 »

Sent you the files
there are three
Thank you for all you help and assistance

Barry
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Will take a look. But it may take a while
Reinhard
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

I found the OIDs in ASN.1 notation to result in .1.3.6.1.4.1.8714 for Sonicwall (see http://www.oidview.com/mibs/detail.html?VID=8714). So please snmpwalk against this OID to find
1) the table you're interested in alongside with the index
2) the relevant OIDs for those stats you need
AS the output may be huge, this may require a step by step procedure
Reinhard
Brif8
Posts: 9
Joined: Sat Apr 22, 2006 5:27 pm

Post by Brif8 »

making possible progress

snmpwalk -c snmpinfo -c 1 -On my.ip.address SONICWALL-FIREWALL-TRAP-MIB::swTrapInfoTable

snmpwalk: Timeout

how do I lengthen timeout ?

When I try

snmpwalk -t1000 -c snmpinfo -c 1 -On my.ip.address SONICWALL-FIREWALL-TRAP-MIB::swTrapInfoTable


It returns nothing it just sits there doing something displaying nothing


Thanks
Barry
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests