But what a lack of attention mine, had not realized it. I love you boy, thanks for helping. I spent about 3 days trying to solve this problem. Now I'm going to continue my project.
Thanks for answering. The code looks like this: use PEAR2\Net\RouterOS; require_once( dirname( __FILE__ ) . "/PEAR2_Net_RouterOS-1.0.0b6/src/PEAR2/Autoload.php" ); $client = new RouterOS\Client( '177.xx.xx.x', 'user', 'pass' ); //How to inform the port? $snmpRequest = new RouterOS\Request(...
Using ssh (putty.exe), I type the command snmpget 10.9.8.7 -v1 -c public 1.3.6.1.2.1.2.2.1.6.1 And the result is iso.3.6.1.2.1.2.2.1.6.1 = Hex-STRING: 58 10 8C 0D 8B 00 However, when I type the command /tool snmp-get address=10.9.8.7 community=public version=1 oid=1.3.6.1.2.1.2.2.1.6.1 on the winbox...
In the winbox, in the new terminal, I type: tool snmp-get address=10.9.8.7 community=public version=1 oid=1.2.840.10036.3.1.2.1.3.6 and I have the return: OID TYPE VALUE 1.2.840.10036.3.1.2.1.3.6 octet-string NanoStation2 Using the mikrotik API, how can I do the same thing? Any idea? $API = new Rout...
This code below works, but the other one does not. $API->write('/ip/dhcp-server/lease/print', false); $API->write('~active-address~"1.1."'); $ARRAY = $API->read(); $API->disconnect(); What is the basic syntax for SNMP commands via API? I use the command below, but something is certainly mi...