1a7398723SShteryana Shopova.\" 2a7398723SShteryana Shopova.\" Copyright (c) 2010 The FreeBSD Foundation 3a7398723SShteryana Shopova.\" All rights reserved. 4a7398723SShteryana Shopova.\" 5a7398723SShteryana Shopova.\" Portions of this documentation were written by Shteryana Sotirova Shopova 6a7398723SShteryana Shopova.\" under sponsorship from the FreeBSD Foundation. 7a7398723SShteryana Shopova.\" 8a7398723SShteryana Shopova.\" Copyright (c) 2005-2007 The FreeBSD Project. 9a7398723SShteryana Shopova.\" All rights reserved. 10a7398723SShteryana Shopova.\" 11a7398723SShteryana Shopova.\" Author: Shteryana Shopova <syrinx@FreeBSD.org> 12a7398723SShteryana Shopova.\" 13a7398723SShteryana Shopova.\" Redistribution and use in source and binary forms, with or without 14a7398723SShteryana Shopova.\" modification, are permitted provided that the following conditions 15a7398723SShteryana Shopova.\" are met: 16a7398723SShteryana Shopova.\" 1. Redistributions of source code must retain the above copyright 17a7398723SShteryana Shopova.\" notice, this list of conditions and the following disclaimer. 18a7398723SShteryana Shopova.\" 2. Redistributions in binary form must reproduce the above copyright 19a7398723SShteryana Shopova.\" notice, this list of conditions and the following disclaimer in the 20a7398723SShteryana Shopova.\" documentation and/or other materials provided with the distribution. 21a7398723SShteryana Shopova.\" 22a7398723SShteryana Shopova.\" THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND 23a7398723SShteryana Shopova.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24a7398723SShteryana Shopova.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25a7398723SShteryana Shopova.\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE 26a7398723SShteryana Shopova.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27a7398723SShteryana Shopova.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28a7398723SShteryana Shopova.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29a7398723SShteryana Shopova.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30a7398723SShteryana Shopova.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31a7398723SShteryana Shopova.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32a7398723SShteryana Shopova.\" SUCH DAMAGE. 33a7398723SShteryana Shopova.\" 34a7398723SShteryana Shopova.\" $FreeBSD$ 35a7398723SShteryana Shopova.\" 36a7398723SShteryana Shopova.Dd September 17, 2007 37a7398723SShteryana Shopova.Dt BSNMPGET 1 38a7398723SShteryana Shopova.Os 39a7398723SShteryana Shopova.Sh NAME 40a7398723SShteryana Shopova.Nm bsnmpget , 41a7398723SShteryana Shopova.Nm bsnmpwalk , 42a7398723SShteryana Shopova.Nm bsnmpset 43a7398723SShteryana Shopova.Nd "simple tools for querying SNMP agents" 44a7398723SShteryana Shopova.Sh SYNOPSIS 45a7398723SShteryana Shopova.Nm 46a7398723SShteryana Shopova.Op Fl aDdehnK 47a7398723SShteryana Shopova.Op Fl A Ar options 48a7398723SShteryana Shopova.Op Fl b Ar buffersize 49a7398723SShteryana Shopova.Op Fl C Ar options 50a7398723SShteryana Shopova.Op Fl I Ar options 51a7398723SShteryana Shopova.Op Fl i Ar filelist 52a7398723SShteryana Shopova.Op Fl l Ar filename 53a7398723SShteryana Shopova.Op Fl M Ar max-repetitions 54a7398723SShteryana Shopova.Op Fl N Ar non-repeaters 55a7398723SShteryana Shopova.Op Fl o Ar output 56a7398723SShteryana Shopova.Op Fl P Ar options 57a7398723SShteryana Shopova.Op Fl p Ar pdu 58a7398723SShteryana Shopova.Op Fl r Ar retries 59a7398723SShteryana Shopova.Op Fl s Ar [trans::][community@][server][:port] 60a7398723SShteryana Shopova.Op Fl t Ar timeout 61a7398723SShteryana Shopova.Op Fl U Ar options 62a7398723SShteryana Shopova.Op Fl v Ar version 63a7398723SShteryana Shopova.Op Ar OID ... 64a7398723SShteryana Shopova.Pp 65a7398723SShteryana Shopova.Nm bsnmpwalk 66a7398723SShteryana Shopova.Op Fl dhnK 67a7398723SShteryana Shopova.Op Fl A Ar options 68a7398723SShteryana Shopova.Op Fl b Ar buffersize 69a7398723SShteryana Shopova.Op Fl C Ar options 70a7398723SShteryana Shopova.Op Fl I Ar options 71a7398723SShteryana Shopova.Op Fl i Ar filelist 72a7398723SShteryana Shopova.Op Fl l Ar filename 73a7398723SShteryana Shopova.Op Fl o Ar output 74a7398723SShteryana Shopova.Op Fl P Ar options 75a7398723SShteryana Shopova.Op Fl r Ar retries 76a7398723SShteryana Shopova.Op Fl s Ar [trans::][community@][server][:port] 77a7398723SShteryana Shopova.Op Fl t Ar timeout 78a7398723SShteryana Shopova.Op Fl U Ar options 79a7398723SShteryana Shopova.Op Fl v Ar version 80a7398723SShteryana Shopova.Op Ar OID ... 81a7398723SShteryana Shopova.Pp 82a7398723SShteryana Shopova.Nm bsnmpset 83a7398723SShteryana Shopova.Op Fl adehnK 84a7398723SShteryana Shopova.Op Fl A Ar options 85a7398723SShteryana Shopova.Op Fl b Ar buffersize 86a7398723SShteryana Shopova.Op Fl C Ar options 87a7398723SShteryana Shopova.Op Fl I Ar options 88a7398723SShteryana Shopova.Op Fl i Ar filelist 89a7398723SShteryana Shopova.Op Fl l Ar filename 90a7398723SShteryana Shopova.Op Fl o Ar output 91a7398723SShteryana Shopova.Op Fl P Ar options 92a7398723SShteryana Shopova.Op Fl r Ar retries 93a7398723SShteryana Shopova.Op Fl s Ar [trans::][community@][server][:port] 94a7398723SShteryana Shopova.Op Fl t Ar timeout 95a7398723SShteryana Shopova.Op Fl U Ar options 96a7398723SShteryana Shopova.Op Fl v Ar version 97a7398723SShteryana Shopova.Ar OID Ns = Ar syntax Ns : Ns Ar value 98a7398723SShteryana Shopova.Op Ar OID Ns = Ar syntax Ns : Ns Ar value ... 99a7398723SShteryana Shopova.Sh DESCRIPTION 100a7398723SShteryana Shopova.Nm , 101a7398723SShteryana Shopova.Nm bsnmpwalk 102a7398723SShteryana Shopovaand 103a7398723SShteryana Shopova.Nm bsnmpset 104a7398723SShteryana Shopovaare simple tools for retrieving management information from and setting 105*3df5ecacSUlrich Spörleinmanagement information to a Simple Network Management Protocol (SNMP) agent. 106a7398723SShteryana Shopova.Pp 107a7398723SShteryana ShopovaDepending on the options 108a7398723SShteryana Shopova.Nm bsnmpget 109a7398723SShteryana Shopovaconstructs either a SMNP GetRequest, GetNextRequest 110a7398723SShteryana Shopovaor a GetBulkRequest packet, fills in the object identifiers (OIDs) of the 111a7398723SShteryana Shopovaobjects whose values will be retrived, waits for a response and prints it if 112a7398723SShteryana Shopovareceived successfully. 113a7398723SShteryana Shopova.Pp 114a7398723SShteryana Shopova.Nm Bsnmpwalk 115a7398723SShteryana Shopovaqueries an agent with SMNP GetNextRequest packets, 116a7398723SShteryana Shopovaasking for values of OID instances that are a part of the object subtree 117a7398723SShteryana Shopovarooted at the provided OIDs. 118a7398723SShteryana Shopova.Pp 119a7398723SShteryana Shopova.Nm Bsnmpset 120a7398723SShteryana Shopovaconstructs a SMNP SetRequest packet, fills in the OIDs (object identifiers), 121a7398723SShteryana Shopovasyntaxes and values of the objects whose values are to be set and waits for a 122*3df5ecacSUlrich Spörleinresponse from server. 123a7398723SShteryana Shopova.Sh OPTIONS 124a7398723SShteryana Shopova.Pp 125a7398723SShteryana ShopovaThe options are as follows (not all apply to all three programs): 126a7398723SShteryana Shopova.Bl -tag -width ".It Fl D Ar options" 127a7398723SShteryana Shopova.It Fl A Ar options 128a7398723SShteryana ShopovaAuthentication options to use with SNMPv3 PDUs 129f0720ed5SUlrich Spörlein.Bl -tag -width \& 130a7398723SShteryana Shopova.It Cm proto=[md5|sha] 131a7398723SShteryana ShopovaThe protocol to use when calculating the PDU message digest. 132a7398723SShteryana Shopova.It Cm key=authkey 133a7398723SShteryana ShopovaA binary localized authentication key to use when calculating the PDU message 134a7398723SShteryana Shopovadigest. 135a7398723SShteryana Shopova.El 136a7398723SShteryana Shopova.Pp 137a7398723SShteryana ShopovaBy default SNMPv3 PDUs are sent unauthenticated. 138a7398723SShteryana Shopova.It Fl a 139a7398723SShteryana ShopovaSkip any sanity checks when adding OIDs to a Protocol Data Unit (PDU): 140a7398723SShteryana Shopovaingore syntax/access type, allow adding of non-leaf objects for GetPdu and 141a7398723SShteryana Shopovaread-only objects to a SetPDU. 142a7398723SShteryana Shopova.It Fl b Ar buffersize 143a7398723SShteryana ShopovaTune the size of buffers used to send and receive packets. 144a7398723SShteryana ShopovaThe default size is 10000 bytes which should be enough unless an agent sends 145a7398723SShteryana Shopovaa really large octetstring. 146a7398723SShteryana ShopovaThe maximum allowed length is 65535 according to the Structure of Management 147a7398723SShteryana ShopovaInformation (SMIv2). 148a7398723SShteryana Shopova.It Fl C Ar options 149a7398723SShteryana ShopovaThe context to query with SNMPv3 PDUs. 150f0720ed5SUlrich Spörlein.Bl -tag -width \& 151a7398723SShteryana Shopova.It Cm context=name 152a7398723SShteryana ShopovaThe context name. Default is "" (empty). 153a7398723SShteryana Shopova.It Cm context-engine=engine-id 154a7398723SShteryana ShopovaThe SNMP Engine ID of the context to query with SNMPv3 PDUs, represented as 155a7398723SShteryana Shopovabinary octet string. By default, this is set to the Engine ID of the SNMP agent. 156a7398723SShteryana Shopova.El 157a7398723SShteryana Shopova.It Fl D 158a7398723SShteryana ShopovaPerform SNMP USM Engine Discovery, rather than sending a request for the value 159a7398723SShteryana Shopovaof a specific object. 160a7398723SShteryana Shopova.It Fl d 161a7398723SShteryana ShopovaTurn on debugging. 162a7398723SShteryana ShopovaThis option will cause the packets sent and received to be dumped to the 163a7398723SShteryana Shopovaterminal. 164a7398723SShteryana Shopova.It Fl e 165a7398723SShteryana ShopovaRetry on error. 166a7398723SShteryana ShopovaIf an error is returned in the response PDU, resend the request removing the 167a7398723SShteryana Shopovavariable that caused the error until a valid response is received. 168*3df5ecacSUlrich SpörleinThis is only useful for a GetRequest- and a GetNextRequest-PDU. 169a7398723SShteryana Shopova.It Fl h 170a7398723SShteryana ShopovaPrint a short help text with default values for various options. 171a7398723SShteryana Shopova.It Fl I Ar options 172a7398723SShteryana ShopovaLoad each MIB description file from the given list to translate symbolic 173a7398723SShteryana Shopovaobject names to their numerical representation and vice versa. 174a7398723SShteryana ShopovaUse the other options to obtain a non-default behaviour: 175f0720ed5SUlrich Spörlein.Bl -tag -width \& 176a7398723SShteryana Shopova.It Cm cut=OID 177a7398723SShteryana ShopovaSpecifies the initial OID that was cut by 178a7398723SShteryana Shopova.Xr gensnmpdef 1 179a7398723SShteryana Shopovawhen producing the MIB description file. 180a7398723SShteryana ShopovaThe default value is .iso(1).org(3).dod(6) which is what should have been 181f0720ed5SUlrich Spörleinused for all the files installed under /usr/share/snmp/defs. 182f0720ed5SUlrich SpörleinUse this only if you generated your own files, providing a 183f0720ed5SUlrich Spörlein.Fl c 184f0720ed5SUlrich Spörleinoption to 185a7398723SShteryana Shopova.Xr gensnmpdef 1 . 186a7398723SShteryana Shopova.It Cm path=filedir 187a7398723SShteryana ShopovaThe directory where files in the list will be searched. 188a7398723SShteryana ShopovaThe default is 189f0720ed5SUlrich Spörlein.Pa /usr/share/snmp/defs Ns . 190a7398723SShteryana Shopova.It Cm file=filelist 191a7398723SShteryana ShopovaA comma separated list of files to which the two options above will apply. 192a7398723SShteryana Shopova.El 193a7398723SShteryana Shopova.Pp 194a7398723SShteryana ShopovaThe file suboption has to come after the other suboptions so that their 195a7398723SShteryana Shopovanon-default values will be applied to the list of files. 196a7398723SShteryana ShopovaThe order of the other suboptions before each file suboption can be random. 197a7398723SShteryana ShopovaSuboptions may be separated either by commas or by spaces. 198a7398723SShteryana ShopovaIf using spaces make sure the entire option string is one argument, for 199a7398723SShteryana Shopovaexample using quotes. 200a7398723SShteryana Shopova.It Fl i Ar filelist 201a7398723SShteryana ShopovaList of MIB description files produced by 202a7398723SShteryana Shopova.Xr gensnmpdef 1 which 203a7398723SShteryana Shopova.Nm bsnmpget , 204a7398723SShteryana Shopova.Nm bsnmpwalk 205a7398723SShteryana Shopovaor 206a7398723SShteryana Shopova.Nm bsnmpset 207a7398723SShteryana Shopovawill search to translate numerical OIDs to their symbolic object names. 208a7398723SShteryana ShopovaMultiple files can be provided either giving this option multiple times 209a7398723SShteryana Shopovaor a comma separated list of file names. 210a7398723SShteryana ShopovaIf a filename begins with a letter the default directory, 211f0720ed5SUlrich Spörlein/usr/share/snmp/defs, 212a7398723SShteryana Shopovawill be searched. 213a7398723SShteryana Shopova.It Fl K 214a7398723SShteryana ShopovaCalculate and display the localized authentication and privacy keys 215a7398723SShteryana Shopovacorresponding to a plain text password. The password is obtain via the 216a7398723SShteryana Shopovaenvironment. Additionally, if one or more OIDs are specified, the calculated 217a7398723SShteryana Shopovakeys are used when processing the SNMPv3 requests. 218a7398723SShteryana Shopova.It Fl l Ar filename 219a7398723SShteryana ShopovaThe path of the posix local (unix domain) socket if local 220a7398723SShteryana Shopovatransport is used. 221a7398723SShteryana Shopova.It Fl M Ar max-repetitions 222a7398723SShteryana ShopovaThe value for the max-repetitions field in a GetBulk PDU. 223a7398723SShteryana ShopovaDefault is 1. 224a7398723SShteryana Shopova.It Fl N Ar non-repeaters 225a7398723SShteryana ShopovaThe value for the non-repeaters field in a GetBulk PDU. 226a7398723SShteryana ShopovaDefault is 0. 227a7398723SShteryana Shopova.It Fl n 228a7398723SShteryana ShopovaOnly use numerical representations for input and output OIDs and do not 229a7398723SShteryana Shopovatry to resolve symbolic object names. 230a7398723SShteryana ShopovaNote that 231a7398723SShteryana Shopova.Nm bsnmpget , 232a7398723SShteryana Shopova.Nm bsnmpwalk 233a7398723SShteryana Shopovaand 234a7398723SShteryana Shopova.Nm bsnmpset 235a7398723SShteryana Shopovawill print numerical OIDs anyway if the corresponding string representation 236a7398723SShteryana Shopovais not found in the MIB description files. 237a7398723SShteryana Shopova.It Fl o Ar [quiet|short|verbose] 238a7398723SShteryana ShopovaThe format used to print the received response. 239a7398723SShteryana ShopovaQuiet only prints values, short (default) prints an abbreviated OID 240a7398723SShteryana Shopovarepresentation and the value. 241a7398723SShteryana ShopovaIn addition to the short output verbose prints the type before the value. 242a7398723SShteryana Shopova.It Fl P Ar options 243a7398723SShteryana ShopovaPrivacy options to use with SNMPv3 PDUs 244f0720ed5SUlrich Spörlein.Bl -tag -width \& 245a7398723SShteryana Shopova.It Cm proto=[aes|des] 246a7398723SShteryana ShopovaThe protocol to use when encypting/decrypting SNMPv3 PDU data. 247a7398723SShteryana Shopova.It Cm key=privkey 248a7398723SShteryana ShopovaA binary localized privacy key to use when encypting/decrypting SNMPv3 PDU data. 249a7398723SShteryana Shopova.El 250a7398723SShteryana Shopova.Pp 251a7398723SShteryana ShopovaBy default plain text SNMPv3 PDUs are sent. 252a7398723SShteryana Shopova.It Fl p Ar [get|getnext|getbulk] 253a7398723SShteryana ShopovaThe PDU type to send by 254a7398723SShteryana Shopova.Nm bsmpget . 255a7398723SShteryana ShopovaDefault is get. 256a7398723SShteryana Shopova.It Fl r Ar retries 257a7398723SShteryana ShopovaNumber of resends of request packets before giving up if the agent does 258a7398723SShteryana Shopovanot respond after the first try. 259a7398723SShteryana ShopovaDefault is 3. 260a7398723SShteryana Shopova.It Fl s Ar [trans::] Ns Ar [community@] Ns Ar [server] Ns Ar [:port] 261a7398723SShteryana ShopovaEach of the server specification components is optional but at least one 262f0720ed5SUlrich Spörleinhas to be provided if 263f0720ed5SUlrich Spörlein.Ar s 264f0720ed5SUlrich Spörleinoption is used. 265a7398723SShteryana ShopovaThe server specification is constructed in the following manner: 266f0720ed5SUlrich Spörlein.Bl -tag -width \& 267a7398723SShteryana Shopova.It Cm trans:: 268a7398723SShteryana ShopovaTransport type may be one of udp, stream or dgram. 269a7398723SShteryana ShopovaIf this option is not provided an udp inet/inet6 socket will be used, which 270a7398723SShteryana Shopovais the most common. 271a7398723SShteryana ShopovaStream stands for a posix local stream socket and a posix local datagram 272a7398723SShteryana Shopovasocket will be used if dgram is specified. 273a7398723SShteryana Shopova.It Cm community@ 274a7398723SShteryana ShopovaSpecify an SNMP community string to be used when sending packets. 275a7398723SShteryana ShopovaIf the option is skipped the default "public" will be used for 276a7398723SShteryana Shopova.Nm 277a7398723SShteryana Shopovaand 278a7398723SShteryana Shopova.Nm bsnmpwalk 279a7398723SShteryana Shopovaand the default "private" community string will be used for 280a7398723SShteryana Shopova.Nm bsnmpset . 281a7398723SShteryana Shopova.It Cm server 282a7398723SShteryana ShopovaThis might be either the IP address or the hostname where the agent is 283a7398723SShteryana Shopovalistening. 284f0720ed5SUlrich SpörleinThe default is 285f0720ed5SUlrich Spörlein.Qq localhost . 286a7398723SShteryana Shopova.It Cm port 287a7398723SShteryana ShopovaThe destination port to send the requests to. 288a7398723SShteryana ShopovaThis is useful if the SNMP agent listens on a non-default port. 289f0720ed5SUlrich SpörleinDefault is given by the 290f0720ed5SUlrich Spörlein.Qq snmp 291f0720ed5SUlrich Spörleinentry in 292f0720ed5SUlrich Spörlein.Pa /etc/services , 293f0720ed5SUlrich Spörleinport 161. 294a7398723SShteryana Shopova.El 295a7398723SShteryana Shopova.It Fl t Ar timeout 296a7398723SShteryana ShopovaNumber of seconds before resending a request packet if the agent does 297a7398723SShteryana Shopovanot respond. 298a7398723SShteryana ShopovaThe default value is 3 seconds. 299a7398723SShteryana Shopova.It Fl U Ar options 300a7398723SShteryana ShopovaUser credentials when sending SNMPv3 PDUs. 301f0720ed5SUlrich Spörlein.Bl -tag -width \& 302a7398723SShteryana Shopova.It Cm engine=id 303a7398723SShteryana ShopovaThe Engine ID of the SNMP agent represented as a binary octet string. 304a7398723SShteryana Shopova.It Cm engine-boots=value 305a7398723SShteryana ShopovaThe value of the snmpEngineBoots of the SNMP agent. 306a7398723SShteryana Shopova.It Cm engine-time=value 307a7398723SShteryana ShopovaThe value of the snmpEngineTime of the SNMP agent. 308a7398723SShteryana Shopova.Pp 309a7398723SShteryana ShopovaIf any of the above is not specified, SNMP USM Engine Discovery is attempted. 310a7398723SShteryana ShopovaThis is also the default behavior. 311a7398723SShteryana Shopova.It Cm name=username 312a7398723SShteryana ShopovaThe USM user name to include in the SNMPv3 PDUs. By default, the user name is 313a7398723SShteryana Shopovaobtain via the environment 314a7398723SShteryana Shopova.El 315a7398723SShteryana Shopova.It Fl v Ar version 316a7398723SShteryana ShopovaThe SNMP protocol version to use when sending requests. SNMP versions 1, 2 and 317a7398723SShteryana Shopova3 are supported. 318a7398723SShteryana ShopovaIf no version option is provided 319a7398723SShteryana Shopova.Nm bsnmpget , 320a7398723SShteryana Shopova.Nm bsnmpwalk 321a7398723SShteryana Shopovaand 322a7398723SShteryana Shopova.Nm bsnmpset 323a7398723SShteryana Shopovawill use version 2. 324a7398723SShteryana ShopovaNote that GetBulkRequest-PDUs were introduced in SNMPv2 thus setting the 325a7398723SShteryana Shopovaversion to 1 is incompatiable with sending a GetBulk PDU. 326a7398723SShteryana Shopova.It OID 327a7398723SShteryana ShopovaThe object identifier whose value to retrive. 328a7398723SShteryana ShopovaAt least one OID should be provided for 329a7398723SShteryana Shopova.Nm bsnmpget 330a7398723SShteryana Shopovato be able to send a request. 331a7398723SShteryana Shopova.Pp 332a7398723SShteryana ShopovaFor 333a7398723SShteryana Shopova.Nm bsnmpwalk 334a7398723SShteryana Shopovathis is the root object identifier of the subtree whose values are to be 335a7398723SShteryana Shopovaretrived. 336a7398723SShteryana ShopovaIf no OID is provided 337a7398723SShteryana Shopova.Nm bsnmpwalk 338a7398723SShteryana Shopovawill walk the mib2 subtree rooted 339a7398723SShteryana Shopovaat .iso(1).org(3).dod(6).internet(1).mgmt(2).mib2(1) . 340a7398723SShteryana Shopova.Pp 341a7398723SShteryana ShopovaAny of the formats used to print a single variable 342a7398723SShteryana Shopovais valid as input OID: 343f0720ed5SUlrich Spörlein.Bl -tag -width \& 344a7398723SShteryana Shopova.It 1.3.6.1.2.1.25.1.1.0 345a7398723SShteryana Shopova.It sysDescr 346a7398723SShteryana Shopova.It ifPhysAddress.1 347a7398723SShteryana Shopova.It ifRcvAddressStatus.2.6.255.255.255.255.255.255 348a7398723SShteryana Shopova.It ifRcvAddressType[2,ff:ff:ff:ff:ff:ff] 349a7398723SShteryana Shopova.It ifRcvAddressStatus[Integer:1,OctetString:ff:ff:ff:ff:ff:ff] 350f0720ed5SUlrich Spörlein(requires 351f0720ed5SUlrich Spörlein.Fl o Ar verbose 352f0720ed5SUlrich Spörleinoption) 353a7398723SShteryana Shopova.El 354a7398723SShteryana Shopova.Pp 355a7398723SShteryana ShopovaSquare brackets are used to denote an entry's indexes. 356a7398723SShteryana ShopovaWhen used in an input OID, the square brackets may have to be 357a7398723SShteryana Shopovaescaped or the OID has to be quoted to protect it from the shell. 358a7398723SShteryana ShopovaNote there is no difference between ifName.1 and "ifName[1]". 359a7398723SShteryana Shopova.It OID Ns = Ns Ar [syntax Ns :] Ns Ar value 360a7398723SShteryana ShopovaThe object identifier with its syntax type and value that is to be set. 361a7398723SShteryana ShopovaAt least one such string OID=[syntax:]value should be provided to 362a7398723SShteryana Shopova.Nm bsnmpset 363a7398723SShteryana Shopovato be able to send a request. 364f0720ed5SUlrich Spörlein.Bl -tag -width \& 365a7398723SShteryana Shopova.It Cm OID 366a7398723SShteryana ShopovaOID may be input as a string, a string followed by a random number of integers 367a7398723SShteryana Shopova(suboids) separated by dots, a sequence of integers separated by dots - that is 368f0720ed5SUlrich Spörleinif 369f0720ed5SUlrich Spörlein.Ar n 370f0720ed5SUlrich Spörleinoptions is used - and in such case a syntax is required for every value, 371a7398723SShteryana Shopovaor a string followed by square brackets (used to denote an entry's indexes) and 372a7398723SShteryana Shopovacorresponding indexes. 373a7398723SShteryana ShopovaAny of formats used to print a single variable by 374a7398723SShteryana Shopova.Nm bsnmpset is 375a7398723SShteryana Shopovavalid for inpit OID as well: 376f0720ed5SUlrich Spörlein.Bl -tag -width \& 377a7398723SShteryana Shopova.It 1.3.6.1.2.1.25.1.1.0=TimeTicks:537615486 378f0720ed5SUlrich Spörlein.It sysLocation=OctetString:"@ Home" (with Fl o Ar verbose No option) 379a7398723SShteryana Shopova.It sysLocation.0="@ Home" 380a7398723SShteryana Shopova.It 1.3.6.1.2.1.2.2.1.6.1=OctetString:ffffffffffff 381a7398723SShteryana Shopova.It ifPhysAddress.1="00:02:b3:1d:1c:a3" 382a7398723SShteryana Shopova.It ifRcvAddressStatus.1.6.255.255.255.255.255.255=1 383a7398723SShteryana Shopova.It "ifRcvAddressStatus[Integer:1,OctetString:ff:ff:ff:ff:ff:ff]=Integer:1" 384f0720ed5SUlrich Spörlein(with 385f0720ed5SUlrich Spörlein.Fl o Ar verbose 386f0720ed5SUlrich Spörleinoption) 387a7398723SShteryana Shopova.El 388a7398723SShteryana Shopova.It Cm syntax 389a7398723SShteryana Shopovawhere syntax string is one of: 390a7398723SShteryana ShopovaInteger, OctetString, OID, IpAddress, Counter32, Gauge, TimeTicks, Counter64. 391a7398723SShteryana Shopova.It Cm value 392a7398723SShteryana ShopovaThe value to be set - IP address in form of u.u.u.u - for example 393a7398723SShteryana Shopova1.3.1.6.1.2.0=IpAddress:192.168.0.1, strings require inverted-commas if they 394a7398723SShteryana Shopovacontain any special characters or spaces, all other numeric types don't. 395a7398723SShteryana Shopova.El 396f0720ed5SUlrich Spörlein.El 397a7398723SShteryana Shopova.Sh ENVIRONMENT 398a7398723SShteryana Shopova.Nm , 399a7398723SShteryana Shopova.Nm bsnmpwalk 400a7398723SShteryana Shopovaand 401a7398723SShteryana Shopova.Nm bsnmpset 402a7398723SShteryana Shopovause the following environment variables: 403a7398723SShteryana Shopova.Bl -tag -width SNMPAUTH 404a7398723SShteryana Shopova.It Ev SNMPAUTH 405a7398723SShteryana ShopovaSpecifies a default SNMP USM authentication protocol. 406a7398723SShteryana Shopova.It Ev SNMPPRIV 407a7398723SShteryana ShopovaSpecifies a default SNMP USM privacy protocol. 408a7398723SShteryana Shopova.It Ev SNMPUSER 409a7398723SShteryana ShopovaSpecifies a default SNMP USM user name. 410a7398723SShteryana Shopova.It Ev SNMPPASSWD 411a7398723SShteryana ShopovaSpecifies the SNMP USM plain text password to use when calculating localized 412a7398723SShteryana Shopovaauthentication and privacy keys. If this variable exists in the environment, 413a7398723SShteryana ShopovaSMNPv3 is the default version to use for outgoing requests. 414f0720ed5SUlrich Spörlein.El 415a7398723SShteryana Shopova.Sh SEE ALSO 416a7398723SShteryana Shopova.Xr gensnmpdef 1 417a7398723SShteryana Shopova.Sh AUTHORS 418a7398723SShteryana Shopova.An Shteryana Shopova Aq syrinx@FreeBSD.org 419