文档库 最新最全的文档下载
当前位置:文档库 › OSPF在NBMA下的五种网络类型

OSPF在NBMA下的五种网络类型

OSPF在NBMA下的五种网络类型

网络类型就这么几种,有点对点,点对多点,广播多点等等。

最典型的多路访问链路就是常见的以太网,多个访问节点都可以访问同一个网段。在以太网上是可以发广播的。所以叫BMA。

所谓NBMA就是一个多路访问链路,上面又不能发广播。

而帧中继就是典型的(也许是唯一现存的)NBMA了。因为它是多路访问链路,但是又由于有带宽的限制不能发广播包。

ospf 把NBMA分为5类

分别是RFC的:

point-to-multipoint

non-broadcast

CISCO 的:

point-to-multipoint nonbroadcast

broadcast

point-to-point

NBMA阻隔广播和组播,在帧中继中,缺省类型就是nbma,所谓的bma是以太网中的

接口下打上en fram,该接口默认是非广播模式。

帧中继中的广播多路访问模式,是指在接口上打上ip os net b后欺骗ospf将hello包以广播形式发送出去,但帧中继中的无法传播广播的,ospf则是通过DLCI中的broadcast来为每个具有DLCI的目的IP发送单播hello包.

注意回复hello包者也是单播形式

即,单播方式的hello包,形式上是借助端口下配置OSPF 的broadcast方式广播出去,但在

帧中继网络中,最终还是借助帧中继的broadcast方式来封装广播包为帧中继的单播包并转发。frame-relay map ip a.b.c.d 110 broadcast

实验基本配置:

1.首先将R1配置成为帧中继交换机:

frame-relay switching

!

interface Serial1/0

no ip address

encapsulation frame-relay

clock rate 64000

frame-relay lmi-type ansi

frame-relay intf-type dce

frame-relay route 101 interface Serial1/1 102

!

interface Serial1/1

no ip address

encapsulation frame-relay

clock rate 64000

frame-relay lmi-type ansi

frame-relay intf-type dce

frame-relay route 102 interface Serial1/0 101

2.R2和R3的基本配置:

interface Loopback0

ip address 2.2.2.2 255.255.255.0

!

interface Serial1/0

ip address 12.1.1.2 255.255.255.0

encapsulation frame-relay

serial restart-delay 0

frame-relay map ip 12.1.1.3 101 broadcast

no frame-relay inverse-arp

!

router ospf 10

router-id 2.2.2.2

log-adjacency-changes

network 2.2.2.0 0.0.0.255 area 0

network 12.1.1.0 0.0.0.255 area 0

R3:

interface Loopback0

ip address 3.3.3.3 255.255.255.0

!

interface Serial1/1

ip address 12.1.1.3 255.255.255.0

encapsulation frame-relay

serial restart-delay 0

frame-relay map ip 12.1.1.2 102 broadcast

no frame-relay inverse-arp

!

router ospf 10

router-id 3.3.3.3

log-adjacency-changes

network 3.3.3.0 0.0.0.255 area 0

network 12.1.1.0 0.0.0.255 area 0

Type1----Non_Broadcast(默认)

我们在R2上show ip ospf neighbor,发现没有邻居。说明在这种情况下邻居需要手动配置!配置如下:

R2(config)#router ospf 10

R2(config-router)#neighbor 12.1.1.3

R3:

R3(config)#router ospf 10

R3(config-router)#neighbor 12.1.1.2

此时在R2上查看邻居:

R2#sho ip ospf nei

Neighbor ID Pri State Dead Time Address Interface 3.3.3.3 1 FULL/DR 00:01:46 12.1.1.3 Serial1/0 发现邻居已经形成并且有DR与BDR的选举!

在R2上查看接口

R2#show ip ospf interface

Serial1/0 is up, line protocol is up

Internet Address 12.1.1.2/24, Area 0

Process ID 10, Router ID 2.2.2.2, Network Type NON_BROADCAST,Cost: 64 Transmit Delay is 1 sec, State BDR, Priority 1

Designated Router (ID) 3.3.3.3, Interface address 12.1.1.3

Backup Designated router (ID) 2.2.2.2, Interface address 12.1.1.2

Flush timer for old DR LSA due in 00:01:40

Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5

在这种网络类型中,hello的间隔是30s。

打开debug信息,我们可以看到在这种网络类型中,OSPF的数据包是单播传送

的。

R2#

*Aug 14 14:52:52.819: OSPF: Send hello to 12.1.1.3 area 0 on Serial1/0 from 12.1.1.2

R2#

