如何解决路由黑洞?

1、全互联(全互联的意思就是在一个AS内的所有的BGP路由器全部都建立我们Establish的关系)
2、RR(反射器)
3、联盟(一般用的不多)
4、将BGP路由引入到IGP,从而保证IGP与BGP的同步。但是,因为Internet上的BGP路由数量十分庞大,一旦引入到IGP,会给IGP路由器带来巨大的处理和存储负担,如果路由器负担过重,则可能瘫痪 不建议
5、MPLS技术解决路由黑洞问题

解决方法1.全互联

在一个AS内的所有的BGP路由器全部都建立我们Establish的关系
R2 R3 R4之间的loopback接口之间相互建立IBGP的关系

R2的配置

#
bgp 200router-id 2.2.2.2peer 3.3.3.3 as-number 200 peer 3.3.3.3 connect-interface LoopBack0peer 4.4.4.4 as-number 200 peer 4.4.4.4 connect-interface LoopBack0peer 192.168.12.1 as-number 100 #ipv4-family unicastundo synchronizationpeer 3.3.3.3 enablepeer 3.3.3.3 next-hop-local peer 4.4.4.4 enablepeer 4.4.4.4 next-hop-local
#

R3的BGP配置

#
bgp 200peer 2.2.2.2 as-number 200 peer 2.2.2.2 connect-interface LoopBack0peer 4.4.4.4 as-number 200 peer 4.4.4.4 connect-interface LoopBack0#ipv4-family unicastundo synchronizationpeer 1.1.1.1 enablepeer 4.4.4.4 enable
#

R4的BGP配置

#
bgp 200router-id 4.4.4.4peer 2.2.2.2 as-number 200 peer 2.2.2.2 connect-interface LoopBack0peer 3.3.3.3 as-number 200 peer 3.3.3.3 connect-interface LoopBack0
#ipv4-family unicastundo synchronizationpeer 2.2.2.2 enablepeer 2.2.2.2 next-hop-local peer 3.3.3.3 enablepeer 3.3.3.3 next-hop-local
#

在R3上检查IBGP的关系

[R3]display bgp peer BGP local router ID : 192.168.34.3Local AS number : 200Total number of peers : 2                Peers in established state : 2Peer            V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State PrefRcv2.2.2.2         4         200        3        2     0 00:00:02 Established       14.4.4.4         4         200        5        5     0 00:02:30 Established       1
[R3]

在R3上面看下是否能够学习到关系1.1.1.1和5.5.5.5的路由

[R3]display bgp routing-table BGP Local router ID is 192.168.34.3 Status codes: * - valid, > - best, d - damped,h - history,  i - internal, s - suppressed, S - StaleOrigin : i - IGP, e - EGP, ? - incompleteTotal Number of Routes: 2Network            NextHop        MED        LocPrf    PrefVal Path/Ogn*>i  1.1.1.1/32         2.2.2.2         0          100        0      100i*>i  5.5.5.5/32         4.4.4.4         0          100        0      300i
[R3]

在R5上面访问R1

<R5>ping -a 5.5.5.5 1.1.1.1PING 1.1.1.1: 56  data bytes, press CTRL_C to breakReply from 1.1.1.1: bytes=56 Sequence=1 ttl=252 time=80 msReply from 1.1.1.1: bytes=56 Sequence=2 ttl=252 time=40 msReply from 1.1.1.1: bytes=56 Sequence=3 ttl=252 time=60 msReply from 1.1.1.1: bytes=56 Sequence=4 ttl=252 time=40 msReply from 1.1.1.1: bytes=56 Sequence=5 ttl=252 time=50 ms--- 1.1.1.1 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 40/54/80 ms

缺点:BGP 200里面的设备越多 需要建立IBGP的数量也就越多 可以考虑用反射器解决

解决方法2.RR

删除上面BGP R2 R3 R4的BGP配置
R3设备为反射器 R2和R4设备为客户端 反射器和客户端之间IBGP关系就可以 客户端和客户端之间不需要建立起任何关系
优点:减少AS 200里面的IBGP的数量

R2的配置

