Ospf dr election

Source: Internet
Author: User

Control DR election of OSPF
Application Environment
In the Broadcast Network and NBMA network, the route changes of any vro will lead to multiple transfers, wasting bandwidth resources. To solve this problem, OSPF defines the election Router DR (Designated Router) and BDR (Backup Designated Router ).
 
All routers send Router-LSA, but only DR, BDR, and DR other establish a connection relationship. All routers only send information to the DR, And the DR broadcasts the network link status. BDR is a backup of DR. When DR is selected, BDR is also selected. BDR is also set up with all the routers in the CIDR Block and route information is exchanged. When the DR fails, the BDR immediately becomes the DR.
 
Vrouters Other than DR and BDR (also known as DR Other) will no longer establish an adjacent relationship or exchange any routing information. In this way, the number of adjacent networks on the broadcast network and NBMA network is reduced.
 
Configuration ideas
The following configuration methods are used to control DR election of OSPF:
 
Configure the router id on each vro to enable basic OSPF functions.
View the DR/BDR status of each vro under the default priority.
Configure the DR priority on the interface and view the DR/BDR status.
Configuration considerations
Note that:
 
DR is only elected for broadcast or NBMA interfaces. DR is not required for point-to-point or point-to-point interfaces.
DR refers to the concept of a network segment, which is for the router interface. A vro may be a DR on one interface, or a BDR or DR Other on another interface.
If DR and BDR have been selected, after a new vro is added, even if its DR priority value is the highest, it will not immediately become the DR in the network segment.
DR is not necessarily the router with the highest DR priority. Likewise, BDR is not necessarily the router with the second highest DR priority.
Configure an instance
Networking requirements
In, routege1/0/0 has a priority of 100, which is the highest priority on the network. Therefore, router1 is selected as DR; routerC's GE1/0/0 interface has the second priority than router's GE1/0/0 interface and is selected as BDR; RouterB has the priority of 0, which means it will not participate in DR election; RouterD has no configured priority, the default value is 1.
 
Control the DR selection networking diagram of OSPF
 
 
 
Applicable products and versions
Vro can use any NE product with the vro version (VRP5.30) and later versions.
 
Procedure
Step 1 configure the IP addresses of each interface (omitted)
 
Step 2 configure basic OSPF Functions
 
# Configure routeconfig.
 
[RouterA] router id 1.1.1.1
 
[Roupid] ospf
 
[RouterA-ospf-1] area 0
 
