Example for Preventing Routing Loops

This section uses split horizon as an example to describe how to prevent routing loops.

Networking Requirements

On the network shown in Figure 1, IP addresses have been configured for interfaces on all routers, RIP-2 has been configured on each router, and RIP services are running properly. Classful summarization is enabled on router A and router C. It is required that split horizon be configured on router A and router C.

On a RIP-2 network, if classful summarization is configured, you need to disable split horizon and poison reverse. After classful summarization is disabled, you need to reconfigure split horizon or poison reverse to prevent routing loops. This section uses split horizon as an example.

Figure 1 Preventing routing loops

Interface 1, interface 2, interface 3, interface 4 in this example are GE 0/1/0, GE 0/1/1, GE 0/1/2, GE 0/1/3, respectively.


Precautions

When preventing routing loops, note the following rules:

If both split horizon and poison reverse are configured, only poison reverse takes effect.

Configuration Roadmap

The configuration roadmap is as follows:

  1. Disable route summarization.
  2. Enable split horizon.

Data Preparation

To complete the configuration, you need the following data:

  • RIP network segments 10.1.0.0, 10.2.0.0, 10.3.0.0, and 192.168.0.0 on DeviceA

  • RIP network segment 192.168.0.0 on DeviceB

  • RIP network segment 172.16.0.0, 172.17.0.0, 172.18.0.0, and 192.168.0.0 on DeviceC

  • IP addresses of each interface

Procedure

  1. Disable route summarization.

    # Disable route summarization on Device A.

    [~DeviceA] rip 1
    [*DeviceA-rip-1] undo summary
    [*DeviceA-rip-1] commit
    [~DeviceA-rip-1] quit

    # Disable route summarization on Device B.

    [~DeviceB] rip 1
    [*DeviceB-rip-1] undo summary
    [*DeviceB-rip-1] commit
    [~DeviceB-rip-1] quit

  2. Configure split horizon.

    Configure split horizon on the RIP interfaces of all routers. The configurations on Device B and Device C are similar to the configuration on Device A. For configuration details, see Configuration Files in this section.

    # Configure Device A.

    [~DeviceA] interface gigabitethernet0/1/0
    [~DeviceA-GigabitEthernet0/1/0] rip split-horizon
    [*DeviceA-GigabitEthernet0/1/0] quit
    [*DeviceA] interface gigabitethernet0/1/1
    [*DeviceA-GigabitEthernet0/1/1] rip split-horizon
    [*DeviceA-GigabitEthernet0/1/1] quit
    [*DeviceA] interface gigabitethernet0/1/2
    [*DeviceA-GigabitEthernet0/1/2] rip split-horizon
    [*DeviceA-GigabitEthernet0/1/2] quit
    [*DeviceA] interface gigabitethernet0/1/3
    [*DeviceA-GigabitEthernet0/1/3] rip split-horizon
    [*DeviceA-GigabitEthernet0/1/3] quit
    [*DeviceA] commit

  3. Verify the configuration.

    # Run the display rip 1 interface verbose command on Device A and Device C. You can check whether split horizon is enabled. Use the command output on Device A as an example. If the displayed Split-Horizon field is Enabled, split horizon has been enabled.

    [~DeviceA] display rip 1 interface verbose
     GigabitEthernet0/1/0(192.168.1.1)
      State    : DOWN            MTU: 500
      Metricin : 0
      Metricout: 1
      Input    : Enabled         Output       : Enabled
      Protocol : RIPv2 Multicast
      Send     : RIPv2 Multicast Packets
      Receive  : RIPv2 Multicast and Broadcast Packets
      Poison-reverse                : Disabled
      Split-Horizon                 : Enabled
      Authentication type           : None
      Replay Protection             : Disabled
      Max Packet Length             : 512
     GigabitEthernet0/1/1(10.1.1.1)
      State    : DOWN            MTU: 500
      Metricin : 0
      Metricout: 1
      Input    : Enabled         Output       : Enabled
      Protocol : RIPv2 Multicast
      Send     : RIPv2 Multicast Packets
      Receive  : RIPv2 Multicast and Broadcast Packets
      Poison-reverse                : Disabled
      Split-Horizon                 : Enabled
      Authentication type           : None
      Replay Protection             : Disabled
      Max Packet Length             : 512
     GigabitEthernet0/1/2(10.2.1.1)
      State    : DOWN            MTU: 500
      Metricin : 0
      Metricout: 1
      Input    : Enabled         Output       : Enabled
      Protocol : RIPv2 Multicast
      Send     : RIPv2 Multicast Packets
      Receive  : RIPv2 Multicast and Broadcast Packets
      Poison-reverse                : Disabled
      Split-Horizon                 : Enabled
      Authentication type           : None
      Replay Protection             : Disabled
      Max Packet Length             : 512
     GigabitEthernet0/1/3(10.3.1.1)
      State    : DOWN            MTU: 500
      Metricin : 0
      Metricout: 1
      Input    : Enabled         Output       : Enabled
      Protocol : RIPv2 Multicast
      Send     : RIPv2 Multicast Packets
      Receive  : RIPv2 Multicast and Broadcast Packets
      Poison-reverse                : Disabled
      Split-Horizon                 : Enabled
      Authentication type           : None
      Replay Protection             : Disabled
      Max Packet Length             : 512

Configuration Files

  • Device A configuration file

    #
    sysname DeviceA
    #
    interface GigabitEthernet0/1/0
     undo shutdown
     ip address 192.168.1.1 255.255.255.0
     rip version 2 multicast
    #
    interface GigabitEthernet0/1/1
     undo shutdown
     ip address 10.1.1.1 255.255.0.0
     rip version 2 multicast
    #
    interface GigabitEthernet0/1/2
     undo shutdown
     ip address 10.2.1.1 255.255.0.0
     rip version 2 multicast
    #
    interface GigabitEthernet0/1/3
     undo shutdown
     ip address 10.3.1.1 255.255.0.0
     rip version 2 multicast
    #
    rip 1
     network 10.1.0.0
     network 10.2.0.0
     network 10.3.0.0
     network 192.168.0.0
    return
  • Device B configuration file

    #
    sysname DeviceB
    #
    interface GigabitEthernet0/1/0
     undo shutdown
     ip address 192.168.1.2 255.255.255.0
     rip version 2 multicast
    #
    interface GigabitEthernet0/1/1
     undo shutdown
     ip address 192.168.2.1 255.255.255.0
     rip version 2 multicast
    #
    rip 1
     network 192.168.0.0
    return
  • Device C configuration file

    #
     sysname DeviceC
    #
    interface GigabitEthernet0/1/0
     undo shutdown
     ip address 192.168.2.2 255.255.255.0
     rip version 2 multicast
    #
    interface GigabitEthernet0/1/1
     undo shutdown
     ip address 172.16.1.1 255.255.0.0
     rip version 2 multicast
    #
    interface GigabitEthernet0/1/2
     undo shutdown
     ip address 172.17.1.1 255.255.0.0
     rip version 2 multicast
    #
    interface GigabitEthernet0/1/3
     undo shutdown
     ip address 172.18.1.1 255.255.0.0
     rip version 2 multicast
    #
    rip 1
     network 172.16.0.0
     network 172.17.0.0
     network 172.18.0.0
     network 192.168.0.0
    return
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >