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

NE40E V800R010C10SPC500 Configuration Guide - IP Routing 01

This is NE40E V800R010C10SPC500 Configuration Guide - IP Routing
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 OSPF DR Election

Example for Configuring OSPF DR Election

This section describes how to set the DR priority on an interface for DR election on a broadcast network.

Networking Requirements

On the network shown in Figure 5-14, the interface of Device A has the highest priority of 100 on the network and is elected as the DR; Device C has the second highest priority and is elected as the BDR. Device B has the priority of 0 and cannot be elected as a DR or a BDR; no priority is configured for Device D and therefore, Device D uses the default value (1).

Figure 5-14 Networking for configuring OSPF DR election
NOTE:

Interface 1 in this example is GE 1/0/0.



Precautions

Reconfiguring the DR priority for a router does not change the DR or BDR on a network. You can use either of the following methods to re-elect a DR or BDR. However, the following methods will disconnect OSPF neighbors. Therefore, use the following methods only when necessary.

  • Restart the OSPF processes on all routers.

  • Configure the shutdown and undo shutdown commands on the interfaces where the OSPF neighboring relationships are established.

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure basic OSPF functions on each router for interconnection.

  2. Configure the Router ID for each router.
  3. Use the default DR priorities and check whether the router is the DR or BDR.

  4. Configure the DR priority on an interface and check whether the router is the DR or BDR.

Data Preparation

To complete the configuration, you need the following data:

  • Router ID (1.1.1.1) and priority (100) of Device A

  • Router ID (2.2.2.2) and priority (0) of Device B

  • Router ID (3.3.3.3) and priority (2) of Device C

  • Router ID (4.4.4.4) and priority (1) of Device D

