# pkg install ciscoconf # cat /etc/rc.local
... /usr/local/bin/ciscoconfd -t 20 -u root -r /usr/local/bin/ciscoconfr /var/log/cisco.log exit 0
server# tail -f /var/log/cisco.log server# cat /usr/local/share/cisco/router.confg server# rlog /usr/local/share/cisco/router.confg
Примечание:
/usr/local/bin/ciscoconfd -p /var/run/ciscoconfd.pid -s local0 -t 20 -u root -r /usr/local/bin/ciscoconfr /var/log/cisco.log
# apt install mailutils cvs rancid # cd /etc/rancid/
# pkg install rancid # pw useradd rancid -d /usr/local/var/rancid/ # chown rancid:rancid /usr/local/var/rancid/ # cd /usr/local/etc/rancid/ # cp rancid.conf.sample rancid.conf
# cat rancid.conf
... LIST_OF_GROUPS="corpX-nethw"; export LIST_OF_GROUPS ...
# cat /etc/aliases
... rancid-corpX-nethw: userX@isp.un rancid-admin-corpX-nethw: userX@isp.un
# newaliases
# su - rancid linux$ PATH=$PATH:bin freebsd$ PATH=$PATH:/usr/local/libexec/rancid $ rancid-cvs
rancid@server:~$ cat .cloginrc
add password router cisco cisco add user switch user1 add password switch tpassword1 #add password switch rpassword1 cisco add autoenable switch 1 #add user * rancid #add password * gfgt45yfg56uytgdfgsdfar23 #add method * ssh #add autoenable * 1
rancid@server:~$ chmod 600 .cloginrc rancid@server:~$ clogin router rancid@server:~$ clogin switch
rancid@server:~$ cat commands.txt
conf term interface FastEthernet0/0 description connect to ISP2 end wr
rancid@server:~$ clogin -x commands.txt router
rancid@server:~$ cat corpX-nethw/router.db
###linux #router;cisco;up #switch;cisco;up ###freebsd #router:cisco:up #switch:cisco:up
rancid@server:~$ rancid-run rancid@server:~$ cat logs/corpX-nethw.20160913.103438 rancid@server:~$ cat corpX-nethw/configs/router rancid@server:~$ cat corpX-nethw/configs/switch rancid@server:~$ . /etc/rancid/rancid.conf rancid@server:~$ cvs log corpX-nethw/configs/router rancid@server:~$ cvs diff -r1.2 -r1.3 corpX-nethw/configs/router rancid@server:~$ cvs co -r1.17 -p corpX-nethw/configs/router | less rancid@server:~$ crontab -l
0 * * * * /var/lib/rancid/bin/rancid-run