09-09-2014 06:52 PM
Hi,
Am trying to configure SNMP functionality for the first time on an SG300-28 switch so I can use mrtg to monitor it. I've defined no users, 2 groups (mrtg and mrtg2 for SNMPv1 and SNMPv2 respectively), both with No authentication required. Default View of Read. I also defined a Basic Community type and called it sg300, with the View Name of Default. Under Views I changed nothing; the Default has 1 Object ID subtree included.
The mrtg CFGMaker in cannot retrieve any information from the switch. I've used it before with routers, Windows servers, etc. with no problem so I have to be overlooking something specific to this switch.
?
Much appreciated.
--Ben
09-09-2014 07:18 PM
Have you attempted an snmpwalk from the command line of your mrtg server? I configured an sg200 for mrtg and nagios a couple of months ago but don't recall any issues. If the snmpwalk fails though I can check my notes in the morning.
09-09-2014 07:35 PM
Yeah, the snmp walk failed:
SNMPWALK Problem for 1.3.6.1.2.1.1 on sg300@10.0.0.6::::::v4only
at cfgmaker line 955
WARNING: Skipping sg300@10.0.0.6: as no info could be retrieved
Hm. <light dawns>
That OID is excluded from the Default view. As are almost all the others. How would I include them instead?
--Ben
09-09-2014 07:47 PM
Ok, so I just defined 2 new views; mrtgsys and mrtgif pointing to the system and interface mib definitions. Updated the mrtg community to use one of them. No change. Tried the other. Same result.
--Ben
09-09-2014 08:09 PM
Interesting. I've got a spare switch. I'll reset it to default and try it again from the scratch. I feel like when I did it the first time I missed something that was slightly obscure. I'll let you know how it goes.
09-09-2014 09:11 PM
It's good to have extra toys! :) Much appreciated.
--Ben
09-10-2014 05:43 AM
Agreed Jonathan was correct, that was the part I missed the first time through. I walked through again to make sure there wasn't anything else and have attached the notes I took, mostly so I'll have them next time I have to do it :)
Steps to configure SNMP for MRTG on SG200-26
***Note*** These are minimum steps only for a lab environment additional security settings may be required for production use.
***Note*** If your looking for port numbers in the output they start with .49 for port 1 and go to .74 for port 26.
IF-MIB::ifHCOutOctets.49 = Counter64: 0
IF-MIB::ifHCOutOctets.50 = Counter64: 0
IF-MIB::ifHCOutOctets.51 = Counter64: 0
IF-MIB::ifHCOutOctets.52 = Counter64: 0
IF-MIB::ifHCOutOctets.53 = Counter64: 0
IF-MIB::ifHCOutOctets.54 = Counter64: 0
IF-MIB::ifHCOutOctets.55 = Counter64: 0
IF-MIB::ifHCOutOctets.56 = Counter64: 0
IF-MIB::ifHCOutOctets.57 = Counter64: 0
IF-MIB::ifHCOutOctets.58 = Counter64: 0
IF-MIB::ifHCOutOctets.59 = Counter64: 2849723
IF-MIB::ifHCOutOctets.60 = Counter64: 0
IF-MIB::ifHCOutOctets.61 = Counter64: 0
IF-MIB::ifHCOutOctets.62 = Counter64: 0
IF-MIB::ifHCOutOctets.63 = Counter64: 0
IF-MIB::ifHCOutOctets.64 = Counter64: 0
IF-MIB::ifHCOutOctets.65 = Counter64: 0
IF-MIB::ifHCOutOctets.66 = Counter64: 0
IF-MIB::ifHCOutOctets.67 = Counter64: 0
IF-MIB::ifHCOutOctets.68 = Counter64: 0
IF-MIB::ifHCOutOctets.69 = Counter64: 0
IF-MIB::ifHCOutOctets.70 = Counter64: 0
IF-MIB::ifHCOutOctets.71 = Counter64: 0
IF-MIB::ifHCOutOctets.72 = Counter64: 0
IF-MIB::ifHCOutOctets.73 = Counter64: 0
IF-MIB::ifHCOutOctets.74 = Counter64: 0
09-10-2014 06:33 AM
Unfortunately am out of time; will have to pick this up this evening.
--Ben
09-10-2014 07:52 PM
Good evening.
Had to track down and install the net-snmp package. Very nice.
Verified the SNMP service is enabled; running my configuration with snmpwalk as:
c:> snmpwalk -c sg300 10.0.0.6 returns
snmpwalk: No securityName specified
I don't recall setting it up with a security name.
What I have for communities is:
SNMP Management Station | Community Type | Community String | Access Mode | View Name | Group Name | |
---|---|---|---|---|---|---|
All | Basic | sg300 | Read Only | mrtgsys | ||
10.0.1.100 | Basic | sgtest | Read Only | mrtgif |
When sg300 didn't work I decided to define the sgtest with the IP address of my workstation. That didn't buy me anything either.
--Ben
09-11-2014 08:25 PM
Hi,
Apparently one of the things I need to do to eliminate that as an issue is get current on firmware. I haven't upgraded it since buying it last December. I'm currently using an active image of 1.0.0.27 and a boot version of 1.0.0.4. Looking at the release notes for 1.4, it says to first upgrade the device image to version 1.3.5 and the latest boot file (1.4.0.x).
I'm not sure I follow the distinction. I gather the boot code is separate and distinct from the firmware code? When I downloaded the 1.3.5.58 zip file I see 2 files in it: one is sx300_boot-13506.rfb and the other sx300_fw-13558.ros. The first is the boot file and the second is the firmware for the OS?
I would assume I would upload both, switch to that version and then reboot, then upload the current firmware and do the same. Does that sound reasonable?
--Ben
09-13-2014 10:04 PM
Ok, am now on current firmware. Nice changes...!
The configuration I currently have is:
config-file-header
SG300
v1.4.0.88 / R800_NIK_1_4_194_194
CLI v1.0
set system mode switch
file SSD indicator plaintext
@
port jumbo-frame
vlan database
vlan 2
exit
voice vlan oui-table add 0001e3 Siemens_AG_phone________
voice vlan oui-table add 00036b Cisco_phone_____________
voice vlan oui-table add 00096e Avaya___________________
voice vlan oui-table add 000fe2 H3C_Aolynk______________
voice vlan oui-table add 0060b9 Philips_and_NEC_AG_phone
voice vlan oui-table add 00d01e Pingtel_phone___________
voice vlan oui-table add 00e075 Polycom/Veritel_phone___
voice vlan oui-table add 00e0bb 3Com_phone______________
port-channel load-balance src-dst-mac-ip
hostname SG300
snmp-server server
snmp-server location Office
snmp-server contact "Ben Conner"
snmp-server view mrtgif interfaces included
snmp-server view mrtgsys system included
snmp-server view mrtgtcp tcp included
snmp-server community sg300 ro view mrtgsys
snmp-server community sgtest ro 10.0.1.100 view mrtgif
snmp-server group mrtg v1 read Default
snmp-server group mrtg2 v2 read Default
clock timezone " " -7
clock source browser
!
interface vlan 1
ip address 10.0.0.6 255.0.0.0
!
interface vlan 2
name wan
!
interface gigabitethernet10
speed 100
!
interface gigabitethernet11
speed 100
!
interface gigabitethernet22
switchport trunk allowed vlan add 2
!
interface gigabitethernet23
switchport trunk allowed vlan add 2
!
interface gigabitethernet24
switchport trunk allowed vlan add 2
!
exit
ip default-gateway 10.0.0.1
Anything I've missed?
--Ben
09-10-2014 01:20 AM
Hi Ben,
Check on the switch admin page under Security / TCP/UDP Services, make sure SNMP Service is enabled, I think it's disabled by default.
Regards,
Jonathan
09-10-2014 05:22 AM
Hi Jonathan,
That was indeed the issue. I didn't realize configuring it wasn't the same as enabling it. Would be nice if that were in the same place as the rest of the SNMP management. Oh well.
Now that mrtg can see the box, am running into other problems, I'm sure of which are more 'configuration opportunities' on my part. :) See below.
Thanks!
--Ben
c:\mrtg-2.16.4\bin>perl cfgmaker sg300@10.0.0.6
SNMP Error:
Received SNMP response with error code
error status: noSuchName
index 1 (OID: 1.3.6.1.2.1.1.9.1.4.1)
SNMPv1_Session (remote host: "10.0.0.6" [10.0.0.6].161)
community: "sg300"
request ID: 401871976
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at C:/mrtg-2.16.4/bin\..\lib\mrtg2/SNMP_util.pm line 744
SNMP Error:
Received SNMP response with error code
error status: noSuchName
index 1 (OID: 1.3.6.1.2.1.2.2.1.1)
SNMPv1_Session (remote host: "10.0.0.6" [10.0.0.6].161)
community: "sg300"
request ID: 401871982
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at C:/mrtg-2.16.4/bin\..\lib\mrtg2/SNMP_util.pm line 629
SNMPWALK Problem for 1.3.6.1.2.1.2.2.1.1 on sg300@10.0.0.6::::::v4only
at cfgmaker line 193
SNMP Error:
Received SNMP response with error code
error status: noSuchName
index 1 (OID: 1.3.6.1.2.1.2.2.1.3)
SNMPv1_Session (remote host: "10.0.0.6" [10.0.0.6].161)
community: "sg300"
request ID: 401871983
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at C:/mrtg-2.16.4/bin\..\lib\mrtg2/SNMP_util.pm line 629
09-10-2014 05:56 AM
That looks like you don't have the IF-MIB enabled.
To enable another OID:
Click on SNMP in left naviation
Highlight Views
Click Add and select from the list. OR do user defined.
Make sure you save when complete.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: