-2

I am new to snmp . i want to monintor my Ubuntu machine. I execute this command (found on the web ):

snmpget -v 1 -c "community" localhost .1.3.6.1.4.1.2021.10.1.3.1

i wonder what is it the -c parameter (didnt success to figure it out from the man).

In the man they explain with this example:

snmpget -c public

that it will retrieve ... using the community string public , what is the meaning of community?

Thank you

Avihai Marchiano
  • 612
  • 3
  • 16
  • 32

2 Answers2

3

The SNMP community string is used by SNMPv1 and SNMPv2c compatible devices as a very basic form of authentication. The community string is sent as part of the SNMP request. If it matches the configuration setting for the device, then the device responds. If it doesn't ehn the device ignores the request.

user9517
  • 115,471
  • 20
  • 215
  • 297
  • so what is the difference between -c public to -c community? if its auth , so why i have 2 auth? – Avihai Marchiano Aug 23 '12 at 08:11
  • 1
    @user1495181: They are just different strings that a device may or may not be configured to respond to. They may also be configured to allow different access to the device e.g. ReadOnly or ReadWrite etc. As Khaled says you probably need to sit down with some overview documentation to get an understanding of the concepts. – user9517 Aug 23 '12 at 08:20
2

The community string is used for authentication. You can think of it as a password between the agent and manager even it is sent as clear-text as in SNMPv1. I think you need to read more about SNMP protocol before using it.

Khaled
  • 36,533
  • 8
  • 72
  • 99