#
bgp 200router-id 2.2.2.2peer 3.3.3.3 as-number 200  //R2和反射器建立IBGP关系peer 3.3.3.3 connect-interface LoopBack0
#ipv4-family unicastundo synchronizationpeer 3.3.3.3 enablepeer 3.3.3.3 next-hop-local
#

R4的配置

#
bgp 200router-id 4.4.4.4peer 3.3.3.3 as-number 200  //R2和反射器建立IBGP关系peer 3.3.3.3 connect-interface LoopBack0peer 192.168.45.5 as-number 300 #ipv4-family unicastundo synchronizationpeer 3.3.3.3 enablepeer 3.3.3.3 next-hop-local
#

R3的配置

#
bgp 200peer 2.2.2.2 as-number 200 peer 2.2.2.2 connect-interface LoopBack0peer 4.4.4.4 as-number 200 peer 4.4.4.4 connect-interface LoopBack0#ipv4-family unicastundo synchronizationpeer 2.2.2.2 enablepeer 2.2.2.2 reflect-client     //R2反射器和客户端建立IBGP关系peer 4.4.4.4 enablepeer 4.4.4.4 reflect-client       //R2反射器和客户端建立IBGP关系
#

在R5上面访问R1

<R5>ping -a 5.5.5.5 1.1.1.1PING 1.1.1.1: 56  data bytes, press CTRL_C to breakReply from 1.1.1.1: bytes=56 Sequence=1 ttl=252 time=80 msReply from 1.1.1.1: bytes=56 Sequence=2 ttl=252 time=40 msReply from 1.1.1.1: bytes=56 Sequence=3 ttl=252 time=60 msReply from 1.1.1.1: bytes=56 Sequence=4 ttl=252 time=40 msReply from 1.1.1.1: bytes=56 Sequence=5 ttl=252 time=50 ms--- 1.1.1.1 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 40/54/80 ms

解决方法3.联盟

删除RR的配置 我们可以将AS 200拆成3个子的AS 分别为1000 2000 3000AS

在R2这边的配置

#
bgp 1000        //R2上面直接配置子AS 1000router-id 2.2.2.2confederation id 200 //R2对外还是宣称在AS 200里面confederation peer-as 2000       //指定和对端子AS 2000建立EBGP关系peer 192.168.12.1 as-number 100 peer 192.168.23.3 as-number 2000 #ipv4-family unicastundo synchronizationpeer 192.168.12.1 enablepeer 192.168.23.3 enablepeer 192.168.23.3 next-hop-local    //在AS 200内部虽然R2和R3是EBGP关系  但是毕竟R2 和R3在一个AS 200当中  R2从R1学习到的路由  发给R3的时候下一跳还是不变化  所以需要敲如下命令实现R2发给R3的时候下一跳为R2本身
#

在R3这边的配置

#
bgp 2000confederation id 200confederation peer-as 1000 3000peer 192.168.23.2 as-number 1000 peer 192.168.34.4 as-number 3000 #ipv4-family unicastundo synchronizationpeer 192.168.23.2 enablepeer 192.168.34.4 enable
#

在R4这边的配置

#
bgp 3000confederation id 200confederation peer-as 2000peer 192.168.34.3 as-number 2000 peer 192.168.45.5 as-number 300 #ipv4-family unicastundo synchronizationpeer 192.168.34.3 enablepeer 192.168.34.3 next-hop-local peer 192.168.45.5 enable
#

检查R2 R3 R4的BGP关系

<R2>display bgp peer BGP local router ID : 2.2.2.2Local AS number : 1000Total number of peers : 2                Peers in established state : 2Peer            V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State PrefRcv192.168.12.1    4         100       10       10     0 00:07:29 Established       1192.168.23.3    4        2000       20       18     0 00:08:53 Established       1
<R2>
[R3]display bgp peer BGP local router ID : 192.168.34.3Local AS number : 2000Total number of peers : 2                Peers in established state : 2Peer            V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State PrefRcv192.168.23.2    4        1000       18       21     0 00:09:00 Established       1192.168.34.4    4        3000       13       21     0 00:08:17 Established       1
[R3]
[R4]display bgp peer BGP local router ID : 192.168.34.4Local AS number : 3000Total number of peers : 2                Peers in established state : 2Peer            V          AS  MsgRcvd  MsgSent  OutQ  Up/Down       State PrefRcv192.168.34.3    4        2000       20       13     0 00:08:21 Established       1192.168.45.5    4         300       10       12     0 00:07:23 Established       1
[R4]

