计算机网络课程实验报告.docx

上传人:b****6 文档编号:12914670 上传时间:2023-06-09 格式:DOCX 页数:58 大小:633.39KB
下载 相关 举报
计算机网络课程实验报告.docx_第1页
第1页 / 共58页
计算机网络课程实验报告.docx_第2页
第2页 / 共58页
计算机网络课程实验报告.docx_第3页
第3页 / 共58页
计算机网络课程实验报告.docx_第4页
第4页 / 共58页
计算机网络课程实验报告.docx_第5页
第5页 / 共58页
计算机网络课程实验报告.docx_第6页
第6页 / 共58页
计算机网络课程实验报告.docx_第7页
第7页 / 共58页
计算机网络课程实验报告.docx_第8页
第8页 / 共58页
计算机网络课程实验报告.docx_第9页
第9页 / 共58页
计算机网络课程实验报告.docx_第10页
第10页 / 共58页
计算机网络课程实验报告.docx_第11页
第11页 / 共58页
计算机网络课程实验报告.docx_第12页
第12页 / 共58页
计算机网络课程实验报告.docx_第13页
第13页 / 共58页
计算机网络课程实验报告.docx_第14页
第14页 / 共58页
计算机网络课程实验报告.docx_第15页
第15页 / 共58页
计算机网络课程实验报告.docx_第16页
第16页 / 共58页
计算机网络课程实验报告.docx_第17页
第17页 / 共58页
计算机网络课程实验报告.docx_第18页
第18页 / 共58页
计算机网络课程实验报告.docx_第19页
第19页 / 共58页
计算机网络课程实验报告.docx_第20页
第20页 / 共58页
亲,该文档总共58页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

计算机网络课程实验报告.docx

《计算机网络课程实验报告.docx》由会员分享,可在线阅读,更多相关《计算机网络课程实验报告.docx(58页珍藏版)》请在冰点文库上搜索。

计算机网络课程实验报告.docx

计算机网络课程实验报告

电子科技大学计算机科学与工程学院

 

标准实验报告

 

课程名称计算机网络基础

 

电子科技大学教务处制表

 

电子科技大学

实验报告

学生姓名:

xx学号:

指导教师:

实验地点:

实验时间:

实验1交换机基本配置

【实验名称】交换机的基本配置

【实验学时】2

【实验原理】

交换机的管理方式基本分为两种:

带内管理和带外管理。

通过交换机的Console口管理交换机属于带外管理,不占用交换机的网络接口,其特点是需要使用配置线缆,近距离配置。

第一次配置交换机时必须利用Console端口进行配置。

交换机的命令行操作模式,主要包括:

用户模式、特权模式、全局配置模式、端口模式等几种。

●用户模式进入交换机后得到的第一个操作模式,该模式下可以简单查看交换机的软、硬件版本信息,并进行简单的测试。

用户模式提示符为switch>

●特权模式由用户模式进入的下一级模式,该模式下可以对交换机的配置文件进行管理,查看交换机的配置信息,进行网络的测试和调试等。

特权模式提示符为switch#

●全局配置模式属于特权模式的下一级模式,该模式下可以配置交换机的全局性参数(如主机名、登录信息等)。

在该模式下可以进入下一级的配置模式,对交换机具体的功能进行配置。

全局模式提示符为switch(config)#

●端口模式属于全局模式的下一级模式,该模式下可以对交换机的端口进行参数配置。

端口模式提示符为switch(config-if)#

【实验目的】

掌握交换机命令行各种操作模式的区别,能够使用各种帮助信息,以及用命令进行基本的配置。

【实验内容】

\假设是某公司新进的网管,公司要求你熟悉网络产品,公司采用全系列锐捷网络产品,首先要求你登录交换机,了解、掌握交换机的命令行操作技巧,以及如何使用一些基本命令进行配置。

需要在交换机上熟悉各种不同的配置模式以及如何在配置模式间切换,使用命令进行基本的配置,并熟悉命令行界面的操作技巧。

【实验设备】

三层交换机1台

【实验步骤】

第一步:

交换机各个操作模式直接的切换

第二步:

交换机命令行界面基本功能

第三步:

配置交换机的名称和每日提示信息

Switch(config)#hostnameSW-1

使用hostname命令更改交换机的名称

SW-1(config)#bannermotd$

使用banner命令设置交换机的每日提示信息,参数motd指定以哪个字符为信息的结束符

第四步:

配置接口状态

锐捷全系列交换机Fastethernet接口默认情况下是10M/100Mbit/s自适应端口,双工模式也为自适应(端口速率、双工模式可配置)。

默认情况下,所有交换机端口均开启。

