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  查看端口
相关推荐
素雨迁喜4 分钟前
Linux平台下git工具的使用
linux·运维·git
bing_feilong42 分钟前
Ubuntu Tips
linux·运维
SeanDe1 小时前
【Linux `top` 命令详解(结合截图逐行拆解)】
linux·运维·服务器
mi20061 小时前
wiki.js知识库系统搭建和配置总结
linux·运维·知识库
桌面运维家1 小时前
Windows/Linux文件访问权限修改指南
linux·运维·服务器
麦芽糖02191 小时前
centos虚拟机忘记密码怎么办
linux·运维·centos
DX_水位流量监测2 小时前
德希科技农村供水工程水质在线监测方案
大数据·运维·网络·水质监测·水质传感器·水质厂家·农村供水水质监测方案
学术小白人2 小时前
EI会议征稿!2026年数字能源与转换技术国际研讨会(DECT 2026)
运维·自动化·能源·rdlink研发家·数字能源
ken22322 小时前
ubuntu 云镜像 2604 的内存和磁盘占用 实测
linux·运维·ubuntu
2401_865382502 小时前
【江苏运维】《省级政务信息化运维经费预算编制规范(试行)》(苏财建〔2022〕142号)-标准解读
运维·政务·信息化项目·标准解读