云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > YS-《计算机网络》上机任务书- PT实验三

YS-《计算机网络》上机任务书- PT实验三

  • 62 次阅读
  • 3 次下载
  • 2026/4/26 18:35:58

Ping statistics for 192.168.1.2:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:

Minimum = 13ms, Maximum = 19ms, Average = 15ms PC>

====================================================================

(三)动态路由OSPF协议配置

一、实验目标

掌握OSPF协议的配置方法;

掌握查看通过动态路由协议OSPF学习产生的路由; 熟悉广域网线缆的连接方式;

二、实验背景

假设某公司通过一台三层交换机连到公司出口路由器上,路由器再和公司外的另一台路由器连接。现要做适当配置,实现公司内部主机与公司外部主机之间的相互通信。为了简化网管的管理维护工作,公司决定采用OSPF协议实现互通。

三、技术原理

OSPF开放式最短路径优先协议,是目前网络中应用最广泛的路由协议之一。属于内部网关路由协议,能够适应各种规模的网络环境,是典型的链路状态协议。OSPF路由协议通过向全网扩散设备的链路状态信息,使网络中每台设备最终同步一个具有全网链路状态的数据库,然后路由器采用SPF算法,以自己为根,计算到达其他网络的最短路径,最终形成全网路由信息。

四、实验过程 1、实验拓扑

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主机之间可以互相通信;

2、实验步骤

① 三层交换机S3560配置: Switch>en Switch#conf t

Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#hostname S3560 S3560(config)#vlan 10 S3560(config-vlan)#exit S3560(config)#vlan 20 S3560(config-vlan)#exit

S3560(config)#interface fa0/10

S3560(config-if)#switchport access vlan 10 S3560(config-if)#exit

S3560(config)#interface fa0/20

S3560(config-if)#switchport access vlan 20 S3560(config-if)#exit

S3560(config)#interface vlan 10 S3560(config-if)#

%LINK-5-CHANGED: Interface Vlan10, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up

S3560(config-if)#ip address 192.168.1.1 255.255.255.0 S3560(config-if)#exit

S3560(config)#interface vlan 20

%LINK-5-CHANGED: Interface Vlan20, changed state to up S3560(config-if)#ip address 192.168.3.1 255.255.255.0 S3560(config-if)#exit

S3560(config)#router ospf ? <1-65535> Process ID S3560(config)#router ospf 1

S3560(config-router)#network 192.168.1.0 ? A.B.C.D OSPF wild card bits

S3560(config-router)#network 192.168.1.0 0.0.0.255 ? area Set the OSPF area ID

S3560(config-router)#network 192.168.1.0 0.0.0.255 area ? <0-4294967295> OSPF area ID as a decimal value A.B.C.D OSPF area ID in IP address format S3560(config-router)#network 192.168.1.0 0.0.0.255 area 0 S3560(config-router)#network 192.168.3.0 0.0.0.255 area 0 S3560(config-router)#end S3560#

%SYS-5-CONFIG_I: Configured from console by console

S3560#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 route

Gateway of last resort is not set

C 192.168.1.0/24 is directly connected, Vlan10 C 192.168.3.0/24 is directly connected, Vlan20 S3560#

00:10:01: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.4.1 on Vlan20 from LOADING to FULL, Loading Done

S3560#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 route

Gateway of last resort is not set

C 192.168.1.0/24 is directly connected, Vlan10

O 192.168.2.0/24 [110/783] via 192.168.3.2, 00:00:00, Vlan20 C 192.168.3.0/24 is directly connected, Vlan20

O 192.168.4.0/24 [110/782] via 192.168.3.2, 00:01:40, Vlan20 S3560#

② 路由器R1配置: Router>en Router#conf t

Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname R1 R1(config)#interface fa0/0 R1(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 up

R1(config-if)#ip address 192.168.3.2 255.255.255.0 R1(config-if)#exit

R1(config)#interface serial 2/0 R1(config-if)#no shutdown

%LINK-5-CHANGED: Interface Serial2/0, changed state to down R1(config-if)#clock rate 64000

R1(config-if)#ip address 192.168.4.1 255.255.255.0 R1(config-if)#exit

R1(config)#router ospf 1 // 1代表进程号,范围1-65535

R1(config-router)#network 192.168.3.0 0.0.0.255 area 0 //OSPF用反掩码:当它全为0时,就要进行匹配检查,而全为1时,就忽略;area 0 表示区域的;ospf可以跨区域连接,如果所连的网络并不是很大 那就只要一个区域即:area 0 R1(config-router)#network 192.168.4.0 0.0.0.255 area 0 R1(config-router)#

00:09:57: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.3.1 on FastEthernet0/0 from LOADING to FULL, Loading Done

R1(config-router)#end

%SYS-5-CONFIG_I: Configured from console by console R1#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 route

Gateway of last resort is not set

  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

Ping statistics for 192.168.1.2: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 13ms, Maximum = 19ms, Average = 15ms PC> ==================================================================== (三)动态路由OSPF协议配置 一、实验目标 掌握OSPF协议的配置方法; 掌握查看通过动态路由协议OSPF学习产生的路由; 熟悉广域网线缆的连接方

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com