您好,欢迎来到六九路网。
搜索
您的当前位置:首页华为路由命令大全

华为路由命令大全

来源:六九路网


华为路由常用命令大全

display ip statistics

disp process cpu 查看CPU使用频率

dis ip routing-table (dis ip rou)

dis cur display current-configuration display interfaces display vlan all display version super password sysname interface ethernet 0/1 interface vlan x

;显示当前配置

;显示接口

;显示路由信息

;显示版本信息

;修改特权用户密码 ;交换机命名

;进入接口视图

;进入接口视图

ip address 10.65.1.1 255.255.0.0 ;配置VLAN的IP地址

route-static 0.0.0.0 0.0.0.0 10.65.1.2 ;静态路由=网关

]rip ;三层交换支持

local-user ftp

user-interface vty 0 4 ;进入虚拟终端

authentication-mode password ;设置口令模式

set authentication-mode password simple 222 ;设置口令(simple简单的)

ser privilege level 3 ;用户级别(当用户远程登陆时,其默认级别为1,不能作任何设置,3为最高级别,可以作修改)

interface ethernet 0/1 ;进入端口模式

int e0/1 ;进入端口模式

duplex {half|full|auto} ;配置端口工作状态(端口聚合时是全双工,而CISCO的为半双工)

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 3 undo shutdown shutdown quit vlan 3 port ethernet 0/1 port e0/1 port ethernet 0/1 to ethernet 0/4 ;当前端口加入到VLAN

;设trunk允许的VLAN

;设置trunk端口的PVID

;激活端口

;关闭端口

;创建VLAN

;在VLAN中增加端口 ;简写方式

;在VLAN中增加端口

;返回

port e0/1 to e0/4 ;简写方式

description string ;指定VLAN描述字符

description ;删除VLAN描述字符

display vlan [vlan_id] ;查看VLAN设置

stp {enable|disable} ;设置生成树,默认关闭(思科是打开的)

stp priority 4096 ;设置交换机的优先级

stp root {primary|secondary} ;设置为根或根的备份

stp cost 200 ;设置交换机端口的花费

link-aggregation e0/1 to e0/4 ingress|both ; 端口的聚合

undo link-aggregation e0/1|all ; 始端口为通道号

[SwitchA-vlanx]isolate-user-vlan enable ;设置主vlan

[SwitchA]isolate-user-vlan secondary ;设置主vlan包括的子vlan 作用为隔离主子VLAN间的主机访问,在同一网段下,主子VLAN可以访问,但是子VLAN间是不能访问的,这是华为的一个突色

[switcha]port-iaolate enable 这是隔离同一VLAN下的主机相互访问, isolate(隔离)

port hybrid pvid vlan ;设置vlan的pvid

port hybrid pvid ;删除vlan的pvid

port hybrid vlan vlan_id_list untagged ;设置无标识的vlan

如果包的vlan id与PVId一致,则去掉vlan信息. 默认PVID=1。

所以设置PVID为所属vlan id, 设置可以互通的vlan为unta

display version ;显示版本信息

display current-configuration ;显示当前配置

display interfaces ;显示接口信息

display ip route ;显示路由信息

sysname ;更改主机名

super passwrod ;设置口令

interface serial0 ;进入接口

ip address ;配置端口IP地址

[]undo shutdown ;激活端口

link-protocol hdlc ;绑定hdlc协议

]user-interface vty 0 4

authentication-mode password

set authentication-mode password simple 222

user privilege level 3

quit

hdlc all serial0 ;显示所有信息

debugging hdlc event serial0 ;调试事件信息

debugging hdlc packet serial0 ;显示包的信息

静态路由:

ip route-static {interface

number|nexthop}[value][reject|blackhole]

动态路由:

rip ;设置动态路由

]rip work ;设置工作允许

rip input rip output network 1.0.0.0 network all peer ip-address rip version 1 rip version 2 multicast rip split-horizon router id ospf enable ;设置入口允许

;设置出口允许

;设置交换路由网络

;设置与所有网络交换

;设置工作在版本1

;设版本2,多播方式

;配置路由器的ID

;启动OSPF协议

;水平分隔

import-route direct ;引入直联路由

[Quidway-Serial0]ospf enable area ;配置OSPF区域

标准访问列表命令格式如下:

acl [match-order config|auto] ;默认前者顺序匹配。

rule [normal|special]{permit|deny} [source source-addr source-wildcard|any]

扩展访问控制列表配置命令

配置TCP/UDP协议的扩展访问列表:

rule {normal|special}{permit|deny}{tcp|udp}source {|any}destination |any}

[operate]

配置ICMP协议的扩展访问列表:

rule {normal|special}{permit|deny}icmp source {|any]destination {|any]

[icmp-code] [logging]

扩展访问控制列表操作符的含义

equal portnumber ;等于

greater-than portnumber less-than portnumber not-equal portnumber range portnumber1 portnumber2 PPP设置:

[Quidway-s0]link-protocol ppp 启动ftp服务:

local-user ftp password {simple|cipher} aaa service-type ftp

ftp server enable

;大于

;区间

;默认的协议 ;小于 ;不等

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

Copyright © 2019- 69lv.com 版权所有 湘ICP备2023021910号-1

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务