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

Configuration Guide - IP Unicast Routing

CloudEngine 8800, 7800, 6800, and 5800 V200R005C10

This document describes the configurations of IP Unicast Routing, including IP Routing, Static Route, RIP, RIPng, OSPF, OSPFv3, IPv4 IS-IS, IPv6 IS-IS, BGP, Routing Policy, and PBR.
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 a BGP Confederation

Example for Configuring a BGP Confederation

Networking Requirements

As shown in Figure 9-25, there are multiple BGP switches in AS 200. It is required that the number of IBGP connections be reduced.

Figure 9-25 Networking diagram of configuring a BGP confederation



Switch

Interface

VLANIF Interface

IP Address

SwitchA

10GE 1/0/1

VLANIF 10

10.1.1.1/24

SwitchA

10GE 1/0/2

VLANIF 20

10.1.2.1/24

SwitchA

10GE 1/0/3

VLANIF 30

10.1.3.1/24

SwitchA

10GE 1/0/4

VLANIF 40

10.1.4.1/24

SwitchA

10GE 1/0/5

VLANIF 60

192.168.1.1/24

SwitchB

10GE 1/0/1

VLANIF 10

10.1.1.2/24

SwitchC

10GE 1/0/1

VLANIF 20

10.1.2.2/24

SwitchD

10GE 1/0/1

VLANIF 30

10.1.3.2/24

SwitchD

10GE 1/0/2

VLANIF 50

10.1.5.1/24

SwitchE

10GE 1/0/1

VLANIF 40

10.1.4.2/24

SwitchE

10GE 1/0/2

VLANIF 50

10.1.5.2/24

SwitchF

10GE 1/0/1

VLANIF 60

192.168.1.2/24

SwitchF

10GE 1/0/2

VLANIF 70

172.16.1.1/24

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure a BGP confederation on each switch in AS 200 to divide AS 200 into three sub-ASs: AS 65001, AS 65002, and AS 65003. Three switches in AS 65001 establish full-mesh IBGP connections to reduce the number of IBGP connections.

