Cisco常用基础配置及命令

管理配置文件

配置文件分类

  • running-config: 当前正在运行的使用的配置文件,存在RAM中,如果不保存的话,设备重启会丢失
  • start-up-config: 启动设备时候使用的配置文件,存储在NVRAM或FLASH中,掉电以后不会丢失

保存running-config

方式一

使用write命令,在调试配置完成后需要保存配置文件

sh 复制代码
Router#write
Building configuration...
[OK]

方式二

使用copy命令

sh 复制代码
Router#copy running-config sta
Router#copy running-config startup-config
Destination filename [startup-config]? 
Building configuration...
[OK]

删除启动配置文件

sh 复制代码
Router#erase startup-config 
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
[OK]
Erase of nvram: complete

给以太网接口配置ip

进入接口

sh 复制代码
Router(config)#interface ethernet 0/0

为接口配置ip地址

sh 复制代码
Router(config-if)#ip address 192.168.0.100 255.255.255.0

激活接口

Cisco设备接口默认是shutdown状态

sh 复制代码
Router(config-if)#no shutdown 

为serial口配置IP

sh 复制代码
Router(config)#interface serial 1/0
Router(config-if)#ip address 192.168.3.6 255.255.255.0
Router(config-if)#no shutdown

配置时钟信号

在DCE端配置时钟信号,一般是运营商一端,也根据线缆来配置,连接serial口所使用的线缆上面两头标注了DCE和DTE

sh 复制代码
clock rate 64000

查看接口

sh 复制代码
Router(config-if)#do show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
Ethernet0/0                192.168.0.100   YES manual up                    up      
Ethernet0/1                unassigned      YES unset  administratively down down    
Ethernet0/2                unassigned      YES unset  administratively down down    
Ethernet0/3                unassigned      YES unset  administratively down down    
Serial1/0                  unassigned      YES unset  administratively down down    
Serial1/1                  unassigned      YES unset  administratively down down    
Serial1/2                  unassigned      YES unset  administratively down down    
Serial1/3                  unassigned      YES unset  administratively down down  

show 命令

sh 复制代码
show ?
show version       查看当前操作系统版本
show running-config   查看运行配置
show startup-config   查看启动配置

show memory  查看内存使用情况
show interfaces  查看端口
相关推荐
哟哟耶耶24 分钟前
js-fetch流式实现中断重连
运维·服务器
爱凤的小光32 分钟前
Linux清理磁盘技巧---个人笔记
linux·运维
字节数据平台3 小时前
刚刚,火山引擎多模态数据湖解决方案发布大数据运维Agent
大数据·运维·火山引擎
原神启动13 小时前
Docker 场景化作业:生产环境容器操作实训
运维·docker·容器
云老大TG:@yunlaoda3603 小时前
如何通过华为云国际站代理商CSBS进行备份策略设置?
运维·数据库·华为云
zly35004 小时前
linux查看正在运行的nginx的当前工作目录(webroot)
linux·运维·nginx
QT 小鲜肉4 小时前
【Linux命令大全】001.文件管理之file命令(实操篇)
linux·运维·前端·网络·chrome·笔记
呼啦啦呼啦啦啦啦啦啦5 小时前
docker制作镜像的两种方式(保姆级教学)
运维·docker·容器
问道飞鱼5 小时前
【Linux知识】Linux 虚拟机磁盘扩缩容操作指南(按文件系统分类)
linux·运维·服务器·磁盘扩缩容
风雨飘逸6 小时前
【shell&bash进阶系列】(二十一)向脚本传递参数(shift和getopts)
linux·运维·服务器·经验分享·bash