Hi Folks, I'm trying to setup a looking glass server, and not having much luck with Quagga and lg. Does anyone have any suggestions of newer/better software to use (all the lg type software I can find seems to be from 2000-2005, all depressingly old and lacking spiffy web-2.0 ness), or tips to get lg to work correctly when talking to Quagga? At the moment when I run the "sh ip bgp regexp ^" or similar commands with large output from lg web interface, it seems to initiate the telnet connection, run the command, get part-way through receiving the output and lock up, eventually timing out. Doing a tcpdump on the connection, I see the output stop part-way through, and then after lg times out it tries to send the quit command. When I telnet to Quagga directly, and run the command, it runs perfectly fine. Also as part of this I've noticed that "service terminal-length" option described in Quagga docs doesn't seem to exist in the Debian Squeeze version of Quagga - not sure if that's the case or not for the original version - anyone have any clues here? Cheers, Blair
Hi Blair, On 2011-12-18 23:28 , Blair Harrison wrote:
I'm trying to setup a looking glass server, and not having much luck with Quagga and lg. [.... on Debian Squeeze ....] At the moment when I run the "sh ip bgp regexp ^" or similar commands with large output from lg web interface, it seems to initiate the telnet connection, run the command, get part-way through receiving the output and lock up, eventually timing out.
I've found in the past that Debian compile their Quagga with flags that cause the output to be paginated (through "less" IIRC, but possibly through "default-pager" which is a symlink to your choice), and when I needed to automate it, I had to explicitly override that setting in the runtime environment, eg: TCL/Expect: set env(VTYSH_PAGER) /bin/cat Bourne Shell: VTYSH_PAGER=/bin/cat; export VTYSH_PAER I'm not sure how your lg web interface is connecting in to Quagga, but possibly it is running across something similar? Particularly if "part way through" equals either a typical page length (eg, 25 lines) or your terminal page length (eg, my terminal windows are normally 50-60 lines long). There may now be a non-environment-variable way of setting that at run time and/or forcing the pager setting not to be used. In the past I've also found "TERM=tty; export TERM" and similar to be useful for automated remote control; ssh/telnet/etc all contain hooks to try to pass the terminal type across the connection. (Mikrotiks need yet more special hacks to sanely control with, eg, expect. But fortunately they've documented these on their Wiki in the last couple of years.) Ewen
Hi Ewen,
On Mon, Dec 19, 2011 at 8:16 AM, Ewen McNeill
Hi Blair,
I've found in the past that Debian compile their Quagga with flags that cause the output to be paginated (through "less" IIRC, but possibly through "default-pager" which is a symlink to your choice), and when I needed to automate it, I had to explicitly override that setting in the runtime environment, eg:
TCL/Expect: set env(VTYSH_PAGER) /bin/cat Bourne Shell: VTYSH_PAGER=/bin/cat; export VTYSH_PAER
Thanks, that works great for the command line using vtysh, but I think the problem I'm having is unrelated to the pager - the lg script is talking to Quagga over telnet with Net::Telnet and this doesn't seem to suffer from the paging problem. I've made a bit more progress today - there were some regex for waiting for the prompt to return which weren't matching my prompt, so fixed that up. Now it's working OK for small amounts of output, but larger amounts of output just seem to return nothing, I think this is possibly further regex related to how the lg script is processing the output, so might need some changes there too. Might end up rewriting this from scratch myself at this rate :) Cheers Blair
participants (2)
-
Blair Harrison
-
Ewen McNeill