ensp基础操作

本文详细介绍了如何通过ensp命令对华为交换机进行出厂设置、命名、时间设置、语言配置、远程访问控制、密码设置、AAA认证、接口配置以及MAC地址管理,包括静态和动态MAC地址的操作和清理。
摘要由CSDN通过智能技术生成

拓扑图

请添加图片描述

实验要求,按照提示学习基础ensp命令

1、交换机恢复出厂设置
<SWA>reset saved-configuration \恢复出厂

<SWA>reboot \ \ 重启交换机
2、交换机改名字
[Huawei]sysname SWA [SWA]``
3、设置时区
<SWA>clock datetime 12:00:00 2020-05-27 //设置系统时间

<SWA>clock timezone ?

STRING<1-32> 时区名称

<SWA>clock timezone BJ add 08:23:00

<SWA>display clock

2023091212:38:20+08:23

星期二

时区(BJ) : UTC+08:23
4、设置语言
<SWA>language-mode Chinese
Change language mode, confirm? [Y/N] y
提示:改变语言模式成功。
5、配置交换机远程登录地址
[SWA]int Vlanif 1
[SWA-Vlanif1]ip ad
[SWA-Vlanif1]ip address 192.168.1.254 24
[SWA-Vlanif1]
6、配置取消干扰、永不超时
<SWA>undo terminal monitor
提示:当前终端禁止所有类信息输出。

[SWA]user-interface console 0
[SWA-ui-console0]id
[SWA-ui-console0]idle-timeout 0 // 用不超时
[SWA-ui-console0]q
7、配置 Console 密码
[SWA-ui-console0]authentication-mode password
[SWA-ui-console0]ser
[SWA-ui-console0]set
[SWA-ui-console0]set ?
authentication 配置用户终端接口的认证参数
bootrom

[SWA-ui-console0]set au
[SWA-ui-console0]set authentication pa
[SWA-ui-console0]set authentication password si
[SWA-ui-console0]set authentication password simple 1324

测试登录

Password:1324
<SWA>
8、aaa 认证
[SWA]user-interface console 0
[SWA-ui-console0]auth
[SWA-ui-console0]authentication-mode aaa

[SWA]aaa
[SWA-aaa]loc
[SWA-aaa]local-user admin pa
[SWA-aaa]local-user admin password si
[SWA-aaa]local-user admin password simple 1234
[SWA-aaa]re
[SWA-aaa]retu
[SWA-aaa]return
<SWA>q User interface con0 is available
User:admin
Password:1324
<SW>
9、关闭提示
[Huawei]undo info enable
Info: Information center is disabled.
[Huawei]
10、配置接口
[Huawei]interface g0/0/1
[Huawei-GigabitEthernet0/0/1]po
[Huawei-GigabitEthernet0/0/1]port l
[Huawei-GigabitEthernet0/0/1]port link-t
[Huawei-GigabitEthernet0/0/1]port link-type ac
[Huawei-GigabitEthernet0/0/1]port link-type access
[Huawei-GigabitEthernet0/0/1]
11、配置接口带宽
[Huawei-GigabitEthernet0/0/1]speed ?
10 10M port speed mode
100 100M port speed mode
1000 1000M port speed mode
auto-negotiation Auto negotiation

[Huawei-GigabitEthernet0/0/1]speed 100
Error: Please undo negotiation auto first. //错误
[Huawei-GigabitEthernet0/0/1]undo neg
[Huawei-GigabitEthernet0/0/1]undo negotiation au
[Huawei-GigabitEthernet0/0/1]undo negotiation auto // 关闭系统带宽
[Huawei-GigabitEthernet0/0/1]sp
[Huawei-GigabitEthernet0/0/1]speed 100
[Huawei-GigabitEthernet0/0/1]

配置接口双工

[Huawei-GigabitEthernet0/0/1]duplex ?
full Full-Duplex mode
half Half-Duplex mode

[Huawei-GigabitEthernet0/0/1]undo negotiation au
[Huawei-GigabitEthernet0/0/1]undo negotiation auto
[Huawei-GigabitEthernet0/0/1]fu
[Huawei-GigabitEthernet0/0/1]du
[Huawei-GigabitEthernet0/0/1]duplex
[Huawei-GigabitEthernet0/0/1]duplex fu
[Huawei-GigabitEthernet0/0/1]duplex full
[Huawei-GigabitEthernet0/0/1]
12、管理 mac 地址
[Huawei]display mac-address

MAC address table of slot 0:

MAC Address VLAN/ PEVLAN CEVLAN Port Type LSP/LSR-ID

 VSI/SI MAC-Tunnel

**5489-9822-0d06 1 - - Eth0/0/1 dynamic 0/-**

Total matching items on slot 0 displayed = 1

(2)使用 mac-地址静态命令在交换机中添加静态条目,并显示 mac 地址表

[Huawei]mac-address static 5489-9822-0d7 Ethernet 0/0/1 vlan 1
[Huawei]
13、删除 mac 地址
<Huawei>reset arp all
Warning: This operation will reset all static and dynamic ARP entries, and clear
the configurations of all static ARP, continue?[Y/N]:y
<Huawei>display mac-address
<Huawei>
14、查看设备当前配置
[Huawei]display current-configuration

#

sysname Huawei

#

undo info-center enable

#

cluster enable
ntdp enable
ndp enable

#

drop illegal-mac alarm

#

diffserv domain default

#

drop-profile default

#

aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin service-type http

#

interface Vlanif1
ip address 192.168.1.250 255.255.255.0

#

interface MEth0/0/1

#

interface Ethernet0/0/1

#

#

interface GigabitEthernet0/0/1
port media type copper
port link-type access

#

interface GigabitEthernet0/0/2

#

interface NULL0

#

mac-address static 5489-9822-00d7 Ethernet0/0/1 vlan 1

#

user-interface con 0
user-interface vty 0 4

#

return

## 实验心得:



ort media type copper
port link-type access

#

interface GigabitEthernet0/0/2

#

interface NULL0

#

mac-address static 5489-9822-00d7 Ethernet0/0/1 vlan 1

#

user-interface con 0
user-interface vty 0 4

#

return
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值