1. 程式人生 > >《深入淺出 —— BGP鄰居、聯盟、路由反射器綜合配置》

《深入淺出 —— BGP鄰居、聯盟、路由反射器綜合配置》

interface loop name add 5.0 3.0 網絡互通 10.6 oop

  • 本篇文章為大家分享下華為路由BGP鄰居、聯盟、路由反射器綜合實驗配置,通過BGP鄰居建立、聯盟、路由反射器,實現BGP內部鄰居之間路由條目的傳遞,最終實現R1的LoopBack 0與R6的LoopBack 0網絡互通。

    ** 實驗拓撲圖如下:**
  • 技術分享圖片

    **第一步,基本網絡配置如下:**

    R1
    sysname R1
    interface g0/0/0
    ip address 192.168.12.1 24
    interface LoopBack 0
    ip address 10.10.1.1 24
    quit
    R2
    sysname R2
    interface g0/0/1
    ip address 192.168.12.2 24
    interface g0/0/0

    ip address 192.168.27.2 24
    quit
    interface LoopBack 0
    ip address 10.10.2.2 24
    quit
    R7
    sysname R7
    interface g0/0/1
    ip address 192.168.27.7 24
    interface g0/0/0
    ip address 192.168.37.7 24
    interface LoopBack 0
    ip address 10.10.7.7 24
    quit
    R3
    sysname R3
    interface g0/0/1
    ip address 192.168.37.3 24
    interface g0/0/0
    ip address 192.168.34.3 24
    interface LoopBack 0
    ip address 10.10.3.3 24
    quit
    R4
    sysname R4
    interface g0/0/1
    ip address 192.168.34.4 24
    interface g0/0/0
    ip address 192.168.45.4 24
    interface LoopBack 0
    ip address 10.10.4.4 24
    quit
    R5
    sysname R5
    interface g0/0/1
    ip address 192.168.45.5 24
    interface g0/0/0
    ip address 192.168.56.5 24
    quit
    interface LoopBack 0
    ip address 10.10.5.5 24
    quit
    R6
    sysname R6
    interface g0/0/1
    ip address 192.168.56.6 24
    interface LoopBack 0
    ip address 10.10.6.6 24
    quit

    第二步,中間區域配置IGP路由協議OSPF,配置如下:
    R2
    ospf 1 router-id 2.2.2.2
    area 0
    network 192.168.27.0 0.0.0.255
    network 10.10.2.0 0.0.0.255
    quit
    quit
    R7
    ospf 1 router-id 7.7.7.7
    area 0
    network 192.168.37.0 0.0.0.255
    network 192.168.27.0 0.0.0.255
    network 10.10.7.0 0.0.0.255
    quit
    quit
    R3
    ospf 1 router-id 3.3.3.3
    area 0
    network 192.168.37.0 0.0.0.255
    network 192.168.34.0 0.0.0.255
    network 10.10.3.0 0.0.0.255
    quit
    quit
    R4
    ospf 1 router-id 4.4.4.4
    area 0
    network 192.168.45.0 0.0.0.255
    network 192.168.34.0 0.0.0.255
    network 10.10.4.0 0.0.0.255
    quit
    quit
    R5
    ospf 1 router-id 5.5.5.5
    area 0
    network 192.168.45.0 0.0.0.255
    network 10.10.5.0 0.0.0.255
    quit
    quit

    第三步,本步驟是重點,我們來配置BGP:BGP聯盟與路由反射器 
    
    **R1上配置BGP,AS編號為100**

    bgp 100
    router-id 1.1.1.1
    peer 192.168.12.2 as-number 200
    network 10.10.1.0 255.255.255.0
    quit

        **R2上配置BGP,AS編號為64523,聯盟編號200**

    bgp 64523
    router-id 2.2.2.2
    confederation id 200
    peer 192.168.12.1 as-number 100
    peer 10.10.7.7 as-number 64523
    peer 10.10.7.7 connect-interface LoopBack0
    peer 10.10.7.7 next-hop-local
    quit

    **R7上配置BGP,AS編號為64523,聯盟編號200**

    bgp 64523
    router-id 7.7.7.7
    confederation id 200
    peer 10.10.2.2 as-number 64523
    peer 10.10.3.3 as-number 64523
    peer 10.10.2.2 reflect-client
    peer 10.10.3.3 reflect-client
    quit

    **R3上配置BGP,AS編號為64523,聯盟編號200,與64545建立鄰居關系**

    bgp 64523
    router-id 3.3.3.3
    confederation id 200
    confederation peer-as 64545
    peer 10.10.7.7 as-number 64523
    peer 10.10.7.7 connect-interface LoopBack0
    peer 10.10.4.4 as-number 64545
    peer 10.10.4.4 connect-interface LoopBack0
    peer 10.10.4.4 ebgp-max-hop
    quit

    **R4上配置BGP,AS編號為64545,聯盟編號200**

    bgp 64545
    router-id 4.4.4.4
    confederation id 200
    confederation peer-as 64523
    peer 10.10.3.3 as-number 64523
    peer 10.10.3.3 connect-interface LoopBack0
    peer 10.10.3.3 ebgp-max-hop
    peer 10.10.5.5 as-number 64545
    quit

     **R5上配置BGP,AS編號為64545,聯盟編號200**

    bgp 64545
    router-id 5.5.5.5
    confederation id 200
    peer 192.168.56.6 as-number 600
    peer 10.10.4.4 as-number 64545
    peer 10.10.4.4 connect-interface LoopBack 0
    peer 10.10.4.4 next-hop-local
    quit

     **R6上配置BGP,AS編號為600**

    bgp 600
    router-id 6.6.6.6
    peer 192.168.56.5 as-number 200
    import-route direct
    quit

    最終測試R1的LoopBack 0與R6的LoopBack 0網絡互通,如下圖:

    技術分享圖片

    《深入淺出 —— BGP鄰居、聯盟、路由反射器綜合配置》