轻淘客cms建站教程,网站开发技术招聘,帝国网站地图模板,上海紫博蓝网站实验2.1.3 交换机的远程配置 一、任务描述二、任务分析三、实验拓扑四、具体要求五、任务实施#xff08;一#xff09; password认证1. 进入系统视图重命名交换机的名称为SWA2. 关闭干扰信息3. 设置vty为0-44. 设置认证方式为password5. 设置登录密码为#xff1a;huawei6.… 实验2.1.3 交换机的远程配置 一、任务描述二、任务分析三、实验拓扑四、具体要求五、任务实施一 password认证1. 进入系统视图重命名交换机的名称为SWA2. 关闭干扰信息3. 设置vty为0-44. 设置认证方式为password5. 设置登录密码为huawei6. 设置用户级别为2级这样才能远程登录7. 设置超时时间为10分钟8.远程管理地址9.用交换机模拟远程登录因为模拟器中的计算机没有自带的telnet客户端 二 AAA认证1.设置用户名admin密码为hello级别为22.设置认证类型为telnet3.设置vty前面配置过因为这里认证方式不一样所以需要重新配置4测试交换机PC1能否登录到交换机上可以 三stelnet认证1.在不保存的情况下重启交换机或重新建拓扑图2.重命名和关闭干扰信息3.开启stelnetssh服务4.配置Vlanif1的IP远程管理的IP地址5.使用rsa local-key-pair create命令生成本地RSA主机秘钥对默认就行6.配置ssh用户登录界面。配置认证方式为aaa设置用户名为admin密码为hello等级为2。8. 设置本地用户的接入类型为ssh9.设置ssh登录用户为admin登录类型为password10.设置vty认证模式为aaa11.设置只能通过ssh登录只支持ssh协议禁止telnet功能12.添加一个ssh user的stelnet如果没有这一行是实现不了的13.在不保存的情况下重启PC1重命名并配置IP14.在pc1上 开启ssh用户端首次认证功能15.在PC1上测试用户名和密码为之前设置的 四使用display users命令查看已经登录的用户信息五使用display rsa local-key-pair public命令查看本地秘钥对公钥信息 六、任务验收七、任务小结 一、任务描述
某公司在组建局域网时所购置的交换机已经完成了基本配置现在全部接入网络并投入使用。为了方便对交换机进行维护和管理现在需要配置其远程管理功能。
二、任务分析
远程管理极大地提高了用户操作的灵活性。远程管理主要分为Telnet和STelnet两种方式。如果为交换机分配了管理IP地址则可以使用Telnet和STelnet客户端连接到交换机。但是VTY线路并不安全可以为VTY线路配置密码身份验证来保护通过VTY线路对交换机的访问。
三、实验拓扑 四、具体要求 五、任务实施
一 password认证
1. 进入系统视图重命名交换机的名称为SWA
Huaweisystem-view
Enter system view, return user view with CtrlZ.
[Huawei]sysname SWA
[SWA]2. 关闭干扰信息
[SWA]undo info-center enable
Info: Information center is disabled.
[SWA]3. 设置vty为0-4
[SWA]user-interface vty 0 4
[SWA-ui-vty0-4]4. 设置认证方式为password
[SWA-ui-vty0-4]authentication-mode password 5. 设置登录密码为huawei
[SWA-ui-vty0-4]set authentication password simple huawei6. 设置用户级别为2级这样才能远程登录
[SWA-ui-vty0-4]user privilege level 27. 设置超时时间为10分钟
[SWA-ui-vty0-4]idle-timeout 10
[SWA-ui-vty0-4]quit8.远程管理地址
在vlanif1中配置IP地址和子网掩码
[SWA]int vlanif 1
[SWA-Vlanif1]ip address 192.168.1.254 24
[SWA-Vlanif1]quit开启远程登录功能
[SWA]telnet server enable
Info: The Telnet server has been enabled.
[SWA]9.用交换机模拟远程登录因为模拟器中的计算机没有自带的telnet客户端
设置交换机的名字为PC1
Huaweisystem-view
Enter system view, return user view with CtrlZ.
[Huawei]sysname PC1
[PC1]undo info-center enable //关闭干扰信息
Info: Information center is disabled.设置计算机的IP
[PC1]interface vlan 1
[PC1-Vlanif1]ip add 192.168.1.1 24
[PC1-Vlanif1]quit测试交换机PC1能否登录到交换机上可以
PC1telnet 192.168.1.254
Trying 192.168.1.254 ...
Press CTRLK to abort
Connected to 192.168.1.254 ...Login authenticationPassword:
Info: The max number of VTY users is 5, and the numberof current VTY users on line is 1.The current login time is 2023-10-17 15:06:14.
SWA二 AAA认证
1.设置用户名admin密码为hello级别为2
SWAsystem-view
Enter system view, return user view with CtrlZ.
[SWA]aaa
[SWA-aaa]local-user admin password cipher hello privilege level 2
[SWA-aaa]2.设置认证类型为telnet
[SWA-aaa]local-user admin service-type telnet 3.设置vty前面配置过因为这里认证方式不一样所以需要重新配置
[SWA-aaa]quit
[SWA]user-interface vty 0 4
[SWA-ui-vty0-4]authentication-mode aaa
[SWA-ui-vty0-4]4测试交换机PC1能否登录到交换机上可以
SWAtelnet 192.168.1.254
Trying 192.168.1.254 ...
Press CTRLK to abort
Connected to 192.168.1.254 ...Login authenticationUsername:admin
Password:
Info: The max number of VTY users is 5, and the numberof current VTY users on line is 2.The current login time is 2023-10-17 15:13:53.
SWA注以上两种password和aaa都为远程登录telnet都不够安全。
三stelnet认证
1.在不保存的情况下重启交换机或重新建拓扑图
SWAreboot
Info: The system is now comparing the configuration, please wait.
Warning: All the configuration will be saved to the configuration file for the n
ext startup:, Continue?[Y/N]:n
Info: If want to reboot with saving diagnostic information, input N and then e
xecute reboot save diagnostic-information.
System will reboot! Continue?[Y/N]:y
SWA
Huawei2.重命名和关闭干扰信息
Huaweisystem-view
Enter system view, return user view with CtrlZ.
[Huawei]undo info-center enable
Info: Information center is disabled.
[Huawei]sysname SWA
[SWA]3.开启stelnetssh服务
[SWA]stelnet server enable
Info: Succeeded in starting the Stelnet server.
[SWA]4.配置Vlanif1的IP远程管理的IP地址
[SWA]interface vlan 1
[SWA-Vlanif1]ip address 192.168.1.254 24
[SWA-Vlanif1]quit5.使用rsa local-key-pair create命令生成本地RSA主机秘钥对默认就行
[SWA]rsa local-key-pair create
The key name will be: SWA_Host
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512, it will take a few minutes.
Input the bits in the modulus[default 512]:
Generating keys...
.........
...
..
.................[SWA]6.配置ssh用户登录界面。配置认证方式为aaa设置用户名为admin密码为hello等级为2。
[SWA]aaa
[SWA-aaa]local-user admin password cipher hello privilege level 28. 设置本地用户的接入类型为ssh
[SWA-aaa]local-user admin service-type ssh
[SWA-aaa]quit9.设置ssh登录用户为admin登录类型为password
[SWA]ssh user admin authentication-type password10.设置vty认证模式为aaa
[SWA]user-interface vty 0 4
[SWA-ui-vty0-4]authentication-mode aaa11.设置只能通过ssh登录只支持ssh协议禁止telnet功能
[SWA-ui-vty0-4]protocol inbound ssh
[SWA-ui-vty0-4]idle-timeout 10 //设置断连时间为10分钟12.添加一个ssh user的stelnet如果没有这一行是实现不了的
[SWA]ssh user admin service-type stelnet 13.在不保存的情况下重启PC1重命名并配置IP
PC1reboot
Info: The system is now comparing the configuration, please wait.
Warning: All the configuration will be saved to the configuration file for the n
ext startup:, Continue?[Y/N]:n
Info: If want to reboot with saving diagnostic information, input N and then e
xecute reboot save diagnostic-information.
System will reboot! Continue?[Y/N]:y
PC1##########
Huaweisystem-view
Enter system view, return user view with CtrlZ.
[Huawei]undo info-center enable
Info: Information center is disabled.
[Huawei]sysname PC1
[PC1]interface vlan 1
[PC1-Vlanif1]ip address 192.168.1.1 24
[PC1-Vlanif1]quit14.在pc1上 开启ssh用户端首次认证功能
[PC1]ssh client first-time enable 15.在PC1上测试用户名和密码为之前设置的
[PC1]stelnet 192.168.1.254
Please input the username:admin
Trying 192.168.1.254 ...
Press CTRLK to abort
Connected to 192.168.1.254 ...
The server is not authenticated. Continue to access it? [Y/N] :y
Save the servers public key? [Y/N] :y
The servers public key will be saved with the name 192.168.1.254. Please wait..
.Enter password:
Info: The max number of VTY users is 5, and the numberof current VTY users on line is 1.The current login time is 2023-10-17 15:33:52.
SWA四使用display users命令查看已经登录的用户信息
SWAdisplay usersUser-Intf Delay Type Network Address AuthenStatus AuthorcmdFlag0 CON 0 00:00:00 no Username : Unspecified34 VTY 0 00:03:15 SSH 192.168.1.1 pass no Username : admin
SWA五使用display rsa local-key-pair public命令查看本地秘钥对公钥信息
SWAdisplay rsa local-key-pair public
Time of Key pair created: 15:22:58 2023/10/17
Key name: SWA_Host
Key type: RSA encryption KeyKey code:
30470240D2C0DC32 776031BE 08E9A99D 478A213A 5A0B5DC332F4F68F D5325F6A 633D4B29 A56650E9 B1F3AC70---------省略---------0203010001
SWA六、任务验收
1在PC1上使用telnet 192.168.1.254进行Password方式登录测试。 2在PC1上使用telnet 192.168.1.254进行AAA方式登录测试。 3在PC1上使用stelnet 192.168.1.254进行登录测试。 4在SWA上使用display users命令查看已经登录的用户信息。 5在SWA上使用display rsa local-key-pair public命令查看本地秘钥对公钥信息。
七、任务小结
1交换机进行远程连接的前提条件是需要配置IP地址使网络联通。 2访问交换机VTY接口有两种选择Telnet和SSH。 3Telnet属于明文传送的信息不够安全而SSH使用密钥加密后传送是推荐使用的带内管理方式。 4配置VTY用户界面的验证方式为AAA时可以使用protocol inbound ssh命令设置只支持SSH协议设备自动禁止Telent功能。 注此为记录笔记如有不足还望海涵可留言斧正