Procedure

  1. Configure the VLAN to which each interface belongs.

    <HUAWEI> system-view
    [~HUAWEI] sysname SwitchA
    [*HUAWEI] commit
    [~SwitchA] vlan batch 10 20 30 40 60
    [*SwitchA] interface 10ge 1/0/1
    [*SwitchA-10GE1/0/1] port link-type trunk
    [*SwitchA-10GE1/0/1] port trunk allow-pass vlan 10
    [*SwitchA-10GE1/0/1] quit
    [*SwitchA] interface 10ge 1/0/2
    [*SwitchA-10GE1/0/2] port link-type trunk
    [*SwitchA-10GE1/0/2] port trunk allow-pass vlan 20
    [*SwitchA-10GE1/0/2] quit
    [*SwitchA] interface 10ge 1/0/3
    [*SwitchA-10GE1/0/3] port link-type trunk
    [*SwitchA-10GE1/0/3] port trunk allow-pass vlan 30
    [*SwitchA-10GE1/0/3] quit
    [*SwitchA] interface 10ge 1/0/4
    [*SwitchA-10GE1/0/4] port link-type trunk
    [*SwitchA-10GE1/0/4] port trunk allow-pass vlan 40
    [*SwitchA-10GE1/0/4] quit
    [*SwitchA] interface 10ge 1/0/5
    [*SwitchA-10GE1/0/5] port link-type trunk
    [*SwitchA-10GE1/0/5] port trunk allow-pass vlan 60
    [*SwitchA-10GE1/0/5] quit
    [*SwitchA] commit
    

    The configurations of SwitchB, SwitchC, SwitchD, SwitchE, and SwitchF are similar to the configuration of SwitchA, and are not mentioned here.

  2. Configure VLANIF interfaces and assign IP addresses to the VLANIF interfaces.

    [~SwitchA] interface vlanif 10
    [*SwitchA-Vlanif10] ip address 10.1.1.1 24
    [*SwitchA-Vlanif10] quit
    [*SwitchA] interface vlanif 20
    [*SwitchA-Vlanif20] ip address 10.1.2.1 24
    [*SwitchA-Vlanif20] quit
    [*SwitchA] interface vlanif 30
    [*SwitchA-Vlanif30] ip address 10.1.3.1 24
    [*SwitchA-Vlanif30] quit
    [*SwitchA] interface vlanif 40
    [*SwitchA-Vlanif40] ip address 10.1.4.1 24
    [*SwitchA-Vlanif40] quit
    [*SwitchA] interface vlanif 60
    [*SwitchA-Vlanif60] ip address 192.168.1.1 24
    [*SwitchA-Vlanif60] quit
    [*SwitchA] commit

    The configurations of SwitchB, SwitchC, SwitchD, SwitchE, and SwitchF are similar to the configuration of SwitchA, and are not mentioned here.

  3. Configure a BGP confederation.

    # Configure SwitchA.

    [~SwitchA] bgp 65001
    [*SwitchA-bgp] router-id 172.17.1.1
    [*SwitchA-bgp] confederation id 200
    [*SwitchA-bgp] confederation peer-as 65002 65003
    [*SwitchA-bgp] peer 10.1.1.2 as-number 65002 
    [*SwitchA-bgp] peer 10.1.2.2 as-number 65003
    [*SwitchA-bgp] ipv4-family unicast
    [*SwitchA-bgp-af-ipv4] peer 10.1.1.2 next-hop-local
    [*SwitchA-bgp-af-ipv4] peer 10.1.2.2 next-hop-local
    [*SwitchA-bgp-af-ipv4] commit
    [~SwitchA-bgp-af-ipv4] quit
    [~SwitchA-bgp] quit

    # Configure SwitchB.

    [~SwitchB] bgp 65002
    [*SwitchB-bgp] router-id 172.17.2.2
    [*SwitchB-bgp] confederation id 200
    [*SwitchB-bgp] confederation peer-as 65001 65003
    [*SwitchB-bgp] peer 10.1.1.1 as-number 65001
    [*SwitchB-bgp] commit
    [~SwitchB-bgp] quit

    # Configure SwitchC.

    [~SwitchC] bgp 65003
    [*SwitchC-bgp] router-id 172.17.3.3
    [*SwitchC-bgp] confederation id 200
    [*SwitchC-bgp] confederation peer-as 65001 65002
    [*SwitchC-bgp] peer 10.1.2.1 as-number 65001
    [*SwitchC-bgp] commit
    [~SwitchC-bgp] quit

  4. Configure IBGP connections within AS 65001.

    # Configure SwitchA.

    [~SwitchA] bgp 65001
    [~SwitchA-bgp] peer 10.1.3.2 as-number 65001
    [*SwitchA-bgp] peer 10.1.4.2 as-number 65001
    [*SwitchA-bgp] ipv4-family unicast
    [*SwitchA-bgp-af-ipv4] peer 10.1.3.2 next-hop-local
    [*SwitchA-bgp-af-ipv4] peer 10.1.4.2 next-hop-local
    [*SwitchA-bgp-af-ipv4] commit
    [~SwitchA-bgp-af-ipv4] quit 
    [~SwitchA-bgp] quit

    # Configure SwitchD.

    [~SwitchD] bgp 65001
    [*SwitchD-bgp] router-id 172.17.4.4
    [*SwitchD-bgp] peer 10.1.3.1 as-number 65001
    [*SwitchD-bgp] peer 10.1.5.2 as-number 65001
    [*SwitchD-bgp] commit
    [~SwitchD-bgp] quit

    # Configure SwitchE.

    [~SwitchE] bgp 65001
    [*SwitchE-bgp] router-id 172.17.5.5
    [*SwitchE-bgp] peer 10.1.4.1 as-number 65001
    [*SwitchE-bgp] peer 10.1.5.1 as-number 65001
    [*SwitchE-bgp] commit
    [~SwitchE-bgp] quit

  5. Configure EBGP connections between AS 100 and AS200.

    # Configure SwitchA.

    [~SwitchA] bgp 65001
    [*SwitchA-bgp] peer 192.168.1.2 as-number 100 
    [*SwitchA-bgp] commit
    [~SwitchA-bgp] quit

    # Configure SwitchF.

    [~SwitchF] bgp 100
    [*SwitchF-bgp] router-id 172.17.6.6
    [*SwitchF-bgp] peer 192.168.1.1 as-number 200 
    [*SwitchF-bgp] ipv4-family unicast
    [*SwitchF-bgp-af-ipv4] network 172.16.1.0 255.255.255.0
    [*SwitchF-bgp-af-ipv4] commit
    [~SwitchF-bgp-af-ipv4] quit
    [~SwitchF-bgp] quit

  6. Verify the configuration.

    # View the BGP routing table of SwitchB.

    [~SwitchB] display bgp routing-table
    
    
     BGP Local router ID is 172.17.2.2
     Status codes: * - valid, > - best, d - damped, h - history,
                   i - internal, s - suppressed, S - Stale
     Origin      : i - IGP, e - EGP, ? - incomplete
    
    
     Total Number of Routes: 1
          Network            NextHop        MED        LocPrf    PrefVal Path/Ogn
    
    
     *>i  172.16.1.0/24      10.1.1.1        0          100        0      (65001) 100i
    [~SwitchB] display bgp routing-table 172.16.1.0
    
    
    BGP local router ID : 172.17.2.2
     Local AS number : 65002
     Paths:   1 available, 1 best, 1 select, 0 best-external, 0 add-path
     BGP routing table entry information of 172.16.1.0/24:
     From: 10.1.1.1 (172.17.1.1)
     Route Duration: 00h12m29s
     Relay IP Nexthop: 0.0.0.0
     Relay IP Out-Interface: Vlanif10
     Original nexthop: 10.1.1.1
     Qos information : 0x0
     AS-path (65001) 100, origin igp, MED 0, localpref 100, pref-val 0, valid, external-confed, best, select, active, pre 255
     Not advertised to any peer yet
    
    

    # View the BGP routing table of SwitchD.

    [~SwitchD] display bgp routing-table
    
    
     BGP Local router ID is 172.17.4.4
     Status codes: * - valid, > - best, d - damped, h - history,
                   i - internal, s - suppressed, S - Stale
     Origin      : i - IGP, e - EGP, ? - incomplete
    
    
     Total Number of Routes: 1
          Network            NextHop        MED        LocPrf    PrefVal Path/Ogn
    
    
     *>i  172.16.1.0/24      10.1.3.1        0          100        0      100i
    [~SwitchD] display bgp routing-table 172.16.1.0
    
    
    BGP local router ID : 172.17.4.4
     Local AS number : 65001
     Paths:   1 available, 1 best, 1 select, 0 best-external, 0 add-path
     BGP routing table entry information of 172.16.1.0/24:
     From: 10.1.3.1 (172.17.1.1)
     Route Duration: 00h23m57s
     Relay IP Nexthop: 0.0.0.0
     Relay IP Out-Interface: Vlanif10
     Original nexthop: 10.1.3.1
     Qos information : 0x0
     AS-path 100, origin igp, MED 0, localpref 100, pref-val 0, valid, internal-confed, best, select, active, pre 255
     Not advertised to any peer yet

