您的位置:首页 > 其它

实验3 路由器的基本配置和远程登录

2017-12-14 22:51 666 查看
【实验目的和要求】

(1)掌握路由器常用的配置方式和基本配置命令;

(2)正确配置telnet远程登录到路由器。

【实验内容】

通过Console接口对路由器进行名字、特权密码、管理IP、远程登录密码等的配置,实现路由器的远程登录。

实验拓扑:

step1 搭建拓扑结构



step2 规划IP地址

IP地址表



注意:PC0和路由器router0的F0/0接口应该具有相同的网络号。

Router0:



Router>enable
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#interface FastEthernet0/0
Router(config-if)#ip address 192.168.1.254 255.255.255.0
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up


Step3 通过控制线配置路由器

配置路由器F0/0接口的IP地址,并启动接口。

为路由器配置明文特权密码,密码为123

为路由器配置密文特权密码,密码为123a

为路由器配置允许远程登录,并配置密码为456

Router(config-if)#
Router(config-if)#enable password 123
Router(config)#enable secret 123a
Router(config)#line vty 0 4
Router(config-line)#password 456
Router(config-line)#login
Router(config-line)#exit
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console


step5 检查路由器的配置文件

在router0上运行show running-config命令,检查刚才所做的配置。

Router#show running-config
Building configuration...

Current configuration : 685 bytes
!
version 12.4
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Router
!
!
!
enable secret 5 $1$mERr$78sUI5jw.uBI7couQSdUL0
enable password 123
!
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
interface FastEthernet0/0
ip address 192.168.1.254 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
shutdown
!
interface Serial0/1/0
no ip address
shutdown
!
interface Serial0/1/1
no ip address
shutdown
!
interface Vlan1
no ip address
shutdown
!
ip classless
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
password 456
login
!
!
!
end


Step5 配置PC0

按照IP地址表,配置PC0的IP地址和子网掩码。



Step6 检验PC0与路由器的可达性

从PC0输入命令:ping 192.168.1.254



Step7 检查是否能够在PC0远程登录Router0

在PC0端,输入:

telnet <路由器接口IP>

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: