实验五:路由器基本配置 下载本文

内容发布更新时间 : 2024/7/8 8:34:00星期一 下面是文章的全部内容请认真阅读。

实验6:CISCO_路由器基本配置

Cisco路由器基础

路由器是连接多个网络或网段的网络设备。路由器主要完成两项工作,即“寻径”和“转发”。“寻径”是指建立和维护路由表的过程,主要由软件实现;“转发”是指把数据包从一个接口转到另一接口的过程,主要由硬件完成。

路由器就是一台特殊功能的计算机,它的主要功能就是用来进行路由计算和数据包的转发,它有相应的操作系统(IOS)。

Router> 首先进入用户模式。

Router>? 通过输入一个问号,可以看出在这个模式中,可以使用什么样的命令。 Router>show ? show命令来获取有关的系统信息。

Router>enable 进入特权模式Router#,这时可以执行所有的用户命令,还可以看到和更 改路由器的设置内容。 Router#disable 退出特权模式。

Router#exit 退出整个控制链路。

Router#configure terminal 进入全局设置模式,这时可以设置路由器的全局参数。 Router(config)#end 退出全局设置模式。

Router(config)#interface 端口 进入局部端口设置模式Router(config-if)#,可以设置 路由器的端口参数。

Router(config)#line console 0 进入控制台线路设置模式,Router(config-line)#,可以修改 控制台会话设置。

Router(config)#interface fastEthernet 0/0 进入配置接口模式,Router(config-if)#,可以修改 fastEthemet 0/0接口配置。

实验一、重命名 Router>enable

Router#configure terminal Router(config)#hostname r1 r1(config)#

实验二、显示端口状态 Route>enable

Router#show ip interface brief

Interface IP-Address OK? Method Status Protocol

FastEthernet0/0 unassigned YES unset administratively down down

FastEthernet0/1 unassigned YES unset administratively down down

Vlan1 unassigned YES unset administratively down down

实验三、配置接口IP信息 Router>enable

Router#configure terminal

Router(config)#interface fastEthernet 0/0 Router(config-if)#no shutdown

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

Router(config-if)#ip address 192.168.1.1 255.255.255.0 Router(config-if)#end Router#

%SYS-5-CONFIG_I: Configured from console by console

Router#show ip interface brief

Interface IP-Address OK? Method Status

FastEthernet0/0 192.168.1.1 YES manual up

FastEthernet0/1 unassigned YES unset administratively down

Vlan1 unassigned YES unset administratively down

实验四、密码设置 1、用户模式密码设置 Router>enable

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z. Router(config)#line console 0

Router(config-line)#password (密码) Router(config-line)#login Router(config-line)#end

2、虚拟终端用户密码设置 Router>enable

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z. Router(config)#line vty 0 15

Router(config-line)#password (密码) Router(config-line)#login Router(config-line)#end

Protocol down down down 3、Enable password设置 Router>enable

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z. Router(config)#enable password (密码)

4、Secret password密文密码设置 Router>enable

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z. Router(config)#endble secret (密码)

5、关闭密码 outer>enable

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z. Router(config)#no enable password

实验五、远程虚拟终端登录 Router1登录Router2

Router2

Router>enable

Router#configure terminal

Enter configuration commands, one per line. End with CNTL/Z. Router(config)#interface fastEthernet 0/0 Router(config-if)#no shutdown

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

Router(config-if)#ip address 192.168.1.2 255.255.255.0 Router(config-if)#exit

Router(config)#r2(config)#line console 0 Router(config-line)#password 123 Router(config-line)#login Router(config-line)#exit Router(config)#line vty % Incomplete command. Router(config)#line vty 0 15

Router(config-line)#password 456

Router1

Router>enable

Router#configure terminal