思科、华为、H3C常用命令对比大全

  • 格式:docx
  • 大小:38.48 KB
  • 文档页数:27

下载文档原格式

  / 27
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

思科、华为、H3C常用命令对比大全

思科、华为、H3C这些网络设备的命令还是挺多的,不过我们一般用的路由交换机设备都是最简单的了,先学基本命令,再学其他功能命令。路由命令是最基本的命令了。思科、华为、H3C常用命令对比大全

cisco常用命令解释

视图模式介绍:

普通视图 router>

特权视图 router# /在普通模式下输入enable

全局视图 router(config)# /在特权模式下输入config t

接口视图 router(config-if)# /在全局模式下输入int 接口名称例如int s0或int e0

路由协议视图 router(config-route)# /在全局模式下输入router 动态路由协议名称

1、基本配置:

router>enable /进入特权模式

router#conf t /进入全局配置模式

router(config)#hostname xxx /设置设备名称就好像给我们的计算机起个名字

router(config)#enable password /设置特权口令

router(config)#no ip domain-lookup /不允许路由器缺省使用DNS解析命令

router(config)#line console 0 /进入控制口的服务模式

router(config-line)#password xxx /要设置console的密码

router(config-line)#login /使能可以登陆

router(config-line)#logging synchronous /日志同步

router(config-line)#exec-timeout 0 0 /设置时间溢出为0 router(config-line)#line vty 0 4 /进入设置telnet服务模式router(config-line)#password xxx /设置telnet的密码

router(config-line)#login /使能可以登陆

router(config-line)#exit /保存退出到特权模式

router(config)# Service password-encrypt /对所有在路由器上输入的口令进行暗文加密

2、接口配置:

router(config)#interface serial0 /进入接口配置模式 serial 0 端口配置(如果是模块化的路由器前面加上槽位编号,例如serial0/0 代表这个路由器的0槽位上的第一个接口)

router(config-if)#ip address xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx /添加ip 地址和掩码

router(config-if)#enca hdl/ppp 捆绑链路协议 hdlc 或者ppp 思科缺省串口封装的链路层协议是HDLC所以在show run配置的时候接口上的配置没有,如果要封装为别的链路层协议例如PPP/FR/X25就是看到接口下的enca ppp或者enca fr

router(config)#int loopback /建立环回口(逻辑接口)模拟不同的本机网段

router(config-if)#ip add xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx /添加ip 地址和掩码给环回口

router(config-if)#no shutdown /在物理接口上配置了ip地址后用no shut启用这个物理接口反之可以用shutdown管理性的关闭接口

3、路由配置:

(1)静态路由

router(config)#ip route xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx 下一条或自己的接口

router(config)#ip route 0.0.0.0 0.0.0.0 s 0 添加缺省路由

(2)动态路由

rip协议

router(config)#router rip /启动rip协议

router(config-router)#network xxx.xxx.xxx.xxx /宣告自己的网段

router(config-router)#version 2 转换为rip 2版本

router(config-router)#no auto-summary /关闭自动汇总功能,rip V2才有作用

router(config-router)# passive-int 接口名 /启动本路由器的那个接口为被动接口

router(config-router)# nei xxx.xxx.xxx.xxx /广播转单播报文,指定邻居的接ip

igrp协议

router(config)#router igrp xxx /启动igrp协议

router(config-router)#network xxx.xxx.xxx.xxx /宣告自己的网段

router(config-router)#variance xxx /调整倍数因子,使用不等价的负载均衡

eigrp协议

router(config)router eigrp xxx /启动协议

router(config-router)#network xxx.xxx.xxx.xxx /宣告自己的网段

router(config-router)#variance xxx /调整倍数因子,使用不等价的负载均衡

router(config-router)#no auto-summary /关闭自动汇总功能

ospf协议

router(config)router ospf xxx /启动协议启动一个OSPF 协议进程