[rancid] -cloginrc ip range

heasley heas at shrubbery.net
Mon Mar 31 00:33:30 UTC 2014


Mon, Mar 24, 2014 at 03:46:31PM +0200, Alan McKinnon:
> There was a very similar question posed about a month back, the poster
> was asking if clogin could use regexes instead of globs for the hostname
> field.

expect glob does support []s, so just be careful about escaping and you can
use a\.b\.c\.\[0-9].

http://my.safaribooksonline.com/book/operating-systems-and-server-administration/unix/9781565920903/glob-patterns-and-other-basics/glob_patterns_and_other_basics

> IIRC one of the replies was a reasonable design about how it could be
> done, you might want to find that in the archives and read further. It
> would mean you'd have to patch and maintain clogin locally.
> 
> 
> On 24/03/2014 15:43, Josten, Michael wrote:
> > Thanks for your answer. I'll put some thoughts into those intelligent settings ;P some address ranges allow the use of wildcards.
> > I already did some testing and it works quite well so far.
> > 
> > 
> > -----Ursprüngliche Nachricht-----
> > Von: rancid-discuss-bounces at shrubbery.net [mailto:rancid-discuss-bounces at shrubbery.net] Im Auftrag von Alan McKinnon
> > Gesendet: Montag, 24. März 2014 13:08
> > An: rancid-discuss at shrubbery.net
> > Betreff: Re: [rancid] -cloginrc ip range
> > 
> > .cloginrc supports the use of globs in the hostname/address field.
> > It's a glob and not a regex, so you are somewhat limited in how you can express ranges. But nonetheless I can prove very useful.
> > 
> > 
> > I can think of two other ways to make your life easier:
> > 
> > - use default settings intelligently and only configure method for those devices that are different.
> > 
> > - consider whether this aspect really needs optimizing or not. My devices across the board take an average of 30 seconds for clogin to login and finish running all commands and rancid runs 30 jobs in parallel. Failed ssh and telnet connections fail in about half a second.
> > When added up the amount of time spent on failed connection attempts is miniscule and not worth bothering about. True, my devices send an explicit reset so I don't have to wait 30 seconds every time because port 23 went to some bit bucket in the sky :-) Not every network is set up like mine though.
> > 
> > On 24/03/2014 10:23, Josten, Michael wrote:
> >> Hello everyone,
> >>
> >>  
> >>
> >> instead of using
> >>
> >>  
> >>
> >> add method * {telnet} {ssh}
> >>
> >>  
> >>
> >> I want to speed up everything by avoiding failed telnet login attempts 
> >> on switches that are accessed via ssh as long as
> >>
> >> We haven't configured every switch to ssh access only.
> >>
> >> I am wondering if there is a way to configure ip address ranges as 
> >> this example looks kinda bloated
> >>
> >>  
> >>
> >> add method x.x.x.1 {ssh:10022}
> >>
> >> add method x.x.x.2 {telnet}
> >>
> >> add method x.x.x.3 {telnet}
> >>
> >> add method x.x.x.4 {telnet}
> >>
> >> add method x.x.x.5 {telnet}
> >>
> >> add method x.x.x.6 {telnet}
> >>
> >> add method x.x.x.8 {ssh:22}
> >>
> >> add method * {telnet} {ssh}
> >>
> >>  
> >>
> >> best regards
> >>
> >> michael
> >>
> >>
> >>
> >> _______________________________________________
> >> Rancid-discuss mailing list
> >> Rancid-discuss at shrubbery.net
> >> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
> >>
> > 
> > 
> > --
> > Alan McKinnon
> > alan.mckinnon at gmail.com
> > 
> > _______________________________________________
> > Rancid-discuss mailing list
> > Rancid-discuss at shrubbery.net
> > http://www.shrubbery.net/mailman/listinfo/rancid-discuss
> > _______________________________________________
> > Rancid-discuss mailing list
> > Rancid-discuss at shrubbery.net
> > http://www.shrubbery.net/mailman/listinfo/rancid-discuss
> > 
> > 
> 
> 
> -- 
> Alan McKinnon
> alan.mckinnon at gmail.com
> 
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss


More information about the Rancid-discuss mailing list