[计算机硬件及网络]09网络实验报告_第1页
[计算机硬件及网络]09网络实验报告_第2页
[计算机硬件及网络]09网络实验报告_第3页
[计算机硬件及网络]09网络实验报告_第4页
[计算机硬件及网络]09网络实验报告_第5页
已阅读5页,还剩32页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、.20112012学年第一学期实验报告专业: 计算机科学与应用 课程: 计算机网络 班级: 09计本 学号: 200916704136 姓名: 姚毅通 教师: 陈瑞志 分数: 寸金学院信息技术系 目录实验一 交换机的基本配置实验二 交换机VLAN间的通信实验三 帧中继实验实验四 实现不同vlan动态获取IP实验一 交换机的基本配置一、实验目的1了解交换机的基本工作原理和VLAN概念2学会交换机的基本配置命令3学会交换机的VLAN配置方法.二、实验要求 1.通过对交换机的配置,给交换机设置IP及其的虚拟网划分2.利用交换机的命令,测试不同虚拟网端口的连通情况 三、实验环境 1.硬件:计算机两台,

2、可网管的CISCO交换机一台,CISCO配置命令线缆一条,直连标准网线两条2.软件:计算机中已安装好Windows XP操作系统四、实验内容(1)设置交换机用于管理的IP地址和缺省网关(2)建立VLAN(3)交换机端口VLAN划分(4)测试VLAN连通情况五、实验步骤 (1)设置交换机用于管理的IP地址和缺省网关在交换机命令提示如下:Switch>enSwitch#config tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#interface vlan 1Switch(config-

3、if)#ip address Switch(config-if)#no shutdown%LINK-5-CHANGED: Interface Vlan1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to upSwitch(config-if)#exitSwitch(config)#ip default-gateway 00Switch(config)#exitSwitch#%SYS-5-CO

4、NFIG_I: Configured from console by consoleSwitch#show running-configBuilding configuration.Current configuration : 995 bytes!version 12.1no service timestamps log datetime msecno service timestamps debug datetime msecno service password-encryption!hostname Switch!interface FastEthernet0/1!interface

5、FastEthernet0/2!interface FastEthernet0/3!interface FastEthernet0/4!interface FastEthernet0/5Switch#writeBuilding configuration.OKSwitch#disableSwitch>建立VLANSwitch>enSwitch#config tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#vlan 2Switch(config-vlan)#name test1Sw

6、itch(config-vlan)#exitSwitch(config)#vlan 3Switch(config-vlan)#name test2Switch(config-vlan)#exit使用命令:Switch#show vlan 查询如下图删除VLAN 2,输入的命令Switch(config)#no vlan 2Switch>enSwitch#config tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#no vlan 2Switch(config)#exit交换机端口VLA

7、N划分witch#Switch#config tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#interface rang fastEthernet 0/1-2Switch(config-if-range)#switchport access vlan 2%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to downSwitch(config-if-range)#no shutdownSwitch(co

8、nfig-if-range)#exitSwitch(config-if-range)#interface rang fastEthernet 0/3-4Switch(config-if-range)#switchport access vlan 3Switch(config-if-range)#no shutdownSwitch(config-if-range)#exitSwitch(config)#exitSwitch#使用命令Switch#show vlan,结果如下: 测试VLAN连通情况将A1设置如下:将B1设置如下:当A1连接交换机0/1端口,B1连接交换机0/2端口,用ping命令

9、查询如下 当A1连接交换机0/1端口,B1连接交换机0/3端口,用ping命令查询如下当A1连接交换机0/4端口,B1连接交换机0/3端口,用ping命令查询如下当A1连接交换机0/2端口,B1连接交换机0/3端口,用ping命令查询如下六、实验结论根据给交换机的设置,可以使得其建立起不同的虚拟网,而使得连接在不同虚拟网端口上的PC机无法连通,否则在同一虚拟网上的PC机可以连通。实验二 交换机VLAN间的通信一、实验目的实现跨交换机VLAN间的通信二、实验要求通过对交换机的配置,使得同一虚拟网的计算机连通三、实验环境硬件:计算机四台,两台交换机,一台路由器,五条直通线,一条交叉线软件:计算机中

10、已安装好Windows XP 操作系统如下图1-1所示:图2-1四、实验内容配置好两台交换机的虚拟网划分,使得所在的两台计算机在不同的虚拟网,PC0和PC2在虚拟网vlan 2,PC1和PC3在虚拟网vlan 3,最后实现他们在同一虚拟网的两台计算机可以连通,否则,不能连通。五、实验步骤(!)建立好实验的环境,如1-1,以及对计算机的IP设置将PC0设置如下:将PC1设置如下:将PC2设置如下:将PC3设置如下:(2)对Multilayer Switch0交换机的配置如下Switch>enSwitch#config tEnter configuration commands, one p

