码迷,mamicode.com
首页 > 其他好文 > 详细

《深入浅出 —— BGP邻居、联盟、路由反射器综合配置》

时间:2019-02-14 17:47:58      阅读:172      评论:0      收藏:0      [点我收藏+]

标签:cli   pre   add   back   loopback   cto   拓扑   之间   http   

  • 本篇文章为大家分享下华为路由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邻居、联盟、路由反射器综合配置》

    标签:cli   pre   add   back   loopback   cto   拓扑   之间   http   

    原文地址:http://blog.51cto.com/11806823/2350291

    (0)
    (0)
       
    举报
    评论 一句话评论(0
    登录后才能评论!
    © 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
    迷上了代码!