搜档网
当前位置:搜档网 › telnet的配置案例的说明

telnet的配置案例的说明

1、在R1上的配置telnet客户端登陆不需要服务器端用户名只要密码
R1>en
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#enable password cisco
R1(config)#line 0 4
%Error: Line 1 is not in async mode
R1(config)#line vty 0 4
R1(config-line)#password cisco
R1(config-line)#login
R1(config-line)#end

%SYS-5-CONFIG_I: Configured from console by console
R1#config t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#inteface f0/0
^
% Invalid input detected at '^' marker.

R1(config)#interface f0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#end

%SYS-5-CONFIG_I: Configured from console by console
R1#write
Building configuration...
[OK]
R1#

注意:配完后用no shutdown启动端口
2、在R2上的配置,保证R1能互通R2
R2(config)#no ip domain-lookup
R2(config)#interface f0/0
R2(config-if)#ip address 192.168.1.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#end
R2#write
3、在R2上用telnet登陆R1效果如下:
R2>telnet 192.168.1.1
Trying 192.168.1.1 ...Open


User Access Verification

Password: (密码是服务器端设置的这里只登陆不显示)
Password:
R1>
R1>(已经进入R1)

4、通过R2远程端对R1进行修改的内容:
R1>en
Password:
R1#
R1#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#
R1(config)#hostname r1
r1(config)#end
r1#write
Building configuration...
[OK]
r1#

5、在远程端修改后进入R1本端效果:
r1>(路由器名已经修改为r1)
r1>
r1>
6、退出远程r1:
r1#
r1#exit

[Connection to 192.168.1.1 closed by foreign host]
R2>(已经退出)
R2>

6、在R2上配置需要用户名和密码登陆的telnet:
R2(config)#enable password cisco
R2(config)#username cisco password cisco
R2(config)#line vty 0 4
R2(config-line)#login local
R2(config-line)#end

%SYS-5-CONFIG_I: Configured from console by console
R2#write
Building configuration...
[OK]
R2#

7、在r1上通过telnet进入R2并做相应配置如下:
r1>telnet 192.168.1.2
Trying 192.168.1.2 ...Open


User Access Verification

Username: cisco
Password:
R2>conf t
^
% Invalid input detected at '^' marker.

R2>en
Password:
Password:
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#interface f0/1
R2(config-if)#ip address 192.168.2.1 255.255.255.0
R2(config-if)#end
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#interface f0/1
R2(config-if)#no shutdown

R2(config-if)#end
R2#write
Building configuration...
[OK]
R2#

8、在r1上用telnet进入R2,然后在在里面用telnet进入r1:
r1>telnet 192.168.1.2
Trying 192.168.1.2 ...Open


User Access Verification

Username: cisco
Password:
R2>telnet

192.168.1.1
Trying 192.168.1.1 ...Open


User Access Verification

Password:
r1>

9、当在各个路由器配置rip互通后通过telnet从r1进入R3:
r1#telnet 192.168.2.2
Trying 192.168.2.2 ...Open


User Access Verification

Username: cisco
Password:
R3>

10、当多台路由器相连接时只要各台路由器能互相通,任意两台配置了telnet的都能通过telnet进入对端,不一定要求中间通过的路由器也要配置telnet。没配置telnet的路由器可以通过telnet进入配置了telnet的路由器,只需要知道配置端的密码和用户名(当对端设置用户名时才用)。

11、虽然有的对端设置了telnet但是没有设置enable密码(即少了此句(config)#enable password cisco),此时能进入对端用户模式进不了其他模式:
如下r3只配置了:
即少了此句((config)#enable password cisco)
telnet(r3(config)#line vty 0 4
r3(config-line)#password cisco
r3(config-line)#login
r3(config-line)#end

%SYS-5-CONFIG_I: Configured from console by console
r3#write
从R1进r3结果如下:
R1>
R1>telnet 192.168.2.2
Trying 192.168.2.2 ...Open


User Access Verification

Password:
r3>en
% No password set.(进不了其他模式)
r3>

注:配置了 (config)#enable password cisco 此句则自己登陆除用户模式外的其他模式也得用该密码。

相关主题