雏鹰部落

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 1293|回复: 0

[讨论/求助] 帧中继多点子接口下配置OSPF

[复制链接]
发表于 2013-11-13 17:10:31 | 显示全部楼层 |阅读模式
帧中继多点子接口下配置OSPF
1、  实验目的
通过本实验可以掌握
A、 帧中继多点子接口的特征
B、 帧中继多点子接口的配置
C、 NBMA模式下OSPF的配置和调试
D、 手工配置OSPF邻居
E、  NBMA模式下的DR选举
2、  实验拓扑
3、  实验步骤
本实验分别在路由器R1、R3和R4尚创建多点子接口,拓扑结构采用Hub-and-Spoke结构,整个网络运行OSPF路由协议。
A.       配置路由器R1
R1(config)#int loopback0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#ip ospf networkpoint-to-point   //修改OSPF网络类型
R1(config-if)#exit
R1(config)#int s1/0
R1(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 shutdown
R1(config-if)#exit
R1(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.0
R1(config-subif)#frame-relay map ip 192.168.134.3 103broadcast
R1(config-subif)#frame-relay map ip 192.168.134.4 104broadcast
R1(config-subif)#frame-relay map ip 192.168.134.1 103
R1(config-subif)#no frame-relay inverse-arp
R1(config-subif)#exit
R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1.1
R1(config-router)#network 192.168.1.0 0.0.0.255 area 0
R1(config-router)#network 192.168.134.0 0.0.0.255 area 0
R1(config-router)#neighbor 192.168.134.3        //手工指定OSPF邻居
R1(config-router)#neighbor 192.168.134.4
B.       配置路由器R3:
R3#conf t
Enterconfiguration commands, one per line. End with CNTL/Z.
R3(config)#intlo0
R3(config-if)#ipaddress 192.168.3.1 255.255.255.0
R3(config-if)#noshutdown
R3(config-if)#ipospf network point-to-point
R3(config-if)#exit
R3(config)#ints1/1
R3(config-if)#noip address
R3(config-if)#encapsulationframe-relay
R3(config-if)#noframe-relay inverse-arp
R3(config-if)#noshutdown
R3(config-if)#exit
R3(config)#ints1/1.1 multipoint
R3(config-subif)#ipaddress 192.168.134.3 255.255.255.0
R3(config-subif)#ipospf priority 0
//配置spoke端OSPF接口优先级为0,确保HUB端路由器R1成为DR
R3(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)#exit
R3(config)#routerospf 1
R3(config-router)#router-id3.3.3.3
R3(config-router)#network192.168.134.0 0.0.0.255 area 0
R3(config-router)#network192.168.3.0 0.0.0.255 area 0  
【提示】
可以使用“no interfaceSerial1/1.1”命令来删除子接口。然而需要重新启动路由器,该子接口才真正被删除。
C.       配置路由器R4:
R4#conf t
Enterconfiguration commands, one per line. End with CNTL/Z.
R4(config)#intlo0
R4(config-if)#ipaddress 192.168.4.1 255.255.255.0
R4(config-if)#ipospf network point-to-point
R4(config-if)#noshutdown
R4(config-if)#exit
R4(config)#ints1/2
R4(config-if)#noip address
R4(config-if)#encapsulationframe-relay
R4(config-if)#noframe-relay inverse-arp
R4(config-if)#noshutdown
R4(config-if)#exit
R4(config)#ints1/2.1 multipoint
R4(config-subif)#ipaddress 192.168.134.4 255.255.255.0
R4(config-subif)#ipospf priority 0
R4(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)#exit
R4(config)#routerospf 1
R4(config-router)#router-id4.4.4.4
R4(config-router)#network192.168.134.0 0.0.0.255 area 0
R4(config-router)#network192.168.4.0 0.0.0.255 area 0  
D.帧中继交换机配置:
R2#conf t
Enterconfiguration commands, one per line. End with CNTL/Z.
R2(config)#frame-relayswitching
R2(config)#ints1/0
R2(config-if)#clockrate 64000
R2(config-if)#encapsulationframe-relay
R2(config-if)#nosh
R2(config-if)#frame-relaylmi-type cisco
R2(config-if)#frame-relayintf-type dce
R2(config-if)#frame-relayroute 103 interface s1/1 301
R2(config-if)#frame-relayroute 104 interface s1/2 401
R2(config-if)#exit
R2(config)#ints1/1
R2(config-if)#clockrate 64000
R2(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 103
R2(config-if)#exit
R2(config)#ints1/2
R2(config-if)#clockrate 64000
R2(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 104
R2(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 map
R1#showframe-relay map
Serial1/0.1(up): ip 192.168.134.1 dlci 103(0x67,0x1870), static,
              CISCO, status defined, active
Serial1/0.1(up): ip 192.168.134.3 dlci 103(0x67,0x1870), static,
              broadcast,
              CISCO, status defined, active
Serial1/0.1(up): ip 192.168.134.4 dlci 104(0x68,0x1880), static,
              broadcast,
              CISCO, status defined, active
R1#
以上输出表明路由器R1使用多点子接口S1/0.1,该子接口下有3条帧中继静态映射。
2)  show ip ospf interface
R1#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,接口优先级为1
  Designated Router (ID) 1.1.1.1, Interfaceaddress 192.168.134.1
//DR的ID和接口地址
  No backup designated router on this network
//没有BDR
  Timer intervals configured, Hello 30, Dead120, Wait 120, Retransmit 5
//NBMA模式下,Hello间隔为30S,Dead保持时间为120S
    oob-resync timeout 120
    Hello due in 00:00:10
  Supports Link-local Signaling (LLS)
  Index 2/2, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 1
  Last flood scan time is 0 msec, maximum is 4msec
  Neighbor 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 route
R1#showip route ospf
O    192.168.4.0/24 [110/65] via 192.168.134.4,00:40:37, Serial1/0.1
O    192.168.3.0/24 [110/65] via 192.168.134.3,00:40:37, Serial1/0.1
R1#
R3#showip route ospf
O    192.168.4.0/24 [110/65] via 192.168.134.4,00:41:32, Serial1/1.1
O    192.168.1.0/24 [110/65] via 192.168.134.1,00:41:32, Serial1/1.1
R3#
R4#showip route ospf
O    192.168.1.0/24 [110/65] via 192.168.134.1,00:42:10, Serial1/2.1
O    192.168.3.0/24 [110/65] via 192.168.134.3,00:42:10, Serial1/2.1
R4#

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|熊猫同学技术论坛|小黑屋| 网络工程师论坛 ( 沪ICP备09076391 )

GMT+8, 2024-3-28 21:31 , Processed in 0.075510 second(s), 19 queries , Gzip On.

快速回复 返回顶部 返回列表