[RouterA-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.255
 
# Configure RouterB.
 
[RouterB] router id 2.2.2.2
 
[RouterB] ospf
 
[RouterB-ospf-1] area 0
 
[RouterB-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.255
 
# Configure RouterC.
 
[RouterC] router id 3.3.3.3
 
[RouterC] ospf
 
[RouterC-ospf-1] area 0
 
[RouterC-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.255
 
# Configure RouterD.
 
[RouterD] router id 4.4.4.4
 
[RouterD] ospf
 
[RouterD-ospf-1] area 0
 
[RouterD-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.255
 
# View the status of DR/BDR.
 
[Roupid] display ospf peer
 
 
 
OSPF Process 1 with Router ID 1.1.1.1
 
Neighbors
 
 
 
Area 0.0.0.0 interface 192.168.1.1 (GigabitEthernet1/0/0)'s neighbors
 
Router ID: 2.2.2.2 Address: 192.168.1.2 GR State: Normal
 
State: 2-Way Mode: Nbr is Master Priority: 1
 
DR: 192.168.1.4 BDR: 192.168.1.3 MTU: 0
 
Dead timer due in 32 sec
 
Neighbor is up for 00:04:21
 
Authentication Sequence: [0]
 
 
 
Router ID: 3.3.3.3 Address: 192.168.1.3 GR State: Normal
 
State: Full Mode: Nbr is Master Priority: 1
 
DR: 192.168.1.4 BDR: 192.168.1.3 MTU: 0
 
Dead timer due in 37 sec
 
Neighbor is up for 00:04:06
 
Authentication Sequence: [0]
 
 
 
Router ID: 4.4.4.4 Address: 192.168.1.4 GR State: Normal
 
State: Full Mode: Nbr is Master Priority: 1
 
DR: 192.168.1.4 BDR: 192.168.1.3 MTU: 0
 
Dead timer due in 37 sec
 
Neighbor is up for 00:03:53
 
Authentication Sequence: [0]
 
View routers' neighbor information. The DR priority (1 by default) and neighbor status are displayed. At this time, RouterD is DR and RouterC is BDR.
 
Description
 
When the priority is the same, the value of router-id is DR. If an Ethernet interface of a vro。 becomes a DR, other broadcast interfaces of this vro have a high priority during subsequent DR selection. That is to say, if you select a vro with a DR as the DR, the DR cannot be preemptible.
 
Step 3 configure the DR priority on the Interface
 
# Configure routeconfig.
 
[Route] interface GigabitEthernet 1/0/0
 
[RouterA-GigabitEthernet1/0/0] ospf dr-priority 100
 
[RouterA-GigabitEthernet1/0/0] quit
 
# Configure RouterB.
 
[RouterB] interface GigabitEthernet 1/0/0
 
[RouterB-GigabitEthernet1/0/0] ospf dr-priority 0
 
[RouterB-GigabitEthernet1/0/0] quit
 
# Configure RouterC.
 
[RouterC] interface GigabitEthernet 1/0/0
 
[RouterC-GigabitEthernet1/0/0] ospf dr-priority 2
 
[RouterC-GigabitEthernet1/0/0] quit
 
# View the status of DR/BDR.
 
[RouterD] display ospf peer
 
 
 
OSPF Process 1 with Router ID 4.4.4
 
Neighbors
 
 
 
Area 0.0.0.0 interface 192.168.1.4 (GigabitEthernet1/0/0)'s neighbors
 
Router ID: 1.1.1.1 Address: 192.168.1.1 GR State: Normal
 
State: Full Mode: Nbr is Slave Priority: 100
 
DR: 192.168.1.4 BDR: 192.168.1.3 MTU: 0
 
Dead timer due in 31 sec
 
Neighbor is up for 00:11:17
 
Authentication Sequence: [0]
 
Router ID: 2.2.2.2 Address: 192.168.1.2 GR State: Normal
 
State: Full Mode: Nbr is Slave Priority: 0
 
DR: 192.168.1.4 BDR: 192.168.1.3 MTU: 0
 
Dead timer due in 35 sec
 
Neighbor is up for 00:11:19
 
Authentication Sequence: [0]
 
 
 
Router ID: 3.3.3.3 Address: 192.168.1.3 GR State: Normal
 
State: Full Mode: Nbr is Slave Priority: 2
 
DR: 192.168.1.4 BDR: 192.168.1.3 MTU: 0
 
Dead timer due in 33 sec
 
Neighbor is up for 00:11:15
 
Authentication Sequence: [0]
 
Description
 
The configuration of DR priority on the interface does not take effect immediately.
 
Step 4 restart the OSPF Process
 
In the user view of each vro, run the reset ospf 1 process command to restart the OSPF process.
 
Verification Result
# View the OSPF neighbor status.
 
[RouterD] display ospf peer
 
 
 
OSPF Process 1 with Router ID 4.4.4
 
Neighbors
 
 
 
Area 0.0.0.0 interface 192.168.1.4 (GigabitEthernet1/0/0)'s neighbors
 
Router ID: 1.1.1.1 Address: 192.168.1.1 GR State: Normal
 
State: Full Mode: Nbr is Slave Priority: 100
 
DR: 192.168.1.1 BDR: 192.168.1.3 MTU: 0
 
Dead timer due in 35 sec
 
Neighbor is up for 00:07:19
 
Authentication Sequence: [0]
 
 
 
Router ID: 2.2.2.2 Address: 192.168.1.2 GR State: Normal
 
State: 2-Way Mode: Nbr is Slave Priority: 0
 
DR: 192.168.1.1 BDR: 192.168.1.3 MTU: 0
 
Dead timer due in 35 sec
 
Neighbor is up for 00:07:19
 
Authentication Sequence: [0]
 
 
 
Router ID: 3.3.3.3 Address: 192.168.1.3 GR State: Normal
 
State: Full Mode: Nbr is Slave Priority: 2
 
DR: 192.168.1.1 BDR: 192.168.1.3 MTU: 0
 
Dead timer due in 37 sec
 
Neighbor is up for 00:07:17
 
Authentication Sequence: [0]
 
# View the status of the OSPF interface.
 
[Roupid] display ospf interface
 
 
 
OSPF Process 1 with Router ID 1.1.1.1
 
Interfaces
 
 
 
Area: 0.0.0.0
 
IP Address Type State Cost Pri DR BDR
 
192.168.1.1 Broadcast DR 1 100 192.168.1.1 192.168.1.3
 
 
 
[RouterB] display ospf interface
 
 
 
OSPF Process 1 with Router ID 2.2.2.2
 
Interfaces
 
 
 
Area: 0.0.0.0
 
IP Address Type State Cost Pri DR BDR
 
192.168.1.2 Broadcast DROther 1 0 192.168.1.1 192.168.1.3
 
 
 
If the neighbor state is Full, it indicates that it forms an adjacent relationship with the neighbor. If it stays in the 2-Way state, it means that they are not DR or BDR, no need to exchange LSA between the two.
 
If the status of the OSPF interface is DROther, it indicates that it is neither DR nor BDR.
 
Configuration File
Routeconfig File
#
 
Sysname roupid
 
#
 
Router id 1.1.1.1
 
#
 
Interface GigabitEthernet1/0/0
 
Ip address 192.168.1.1 255.255.255.0
 
Ospf dr-priority 100
 
#
 
Ospf 1
 
Area 0.0.0.0
 
Network 192.168.1.0 0.0.255
 
#
 
Return
 
Configuration file of RouterB
#
 
Sysname RouterB
 
#
 
Router id 2.2.2.2
 
#
 
Interface GigabitEthernet1/0/0
 
Ip address 192.168.1.2 255.255.255.0
 
Ospf dr-priority 0
 
#
 
Ospf 1
 
Area 0.0.0.0
 
Network 192.168.1.0 0.0.255
 
#
 
Return
 
RouterC configuration file
#
 
Sysname RouterC
 
#
 
Router id 3.3.3.3
 
#
 
Interface GigabitEthernet1/0/0
 
Ip address 192.168.1.3 255.255.255.0
 
Ospf dr-priority 2
 
#
 
Ospf 1
 
Area 0.0.0.0
 
Network 192.168.1.0 0.0.255
 
#
 
Return
 
RouterD configuration file
#
 
Sysname RouterD
 
#
 
Router id 4.4.4
 
#
 
Interface GigabitEthernet1/0/0
 
Ip address 192.168.1.4 255.255.255.0
 
#
 
Ospf 1
 
Area 0.0.0.0
 
Network 192.168.1.0 0.0.255
 
#
 
Return
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.