11、er line. End with CNTL/Z.Switch(config)#vlan 2Switch(config-vlan)#exitSwitch(config)#vlan 3Switch(config-vlan)#exitSwitch(config)#int fa 0/1Switch(config-if)#sw access vlan 2Switch(config-if)#exitSwitch(config)#int fa 0/2Switch(config-if)#sw access vlan 3Switch(config-if)#exitSwitch(config)#int fa 0

12、/24Switch(config-if)#sw mode trunk%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to upSwitch(config-if)#exitSwitch(config)#int fa 0/20Switch(config-if)#sw mode trunk%LINEPROTO-5-UP

13、DOWN: Line protocol on Interface FastEthernet0/20, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/20, changed state to upSwitch(config-if)#exitSwitch(config)#(3)对Switch0交换机的配置如下Switch>enSwitch#config tEnter configuration commands, one per line. End with CNTL/Z.

14、Switch(config)#vlan 2Switch(config-vlan)#exitSwitch(config)#vlan 3Switch(config-vlan)#exitSwitch(config)#int fa 0/1Switch(config-if)#sw access vlan 2Switch(config-if)#exitSwitch(config)#int fa 0/2Switch(config-if)#sw access vlan 3Switch(config-if)#exitSwitch(config)#int fa 0/24Switch(config-if)#sw m

15、ode trunkSwitch(config-if)#exitSwitch(config)#(4)对Router0的配置如下Router>enRouter#config tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#int fa 0/0.1%LINK-5-CHANGED: Interface FastEthernet0/0.1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEtherne

16、t0/0.1, changed state to upRouter(config-subif)#encapsulation dot1q 2Router(config-subif)#ip address 0 Router(config-subif)#exitRouter(config)#int fa 0/0.2%LINK-5-CHANGED: Interface FastEthernet0/0.2, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthe

17、rnet0/0.2, changed state to upRouter(config-subif)#encapsulation dot1q 3Router(config-subif)#ip address 0 % overlaps with FastEthernet0/0.1Router(config-subif)#exitRouter(config)#int fa 0/0Router(config-if)#no ip addressRouter(config-if)#no shutRouter(config-if)#e

18、xitRouter(config)#(5)用ping命令验证计算机的连通情况如下当计算机PC0 ping PC2如下当计算机PC0 ping PC1如下当计算机PC0 ping PC3如下当计算机PC3 ping PC1如下当计算机PC3 ping PC0如下当计算机PC3 ping PC2如下六、实验结论通过对计算机PC0,PC1,PC2,PC3,交换机,路由器的配置,使得计算机PC0和PC2在虚拟网VLAN2内,计算机PC1和PC3在虚拟网VLAN3内,最后在交换机上实现VLAN间的通信,使在同一虚拟网的两台计算机或更多的计算机可以连通,综上所得进行同一网络中划分不同的虚拟局域网有着很重要

19、的作用。实验三 帧中继实验一、实验目的 1.掌握帧中继技术的原理。2.了解帧中继的工作过程。3.熟悉掌握帧中继实验。二、实验要求 通过掌握帧中继的原理和工作过程,完成帧中继实验。三、实验环境 CISCO计算机,交换机,路由器,所需配线,已安装好Windows XP 操作系统的计算机。四、实验内容 通过掌握帧中继的原理和工作过程,完成帧中继实验。五、实验步骤 图3-1图3-2图3-3根据图3-1,图3-2,图3-3所示,进行路由器的配置:路由器S0的配置:S0#sh runBuilding configuration.Current configuration : 908 bytes!versi

20、on 12.3no service password-encryption!hostname S0!interface FastEthernet0/0 ip address 54  duplex auto speed auto!interface FastEthernet0/1 no ip address duplex auto speed auto shutdowninterface Serial0/0/0 no ip address encapsula

21、tion frame-relay ietf /encapsulation encapsulation-type封装协议类型,取值有:ppp、frame-relay、x25、hdlc、lapb、slip。在同步串行口(Serial)可用的取值有:(如表3-1)表3-1PPP点到点链路协议(Point to Point Protocol)frame-relay帧中继链路协议X25X.25分组交换协议HDLC高级数据链路控制协议(High Data Link Control)LAPBX.25第二层协议(Link Access Protocol,Balanced)在异步串行口(Async)可用的取值有