如果网络中存在一些型号比较旧的主机,还在使用10Mbit/s半双工的网卡,此时为了能够实现主机之间的正常访问,应当在交换机上进行相应的配置,把连接这些主机的交换机端口速率设为10Mbit/s,传输模式设为半双工。

第五步:

查看交换机的系统和配置信息

SW-1#showversion

查看交换机的系统信息

SW-1#showrunning-config

查看交换机的配置信息

第六步:

保存配置

下面的3条命令都可以保存配置。

SW-1#copyrunning-configstartup-config

SW-1#writememory

SW-1#write

【实验数据及结果分析】

SW-1#showrunning-config

Buildingconfiguration...

Currentconfiguration:

1116bytes

!

version12.2

noservicetimestampslogdatetimemsec

noservicetimestampsdebugdatetimemsec

noservicepassword-encryption

!

hostnameSW-1

!

interfaceFastEthernet0/1

description"ThisisaAccessport"

duplexhalf

speed10

!

interfaceFastEthernet0/2

!

interfaceFastEthernet0/3

!

interfaceFastEthernet0/4

!

interfaceFastEthernet0/5

!

interfaceFastEthernet0/6

!

interfaceFastEthernet0/7

!

interfaceFastEthernet0/8

!

interfaceFastEthernet0/9

!

interfaceFastEthernet0/10

!

interfaceFastEthernet0/11

!

interfaceFastEthernet0/12

!

interfaceFastEthernet0/13

!

interfaceFastEthernet0/14

!

interfaceFastEthernet0/15

!

interfaceFastEthernet0/16

!

interfaceFastEthernet0/17

!

interfaceFastEthernet0/18

!

interfaceFastEthernet0/19

!

interfaceFastEthernet0/20

!

interfaceFastEthernet0/21

!

interfaceFastEthernet0/22

!

interfaceFastEthernet0/23

!

interfaceFastEthernet0/24

!

interfaceGigabitEthernet0/1

!

interfaceGigabitEthernet0/2

!

interfaceVlan1

noipaddress

shutdown

!

ipclassless

!

bannermotd^C

^C

!

linecon0

linevty04

login

!

!

!

end

【实验结论】

了解了交换机的命令行界面和基本操作,通过简单的操作完成了交换机的基本配置

【总结及心得体会】

命令行操作进行自动补齐或命令简写时,要求所简写的字母必须能够惟一区别该命令。

配置设备名称的有效字符是22个字节。

【对本实验过程及方法、手段的改进建议会】

希望能进一步了解产生的配置文件的具体说明

实验2跨交换机实现VLAN

【实验名称】跨交换机实现VLAN

【实验学时】2

【实验原理】

VLAN(VirtualLocalAreaNetwork,虚拟局域网)是指在一个物理网段内,进行逻辑的划分,划分成若干个虚拟局域网。

VLAN最大的特性是不受物理位置的限制,可以进行灵活的划分。

VLAN具备了一个物理网段所具备的特性。

相同VLAN内的主机可以互相直接访问,不同VLAN间的主机之间互相访问必须经由路由设备进行转发。

广播数据包只可以在本VLAN内进行传播,不能传输到其他VLAN中。

PortVlan是实现VLAN的方式之一,PortVlan是利用交换机的端口进行VLAN的划分,一个端口只能属于一个VLAN。

TagVlan是基于交换机端口的另外一种类型,主要用于实现跨交换机的相同VLAN内主机之间可以直接访问,同时对于不同VLAN的主机进行隔离。

TagVlan遵循了IEEE802.1q协议的标准。

在利用配置了Tagvlan的接口进行数据传输时,需要在数据帧内添加4个字节的802.1q标签信息,用于标识该数据帧属于哪个VLAN,以便于对端交换机接收到数据帧后进行准确的过滤。

【实验目的】

掌握如何在交换机上划分基于端口的VLAN、如何给VLAN内添加端口,理解跨交换机之间VLAN的特点。

【实验内容】

假设某企业有两个主要部门:

销售部和技术部,其中销售部门的个人计算机系统连接在不同的交换机上,他们之间需要相互进行通信,但为了数据安全起见,销售部和技术部需要进行相互隔离,现要在交换机上做适当配置来实现这一目标。

通过划分PortVLAN实现交换机的端口隔离,然后使在同一VLAN里的计算机系统能跨交换机进行相互通信,而在不同VLAN里的计算机系统不能进行相互通信。

【实验设备】

三层交换机1台

二层交换机1台

【实验步骤】

第一步:

配置两台交换机的主机名

第二步:

在三层交换机上划分VLAN添加端口

