人人范文网 范文大全

计算机网络实验三报告

发布时间:2020-03-04 02:57:05 来源:范文大全 收藏本文 下载本文 手机版

实验三 交换机配置

一、实验目的

1、掌握交换机在网络中的作用及交换机设备的选型。

2、掌握交换机的工作原理。

3、掌握利用超级终端对交换机配置的过程。

4、掌握Cisco2950交换机的基本配置方法,了解各交换机配置命令的作用。

二、实验属性

验证性实验。

三、实验仪器设备及器材

1 硬件环境:Cisco 2950交换机、Windows操作系统的PC机,有关连接线。 2 软件环境 Windows xp操作系统,Packet Tracer 5仿真软件

四、实验要求

1、熟练掌握Cisco交换机基本配置命令及各命令的作用。

2、试验中正确使用仪器设备,独立操作。

3、试验后按规定要求写出实验报告。

五、实验内容和步骤

1、终端控制台(console口)的连接和配置 PC机作为控制终端使用,用翻转线连接PC机的串口与交换机的console口,Pcaket Tracer仿真软件中实验图如图1,可以多连接几台PC机,其中连线选用console,连接PC机的RS232接口。

图1 Pcaket Tracer仿真实验图

(1)“开始”菜单“程序”→“附件”→“通信”→“超级终端”打开超级终端。 (2)新建连接,选择PC机使用的串口(本实验为COM1),并将该串口设置为波特率9600波特、数据位8位、奇偶校验位无、停止位1位、数据流控制无。或者直接点击“还原为默认值”即可;如图2所示。

图2 com1属性对话框 图3 超级终端登陆界面

1 以上两步在packet tracer软件操作为:鼠标点击PC,然后选择“Desktop”,再点击tenminal。 (3)进入超级终端程序后,单击“回车”键,系统将收到交换机的回送信息,如图3。

2、交换机配置模式及帮助

交换机配置模式是用于不同级别的命令对交换机进行配置,同时提供了一定的安全性、规范性。

3、交换机工作模式切换

(1)登陆交换机,进入用户模式。连接交换机并且登陆。请注意现在交换机上的显示符号。显示如下:Switch>

(2)使用命令(?)查看在用户模式下所支持的命令。

Exec commands: Seion number to resume connect Open a terminal connection disconnect Disconnect an existing network connection enable Turn on privileged commands exit Exit from the EXEC logout Exit from the EXEC ping Send echo meages resume Resume an active network connection show Show running system information telnet Open a telnet connection terminal Set terminal line parameters traceroute Trace route to destination (3)进入特权模式,输入(enable)。如果交换机有密码保护那么此时需要输入确认密码。注意现在的提示符和用户模式的差别,Switch# (4)使用命令(?)查看在特权模式下所支持的命令,注意和用户模式下的区别。

