基础命令集
- 小凡 GNS3 EVE -ENSP
思科设备上 -IOS
----小凡 : 2001 2002 2003 2004…..路由器端口号
--- 3001 3002 3003 3004 …交换机端口号
----EVE:32759 32770 32771 …..创建设备的端口排序
ENSP:2000 2001 2002 2003
思科 用户模式 特权模式 全局模式 接口模式 协议模式
华为 用户模式 系统模式 接口模式 协议模式
思科设备:
思科:特权模式
show开头
使用问号进行后续查询
使用TAB自动补全 ---针对唯一参数进行补全
简写命令
用户模式:
仅仅能用于查看 查看的信息比较少
进入特权模式:enable 缩写 en
退出 disable 缩写 dis
查看所有的配置信息: show running -config 缩写sh run
查看接口列表:show ip interface brief 缩写 sh ip int br(查看所有接口)
保存配置:write 缩写wr(在特权模式下保存)
查看设备时间:show clock
修改时间:clock set 15:16:00 月份5 日期20 年份2023
进入全局配置模式: configure terminal 缩写 conf t
修改名称:hostname 名称 缩写ho
一级一级退回:exit 简写ex
直接退回到特权模式:end
直接退出登入:logout
直接使用特权模式下的命令:do 加命令
进入接口模式:interface 接口名称 简写int
配置IP地址:ip address 192.168.10.1 255.255.255.0 简写ip add
开启接口:no shutdown(默认关闭)
关闭接口:shutdown
修改时区:clock timezone 名称bj 时区8
console接口(本地连接)/远程登录接口(telnet / ssh)
本地登录配置
进入console口:line console 0
配置密码:password 密码
创建用户组:username 用户名 password 密码
进入console口:line console 0
然后进入console口上配置设置本地用户登录:login local
远程登录配置
指定同时远程能登入的用户数:line vty 0 4
配置密码:password 密码
启动密码查看:login local
配置用户登录前的密码提示符:banner login '要提示的内容'
配置用户登录后的密码提示符:#banner exec '要提示的内容'(只能是英文)
0-16
初始化默认 === 0级别 1级别 15级别
思科看到的用户模式 1级别
默认使用的话 1级别 和 15级别
0级别=====只能访问级
1级别=====不止查看也可以配置
2-15级别====权限级别
启动系统:boot system flash:/设备名
配置创建用户分配权限:username aaa privilege 0(级别号) password aaa密码(默认1级别)
配置给于级别1其他命令权限:#privilege exec level 1 show run
进入远程登录模式下:line vty 0 4
关闭远程登录:transport input none
指定关闭远程的方式:transport input 模式
设置铭文密码:enable secret 密码
配置加密:service password-encryption
特权模式下
删除配置文件:先进入 nvram文件 cd nvram 然后 erase startup-config
创建配置文件:先进入nvram文件 cd nvram 然后 mkdir liu
删除配置文件:delete nvram:startup-config
删除系统:for 或 erase flash:
读取文件:more nvram:startup-config
备份文件:copy flash:
校验和:verify flash:(就是校验MD5)
查看版本号:show version
进入U盘启动项:cd usbflash0
把系统存入U盘内:copy usbflash0:/设备名
远程登入:telnet 输入对端接口ip地址
华为设备:
DIsplay开头
使用问号进行后续查询
使用TAB自动补全 ---针对唯一参数进行补全
进入系统模式 system-view 缩写sys
退出 quit 缩写qu
查看所有的配置信息:display current -configuration 缩写dis cur
查看接口列表:display ip interface brief 缩写 dis ip int br (只能显示三层接口)
display interface brief 缩写dis int br(查看所有接口)
保存配置:save 缩写sa(在用户模式下保存)
修改名称:sysname 名称
一级一级退回:quit 缩写q
直接退回到用户模式:return
直接退出登入:quit 缩写q 快捷键 Ctrl键+]
进入接口模式:interface 接口名称
配置IP地址:ip address 192.168.10.1/24 或者 255.255.255.0 缩写 ip add
关闭接口:shutdown
开启接口:undo shutdown(接口默认开启)
查看设备时间:display clock(在用户模式下)
修改时区:clock timezone 名称bj add时区8(在用户模式下)
修改时间:clock datetime 小时:分:钟:秒15:16:00 月份5 日期20 年份2023 (在用户模式下)
进入control口:user-interface console 0
设置密码:set authentication password cipher 密码
进入认证授权:aaa
创建用户组:local -user 名称 password cipher 密码
然后退出认证模式q
进入controle口 user-interface console 0
进入console口上配置设置本地用户登录:authentication-mode aaa
配置指定同时远程能登入的用户数:user-interface vty 0 4
使用本地用户登录:authentication-mode aaa
使用本地密码:authentication-mode password 密码
配置用户登录前密码的提示符:header login '要提示的内容'
配置用户登录后的密码提示符:header shell '要提示的内容'(只能是英文)
进入远程登录配置模式下:user-interface vty 0 4
设置级别:user privilege level 0
进入远程登录模式下:user-interface vty 0 4
关闭远程登录:protocol inbound all
undo authentication-mode
删除配置文件:delete vrpcfg.zip
华为设备上 -VRP
启动步骤:加电自检 - 加载系统 - 远行配置
- 设备升级USB接口,FTP/TFTP,Console口进行升级,如何破解密码
- 数据封装解封转发过程 + IP地址讲解