查看系统信息
华为 display version 思科 show version
进入系统视图
华为 system-view 华为的系统视图 可以配置接口、协议等
思科有三个模式 最低为用户模式
enable 进入特权模式
termianal 进入全局配置模式
修改设备名称
华为 sysname R1 思科 hostname R1
配置登录信息(登录提示语)
华为 header shell information “welcome to haoge's world”
思科 banner motd # welcome to haoge's world # 注意 起始标识符一定要一致
配置console 口参数
华为
user-interface console 0
authentication-mode password
huaweu@123
思科
line console 0
password cisco
login
思科实验环境最常使用的命令
line console 0 进入console 接口
no exec-time 设置连接永不超时
logging synchronous 设置日志同步,避免日志打断输入命令
no ip down lookup 关闭域名解析,避免输入错误命令造成设备解析次命令
配置接口ip地址
华为
interface gigabitethernet0/0/0 进入接口0/0/0
ip add 12.1.1.1 24 添加ip地址 12.1.1.1 子网掩码24位
可选:description this interface connects to R2-G0/0/0 补充命令可以标识此接口连接的是R2
display this 查看配置结果
思科
int ethernet0/0
ip add 12.1.1.1 255.255.255.0(这里不允许简写24,华为可以)添加IP地址
no shutdown 开启端口
思科每次配置完地址有两条命令排错
show ip route 查看路由表
show ip int brief 查看接口IP状态
查看当前设备上存储的文件列表
dir 双厂通用
管理设备配置文件
华为
display saved-configuration 查看保存的配置文件
display current-configuration 查看当前配置信息
display startup 查看下次启动时使用的配置文件
reset saved-configuration删除闪存中配置文件
思科
show running-config查看当前设备配置
write 保存配置
show startup-config 显示设备启动配置
重启设备
华为 reboot 重启路由器、交换机 (执行reboot必须在用户模式下)
思科 reload 重启路由器、交换机 (执行reload必须在用户模式下)