1.配置交换机
sys
[Huawei]sysname sw1
2.关闭华为交换机信息提示中心
[sw1]undo info-center enable或undo terminal moniter
3.永不超时
[sw1]user-interface console 0
[sw1-ui-console0]idle-timeout 0 0
4.配置双工及速率
[sw1-Ethernet0/0/1]undo negotiation auto
[sw1-Ethernet0/0/1]speed 100
[sw1-Ethernet0/0/1]duplex full
full:full-duplex(全双工) half:half-duplex(半双工)
5.配置信息保存
[sw1-Ethernet0/0/1]return
save
6.设置远程登入密码
vty 0 4 vty是telnet协议 0是初始值 4是结束值 表示可以同时打开5个会话窗口进入交换机配置命令
level 3配置权限等级
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.10 255.255.255.0
interface MEth0/0/1
interface Ethernet0/0/1
undo negotiation auto
interface Ethernet0/0/2
interface Ethernet0/0/3
interface Ethernet0/0/4
interface Ethernet0/0/5
interface Ethernet0/0/6
interface Ethernet0/0/7
interface Ethernet0/0/8
interface Ethernet0/0/9
interface Ethernet0/0/10
interface Ethernet0/0/11
interface Ethernet0/0/12
interface Ethernet0/0/13
interface Ethernet0/0/14
interface Ethernet0/0/15
interface Ethernet0/0/16
interface Ethernet0/0/17
interface Ethernet0/0/18
interface Ethernet0/0/19
interface Ethernet0/0/20
interface Ethernet0/0/21
interface Ethernet0/0/22
interface GigabitEthernet0/0/1
interface GigabitEthernet0/0/2
interface NULL0
user-interface con 0
idle-timeout 0 0
user-interface vty 0 4
user privilege level 3
set authentication password simple 111
return
[sw1-Vlanif1]
9.sw2配置完成相关信息
sysname sw2
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.20 255.255.255.0
interface MEth0/0/1
interface Ethernet0/0/1
undo negotiation auto
interface Ethernet0/0/2
interface Ethernet0/0/3
interface Ethernet0/0/4
interface Ethernet0/0/5
interface Ethernet0/0/6
interface Ethernet0/0/7
interface Ethernet0/0/8
interface Ethernet0/0/9
interface Ethernet0/0/10
interface Ethernet0/0/11
interface Ethernet0/0/12
interface Ethernet0/0/13
interface Ethernet0/0/14
interface Ethernet0/0/15
interface Ethernet0/0/16
interface Ethernet0/0/17
interface Ethernet0/0/18
interface Ethernet0/0/19
interface Ethernet0/0/20
interface Ethernet0/0/21
interface Ethernet0/0/22
interface GigabitEthernet0/0/1
interface GigabitEthernet0/0/2
interface NULL0
user-interface con 0
idle-timeout 0 0
user-interface vty 0 4
user privilege level 3
set authentication password simple 222
return
11.telnet 192.168.1.20
Password:
Info: The max number of VTY users is 5, and the number
of current VTY users on line is 1.
The current login time is 2020-12-21 11:14:53.
创建UDP端口和以太网端口
端口映射设置 端口类型:Ethernet 入端口编号:1 出端口编号:2 双向通道
11.xshell创建会话
协议:TELNET 主机号:192.168.1.10(交换机vlan1配置的地址)
确定连接,输入密码可以显示连接