配置要点1:网络可以通也是就是可以ping通
配置要点2:正确配置Telnet,密码认证和aaa认证
配置要点3:以华为的5735s系列的交换机为例,可能有些需要在全局模式下输入 :telnet server-souerce all-interface
配置要点4:真机交换机上配置时先打开Telnet 的服务,telnet server enable 虽然默认是开启的但是最好也要打一次,其次就是进入到远程配置界面的时候先打protocol inbound telnet 之后再打其他命令,不然会提示一个报错的,再者是Telnet给的权限要给最高15,虽然3和15是一样的,但是为了稳妥点,15才是最好的,免得后期远程搞定没有权限之类的问题。
注意:VLAN 100 是业务VLAN VLAN 200 是管理Vlan
业务Vlan:就是上网用的 管理vlan:就是管理交换机的vlan也就是远程的vlan
拓扑图如图所示:
ensp中的PC上是不可以telnet远程连接交换机的,所以我们自己本身的电脑也是不可以的,要开启才可以
主要命令解读:
设备配置命令:
核心交换机配置:
sys
sysname HX
undo info-center enable
vlan batch 200 100
dhcp enable
telnet server enable
interface Vlanif200
ip address 172.16.200.253 255.255.255.0
quit
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 100 200
undo port trunk allow-pass vlan 1
quit
aaa
local-user huawei password cipher Aa@123456. privilege level 15
local-user huawei service-type telnet
quit
user-interface vty 0 4
authentication-mode aaa
quit
ip route-static 192.168.100.0 255.255.255.0 172.16.200.254
quit
汇聚交换机:
sys
sysname HJ
undo info-center enable
vlan batch 100 200
dhcp enable
telnet server enable
interface Vlanif100
ip address 192.168.100.254 255.255.255.0
dhcp select interface
interface Vlanif200
ip address 172.16.200.254 255.255.255.0
quit
interface GigabitEthernet0/0/1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 100 200
quit
interface GigabitEthernet0/0/2
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 100 200
quit
interface GigabitEthernet0/0/3
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 100 200
quit
ip route-static 0.0.0.0 0.0.0.0 172.16.200.253
aaa
local-user ensp password cipher 12345678 privilege level 15
local-user ensp service-type telnet
quit
user-interface vty 0 4
authentication-mode aaa
quit
接入交换机1:
sys
sysname JR1
undo info-center enable
vlan batch 100 200
dhcp enable
telnet server enable
interface Vlanif200
ip address 172.16.200.1 255.255.255.0
quit
interface Ethernet0/0/1
port link-type access
port default vlan 100
quit
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 100 200
undo port trunk allow-pass vlan 1
quit
ip route-static 0.0.0.0 0 172.16.200.254
user-interface vty 0 4
protocol inbound telnet
authentication-mode password
set authentication password cipher Aa@123456.
user privilege level 15
quit
接入交换机2:
sys
sysname JR2
undo info-center enable
vlan batch 100 200
dhcp enable
telnet server enable
interface Vlanif200
ip address 172.16.200.2 255.255.255.0
quit
interface Ethernet0/0/1
port link-type access
port default vlan 100
quit
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 100 200
undo port trunk allow-pass vlan 1
quit
ip route-static 0.0.0.0 0 172.16.200.254
user-interface vty 0 4
protocol inbound telnet
authentication-mode password
set authentication password cipher Aa@123456.
user privilege level 15
quit
验证:接入交换机2 telnet核心交换机
验证:接入交换机2 telnet汇聚交换机
验证:接入交换机2 telnet接入交换机1
PC1电脑ping汇聚与核心交换机
PC1电脑ping接入交换机2
PC1电脑telnet接入交换机2
所以PC1是没有telnet程序的。