Exec commands: Seion number to resume clear Reset functions clock Manage the system clock configure Enter configuration mode connect Open a terminal connection copy Copy from one file to another debug Debugging functions (see also \'undebug\') delete Delete a file dir List files on a filesystem disable Turn off privileged commands disconnect Disconnect an existing network connection enable Turn on privileged commands erase Erase a filesystem exit Exit from the EXEC logout Exit from the EXEC more Display the contents of a file no Disable debugging informations ping Send echo meages 2 reload Halt and perform a cold restart resume Resume an active network connection setup Run the SETUP command facility (5)进入全局配置模式,输入命令(configure terminal 或 config t)。提示符显示如下:Switch(config) # (6)使用命令(?)查看在全局配置模式下所支持的配置命令。

Configure commands: banner Define a login banner boot Boot Commands cdp Global CDP configuration subcommands clock Configure time-of-day clock do To run exec commands in config mode enable Modify enable paword parameters end Exit from configure mode exit Exit from configure mode hostname Set system\'s network name interface Select an interface to configure ip Global IP configuration subcommands line Configure a terminal line mac-addre-table Configure the MAC addre table no Negate a command or set its defaults service Modify use of network based services spanning-tree Spanning Tree Subsystem username Establish User Name Authentication vlan Vlan commands vtp Configure global VTP state (7)退出全局配置模式,使用快捷键(Ctrl+Z)退出全局配置模式,进入特权模式。也可以使用命令(exit)退出全局配置模式。

(8)退出特权模式,使用命令(disable)从特权模式会到用户模式。

(9)退出交换机,使用命令(exit)退出交换机。这个命令可以用来从特权模式中退出交换机。

4、交换机名称、口令设置

(1)通过超级终端进入交换机,并进入全局模式,键入命令:

Switch(config)#hostname switch2950 Switch2950 (config)# 交换机的命令提示行的名称由Switch更改为Switch2950。

(2)全局模式下,设定明文口令cisco,此口令可以限制对特权模式的访问。在配置文件中可以看见口令。

Switch2950 (config)#enable paword cisco (3)全局模式下,设定加密口令Cisco,此口令可以限制对特权模式的访问。

Switch2950 (config)#enable secret cisco (4)接口模式下,设定控制台终端的登陆口令为cisco。

Switch2950 (config)#line console 0 //进入接口模式 Switch2950 (config-line)#login //会提示设置密码

3 Switch2950 (config-line)#paword cisco (5)接口模式下,设定远程登陆口令为cisco Switch2950 (config)#line vty 0 4 Switch2950 (config)#login Switch2950 (config)#paword cisco 注:vty 0 4 是5个不同的虚拟终端连接。

(6)以上口令设置中,除了enable secret设置加密口令外,其余均可通过show run命令在配置文件中查看。可以通过全局命令将明文口令加密。

Switch2950 (config)#service paword-encryption (7)交换机命令历史,Cisco交换机会保存输入过的命令,并可以对保存的命令的个数进行设置,同时可以再次通过快捷方式进行使用,这在再次输入很长或很复杂的命令时很有用。缺省情况下,系统会保存10条命令,最大可以设置256条命令。

设置命令行数为100 Switch2950#terminal history size 100 (8)任何时候可以使用show running-config命令查看命令配置,可以在特权模式下使用copy running-config startup-config命令保存配置。

5、交换机VLAN设定

(1)在Cisco 2950上定义三个VLAN,分别取名为engineer , account, manager; Switch#vlan database VLAN 3 added: Name: engineer Switch(vlan)#vlan 4 name account VLAN 4 added: Name: account Switch(vlan)#vlan 5 name manager VLAN 5 added: Name: manager Switch(vlan)#apply

//进入vlan配置模式,database为虚拟局域网编号

Switch(vlan)#vlan 3 name engineer //定义vlan名称及vlan号

(2)将端口12-15 加入到engineer 当中,端口16-18 加入到account 当中,端口24 加入到manager 当中。

Switch(config)#interface range fastEthernet 0/12 – 15 //将端口12-15加入到vlan中

Switch(config-if-range)#switchport mode acce Switch(config-if-range)#switchport acce vlan 3 Switch(config-if-range)#interface range fastethernet 0/16 - 18 Switch(config-if-range)#switchport mode acce Switch(config-if-range)#switchport acce vlan 4 Switch(config)#interface fastethernet 0/24 //将一个端口加入到vlan中,单端口模式 Switch(config-if)#switchport mode acce Switch(config-if)#switchport acce vlan 5 (3)返回到特权模式,用 show vlan查看vlan情况。

计算机网络原理实验三

计算机网络原理实验三

计算机网络实验

计算机网络实验

计算机网络实验心得体会

计算机网络实验3

计算机网络实验教学大纲

计算机网络实验心得

计算机网络实验心得

计算机网络实验心得

计算机网络实验三报告
《计算机网络实验三报告.doc》
将本文的Word文档下载到电脑,方便编辑。
推荐度:
点击下载文档
点击下载本文文档