For more complete documentation : http://doc.vthink.web.id/yii/index.html
http://vthink.web.id/index.php/content/categories/21
Download extension MikroTik RouterOS Mikrotik_OS.tar.bz2 and extract in to /protected/extensions: http://www.yiiframework.com/extension/routeros/files/Mikrotik_OS.tar.bz2
'params'=>array( 'email' => 'vthinkteam@gmail.com', 'Mikrotik' => array( 'address' => '192.168.88.1', 'port' => '8728', 'username' => 'admin', 'password' => 'admin', ), ),
'import'=>array( 'application.models.*', 'application.components.*', 'application.extensions.routeros.*', )
This Extensions has a Interface Class that can access other class for specific interact with Mikrotik RouterOS Interface. The other classes are Interface Bonding, Interface EOIP, Interface Ethernet, Interface IPIP, Interface PPPOE Client, Interface PPPOE Server, Interface VLAN, and Interface VRRP. Each class can be invoked through the interface classes with method in Mikrotik Api main classes.
Mrs::interfaces();
This Extension has a Interface Class that can access other class for specific interact with Mikrotik RouterOS Interface. The other classes are IP Accounting, IP Address, IP ARP, IP DHCP-Client, IP DHCP-Relay, IP DHCP-Server, IP DNS, IP Firewall, IP Hotspot, IP Pool, IP Route, and IP Service. Each class can be invoked through the interface classes with method in mikrotik_api main classes.
Mrs::ip();
This Extension has a Interface Class that can access other class for specific interact with Mikrotik RouterOS Interface. The other classes are ppp aaa, ppp active, ppp profile, and ppp secret. Each class can be invoked through the interface classes with method in mikrotik_api main classes.
Mrs::ppp();
This Extension has a Interface Class that can access other class for specific interact with Mikrotik RouterOS Interface. The other classes are ppp aaa, ppp active, ppp profile, and ppp secret. Each class can be invoked through the interface classes with method in mikrotik_api main classes.
Mrs::system();
This Extensions has a File Class that can interact with Mikrotik RouterOS File.
Mrs::file();
we provide for the development of one class, for third party development.
Mrs::talker();
public function getAll(){ $talk = Mrs::talker(); // $talk->setDebug(TRUE); $sentence = new SentenceUtil(); $sentence->fromCommand("/ip/address/getall"); $talk->send($sentence); $rs = $talk->getResult(); while ($rs->next()){ echo $rs->getResult("interface")."\t|\t"; echo $rs->getResult("address")."\t|\t"; echo $rs->getResult("network")."\t|\t"; echo $rs->getResult("broadcast")."\t|\t"; echo "<br>"; } }
ether1 | 172.100.10.10/24 | 172.100.10.0 | 172.100.10.255 | ether2 | 172.110.0.100/24 | 172.110.0.0 | 172.110.0.255 | ether3 | 172.30.0.100/24 | 172.30.0.0 | 172.30.0.255 | ether4 | 192.168.88.1/24 | 192.168.88.0 | 192.168.88.255 | ether5 | 192.168.10.1/24 | 192.168.10.0 | 192.168.10.255 |
Total 4 comments
How to add snmp community string with this extension???
yes you can use this extension. to interact with Mikrotik RouterOS. if there are bugs in this class. please provide suggestions for development. development concept taken from site mikrotik itself. and heppy coding.
http://en.wikipedia.org/wiki/MikroTik MikroTik produces wireless routers which carries a Linux based OS called RouterOS. You can talk to a router like that using this Yii extension. That's basically it. :)
Leave a comment
Please login to leave your comment.