Configuration Files

  • Configuration file of SwitchA

    #
    sysname SwitchA
    #
    vlan batch 10 20 30 40 60
    #
    interface Vlanif10
     ip address 10.1.1.1 255.255.255.0
    #
    interface Vlanif20
     ip address 10.1.2.1 255.255.255.0
    #
    interface Vlanif30
     ip address 10.1.3.1 255.255.255.0
    #
    interface Vlanif40
     ip address 10.1.4.1 255.255.255.0
    #
    interface Vlanif60
     ip address 192.168.1.1 255.255.255.0
    #
    interface 10GE1/0/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    interface 10GE1/0/2
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    interface 10GE1/0/3
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    interface 10GE1/0/4
     port link-type trunk
     port trunk allow-pass vlan 40
    #
    interface 10GE1/0/5
     port link-type trunk
     port trunk allow-pass vlan 60
    #
    bgp 65001
     router-id 172.17.1.1
     confederation id 200
     confederation peer-as 65002 65003
     peer 10.1.1.2 as-number 65002
     peer 10.1.2.2 as-number 65003
     peer 10.1.3.2 as-number 65001
     peer 10.1.4.2 as-number 65001
     peer 192.168.1.2 as-number 100
     #
     ipv4-family unicast
      peer 10.1.1.2 enable
      peer 10.1.1.2 next-hop-local
      peer 10.1.2.2 enable
      peer 10.1.2.2 next-hop-local
      peer 10.1.3.2 enable
      peer 10.1.3.2 next-hop-local
      peer 10.1.4.2 enable
      peer 10.1.4.2 next-hop-local
      peer 192.168.1.2 enable
    #
    return
  • Configuration file of SwitchB

    #
    sysname SwitchB
    #
    vlan batch 10
    #
    interface Vlanif10
     ip address 10.1.1.2 255.255.255.0
    #
    interface 10GE1/0/1
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    bgp 65002
     router-id 172.17.2.2
     confederation id 200
     confederation peer-as 65001 65003
     peer 10.1.1.1 as-number 65001
     #
     ipv4-family unicast
      peer 10.1.1.1 enable
    #
    return
  • Configuration file of SwitchC

    #
    sysname SwitchC
    #
    vlan batch 20
    #
    interface Vlanif20
     ip address 10.1.2.2 255.255.255.0
    #
    interface 10GE1/0/1
     port link-type trunk
     port trunk allow-pass vlan 20
    #
    bgp 65003
     router-id 172.17.3.3
     confederation id 200
     confederation peer-as 65001 65002
     peer 10.1.2.1 as-number 65001
     #
     ipv4-family unicast
      peer 10.1.2.1 enable
    #
    return
  • Configuration file of SwitchD

    #
    sysname SwitchD
    #
    vlan batch 30 50
    #
    interface Vlanif30
     ip address 10.1.3.2 255.255.255.0
    #
    interface Vlanif50
     ip address 10.1.5.1 255.255.255.0
    #
    interface 10GE1/0/1
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    interface 10GE1/0/2
     port link-type trunk
     port trunk allow-pass vlan 50
    #
    bgp 65001
     router-id 172.17.4.4
     peer 10.1.3.1 as-number 65001
     peer 10.1.5.2 as-number 65001
     #
     ipv4-family unicast
      peer 10.1.3.1 enable
      peer 10.1.5.2 enable
    #
    return
  • Configuration file of SwitchE

    #
    sysname SwitchE
    #
    vlan batch 40 50
    #
    interface Vlanif40
     ip address 10.1.4.2 255.255.255.0
    #
    interface Vlanif50
     ip address 10.1.5.2 255.255.255.0
    #
    interface 10GE1/0/1
     port link-type trunk
     port trunk allow-pass vlan 40
    #
    interface 10GE1/0/2
     port link-type trunk
     port trunk allow-pass vlan 50
    #
    bgp 65001
     router-id 172.17.5.5
     peer 10.1.4.1 as-number 65001
     peer 10.1.5.1 as-number 65001
     #
     ipv4-family unicast
      peer 10.1.4.1 enable
      peer 10.1.5.1 enable
      #
    return
  • Configuration file of SwitchF

    #
    sysname SwitchF
    #
    vlan batch 60 70
    #
    interface Vlanif60
     ip address 192.168.1.2 255.255.255.0
    #
    interface Vlanif70
     ip address 172.16.1.1 255.255.255.0
    #
    interface 10GE1/0/1
     port link-type trunk
     port trunk allow-pass vlan 60
    #
    interface 10GE1/0/2
     port link-type trunk
     port trunk allow-pass vlan 70
    #
    bgp 100
     router-id 172.17.6.6
     peer 192.168.1.1 as-number 200
     #
     ipv4-family unicast
      network 172.16.1.0 255.255.255.0
      peer 192.168.1.1 enable
    #          
    return
Translation
Download
Updated: 2019-04-20

Document ID: EDOC1100074760

Views: 57490

Downloads: 63

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