拓扑图
实验要求,按照提示学习基础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
2023 年 09 月 12 日 12: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