4.OSPF单区域实验2.doc_第1页
4.OSPF单区域实验2.doc_第2页
4.OSPF单区域实验2.doc_第3页
4.OSPF单区域实验2.doc_第4页
4.OSPF单区域实验2.doc_第5页
已阅读5页,还剩11页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

实验1 配置在NBMA网络类型上的OSPF 一、 实验目的通过本节实验,掌握在NBMA网络类型上配置OSPF。二、 实验需要的知识点NBMA环境下ospf不能自动发现邻居,必须手动指定邻居。三、 实验需要的设备及要求路由器A、B、C靠一个转接线串行的接入一个Cisco路由器(帧交换)上,这个路由器作为帧中继交换。帧交换充当DCE,向所属路由器提供时钟。IP地址如图所示,路由A和C的串口所配置的OSPF的优先级是0。这个配置将会保证路由器B成为DR,每个路由器的邻居语句都会配置到路由器B上。四、 实验拓扑及IP地址五、 实验步骤1、给路由器分别命名主机名。例如:路由器A:RouterA。定义进入特权模式的密码为:cisco。在全局模式下使用指令的关键字:hostname name enable password2、根据拓扑图配置接口IP地址。在全局模式下使用指令的关键字:interface interface在接口模式下使用指令的关键字:ip address ip-address mask 3、分别在3台路由器上起OSPF,并做通告。在全局模式下使用指令的关键字:router ospf process-id 在协议模式下使用指令的关键字:network address wildcard-mask area area-id4、分别在路由器A和C的s0/0口设置ospf优先级为0在接口模式下使用指令的关键字:ip ospf priority 05、在路由器B的协议模式下指定ospf邻居。在协议模式下使用指令的关键字:neighbor address6、修改路由器的环回口ospf的类型。在接口模式下使用指令关键字:ip ospf network point-to-point六、 检测1、 在路由器A上运行show ip ospf interface s0/0命令显示OSPF接口所统计的情况。RouterA#sh ip os int s0/0Serial0/0 is up, line protocol is upInternet Address 192.1.1.1/24, Area 0Process ID 64, Router ID 1.1.1.1, Network Type NON_BROADCAST, Cost: 64Transmit Delay iS1 sec, State DROTHER, Priority 0DesignateDRouter (ID) 2.2.2.2, Interface address 192.1.1.2No backup designateDRouter on this networkTimer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5 oob-resync timeout 120 Hello due in 00:00:24Index 1/1, flood queue length 0Next 0x0(0)/0x0(0)Last flood scan length iS1, maximum iS1Last flood scan time iS0 msec, maximum iS0 msecNeighbor Count iS1, Adjacent neighbor count iS1 Adjacent with neighbor 2.2.2.2 (DesignateDRouter)Suppress hello for 0 neighbor(s)注意非广播式网络接口,这意味着DR的选择,路由器和OSPF邻居的配置都是手工进行的。接口的优先级是0,这意味着它无法被选为DR或BDR。2、在路由器A上运用show ip ospf neighbor命令显示其OSPF邻居的状况。RouterA#sh ip os neiNeighbor ID Pri State Dead Time Address Interface2.2.2.2 1 FULL/DR 00:01:34 192.1.1.2 Serial0/0注意路由器A与路由器B是完全邻接,B它是网络中的DR。1、 在路由器B运行show ip ospf neighbor命令显示OSPF邻居的状况。RouterB#sh ip os neiNeighbor ID Pri State Dead Time Address Interface3.3.3.3 0 FULL/DROTHER 00:01:54 192.1.1.3 Serial01.1.1.1 0 FULL/DROTHER 00:01:57 192.1.1.1 Serial0注意路由器B两个邻居,路由器A(1.1.1.1)和路由器C(3.3.3.3)。它们之间形成了完全的邻接,路由器B被选为DR,因为它有最高的优先级。DR和BDR与其它每个路由器都形成了邻接。在非广播式网络中, DR和BDR是仅有的需要定义邻居的路由器。4、在路由器A上运行命令show ip route,查看路由表。RouterA#sh ip ro 1.0.0.0/24 is subnetted, 1 subnetsC 1.1.1.0 is directly connected, Loopback0 2.0.0.0/24 is subnetted, 1 subnetsO 2.2.2.0 110/65 via 192.1.1.2, 00:00:13, Serial0/0 3.0.0.0/24 is subnetted, 1 subnetsO 3.3.3.0 110/65 via 192.1.1.3, 00:00:13, Serial0/0C 192.1.1.0/24 is directly connected, Serial0/0七、 标准配置RouterA : router# config terminal router(config)#hostname RouterA RouterA(config)#enable password ciscoRouterA(config)#no ip domain lookup RouterA(config)#interface lo0 RouterA(config-if)#ip address 1.1.1.1 255.255.255.0RouterA(config-if)#ip ospf network point-to-point RouterA(config-if)#interface s0/0 RouterA(config-if)#ip address 192.1.1.1 255.255.255.0RouterA(config-if)#no shutdown RouterA(config-if)#ip ospf priority 0 RouterA(config-if)#router ospf 64 RouterA(config-router)#network 192.1.1.1 0.0.0.0 area 0 RouterA(config-router)#network 1.1.1.1 0.0.0.0 area 0RouterB : router# config terminal router(config)#hostname RouterB RouterB(config)#enable password ciscoRouterB(config)#no ip domain lookup RouterB(config)#interface lo0 RouterB(config-if)#ip address 2.2.2.2 255.255.255.0RouterB(config-if)#ip ospf network point-to-point RouterB(config-if)#iinterface s0/0 RouterB(config-if)#ip address 192.1.1.2 255.255.255.0RouterB(config-if)#no shutdown RouterB(config-if)#router ospf 64 RouterB(config-router)#network 192.1.1.2 0.0.0.0 area 0 RouterB(config-router)#network 2.2.2.2 0.0.0.0 area 0 RouterB(config-router)#neighbor 192.1.1.1 RouterB(config-router)#neighbor 192.1.1.3RouterC : router# config terminal router(config)#hostname RouterC RouterC(config)#enable password ciscoRouterC(config)#no ip domain lookup RouterC(config)#interface lo0 RouterC(config-if)#ip address 3.3.3.3 255.255.255.0RouterC(config-if)#ip ospf network point-to-point RouterC(config-if)#interface s0/0 RouterC(config-if)#ip address 192.1.1.3 255.255.255.0RouterC(config-if)#no shutdown RouterC(config-if)#ip ospf priority 0 RouterC(config-if)#router ospf 64 RouterC(config-router)#network 192.1.1.3 0.0.0.0 area 0 RouterC(config-router)#network 3.3.3.3 0.0.0.0 area 0帧交换配置:帧交换机: router# config terminal router(config)#hostname Frameswitch Frameswitch (config)#enable password cisco Frameswitch (config)#frame-relay switching Frameswitch (config)#interface s0/0 Frameswitch (config-if)#encapsulation frame-relay Frameswitch (config-if)#clock rate 64000Frameswitch (config-if)#no shutdown Frameswitch (config-if)#frame-relay lmi-type ansi Frameswitch (config-if)#frame-relay intf-type dce Frameswitch (config-if)#frame-relay route 100 interface s0/1 100 Frameswitch (config-if)#interface s0/1 Frameswitch (config-if)#encapsulation frame-relay Frameswitch (config-if)#clock rate 64000Frameswitch (config-if)#no shutdown Frameswitch (config-if)#frame-relay lmi-type ansi Frameswitch (config-if)#frame-relay intf-type dce Frameswitch (config-if)#frame-relay route 100 interface s0/0 100 Frameswitch (config-if)#frame-relay route 200 interface s1/0 200 Frameswitch (config-if)#interface s1/0 Frameswitch (config-if)#encapsulation frame-relay Frameswitch (config-if)#clock rate 64000Frameswitch (config-if)#no shutdown Frameswitch (config-if)#frame-relay lmi-type ansi Frameswitch (config-if)#frame-relay intf-type dce Frameswitch (config-if)#frame-relay route 200 interface s0/1 200RouterA: RouterA(config)#interface s0/0 RouterA(config-if)#encapsulation frame-relayRouterA(config-if)#no frame-relay inverse-arp RouterA(config-if)#frame-relay map ip 192.1.1.2 100 broadcast RouterA(config-if)#frame-relay map ip 192.1.1.3 100 broadcastRouterB: RouterB(config)#interface s0/0 RouterB(config-if)#encapsulation frame-relayRouterB(config-if)#no frame-relay inverse-arp RouterB(config-if)#frame-relay map ip 192.1.1.1 100 broadcast RouterB(config-if)#frame-relay map ip 192.1.1.3 200 broadcastRouterC: RouterC(config)#interface s0/0 RouterC(config-if)#encapsulation frame-relayRouterC(config-if)#no frame-relay inverse-arp RouterC(config-if)#frame-relay map ip 192.1.1.1 200 broadcast RouterC(config-if)#frame-relay map ip 192.1.1.2 200 broadcast实验2在NBMA网络配置广播类型的OSPF 一、 实验目的通过本节实验,掌握在NBMA网络配置广播类型的OSPF。二、 实验需要的知识点广播式网络是一个渐进的操作过程,它可以定义所有邻居。当给一个接口配置广播时,这个接口就好像是连入了LAN中,网络中仍要选出DR和BDR,需特别保证路由器选出的DR / BDR与网络中所有路由器都有物理连接三、 实验需要的设备及要求路由器A、B、C将靠一个根交叉电缆和一个Cisco路由器(帧交换)相连接,帧交换将作为DCE,它向所属路由器提供时钟。使用接口命令向所有路由器上设置网络类型。IP地址如图所示,路由器A和C的串行接口被配置的OSPF优先级为0,这将保证路由器B成为DR。四、 实验拓扑及IP地址五、 实验步骤1、给路由器分别命名主机名。例如:路由器A:RouterA。定义进入特权模式的密码为:cisco。在全局模式下使用指令的关键字:hostname name enable password2、根据拓扑图配置接口IP地址。在全局模式下使用指令的关键字:interface interface在接口模式下使用指令的关键字:ip address ip-address mask 3、分别在3台路由器上运行ospf,并做通告。在全局模式下使用指令的关键字:router ospf process-id 在协议模式下使用指令的关键字:network address wildcard-mask area area-id4、分别在3台路由器设置ospf 网络类型在接口模式下使用指令的关键字:ip ospf network broadcast5、分别在路由器A和C的s0/0接口设置ospf优先级为0在接口模式下使用指令的关键字:ip ospf priority 02、 改路由器的环回口ospf的类型。在接口模式下使用指令关键字:ip ospf network point-to-point六、 检测1、 在路由器A上,运行命令show ip ospf interface s0/0显示OSPF接口的统计结果。RouterA#sh ip os int s0/0Serial0/0 is up, line protocol is up Internet Address 192.1.1.1/24, Area 0 Process ID 64, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 64 Transmit Delay iS1 sec, State DROTHER, Priority 0 DesignateDRouter (ID) 2.2.2.2, Interface address 192.1.1.2 No backup designateDRouter on this network Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5 oob-resync timeout 40 Hello due in 00:00:06 Index 1/1, flood queue length 0 Next 0x0(0)/0x0(0) Last flood scan length iS1, maximum iS1 Last flood scan time iS0 msec, maximum iS0 msec Neighbor Count iS1, Adjacent neighbor count iS1 Adjacent with neighbor 2.2.2.2 (DesignateDRouter) Suppress hello for 0 neighbor(s)注意接口的网络类型是广播式,这意味着DR已被选出。因为网络是广播式的,不需要定义邻居。接口的优先级是0,这意味着这个路由器无法被选为DR或BDR。2、 在路由器B上,使用命令show ip ospf neighbor显示路由器B的OSPF邻居的状态。RouterB#sh ip os neiNeighbor ID Pri State Dead Time Address Interface1.1.1.1 0 FULL/DROTHER 00:00:34 192.1.1.1 Serial03.3.3.3 0 FULL/DROTHER 00:00:36 192.1.1.3 Serial0路由器A与路由器B是完全邻接,路由器B是网络中的DR。七、 标准配置RouterA : router# config terminal router(config)#hostname RouterA RouterA(config)#enable password cisco RouterA(config)#no ip domain lookup RouterA(config)#interface lo0 RouterA(config-if)#ip address 1.1.1.1 255.255.255.0RouterA(config-if)#ip ospf network point-to-point RouterA(config-if)#interface s0/0 RouterA(config-if)#ip address 192.1.1.1 255.255.255.0 RouterA (config-if)#no shutdown RouterA(config-if)#ip ospf network broadcast RouterA(config-if)#ip ospf priority 0 RouterA(config-if)#router ospf 64 RouterA(config-router)#network 192.1.1.1 0.0.0.0 area 0 RouterA(config-router)#network 1.1.1.1 0.0.0.0 area 0RouterB : router# config terminal router(config)#hostname RouterB RouterB(config)#enable password cisco RouterB(config)#no ip domain lookup RouterB(config)#interface lo0 RouterB(config-if)#ip address 2.2.2.2 255.255.255.0RouterB (config-if)#ip ospf network point-to-point RouterB(config-if)#interface s0/0 RouterB(config-if)#ip address 192.1.1.2 255.255.255.0 RouterB (config-if)#no shutdown RouterB(config-if)#ip ospf network broadcast RouterB(config-if)#router ospf 64 RouterB(config-router)#network 192.1.1.2 0.0.0.0 area 0 RouterB(config-router)#network 2.2.2.2 0.0.0.0 area 0RouterC : router# config terminal router(config)#hostname RouterC RouterC(config)#enable password cisco RouterC (config)#no ip domain lookup RouterC(config)#interface lo0 RouterC(config-if)#ip address 3.3.3.3 255.255.255.0RouterC(config-if)#ip ospf network point-to-point RouterC(config-if)#interface s0/0 RouterC(config-if)#ip address 192.1.1.3 255.255.255.0 RouterC(config-if)#no shutdown RouterC(config-if)#ip ospf network broadcast RouterC(config-if)#ip ospf priority 0 RouterC(config-if)#router ospf 64 RouterC(config-router)#network 192.1.1.3 0.0.0.0 area 0 RouterC(config-router)#network 3.3.3.3 0.0.0.0 area 0 帧交换配置:帧交换机: router# config terminal router(config)#hostname Frameswitch Frameswitch (config)#enable password cisco Frameswitch (config)#frame-relay switching Frameswitch (config)#interface s0/0 Frameswitch (config-if)#encapsulation frame-relay Frameswitch (config-if)#clock rate 64000Frameswitch (config-if)#no shutdown Frameswitch (config-if)#frame-relay lmi-type ansi Frameswitch (config-if)#frame-relay intf-type dce Frameswitch (config-if)#frame-relay route 100 interface s0/1 100 Frameswitch (config-if)#interface s0/1 Frameswitch (config-if)#encapsulation frame-relay Frameswitch (config-if)#clock rate 64000Frameswitch (config-if)#no shutdown Frameswitch (config-if)#frame-relay lmi-type ansi Frameswitch (config-if)#frame-relay intf-type dce Frameswitch (config-if)#frame-relay route 100 interface s0/0 100 Frameswitch (config-if)#frame-relay route 200 interface s1/0 200 Frameswitch (config-if)#interface s1/0 Frameswitch (config-if)#encapsulation frame-relay Frameswitch (config-if)#clock rate 64000Frameswitch (config-if)#no shutdown Frameswitch (config-if)#frame-relay lmi-type ansi Frameswitch (config-if)#frame-relay intf-type dce Frameswitch (config-if)#frame-relay route 200 interface s0/1 200RouterA: RouterA(config)#interface s0/0 RouterA(config-if)#encapsulation frame-relayRouterA(config-if)#no frame-relay inverse-arp RouterA(config-if)#frame-relay map ip 192.1.1.2 100 broadcast RouterA(config-if)#frame-relay map ip 192.1.1.3 100 broadcastRouterB: RouterB(config)#interface s0/0 RouterB(config-if)#encapsulation frame-relayRouterB(config-if)#no frame-relay inverse-arp RouterB(config-if)#frame-relay map ip 192.1.1.1 100 broadcast RouterB(config-if)#frame-relay map ip 192.1.1.3 200 broadcastRouterC: RouterC(config)#interface s0/0 RouterC(config-if)#encapsulation frame-relayRouterC(config-if)#no frame-relay inverse-arp RouterC(config-if)#frame-relay map ip 192.1.1.1 200 broadcast RouterC(config-if)#frame-relay map ip 192.1.1.2 200 broadcast实验3 在NBMA网络配置点到多点类型的OSPF一、 实验目的通过本节实验,掌握在NBMA网络配置点到多点类型的OSPF。二、 实验需要的知识点一个点到多点网络被看作若干具有一个或多个邻居的点到点接口。当一个接口被配置给点到多点网络,就不需要DR / BDR,不需要定义邻居,这大大简化了给NBMA网络配置OSPF。三、 实验需要的设备及要求路由器A、B、C将会用一个转接电缆串行地连接到一个Cisco 路由器上(帧交换),它将作为帧中继交换。帧交换将会作为DCE,向所属路由器提供时钟。使用端口命令给所有路由器设置网络类型。IP地址如图所示。即不需要定义邻居,也不需要设置优先级,因为网络中没有DR/BDR。四、 实验拓扑及IP地址五、 实验步骤1、给路由器分别命名主机名。例如:路由器A:RouterA。定义进入特权模式的密码为:cisco。在全局模式下使用指令的关键字:hostname name enable password2、根据拓扑图配置接口IP地址。在全局模式下使用指令的关键字:interface interface在接口模式下使用指令的关键字:ip address ip-address mask 3、分别在3台路由器上运行ospf,并做通告。在全局模式下使用指令的关键字:router ospf process-id 在协议模式下使用指令的关键字:network address wildcard-mask area area-id4、分别在3台路由器设置ospf 网络类型在接口模式下使用指令的关键字:ip ospf network point-to-multipoint1、 修改路由器的环回口ospf的类型。在接口模式下使用指令关键字:ip ospf network point-to-point六、 检测在路由器A上运行命令show ip ospf interface s0/0可以显示OSPF接口的统计值。RouterA#sh ip os inter s0/0Serial0/0 is up, line protocol is up Internet Address 192.1.1.1/24, Area 0 Process ID 64, Router ID 1.1.1.1, Network Type POINT_TO_MULTIPOINT, Cost: 64 Transmit Delay iS1 sec, State POINT_TO_MULTIPOINT, Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5 oob-resync timeout 120 Hello due in 00:00:27 Index 1/1, flood queue length 0 Next 0x0(0)/0x0(0) Last flood scan length iS1, maximum iS1 Last flood scan time iS0 msec, maximum iS0 msec Neighbor Count iS1, Adjacent neighbor count iS1 Adjacent with neighbor 2.2.2.2 Suppress hello for 0 neighbor(s)注意接口的网络类型是POINT_TO_MULTIPOINT,这意味着即没有DR/BDR,也不需要定义邻居。如果需要人为定义出DR,参照上届实验的做法。1、 使用命令show ip ospf neighbor 显示路由器A的邻居的状态。RouterA#SH IP OS NEINeighbor ID Pri State Dead Time Address Interface2.2.2.2 0 FULL/ - 00:01:50 192.1.1.2 Serial0/0注意路由器A与路由器B(2.2.2.2)是完全邻接,但并没有DR的概念。这条链路被看作点到点的链路,然而,不同之处在于所有路由器都被看作处在同一子网中。2、 在路由器A上运行命令show ip route,查看路由表。RouterA#sh ip ro 1.0.0.0/24 is subnetted, 1 subnetsC 1.1.1.0 is directly connected, Loopback0 2.0.0.0/24 is subnetted, 1 subnetsO 2.2.2.0 110/65 via 192.1.1.2, 00:00:09, Serial0/0 3.0.0.0/24 is subnetted, 1 subnetsO 3.3.3.0 110/129 via 192.1.1.2, 00:00:09, Serial0/0 192.1.1.0/24 is variably subnetted, 3 subnets, 2 masksC 192.1.1.0/24 is directly connected, Serial0/0O 192.1.1.2/32 110/64 via 192.1.1.2, 00:00:09, Serial0/0O 192.1.1.3/32 110/128 via 192.1.1.2, 00:00:09, Serial0/0注意:较前面的实验,这里出现了32位的路由。在点到多点的网络类型中,出现32位的路由属于正常现象。七、 标准配置RouterA : router# config terminal router(config)#hostname RouterA RouterA(config)#enable password cisco RouterA(config)#no ip domain lookup RouterA(config)#interface lo0 RouterA(config-if)#ip address 1.1.1.1 255.255.255.0RouterA(config-if)#ip ospf network point-to-point RouterA(config-if)#interface s0/0 RouterA(config-if)#ip address 192.1.1.1 255.255.255.0 RouterA (config-if)#no shutdown RouterA(config-if)#ip ospf network point-to-multipoint RouterA(config-if)#router ospf 64 RouterA(config-router)#network 192.1.1.10.0.0.0 area 0 RouterA(config-router)#network 1.1.1.10.0.0.0 area 0RouterB : router# config terminal router(config)#hostname RouterB RouterB(config)#enable password cisco RouterB(config)#no ip domain lookup RouterB(config-if)#interface lo0 RouterB(config-if)#ip address 2.2.2.2 255.255.255.0RouterB(config-if)#ip ospf network point-to-point RouterB(config-if)#interface s0/0 RouterB(config-if)#ip address 192.1.1.2 255.255.255.0 RouterB(config-if)#no shutdown RouterB(config-if)#ip ospf network point-to-multipoint RouterB(config-if)#router ospf 64 RouterB(config-router)#network 192.1.1.20.0.0.0 area 0 RouterB(config-router)#network 2.2.2.20.0.0.0 area 0RouterC : router# config terminal router(config)#hostname RouterC RouterC(config)#enable password cisco RouterC (config)#no ip domain lookup RouterC(config)#interface lo0 RouterC(config-if)#ip address 3.3.3.3 255.255.255.0RouterC(config-if)#ip ospf network point-to-point RouterC(config-if)#interface s0/0 RouterC(config-if)#ip address 192.1.1.3 255.255.255.0 RouterC(config-if)#no shutdown RouterC(config-if)#ip ospf network point-to-multipoint RouterC(config-if)#router ospf 64 RouterC(config-router)#network 192.1.1.3 0.0.0.0 area 0 RouterC(config-router)#network 3.3.3.3 0.0.0.0 area 0帧交换配置:帧交换机: router# config terminal router(config)#hostname Frameswitch Frameswitch (config)#enable password cisco Frameswitch (config)#frame-relay switching Frameswitch (config)#i

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论