程登路由器

拓扑

 

实现用PC远程telnet R2
 IP地址分配:
  PC 地址:192.168.1.100/24
  R1的F0/0:192.168.1.254/30,s0/0:12.1.1.1、24
  R2的 s0/0:12.1.1.2/24
 
1.配置R1
en
conf t
no ip do lo
lin con 0
no exec-t
logg sy
ho R1
int f0/0
 ip add 192.168.1.254 255.255.255.0
no sh
int s0/0
ip add 12.1.1.1 255.255.255.0
no sh
 
测试一下R1与PC的连接
测试可以通。
 
2.配置R2
en
conf t
no ip do lo
lin con 0
no exec-t
logg sy
ho R2
 int s0/0
 ip add 12.1.1.2 255.255.255.0
 no sh
 exit
 
R2(config)#enable password zdan   //设置进入特权模式的密码为zdan //
R2(config)#lin vty 0 4
R2(config-line)#password cisco01 //设置vty线路密码为cisco01 //
 
3.配路由协议(本例中用RIP)
R1(config)#router rip
R1(config-router)#net 192.168.1.0
R1(config-router)#net 12.1.1.0
R1(config-router)end
 
R2(config)#router rip
R2(config-router)#net 12.1.1.0
R2(config-router)end
 
4.用PC telnet R2 (12.1.1.2)
 
输入我们刚才设置的vty线路密码 cisco01
 
输入进入特权模式的密码 zdan
已经成功的远程登录到R2了。