打印

OSPF接口在三种网络类型的五种工作模式总结-点到点

OSPF接口在三种网络类型的五种工作模式总结-点到点

TOPO如下




基本配置如下


l
R1


l
R2



R1基本配置


interface Loopback0



ip address 1.1.1.1 255.255.255.0


!


interface Serial1/0



ip address 12.1.1.1 255.255.255.0


!


router ospf 10



log-adjacency-changes



network 1.1.1.0 0.0.0.255 area 0



network 12.1.1.0 0.0.0.255 area 0




R2基本配置


interface Loopback0



ip address 2.2.2.2 255.255.255.0


!


interface Serial2/0



ip address 12.1.1.2 255.255.255.0


!


router ospf 10



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





网络类型:点到点


工作方式


是否要选DR/BDR


是否要指定邻居


邻居形成快慢


点到点(默认





广播




很慢,40秒左右


NBMA




很慢,20秒左右


点到多点




较快,7秒左右


点到多点非广播







测试⑴:点到点(默认)


查看端口的工作模式:


r1#sho ip os int


Serial1/0 is up, line protocol is up



Internet Address 12.1.1.1/24, Area 0



Process ID 10, Router ID 1.1.1.1, 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(以下忽略)


查看邻居关系:没有DR/BDR选举


r1#sho ip os nei


Neighbor ID
Pri
State
Dead Time
Address
Interface


2.2.2.2
0
FULL/ -
00:00:32
12.1.1.2
Serial1/0


测试⑵:广播


在R1、R2上修改端口的工作模式为broadcast


r1(config-if)#ip os network broadcast


r2(config-if)#ip os network broadcast


查看端口的工作模式:


r1#sho ip os int


Serial1/0 is up, line protocol is up



Internet Address 12.1.1.1/24, Area 0



Process ID 10, Router ID 1.1.1.1, Network Type
BROADCAST, Cost: 64



Transmit Delay is 1 sec, State BDR, Priority 1



Designated Router (ID) 2.2.2.2, Interface address 12.1.1.2



Backup Designated router (ID) 1.1.1.1, Interface address 12.1.1.1



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


查看邻居关系:有DR/BDR选举


r1#sho ip os nei


Neighbor ID
Pri
State
Dead Time
Address
Interface


2.2.2.2
1
FULL/DR
00:00:31
12.1.1.2
Serial1/0



测试⑶:NBMA


在R1、R2上修改端口的工作模式并在R1上指定邻居(如果没有手动指定邻居,邻居关系起不来,邻居只要在一边指定)


r1(config-if)#ip os net non-broadcast


r1(config-if)#router os 10


r1(config-router)#nei 12.1.1.2


r2(config-if)#ip os net non-broadcast


查看端口工作模式


r1#sho ip os int


Serial1/0 is up, line protocol is up



Internet Address 123.1.1.1/24, Area 0



Process ID 10, Router ID 1.1.1.1, Network Type
NON_BROADCAST, Cost: 64



Transmit Delay is 1 sec, State DR, Priority 1



Designated Router (ID) 1.1.1.1, Interface address 12.1.1.1



Backup Designated router (ID) 2.2.2.2, Interface address 12.1.1.2



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


(以下忽略)


查看邻居关系:有DR/BDR选举


r1#sho ip os nei



Neighbor ID
Pri
State
Dead Time
Address
Interface


2.2.2.2
1
FULL/DR
00:01:59
12.1.1.2
Serial1/0


测试⑷:点到多点


在R1、R2上修改端口的工作模式


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


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



查看端口工作模式:


r1#sho ip os int


Serial1/0 is up, line protocol is up



Internet Address 12.1.1.1/24, Area 0



Process ID 10, Router ID 1.1.1.1, 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


(以下忽略)


查看邻居关系:没有DR/BDR选举


r1#sh ip os nei


Neighbor ID
Pri
State
Dead Time
Address
Interface


2.2.2.2
0
FULL/ -
00:01:58
123.1.1.2
Serial1/0


测试⑸:点到多点非广播


在R1、R2上修改端口的工作模式并在R1上指定邻居(如果没有手动指定邻居,邻居关系起不来,邻居只要在一边指定)


r1(config-if)#ip os network point-to-multipoint non-broadcast


r1(config)#router os 10


r1(config-router)#nei 12.1.1.2


r2(config-if)#ip os network point-to-multipoint non-broadcast



查看端口工作模式:注意,这里我们配置了点到多点非广播,但是查看端口时只显示点到多点


r2#sho ip os int


Serial2/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


查看邻居关系:没有DR/BDR选举


r1#sho ip os nei



Neighbor ID
Pri
State

Dead Time
Address


2.2.2.2
0
FULL/ -
00:01:42
123.1.1.2
Serial1/0



总结:在点到点的网络类型中,ospf接口的5种工作方式都能形成邻居,在形成邻居关系的时间上有所差异。






帖子来自汤姆一通, yangrubing-ITAA QQ:383506128

TOP