22、:(如表3-1)表3-2PPP点到点链路协议(Point to Point Protocol)SLIP串行互联协议(Serial Link Internet Protocol)缺省值:同步串行口的缺省封装协议为HDLC,异步串行口的缺省封装协议为SLIP。(注:不同品牌的设备缺省封装协议可能不同)命令模式:接口配置模式。适用接口:同步串行口(Serial)、异步串行口(Async)。说明:你必须保证相连的两个设备接口上的封装协议是相同的,协议不同不能通信。范例:Ruijie(config)#interface s1/0Ruijie(config-if)#encapsulation pppFra

23、me-Relay是帧中继链路协议,它有两种:cisco 和 ietf。锐捷路由器缺省使用 cisco 类型,如果想要使用 ietf 类型,需要在命令中加上 ietf 关键字。用 show interface 命令可查看接口的封装协议类型。注意:使用哪一种类型的帧中继封装取决于ISP的帧中继接入设备,你必须保证你的封装类型和ISP的封装类型一致。目前,国内的ISP多采用 ietf 封装类型。interface Serial0/0/0.12 point-to-pointRouter(config-subif)# ip address Ro

24、uter(config-subif)# frame-relay interface-dlci 102/添加dlci号102!interface Serial0/0/0.13 point-to-pointRouter(config-subif)# ip address Router(config-subif)#frame-relay interface-dlci 103!interface Vlan1 no ip address shutdown!router eigrp 100 network

25、 network  network  auto-summary!ip classless!ip dhcp excluded-address 00 54!ip dhcp pool  network  default-router 54 dns-server 51!line con 0line vty 0 4 log

26、in!end路由器R2的配置:R2#sh runBuilding configuration.Current configuration : 908 bytes!version 12.3no service password-encryption!hostname R2!interface FastEthernet0/0 ip address 54  duplex auto speed auto!interface FastEthernet0/1 no ip address duplex aut

27、o speed auto shutdown!interface Serial0/0/0 no ip address encapsulation frame-relay ietf!interface Serial0/0/0.21 point-to-point ip address  frame-relay interface-dlci 201!interface Serial0/0/0.23 point-to-point ip address 255.2

28、55.255.0 frame-relay interface-dlci 203!interface Vlan1 no ip address shutdown!router eigrp 100 network  network  network  auto-summary!ip classless!ip dhcp excluded-address 00 54!ip dhcp pool  network

29、  default-router 54 dns-server 51!line con 0line vty 0 4 login!end路由器R3的配置:R3#sh runBuilding configuration.Current configuration : 908 bytes!version 12.3no service password-encryption!hostname R3!interface FastEthernet0/0 ip addres

30、s 54  duplex auto speed auto!interface FastEthernet0/1 no ip address duplex auto speed auto shutdown!interface Serial0/0/0 no ip address encapsulation frame-relay ietf!interface Serial0/0/0.31 point-to-point ip address

31、  frame-relay interface-dlci 301!interface Serial0/0/0.32 point-to-point ip address  frame-relay interface-dlci 302!interface Vlan1 no ip address shutdown!router eigrp 100 network  network  network 1

32、 auto-summary!ip classless!ip dhcp excluded-address 00 54!ip dhcp pool  network  default-router 54 dns-server 51!line con 0line vty 0 4 login!end在该实验中DNS服务器IP为:51;WEB服务器的IP地址为:192

33、.168.20.253(url/url)。下面看看路由表吧:S0:S0#SH IP ROUTECodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area       N1 - OSPF NSSA external type 1, N2 - OSPF NSS

34、A external type 2       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area       * - candidate default, U - per-user sta

35、tic route, o - ODR       P - periodic downloaded static routeGateway of last resort is not setC    /24 is directly connected, Serial0/0/0.13C    /24 is directly connected, Serial0/0/0.12D    /

36、24 90/2681856 via , 01:01:01, Serial0/0/0.12                    90/2681856 via , 01:00:36, Serial0/0/0.13C    /24 is directly connected, FastEthernet0/0D

37、60;   /24 90/2172416 via , 01:00:36, Serial0/0/0.13D    /24 90/2172416 via , 01:00:58, Serial0/0/0.12 R2:R2#SH IP ROUTECodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP     

38、60; D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP      

39、i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area       * - candidate default, U - per-user static route, o - ODR       P - periodic downloaded static routeGateway of last resort is not setD    192.168.

40、1.0/24 90/2681856 via , 01:01:37, Serial0/0/0.21                    90/2681856 via , 01:01:15, Serial0/0/0.23C    /24 is directly connected, Serial0/0/0.21C&

