Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

snmp configuration for SG300

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

13 REPLIES
Cisco Employee

Have you attempted an

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.

New Member

Yeah, the snmp walk failed:

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

New Member

Ok, so I just defined 2 new

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

 

 

Cisco Employee

Interesting. I've got a spare

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.

New Member

It's good to have extra toys!

It's good to have extra toys! :)  Much appreciated.

 

--Ben

Cisco Employee

Agreed Jonathan was correct,

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.

 

  1. Switch is starting at factory reset configuration state
  2. Login to the switch
    1. Default ip 192.168.1.254
    2. Username: cisco
    3. Password: cisco
  3. Change Password
  4. Expand SNMP Section on bottom of left navigation
    1. Highlight communities on the expanded SNMP section
    2. Click the Add button
      1. Enter the IP address of the system that will be making SNMP requests to your switch
      2. Community string: mrtg (or whatever you want to use)
      3. Ensure Read Only is selected for your access mode
      4. Click Apply
      5. Click Close
  5. Expand the Security Section on the left navigation bar
    1. Highlight TCP/UDP Services
    2. Click the Checkbox to enable SNMP Service at the top of the screen
    3. Click Apply
  6. In the top right hand corner you should see a flashing save button, make sure to save your config if your happy with it.
  7. “Snmpwalk –c mrtg 192.168.1.254” Should now run and return

 

***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

New Member

Unfortunately am out of time;

Unfortunately am out of time; will have to pick this up this evening. 

 

--Ben

New Member

Good evening.Had to track

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:

Community Table
SNMP Management StationCommunity TypeCommunity StringAccess ModeView NameGroup Name
AllBasicsg300Read Onlymrtgsys 
10.0.1.100BasicsgtestRead Onlymrtgif 

 

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

New Member

Hi,Apparently one of the

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

New Member

Ok, am now on current

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

New Member

Hi Ben, Check on the switch

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

New Member

Hi Jonathan,That was indeed

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

 

Cisco Employee

That looks like you don't

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.

 

 

 

3463
Views
0
Helpful
13
Replies