Hello,
Is there any chance to get LG to work with MTK. Cisco, Juniper, Zebra,… are already supported…
BR…
Hello,
Is there any chance to get LG to work with MTK. Cisco, Juniper, Zebra,… are already supported…
BR…
LG telnets into the router and gets BGP data. You can write LG code to telnet into Mikrotik routers too, or use API.
If i know how to write a code, I wouldn’t ask for help over here…
OK. I’m willing to write a converter… should be trivial for me to do it via the API.
Can anyone direct me to the LG protocol’s spec? A sample client? A google search doesn’t exactly help, due to the generic-ness of the phrase “looking glass”, and additional qualifiers like “software” and “client” aren’t really helpful either.
@blue how are you using this Looking Glass thing-y anyway?
You can find several projects over the net
php lg
http://www.phplg.com/
bgplg tools from here
http://www.bgp4.as/tools
few more
http://www.sourcecodeonline.com/details/looking_glass.html
http://freecode.com/projects/lg
None of these seem to define how LG is supposed to work… they’re all clients for the protocol, narrowed to specific use cases. Especially PHPLG, which is just a bridge to RANCID, which in turn doesn’t support MikroTik, and doesn’t seem to have any integration hooks (i.e. the server is expected to do the translation; which is OK, except it doesn’t help in this case).
What separates LG from a plain telnet/SSH connection? I’d assume the protocol defines some common commands (BGP related ones, plus common tools like Ping and Traceroute) that servers (which will most often be at the router) are then supposed to translate to whatever the router command is, correct? But the question is where are those definitions? Plus, is LG actually a data format transmitted over telnet/SSH, or is it a full fledged socket protocol, ala telnet/SSH itself?
My friend is using LG from http://wiki.version6.net/LG with his Cisco based network, and You can test it on http://lg.version6.net/
Keeping my fingers crossed for someone to get it up and working…
So… Looking Glass itself is actually not a protocol, but a Perl script?
This kind’a complicates things… I can make a pull request to the Git repo so that this Perl script’s next version will have support for MikroTik’s “ping” and “trace” commands, but BGP will be a little more difficult, as MikroTik doesn’t work like how other supported routers do.
Which commands do you actually need anyway? I mean, even the currently supported routers don’t seem to have full support for all commands. Will ping and trace suffice?
Yes, it is not a protocol it simply executes command on the router and prints the output mainly.
You will need to show specific bgp peer info
/routing bgp peer print status
To show specific routes
/ip route print where
Api should be preferred to execute commands and get the output.
Let’s see how it goes…
Side note: mrz has a point… this whole script… with all routers, not just MikroTik… is sort of a security liability, because you can very trivially escape out of a command, and make the router do whatever your router user is capable of doing; API is the surest way to prevent that. Currently, the only protection “lg” has is a regex, which is somewhat troubling.