OSPF NBMA实验(单播广播)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了OSPF NBMA实验(单播广播)相关的知识,希望对你有一定的参考价值。

在帧中继下ospf网络类型默认为NBMA,不支持广播(其实指的是组播,因为ospf是通过组播来发送数据的),只支持单播。

以下实验是在帧中继下既能使ospf网络类型支持默认单播,又通过修改网络类型手段支持广播(其实指的组播,因为ospf是通过组播来发送报文的)。

以下我们第一种方式使用默认单播方式做的实验,第二种实验采用广播方式(既然你不支持广播,那么我让你支持广播【其实指的组播,因为ospf是通过组播来发送报文的】不就行了?)

技术分享

(两个实验帧中继map表相同)

第一种,采用默认单播方式,需要手动指定peer

R1

[Huawei]dis cur conf ospf

[V200R003C00]

#

ospf 1 

 peer 10.1.123.2

 peer 10.1.123.3

 area 0.0.0.0 

  network 10.1.123.0 0.0.0.255 

  network 11.1.1.1 0.0.0.0 

#

return

[Huawei]dis cur inter

[Huawei]dis cur interface s 1/0/0

[V200R003C00]

#

interface Serial1/0/0

 link-protocol fr (s口默认为ppp,也就是p2p网络类型。因此需要修改成fr

 fr map ip 10.1.123.2 102

 fr map ip 10.1.123.3 103

 ip address 10.1.123.1 255.255.255.0 


[Huawei]dis ospf inter s 1/0/0


OSPF Process 1 with Router ID 11.1.1.1

Interfaces 



 Interface: 10.1.123.1 (Serial1/0/0)(要选择DR、BDR、DROther)

 Cost: 48      State: DROther    Type: NBMA      MTU: 1500  

 Priority: 1

 Designated Router: 10.1.123.3

 Backup Designated Router: 10.1.123.2

 Timers: Hello 30 , Dead 120 , Poll  120 , Retransmit 5 , Transmit Delay 1 

[Huawei]dis ospf peer bri


OSPF Process 1 with Router ID 11.1.1.1

 Peer Statistic Information

 ----------------------------------------------------------------------------

 Area Id          Interface                        Neighbor id      State    

 0.0.0.0          Serial1/0/0                      22.1.1.1         Full        

 0.0.0.0          Serial1/0/0                      33.1.1.1         Full        

 ----------------------------------------------------------------------------


R2

[Huawei]dis cu conf ospf

[V200R003C00]

#

ospf 1 

 peer 10.1.123.1

 peer 10.1.123.3

 area 0.0.0.0 

  network 10.1.123.0 0.0.0.255 

  network 22.1.1.1 0.0.0.0 

#

return

[Huawei]dis cu inter s 1/0/0

[V200R003C00]

#

interface Serial1/0/0

 link-protocol fr

 fr map ip 10.1.123.1 201

 fr map ip 10.1.123.3 203

 ip address 10.1.123.2 255.255.255.0 


[Huawei]dis ospf inter s 1/0/0


OSPF Process 1 with Router ID 22.1.1.1

Interfaces 



 Interface: 10.1.123.2 (Serial1/0/0)

 Cost: 48      State: BDR       Type: NBMA      MTU: 1500  

 Priority: 1

 Designated Router: 10.1.123.3

 Backup Designated Router: 10.1.123.2

 Timers: Hello 30 , Dead 120 , Poll  120 , Retransmit 5 , Transmit Delay 1 

[Huawei]

[Huawei]

[Huawei]dis ospf peer bri


OSPF Process 1 with Router ID 22.1.1.1

 Peer Statistic Information

 ----------------------------------------------------------------------------

 Area Id          Interface                        Neighbor id      State    

 0.0.0.0          Serial1/0/0                      11.1.1.1         Full        


 0.0.0.0          Serial1/0/0                      33.1.1.1         Full        


 ----------------------------------------------------------------------------


R3

[Huawei-ospf-1]dis cu conf ospf

[V200R003C00]

#

ospf 1 

 peer 10.1.123.1

 peer 10.1.123.2

 area 0.0.0.0 

  network 10.1.123.0 0.0.0.255 

  network 33.1.1.1 0.0.0.0 

#

return

[Huawei-ospf-1]dis cu int s 1/0/0

[V200R003C00]

#

interface Serial1/0/0

 link-protocol fr

 fr map ip 10.1.123.1 301

 fr map ip 10.1.123.2 302

 ip address 10.1.123.3 255.255.255.0 

#

[Huawei]dis ospf inter s 1/0/0


OSPF Process 1 with Router ID 33.1.1.1

Interfaces 



 Interface: 10.1.123.3 (Serial1/0/0)

 Cost: 48      State: DR        Type: NBMA      MTU: 1500  

 Priority: 1

 Designated Router: 10.1.123.3

 Backup Designated Router: 10.1.123.2

 Timers: Hello 30 , Dead 120 , Poll  120 , Retransmit 5 , Transmit Delay 1 

[Huawei]dis ospf peer bri


OSPF Process 1 with Router ID 33.1.1.1

 Peer Statistic Information

 ----------------------------------------------------------------------------

 Area Id          Interface                        Neighbor id      State    

 0.0.0.0          Serial1/0/0                      11.1.1.1         Full        

 0.0.0.0          Serial1/0/0                      22.1.1.1         Full        

 ----------------------------------------------------------------------------


第二种,NBMA默认不支持广播(其实指的是组播),那么我就要让你支持广播方式(均不需指定peer),具体实验如下:

R1:

[Huawei]dis cur conf ospf

[V200R003C00]

#

ospf 1 

 area 0.0.0.0 

  network 10.1.123.0 0.0.0.255 

  network 11.1.1.1 0.0.0.0 

#

return

[Huawei]dis current-configuration interface s1/0/0

[V200R003C00]

#

interface Serial1/0/0

 link-protocol fr

 fr map ip 10.1.123.2 102 broadcast (建立帧中继map支持广播表?)

 fr map ip 10.1.123.3 103 broadcast

 ip address 10.1.123.1 255.255.255.0 

 ospf network-type broadcast (网络类型修改)

#

return

[Huawei]dis ospf interface Serial 1/0/0


OSPF Process 1 with Router ID 11.1.1.1

Interfaces 



 Interface: 10.1.123.1 (Serial1/0/0)

 Cost: 48      State: BDR       Type: Broadcast    MTU: 1500  

 Priority: 1

 Designated Router: 10.1.123.3

 Backup Designated Router: 10.1.123.1

 Timers: Hello 10 , Dead 40 , Poll  120 , Retransmit 5 , Transmit Delay 1 

[Huawei]dis ospf peer bri


OSPF Process 1 with Router ID 11.1.1.1

 Peer Statistic Information

 ----------------------------------------------------------------------------

 Area Id          Interface                        Neighbor id      State    

 0.0.0.0          Serial1/0/0                      22.1.1.1         Full        

 0.0.0.0          Serial1/0/0                      33.1.1.1         Full        

 ----------------------------------------------------------------------------


R2:

[Huawei]dis cu conf ospf

[V200R003C00]

#

ospf 1 

 area 0.0.0.0 

  network 10.1.123.0 0.0.0.255 

  network 22.1.1.1 0.0.0.0 

#

return

[Huawei]dis cu interface s 1/0/0

[V200R003C00]

#

interface Serial1/0/0

 link-protocol fr

 fr map ip 10.1.123.1 201 broadcast

 fr map ip 10.1.123.3 203 broadcast

 ip address 10.1.123.2 255.255.255.0 

 ospf network-type broadcast

#

return

[Huawei]dis ospf inter

[Huawei]dis ospf interface s1/0/0


OSPF Process 1 with Router ID 22.1.1.1

Interfaces 



 Interface: 10.1.123.2 (Serial1/0/0)

 Cost: 48      State: DROther    Type: Broadcast    MTU: 1500  

 Priority: 1

 Designated Router: 10.1.123.3

 Backup Designated Router: 10.1.123.1

 Timers: Hello 10 , Dead 40 , Poll  120 , Retransmit 5 , Transmit Delay 1 

[Huawei]dis ospf peer bri


OSPF Process 1 with Router ID 22.1.1.1

 Peer Statistic Information

 ----------------------------------------------------------------------------

 Area Id          Interface                        Neighbor id      State    

 0.0.0.0          Serial1/0/0                      11.1.1.1         Full        


 0.0.0.0          Serial1/0/0                      33.1.1.1         Full        

 ----------------------------------------------------------------------------

[Huawei]


R3:

[Huawei]dis cu config ospf

[V200R003C00]

#

ospf 1 

 area 0.0.0.0 

  network 10.1.123.0 0.0.0.255 

  network 33.1.1.1 0.0.0.0 

#

return

[Huawei]dis cu inter s 1/0/0

[V200R003C00]

#

interface Serial1/0/0

 link-protocol fr

 fr map ip 10.1.123.1 301 broadcast

 fr map ip 10.1.123.2 302 broadcast

 ip address 10.1.123.3 255.255.255.0 

 ospf network-type broadcast

#

return

[Huawei]dis ospf inter s 1/0/0


OSPF Process 1 with Router ID 33.1.1.1

Interfaces 



 Interface: 10.1.123.3 (Serial1/0/0)

 Cost: 48      State: DR        Type: Broadcast    MTU: 1500  

 Priority: 1

 Designated Router: 10.1.123.3

 Backup Designated Router: 10.1.123.1

 Timers: Hello 10 , Dead 40 , Poll  120 , Retransmit 5 , Transmit Delay 1 

[Huawei]dis ospf peer bri


OSPF Process 1 with Router ID 33.1.1.1

 Peer Statistic Information

 ----------------------------------------------------------------------------

 Area Id          Interface                        Neighbor id      State    

 0.0.0.0          Serial1/0/0                      11.1.1.1         Full        

 0.0.0.0          Serial1/0/0                      22.1.1.1         Full        

 ----------------------------------------------------------------------------

本文出自 “五片棱角” 博客,请务必保留此出处http://hi289.blog.51cto.com/4513812/1795376

以上是关于OSPF NBMA实验(单播广播)的主要内容,如果未能解决你的问题,请参考以下文章

ospf和RIPv2只能组播更新,这句话为啥是错的?错在哪里?

描述OSPF将网络分成哪些类型,每一种类型是不是需要选择DR和BDR,如果需要如何选择?

ospf点到点链路为啥使用的是组播的地址而不是单播的地址

OSPF协议各类LSA的内容总结

单播、广播和多播IP地址

ospf协议建立邻接的过程中有多少个状态