检查R2 R3 R4的路由

[R4]display bgp routing-table BGP Local router ID is 192.168.34.4 Status codes: * - valid, > - best, d - damped,h - history,  i - internal, s - suppressed, S - StaleOrigin : i - IGP, e - EGP, ? - incompleteTotal Number of Routes: 2Network            NextHop        MED        LocPrf    PrefVal Path/Ogn*>i  1.1.1.1/32         192.168.23.2    0          100        0      (2000 1000) 100i*>   5.5.5.5/32         192.168.45.5    0                     0      300i
[R4]
[R3]display bgp routing-table BGP Local router ID is 192.168.34.3 Status codes: * - valid, > - best, d - damped,h - history,  i - internal, s - suppressed, S - StaleOrigin : i - IGP, e - EGP, ? - incompleteTotal Number of Routes: 2Network            NextHop        MED        LocPrf    PrefVal Path/Ogn*>i  1.1.1.1/32         192.168.23.2    0          100        0      (1000) 100i*>i  5.5.5.5/32         192.168.34.4    0          100        0      (3000) 300i
[R3]
<R2>display bgp routing-table BGP Local router ID is 2.2.2.2 Status codes: * - valid, > - best, d - damped,h - history,  i - internal, s - suppressed, S - StaleOrigin : i - IGP, e - EGP, ? - incompleteTotal Number of Routes: 2Network            NextHop        MED        LocPrf    PrefVal Path/Ogn*>   1.1.1.1/32         192.168.12.1    0                     0      100i*>i  5.5.5.5/32         192.168.34.4    0          100        0      (2000 3000) 300i
<R2>

在R5上面访问R1

<R5>ping -a 5.5.5.5 1.1.1.1PING 1.1.1.1: 56  data bytes, press CTRL_C to breakReply from 1.1.1.1: bytes=56 Sequence=1 ttl=252 time=80 msReply from 1.1.1.1: bytes=56 Sequence=2 ttl=252 time=40 msReply from 1.1.1.1: bytes=56 Sequence=3 ttl=252 time=60 msReply from 1.1.1.1: bytes=56 Sequence=4 ttl=252 time=40 msReply from 1.1.1.1: bytes=56 Sequence=5 ttl=252 time=50 ms--- 1.1.1.1 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 40/54/80 ms

缺点:联盟的配置改动量特别大 不建议还割接的时候用这个方式

解决方法4. 将BGP路由引入到IGP

删除联盟的配置 将BGP路由引入到IGP里面 在R2上引入和R4上面 将BGP路由引入到OSPF里面

R2的配置

#
ospf 1 router-id 2.2.2.2 import-route bgp
#

R4的配置

#
ospf 1 router-id 4.4.4.4import-route bgp
#

查看R3的路由表

<R3>display ip routing-table protocol ospf
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : OSPFDestinations : 4        Routes : 4        OSPF routing table status : <Active>Destinations : 4        Routes : 4Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface1.1.1.1/32  O_ASE   150  1           D   192.168.23.2    GigabitEthernet0/0/12.2.2.2/32  OSPF    10   1           D   192.168.23.2    GigabitEthernet0/0/14.4.4.4/32  OSPF    10   1           D   192.168.34.4    GigabitEthernet0/0/05.5.5.5/32  O_ASE   150  1           D   192.168.34.4    GigabitEthernet0/0/0OSPF routing table status : <Inactive>Destinations : 0        Routes : 0

在R5上面访问R1

