思科交换机IOS配置管理命令
继续研究思科交换机,手头一个项目涉及到思科交换机的应用,以前从来没有关注过这方面的内容,网上的内容基本上都是英文的,只好一点点啃英语啦,那个痛苦别提了~
下面介绍下思科交换机的操作系统(IOS=Internetworking Operating System)的基本命令以及如何利用tftp上传下载配置文件,有了这些功能,基本上能手头项目的应用了^_^。
- pwd 打印当前目录路径(用过linux的同学应该熟悉)
- cd 切换目录
- dir [dir_name] [options] 显示目录内容 options = all 显示子目录内容
- copy 结合tftp备份IOS以及配置文件
- erase 删除配置文件(慎用!)
使用dir命令:
CA_AR1#dir Directory of flash:/ 2 -rwx 109 Mar 01 1993 08:01:56 +08:00 info 3 -rwx 269 Jan 01 1970 08:01:40 +08:00 env_vars 5 -rwx 2174 Mar 01 1993 08:15:17 +08:00 config.text 6 -rwx 5 Mar 01 1993 08:15:17 +08:00 private-config.text 7 -rwx 3081999 Mar 01 1993 08:03:36 +08:00 c2950-i6q4l2-mz.121-22.EA1.bin 8 drwx 2688 Mar 01 1993 08:05:46 +08:00 html 90 -rwx 109 Mar 01 1993 08:05:47 +08:00 info.ver 91 -rwx 5 Mar 07 1993 03:08:36 +08:00 private-config.text.renamed 7741440 bytes total (1229824 bytes free)
备份配置文件:
CA_AR1#copy running-config tftp Address or name of remote host []? 172.31.39.169 Destination filename [ca_ar1-confg]? !! 2174 bytes copied in 1.084 secs (2006 bytes/sec)
导入配置
SW3550#copy tftp startup-config Address or name of remote host []? 172.31.39.169 Source filename []? sw2950back Destination filename [startup-config]? Accessing tftp://192.168.1.107/sw2950back... Loading sw2950back from 172.31.39.169 (via Vlan1): ! [OK - 2356 bytes] [OK] 2356 bytes copied in 9.196 secs (256 bytes/sec)
tftp软件需要在本地安装,即把本机当成一个ftp服务器,使用的软件是Cisco TFTP server,网上直接搜索就可以找到了~