实验四-路由交换综合实验.doc

上传人:豆**** 文档编号:24137801 上传时间:2022-07-03 格式:DOC 页数:32 大小:205KB
返回 下载 相关 举报
实验四-路由交换综合实验.doc_第1页
第1页 / 共32页
实验四-路由交换综合实验.doc_第2页
第2页 / 共32页
点击查看更多>>
资源描述

《实验四-路由交换综合实验.doc》由会员分享,可在线阅读,更多相关《实验四-路由交换综合实验.doc(32页珍藏版)》请在得力文库 - 分享文档赚钱的网站上搜索。

1、Four short words sum up what has lifted most successful individuals above the crowd: a little bit more.-author-date实验四-路由交换综合实验实验四-路由交换综合实验实验四 Packet Tracer路由交换综合实验实验要求:使用Packet Tracer模拟器搭建实验拓扑,并对交换机、路由器、PC和服务器进行相应配置,配置最后结果,能实现PC之间的ping互通,能通过PC的浏览器访问服务器网站。配置步骤如下:Step1:搭建实验拓扑如下图所示:Step2:规划各设备的IP地址,如下

2、表所示:设备接口IP地址网关R1Fa0/0172.17.10.1/24Fa0/1172.17.20.1/24Fa1/0192.168.12.1/24R2Fa0/0172.17.30.1/24Fa0/1172.17.40.1/24Fa1/0192.168.12.2/24Fa1/1209.165.201.1/24PC1快速以太网口172.17.10.100/24172.17.10.1PC2快速以太网口172.17.20.100/24172.17.20.1PC3快速以太网口172.17.30.200/24172.17.30.1PC4快速以太网口172.17.40.200/24172.17.40.1S

3、ERVER快速以太网口209.165.201.254/24209.165.201.1 请注意:在配置PC机的IP地址时,切记一定要配网关IP地址。Step3:路由器及交换机基本配置:一、 配置路由器R1、R2,交换机S1、S2的主机名分别为Router1、Router2、Switch1、Switch2。SwitchenableSwitch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#hostname Switch1Switch1(config)#Swit

4、chenableSwitch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#hostname Switch2Switch2(config)#RouterenableRouter #configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router (config)#hostname Router1Router1 (config)#RouterenableR

5、outer #configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router (config)#hostname Router2Router2 (config)#二、 根据IP地址规划表配置各设备IP地址、掩码、网关。Router1#Router1#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router1(config)#interface FastEthernet0/0Rou

6、ter1(config-if)#exitRouter1(config)#int f1/0Router1(config-if)#ip add 192.168.12.1 255.255.255.0Router1(config-if)#no shutRouter1(config-if)#exitRouter1(config)#int f0/0Router1(config-if)#ip add 172.17.10.1 255.255.255.0Router1(config-if)#no shutRouter1(config-if)#exitRouter1(config)#int f0/1Router1

7、(config-if)#ip add 172.17.20.1 255.255.255.0Router1(config-if)#no shutRouter1(config-if)#Router2#Router2#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router2(config)#interface FastEthernet0/0Router2(config-if)#exitRouter2(config)#int f1/0Router2(config-if)#ip add 192

8、.168.12.2 255.255.255.0Router2(config-if)#no shutRouter2(config-if)#exitRouter2(config)#int f0/0Router2(config-if)#ip add 172.17.30.1 255.255.255.0Router2(config-if)#no shutRouter2(config-if)#exitRouter2(config)#int f0/1Router2(config-if)#ip add 172.17.40.1 255.255.255.0Router2(config-if)#no shutRou

9、ter(config-if)#exitRouter(config)#interface FastEthernet1/1Router(config-if)#ip address 209.165.201.1 255.255.255.0Router(config-if)# no shutRouter2(config-if)#Step4:交换机VLAN配置:一、在交换机S1上创建两个VLAN:1. VLAN 10,VLAN名称为sales。Switch1(config)#vlan 10Switch1(config-vlan)#name salesSwitch1(config-vlan)#exitSwi

10、tch1(config)#2. VLAN 20,VLAN名称为faculty。Switch1(config)#vlan 20Switch1(config-vlan)#name facultySwitch1(config-vlan)#exitSwitch1(config)#3. 将fa0/1、fa0/23配置为access模式,并将它们划分为VLAN 10的成员。Switch1(config)#interface FastEthernet0/1Switch1(config-if)#switchport access vlan 10Switch1(config-if)#Switch1(config

11、)#interface FastEthernet0/23Switch1(config-if)#switchport access vlan 104. 将fa0/2、fa0/24配置为access模式,并将它们划分为VLAN 20的成员。Switch1(config)#interface FastEthernet0/2Switch1(config-if)#switchport access vlan 20Switch1(config)#interface FastEthernet0/24Switch1(config-if)#switchport access vlan 20二、在交换机S2上创建

12、两个VLAN:1. VLAN 30,VLAN名称为management。Switch2(config)#vlan 30Switch2(config-vlan)#name managementSwitch2(config-vlan)#exitSwitch2(config)#2. VLAN 40,VLAN名称为partner。Switch2(config)#vlan 40Switch2(config-vlan)#name partnerSwitch2(config-vlan)#exitSwitch2(config)#3. 将fa0/1、fa0/23配置为access模式,并将它们划分为VLAN 3

