华为交换机初始配置和TELNET远程登录方法

优质老薛主机推荐:15%终身付款折扣:xwseo15 25%首次付款折扣 : xwseo115 点击下图进入购买

华为交换机初始配置和TELNET远程登录方法

lsw5交换机配置如下:

The device is running!

<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]int
[Huawei]interface vla
[Huawei]interface Vlanif 1
[Huawei-Vlanif1]ip add
[Huawei-Vlanif1]ip address 192.168.10.100 24  (给交换机lsw5配置ip管理地址)
[Huawei-Vlanif1]
Nov 11 2020 22:12:20-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[0]:The line protocol
IP on the interface Vlanif1 has entered the UP state.
Nov 11 2020 22:12:26-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5
.25.191.3.1 configurations have been changed. The current change number is 4, th
e change loop count is 0, and the maximum number of records is 4095.
[Huawei-Vlanif1]
[Huawei-Vlanif1]dis ip int
[Huawei-Vlanif1]dis ip interface b
[Huawei-Vlanif1]dis ip interface brief    (查看三层端口信息)
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 2
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 2
The number of interface that is DOWN in Protocol is 1

Interface IP Address/Mask Physical Protocol
MEth0/0/1 unassigned down down
NULL0 unassigned up up(s)
Vlanif1 192.168.10.100/24 up up
[Huawei-Vlanif1]dis int
[Huawei-Vlanif1]dis interface b   (查看二层端口信息)
PHY: Physical
*down: administratively down
(l): loopback
(s): spoofing
(b): BFD down
(e): ETHOAM down
(dl): DLDP down
(d): Dampening Suppressed
InUti/OutUti: input utility/output utility
Interface PHY Protocol InUti OutUti inErrors outErrors
GigabitEthernet0/0/1 up up 0% 0% 0 0
GigabitEthernet0/0/2 up up 0% 0% 0 0
GigabitEthernet0/0/3 up up 0% 0% 0 0
GigabitEthernet0/0/4 down down 0% 0% 0 0
GigabitEthernet0/0/5 down down 0% 0% 0 0
GigabitEthernet0/0/6 down down 0% 0% 0 0
GigabitEthernet0/0/7 down down 0% 0% 0 0
GigabitEthernet0/0/8 down down 0% 0% 0 0
GigabitEthernet0/0/9 down down 0% 0% 0 0
GigabitEthernet0/0/10 down down 0% 0% 0 0
GigabitEthernet0/0/11 down down 0% 0% 0 0
GigabitEthernet0/0/12 down down 0% 0% 0 0
GigabitEthernet0/0/13 down down 0% 0% 0 0
GigabitEthernet0/0/14 down down 0% 0% 0 0
GigabitEthernet0/0/15 down down 0% 0% 0 0
GigabitEthernet0/0/16 down down 0% 0% 0 0
GigabitEthernet0/0/17 down down 0% 0% 0 0
GigabitEthernet0/0/18 down down 0% 0% 0 0
GigabitEthernet0/0/19 down down 0% 0% 0 0
GigabitEthernet0/0/20 down down 0% 0% 0 0
GigabitEthernet0/0/21 down down 0% 0% 0 0
GigabitEthernet0/0/22 down down 0% 0% 0 0
GigabitEthernet0/0/23 down down 0% 0% 0 0
GigabitEthernet0/0/24 down down 0% 0% 0 0
MEth0/0/1 down down 0% 0% 0 0
NULL0 up up(s) 0% 0% 0 0
Vlanif1 up up — — 0 0
[Huawei-Vlanif1] q
[Huawei]
[Huawei]use
[Huawei]user-int
[Huawei]user-interface vt
[Huawei]user-interface vty 0?
INTEGER<0-4>
[Huawei]user-interface vty 0 4 (最多0-4)
[Huawei-ui-vty0-4]set aut
[Huawei-ui-vty0-4]set authentication pa
[Huawei-ui-vty0-4]set authentication password ?
cipher Set the password with cipher text
simple Set the password in plain text

