23-高级路由:BGP配置(MPLS-解决路由黑洞)
一、实验拓扑:
二、实验要求:
1、R1、R2、R4、R5部署BGP基本配置: bgp号、bgp router-id、no auto-summary、neighbor、network;
2、三个不同AS之间手动建立邻居关系:R1和R2建立邻居关系:用物理接口地址、R4和R5建立邻居关系、R2和R4建立邻居关系并带update-source:用环回口地址;
3、R2、R4分别告诉对方下一跳为自己,使得R2、R4能够收到5.5.5.5、1.1.1.1的路由条目;
三、命令部署:
1、BGP基本部署:
R1(config)#router bgp 1
R1(config-router)#bgp router-id 1.1.1.1
R1(config-router)#no auto-summary
R1(config-router)#network 1.1.1.0 mask 255.255.255.0
R1(config-router)#eighbor 12.1.1.2 remote-as 24
R2(config)#router bgp 24
R2(config-router)#bgp router-id 2.2.2.2
R2(config-router)#no auto-summary
R2(config-router)#neighbor 12.1.1.1 remote-as 1
R2(config-router)#neighbor 4.4.4.4 remote-as 24
R2(config-router)#network 2.2.2.0 mask 255.255.255.0
R4(config)#router bgp 24
R4(config-router)#bgp router-id 4.4.4.4
R4(config-router)#no auto-summary
R4(config-router)#neighbor 2.2.2.2 remote-as 24
R4(config-router)#network 4.4.4.0 mask 255.255.255.0
R4(config-router)#neighbor 5.5.5.5 remote-as 5
R5(config)#router bgp 5
R5(config-router)#bgp router-id 5.5.5.5
R5(config-router)#no auto-summary
R5(config-router)#network 5.5.5.0 mask 255.255.255.0
R5(config-router)#neighbor 4.4.4.4 remote-as 24
R2(config-router)#network 3.3.3.0 mask 255.255.255.0 //可以宣告3.3.3.0的路由条目
R1#show ip bgp neighbors //会出现很长的邻居关系信息
R1#show ip bgp summary //查看本地BGP、邻居BGP汇总信息
R1#show ip bgp //查看BGP信息
2、R2和R4建立邻居关系
R2(config-router)#router bgp 24
R2(config-router)#neighbor 4.4.4.4 update-source loopback 1
R4(config)#router bgp 24
R4(config-router)#neighbor 2.2.2.2 update-source loopback 1
3、R4获取1.1.1.1路由条目下一跳修改(如果R2 EIGRP中宣告了12.1.1.0网段,R4会自动获取1.1.1.1条目):
R2(config)#router bgp 24
R2(config-router)#neighbor 4.4.4.4 next-hop-self
4、R4和R5配置更新源,即使有更新源依然不可达,
因为:①路由不通;
②默认TTL=1,实则需要TTL=2才行;
R4(config)#router bgp 24
R4(config-router)#neighbor 5.5.5.5 update-source loopback 1
R5(config)#router bgp 5
R5(config-router)#neighbor 4.4.4.4 update-source loopback 1
解决方法:
R4(config)#ip route 5.5.5.0 255.255.255.0 f1/0
R5(config)#ip route 4.4.4.0 255.255.255.0 f0/0
R4(config-router)#neighbor 5.5.5.5 ebgp-multihop
R5(config-router)#neighbor 4.4.4.4 ebgp-multihop
5、R1收不到5.5.5.5的路由:因为R2关于5.5.5.5下一跳是5.5.5.5不可达:
将R2的下一跳修改为:4.4.4.4
R4(config)#router bgp 24
R4(config-router)#neighbor 2.2.2.2 next-hop-self
6、R2、R3、R4连接接口下部署MPLS,使得递归可达:
R2(config)#int f1/0
R2(config-if)#mpls ip
R3(config)#int f0/0
R3(config-if)#mpls ip
R3(config-if)#int f1/0
R3(config-if)#mpls ip
R4(config)#int f0/0
R4(config-if)#mpls ip
四、验证:
1、R1、R2邻居UP状态:路由器BGP进程里宣告仅仅是将该路由转换为BGP条目
R1#
Mar 1 01:08:19.683: %BGP-5-ADJCHANGE: neighbor 12.1.1.2 Up
R2#
May 9 14:53:11.307: %BGP-5-ADJCHANGE: neighbor 12.1.1.1 Up
2、基本BGP部署后,show命令:
R1#show ip route bgp
2.0.0.0/24 is subnetted, 1 subnets
B 2.2.2.0 [20/0] via 12.1.1.2, 00:05:07
3.0.0.0/24 is subnetted, 1 subnets
B 3.3.3.0 [20/156160] via 12.1.1.2, 00:00:59
R2#show ip route bgp
1.0.0.0/24 is subnetted, 1 subnets
B 1.1.1.0 [20/0] via 12.1.1.1, 00:01:27
R1#show ip bgp neighbors
BGP neighbor is 12.1.1.2, remote AS 24, external link
BGP version 4, remote router ID 2.2.2.2
BGP state = Established, up for 00:06:34
R1#show ip bgp summary // InQ OutQ 入站、出站QoS;PfxRcd:邻居传递过来的路由条目数量。
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
12.1.1.2 4 24 14 14 4 0 0 00:09:15 2
R1#show ip bgp
Network Next Hop Metric LocPrf Weight Path
> 1.1.1.0/24 0.0.0.0 0 32768 i
> 2.2.2.0/24 12.1.1.2 0 0 24 i
*> 3.3.3.0/24 12.1.1.2 156160 0 24 i
2、R2和R4邻居关系起来:
R2(config-router)#
May 9 15:41:48.215: %BGP-5-ADJCHANGE: neighbor 4.4.4.4 Up
R4(config-router)#
May 9 15:41:38.687: %BGP-5-ADJCHANGE: neighbor 2.2.2.2 Up
R2#show ip bgp summary
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
4.4.4.4 4 24 7 9 24 0 0 00:03:50 1
12.1.1.1 4 1 57 61 23 0 0 00:52:27 1
3、下一跳的问题:
①R2宣告12.1.1.0到EIGRP
R4#show ip bgp //有>符号
Network Next Hop Metric LocPrf Weight Path
>i1.1.1.0/24 12.1.1.1 0 100 0 1 i
r>i2.2.2.0/24 2.2.2.2 0 100 0 i
r>i3.3.3.0/24 23.1.1.3 156160 100 0 i
> 4.4.4.0/24 0.0.0.0 0 32768 i
R4#show ip route bgp
1.0.0.0/24 is subnetted, 1 subnets
B 1.1.1.0 [200/0] via 12.1.1.1, 00:07:57
②修改下一跳问题
R4#show ip route bgp
1.0.0.0/24 is subnetted, 1 subnets
B 1.1.1.0 [200/0] via 2.2.2.2, 00:00:27
4、R1没有5.5.5.5路由条目,因为:R2上关于5.5.5.5下一跳是5.5.5.5不可达:
①未做之前:
R2#show ip bgp
Network Next Hop Metric LocPrf Weight Path
- i5.5.5.0/24 5.5.5.5 0 100 0 5 I
②修改R2下一跳后:
R2#show ip bgp
*>i5.5.5.0/24 4.4.4.4 0 100 0 5 i
R1#show ip bgp
*> 5.5.5.0/24 12.1.1.2 0 24 5 i
转载于:https://blog.51cto.com/13856092/2137535
23-高级路由:BGP配置(MPLS-解决路由黑洞)相关推荐
- BGP通过MPLS解决路由黑洞
目录 拓扑的搭建及IP地址的规划 IGP配置 BGP配置 MPLS配置 BGP的宣告及选路 实验要求: 拓扑的搭建及IP地址的规划 首先实验要求AS2网段地址基于172.16.0.0/16划分,此网段 ...
- 自制MPLS解决路由黑洞实验
利用mpls解决BGP路由黑洞配置命令全解析 --By Jim 什么是BGP路由黑洞? BGP规定无论路由器是否启动bgp都要无条件地转发BGP消息和更新包(凌驾于IGP之上),违背了IGP" ...
- [HCIP]MPLS解决路由黑洞
目录 拓扑搭建 配置思路 MPLS配置 实验结果 拓扑搭建 BGP2与BGP7建立邻居后,路由层面可达,数据层面不可达,造成BGP路由黑洞 需要MPLS技术解决 配置思路 1.将底层IP配好并运行相应 ...
- 静态路由_配置IPv4静态路由
组网需求 如图1所示,属于不同网段的主机通过几台Switch相连,要求不配置动态路由协议,使不同网段的任意两台主机之间能够互通. 图1 配置IP静态路由组网图 配置思路 采用如下的思路配置IPv4静态 ...
- vue项目没有router文件夹_Vue路由(vue-router)配置实战——动态路由,重定向,工程非根目录...
1. 前言 (1) 资料 (2) 需求 本文是在上篇<使用vue-i18n实现多语言>功能的引申.需要实现的功能如下: 多语言需要反映在url上,英文.简体中文.繁体中文页面需分别为/en ...
- 华为交换机模拟器_从零开始学习华为路由交换 | 配置缺省静态路由
实验前准备 1.电脑上安装华为ENSP模拟器 2.添加三台路由器 命令介绍 AR1配置 1.配置接口IP 2.配置缺省静态路由: [R1]ip route-static 0.0.0.0 0 g0/0/ ...
- 静态路由配置与浮动路由配置
静态路由配置 ip route-static [目标网段] [子网掩码] [逃出接口/下一跳IP地址] (一)搭建top,给三台路由器添加S接口设置,并且开启设备 (二)配置以下ip 设备 接口 IP ...
- Gateway路由的配置方式
路由的配置方式 基础路由配置方式 基于代码的路由配置方式 和注册中心相结合的路由配置方式 路由是网关配置的基本组成模块,和Zuul的路由配置模块类似.一个Route模块由一个 ID,一个目标 URI, ...
- 利用MPLS解决BGP路由黑洞问题
致歉声明:前版博客由于博主个人对于BGP知识的理解出现偏差,导致路由黑洞产生的原因解释错误,误导大家,抱歉. 配置文件的百度网盘连接及提取码. 链接:https://pan.baidu.com/s/1 ...
- 锐捷mpls 解决BGP路由黑洞问题
本实验使用eve-ng模拟平台的锐捷设备实现 r1 ena conf t host r1 line con 0 exec-t 0 0 exit int lo 0 ip add 10.1.1.1 255 ...
最新文章
- 怎么将jenkins打包后的war自动部署到jetty上?
- CMRNet++:在激光雷达地图中与地图和相机无关的单目视觉定位
- SpringBoot集成websocket(java注解方式)
- Android中的MVP模式初步使用
- java 简单实现上传 | commons-fileupload
- GreenDao高级用法
- jquery实现checkbox的单选和全选
- PAT (Basic Level) 1080 MOOC期终成绩(模拟+stl)
- 计算机itunes无法安装,手把手给你细说win7系统电脑无法安装itunes的解决方案
- JQuery $.each遍历JSON字符串报Uncaught TypeError:Cannot use 'in' operator to search for
- chmod递归授权文件夹(用法)
- 全排列及相关扩展算法(三)——利用中介数求排列在字典序排位算法
- 中国主要城市的DNS列表
- 深度神经网络分布式训练指引
- Flutter学习(三)
- Windows 11 Insider Preview Build 22000.132 官方简体中文版 iso 下载
- 人活着就是为了改变世界,不要把时间浪费在重复其他人的生活上。————乔布斯
- php通过imap获取腾讯企业邮箱信息后的解码处理
- 软件构造作业——100道算术题
- C#引用win32API
热门文章
- 中国大学MOOC体育保健学考试试题及答案
- 微信小程序云开发,数据库“增”、“删”、“改”、“查”操作
- 【UOJ455】【UER #8】雪灾与外卖
- 自定义邮箱和手机号码的校验规则
- cad打印本计算机未配置,CAD点打印为什么会警告提示无法使用此绘图仪配置
- 深度理解PHP执行流程
- 红黑树 - Wikipedia
- Python datetime time计算时间差
- PHP微信支付 curl请求https://api.mch.weixin.qq.com/pay/unifiedorder 返回空的解决方案
- Flask(python)恶补笔记