第三步:

在二层交换机上划分VLAN添加端口

第四步:

设置交换机之间的链路为Trunk

第五步:

查看VLAN和Trunk的配置

L2-SW#showvlan

L2-SW#showinterfacesfastEthernet0/1switchport

L3-SW#showvlan

L3-SW#showinterfacesfastEthernet0/1switchport

第六步:

验证配置

PC3和PC1都属于VLAN10,它们的IP地址都在C类网络192.168.10.0/24内,PC2属于VLAN20,它的IP地址在C类网络192.168.20.0/24内,可以看到从PC3是可以ping通PC1的,如图3-2所示,而从PC3是不能ping通PC2的,如图3-3所示。

图3-2从PC3可以ping通PC1

图3-3从PC3不能ping通PC2

此时,如果把PC1的连线转移到属于VLAN20的端口上去,PC3和PC1将不再能够ping通了,如图3-4所示。

【实验数据及结果分析】

L3-SW

L3-SW#showrunningconfigure

^

%Invalidinputdetectedat'^'marker.

L3-SW#showrunning-config

Buildingconfiguration...

Currentconfiguration:

1613bytes

!

version12.2

noservicetimestampslogdatetimemsec

noservicetimestampsdebugdatetimemsec

noservicepassword-encryption

!

hostnameL3-SW

!

!

!

interfaceFastEthernet0/1

switchporttrunkencapsulationdot1q

switchportmodetrunk

!

interfaceFastEthernet0/2

!

interfaceFastEthernet0/3

!

interfaceFastEthernet0/4

!

interfaceFastEthernet0/5

!

interfaceFastEthernet0/6

switchportaccessvlan10

switchportmodeaccess

!

interfaceFastEthernet0/7

switchportaccessvlan10

switchportmodeaccess

!

interfaceFastEthernet0/8

switchportaccessvlan10

switchportmodeaccess

!

interfaceFastEthernet0/9

switchportaccessvlan10

switchportmodeaccess

!

interfaceFastEthernet0/10

switchportaccessvlan10

switchportmodeaccess

!

interfaceFastEthernet0/11

switchportaccessvlan20

switchportmodeaccess

!

interfaceFastEthernet0/12

switchportaccessvlan20

switchportmodeaccess

!

interfaceFastEthernet0/13

switchportaccessvlan20

switchportmodeaccess

!

interfaceFastEthernet0/14

switchportaccessvlan20

switchportmodeaccess

!

interfaceFastEthernet0/15

switchportaccessvlan20

switchportmodeaccess

!

interfaceFastEthernet0/16

!

interfaceFastEthernet0/17

!

interfaceFastEthernet0/18

!

interfaceFastEthernet0/19

!

interfaceFastEthernet0/20

!

interfaceFastEthernet0/21

!

interfaceFastEthernet0/22

!

interfaceFastEthernet0/23

!

interfaceFastEthernet0/24

!

interfaceGigabitEthernet0/1

!

interfaceGigabitEthernet0/2

!

interfaceVlan1

noipaddress

shutdown

!

ipclassless

!

!

linecon0

linevty04

login

!

L2-SW

L2-SW#showrunning-config

Buildingconfiguration...

Currentconfiguration:

1286bytes

!

version12.1

noservicetimestampslogdatetimemsec

noservicetimestampsdebugdatetimemsec

noservicepassword-encryption

!

hostnameL2-SW

!

!

!

interfaceFastEthernet0/1

switchportmodetrunk

!

interfaceFastEthernet0/2

!

interfaceFastEthernet0/3

!

interfaceFastEthernet0/4

!

interfaceFastEthernet0/5

!

interfaceFastEthernet0/6

switchportaccessvlan10

switchportmodeaccess

!

interfaceFastEthernet0/7

switchportaccessvlan10

switchportmodeaccess

!

interfaceFastEthernet0/8

switchportaccessvlan10

switchportmodeaccess

!

interfaceFastEthernet0/9

switchportaccessvlan10

switchportmodeaccess

!

interfaceFastEthernet0/10

switchportaccessvlan10

switchportmodeaccess

!

interfaceFastEthernet0/11

!

interfaceFastEthernet0/12

!

interfaceFastEthernet0/13

!

interfaceFastEthernet0/14

!

interfaceFastEthernet0/15

!

interfaceFastEthernet0/16

!

interfaceFastEthernet0/17

!

interfaceFastEthernet0/18

!

interfaceFastEthernet0/19

!

interfaceFastEthernet0/20

!

interfaceFastEthernet0/21

!

interfaceFastEthernet0/22

!

interfaceFastEthernet0/23

!