Procedure

  1. Assign an IP address to each interface. For configuration details, see Configuration Files in this section.
  2. Configure basic OSPF functions.

    # Configure Device A.

    [~DeviceA] router id 1.1.1.1
    [*DeviceA] ospf 1
    [*DeviceA-ospf-1] area 0
    [*DeviceA-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
    [*DeviceA-ospf-1-area-0.0.0.0] commit
    [~DeviceA-ospf-1-area-0.0.0.0] quit

    # Configure Device B.

    [~DeviceB] router id 2.2.2.2
    [*DeviceB] ospf 1
    [*DeviceB-ospf-1] area 0
    [*DeviceB-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255 
    [*DeviceB-ospf-1-area-0.0.0.0] commit
    [~DeviceB-ospf-1-area-0.0.0.0] quit

    # Configure Device C.

    [~DeviceC] router id 3.3.3.3
    [*DeviceC] ospf 1
    [*DeviceC-ospf-1] area 0
    [*DeviceC-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255
    [*DeviceC-ospf-1-area-0.0.0.0] commit
    [~DeviceC-ospf-1-area-0.0.0.0] quit

    # Configure Device D.

    [~DeviceD] router id 4.4.4.4
    [*DeviceD] ospf 1
    [*DeviceD-ospf-1] area 0
    [*DeviceD-ospf-1-area-0.0.0.0] network 192.168.1.0 0.0.0.255 
    [*DeviceD-ospf-1-area-0.0.0.0] commit
    [~DeviceD-ospf-1-area-0.0.0.0] quit

    # Display the status of the DR or BDR.

    [~DeviceA] display ospf peer
              OSPF Process 1 with Router ID 1.1.1.1
                    Neighbors
    
     Area 0.0.0.0 interface 192.168.1.1 ( GE1/0/0 )'s neighbors
     Router ID: 2.2.2.2         Address: 192.168.1.2
       State: 2-Way  Mode:Nbr is  Slave   Priority: 1
       DR: 192.168.1.4   BDR: 192.168.1.3    MTU: 0
       Dead timer due in  32  sec
       Retrans timer interval: 0
       Neighbor is up for
       Authentication Sequence: [ 0 ]
    
     Area 0.0.0.0 interface 192.168.1.1 ( GE1/0/0 )'s neighbors
     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  34  sec
       Retrans timer interval: 5
       Neighbor is up for 00:02:17
       Authentication Sequence: [ 0 ]
    
     Area 0.0.0.0 interface 192.168.1.1 ( GE1/0/0 )'s neighbors
     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  32  sec
       Retrans timer interval: 5
       Neighbor is up for 00:02:17
       Authentication Sequence: [ 0 ]

    When checking the neighbors of Device A, you can view the DR priority and the neighbor status. By default, the DR priority is 1. Now Device D functions as the DR and Device C functions as the BDR.

  3. Set the DR priority on each interface.

    # Configure Device A.

    [~DeviceA] interface gigabitethernet 1/0/0
    [~DeviceA-GigabitEthernet1/0/0] ospf dr-priority 100
    [*DeviceA-GigabitEthernet1/0/0] commit
    [~DeviceA-GigabitEthernet1/0/0] quit

    # Configure Device B.

    [~DeviceB] interface gigabitethernet 1/0/0
    [~DeviceB-GigabitEthernet1/0/0] ospf dr-priority 0
    [*DeviceB-GigabitEthernet1/0/0] commit
    [~DeviceB-GigabitEthernet1/0/0] quit

    # Configure Device C.

    [~DeviceC] interface gigabitethernet 1/0/0
    [~DeviceC-GigabitEthernet1/0/0] ospf dr-priority 2
    [*DeviceC-GigabitEthernet1/0/0] commit
    [~DeviceC-GigabitEthernet1/0/0] quit

    # Display the status of the DR or BDR.

    [~DeviceD] display ospf peer
              OSPF Process 1 with Router ID 4.4.4.4
                    Neighbors
    
     Area 0.0.0.0 interface 192.168.1.4 ( GE1/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  38  sec
       Retrans timer interval: 5
       Neighbor is up for 02:07:19
       Authentication Sequence: [ 0 ]
    
     Area 0.0.0.0 interface 192.168.1.4 ( GE1/0/0 )'s neighbors
     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  38  sec
       Retrans timer interval: 5
       Neighbor is up for 02:07:19
       Authentication Sequence: [ 0 ]
    
     Area 0.0.0.0 interface 192.168.1.4 ( GE1/0/0 )'s neighbors
     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  30  sec
       Retrans timer interval: 5
       Neighbor is up for 02:07:19
       Authentication Sequence: [ 0 ]

  4. Restart the OSPF processes.

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

  5. Verify the configuration.

    # Display the status of OSPF neighbors.

    [~DeviceD] display ospf peer
              OSPF Process 1 with Router ID 4.4.4.4
                    Neighbors
    
     Area 0.0.0.0 interface 192.168.1.4 ( GE1/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:03:04
       Authentication Sequence: [ 0 ]
    
     Area 0.0.0.0 interface 192.168.1.4 ( GE1/0/0 )'s neighbors
     Router ID: 2.2.2.2         Address: 192.168.1.2
       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
       Retrans timer interval: 0
       Neighbor is up for
       Authentication Sequence: [ 0 ]
    
     Area 0.0.0.0 interface 192.168.1.4 ( GE1/0/0 )'s neighbors
     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:03:03
       Authentication Sequence: [ 0 ]

    # Display the status of OSPF interfaces.

    [~DeviceA] display ospf interface
              OSPF Process 1 with Router ID 1.1.1.1
                      
     Area: 0.0.0.0               MPLS TE not enabled
     Interface              IP Address     Type         State    Cost    Pri
     GigabitEthernet1/0/0   192.168.1.1    Broadcast    DR       1       100
    [~DeviceB] display ospf interface
              OSPF Process 1 with Router ID 2.2.2.2
                      
     Area: 0.0.0.0               MPLS TE not enabled
     Interface              IP Address     Type         State      Cost     Pri
     GigabitEthernet1/0/0   192.168.1.2    Broadcast    DROther    1        100

    If the neighbor is in the Full state, the device has established a neighbor relationship with its neighbor. If the neighbor remains in the 2-Way state, neither of them is the DR or BDR. In this case, they do not need to exchange LSAs.

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

Configuration Files

  • Device A configuration file

    #
     sysname DeviceA
    #
    router id 1.1.1.1
    #
    interface GigabitEthernet1/0/0
     undo shutdown
     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
  • Device B configuration file

    #
     sysname DeviceB
    #
    router id 2.2.2.2
    #
    interface GigabitEthernet1/0/0
     undo shutdown
     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
  • Device C configuration file

    #
     sysname DeviceC
    #
    router id 3.3.3.3
    #
    interface GigabitEthernet1/0/0
     undo shutdown
     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
  • Device D configuration file

    #
     sysname DeviceD
    #
    router id 4.4.4.4
    #
    interface GigabitEthernet1/0/0
     undo shutdown
     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-01-03

Document ID: EDOC1100055018

Views: 49088

Downloads: 201

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