[Huawei-ui-vty0-4]set authentication password c
[Huawei-ui-vty0-4]set authentication password cipher
^
Error:Incomplete command found at ‘^’ position.
[Huawei-ui-vty0-4]set authentication password cipher ?
STRING<1-16>/<24> Plain text/cipher text password

[Huawei-ui-vty0-4]set authentication password cipher abc123456  (设置普通)
[Huawei-ui-vty0-4]
Nov 11 2020 22:18:06-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5
.25.191.3.1 configurations have been changed. The current change number is 5, th
e change loop count is 0, and the maximum number of records is 4095.
[Huawei-ui-vty0-4]
[Huawei-ui-vty0-4]q
[Huawei]su
[Huawei]super pa
[Huawei]super password 123abc
^
Error: Unrecognized command found at ‘^’ position.
[Huawei]super password ?
cipher Display password with cipher text
level Specify the entering password of the specified priority
simple Display password with plain text

[Huawei]super password c  (cipher加密方式为c)
[Huawei]super password cipher 123abc  (超级管理员)
[Huawei]
Nov 11 2020 22:19:16-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5
.25.191.3.1 configurations have been changed. The current change number is 6, th
e change loop count is 0, and the maximum number of records is 4095.
[Huawei]
[Huawei]
[Huawei] User interface con0 is available

Please Press ENTER.

<Huawei>sa
<Huawei>save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]y
Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]:
Nov 11 2020 22:47:52-08:00 Huawei %%01CFM/4/SAVE(l)[0]:The user chose Y when dec
iding whether to save the configuration to the device.
Now saving the current configuration to the slot 0.
Save the configuration successfully.
<Huawei>

lsw2交换机配置如下:

我们通过lsw2交换机远程管理lsw5.

[Huawei-Vlanif1]dis this
#
interface Vlanif1
#
return
[Huawei-Vlanif1]ip add
[Huawei-Vlanif1]ip address 192.168.10.150 24 (给lsw2交换机配置管理ip地址)
[Huawei-Vlanif1]
Nov 11 2020 22:31:42-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[2]:The line protocol
IP on the interface Vlanif1 has entered the UP state.
[Huawei-Vlanif1]
[Huawei-Vlanif1]
[Huawei-Vlanif1]
Nov 11 2020 22:31:47-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5
.25.191.3.1 configurations have been changed. The current change number is 6, th
e change loop count is 0, and the maximum number of records is 409
[Huawei-Vlanif1]
[Huawei-Vlanif1]
[Huawei-Vlanif1]q
[Huawei]ping 192.168.10.100  (可以ping通交换机lsw5的ip)
PING 192.168.10.100: 56 data bytes, press CTRL_C to break
Reply from 192.168.10.100: bytes=56 Sequence=1 ttl=255 time=70 ms
Reply from 192.168.10.100: bytes=56 Sequence=2 ttl=255 time=30 ms
Reply from 192.168.10.100: bytes=56 Sequence=3 ttl=255 time=50 ms
Reply from 192.168.10.100: bytes=56 Sequence=4 ttl=255 time=40 ms
Reply from 192.168.10.100: bytes=56 Sequence=5 ttl=255 time=50 ms

— 192.168.10.100 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 30/48/70 ms

[Huawei]
[Huawei]telnet 192.168.10.100   (注意远程登录的视图模式)
^
Error: Unrecognized command found at ‘^’ position.
[Huawei]
[Huawei]q
tel
telnet 192.168.10.100
Trying 192.168.10.100 …
Press CTRL+K to abort
Connected to 192.168.10.100 …

Login authentication