41、#160;   /24 is directly connected, Serial0/0/0.23D    /24 90/2172416 via , 01:01:37, Serial0/0/0.21D    /24 90/2172416 via , 01:01:17, Serial0/0/0.23C    /24 is directly connec

42、ted, FastEthernet0/0 R3:R3#R3#SH IP ROUTECodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA

43、 external type 2       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area       * - candidate default, U - per-user stat

44、ic route, o - ODR       P - periodic downloaded static routeGateway of last resort is not setC    /24 is directly connected, Serial0/0/0.31D    /24 90/2681856 via , 01:02:15, Serial0/0/0.32   

45、                 90/2681856 via , 01:02:08, Serial0/0/0.31C    /24 is directly connected, Serial0/0/0.32D    /24 90/2172416 via , 01:02:08, Seria

46、l0/0/0.31C    /24 is directly connected, FastEthernet0/0D    /24 90/2172416 via , 01:02:15, Serial0/0/0.32通过路由表,我们可以知道网络联通了。在PC0访问53(url/url),结果如图3-4所示:图3-4六、实验结论综上所述,基本了解帧中继原理与工作过程,还有掌握了帧中继链路协议及其注意事项,帧中继实验也非常成功。实验四 实现不同vla

47、n动态获取IP一、实验目的 1. 掌握vlan配置方法。2. 实现不同vlan动态获取IP。二、实验要求 利用PC通过VLAN自动获取IP地址,去访问公网上面的WWW服务器。三、实验环境 CISCO路由器一个, CISCO交换机一台,CISCO配置命令线缆若干,安装了window XP的计算机一台。四、实验内容 通过一个路由器,再接了一台交换机,然后在交换机上面划分两个VLAN,通过PC各自的VLAN自动获取IP地址,然后实现访问公网上面的WWW服务器。五、实验步骤图2-1根据上述内容和图2-1,进行RouteS0端的配置:Router>en Router#conf t nter

48、 configuration commands, one per line.  End with CNTL/Z. Router(config)#no ip domain-lookup Router(config)#host Server Server(config)#line con 0 Server(config-line)#logg syn Server (config-line)#exec-timeout 0 0 Server (config-line)#exit Server (config)#int s0/0/0 Server (config-if)#ip add 202.

49、1.1.1 Server(config-if)#ip nat outside Server (config-if)#no shut %LINK-5-CHANGED: Interface Serial0/0/0, changed state to down Server (config-if)#int fa0/0 Server(config-if)#ip nat inside Server (config-if)#no shut %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up %LINEP

50、ROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up Server (config-if)#exit Server(config)#access-list 1 permit 55 Server(config)#ip nat inside source list 1 interface s0/0/0 overload Server (config)#ip route s0/0/0 Server (config)#exit S

51、erver#进行ISP端的配置:Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#host ISPISP(config)#no ip domain-lookupISP(config)#line con 0ISP(config-line)#logg synISP(config-line)#exec-timeout 0 0ISP(config-line)#exitISP(config)#int s0/0/0ISP(config-if)#ip

52、add ISP(config-if)#no shut%LINK-5-CHANGED: Interface Serial0/0/0, changed state to upISP(config-if)#clock rate 64000ISP(config-if)#exit%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to upISP(config)#int fa0/0ISP(config-if)#ip add 255.255.2

53、55.0ISP(config-if)#no shut%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upISP(config-if)#int fa0/1ISP(config-if)#ip add ISP(config-if)#no shut%LINK-5-CHANGED: Interface FastEther

54、net0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upISP(config-if)#exitISP(config)#现在我们将DNS服务器配置起来:(如图2-2, 图2-3所示)图2-2图2-3再做一个域名解析,以便给那4台PC通过这个域名去访问WWW服务器,然后进行配置WWW服务器:(如图2-4, 图2-5所示)图2-4图2-5进行配置交换机!划分两个VLAN:Switch>en Switch#conf t En

55、ter configuration commands, one per line.  End with CNTL/Z. Switch(config)#vlan 2 Switch(config-vlan)#exit Switch(config)#vlan 3 Switch(config-vlan)#exit Switch(config)#int range fa0/1 -2 Switch(config-if-range)#sw acc vlan 2 Switch(config-if-range)#exit Switch(config)#int range fa0/3 -4 Switch(config-if-range)#sw acc vlan 3 Switch(config-if-range)#exit Switch(config)#int fa0/24 Switch(config-if)#sw mode trunk %LINE

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论