华为eNSP模拟器—telnet实验 一、实验一
路由交换之间实现telnet登陆
实验拓扑
实验目的:
路由器作为 telnet 服务器
交换机作为客户端去连接路由器
实验步骤:
路由器配置
<Huawei>system-view [Huawei]sysname Route [Route]interface GigabitEthernet0/0/0 [Route-GigabitEthernet0/0/0]ip address 192.168.1.1 24 [Route-GigabitEthernet0/0/0]quit [Route]user-interface vty 0 4 (开放端口,最多允许个用户同时登陆) [Route-ui-vty0-4]authentication-mode password (设置登陆模式为密码认证) [Route-ui-vty0-4]set authentication password cipher 123456 (设置登陆密码,且为加密的类型) [Route-ui-vty0-4]user privilege level 3 (设置用户登陆后权限等级为3) [Route-ui-vty0-4]quit [Route]telnet server enable (开启 telent 服务) [Route]return交换机配置
<Huawei>system-view [Huawei]sysname Switch [Switch]interface Vlanif 1 [Switch-Vlanif1]ip address 192.168.1.10 24 (需要配上vlan1的地址,否则telnet不上) [Switch-Vlanif1]return <Switch>ping 192.168.1.1 (测试与路由器的连通性) PING 192.168.1.1: 56 data bytes, press CTRL_C to break Reply from 192.168.1.1: bytes=56 Sequence=1 ttl=255 time=70 ms Reply from 192.168.1.1: bytes=56 Sequence=2 ttl=255 time=30 ms Reply from 192.168.1.1: bytes=56 Sequence=3 ttl=255 time=50 ms Reply from 192.168.1.1: bytes=56 Sequence=4 ttl=255 time=50 ms Reply from 192.168.1.1: bytes=56 Sequence=5 ttl=255 time=30 ms --- 192.168.1.1 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 30/46/70 ms <Switch>telnet 192.168.1.1 (telent登陆需要在用户视图下连接) 具体演示如下:交换连接:在路由器上 telnet 连接交换机
交换机配置
<Switch>system-view [Switch]user-interface vty 0 4 [Switch-ui-vty0-4]authentication-mode password [Switch-ui-vty0-4]set authentication password simple abc123 (设置登陆密码,密码为明文方式) [Switch-ui-vty0-4]user privilege level 3 [Switch-ui-vty0-4]quit [Switch]telnet server enable在路由器上连接测试
二、实验二路由之间实现telnet登陆
实验拓扑
实验目的:
R1作为telent服务器端
R2作为客户端
实验步骤:
R1配置
//首先配置接口地址 <Huawei>system-view [Huawei]interface GigabitEthernet0/0/0 [Huawei-GigabitEthernet0/0/0]ip add 192.168.1.1 24 [Huawei-GigabitEthernet0/0/0]undo shutdown [Huawei-GigabitEthernet0/0/0]quit //配置telnet登陆认证 [Huawei]user-interface vty 0 4 [Huawei-ui-vty0-4]authentication-mode password [Huawei-ui-vty0-4]set authentication password cipher 123456 [Huawei-ui-vty0-4]user privilege level 3 //开启telnet服务 [Huawei]telnet server enable //查看刚刚配置的信息 [Huawei-ui-vty0-4]display this # user-interface con 0 user-interface vty 0 4 user privilege level 3 set authentication password cipher }0zO(Z|rc6bL^B&WSBiQ^J~# user-interface vty 16 20 # return [Huawei-ui-vty0-4] [Huawei-ui-vty0-4]quit [Huawei]R2配置(配置与R1配置类似)
//配置接口地址 <Huawei>system-view [Huawei]interface GigabitEthernet0/0/0 [Huawei-GigabitEthernet0/0/0]ip address 192.168.1.2 24 [Huawei-GigabitEthernet0/0/0]undo shutdown [Huawei-GigabitEthernet0/0/0]quit //配置telnet登陆用户认证 [Huawei]user-interface vty 0 4 [Huawei-ui-vty0-4]authentication-mode aaa [Huawei-ui-vty0-4]quit [Huawei] //配置AAA用户认证信息 [Huawei]aaa [Huawei-aaa]local-user admin password cipher 123456 [Huawei-aaa]local-user admin privilege level 3 [Huawei-aaa]local-user admin service-type telnet [Huawei-aaa]quit [Huawei] //开启telent服务 [Huawei]telnet server enable //查看本地用户 [Huawei]display local-user ---------------------------------------------------------------------------- User-name State AuthMask AdminLevel ---------------------------------------------------------------------------- admin A T 3 ---------------------------------------------------------------------------- Total 1 user(s)演示示例