




已阅读5页,还剩4页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
一、实验目标 掌握OSPF协议的配置方法; 掌握查看通过动态路由协议OSPF学习产生的路由; 熟悉广域网线缆的连接方式;二、实验背景假设某公司通过一台三层交换机连到公司出口路由器上,路由器再和公司外的另一台路由器连接。现要做适当配置,实现公司内部主机与公司外部主机之间的相互通信。为了简化网管的管理维护工作,公司决定采用OSPF协议实现互通。三、技术原理OSPF开放式最短路径优先协议,是目前网络中应用最广泛的路由协议之一。属于内部网关路由协议,能够适应各种规模的网络环境,是典型的链路状态协议。OSPF路由协议通过向全网扩散设备的链路状态信息,使网络中每台设备最终同步一个具有全网链路状态的数据库,然后路由器采用SPF算法,以自己为根,计算到达其他网络的最短路径,最终形成全网路由信息。四、实验步骤实验拓扑1、在三层交换机上划分VLAN10和VLAN20,其中VLAN10用于连接校园网主机,VLAN20用于连接R1;2、路由器之间通过V.35电缆通过串口连接,DCE端连接在R1上,配置其时间频率为64000;3、主机和交换机通过直连线连接,主机与路由器通过交叉线连接;4、在S3560上配置OSPF路由协议;5、在路由器R1、R2上配置OSPF路由协议;6、将PC1、PC2主机默认网关分别设置为与直连网络设备接口IP地址;7、验证PC1、PC2主机之间可以互相通信;S3560:SwitchenSwitch#conf tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#hostname S3560S3560(config)#vlan 10S3560(config-vlan)#exitS3560(config)#vlan 20S3560(config-vlan)#exitS3560(config)#interface fa0/10S3560(config-if)#switchport access vlan 10S3560(config-if)#exitS3560(config)#interface fa0/20S3560(config-if)#switchport access vlan 20S3560(config-if)#exitS3560(config)#interface vlan 10S3560(config-if)#%LINK-5-CHANGED: Interface Vlan10, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to upS3560(config-if)#ip address 192.168.1.1 255.255.255.0S3560(config-if)#exitS3560(config)#interface vlan 20%LINK-5-CHANGED: Interface Vlan20, changed state to upS3560(config-if)#ip address 192.168.3.1 255.255.255.0S3560(config-if)#exitS3560(config)#router ospf ? Process IDS3560(config)#router ospf 1S3560(config-router)#network 192.168.1.0 ? A.B.C.D OSPF wild card bitsS3560(config-router)#network 192.168.1.0 0.0.0.255 ? area Set the OSPF area IDS3560(config-router)#network 192.168.1.0 0.0.0.255 area ? OSPF area ID as a decimal value A.B.C.D OSPF area ID in IP address formatS3560(config-router)#network 192.168.1.0 0.0.0.255 area 0S3560(config-router)#network 192.168.3.0 0.0.0.255 area 0S3560(config-router)#endS3560#%SYS-5-CONFIG_I: Configured from console by consoleS3560#show ip route Codes: 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 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 setC 192.168.1.0/24 is directly connected, Vlan10C 192.168.3.0/24 is directly connected, Vlan20S3560#00:10:01: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.4.1 on Vlan20 from LOADING to FULL, Loading DoneS3560#show ip route Codes: 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 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 setC 192.168.1.0/24 is directly connected, Vlan10O 192.168.2.0/24 110/783 via 192.168.3.2, 00:00:00, Vlan20C 192.168.3.0/24 is directly connected, Vlan20O 192.168.4.0/24 110/782 via 192.168.3.2, 00:01:40, Vlan20S3560#R1:RouterenRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R1R1(config)#interface fa0/0R1(config-if)#no shutdown R1(config-if)#%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upR1(config-if)#ip address 192.168.3.2 255.255.255.0R1(config-if)#exitR1(config)#interface serial 2/0R1(config-if)#no shutdown %LINK-5-CHANGED: Interface Serial2/0, changed state to downR1(config-if)#clock rate 64000R1(config-if)#ip address 192.168.4.1 255.255.255.0R1(config-if)#exitR1(config)#router ospf 1R1(config-router)#network 192.168.3.0 0.0.0.255 area 0R1(config-router)#network 192.168.4.0 0.0.0.255 area 0R1(config-router)#00:09:57: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.3.1 on FastEthernet0/0 from LOADING to FULL, Loading DoneR1(config-router)#end%SYS-5-CONFIG_I: Configured from console by consoleR1#show ip route Codes: 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 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 setO 192.168.1.0/24 110/2 via 192.168.3.1, 00:00:09, FastEthernet0/0C 192.168.3.0/24 is directly connected, FastEthernet0/0R1#%LINK-5-CHANGED: Interface Serial2/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to up00:12:53: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.4.2 on Serial2/0 from LOADING to FULL, Loading DoneR1#show ip route Codes: 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 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 setO 192.168.1.0/24 110/2 via 192.168.3.1, 00:02:58, FastEthernet0/0O 192.168.2.0/24 110/782 via 192.168.4.2, 00:00:02, Serial2/0C 192.168.3.0/24 is directly connected, FastEthernet0/0C 192.168.4.0/24 is directly connected, Serial2/0R1#R2:RouterenRouter#conf tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R2R2(config)#interface fa0/0R2(config-if)#no shutdown %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upR2(config-if)#ip address 192.168.2.1 255.255.255.0R2(config-if)#exitR2(config)#interface serial 2/0R2(config-if)#no shutdown %LINK-5-CHANGED: Interface Serial2/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to upR2(config-if)#ip address 192.168.4.2 255.255.255.0R2(config-if)#exitR2(config)#router ospf 1R2(config-router)#network 192.168.2.0 0.0.0.255 area 0R2(config-router)#network 192.168.4.0 0.0.0.255 area 0R2(config-router)#end%SYS-5-CONFIG_I: Configured from console by consoleR2#show ip route Codes: 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 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 setC 192.168.2.0/24 is directly connected, FastEthernet0/0C 192.168.4.0/24 is directly connected, Serial2/0R2#show ip route Codes: 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 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 setO 192.168.1.0/24 110/783 via 192.168.4.1, 00:00:01, Serial2/0C 192.168.2.0/24 is directly connected, FastEthernet0/0O 192.168.3.0/24 110/782 via 192.168.4.1, 00:00:01, Serial2/0C 192.168.4.0/24 is directly connected, Serial2/0R2#五、测试Packet Tracer PC Command Line 1.0PCipconfigIP Address.: 192.168.1.2Subnet Mask.: 255.255.255.0Default Gateway.: 192.168.1.1PCping 192.168.2.2Pinging 192.168.2.2 with 32 bytes of data:Reply from 192.168.2.2: bytes=32 time=11ms TTL=125Reply from 192.168.2.2: bytes=32 time=15ms TTL=125Reply from 192.168.2.2: bytes=32 time=14ms TTL=125Reply from 192.168.2.2: bytes=32 time=14ms TTL=125Ping statistics for 192.168.2.2: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 11ms, Maximum = 15ms, Average = 13msPC额外补充的资料:单区域OSPF命令:R1(config)#router ospf 1/启动OSPF进程R1(config-router)#router-id 1.1.1.1/配置路由器IDR1(config-router)#network 172.16.1.0 0.0.0.255 area 0/通告直连网络R1(config-router)#network 172.16.1.0 255.255.255.0 area 0/通告直连网络说明:网络地址的后面即可以跟通配符掩码,在高版本IOS中也可以跟网络掩码,IOS会自动转换成通配符掩码。R1(config)#router ospf 1R1(config-router)#router-id 1.1.1.1R1(config-router)#network 172.16.1.0 0.0.0.255 area 0R1(config-router)#network 172.16.12.0 0.0.0.255 area 0R2(config)#router ospf 1R2(config-router)#router-id 2.2.2.2R2(config-router)#network 172.16.2.0 0.0.0.255 area 0R2(config-router)#netwo
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 瓷砖五一活动宣传方案策划
- 建筑平台景观处理方案设计
- 长沙心理咨询方案
- 湖北水塔滑模施工方案
- 全面预算咨询方案书
- 学校读书角活动方案策划
- 设计咨询利润处理方案
- 五一美容活动促销方案策划
- 建筑方案设计现场勘察报告
- 咨询方案出错
- 2025年锦州辅警考试题库(附答案)
- 2025年交通安全宣传周知识竞赛考试题库及答案(含各题型)
- 2025年广东中考历史试卷真题解读及答案讲评课件
- 2025年美的ai面试题目及答案
- 律师从事公司自行清算业务操作建议流程
- 2025年深圳中级电工试题及答案
- 橡皮筋驱动小车说课课件
- 工会专用账户管理办法
- 中科大现代环境生物技术课件第4章 细胞工程
- 电网调度行业脑机接口技术应用案例分析
- 电网规划培训课件
评论
0/150
提交评论