[rancid] Cisco Banner Issue

Alan McKinnon alan.mckinnon at gmail.com
Mon Mar 31 21:20:47 UTC 2014


On 31/03/2014 22:34, Alex DEKKER wrote:
> On 31/03/14 04:57, heasley wrote:
>> develop a process to wait to see if
>> anything follows the # or >, which has its own set of pitfalls.
> 
> I [sitting in my armchair, not being the developer] think this idea has
> some mileage. Would it be unreasonable to wait n seconds after a # to
> determine that it's a prompt? Obviously if you do this then you'd have
> to add a knob to tweak for those who are taking backups over satellite
> links &c.
> 
> Perhaps you could be a bit cleverer - if a router is delivering 20
> lines/sec of output, then you'll know within 0.5sec if it's finished,
> although some seem to always be slow when delivering certain sections of
> config. Pitfalls indeed!


There have been many good suggestions on dealing with prompts, and all
of them are quite workable when the prompt behaves as it should. Some
solutions are tweaked for specific hardware but they still work within
that definition.

The downfall however is this thing called real life, it seldom does what
it should. I've lost count of the number of bizarre behaviours I see in
real life around prompts: here's a common one our entire team has given
up on and learned to just live with:

^C^C^C^<hostname> #^C^C^C

What on earth is 0x03 doing in there? I really have no idea, but I have
to deal with it, and with similar junk. Eventually I had to get
pragmatic and issue a decree from on high that the first > and # will
indicate the prompt. I'm lucky in that I can get away with this, other
sites are not so lucky.

All in all I believe John's stance is the correct one for the supported
shipped versions of *login. However a case can be made for hosting a few
patchsets that modify prompt detection and clearly document the
requirements that must be in place to use them properly. Admins can then
use these at their discretion.

-- 
Alan McKinnon
alan.mckinnon at gmail.com



More information about the Rancid-discuss mailing list