<R5>ping -a 5.5.5.5 1.1.1.1PING 1.1.1.1: 56  data bytes, press CTRL_C to breakReply from 1.1.1.1: bytes=56 Sequence=1 ttl=252 time=80 msReply from 1.1.1.1: bytes=56 Sequence=2 ttl=252 time=40 msReply from 1.1.1.1: bytes=56 Sequence=3 ttl=252 time=60 msReply from 1.1.1.1: bytes=56 Sequence=4 ttl=252 time=40 msReply from 1.1.1.1: bytes=56 Sequence=5 ttl=252 time=50 ms--- 1.1.1.1 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 40/54/80 ms

思考如下:
能不能只在R2或者R4上面进行引入?会有什么问题?如何解决?

解决方法5.MPLS技术

删除上面引入的配置
在R2 R3 R4设备之间配置MPLS 和MPLS LDP协议 让R5访问R1的数据走2.5层进行转发

在R2上的配置

#
mpls lsr-id 2.2.2.2
#
mpls
#
mpls ldp
#
interface GigabitEthernet0/0/1mplsmpls ldp
#

在R3上的配置

#
mpls lsr-id 3.3.3.3
#
mpls
#
mpls ldp
#
interface GigabitEthernet0/0/1mplsmpls ldp
#
interface GigabitEthernet0/0/0mplsmpls ldp
#

在R4上的配置

#
mpls lsr-id 4.4.4.4
#
mpls
#
mpls ldp
#
interface GigabitEthernet0/0/0mplsmpls ldp
#

检查LDP的关系

<R3>display mpls ldp session all LDP Session(s) in Public NetworkCodes: LAM(Label Advertisement Mode), SsnAge Unit(DDDD:HH:MM)A '*' before a session means the session is being deleted.------------------------------------------------------------------------------PeerID             Status      LAM  SsnRole  SsnAge      KASent/Rcv------------------------------------------------------------------------------2.2.2.2:0          Operational DU   Active   0000:00:04  17/174.4.4.4:0          Operational DU   Passive  0000:00:03  16/16------------------------------------------------------------------------------TOTAL: 2 session(s) Found.<R3>

在R5上面访问R1

<R5>ping -a 5.5.5.5 1.1.1.1PING 1.1.1.1: 56  data bytes, press CTRL_C to breakReply from 1.1.1.1: bytes=56 Sequence=1 ttl=252 time=80 msReply from 1.1.1.1: bytes=56 Sequence=2 ttl=252 time=40 msReply from 1.1.1.1: bytes=56 Sequence=3 ttl=252 time=60 msReply from 1.1.1.1: bytes=56 Sequence=4 ttl=252 time=40 msReply from 1.1.1.1: bytes=56 Sequence=5 ttl=252 time=50 ms--- 1.1.1.1 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 40/54/80 ms

Reply from 1.1.1.1: bytes=56 Sequence=1 ttl=252 time=80 ms
Reply from 1.1.1.1: bytes=56 Sequence=2 ttl=252 time=40 ms
Reply from 1.1.1.1: bytes=56 Sequence=3 ttl=252 time=60 ms
Reply from 1.1.1.1: bytes=56 Sequence=4 ttl=252 time=40 ms
Reply from 1.1.1.1: bytes=56 Sequence=5 ttl=252 time=50 ms

— 1.1.1.1 ping statistics —
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 40/54/80 ms

注意:MPLS 虚拟私有网络就是靠这种方式实现的

