OSPF Configuration Examples 317
Configuring OSPF DR
Election
Network requirements
■ In the following figure, OSPF Switches A, B, C and D reside on the same
network segment.
■ It is required to configure Switch A as the DR, and configure Switch C as the
BDR.
Network diagram
Figure 96 Network diagram for OSPF DR election configuration
Configuration procedure
1 Configure IP addresses for interfaces (omitted)
2 Configure OSPF basic functions
# Configure Switch A.
<SwitchA> system-view
[Switch A] router id 1.1.1.1
[Switch A] ospf
[Switch A-ospf-1] area 0
[Switch A-ospf-1-area-0.0.0.0] network 196.1.1.0 0.0.0.255
[SwitchA-ospf-1-area-0.0.0.0] quit
[SwitchA-ospf-1] quit
# Configure Switch B.
<SwitchB> system-view
[SwitchB] router id 2.2.2.2
[SwitchB] ospf
[SwitchB-ospf-1] area 0
[SwitchB-ospf-1-area-0.0.0.0] network 196.1.1.0 0.0.0.255
[SwitchB-ospf-1-area-0.0.0.0] quit
[SwitchB-ospf-1] quit
# Configure Switch C.
<SwitchC> system-view
[SwitchC] router id 3.3.3.3
[SwitchC] ospf
[SwitchC-ospf-1] area 0
[SwitchC-ospf-1-area-0.0.0.0] network 196.1.1.0 0.0.0.255
[SwitchC-ospf-1-area-0.0.0.0] quit
[SwitchC-ospf-1] quit
Switch A Switch D
Switch B
Switch C
Vlan-int1
196.1.1.1/24
Vlan-int1
196.1.1.4/24
Vlan-int1
196.1.1.2/24
Vlan-int1
196.1.1.3/24
DR
BDR