beautypg.com

Meinberg TCR LANTIME User Manual

Page 84

background image

Examples for the usage of the SNMP configuration features

The following examples are using the software net-snmp, a SNMP open source

project. You will find detailed information at

www.net-snmp.org

!

To browse the configuration branch of the timeserver-MIB, you could use the
following command on a UNIX system with net-snmp SNMP tools installed:

root@testhost

:/# snmpwalk -v2c -c public timeserver.meinberg.de mbgLtCfg

MBG-SNMP-LANTIME-CFG-MIB::mbgLtCfghostname.0 = STRING: LantimeSNMPTest
MBG-SNMP-LANTIME-CFG-MIB::mbgLtCfgDomainname.0 = STRING: py.meinberg.de
MBG-SNMP-LANTIME-CFG-MIB::mbgLtCfgNameserver1.0 = STRING: 172.16.3.1
MBG-SNMP-LANTIME-CFG-MIB::mbgLtCfgNameserver2.0 = STRING:
MBG-SNMP-LANTIME-CFG-MIB::mbgLtCfgSyslogserver1.0 = STRING:
MBG-SNMP-LANTIME-CFG-MIB::mbgLtCfgSyslogserver2.0 = STRING:
[...]

To alter a parameter, with net-snmp you would use the snmpset command:

root@testhost

:/# snmpset -v2c -r 0 -t 10 -c rwsecret timeserver.meinberg.de

mbgLtCfghostname.0 string „helloworld“

MBG-SNMP-LANTIME-CFG-MIB::mbgLtCfghostname.0 = STRING: helloworld

root@testhost

:/#

Please note that your SNMP request has to be sent with a sufficient timeout (in the
above snmpset example this was achieved by using the “-t 10“ option, choosing a
timeout of 10 seconds), because after each parameter change, the timeserver reloads
its configuration, which takes a few seconds. The request is acknowledged by the
SNMP agent afterwards.

To change a group of parameters without reloading the configuration after each
parameter, you have to send all parameter changes in one single request. You can do
this with the net-snmp snmpset command by specifiying multiple parameters in one
command line:

root@testhost

:/# snmpset -v2c -r 0 -t 10 -c rwsecret timeserver.meinberg.de

mbgLtCfghostname.0 string „helloworld“ mbgLtCfgDomainname.0 string
„internal.meinberg.de“

MBG-SNMP-LANTIME-CFG-MIB::mbgLtCfghostname.0 = STRING: helloworld
MBG-SNMP-LANTIME-CFG-MIB::mbgLtCfgDomainname.0 = STRING: internal.meinberg.de

root@testhost

:/#

The available SNMP variables are described in detail in the “SNMP configuration
reference“ part of this manual. Additionally, it is recommended to also read the
mentioned MIB files.

84

This manual is related to the following products: