




已阅读5页,还剩32页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
XXXXXXX 大 学实习(实训)报告 名称 路由与交换 2012年 12 月 31 日至 2013 年 1 月 11日共 1 周院 系 计算机工程系 班 级 姓 名 系 主 任 教研室主任 指导教师 一、实习(实训)目的和要求学生通过本实训,能够掌握网络的基本配置和管理,熟悉常用的交换和路由设备的特点和性能,能具备网络管理员及网络工程师的基本素质。并可完成RCNA或CISCO网络工程师认证。项目一、交换机基本配置、交换机的远程登陆项目二、路由器实现不同VLAN之间互通项目三、链路聚合与生成树协议项目四、网络安全及ACL项目五、局域网和互联网之间的互连(NAT和NAPT)实验六、综合实验(选做)二、实习(实训)内容项目一、交换机基本配置、交换机的远程登陆1、 交换机基本配置2、 交换机的远程登陆项目二、路由器实现不同VLAN之间互通1、 交换机VLAN的划分2、 跨交换机实现相同VLAN的互通3、 路由器实现不同VLAN之间的通信项目三、链路聚合与生成树协议1、 链路聚合EthernetChannel(以太网通道)2、 生成树协议(STP、RSTP)项目四、网络安全及ACL1、 路由器基本配置、路由器的远程登陆2、 路由器的静态路由3、 网络安全(交换机的端口安全)4、 访问控制列表项目五、局域网和互联网之间的互连(NAT和NAPT)1、 网络地址转换NAT2、 网络地址NAPT实验六、综合实验模拟某学校网络拓扑结构.在该学校网络接入层采用S2126,接入层交换机划分了办公网VLAN2和学生网VLAN4,VLAN2和VLAN4通过汇聚层交换机S3550与路由器A相连,另3550上有一个VLAN3存放一台网管机。路由器A与B通过路由协议获取路由信息后,办公网可以访问B路由器后的FTPserver 。为了防止学生网内的主机访问重要的FTPserver,A路由器采用了访问控制列表的技术作为控制手段。F0S0S0F0ABF0/5VLAN1F0/5VLAN2VLAN4S2126S3550RA: S0=/30 F0=/24;RB: S0=/30 F0=/24S3550 :VLAN2=/24VLAN3/24VLAN4=/24FTPserverWeb server=/24VLAN3networkadmin=2/24S2126 :VLAN1=/24S3550: VLAN1=/24F0/6F0/6实验要求:1、 根据拓朴图分别在S2126和S3550创建相应VLAN,并在S2126上将F0/10-15加入VLAN2,将F0/16-20加入VLAN4,在S3550上将F0/10-12加入VLAN32、 在两台交换机之间配置实现冗余链路,解决环路问题3、 S3550通过SVI方式和RA互连4、 S3550配置实现VLAN间互连5、 RA和RB之间采用PPP链路,采用PAP方式进行验证提高链路的安全性。6、 在全网运应RIPV2实现全网互连。7、 通过访问列表控制所有人可以正常访问服务器,只有VLAN4不可以访问FTP服务。8、 通过相关命令显示相关配置结果,并进行验证三、实习(实训)方式 集中 分散 校内 校外四、实习(实训)具体安排序号教学内容题目学 时 分 配小计讲课实训1交换机基本配置、交换机的远程登陆6242路由器实现不同VLAN之间互通543链路聚合与生成树协议544网络安全及ACL4135局域网和互联网之间的互连(NAT和NAPT)436综合实验(2)(2)合 计24(2)321(2)五、实习(实训)报告内容项目一、交换机基本配置、交换机的远程登陆一、实训要求:1、交换机基本配置2、交换机的远程登陆二、实训步骤:1.1 交换机基本配置1.实验拓扑图如图1-1所示2.实验步骤如下:1) 进入特权模式:Switchenable2) 进入全局模式:Switch#config terminalEnter configuration commands, one per line. End with CNTL/Z.3) 给交换机重命名:Switch (config)#hostname switchA4) 给交换机配置IP地址和子网掩码:switchA(config)#int vlan 1switchA(config-if)#ip address /*设置交换机管理用IP5) 开启端口:switchA(config-if)#no shutdownSwitchA(config-if)#exit6)设置vty登录用户需要检查口令:SwitchA(config-line)#login /*设置vty登录用户需要检查口令7)设置telnet登录超时间为5分钟,超时断开SwitchA(config-line)#exec-timeout 5 /*设置telnet登录超时间为5分钟,超时断开SwitchA(config-line)#exit8)设置端口速度为100M及端口工作方式为全双工switchA(config)#int fa0/1switchA(config-if)#speed 100 /*设置端口速度为100MswitchA(config-if)#duplex full /*设置端口工作方式为全双工1.2 交换机的远程登录SwitchA(config)#line vty 0 4 SwitchA(config-line)#password 123 /*设置telnet登录密码SwitchA(config-line)#exit1)在Pc机上验证telnet 登录密码及加密使能口令: C:telnet 输入123, 连到交换机上,出现Switch提示。2)在交换机上设置特权密码保护:switchA(config)#enable secret 456 /*设置使能密码switchA(config)#enable password 456输入en,提示输入密码:输入456,进入特权模式。项目二、路由器实现不同VLAN之间互通一、实训要求:1、交换机VLAN的划分2、跨交换机实现相同VLAN的互通3、路由器实现不同VLAN之间的通信二、实训步骤:2.1 交换机VLAN的划分1实验拓扑图如下:2.实验步骤如下:Switchenable /*进入特权模式Switch#configure terminal /*进入全局配置模式Enter configuration commands, one per line. End with CNTL/Z.Switch(config)#exitSwitch#vlan databaseSwitch(vlan)# vlan 2 /*创建vlan2VLAN 2 added: Name:VLAN0002Switch(vlan)#vlan 3 /*创建vlan3VLAN 3 added:Name:VLAN0003Switch(vlan)#exitSwitch#con tSwitch(config)#interface fa0/2 Switch(config-if)#switchport access vlan 2 /*把端口1加入vlan2Switch(config-if)#interface fa0/4Switch(config-if)#switchport access vlan 2 /*把端口2加入vlan2Switch(config-if)#interface fa0/10Switch(config-if)#switchport access vlan 3 /*把端口3加入vlan3Switch(config-if)#endSwitch #show vlan /*显示vlan的相关特性:2、PC机配置:Pc1 :C:ipconfig /ip Pc2 :C:ipconfig /ip Pc3 :C:ipconfig /ip 3、 实验验证:1)未划分vlan之前,三台都能Ping通;PC1中pingPC2、PC3:PC2中pingPC3:2) 划分后,PC1和PC2在同一个vlan下,能Ping通;3) 划分后,PC1和PC3不在同一个vlan下,不能Ping通。2.2 跨交换机实现相同VLAN的互通1实验拓扑图如下:2实验步骤如下:1、给三层交换机重命名:SwitchenableSwitch#configSwitch(config)#hostname 2、在交换机a上创建vlan 2、 vlan 3,并将端口fa0/1划分到vlan 2中,将端口fa0/2划分到vlan 3中:1)创建vlan2、vlan3:g#vlan databaseg(vlan)#vlan 2VLAN 2 added: Name: VLAN0002g(vlan)#vlan 3VLAN 3 added: Name: VLAN0003g(vlan)#exit2)进入全局配置模式:g#config 3)将端口fa0/1划分到vlan 2中:g(config)#interface fa 0/1g(config-if)#switchport access vlan 2g(config-if)#exit4)端口fa0/2划分到vlan 3中:a(config)#interface fa 0/2a(config-if)#switchport access vlan 3a(config-if)#exit5)将三层交换机的端口与二层交换机相连的端口修改为trunk模式:a(config)#interface fa 0/4a(config-if)#switchport mode trunk2.二层交换机switch 0上的相关操作:1、给交换机重命名:SwitchenSwitch#configSwitch(config)#hostname hh(config)#exit2、在交换机b上创建vlan 2,并将端口fa0/3划分到vlan 2中:1)进入vlan配置模式:h#vlan database 2) 创建vlan2:h(vlan)#vlan 2 VLAN 2 added: Name: VLAN0002h(vlan)#exit3)进入全局配置模式:h#config 4)将端口fa0/3划分到vlan 2中:h(config)#interface fa 0/3h(config-if)#switchport access vlan 2h(config-if)#exit5)将二层交换机的端口与三层交换机相连的端口修改为trunk模式:h(config)#interface fa0/4h(config-if)#switchport mode trunk3、pc配置:Pc1 :IP地址:0 子网掩码:Pc2 :IP地址:0 子网掩码:Pc3 :IP地址:0 子网掩码:4、验证PC1与PC3能相互通信,但PC1与PC2不能相互通信,PC2与PC3不能互相通信:1、在PC1中执行:C:Ping PC3的IP 能通C:Ping PC2的IP不能通2、在PC2中执行:C:Ping PC3的IP 不能通5、给交换机和PC机使得三台pc机能够互相ping通:在PC1上:1)Ping PC2的IP能通2) ping PC3的IP能通在pc2上 ping PC3的IP能通2.3路由器实现不同VLAN之间的通信交换机A的配置SwitchenableSwitch#con terEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#vlan 3VLAN 3 added: Name:VLAN0003Switch(config)#vlan 2VLAN 2 added: Name:VLAN0002Switch(config)#exitSwitch#show vlan Switch(config)#inter fa 0/1-4Switch(config-range)#switchport access vlan 2Switch(config-range)#inter fa 0/9-12Switch(config-range)#switchport access vlan 3Switch(config)#inter fa 0/6Switch(config-range)#switchport mode trunkSwitch(config)#inter vlan 2Switch(config-if)#ip address Switch(config)#inter vlan 3Switch(config-if)#ip address 路由器配置Router(config)#inter fa 0/0Router(config-if)#no shutdownRouter(config-if)#inter fast 0/0.1Router(config-subif)#encapsulation dot1q 2Router(config-subif)#ip address Router(config-subif)#inter fast 0/0.2Router(config-subif)#encapsulation dot1q 3Router(config-subif)#ip address 主机的配置主机A的配置:ip address 主机B的配置:ip address 主机C的配置:ip address 主机D的配置:ip address (五)、测试不同VLAN间的连通性1测试同一VLAN内工作站的连通性。C: PING (HOST C 与HOST D间连通性测试),通2测试不同VLAN工作站的连通性。C: PING (HOST C 与HOST A间连通性测试),通项目三、链路聚合与生成树协议一、实训要求:1、链路聚合aggregeteport2、生成树协议(STP、RSTP)二、实训步骤:3.1链路聚合EthernetChannel(以太网通道)1实验拓扑图如下:2实验步骤如下:(1) 交换机上划分vlan(2) 把端口加入vlan,并设置trunk(3) 在路由器上划分vlan,并设置IP地址(4)把端口加入vlan,并设置以太网通道3.2生成树协议(STP、RSTP)1实验拓扑图如下:2实验步骤如下:1)STP基本配置1 在交换机A上的操作在交换机switch0上查看生成树情况1)给交换机0重命名为A:SwitchenSwitch#configer terminalSwitch(config)#hostname AA(config)#exit2) 查看交换机A上生成树情况:A#show spanning-tree修改交换机A的BID优先级,让switchA成为根桥(root bridge):A(config)#spanning-tree vlan 1 priority 4096 /配置交换机的优先级2 在交换机B上的操作在交换机switch1上查看生成树情况1) 给交换机1重命名为B:Switch(config)#hostname B2) 查看交换机B上生成树情况:Switch#show spanning-tree3) 配置端口fa0/2的优先级,使之进入转发状态,使fa0/1号端口转为阻塞状态B(config)#interface fa0/2B(config-if)#spanning-tree vlan 1 port-priority 112 /配置端口的优先级对交换机B修改端口fa0/2开销:B(config)#interface fa0/2B(config-if)#spanning-tree vlan 1 cost 182)RSTP基本配置1、清除交换机原先的配置(1)清除交换机A原先存在的配置:Switch(config)#hostname AA#delete flash:vlan.dat /删除vlan 的配置信息Delete filename vlan.dat?Delete flash:/vlan.dat? confirm%Error deleting flash:/vlan.dat (No such file or directory)A#erase startup-configErasing the nvram filesystem will remove all configuration files! Continue? confirmOKErase of nvram: complete%SYS-7-NV_BLOCK_INIT: Initialized the geometry of nvramA#reload(2)清除交换机B原先存在的配置:Switch(config)#hostname BB#delete flash:vlan.datDelete filename vlan.dat?Delete flash:/vlan.dat? confirm%Error deleting flash:/vlan.dat (No such file or directory)B#erase startup-configErasing the nvram filesystem will remove all configuration files! Continue? confirmOKErase of nvram: complete%SYS-7-NV_BLOCK_INIT: Initialized the geometry of nvramB#reload2、配置2个交换机的trunk链路(1)配置交换机A的trunk链路:Switch(config)#hostname AA(config)#interface fa0/1A(config-if)#switchport mode trunkA(config)#interface fa0/2A(config-if)#switchport mode trunk(2)配置交换机B的trunk链路:Switch(config)#hostname BB(config)#interface fa0/1B(config-if)#switchport mode trunkB(config)#interface fa0/2B(config-if)#switchport mode trunk3、配置交换机A为根桥:A(config)#spanning-tree vlan 1 priority 4096A#show spanning-treeB#show spanning-treeVLAN0001 Spanning tree enabled protocol ieee Root ID Priority 4097 Address 0001.63CA.396E Cost 19 Port 1(FastEthernet0/1) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 000B.BED3.4C8A Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20Interface Role Sts Cost Prio.Nbr Type- - - - - -Fa0/2 Altn BLK 19 128.2 P2pFa0/1 Root FWD 19 128.1 P2p4、在交换机B上关闭fa0/1端口,并查看STP生成树的重新生成:B(config)#interface fa0/1B(config-if)#shutdownB(config-if)#endB#show spanning-tree5、 配置RSTP快速生成树(1)交换机A上的操作:A(config)#spanning-tree mode rapid-pvst(2)交换机B上的操作:B(config)#spanning-tree mode rapid-pvst(3)将交换机B的fa0/1端口重新打开(no shutdown 命令),等STP稳定后再关闭该端口,然后重新执行show spanning-tree,则可以发现fa0/2端口立即进入了转发状态(Fowrding).这说明RSTP的收敛速度较STP有了很大的提高。A(config)#interface fa0/1A(config-if)#no shutdown项目四、网络安全及ACL一、实训要求:1、路由器基本配置、路由器的远程登陆2、路由器的静态路由3、网络安全(交换机的端口安全)4、访问控制列表二、实训步骤:4.1路由器基本配置、路由器的远程登陆1实验拓扑图如下:2实验步骤如下:RouterA enRouterA #conf tEnter configuration commands, one per line. End with CNTL/Z.RouterA (config)#hostname RouterARouterA(config)#enable secret cwf1RouterA(config)#enable password cwf2RouterA(config)#line console 0RouterA(config-line)#password cwfRouterA(config-line)#loginRouterA(config-line)#exitRouterA(config)#line vty 0 4RouterA(config-line)#password RouterA(config-line)#loginRouterA(config-line)#end4.2路由器的静态路由RouterA#conf tEnter configuration commands, one per line. End with CNTL/Z.RouterA(config)#interface serial 0RouterA(config-if)#exitRouterA(config)#interface serial 0RouterA(config-if)#ip address RouterA(config-if)#clock rate 64000RouterA(config-if)#no shutdownRouterA(config-if)#exitRouterA(config)#interface fa 0/0RouterA(config-if)#ip address 4 RouterA(config-if)#no shutdownRouterA(config-if)#exitRouterA(config)#ip route 3 %Inconsistent address and maskRouterA(config)#exitRouterA#conf tEnter configuration commands, one per line. End with CNTL/Z.RouterA(config)#ip route serial 0RouterA(config)#exit4.3网络安全(交换机的端口安全)(1)配置交换机端口的最大连接数限制:Switch(config)#interface range fa 0/1-23Switch(config-if-range)#switchport port-securityCommand rejected: FastEthernet0/1 is a dynamic port.Command rejected: FastEthernet0/2 is a dynamic port.Command rejected: FastEthernet0/3 is a dynamic port.Command rejected: FastEthernet0/4 is a dynamic port.Command rejected: FastEthernet0/5 is a dynamic port.Command rejected: FastEthernet0/6 is a dynamic port.Command rejected: FastEthernet0/7 is a dynamic port.Command rejected: FastEthernet0/8 is a dynamic port.Command rejected: FastEthernet0/9 is a dynamic port.Command rejected: FastEthernet0/10 is a dynamic port.Command rejected: FastEthernet0/11 is a dynamic port.Command rejected: FastEthernet0/12 is a dynamic port.Command rejected: FastEthernet0/13 is a dynamic port.Command rejected: FastEthernet0/14 is a dynamic port.Command rejected: FastEthernet0/15 is a dynamic port.Command rejected: FastEthernet0/16 is a dynamic port.Command rejected: FastEthernet0/17 is a dynamic port.Command rejected: FastEthernet0/18 is a dynamic port.Command rejected: FastEthernet0/19 is a dynamic port.Command rejected: FastEthernet0/20 is a dynamic port.Command rejected: FastEthernet0/21 is a dynamic port.Command rejected: FastEthernet0/22 is a dynamic port.Command rejected: FastEthernet0/23 is a dynamic port.Switch(config-if-range)#switchport port-security maximum 1Switch(config-if-range)#switchport port-security violation shutdownSwitch(config-if-range)#endSwitch#show port-security(2)配置交换机端口的地址绑定:Switch(config)#interface fa 0/3Switch(config-if)#switchport port-security Command rejected: FastEthernet0/3 is a dynamic port.Switch(config-if)#switchport port-security mac-address4.4 访问控制列表1实验拓扑图如下:2实验步骤如下:1、步骤一:在路由器RouterA上配置接口fa0/0的IP 地址(/24)和接口fa0/1的IP 地址(/24)。RouterRouterenableRouter#configure terminalRouterA (config)#hostname RouterARouterA (config)#interface fa0/0RouterA (config-if)#ip address RouterA (config-if)#no shutdownRouterA (config-if)#exitRouterA (config)#interface fa0/1RouterA (config-if)#ip address RouterA (config-if)#no shutdown2、步骤二:配置PC1、PC2、PC3、PC4的IP,测试它们之间的连通性。PC1的配置:/WINIPIP Address. . . . . . . . . . . . : 1 Subnet Mask . . . . . . . . . . . : Default Gateway . . . . . . . . . : /此处应改为PC2的配置:WINIPIP Address. . . . . . . . . . . . : 2 Subnet Mask . . . . . . . . . . . : Default Gateway . . . . . . . . . : /此处应改为PC3的配置:WINIP IP Address. . . . . . . . . . . . : 1Subnet Mask . . . . . . . . . . . : Default Gateway . . . . . . . . . : /此处应改为PC4的配置:WINIP IP Address. . . . . . . . . . . . : 2 Subnet Mask . . . . . . . . . . . : Default Gateway . . . . . . . . . : /此处应改为或采用ipconfig /ip 1 设IP地址、子网掩码ipconfig /dg 设网关测试结果:未做ACL之前,PC1和PC3、PC4能Ping通,PC2和PC3、PC4能Ping通如果不能Ping成功,考虑交换机在pc1上Ping pc3在pc1上Ping pc4在pc2上ping pc3在pc2上ping pc4在交换机1上设置如下:Switch1(config)#interface vlan 1Switch1(config)#ip address 在交换机2上设置如下:Switch2(config)#interface vlan 1Switch2(config)#ip address 1、 步骤三:配置路由器上的标准ACL,使得只有子网中的PC1可以访问子网/24,禁止其它通信量。RouterA#configure terminalEnter configuration commands, one per line. End with CNTL/Z.RouterA(config)#access-list 1 permit host 1RouterA(config)#access-list 1 deny anyRouterA(config-if)#interface fa0/0RouterA(config-if)#ip access-group 1 inRouterA(config-if)#endRouterA#show access-list 1Standard IP access list 1 1 permit host 1 (0 matches)1 deny any (0 matches)测试结果:PC1和PC3、PC4能Ping通,PC2和PC3、PC4不能Ping通在pc1上Ping pc3在pc1上ping pc4在pc2上ping pc3在pc2上ping pc42、 步骤四:配置访问类语句使得子网/24中只有PC1可以通过Telnet对路由器进行配置、管理,允许除此之外的其它通信量。RouterA#configure terminalEnter configuration commands, one per line. End with CNTL/Z.RouterA(config)#access-list 2 permit host 1RouterA(config)#access-list 2 deny 55RouterA(config)#access-list 3 permit 55RouterA(config)#line vty 0 4RouterA(config-line)#loginRouter(config-line)#password abcRouter(config-line)#access-class 2 inRouterA(config)#interface fa0/0RouterA(config-if)#ip access-group 2 inRouterA(config-if)#exitRouterA(config)#interface fa0/1RouterA(config-if)#ip access-group 3 inRouterA(config-if)#exitRouterA(config)#exitRouterA#show access-lists Standard IP access list 1 1 permit host 1 (0 matches) 1 deny any (0 matches)Standard IP access list 2 2 permit host 1 (0 matches) 2 deny 55 (0 matches)Standard IP access list 33 permit 55 (0 matches)PC2上测试:C:telnet Trying .% Destination unreachable; gateway or host downPC1上测试:C:#telnet Trying . OpenPassword:PC3、PC4上测试:C:#telnet Trying . OpenPassword:项目五、局域网和互联网之间的互连(NAT和NAPT)一、实训要求:1、网络地址转换NAT2、网络地址NAPT二、实训步骤:5.1 网络地址转换NAT1实验拓扑图如下:2. 实验步骤如下:步骤一:配置路由器Routeren /进入特权模式Router#configure terminal /进入全局模式Router(config)#hostname RouterARouterA(config)#ip nat inside source static /配置静态地址映射关系RouterA(config)#ip nat inside source static RouterA(config)#ip nat inside source static RouterA(config)#interface ethernet 0 /配置端口E0RouterA(config-if)#ip address /配置端口E0的IP地址RouterA(config-if)#ip nat inside /配置端口E0为内部接口RouterA(config-if)#no shutdow
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
评论
0/150
提交评论