Adjacent to DR/BDR

In a multi-access network such as Ethernet, the DR/BDR is elected. Then, synchronize the DR/BDR with the LSDB. Configure OSPF on the four Cisco routers on the Ethernet and make sure that they are only adjacent to the DR.

Network Topology

Figure Network topology
Figure Network topology

Make sure that R1 is the DR. For the sake of simplicity, we will not elect a BDR; we will set the router priority to 0 on R2 to R4.

Configuration

The OSPF-related configuration for each router is as follows

R1

interface FastEthernet0/0
 ip address 192.168.1.1 255.255.255.0
 ip ospf priority 100
!
router ospf 1
 router-id 1.1.1.1
 log-adjacency-changes
 network 192.168.1.1 0.0.0.0 area 0

R2

interface FastEthernet0/0
 ip address 192.168.1.2 255.255.255.0
 ip ospf priority 0
!
router ospf 1
 router-id 2.2.2.2
 log-adjacency-changes
 network 192.168.1.2 0.0.0.0 area 0

R3

interface FastEthernet0/0
 ip address 192.168.1.3 255.255.255.0
 ip ospf priority 0
!
router ospf 1
 router-id 3.3.3.3
 log-adjacency-changes
 network 192.168.1.3 0.0.0.0 area 0

R4

interface FastEthernet0/0
 ip address 192.168.1.4 255.255.255.0
 ip ospf priority 0
!
router ospf 1
 router-id 4.4.4.4
 log-adjacency-changes
 network 192.168.1.4 0.0.0.0 area 0

Display of show ip ospf neighbor

R1

Display show ip ospf neighbor on R1, which is the DR.

R1 show ip ospf neighbor

R1#show ip ospf neighbor 


Neighbor ID     Pri   State           Dead Time   Address         Interface
3.3.3.3           0   FULL/DROTHER    00:00:39    192.168.1.3     FastEthernet0/0
2.2.2.2           0   FULL/DROTHER    00:00:39    192.168.1.2     FastEthernet0/0
4.4.4.4           0   FULL/DROTHER    00:00:39    192.168.1.4     FastEthernet0/0

We can see that R1 has established adjacency with R2, R3, and F4, and is in FULL state; FULL state is the state of LSDB synchronization.

R2

R2 show ip ospf neighbor

R2#show ip ospf neighbor 


Neighbor ID     Pri   State           Dead Time   Address         Interface
4.4.4.4           0   2WAY/DROTHER    00:00:39    192.168.1.4     FastEthernet0/0
1.1.1.1         100   FULL/DR         00:00:39    192.168.1.1     FastEthernet0/0
3.3.3.3           0   2WAY/DROTHER    00:00:39    192.168.1.3     FastEthernet0/0

If you look at the show ip ospf neighbor on R2, you will see that it has established an adjacency only with R1, which is the DR, and is in the FULL state, while it is in the 2-way state with R3 and R4, which are just neighbors.

R3

R3 show ip ospf neighbor

R3#show ip ospf neighbor 


Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           0   2WAY/DROTHER    00:00:39    192.168.1.2     FastEthernet0/0
4.4.4.4           0   2WAY/DROTHER    00:00:39    192.168.1.4     FastEthernet0/0
1.1.1.1         100   FULL/DR         00:00:39    192.168.1.1     FastEthernet0/0

On R3, it is the same as R2; it is in FULL state, having established adjacency with R1, the DR.

R4

R4 show ip ospf neighbor

R4#show ip ospf neighbor 


Neighbor ID     Pri   State           Dead Time   Address         Interface
3.3.3.3           0   2WAY/DROTHER    00:00:31    192.168.1.3     FastEthernet0/0
2.2.2.2           0   2WAY/DROTHER    00:00:31    192.168.1.2     FastEthernet0/0
1.1.1.1         100   FULL/DR         00:00:31    192.168.1.1     FastEthernet0/0

R4 is the same as R2 and R3; it has established adjacency with R1, the DR, and is in the FULL state.

Summary of neighbor and adjacency

This section summarizes the relationship between routers R1 to R4.

RelationshipBetween Routers
neighbor(2WAY)R2-R3,R2-R4,R3-R4
adjacency(FULL)R1-R2,R1-R3,R1-R4
Table Summary of neighbor and adjacency
Figure Summary of neighbor and adjacency
Figure Summary of neighbor and adjacency

How the OSPF works