【OSPF】OSPF的4种⽹络类型
书山有路勤为径学海无涯苦作舟是谁写的
⽂章⽬录
OSPF⽹络类型是⼀个⾮常重要的接⼝变量,这个变量将影响OSPF在接⼝上的操作,例如采⽤什么⽅式发送OSPF协议报⽂,以及是否需要选举DR、BDR等。
OSPF有4种⽹络类型,分别是P2P、P2MP、BMA(Broadcast)、NBMA。
OSPF⽹络类型的影响:⼀般情况下,链路两端的OSPF接⼝⽹络类型必须⼀致,否则双⽅⽆法建⽴邻居关系。
P2P(Point-to-Point 点对点)原味汤粉
P2P指的是在⼀段链路上只能连接两台⽹络设备的环境,⼀根⽹线,⼀左⼀右。
该环境下只有2台设备,也只能是2台设备,链路中间不能加⼊其他设备。如,⼀条链路上不能加⼊交换
机设备。
典型的例⼦是PPP链路。当接⼝采⽤PPP封装时,OSPF在该接⼝上采⽤缺省⽹络类型是P2P。
P2MP(Point ti Multi-Point 点到多点)
P2MP相当于将多条P2P链路的⼀段进⾏捆绑得到的⽹络。
没有⼀种链路层协议会被缺省的认为是P2MP⽹络类型。该类型必须由其他⽹络类型⼿动更改。
常⽤的做法是将⾮全连通的NBMA改为点到多点的⽹络。
P2MP⽰例图
MA,Multi-Access,多路访问⽹络有2种类型:⼴播型多路访问⽹络(BMA)和⾮⼴播型多路访问(NBMA)BMA(Broadcast Multiple Access ⼴播多路访问)
BMA也被称为Broadcast,指的是⼀个允许多台设备接⼊的、⽀持⼴播的环境。
典型的例⼦是Ethernet以太⽹。当接⼝采⽤Ethernet封装时,OSPF在该接⼝上采⽤的缺省⽹络类型为BMA。NBMA(Non-Broadcast Multiple Access ⾮⼴播多路访问)
NBMA指的是⼀个允许多台⽹络设备接⼊且不⽀持⼴播的环境。
典型的例⼦是帧中继(Frame-Relay)⽹络。
OSPF⽹络类型可以在接⼝下通过命令⼿动修改以适应不同⽹络场景,如可以将BMA⽹络类型修改为P2P。⽰例:
# 配置完接⼝,默认是BMA
[AR1-GigabitEthernet0/0/0]dis this
[V200R003C00]醒悟的拼音
#
interface GigabitEthernet0/0/0
ip address 10.1.12.1 255.255.255.0
牙齿手抄报#
return
#查看可以修改的⽹络类型
[AR1-GigabitEthernet0/0/0]ospf network-type ?
broadcast Specify OSPF broadcast network
nbma Specify OSPF NBMA network
p2mp Specify OSPF point-to-multipoint network
p2p Specify OSPF point-to-point network
#修改为P2P,重新建⽴邻居关系
[AR1-GigabitEthernet0/0/0]ospf network-type p2p
Feb 16 2022 21:54:50-08:00 AR1 %%01OSPF/3/NBR_CHG_DOWN(l)[8]:Neighbor event:neig
hbor state changed to Down. (ProcessId=256, NeighborAddress=2.2.2.2, NeighborEve
nt=KillNbr, NeighborPreviousState=Full, NeighborCurrentState=Down)
[AR1-GigabitEthernet0/0/0]生日花束
[AR1-GigabitEthernet0/0/0]
Feb 16 2022 21:54:50-08:00 AR1 %%01OSPF/3/NBR_DOWN_REASON(l)[9]:Neighbor state l
eaves full or changed to Down. (ProcessId=256, NeighborRouterId=2.2.2.2, Neighbo
rAreaId=0, NeighborInterface=GigabitEthernet0/0/0,NeighborDownImmediate reason=N
eighbor Down Due to Kill Neighbor, NeighborDownPrimeReason=Interface Parameter M
ismatch, NeighborChangeTime=2022-02-16 21:54:50-08:00)
[AR1-GigabitEthernet0/0/0]
Feb 16 2022 21:54:56-08:00 AR1 %%01OSPF/4/NBR_CHANGE_E(l)[10]:Neighbor changes e
煎黄鱼vent: neighbor status changed. (ProcessId=256, NeighborAddress=2.12.1.10, Neighb
orEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init)
[AR1-GigabitEthernet0/0/0]
Feb 16 2022 21:54:56-08:00 AR1 %%01OSPF/4/NBR_CHANGE_E(l)[11]:Neighbor changes e
vent: neighbor status changed. (ProcessId=256, NeighborAddress=2.12.1.10, Neighb
orEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=ExStart)
观点的英语[AR1-GigabitEthernet0/0/0]
Feb 16 2022 21:54:56-08:00 AR1 %%01OSPF/4/NBR_CHANGE_E(l)[12]:Neighbor changes e
vent: neighbor status changed. (ProcessId=256, NeighborAddress=2.12.1.10, Neighb
orEvent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Exc
hange)
[AR1-GigabitEthernet0/0/0]
Feb 16 2022 21:54:56-08:00 AR1 %%01OSPF/4/NBR_CHANGE_E(l)[13]:Neighbor changes e
vent: neighbor status changed. (ProcessId=256, NeighborAddress=2.12.1.10, Neighb
orEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loadi
ng)
[AR1-GigabitEthernet0/0/0]
Feb 16 2022 21:54:56-08:00 AR1 %%01OSPF/4/NBR_CHANGE_E(l)[14]:Neighbor changes e
vent: neighbor status changed. (ProcessId=256, NeighborAddress=2.12.1.10, Neighb篮球社团简介
orEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full)