• 【实验分享】CCIE—BGP反射器实验


    ​实验目的:

    l掌握BGP反射器的运行原理

    l理解反射器的用途以及好处

    实验说明:

    l通过此实验练习,可以灵活的使用BGP反射器

    实验环境:

    l三台支持SPSERVICES的IOS的路由器

    l直通线

    实验拓扑:

    在这里插入图片描述

    实验步骤:

    R1(config)#interface f0/0

    R1(config-if)#ip address 12.1.1.1 255.255.255.0

    R1(config-if)#no shutdown

    R1(config-if)#int lo 0

    R1(config-if)#ip address 1.1.1.1 255.255.255.255

    R1(config)#router ospf 110

    R1(config-router)#router-id 1.1.1.1

    R1(config-router)#network 1.1.1.1 0.0.0.0 a 0

    R1(config-router)#network 12.1.1.1 0.0.0.0 a 0

    R1(config)#router bgp 100

    R1(config-router)#bgp router-id 1.1.1.1

    R1(config-router)#neighbor 2.2.2.2 remote-as 100

    R1(config-router)#neighbor 2.2.2.2 update-source loopback 0

    R1(config-router)#neighbor 2.2.2.2 next-hop-self{当R1通过EBGP学到的路由传给2.2.2.2的时候告诉2.2.2.2,当2.2.2.2收到此路由的时候下一跳为R1的环回口}

    R2(config)#interface f0/0

    R2(config-if)#ip address 12.1.1.2 255.255.255.0

    R2(config-if)#no shutdown

    R2(config-if)#int f1/0

    R2(config-if)#ip address 23.1.1.2 255.255.255.0

    R2(config-if)#no shutdown

    R2(config-if)#int lo 0

    R2(config-if)#ip address 2.2.2.2 255.255.255.255

    R2(config)#router ospf 110

    R2(config-router)#router-id 2.2.2.2

    R2(config-router)#network 12.1.1.2 0.0.0.0 a 0

    R2(config-router)#network 23.1.1.2 0.0.0.0 a 0

    R2(config-router)#network 2.2.2.2 0.0.0.0 a 0

    R2(config)#router bgp 100

    R2(config-router)#bgp router-id 2.2.2.2

    R2(config-router)#neighbor 1.1.1.1 remote-as 100

    R2(config-router)#neighbor 1.1.1.1 update-source lo 0

    R2(config-router)#neighbor 1.1.1.1 route-reflector-client {1.1.1.1是我的客户端}

    R2(config-router)#neighbor 3.3.3.3 remote-as 100

    R2(config-router)#neighbor 3.3.3.3 update-source lo 0

    R2(config-router)#neighbor 3.3.3.3 route-reflector-client{3.3.3.3是我的客户端}
    R3(config)#interface f1/0

    R3(config-if)#ip address 23.1.1.3 255.255.255.0

    R3(config-if)#no shutdown

    R3(config-if)#int lo 0

    R3(config-if)#ip address 3.3.3.3 255.255.255.255

    R3(config)#router ospf 110

    R3(config-router)#router-id 3.3.3.3

    R3(config-router)#network 23.1.1.3 0.0.0.0 a 0

    R3(config-router)#network 3.3.3.3 0.0.0.0 a 0

    R3(config)#router bgp 100

    R3(config-router)#bgp router-id 3.3.3.3

    R3(config-router)#neighbor 2.2.2.2 remote-as 100

    R3(config-router)#neighbor 2.2.2.2 update-source lo 0

    R3(config-router)#neighbor 2.2.2.2 next-hop-self

    通过RR(反射器)技术能够打破IBGP的水平分割,通过RR技术能够减少IBGP建立邻居关系,比如R1,R2,R3要学到相应路由,必须要建立3个邻居关系,R1和R2,R2和R3,R1和R3。而RR的技术

    只需要R1,R3分别和R2建立邻居就行。

    R1宣告路由

    R1(config)#int lo 11

    R1(config-if)#ip address 11.11.11.11 255.255.255.255

    R1(config)#router bgp 100

    R1(config-router)#network 11.11.11.11 mask 255.255.255.255

    验证:

    R2#show ip bgp 11.11.11.11

    BGP routing table entry for 11.11.11.11/32, version 2

    Paths: (1 available, best #1, table Default-IP-Routing-Table)

    Flag: 0x820

    Advertised to update-groups:

    2

    Local, (Received from a RR-client) {从客户端(1.1.1.1)学到路由11.11.11.11}

    1.1.1.1 (metric 2) from 1.1.1.1 (1.1.1.1)

    Origin IGP, metric 0, localpref 100, valid, internal, best

    R3#show ip bgp 11.11.11.11

    BGP routing table entry for 11.11.11.11/32, version 2

    Paths: (1 available, best #1, table Default-IP-Routing-Table)

    Flag: 0x820

    Not advertised to any peer

    Local

    1.1.1.1 (metric 3) from 2.2.2.2 (2.2.2.2)

    Origin IGP, metric 0, localpref 100, valid, internal, best

    Originator: 1.1.1.1, Cluster list: 2.2.2.2{1.1.1.1产生的路由,通过RR(2.2.2.2)反射给3.3.3.3}

    总结:

    通过RR技术合理的打破IBGP水平分割,实施起来更加方便。

    RR原则:

    从客户端过来的路由, RR会把它传递给我的客户端, 非客户端, EBGP邻居。

    从EBGP邻居过来的路由, RR会把它传递给我的客户端, 非客户端, EBGP邻居。

    从非客户端过来的路由, RR会把它传递给我的客户端, EBGP邻居, 不会传给非客户端。

  • 相关阅读:
    基于SSM框架的图片分享及评价网站设计与实现毕业设计源码201524
    “程序包com.sun.tools.javac.util不存在” 问题解决
    动手捣鼓一个log打印调试模块
    Centos 7.4配置时间同步NTP服务
    PDF页数太多,怎么拆分成几个PDF
    C语言文件操作、C++文件操作、QT文件操作汇总及对比分析
    c++基础代码备忘录-指针与数组
    思维模型 协议
    Cesium 展示——设置图层顺序 ImageryLayer
    React路由规则的定义、声明式导航、编程式导航
  • 原文地址:https://blog.csdn.net/mengmeng_921/article/details/126035886