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  查看端口
相关推荐
mmsx33 分钟前
使用git生成ssh的ed25519密钥
运维·git·ssh
ZeroNews内网穿透1 小时前
服装零售企业跨区域运营难题破解方案
java·大数据·运维·服务器·数据库·tcp/ip·零售
果子⌂1 小时前
容器技术入门之Docker环境部署
linux·运维·docker
神的孩子都在歌唱2 小时前
常见的网络攻击方式及防御措施
运维·服务器·网络
深度学习04072 小时前
【Linux服务器】-安装ftp与sftp服务
linux·运维·服务器
小白爱电脑4 小时前
什么是2.5G交换机?
运维·网络·5g·千兆宽带
?ccc?4 小时前
容器技术技术入门与 Docker 环境部署
运维·docker·容器
时时刻刻看着自己的心4 小时前
docker启动报错
运维·docker·容器
我科绝伦(Huanhuan Zhou)5 小时前
华为泰山服务器重启后出现 XFS 文件系统磁盘“不识别”(无法挂载或访问),但挂载点目录仍在且无数据
运维·服务器·华为
匆匆那年9675 小时前
Docker容器中安装MongoDB,导入数据
运维·docker·容器