13、0的成员。Switch2(config)#interface FastEthernet0/1Switch2(config-if)#switchport access vlan 30Switch2(config-if)#exitSwitch2(config)#interface FastEthernet0/23Switch2(config-if)#switchport access vlan 30Switch2(config-if)#exit4. 将fa0/2、fa0/24配置为access模式,并将它们划分为VLAN 40的成员。Switch2(config)#interface FastEt

14、hernet0/2Switch2(config-if)#switchport access vlan 40Switch2(config-if)#exitSwitch2(config)#interface FastEthernet0/24Switch2(config-if)#switchport access vlan 40Step5:路由器动态路由协议配置在两个路由器上启动OSPF协议,将各接口直连网络用network命令发布。配置OSPF协议的步骤如下:R1的配置:1. 全局模式下启动OSPF协议R1(config)#router ospf 1Router1(config)#route os

15、pf 1Router1(config-router)#解释:命令格式上1启动OSPF协议与启动RIP协议类似,但router OSPF后面多出了一个进程号(ID为1),该进程号仅具有本地意义,各路由器上的进程号可以不一样。回车后进入路由配置模式:Router(config-router)。2. 使用network命令发布网络。R1(config-router)#net 192.168.12.0 0.0.0.255 area 0 ;net是network的简写R1(config-router)#net 172.17.10.0 0.0.0.255 area 0R1(config-router)#n

16、et 172.17.20.0 0.0.0.255 area 0解释:OSPF协议在发布网络的时候可以做到精确发布,可以看到network命令后面不止携带了网络地址,还有如 0.0.0.255这样的通配符。从通配符的形式上可以看出,它是子网掩码的反码形式,用255.255.255.255减去子网掩码即可得到通配符。另外,OSPF作为一个层次化的路由协议,还需要指明运行协议的区域。一个复杂的OSPF网络(自治系统)中会包含多个区域,它们之间用区域号来进行区分,每个区域中运行各自的OSPF协议实例,区域之间通过ABR连接主干区域进行交互,而主干区域总是 area 0。本实验中我们只进行单区域的OSP

17、F配置,默认使用区域0在R2上进行相同的配置。R2(config-router)#net 192.168.12.0 0.0.0.255 area 0 R2(config-router)#net 209.165.201.0 0.0.0.255 area 0R2(config-router)#net 172.17.30.0 0.0.0.255 area 0R2(config-router)#net 172.17.40.0 0.0.0.255 area 03. 在路由模式下配置路由器被动接口。解释:若路由器接口连接的是终端设备诸如PC、SERVER,则不用向该网络通告动态路由更新,只有与中间设备(诸

18、如路由器)交互路由更新才是有意义的。把路由器中连接终端设备的接口配置为被动接口,将不会向接口直连网络通告路由更新,这样可以降低流量,提高性能。配置被动接口的方法是:在路由模式下使用passive-interface interface命令。对于本实验拓扑中的两个路由器,除了其互连的fa1/0口之外,其他接口均可配置为被动接口。R1上的被动接口配置如下:R1(config-router)#passive-interface fa0/0R1(config-router)#passive-interface fa0/1根据拓扑,在R2上配置相应的被动接口。R2上的被动接口配置如下:R2(config

19、-router)#passive-interface fa0/0R2(config-router)#passive-interface fa0/1R2(config-router)#passive-interface fa1/1Step6:验证配置结果。三、 在各设备中使用show命令查看配置结果,可以使用的命令如:1. show run:查看运行配置。router ospf 1 log-adjacency-changes passive-interface FastEthernet0/0 passive-interface FastEthernet0/1 network 192.168.12

20、.0 0.0.0.255 area 0 network 172.17.10.0 0.0.0.255 area 0 network 172.17.210.0 0.0.0.255 area 0!2. show ip route: 查看路由表。Router1#sho ip routCodes: 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 ty

21、pe 1, N2 - OSPF NSSA 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 static route, o - ODR P - periodic downloaded static routeGateway of last resort is not set

22、172.17.0.0/24 is subnetted, 2 subnetsC 172.17.10.0 is directly connected, FastEthernet0/0C 172.17.20.0 is directly connected, FastEthernet0/1C 192.168.12.0/24 is directly connected, FastEthernet1/0Router1#3. show vlan brief:查看VLAN分配情况。Router1#sh vlan briefVLAN Name Status Ports- - - -1 default activ

23、e 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active Router1#4. show ip int brief:查看接口IP地址配置情况。Router1#sh ip int briefInterface IP-Address OK? Method Status ProtocolFastEthernet0/0 172.17.10.1 YES manual up upFastEthernet0/1 172.17.20.1 YES

24、manual up upFastEthernet1/0 192.168.12.1 YES manual up upFastEthernet1/1 unassigned YES unset administratively down downVlan1 unassigned YES unset administratively down downRouter1#5. show interface interface:查看单个接口配置情况。四、 使用ping命令验证连通性。1. PC1与其他PC之间的连通性。在路由器上运行路由协议后,可以实现不同VLAN间的通信。2. 各PC和网关、路由器接口、服务器之间的连通性。3. 在PC的web browser中的地址栏键入SERVER的IP地址209.165.201.254,可以访问SERVER网站(web browser中出现网页显示)。三、记录自己的配置步骤和结果。-

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 教育专区 > 小学资料

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知得利文库网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号-8 |  经营许可证:黑B2-20190332号 |   黑公网安备:91230400333293403D

© 2020-2023 www.deliwenku.com 得利文库. All Rights Reserved 黑龙江转换宝科技有限公司 

黑龙江省互联网违法和不良信息举报
举报电话:0468-3380021 邮箱:hgswwxb@163.com