Password:
Error: The password times out.
Password:
Error: The password times out.
Password: (这里输入的密码是abc123456)
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-11-11 22:36:23.
sy
^
Error: Unrecognized command found at ‘^’ position.
su  (超级管理员登录)
Password:    (这里输入的密码是123abc)
Now user privilege is 3 level, and only those commands whose level is equal to o
r less than this level can be used.
Privilege note: 0-VISIT, 1-MONITOR, 2-SYSTEM, 3-MANAGE
sy
Enter system view, return user view with Ctrl+Z.
[Huawei]dis this  (通过超级管理员登录发现可以操作)
#
sysname Huawei
#
super password level 3 cipher V8*yS4t$y9JlDGI>zbS=y(O#
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
return
[Huawei]
Info: The max number of VTY users is 5, and the number
of current VTY users on line is 0.
Info: The connection was closed by the remote host.

交换机配ip

给交换机lsw2配置账号

<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]user
[Huawei]user-int
[Huawei]user-interface vty 0 4
Nov 11 2020 23:22:23-08:00 Huawei %%01PHY/1/PHY(l)[0]: GigabitEthernet0/0/3:
change status to down
Nov 11 2020 23:22:24-08:00 Huawei %%01PHY/1/PHY(l)[1]: GigabitEthernet0/0/3:
change status to up
[Huawei-ui-vty0-4]au
[Huawei-ui-vty0-4]aut
[Huawei-ui-vty0-4]authentication-mode ?
aaa AAA authentication
none Login without checking
password Authentication through the password of a user terminal interface

[Huawei-ui-vty0-4]authentication-mode aaa
[Huawei-ui-vty0-4]
[Huawei-ui-vty0-4]
Nov 11 2020 23:23:19-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5
.25.191.3.1 configurations have been changed. The current change number is 7, th
e change loop count is 0, and the maximum number of records is 4095.
[Huawei-ui-vty0-4]
[Huawei-ui-vty0-4]
[Huawei-ui-vty0-4]q
[Huawei]aaa
[Huawei-aaa]local-
[Huawei-aaa]local-user test pas
[Huawei-aaa]local-user test password c
[Huawei-aaa]local-user test password cipher abc123 pr
[Huawei-aaa]local-user test password cipher abc123 privilege le
[Huawei-aaa]local-user test password cipher abc123 privilege level ?
INTEGER<0-15> Level value

[Huawei-aaa]local-user test password cipher abc123 privilege level 3  (设置管理账号用户名为test    密码为abc123    等级3以上就可以满足操作要求)
Info: Add a new user.
[Huawei-aaa]
Nov 11 2020 23:25:29-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5
.25.191.3.1 configurations have been changed. The current change number is 8, th
e change loop count is 0, and the maximum number of records is 4095.
[Huawei-aaa]
[Huawei-aaa]
[Huawei-aaa]local
[Huawei-aaa]local-user test se
[Huawei-aaa]local-user test service-type ?  (给用户名test开启的服务有哪些?有远程选择telnet)
8021x 802.1x user
bind Bind authentication user
ftp FTP user
http Http user
ppp PPP user
ssh SSH user
telnet Telnet user
terminal Terminal user
web Web authentication user
x25-pad X25-pad user

[Huawei-aaa]local-user test service-type tel
[Huawei-aaa]local-user test service-type telnet ?
8021x 802.1x user
bind Bind authentication user
ftp FTP user
http Http user
ppp PPP user
ssh SSH user
terminal Terminal user
web Web authentication user
x25-pad X25-pad user
<cr>

[Huawei-aaa]local-user test service-type telnet  (给用户名test开启远程服务)
[Huawei-aaa]
[Huawei-aaa]
Nov 11 2020 23:27:19-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5
.25.191.3.1 configurations have been changed. The current change number is 9, th
e change loop count is 0, and the maximum number of records is 4095.
[Huawei-aaa]
[Huawei-aaa]

<Huawei>save

这个时候我们可以使用交换机lsw5登录远程管理交换机lsw2

<Huawei>
<Huawei>telnet 192.168.10.200 (这个ip地址不对,所以远程登录不上交换机lsw2)
Trying 192.168.10.200 …
Press CTRL+K to abort
Error: Failed to connect to the remote host.
<Huawei>telnet 192.168.10.150  (注意ip地址要对)
Trying 192.168.10.150 …
Press CTRL+K to abort
Connected to 192.168.10.150 …
Login authentication
Username:test  (输入交换机lsw2的用户名为test)
Password:       (密码为abc123)
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-11-11 23:34:49.
<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]dis this
#
sysname Huawei
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
return
[Huawei]

telnet远程管理

 

赞 (0)
分享到:更多 ()