华为eNSP简介与常用命令大全

一.华为eNSP简介

eNSP(Enterprise Network Simulation Platform)是一款由华为提供的免费的、可扩展的、图形化操作的网络仿真工具平台,主要对企业网络路由器、交换机进行软件仿真,完美呈现真实设备实景,支持大型网络模拟,让广大用户有机会在没有真实设备的情况下能够模拟演练,学习网络技术。

二.华为eNSP常用命令大全

历史命令查询
[Huawei]display history-command

配置主机名
system-view修改主机名必须进入系统视图
[Huawei]sysname 交换机名

状态信息查询
[Huawei]display version 查看VRP版本信息
display users 查看用户终端信息

进入当前接口
[Huawei]interface Ethernet 0/0/1

配置文件管理命令
[Huawei]display saved-configuration查看设备保存的信息
[Huawei]display current-configuration 查看设备当前配置信息
[Huawei]reset saved-configuration 擦除存储设备中的配置文件
compare configuration 比较当前配置信息与存储设备中的保存信息是否一致

关闭华为的信息提示中心
undo terminal monitor或[Huawei]undo info-center enable

永不超时
[Huawei]user-interface console 0
[Huawei-ui-console0]idle-timeout 0 0

配置双工即速率命令
[Huawei]interface Ethernet 0/0/1进入接口0/0/1
[Huawei-Ethernet0/0/1]undo negotiation auto关闭自动协商
[Huawei-Ethernet0/0/1]speed 100速率调至100
[Huawei-Ethernet0/0/1]duplex full调至双工模式(半双工为half)

保存配置
save

设置远程登录密码及命令等级
[Huawei]user-interface vty 0 4表示可同时打开0-4共5个会话进入交换机去配置命令
[Huawei-ui-vty0-4]authentication-mode password
[Huawei-ui-vty0-4]set authentication password simple 222设置密码222
[Huawei-ui-vty0-4]user privilege level 3调至命令等级至3级管理级
[Huawei-ui-vty0-4]display this 保存设置

设置三大接口模式
[Huawei-Ethernet0/0/1]port link-type access进入access模式
[Huawei-Ethernet0/0/1]port link-type trunk进入trunk模式
[Huawei-Ethernet0/0/1]port link-type hybrid进入hybrid模式

链路聚合CE机
CE交换机把二层接口切换成三层接口
[*HUAWEI-Eth-Trunk1]undo portswitch
CE交换机把三层接口切换成二层接口
[*HUAWEI-Eth-Trunk1]portswitch

vlan及三大模式划分端口入vlan
创建多个vlan
[Huawei]vlan bat 1 to 10
thunk 模式下允许指定vlan通过
[Huawei-Eth-Trunk1]port trunk allow-pass vlan 2(指定vlan2通过,all为全部通过)
access模式下划分端口入vlan 2
[Huawei-Ethernet0/0/1]port default vlan 2
hybrid模式下划分端口人vlan 2(打标签)
[LSW2-Ethernet0/0/1]port hybrid pvid vlan 2
hybrid模式下剔除标签
[LSW2-Ethernet0/0/1]port hybrid untagged vlan 2 3
hybrid模式下允许通过但不剔除标签
[LSW2-Ethernet0/0/1]port hybrid tagged vlan 2 3

网桥优先级
修改网桥优先级
[SW1]stp priority 0(数值需设定为4096的倍数)
设置网桥接口优先级
[SW1-Ethernet0/0/1]stp port priority 0(数值为16的倍数)
设置网桥为根桥
[SW1]stp root primary(优先级将变为0)
查看根网桥
[SW1]display stp

查看命令
查询命令中接口信息
[LSW1]display port vlan
查看接口开启状态
[LSW1]display interface brief
查看MAC地址表
[LSW1]display mac-address
查看放行Vlan
[LSW1]display port vlan
查看谁是根网桥
[LSW1]display stp
查看端口状态命令
[LSW1]display stp brief
查看路由表
[Huawei]display ip routing-table

MSTP
开启RSTP
[LSW1]stp enable
配置MSTP
[LSW1]stp mode mstp #stp模式设置为mstp
[LSW1]stp region-configuration #进入mstp设置模式
[LSW1-mst-region]region-name huawei #区域名为huawei
[LSW1-mst-region]revision-level 1 #版本级别为1
[LSW1-mst-region]instance 1 vlan 10 #定义实例1为vlan10
[LSW1-mst-region]instance 2 vlan 20 #定义实例2为vlan20
[LSW1-mst-region]active region-configuration #对mstp配置保存
Info: This operation may take a few seconds. Please wait for a moment…done.
[LSW1-mst-region]q
[LSW1]stp instance 1 root primary #定义本交换机为实例1的根
[LSW1]stp instance 2 root secondary #定义本交换机为实例2的备选根

猜你喜欢

转载自blog.csdn.net/MQ107/article/details/112163732