iyth888 发表于 2018-7-24 10:45:45

华为路由交换机常用命令

display current-configuration                  #显示当前配置  
display interfaces                        #显示接口信息
  
display vlan all                        #显示vlan信息
  
display version                         #显示版本信息
  
super password                         #修改特权用户密码
  
interface ethernet 0/1                     #进入接口视图
  
interface vlan x                        #进入vlanif接口视图
  
ip address 10.65.10.10 255.255.0.0          #配置VLAN的IP地址
  
ip route-static 0.0.0.0 0.0.0.0 10.65.10.254          #静态路由
  
local-user ftp
  
user-interface vty 0 4                     #进入虚拟终端
  
authentication-mode password            #设置口令模式
  
set authentication-mode password simple 888            #设置简单口令
  
user privilege level 3               #用户权限级别
  
duplex {half|full|auto}               #配置端口工作状态
  
speed {10|100|auto}               #配置端口工作速率
  
flow-control                     #配置端口流控
  
port link-type {trunk|access|hybrid}            #设置端口工作模式
  
port access vlan 30                 #当前端口加入到VLAN
  
port trunk permit vlan {ID|All}              #设trunk允许的VLAN
  
port trunk pvid vlan 3                 #设置trunk端口的PVID
  
vlan 3                           #创建VLAN
  
port ethernet 0/1                          #在VLAN中增加端口
  
port ethernet 0/1 to ethernet 0/4               #在VLAN中增加多个端口
  
monitor-port <interface_type interface_num>           #指定镜像端口
  
port mirror <interface_type interface_num>            #指定被镜像端口
  
port mirror int_list observing-port int_type int_num            #指定镜像和被镜像
  
description string                     #指定VLAN描述字符
  
description                           #删除VLAN描述字符
  
display vlan                      #查看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               #始端口为通道号
  
isolate-user-vlan enable                 #设置主vlan
  
isolate-user-vlan <x> secondary <list>            #设置主vlan包括的子vlan
  
port hybrid pvid vlan <id>           #设置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为untagged.
页: [1]
查看完整版本: 华为路由交换机常用命令