当前位置:学者斋 >

IT认证 >华为认证 >

华为交换机常用命令汇总

华为交换机常用命令汇总

同学们学习华为交换机技术,觉得难吗?为帮助大家更好深入学习华为交换机基础知识,yjbys小编为大家带来最新华为交换机常用命令,希望对大家学习有帮助!

华为交换机常用命令汇总

  vlan 显示vlan

name text 指定当前vlan的名称

undo name 取消

[h3c] vlan 2

[h3c-vlan2]name test vlan

dis users 显示用户

dis startup 显示启动配置文件的信息

dis user-interface 显示用户界面的相关信息

dis web users 显示web用户的相关信息。

header login 配置登陆验证是显示信息

header shell

undo header

lock 锁住当前用户界面

acl 访问控制列表 acl number inbound/outbound

[h3c]user-interface vty 0 4

[h3c-vty0-4] acl 2000 inbound

shutdown:关闭vlan接口

undo shutdown 打开vlan接口

关闭vlan1 接口

[h3c] interface vlan-interface 1

[h3c-vlan-interface] shutdown

vlan vlan-id 定义vlan

undo valn vlan-id

display ip routing-table

display ip routing-table protocol static

display ip routing-table statistics

display ip routing-table verbose 查看路由表的全部详细信息

interface vlan-interface vlan-id 进入valn

management-vlan vlan-id 定义管理vlan号

reset ip routing-table statistics protocol all 清除所有路由协议的路由信息.

display garp statistics interface GigabitEthernet 1/0/1 显示以太网端口上的garp统计信息

display voice vlan status 查看语音vlan状态

[h3c-GigabitEthernet1/0/1] broadcast-suppression 20 允许接受的最大广播流量为该端口传输能力的20%.超出部分丢弃.

[h3c-GigabitEthernet1/0/1] broadcast-suppression pps 1000 每秒允许接受的最大广播数据包为1000传输能力的20%.超出部分丢弃.

display interface GigabitEthernet1/0/1 查看端口信息

display brief interface GigabitEthernet1/0/1 查看端口简要配置信息

display loopback-detection 用来测试环路测试是否开启

display transceiver-information interface GigabitEthernet1/0/50 显示光口相关信息

duplex auto/full/half

[h3c]interface GigabitEthernet1/0/1

[h3c-GigabitEthernet1/0/1]duplux auto 设置端口双工属性为自协商

port link-type access/hybrid/trunk 默认为access

port trunk permit vlan all 将trunk扣加入所有vlan中

reset counters interface GigabitEthernet1/0/1 清楚端口的统计信息

speed auto 10/100/1000

display port-security 查看端口安全配置信息

am user-bind mac-addr 00e0-fc00-5101 ip-addr interface GigabitEthernet1/0/1 端口ip绑定

display arp 显示arp

display am user-bind 显示端口绑定的配置信息

display mac-address 显示交换机学习到的mac地址

display stp 显示生成树状态与统计信息

[h3c-GigabitEthernet1/0/1]stp instance 0 cost 200 设置生成树实例0上路径开销为200

stp cost 设置当前端口在指定生成树实例上路径开销。instance-id 为0-16 0表cist 取值范围1-200000

display system-guard ip-record 显示防攻击记录信息.

system-guard enable 启用系统防攻击功能

display icmp statistics icmp流量统计

display ip socket

display ip statistics

display acl all

acl number acl-number match-order auto/config

acl-number (2000-2999 是基本acl 3000-3999是高级acl为管理员预留的编号)

rule deny/permit protocal

  访问控制

[h3c] acl number 3000

[h3c-acl-adv-3000]rule permit tcp source destination destination-port eq 80 (

定义高级acl 3000,允许129.0.0/16网段的主机向202.38.160/24网段主机访问端口80)

rule permit source

rule deny cos 3 souce 00de-bbef-adse ffff-ffff-fff dest 0011-4301-9912 ffff-ffff-ffff

(禁止mac地址00de-bbef-adse发送到mac地址0011-4301-9912且802.1p优先级为3的报文通过)

display qos-interface GigabitEthernet1/0/1 traffic-limit 查看端口上流量

  端口速率限制

line-rate inbound/outbound target-rate

inbound:对端口接收报文进行速率限制

outbound: 对端口发送报文进行速率限制

target-rate 对报文限制速率,单位kbps 千兆口 inbound范围1-1000000 outbound范围20-1000000

undo line-rate取消限速.

[h3c]interface GigabitEthernet1/0/1

[h3c-GigabitEthernet1/0/1]line-rate outbound 128 限制出去速率为128kbps

display arp | include 77

display arp count 计算arp表的记录数

display ndp 显示交换机端口的详细配置信息。

display ntdp device-list verbose 收集设备详细信息

display lock

display users

  • 文章版权属于文章作者所有,转载请注明 https://xuezhezhai.com/itrz/huawei/g5eg6v.html