当前位置: 首页 > 图文教程 > 操作系统 > Unix/Linux > Linux 网管 123 --- 第8章. 备份及回存程序 -3.Cisco 路由器组态备

Unix/Linux
linux查看内存的大小
在linux下写的代码,用的是utf-8,结果拿到XP下运行的时候,所有的中文都成乱码
linux su和sudo命令的区别
linux cron 下的定时执行工具使用技巧
linux 查找进程及终止进程操作的相关命令
redhat linux 安装 gcc编译器
Linux Mplayer播放各种格式的电影
一起回顾一下linux常用命令
Linux 网站项目发布要做哪些配置
linux SSH配合SecureCRT的密匙完美使用方法
GD 编译出错解决方法
Facebook Open Platform编译FAQ
Linux 系统硬盘 优化
linux 挂载详解
linux crontab定时命令
Linux 系统中确保访问三级域名畅通的方法
Linux 特权帐号VS普通帐号
确保Linux系统安全的前提条件 漏洞防护
Linux 监视系统资源使用率
Red Hat Linux上使用BIND建立DNS服务器

Unix/Linux 中的 Linux 网管 123 --- 第8章. 备份及回存程序 -3.Cisco 路由器组态备


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-01   浏览: 33 ::
收藏到网摘: n/a

  在我工作的地方,我们透过广域网路连接距离很远的几个地点。这些地方利用 Cisco 路由器透过 ISDN 连接,
或在其他例子, Centrex data circuits 提供 Internet 及 WAN 连结。 Cisco 路由器产品允许网路伺服器透
过 TFTP (“Trivial File Transfer Protocol”) 读写组态档。无论何时当路由器组态变更,在 Linux 伺服器
上储存其组态档很重要,因为这样才能维护备份。 
请注意 Red Hat 预设是 disable TFTP 服务,因为如果组态不正确这可能变成安全上的漏洞。 TFTP daemon 
允许任何人无须进行稽核就可以读写档案。我个人的做法是建立一个 ``/tftpboot/'' 目录,由 root 所拥有,
然後修改位於``/etc/inetd.conf''档已有的组态列,指向该档案位置: 
  tftpd   dgram   udp    wait   root   /usr/sbin/tcpd  in.tftpd  /tftpboot
 


   注意: 在上面那一行末端加上 ``/tftpboot'' 路径,明确地指出允许 TFTP daemon 存取的档案位置。虽然您
   也可以略过这一部份,并且允许  TFTP 存取您系统上任何一部份的档案,既然 TFTP 有安全上的风险,这可
   能是很遭的主意。 

一但您 enable TFTP 服务,别忘了键入: 
  killall -HUP inetd
 

上面的指令重新启动 INETD daemon 以辨认出您在 inetd.conf 档中所做的任何变更。 

要建立路由器组态备份档牵涉到3个步骤的程序 : 设定写入到一个已存在档(或建立一个新的)的许可,写入备份
档,然後重新设定限制存取该档案。下面是一个路由器组态备份的例: 
  mail:~# cd /tftpboot
mail:/tftpboot# chmod a+w xyzrouter-confg
chmod: xyzrouter-confg: No such file or directory
mail:/tftpboot# touch xyzrouter-confg
mail:/tftpboot# chmod a+w loyola-confg
mail:/tftpboot# telnet xyzrouter

Escape character is '^]'.
User Access Verification
Password: ****
xyzrouter> enable
Password: ****
xyzrouter# write network
Remote host []? 123.12.41.41
Name of configuration file to write [xyzrouter-confg]?  
Write file xyzrouter-confg on host 123.12.41.41? [confirm]  
Building configuration...
Writing xyzrouter-confg !! [OK] 
xyzrouter# exit
Connection closed by foreign host.

mail:/tftpboot# chmod a-wr,u+r xyzrouter-confg
mail:/tftpboot# exit
 


当路由器出现失效的情形 (例如因为打雷发生的突波所导致),这些备份档可以帮助重新载入路由器组态,
从组态档恢复牵扯到3个步骤的程序 : 设定既有档案的许可,载入档案,然後重新设定限制存取该档案。下
面是路由器组态恢复的例 
  mail:~# cd /tftpboot
mail:/tftpboot# chmod a+r xyzrouter-confg
mail:/tftpboot# telnet xyzrouter

Escape character is '^]'.
User Access Verification
Password: ****
xyzrouter> enable
Password: ****
xyzrouter# config network
Host or network configuration file [host]?  
Address of remote host [255.255.255.255]? 123.12.41.41
Name of configuration file [xyzrouter-confg]?  
Configure using loyola-confg from 123.12.41.41? [confirm]  
Loading xyzrouter-confg from 123.12.41.41 (via BRI0): !
[OK - 1265/32723 bytes]
xyzrouter# write
xyzrouter# exit
Connection closed by foreign host.
<