OSPF协议基本命令的配置

  • 格式:doc
  • 大小:116.00 KB
  • 文档页数:6

实验报告 实验报告15 课程名称 核心路由交换技术 实验名称 OSPF协议实现网络互连 姓名 李小允 学号 1145492453 班级 网2

实验拓扑图

该实验所需要的简单实验拓扑。请用模拟器做完所有的实验步骤之后再截图,要求在图上标注配置,包括路由器的各个接口、对应ip 和掩码;PC的网关、ip和掩码。

实验步骤及命令清单

本次实验步骤对锐捷机架真实设备和思科模拟器均可。本案例以两台R2624路由器、1台三层交换机为例。S3550上划分有VLAN10和VLAN50,其中VLAN10用于连接Router1,VLAN50用于连接校园网主机。路由器分别命名为Router1和Router2,路由器之间用过串口采用V35 DCE/DTE电缆连接,DCE端连接到Router1上。PC1的IP地址和缺省网关分别为172.16.5.11和172.16.5.1,PC2的IP地址和缺省网关分别为172.16.3.22和172.16.3.1,网络掩码都是255.255.255.0. 实验报告 实验步骤:参看电子书——CCNA实验指导P68。 注意:实验步骤的前半部分与实验报告14基本是一样的,保证相邻实验设备两两之间的连通用性,才能进一步配置路由。 步骤1 先根据实验拓扑图对锐捷机架真实设备进行连线。 PC1的IP地址和缺省网关分别为172.16.5.11和172.16.5.1,网络掩码都是255.255.255.0。 PC2的IP地址和缺省网关分别为172.16.3.22和172.16.3.1,网络掩码都是255.255.255.0。 步骤2三层交换机的基本配置 S3760#configure terminal S3760(config)#VLan 10 S3760(config-vlan)# exit S3760(config)#Vlan 50 S3760(config-vlan)#exit S3760(config)#interface fastEthernet 0/1 S3760(config-if)#switchport access vlan 10 S3760(config-if)#exit S3760(config)#interface fastEthernet 0/5 S3760(config-if)#switchport access vlan 50 S3760(config-if)#exit S3760(config)#interface vlan 10 S3760(config-if)#ip address 172.16.1.2 255.255.255.0 S3760(config-if)#no shutdown S3760(config-if)#exit S3760(config)#interface vlan 50 S3760(config-if)#ip address 172.16.5.1 255.255.255.0 S3760(config-if)#no shutdown 实验报告 S3760(config-if)#exit 验证测试: S3760#show vlan

S3760#show ip interface 截图只需关键部分 步骤3路由器基本配置 RSR20_1#conf RSR20_1 (config)#hostname router1 router1(config)#interface fastEthernet 0 router1(config-if)#ip address 172.16.1.1 255.255.255.0 router1(config-if)#no shutdown router1(config-if)#exit router1(config)#interface serial 0 router1(config-if)#ip address 172.16.2.1 255.255.255.0 Router1(config-if)#clock rate 64000 如果Router1是DCE端的话。 router1(config-if)#no shutdown router1(config-if)#exit

RSR20_2>enable RSR20_2#conf router2(config)#interface serial 0 实验报告 router2(config-if)#ip address 172.16.2.2 255.255.255.0 router2(config-if)#no shutdown router2(config-if)#clock rate 64000 如果Router2是DCE端的话。 router2(config-if)#exit router2(config)#interface fastEthernet 0 router2(config-if)#ip address 172.16.3.1 255.255.255.0 router2(config-if)#no shutdown router2(config-if)#exit

验证测试:验证接口的配置 Router1#show ip interface brief

Router2#show ip interface brief 回答问题:请自行验证目前所有网络设备中各个设备(包括PC、三层交换机、路由器)之间的连通性,并总结之。

步骤4 配置单区域OSPF 注意:模拟器的命令稍有区别 S3750配置OSPF协议 S3750(config)#router ospf !开启OSPF进程 S3750(config-router)#network 172.16.5.0 0.0.0.255 area 0 !申明直连网段,并分配区域号. S3750(config-router)#network 172.16.1.0 0.0.0.255 area 0 S3750(config-router)#end router1配置OSPF协议 router1(config)#router ospf 1 router1(config-router)#network 172.16.1.0 0.0.0.255 area 0 router1(config-router)#network 172.16.2.0 0.0.0.255 area 0 router1(config-router)#end router2配置OSPF协议 router2(config)#router ospf 1 router2(config-router)#network 172.16.2.0 0.0.0.255 area 0 router2(config-router)#network 172.16.3.0 0.0.0.255 area 0 router2(config-router)#end 验证目前的连通性。 实验报告 在PC1上ping PC2 贴图

在PC1上tracert PC2 贴图

步骤5验证三台路由设备的路由表,查看是否学习了其它网段的路由信息 以上步骤已经验证了开启OSPF动态路由协议,可以自动学习路由信息,方便实现了网络互连。 步骤6 删除各设备上的OSPF 模拟器的命令稍有区别 S3750配置OSPF协议 S3750(config)#no router ospf router1配置OSPF协议 router1(config)no router ospf 1 router2配置OSPF协议 router2(config)#no router ospf 1

步骤7 配置多区域OSPF 注意:模拟器的命令稍有区别 S3750配置OSPF协议 S3750(config)#router ospf 100!开启OSPF进程 S3750(config-router)#network 172.16.5.0 0.0.0.255 area 1 !申明直连网段,并分配区域号. S3750(config-router)#network 172.16.1.0 0.0.0.255 area 1 S3750(config-router)#end router1配置OSPF协议 router1(config)#router ospf 100 router1(config-router)#network 172.16.1.0 0.0.0.255 area 1 router1(config-router)#network 172.16.2.0 0.0.0.255 area 0 router1(config-router)#end router2配置OSPF协议 router2(config)#router ospf 100 router2(config-router)#network 172.16.2.0 0.0.0.255 area 0 router2(config-router)#network 172.16.3.0 0.0.0.255 area 0 router2(config-router)#end 实验报告