interfaceFastEthernet0/24

!

interfaceGigabitEthernet1/1

!

interfaceGigabitEthernet1/2

!

interfaceVlan1

noipaddress

shutdown

!

!

linecon0

!

linevty04

login

linevty515

login

!

!

end

【实验结论】

了解了交换机的基本配置方法,VLAN的工作原理和配置方法,Trunk的工作原理和配置方法

【总结及心得体会】

VLAN1属于系统的默认VLAN,不可以被删除

删除某个VLAN,使用no命令。

例如:

switch(config)#novlan10

删除当前某个VLAN时,注意先将属于该VLAN的端口加入别的VLAN,再删除VLAN。

【对本实验过程及方法、手段的改进建议会】

希望能进一步了解vlan的实际作用价值

实验3利用三层交换机实现VLAN间路由

【实验名称】利用三层交换机实现VLAN间路由

【实验学时】4

【实验原理】

在交换网络中,通过VLAN对一个物理网络进行了逻辑划分,不同的VLAN之间是无法直接访问的,必须通过三层的路由设备进行连接。

一般利用路由器或三层交换机来实现不同VLAN之间的互相访问。

三层交换机和路由器具备网络层的功能,能够根据数据的IP包头信息,进行选路和转发,从而实现不同网段之间的访问。

直连路由是指:

为三层设备的接口配置IP地址,并且激活该端口,三层设备会自动产生该接口IP所在网段的直连路由信息。

三层交换机实现VLAN互访的原理是,利用三层交换机的路由功能,通过识别数据包的IP地址,查找路由表进行选路转发。

三层交换机利用直连路由可以实现不同VLAN之间的互相访问。

三层交换机给接口配置IP地址,采用SVI(交换虚拟接口)的方式实现VLAN间互连。

SVI是指为交换机中的VLAN创建虚拟接口,并且配置IP地址。

【实验目的】

掌握如何在三层交换机上配置SVI端口,实现VLAN间的路由。

【实验内容】

【实验设备】

三层交换机1台

二层交换机1台

【实验步骤】

第一步:

配置两台交换机的主机名

第二步:

在三层交换机上划分VLAN添加端口,并设置Trunk

第三步:

在二层交换机上划分VLAN添加端口,并设置Trunk

第四步:

查看VLAN和Trunk的配置

L2-SW#showvlan

 

L2-SW#showinterfacesfastEthernet0/1switchport

L3-SW#showvlan

L3-SW#showinterfacesfastEthernet0/1switchport

第五步:

验证配置

PC3和PC1都属于VLAN10,它们的IP地址都在C类网络192.168.10.0/24内,PC2属于VLAN20,它的IP地址在C类网络192.168.20.0/24内,此时,不同VLAN之间的PC3和PC2是不能ping通的,如图3-11所示。

图3-11从PC3不能ping通PC2

第六步:

在三层交换机上配置SVI端口

第七步:

启动三层交换机路由转发

L3-SW(config)#iprouting

第八步:

查看SVI端口的配置

L3-SW#showiproute

从中可以看到,VLAN的虚拟端口上配置的IP地址,其网段成为了三层交换机的直连路由。

L3-SW#showinterfacesvlan10

L3-SW#showinterfacesvlan20

第九步:

验证配置

给PC3添加网关192.168.10.1,如图3-12所示,此时再从PC3去ping不同VLAN的主机PC2,是可以ping通的,如图3-13所示。

图3-12为PC3设置网关

图3-13设置三层交换机后,PC3可以ping通PC2

 

【实验数据及结果分析】

L3-SW

L3-SW#showrunning-config

Buildingconfiguration...

Currentconfiguration:

1742bytes

!

version12.2

noservicetimestampslogdatetimemsec

noservicetimestampsdebugdatetimemsec

noservicepassword-encryption

!

hostnameL3-SW

!

!

!

iprouting

!

!

!

interfaceFastEthernet0/1

switchporttrunkencapsulationdot1q

switchportmodetrunk

!

interfaceFastEthernet0/2

!

interfaceFastEthernet0/3

!

interfaceFastEthernet0/4

!

interfaceFastEthernet0/5

!

interfaceFastEthernet0/6

switchportaccessvlan10

switchportmodeaccess

!

interfaceFastEthernet0/7

switchportaccessvlan10

switchportmodeaccess

!

interfaceFastEthernet0/8

switchportaccessvlan10

switchportmodeaccess

!

interfaceFastEthernet0/9

switchportaccessvlan10

switchportmodeaccess

!

interfaceFastEthernet0/10

switchportaccessvlan10

switchportmodeaccess

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 医药卫生 > 基础医学

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2