[rancid] RANCID Router Login

Lee ler762 at gmail.com
Sat Oct 14 20:57:35 UTC 2017


On 10/12/17, heasley <heas at shrubbery.net> wrote:
> Thu, Oct 12, 2017 at 07:47:10PM +0000, Munoz-Persinger, Axel @ CSG - CSE:
>> Hello,
>>
>> Our organization uses RANCID for gathering data from our Cisco routers,
>> but we recently faced an issue with a change we're trying to make.
>>
>> We simply want to change what the address that the scripts use to log into
>> the routers. Let's say in the routers.db file we have:
>> Router1:cisco:up
>> Router2:cisco:up
>> Router3:cisco:up
>>
>> We'd like to change it to:
>> Router1.XYZ:cisco:up
>> Router2.XYZ:cisco:up
>> Router3.XYZ:cisco:up
>>
>>
>> We didn't want to change the actual router names in the routers.db file,
>> since this would most likely have other side effects like modifying the
>> CVS. We tried changing clogin:750(ish) from
>> if {[login $router $ruser $userpswd $passwd $enapasswd $cmethod
>> $cyphertype]} {
>>
>> to
>> if {[login $router.XYZ $ruser $userpswd $passwd $enapasswd $cmethod
>> $cyphertype]} {
>>
>> However, by watching the tcpdump output, we see that it's still reaching
>> out to the original address.
>>
>> Do you have any ideas that could help us?
>
> leave the old name and change the address it resolved to in dns/hostsfile.

+1 for changing the address in dns

if you don't like/can't do that option, add
  search XYZ.l3t.com
in resolv.conf so that the first dns lookup for foo is foo.xyz.l3t.com

see  http://man7.org/linux/man-pages/man5/resolv.conf.5.html
              The search list is normally determined from the local domain
              name; by default, it contains only the local domain name.
              This may be changed by listing the desired domain search path
              following the search keyword with spaces or tabs separating
              the names.

Regards,
Lee



More information about the Rancid-discuss mailing list