Cisco

Cisco 设备常用命令

Cisco 设备常用命令

更换设备名称

Route(config)#hostname Cisco
Cisco(config)#

配置 IP 地址

Route#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Route(config)#int vlan 1
Route(config-if)#ip address 192.168.1.1 255.255.255.0   //配置IP地址和掩码
Route(config-if)#no shutdown
Route(config-if)#exit
Route(config)#ip default-gateway 192.168.1.254   //配置网关

配置特权模式密码

Route#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Route(config)#enable password cisco123
Route(config)#exit

设置明文密码加密

Route#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Route(config)#service password-encryption   //打开加密服务
Route(config)#exit

关闭密码保护

Route#no enable password   //删除特权模式密码
Route#no enable secret    //删除密码加密

配置 Telnet 远程登录

Route#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Route(config)#line vty 0 4   //表示vty0到vty4,共5个虚拟终端
Route(config-line)#password cisco   //配置密码
Route(config-line)#login   //开启允许远程访问
Route(config-line)#exit

备注:只有一个虚拟终端的话,就只能等待连接中的用户断开连接,等待的那个人才能再连接。
共5个虚拟终端,代表支持五个用户同时连接。多余用户继续等待!

配置 Console 连接配置密码

Route#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Route(config)#line console 0
Route(config-line)#password cisco   //配置密码
Route(config-line)#login
Route(config-line)#exit
本文为原创文章,著作权归作者所有:来自「KOBIN 技术随笔」作者的原创作品,转载请标明出处。
Cisco 设备常用命令
https://blog.kobin.cn/blog/network/n0/537.html
(1)

评论功能升级维护公告

为响应国家网络信息安全合规要求,并进行全面的安全策略升级,本站自即日起暂时关闭博客的评论功能。

在此期间,您将无法发表新的评论,但仍可正常浏览所有历史文章及现有评论。如果您遇到问题需要协助,可以选择在线留言,或者发送邮件到 chen@kobin.cn 。

对于给您带来的不便,深表歉意。感谢您的理解与支持!

KOBIN 技术随笔
2025 年 8 月 26 日