• 【【实验分享】CCIE—BGP路由黑洞实验】


    ​实验目的:

    l掌握BGP路由黑洞的运行原理

    l如何解决路由黑洞

    实验说明:

    l通过此实验练习,可以更好理解路由黑洞原理

    实验环境:

    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 12.1.1.1 0.0.0.0 a 0

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

    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)#bgp router-id 1.1.1.1

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

    R1(config-router)#neighbor 3.3.3.3 update-source lo 0{建立IBGP邻居关系,需要手动指定通过Loop口建立会话。}

    R1(config-router)#network 11.11.11.11 mask 255.255.255.255{宣告一条11.11.11.11的路由}

    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)#router ospf 110

    R2(config-router)#router-id 2.2.2

    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

    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 1.1.1.1 remote-as 100

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

    R3(config-router)#network 33.33.33.33 mask 255.255.255.255

    R3(config)#int lo 33

    R3(config-if)#ip address 33.33.33.33 255.255.255.255

    此时R1能收到33.33.33.33 R3收到11.11.11.11

    R1#show ip bgp

    Network Next Hop Metric LocPrf Weight Path

    *> 11.11.11.11/32 0.0.0.0 0 32768 i{R1本地产生自己的路由}

    *>i33.33.33.33/32 3.3.3.3 0 100 0 i{这里的i表示通过ibgp学到}{通过R3学到33.33.33.33}

    R3同理

    测试:R1的源11.11.11.11 ping R3的33.33.33.33

    R1#ping 33.33.33.33 source lo 11

    分析:

    由于R1能获取到R3的路由,因此将去往33.33.33.33的流量通过路由表发送给R2,而此时R2收到此流量时,发现目的地位33.33.33.33

    由于R2没有建立任何IBGP邻居,因此无法收到33.33.33.33.因此R2是没有任何路由匹配而丢弃该流量。此现象为路由黑洞

    解决方法:

    1,在R2上将BGP重分布到ospf使得R2能收到33.33.33.33

    2,R2手动产生关于33.33.33.33的路由以及11.11.11.11的路由

    如:R2 ip route 33.33.33.33 255.255.255.255 23.1.1.3

    3,R1,R2,R3做IBGP全互联

    4,Mpls打标记

  • 相关阅读:
    安装Docker报错求解答~~
    在react中渲染html
    [039]量化交易] DataFrame、Series数据结构访问
    100行代码实现HarmonyOS“画图”应用,eTS开发走起!
    .Net IL Emit 实现Aop面向切面之动态代理 案例版
    JAVA一点就到家外卖订餐系统计算机毕业设计Mybatis+系统+数据库+调试部署
    单边循环的快排
    HTML+CSS+JS——动漫风二次元论坛(2页) HTML5网页设计成品_学生DW静态网页设计代做_web课程设计网页制作
    [附源码]JAVA毕业设计九宫格日志网站(系统+LW)
    对graalvm、springboot3.0一些新特性的探究
  • 原文地址:https://blog.csdn.net/mengmeng_921/article/details/125995348