Discussion:
[rancid] Problem with configs name when using IP instead of DNS in .cloginrc/router.db file
Fredrik Lund
2015-06-30 17:04:03 UTC
Permalink
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.

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}

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?

Hope ive made my questions clear.
Thanks in forward.
heasley
2015-06-30 18:42:06 UTC
Permalink
Post by 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
Post by Fredrik Lund
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
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.
Post by Fredrik Lund
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.
Post by Fredrik Lund
Hope ive made my questions clear.
Thanks in forward.
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Loading...