阿宝和佳佳 发表于 2013-11-13 17:10:31

帧中继多点子接口下配置OSPF

帧中继多点子接口下配置OSPF1、实验目的通过本实验可以掌握A、 帧中继多点子接口的特征B、 帧中继多点子接口的配置C、 NBMA模式下OSPF的配置和调试D、 手工配置OSPF邻居E、NBMA模式下的DR选举2、实验拓扑3、实验步骤本实验分别在路由器R1、R3和R4尚创建多点子接口,拓扑结构采用Hub-and-Spoke结构,整个网络运行OSPF路由协议。A.       配置路由器R1R1(config)#int loopback0R1(config-if)#ip address 192.168.1.1 255.255.255.0R1(config-if)#no shutdownR1(config-if)#ip ospf networkpoint-to-point   //修改OSPF网络类型R1(config-if)#exitR1(config)#int s1/0R1(config-if)#no ip address      //物理接口下不要配置IP地址R1(config-if)#encapsulation frame-relay   //接口封装帧中继R1(config-if)#no frame-relay inverse-arp   //关闭帧中继逆向ARP解析R1(config-if)#no shutdownR1(config-if)#exitR1(config)#int serial 1/0.1 multipoint   //创建帧中继多点子接口【技术要点】“int serial slot-number/interface-number.subinterface-number{ multipoint|point-to-point }”命令用来创建帧中继子接口,其中:1)slot-number/interface-number:物理接口的号;2)subinterface-number:是自接口号,范围为1~4 294 967 293;3)multipoint |point-to-point:属于必须选择的项,是子接口的类型,要么是多点类型,要么是点到点类型。R1(config-subif)#ip address 192.168.134.1 255.255.255.0R1(config-subif)#frame-relay map ip 192.168.134.3 103broadcastR1(config-subif)#frame-relay map ip 192.168.134.4 104broadcastR1(config-subif)#frame-relay map ip 192.168.134.1 103R1(config-subif)#no frame-relay inverse-arpR1(config-subif)#exitR1(config)#router ospf 1R1(config-router)#router-id 1.1.1.1R1(config-router)#network 192.168.1.0 0.0.0.255 area 0R1(config-router)#network 192.168.134.0 0.0.0.255 area 0R1(config-router)#neighbor 192.168.134.3      //手工指定OSPF邻居R1(config-router)#neighbor 192.168.134.4B.       配置路由器R3:R3#conf tEnterconfiguration commands, one per line. End with CNTL/Z.R3(config)#intlo0R3(config-if)#ipaddress 192.168.3.1 255.255.255.0R3(config-if)#noshutdown R3(config-if)#ipospf network point-to-pointR3(config-if)#exitR3(config)#ints1/1R3(config-if)#noip addressR3(config-if)#encapsulationframe-relay R3(config-if)#noframe-relay inverse-arp R3(config-if)#noshutdownR3(config-if)#exitR3(config)#ints1/1.1 multipoint R3(config-subif)#ipaddress 192.168.134.3 255.255.255.0R3(config-subif)#ipospf priority 0 //配置spoke端OSPF接口优先级为0,确保HUB端路由器R1成为DRR3(config-subif)#frame-relaymap ip 192.168.134.1 301 broadcast R3(config-subif)#frame-relaymap ip 192.168.134.4 301 broadcast R3(config-subif)#frame-relaymap ip 192.168.134.3 301       R3(config-subif)#noframe-relay inverse-arp R3(config-subif)#exitR3(config)#routerospf 1R3(config-router)#router-id3.3.3.3R3(config-router)#network192.168.134.0 0.0.0.255 area 0R3(config-router)#network192.168.3.0 0.0.0.255 area 0【提示】可以使用“no interfaceSerial1/1.1”命令来删除子接口。然而需要重新启动路由器,该子接口才真正被删除。C.       配置路由器R4:R4#conf tEnterconfiguration commands, one per line. End with CNTL/Z.R4(config)#intlo0 R4(config-if)#ipaddress 192.168.4.1 255.255.255.0R4(config-if)#ipospf network point-to-point R4(config-if)#noshutdown R4(config-if)#exitR4(config)#ints1/2R4(config-if)#noip address R4(config-if)#encapsulationframe-relay R4(config-if)#noframe-relay inverse-arp R4(config-if)#noshutdownR4(config-if)#exitR4(config)#ints1/2.1 multipoint R4(config-subif)#ipaddress 192.168.134.4 255.255.255.0 R4(config-subif)#ipospf priority 0R4(config-subif)#frame-relaymap ip 192.168.134.1 401 broadcast R4(config-subif)#frame-relaymap ip 192.168.134.3 401 broadcast R4(config-subif)#frame-relaymap ip 192.168.134.4 401         R4(config-subif)#noframe-relay inverse-arp R4(config-subif)#exitR4(config)#routerospf 1R4(config-router)#router-id4.4.4.4R4(config-router)#network192.168.134.0 0.0.0.255 area 0R4(config-router)#network192.168.4.0 0.0.0.255 area 0D.帧中继交换机配置:R2#conf tEnterconfiguration commands, one per line. End with CNTL/Z.R2(config)#frame-relayswitching R2(config)#ints1/0R2(config-if)#clockrate 64000 R2(config-if)#encapsulationframe-relay R2(config-if)#noshR2(config-if)#frame-relaylmi-type cisco R2(config-if)#frame-relayintf-type dce R2(config-if)#frame-relayroute 103 interface s1/1 301R2(config-if)#frame-relayroute 104 interface s1/2 401R2(config-if)#exitR2(config)#ints1/1R2(config-if)#clockrate 64000R2(config-if)#encapsulationframe-relay R2(config-if)#noshutdown R2(config-if)#frame-relaylmi-type cisco R2(config-if)#frame-relayintf-type dce R2(config-if)#frame-relayroute 301 interface s1/0 103R2(config-if)#exitR2(config)#ints1/2R2(config-if)#clockrate 64000R2(config-if)#encapsulationframe-relay R2(config-if)#frame-relaylmi-type cisco R2(config-if)#frame-relayintf-type dce R2(config-if)#frame-relayroute 401 interface s1/0 104R2(config-if)#【技术要点】1)在帧中继网络上,OSPF接口默认的网络类型为NON_BROADCAST。在这种模式下,OSPF不会在帧中继接口上发送Hello包,因此无法建立最基本的OSPF邻接关系。可以手工使用“neighbor”命令来指定邻居,这时Hello包以单播形式发送。2)NBMA属于多路访问网络,所以要进行DR选举,由于Hello包只能传1跳,所以在Hub-and-Spoke结构中,必须控制处于“HUB”端的路由器成为DR,最保险的办法就是将“Spoke”端路由器OSPF接口优先级配置为0,使之不参与DR选举,“HUB”端的路由器自然就成为DR;否则,可能会导致路由学习不正常。3)在接口模式下,可以通过如下命令修改OSPF的网络类型:R3(config-if)#ip ospf network { broadcast | point-to-point| non_broadcast | point-to-multipoint }4)多点子接口不能解决接口水平分割的问题,只是节省了物理接口而已。4、实验调试1)show frame-relay mapR1#showframe-relay map Serial1/0.1(up): ip 192.168.134.1 dlci 103(0x67,0x1870), static,            CISCO, status defined, activeSerial1/0.1(up): ip 192.168.134.3 dlci 103(0x67,0x1870), static,            broadcast,            CISCO, status defined, activeSerial1/0.1(up): ip 192.168.134.4 dlci 104(0x68,0x1880), static,            broadcast,            CISCO, status defined, activeR1#以上输出表明路由器R1使用多点子接口S1/0.1,该子接口下有3条帧中继静态映射。2)show ip ospf interfaceR1#showip ospf interface Serial1/0.1is up, line protocol is up Internet Address 192.168.134.1/24, Area 0 Process ID 1, Router ID 1.1.1.1, Network TypeNON_BROADCAST, Cost: 64//接口网络类型为NBMA模式Transmit Delay is 1 sec, State DR, Priority 1//状态为DR,接口优先级为1Designated Router (ID) 1.1.1.1, Interfaceaddress 192.168.134.1//DR的ID和接口地址No backup designated router on this network//没有BDRTimer intervals configured, Hello 30, Dead120, Wait 120, Retransmit 5//NBMA模式下,Hello间隔为30S,Dead保持时间为120S    oob-resync timeout 120    Hello due in 00:00:10Supports Link-local Signaling (LLS)Index 2/2, flood queue length 0Next 0x0(0)/0x0(0)Last flood scan length is 1, maximum is 1Last flood scan time is 0 msec, maximum is 4msecNeighbor Count is 2, Adjacent neighbor countis 2 //有2个OSPF邻居,都形成了邻接关系    Adjacent with neighbor 3.3.3.3    Adjacent with neighbor 4.4.4.4//以上两行表明路由器R1与路由器R3和R4形成邻接关系Suppress hello for 0 neighbor(s)3)show ip routeR1#showip route ospf O    192.168.4.0/24 via 192.168.134.4,00:40:37, Serial1/0.1O    192.168.3.0/24 via 192.168.134.3,00:40:37, Serial1/0.1R1#R3#showip route ospf O    192.168.4.0/24 via 192.168.134.4,00:41:32, Serial1/1.1O    192.168.1.0/24 via 192.168.134.1,00:41:32, Serial1/1.1R3#R4#showip route ospf O    192.168.1.0/24 via 192.168.134.1,00:42:10, Serial1/2.1O    192.168.3.0/24 via 192.168.134.3,00:42:10, Serial1/2.1R4#
页: [1]
查看完整版本: 帧中继多点子接口下配置OSPF