| ||
|
| Linux首页 | Linux论坛 | 论坛精华 | 开源新闻 | 技术文章 | 专题专栏 | 新手指南 | 迁移方案 | 产品方案 | 开源项目 | 开源图书 | 软件下载 | 人才招聘 | Linux博客 |
| 您的位置:
Linux时代 > 新闻资讯 >
使用RANCID备份你的网络
A couple of years ago, my employer, a large state university, was looking for an open source replacement for CiscoWorks to assist us in backing up our network configurations. We found RANCID (Really Awesome New Cisco config Differ), tried it, and have used it ever since. RANCID, which its developers say is released under a BSD-like license, will check your network device configurations and back them up if changes have been made. It keeps a history of changes using either Concurrent Version System (CVS) or Subversion. RANCID is written in Perl and Expect. It supports Cisco routers, switches, and firewalls, Juniper routers, Foundry switches, Redback network-attached storage, Alteon and Hewlett-Packard ProCurve switches, and other devices. RANCID is a useful tool not only for backing up device configs, but also for troubleshooting network problems, because it lets you determine what changes were made since the last revision. Before installing, you should scan the README file that is included with the package. It contains a quick installation guide that will help in configuring RANCID. Installing RANCID is straightforward. If you are running FreeBSD, RANCID can be found in the ports under /usr/ports/net/rancid; running After installing, add an unprivileged user that RANCID can run its scripts as -- "rancid," for instance. You also need to give that user privileges to run scripts in the directory that RANCID was installed in, with a command like Next, you need to modify the LIST_OF_GROUPS variable in the rancid.conf file, which defines the groups that you will classify your devices into. For example, your LIST_OF_GROUPS variable might be defined as The next step is to put a copy of the .cloginrc file in the home directory of the user that RANCID will run as. This file tells RANCID how to log in to the devices that are to be backed up. The syntax is pretty straightforward and there are examples in the cloginrc.sample file in the /usr/local/rancid/share/rancid/ directory. After setting up your .cloginrc file, make sure that you change the permissions on the file so that is not readable or writable by other users, with a command like If you would like to be emailed a report about the configuration differences when a change has been made to a device config, or notification of error messages, modify your /etc/aliases file. RANCID will send reports to rancid-group@domain_name and errors to rancid-admin-group@domain_name, where group is the group you defined in the rancid.conf file. Next, you should run Now you should be ready to actually test RANCID. Run
Once you are able to run rancid-run without receiving errors in your logs, you should add a crontab entry for RANCID is particular regarding device prompts, especially on Cisco Catalyst switches. The Catalyst OS does not include a ">" in its prompt, and that character is something RANCID looks for. If you have any CatOS switches, you will need to add a ">" after its prompt in order for RANCID to be able to log in and fetch the config. You can do this easily by issuing a One file that has helped us in troubleshooting our RANCID configuration is $rancid_home/bin/clogin. If you notice login errors in your RANCID logs, trying running this file to log in to your switch or router. The syntax is easy: A useful package to run alongside RANCID is CVSweb. CVSweb is a CGI script that allows you to view your CVS repository using a Web browser. Our switch technicians use CVSweb to copy and paste device configs directly from a browser into a text editor, so they don't have to worry about knowing any CVS commands. You can also browse each file's revisions and even see and highlight the differences between each revision. As helpful a tool as it is, RANCID is fairly hands-on to configure and requires someone to manage the list of devices to be backed up. In addition, it helps if you have a working knowledge of CVS. For these reasons, RANCID may not be a viable solution for everyone. For us, however, the benefits outweigh the costs and the minor inconveniences. On more than one occasion, RANCID has gotten us out of a tight spot. 原文链接:http://www.newsforge.com/article.pl?sid=06/07/20/1950259 本文被浏览次
| |||||||||||
| 关于我们 | 联系方式 | 广告合作 | 诚聘英才 | 网站地图 | 免费注册 |
Copyright © 2001-2006 ChinaUnix.net All Rights Reserved 感谢所有关心和支持过ChinaUnix的朋友们 |