*Aug 14 14:52:57.087: OSPF: Rcv hello from 3.3.3.3 area 0 from Serial1/0 12.

1.1.3

*Aug 14 14:52:57.091: OSPF: End of hello processing

Type2----Broadcast

首先去掉刚才手动配置的邻居关系:

R2(config)#router ospf 10

R2(config-router)#no neighbor 12.1.1.3

R3(config)#router ospf 10

R3(config-router)#no neighbor 12.1.1.2

将R2和R3接口的网络类型改成broadcast

R2(config-router)#int s1/0

R2(config-if)#ip ospf network broadcast

R3(config-router)#int s1/1

R3(config-if)#ip ospf network broadcast

一会我们就看到了如下信息

R3#

*Aug 14 14:59:52.823: %OSPF-5-ADJCHG: Process 10, Nbr 2.2.2.2 on Serial1/1 from LOADING to FULL, Loading Done

这说明了在这种网络类型下是不需要手动配置邻居关系的!

R2#show ip ospf nei

Neighbor ID Pri State Dead Time Address Interface 3.3.3.3 1 FULL/DR00:00:39 12.1.1.3 Serial1/0

有DR与BDR的选举。

R2#sho ip ospf int

Serial1/0 is up, line protocol is up

Internet Address 12.1.1.2/24, Area 0

Process ID 10, Router ID 2.2.2.2, Network Type BROADCAST, Cost: 64 Transmit Delay is 1 sec, State BDR, Priority 1

Designated Router (ID) 3.3.3.3, Interface address 12.1.1.3

Backup Designated router (ID) 2.2.2.2, Interface address 12.1.1.2

Timer intervals configured,Hello 10, Dead 40, Wait 40, Retransmit 5

Hello时间间隔为10s。

R2#

*Aug 14 15:02:20.443: OSPF: Send hello to224.0.0.5 area 0 on Serial1/0 fro m 12.1.1.2

*Aug 14 15:02:20.959: OSPF: Rcv hello from 3.3.3.3 area 0 from Serial1/0 12.

1.1.3

*Aug 14 15:02:20.963: OSPF: End of hello processing

使用224.0.0.5这个组播地址传送数据包。

Type3----Point-to-Point

将R2,R3接口的网络类型改成Point-to-Point

R2(config-if)#ip ospf net point-to-point

R3(config-if)#ip ospf net point-to-point

很快我们就可以看到如下信息

R3(config-if)#

*Aug 14 15:06:07.559: %OSPF-5-ADJCHG: Process 10, Nbr 2.2.2.2 on Serial1/1 from LOADING to FULL, Loading Done

说明这种网络类型也不需要手动指定邻居

R2#sho ip ospf nei

Neighbor ID Pri State Dead Time Address Interface 3.3.3.3 0 FULL/ -00:00:37 12.1.1.3 Serial1/0

没有DR/BDR的选举

R2#sh ip ospf int

Serial1/0 is up, line protocol is up

Internet Address 12.1.1.2/24, Area 0

Process ID 10, Router ID 2.2.2.2, Network Type POINT_TO_POINT, Cost: 64 Transmit Delay is 1 sec, State POINT_TO_POINT,

Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

Hello时间间隔为10s

R2#

*Aug 14 15:08:25.311: OSPF: Send hello to224.0.0.5 area 0 on Serial1/0 fro m 12.1.1.2

R2#

*Aug 14 15:08:30.259: OSPF: Rcv hello from 3.3.3.3 area 0 from Serial1/0 12.

1.1.3

*Aug 14 15:08:30.263: OSPF: End of hello processing

同样也是使用224.0.0.5这个组播地址传送数据。

Type4----Point-to-Multipoint

将接口改为Point-to-Multipoint

R2(config-if)#ip ospf network point-to-multipoint

R3(config-if)#ip ospf network point-to-multipoint

*Aug 14 15:10:51.739: %OSPF-5-ADJCHG: Process 10, Nbr 2.2.2.2 on Serial1/1 from LOADING to FULL, Loading Done

同样也不需要手动指定邻居

R2#sho ip ospf nei

Neighbor ID Pri State Dead Time Address Interface 3.3.3.3 0 FULL/ -00:01:48 12.1.1.3 Serial1/0 没有DR和BDR的选举

R2#sho ip ospf int

Serial1/0 is up, line protocol is up

Internet Address 12.1.1.2/24, Area 0

Process ID 10, Router ID 2.2.2.2,Network Type POINT_TO_MULTIPOINT, Cost: 64

Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT,

Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5 Hello时间间隔为30s

R2#

*Aug 14 15:12:49.759: OSPF: Send hello to 224.0.0.5area 0 on Serial1/0 fro m 12.1.1.2

