华拓科技网
您的当前位置:首页华为常用命令大全

华为常用命令大全

来源:华拓科技网
华为路由常用命令大全

命 令

display ip statisticsdisp process cpudis ip routing-table

dis cur

display current-configuration

注 释

查看CPU使用频率

DIS IP路由表(DIS IP ROU)分布曲线显示当前配置显示接口显示路由信息显示版本信息修改用户密码交换机命名进入接口试图进入接口试图配置VLAN的IP地址静态路由=网关三层交换支持本地用户FTP进入虚拟终端设置口令模式

设置口令(simple简单的)

用户级别(当用户远程登陆时,其默认级别为不做任何设置,3为最高级别,可以作修改)进入端口模式进入端口模式

配置端口工作状态(端口聚合时是全双工,而CISCO的为半双工)配置端口工作速率配置端口流控配置端口平接扭接设置端口工作模式

当前端口加入到VLAN设置trunk允许的VLAN设置trunk端口的PVID激活端口关闭端口返回

创建VLAN在VLAN中增加端口简写方式在VLAN中增加端口简写方式指定VLAN描述字符删除VLAN描述字符查看VLAN配置

设置生成树,默认是关闭(思科是打开的)设置交换机的优先级设置为根或根的备份设置交换机端口的花费

1,

(dis ip rou

display interfacesdisplay vlan alldisplay versionsuper passwordsysname

interface ethernet 0/1interface vlan x

ip address 10.65.1.1 255.255.0.0route-static 0.0.0.0 0.0.0.0 10.65.1.2]rip

local-user ftp

user-interface vty 0 4

authentication-mode passwordset authentication-mode passwordsimple 222ser privilege level 3

interface ethernet 0/1

int e0/1

duplex {half|full|auto}

speed {10|100|auto}flow-control

mdi {across|auto|normal}

port link-type {trunk|access|hybrid}port access vlan 3

port trunk permit vlan {ID|All}port trunk pvid vlan 3undo shutdownshutdownquitvlan 3

port ethernet 0/1port e0/1

port ethernet 0/1 to ethernet 0/4port e0/1 to e0/4description stringdescription

display vlan [vlan_id]stp {enable|disable}stp priority 4096

stp root {primary|secondary}stp cost 200

link-aggregation e0/1 to e0/4undo link-aggregation e0/1|all[SwitchA-vlanx]isolate-user-vlan[SwitchA]isolate-user-vlan secondary

[switcha]port-iaolate enableport hybrid pvid vlan port hybrid pvid

port hybrid vlan vlan_id_list untaggeddisplay version

display current-configurationdisplay interfacesdisplay ip routesysname

super passwrodinterface serial0

ip address []undo shutdownlink-protocol hdlc

]user-interface vty 0 4

authentication-mode passwordsetauthentication-modesimple 222

user privilege level 3quit

hdlc all serial0

debugging hdlc event serial0debugging hdlc packet serial0

静态路由ip

端口的聚合始端口为通讯号设置主VLAN

设置主vlan包括的子vlan 作用为隔离主子VLAN间的主机访问,在同一网段下,主子VLAN可以访问,但是子VLAN间是不能访问的,这是华为的一个突色这是隔离同一VLAN下的主机相互访问,isolate(隔离)

设置vlan的pvid删除vlan的pvid

设置无标识的vlan如果包的vlanid与PVId一致,则去掉vlan信息.默认PVID=1。所以设置PVID为所属vlan id, 设置可以互通的vlan为unta显示版本信息显示当前配置显示接口信息显示路由信息更改主机名设置口令进入接口

配置端口IP地址激活端口

绑定hdlc协议

用户界面的vty 0 4 ]认证模式密码

222

password设置身份验证模式简单的密码

用户级别3退出当前模式显示所有信息调整时间信息显示包的信息ip

静态路由

route-static

{interface

number|nexthop}[value][reject|blackhol

动态路由

< IP > <面具> {数量} |接口已经[价值] [拒绝] |黑洞设置动态路由设置工作允许设置入口允许设置出口允许设置交换路由网络设置与所有网络交换同行的IP地址

设置工作版本1

设置工作版本2,多播方式水平分割

配置路由器的ID启动OSPF协议引入直连路由

rip

]rip workrip inputrip output

network 1.0.0.0network all

peer ip-addressrip version 1

rip version 2 multicastrip split-horizonrouter idospf enable

import-route direct

[Quidway-Serial0]ospf enable area

标准访问列表命令格式

acl [match-orderrule

[normal|special]{permit|deny}[source source-addr source-扩展访问控制列表配置命令配置TCP/UDP协议的扩展访问列表rule

{normal|special}{permit|deny}{tcp|udp}source

{|any}destination {normal|special}{permit|deny}icmpsource

{|any]destination {扩展访问控制列表操作符的含义equal portnumber

greater-than portnumberless-than portnumbernot-equal portnumber

range portnumber1 portnumber2PPP设置

[Quidway-s0]link-protocol ppp启动ftp服务local-userftppassword{simple|cipher} aaa service-type ftp

配置OSPF区域

默认前者顺序匹配规则

[正常] { |特殊许可证|否认}[源地址源通配符|任何]

规则

{正常} { |特殊许可证|否认} { }源| UDP,TCP{ < IP野生> |任何}目的地IP野生|任何} > <[操作]

规则

{正常} { |特殊许可证|否认} ICMP源

{ < IP野生> |任何目的地IP ] { <野生> |任何][ICMP编码] [日志]等于大于小于不等区间默认的协议

本地用户FTP密码密码} {简单| AAA服务型FTPFTP服务器上启用

因篇幅问题不能全部显示,请点此查看更多更全内容