[rancid] Problem with configs name when using IP instead of DNS in .cloginrc/router.db file

heasley heas at shrubbery.net
Tue Jun 30 18:42:06 UTC 2015


Tue, Jun 30, 2015 at 07:04:03PM +0200, Fredrik Lund:
> Hi,
> 
> I am setting up RANCID and so far so good, but we have a large amount 
> of switches, routers etc in our net.
> So im trying to categorize them, so that it would make sense to search 
> after a backup when we need it.
> 
> I have understood that Expect doesnt support RegEx, so i have to use 
> wildcard(*) loosely. I coudnt figure out glob any how.

man 7 glob

> Lets say i have a naming standard on our nodes something as: 
> node.location.number.domain, is it possible to make clogin do something 
> like: node*.location.number*.domain? Or is it possible to use ip ranges? 
> Something like 10.0.0.1-75 or 10.0.1.0-10.0.2.30
> 
> I could ofcourse just do:
> add user 10.0.* {foo}
> add password 10.0.* {bar}
> add method 10.0.* {foobar}

it does not support ranges like that.  See the manpage for glob.

> And make router.db something like:
> 10.0.4.25;cisco;up
> 10.0.0.39;cisco;up
> 
> But when i run rancid-run and the specific group, the saved ouput under 
> ../../rancid/GROUP/configs will be the IP and NOT the DNS. Is it 
> possible to make RANCID save the config output as the DNS name?

only by using the name in the router.db.  We discussed the idea of having
another router.db field that defined the filename, but have not added this
feature.

> Hope ive made my questions clear.
> Thanks in forward.
> 
> 
> _______________________________________________
> 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