No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

CLI-based Configuration Guide - IP Unicast Routing

AR100, AR120, AR150, AR160, AR200, AR1200, AR2200, AR3200, and AR3600 V200R009

Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Example for Configuring DR Election of OSPF

Example for Configuring DR Election of OSPF

Networking Requirements

As shown in Figure 5-37, Router A has the highest priority (100) in the network and is elected as the DR. Router C has the second highest priority, and is elected as the BDR. The priority of Router B is 0, and Router B cannot be elected as the DR or BDR. The priority of Router D is not configured and its default value is 1.

Figure 5-37 Configuring DR election of OSPF

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure the router ID on each router, enable OSPF, and specify the network segment.

  2. Check the DR/BDR status of each router with the default priority.

  3. Configure the DR priority of the interface and check the DR/BDR status.

Procedure

  1. Configure an IP address for each interface.

    # Configure IP addresses for all interfaces of RouterA.

    <Huawei> system-view
    [Huawei] sysname RouterA
    [RouterA] interface gigabitethernet 1/0/0
    [RouterA-GigabitEthernet1/0/0] ip address 192.168.1.1 255.255.255.0
    [RouterA-GigabitEthernet1/0/0] quit

    The configurations of RouterB, RouterC and RouterD are similar to the configuration of RouterA, and are not mentioned here.

  2. Configure basic OSPF functions.

    # Configure Router A.

    [RouterA] router id 1.1.1.1
    [RouterA] ospf
    [RouterA-ospf-1] area 0
    [RouterA-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
    [RouterA-ospf-1-area-0.0.0.0] quit
    [RouterA-ospf-1] quit

    # Configure Router B.

    [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.0.255 
    [RouterB-ospf-1-area-0.0.0.0] quit
    [RouterB-ospf-1] quit

    # Configure Router C.

    [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.0.255 
    [RouterC-ospf-1-area-0.0.0.0] quit
    [RouterC-ospf-1] quit

    # Configure Router D.

    [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.0.255 
    [RouterD-ospf-1-area-0.0.0.0] quit
    [RouterD-ospf-1] quit

    # View the DR/BDR status.

    [RouterA] 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
    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
       Retrans timer interval: 5
       Neighbor is up for 00:04:21
       Authentication Sequence: [ 0 ]
     Router ID: 3.3.3.3      Address: 192.168.1.3
    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
       Retrans timer interval: 5
       Neighbor is up for 00:04:06
       Authentication Sequence: [ 0 ]
     Router ID: 4.4.4.4      Address: 192.168.1.4
    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
       Retrans timer interval: 5
       Neighbor is up for 00:03:53
       Authentication Sequence: [ 0 ]

    # View the neighbor information of Router A. You can see the priority of DR and the neighbor status. The Router D is the DR, and Router C is the BDR.

    NOTE:

    When the priority is the same, the router with a higher router ID is elected as the DR. If a new router is added after the DR/BDR election is complete, the new router cannot become the DR even if it has the highest priority.

  3. Configure DR priorities on interfaces.

    # Configure Router A.

    [RouterA] interface gigabitethernet 1/0/0
    [RouterA-GigabitEthernet1/0/0] ospf dr-priority 100
    [RouterA-GigabitEthernet1/0/0] quit

    # Configure Router B.

    [RouterB] interface gigabitethernet 1/0/0
    [RouterB-GigabitEthernet1/0/0] ospf dr-priority 0
    [RouterB-GigabitEthernet1/0/0] quit

    # Configure Router C.

    [RouterC] interface gigabitethernet 1/0/0
    [RouterC-GigabitEthernet1/0/0] ospf dr-priority 2
    [RouterC-GigabitEthernet1/0/0] quit

    # View the DR/BDR status.

    [RouterD] display ospf peer
              OSPF Process 1 with Router ID  4.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
       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
       Retrans timer interval: 5
       Neighbor is up for 00:11:17
       Authentication Sequence: [ 0 ]
     Router ID: 2.2.2.2      Address: 192.168.1.2
       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
       Retrans timer interval: 5
       Neighbor is up for 00:11:19
       Authentication Sequence: [ 0 ]
     Router ID: 3.3.3.3      Address: 192.168.1.3
       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
       Retrans timer interval: 5
       Neighbor is up for 00:11:15
       Authentication Sequence: [ 0 ]

  4. Restart OSPF processes.

    In the user view of each router, run the reset ospf 1 process command to restart the OSPF process.

  5. View the configuration.

    # View the status of OSPF neighbors.

    [RouterD] display ospf peer
              OSPF Process 1 with Router ID 4.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
    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
       Retrans timer interval: 5
       Neighbor is up for 00:07:19
       Authentication Sequence: [ 0 ]
     Router ID: 2.2.2.2      Address: 192.168.1.2
    State: 2-Way  Mode:Nbr is  Master  Priority: 0
    DR: 192.168.1.1  BDR: 192.168.1.3  MTU: 0
       Dead timer due in 35  sec
       Retrans timer interval: 5
       Neighbor is up for 00:07:19
       Authentication Sequence: [ 0 ]
     Router ID: 3.3.3.3       Address: 192.168.1.3
    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
       Retrans timer interval: 5
       Neighbor is up for 00:07:17
       Authentication Sequence: [ 0 ]

    # View the status of the OSPF interface.

    [RouterA] 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 all neighbors are in the Full state, it indicates that Router A establishes the neighbor relationship with its neighbor. If the neighbor stays "2-Way", it indicates both of them are not the DR or BDR. They need not exchange LSAs.

    If the status of the OSPF interface is DROther, it indicates that it is neither DR nor BDR.

Configuration Files

  • Configuration file of Router A

    #
     sysname RouterA
    #
    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.0.255
    #
    return
  • Configuration file of Router B

    #
     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.0.255
    #
    return
  • Configuration file of Router C

    #
     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.0.255
    #
    return
  • Configuration file of Router D

    #
     sysname RouterD
    #
    router id 4.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.0.255
    #
    return
Translation
Download
Updated: 2019-05-17

Document ID: EDOC1000174069

Views: 112107

Downloads: 250

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next