[rancid] Cisco Banner Issue

Alan McKinnon alan.mckinnon at gmail.com
Thu Mar 20 09:59:48 UTC 2014


On 20/03/2014 11:27, Hans Mueller wrote:
> Hi,
> 
> I'm trying to migrate my rancid installation from one box to another.
> Everything seems to work fine but there are login problems on some
> routers (about 10 %). The problems seems to be the "motd banner". If i
> try to login to these routers the login looks like this (the banner is
> orginal, without any changes):
> -------------------------------------------------------------
> rancid at rancid(~)$ clogin g546.abcd.domain.net
> g546.abcd.domain.net
> spawn telnet g546.abcd.domain.net
> Trying 172.24.999.999...
> Connected to g546.abcd.domain.net.
> Escape character is '^]'.
> CC
> **********************************************************
> *                                                        *
> *                                                        *
> *     Routername: g546.abcd.domain.net                   *
> *                                                        *
> *     Kunde: Hans Mueller                                *
> *            Standort                                    *
> *            Strasse 81                                  *
> *            12345 Ortschaft                             *
> *                                                        *
> *                                                        *
> *     Ansprechpartner: Frau Mueller                      *
> *     Telefon: +49-1234-234-678                          *
> *                                                        *
> *     Kundennummer:   12436                              *
> *     Auftragsnummer: XY#763743                          *
                          ^
                          |
                          |

Remove this character.

There's no easy way around this. clogin relies on a specific text
pattern to detect the exact prompt used by the router cli. It needs this
to know where one command starts and the next ends in the full output,
and it uses ">" and "#" to do this.

To have rancid (actually any product that works similarly to rancid)
work reliably at all, you must consider those two characters to be
banned in the banner.


I've seen patches around over the years that try work around this but
unfortunately they all seem to deal with specific cases on specific
hardware and won't work universally in the general case.

One possibility is ignore lines containing "#" that also have whitespace
earlier in the line. Those always seem to be banner text and real-life
cli prompts seldom contain whitespace

hth,






> *                                                        *
> *                                                        *
> **********************************************************
> 
> 
> User Access Verification
> 
> Username:
> 
> User Access Verification
> 
> Username:
> %
> User Access Verification
> 
> Username:  timeout expired!Connection closed by foreign host.
> 
> Error: EOF received
> rancid at rancid(~)$
> 
> -------------------------------------------------------------
> 
> If i remove the banner, the login with clogin works fine. But i don't
> want to remove the banner.
> 
> Rancid works fine on my old box but not on the new one.
> 
> Software versions:
> Old debian box:
> Rancid: 2.3.8
> Expect: 5.44.1.15
> 
> New debian box:
> Rancid: 2.3.7
> Expect: 5.45
> 
> Here there any hints to solve this problem.
> 
> Best regards
> 
> Hans
> 
> 
> 
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
> 
> 


-- 
Alan McKinnon
alan.mckinnon at gmail.com



More information about the Rancid-discuss mailing list