|
l ospf网络中不同的广播域DR与BDR选择情况
正文:
l 为什么要选择DR?
在构建相关路由器之间的邻居关系时,会创建很多不必要的LSA,
他们会以n的n次方猛增。
l 怎样选举DR/BDR? 老问题不在赘述。参看卷一P288
l 什么时候发生同为DR与BDR?
TOPO如下:
l R1
l R2
l R3
|
R1完整配置 |
|
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface Ethernet0/0
ip address 13.1.1.1 255.255.255.0
!
interface Serial1/0
ip address 12.1.1.1 255.255.255.0
ip ospf network broadcast
serial restart-delay 0
!
interface Serial2/0
no ip address
shutdown
serial restart-delay 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
network 13.1.1.0 0.0.0.255 area 0 |
|
R2完整配置 |
|
interface Loopback0
ip address 2.2.2.2 255.255.255.0
!
interface Ethernet0/0
no ip address
shutdown
!
interface Serial1/0
ip address 23.1.1.2 255.255.255.0
ip ospf network broadcast
serial restart-delay 0
!
interface Serial2/0
ip address 12.1.1.2 255.255.255.0
ip ospf network broadcast
serial restart-delay 0
!
router ospf 10
log-adjacency-changes
network 12.1.1.0 0.0.0.255 area 0
network 23.1.1.0 0.0.0.255 area 0 |
|
R3完整配置 |
|
interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface Ethernet0/0
ip address 13.1.1.3 255.255.255.0
!
interface Serial1/0
no ip address
shutdown
serial restart-delay 0
!
interface Serial2/0
ip address 23.1.1.3 255.255.255.0
ip ospf network broadcast
serial restart-delay 0
!
router ospf 10
log-adjacency-changes
network 13.1.1.0 0.0.0.255 area 0
network 23.1.1.0 0.0.0.255 area 0 |
测试:r1#sh ip os nei
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 FULL/BDR 00:00:38 12.1.1.2 Serial1/0
3.3.3.3 1 FULL/BDR 00:00:35 13.1.1.3 Ethernet0/0
r2#sh ip os nei
Neighbor ID Pri State Dead Time Address Interface
3.3.3.3 1 FULL/DR 00:00:38 23.1.1.3 Serial1/0
1.1.1.1 1 FULL/DR 00:00:34 12.1.1.1 Serial2/0
r3#sh ip os nei
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 FULL/BDR 00:00:34 23.1.1.2 Serial2/0
1.1.1.1 1 FULL/DR 00:00:31 13.1.1.1 Ethernet0/0
默认串行链路为点到点的不选举DR/BDR,我们使用ip ospf network broadcast命令,让其变为广播链路。在两个广播域边界就会产生既是DR又为BDR的情况,注意R1因为先起机所以永为DR并不可抢夺。
|