R2#

*Aug 14 15:12:57.443: OSPF: Rcv hello from 3.3.3.3 area 0 from Serial1/0 12.

1.1.3

*Aug 14 15:12:57.447: OSPF: End of hello processing

以224.0.0.5这个组播地址发送数据

Type5----Point-to-Multipoint(Non_Broadcast)

改变接口类型为Point-to-Multipoint(Non_Broadcast)

R2(config-if)#ip ospf network point-to-multipoint non-broadcast

R3(config-if)#ip ospf network point-to-multipoint non-broadcast

这个时候邻居没有被自动发现。我们在R2上手动指定邻居

R2(config-if)#router ospf 10

R2(config-router)#neighbor 12.1.1.3

R2(config-router)#

*Aug 14 15:18:38.955: %OSPF-5-ADJCHG: Process 10, Nbr 3.3.3.3 on Serial1/0 from LOADING to FULL, Loading Done

邻居只要在一边指定即可。说明在这种网络类型下邻居需要手动指定。

R2#sho ip ospf nei

Neighbor ID Pri State Dead Time Address Interface 3.3.3.3 0 FULL/ -00:01:57 12.1.1.3 Serial1/0 同样没有DR和BDR的选取

R2#sho ip ospf int

Serial1/0 is up, line protocol is up

Internet Address 12.1.1.2/24, Area 0

Process ID 10, Router ID 2.2.2.2, Network Type POINT_TO_MULTIPOINT, Cost: 64

Transmit Delay is 1 sec, State POINT_TO_MULTIPOINT,

Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5

Hello时间间隔为30s

R2#

*Aug 14 15:21:03.099: OSPF: Send hello to12.1.1.3area 0 on Serial1/0 from 12.1.1.2

*Aug 14 15:21:03.295: OSPF: Rcv hello from 3.3.3.3 area 0 from Serial1/0 12.

1.1.3

*Aug 14 15:21:03.299: OSPF: End of hello processing

使用单播传送OSPF数据。

总结:在NBMA网络下5种网络类型具体情况如下表所示:

说明:

1、non-broadcast、point-to-multipoint non-broadcast 两个类型中的OSPF需要配置neighboor,即手工指定邻居,即不能自动发现邻居。

2、non-broadcast、point-to-multipoint non-broadcast 两个类型中的OSPF为单播传输数据,其他为组播224.0.0.5方式传播。

3、point-to-x的网络类型,均没有DR的选举一说。

4、配置命令frame-relay map ip a.b.c.d102 broadcast

这种配置下broadcast参数作用:帧中继可以处理广播流,使用广播分组将DLCI 102发送给邻居a.b.c.d,

要强调的是,这里的frame-relay map ip配置,是帧中继映射的配置,而非OSPF类型的配置

5、要强调的是,如果采用全网状互联方式,broacast工作正常,但如果全网状某些链路出现故障成为部分网状互联即星型结构,而中心的路由器没有成为DR,则会出现部分网络之间无法互相学习到路由条目,导致无法正常访问。

The broadcast model over Frame Relay works properly if the Frame Relay cloud is fully meshed. “Problems with Running OSPF in NBMA and Broadcast Mode over Frame Relay”

6、部分网状连接的帧中继网络: OSPF如果需要发送Hello包建立邻居关系,则必须发送到中心路由器,因为OSPF的Hello包的TTL只有1

NBMA网络拓扑:

1、全网状连接方式

2、部分网状连接方式

实质:

帧中继自身不转发广播包、组播包,故Cisco采用以下方式进行了改进,使之成为支持广播的网络:

1、帧中继的改进:

广播网络,在对端口下的帧中继配置:frame-relay map ip a.b.c.d102 broadcast

这种配置下broadcast参数作用:帧中继可以处理广播流,使用广播分组将DLCI 102发送给邻居a.b.c.d

子接口Point-to-Point类型网络中似乎可以不用broadcast参数(Packet Tracer已核实,待IOU核实)

2、OSPF的改进:

(a)针对参与到帧中继网络中的路由器端口,指定其端口类型:

interface serial 1/0

ip ospf network non-broadcast/point-to-mulitpoint non-broadcast或者

ip ospf network broadcast/point-to-point/ point-to-mulitpoin t

(b)针对非广播non-broadcast的网络类型在路由器中,则手工指定OSPF邻居:

router ospf 10

neighbor a.b.c.d

1、Packet Tracer具备接口的改造:

对接口类型可以设置为point-to-point、mulitpoint

interface serial 1/0 point-to-point/mulitpoint

相关文档