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  查看端口
相关推荐
Brilliantwxx5 小时前
【Linux】IO(上)全篇:文件本质、C 接口、系统调用与文件描述符
linux·运维·服务器·c语言
古法老登瞎折腾5 小时前
大数据智能运维实战(三):实现第一个运维 MCP 工具——查询节点与组件状态
java·大数据·运维·人工智能·spring ai·mcp
fengkai45455 小时前
2、Kubernetes 介绍+安装+卸载
运维·容器·kubernetes
重生之小比特5 小时前
【Linux系统】13 基础IO(上)
linux·运维·服务器
羑悻的小杀马特5 小时前
超越Bridge:全面掌握Docker网络隔离与通信的底层逻辑!
运维·网络·docker·容器
A-刘晨阳6 小时前
Windows硬盘里的媒体太乱?我用WSL+Plex把本地文件整理成一个统一媒体中心
运维·cpolar
古法老登瞎折腾6 小时前
大数据智能运维实战(六):任务一直在等——排查调度队列与执行资源
java·大数据·运维·spring ai·mcp
wtblszn7 小时前
实验室通风设备远程监控运维管理系统方案
运维
众壹新能源科技1 天前
逆变器自带无功不够用,加装5MVar SVG后功率因数从0.85回到0.99
运维·人工智能·自动化
..Dauntless..1 天前
【Linux】一切皆文件和缓冲区
linux·运维·服务器