教你解决路由黑洞5招相关推荐

  1. [HCIP]MPLS解决路由黑洞

    目录 拓扑搭建 配置思路 MPLS配置 实验结果 拓扑搭建 BGP2与BGP7建立邻居后,路由层面可达,数据层面不可达,造成BGP路由黑洞 需要MPLS技术解决 配置思路 1.将底层IP配好并运行相应 ...

  2. 自制MPLS解决路由黑洞实验

    利用mpls解决BGP路由黑洞配置命令全解析 --By Jim 什么是BGP路由黑洞? BGP规定无论路由器是否启动bgp都要无条件地转发BGP消息和更新包(凌驾于IGP之上),违背了IGP" ...

  3. 02 理解MPLS如何解决路由黑洞

    1.底层IGP(这里不再赘述) 2.在R1和R5上创建一个环回口IP地址 R1(config)#interface loopback 1 R1(config-if)#ip address 11.11. ...

  4. BGP通过MPLS解决路由黑洞

    目录 拓扑的搭建及IP地址的规划 IGP配置 BGP配置 MPLS配置 BGP的宣告及选路 实验要求: 拓扑的搭建及IP地址的规划 首先实验要求AS2网段地址基于172.16.0.0/16划分,此网段 ...

  5. 【干货】路由黑洞的5种解决方法大PK

    如何解决路由黑洞? 1.全互联(全互联的意思就是在一个AS内的所有的BGP路由器全部都建立我们Establish的关系) 2.RR(反射器) 3.联盟(一般用的不多) 4.将BGP路由引入到IGP,从 ...

  6. linux进入黑洞路由,BGP路由黑洞解决办法介绍

    在配置BGP的时,通常最容易遇到的问题就是路由黑洞,那么什么是路由黑洞呢,简单的说,它会默默的将 数据包丢弃,使所有数据包有去无回.我们知道传统的IP路由查找,它是逐跳查找的,通俗一点就是当数 据包到 ...

  7. 利用MPLS解决BGP路由黑洞问题

    致歉声明:前版博客由于博主个人对于BGP知识的理解出现偏差,导致路由黑洞产生的原因解释错误,误导大家,抱歉. 配置文件的百度网盘连接及提取码. 链接:https://pan.baidu.com/s/1 ...

  8. BGP路由黑洞解决办法介绍

    在配置BGP的时,通常最容易遇到的问题就是路由黑洞,那么什么是路由黑洞呢,简单的说,它会默默的将 数据包丢弃,使所有数据包有去无回.我们知道传统的IP路由查找,它是逐跳查找的,通俗一点就是当数 据包到 ...

  9. 乾颐堂军哥HCIE9-解决BGP路由黑洞、聚合的各种参数以及RR基础

    本技术文章讨论BGP的路由黑洞解决方案.BGP聚合,即减少路由条目数的技术 1.BGP路由黑洞 1.1 解决路由黑洞问题1 某些AS内的设备没有运行BGP(R3),那么它会缺少路由(2.2.2.2/6 ...

最新文章

  1. buffer java作用_Java NIO之Buffer的使用
  2. RocketMQ配置
  3. 菲涅尔效应(Fresnel Effect)
  4. Castle 开发系统文章
  5. mysql数学函数有什么_mysql数学函数有哪些?
  6. 网易云音乐ncm格式转换mp3格式工具
  7. abaqus2021详细安装教程
  8. 统计分析之参数检验与非参数检验、匹配样本与独立样本、2样本与K样本介绍----附SPSS操作指南
  9. Apollo客户端使用与配置解析
  10. 面试题:进程间通信的方式
  11. 创新之力迸发无限想象,联想创新开放日触见未来科技
  12. 一、CSS定位布局[相对定位、绝对定位、固定定位]
  13. 棋盘格检测--Automatic Detection of Checkerboards on Blurred and Distorted Images
  14. 中国联通国家数据中心广州太阳广场IDC机房(四星级)
  15. 三分类、五分类、CRP\SAA、六分类
  16. HTML项目心得500字,心得体会作文500字(精选10篇)
  17. springboot遇到的Invalid bound statement (not found): com.yc.service.UserService的众多坑
  18. 全国人口净流入城市排名2020_2019年长三角各城市常住人口、城镇化分布:苏宁杭净流入超200万...
  19. keras电影评论分类
  20. 测试手机视频录屏并转GIF功能

热门文章

  1. (已解决)STM32报错Error: L6218E: Undefined symbol assert_param (referred from misc.o).
  2. Redis和lua,锦上添花
  3. 全网最后一个免费版本,永久可用
  4. 短线牛股技术买点图解 擒牛选股预警 ​通达信选股公式 副图 源码
  5. 共享锁和排它锁的区别
  6. revit常用土建软件【桩转化】功能,CAD识别转化
  7. 经验分享丨自学多久能达到挖漏洞的水平,漏洞奖金有多少?
  8. 【傲腾观察室】英特尔® 傲腾™技术如何助力金融行业关键业务应用?
  9. 从0到1搭建数据湖Hudi环境
  10. 可以免费打电话的网站