BGP路由黑洞及IBGP全连接
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
BGP路由黑洞及IBGP全连接
组网需求:
1.AS65000边界网段发布:RT1、RT2重发布直连路由至OSPF(metric 1000 type 1)
2.BGP配置要求:
no synchronization
no auto-summary IBGP使用LOOPBACK建立邻居,下一跳指向自己
3.RT1,RT2发布AS65000的汇总路由至BGP:10.0.0.0/16、10.3.0.0/16
4.RT5发布AS65001的汇总路由至BGP:10.
5.0.0/16
5.RT6发布AS65001的汇总路由至BGP:10.
6.0.0/16
6.分析路由黑洞的形成及解决方法
IGP路由的配置:
R1:
router ospf 1
router-id 10.0.0.1
redistribute connected metric 1000 metric-type 1 subnets //重发布直连网络到OSPF中passive-interface Serial0/1//与EBGP相连的接口必须配置为被动接口,以免形成邻居network 10.0.0.1 0.0.0.0 area 0
network 10.0.1.4 0.0.0.3 area 0
router ospf 1
router-id 10.0.0.3
passive-interface default
no passive-interface Serial0/0
no passive-interface FastEthernet1/0
network 10.0.0.3 0.0.0.0 area 0
network 10.0.1.0 0.0.0.3 area 0
network 10.0.1.4 0.0.0.3 area 0
network 10.3.3.0 0.0.0.255 area 0
interface FastEthernet1/0
ip address 10.0.1.1 255.255.255.252
ip ospf network point-to-point //配置网络类型为点对点(不需选举DR或BDR)
R4:
router ospf 1
router-id 10.0.0.4
passive-interface default
no passive-interface Serial0/0
no passive-interface FastEthernet1/0
network 10.0.0.4 0.0.0.0 area 0
network 10.0.1.0 0.0.0.3 area 0
network 10.0.1.8 0.0.0.3 area 0
network 10.3.4.0 0.0.0.255 area 0
interface FastEthernet1/0
ip address 10.0.1.1 255.255.255.252
ip ospf network point-to-point //配置网络类型为点对点(不需选举DR或BDR)
R2:
router ospf 1
router-id 10.0.0.2
redistribute connected metric 1000 metric-type 1 subnets//重发布直连网络到OSPF中passive-interface default//与EBGP相连的接口必须配置为被动接口,以免形成邻居no passive-interface Serial0/0
network 10.0.1.8 0.0.0.3 area 0
IBGP的配置:
R1:
router bgp 65000
no synchronization//关闭同步
neighbor 10.0.0.2 remote-as 65000//指定IBGP邻居和AS
neighbor 10.0.0.2 update-source Loopback0//指定更新源为LOOPBACK0
neighbor 10.0.0.2 next-hop-self//把下跳改为自己(EBGP默认)neighbor 10.0.15.2 remote-as 65001 //指定EBGP邻居和AS
network 10.0.0.0 mask 255.255.0.0 /静态发布路由到BGP
no auto-summary//关闭自动汇总
ip route 10.0.0.0 255.255.0.0 null 0 //添加一条静态汇总路由,用来发布
router bgp 65000
no synchronization//关闭同步
neighbor 10.0.0.1 remote-as 65000//指定邻居和AS
neighbor 10.0.0.1 update-source Loopback0//指定更新源为LOOPBACK0 neighbor 10.0.0.1 next-hop-self//把下跳改为自己(EBGP默认)neighbor 10.0.26.2 remote-as 65002//指定EBGP邻居和AS
network 10.3.0.0 mask 255.255.0.0 /静态发布路由到BGP
no auto-summary//关闭自动汇总
ip route 10.3.0.0 255.255.0.0 null 0 //添加一条静态汇总路由,用来发布
R5:
router bgp 65001
network 10.5.0.0 mask 255.255.0.0//静态发布路由到BGP
neighbor 10.0.15.1 remote-as 65000//指定EBGP邻居和AS
no auto-summary//关闭自动汇总
ip route 10.5.0.0 255.255.0.0 Null0//添加一条静态汇总路由,用来发布到BGP R6:
router bgp 65002
no synchronization//关闭同步
network 10.6.0.0 mask 255.255.0.0//静态发布路由到BGP
neighbor 10.0.26.1 remote-as 65000//指定EBGP邻居和AS
no auto-summary//关闭自动汇总
ip route 10.6.0.0 255.255.0.0 Null0//添加一条静态汇总路由,用来发布到BGP 注意:使用IBGP时默认跳数为255,EBGP的默认跳数为1,如果使用EBGP的LOOBACK地址建邻居,需手工指定跳数
neighbor 10.10.10.10 ebgp-multihop 2//后面接的是跳数1-255
思考:现在10.5.5.1能够PING通10.6.6.1吗?
答案是不能ping通,原因是R3上没有去往R6的路由(后面分析)
现在我们来分析一下R6上的10.6.0.0/16路由的传播!
在R6上:
Network Next Hop Metric LocPrf Weight Path
*> 10.5.0.0/16 10.0.26.1 0 65000 65001 i
*> 10.6.0.0/16 0.0.0.0 0 32768 i
*表示有效>表示最优因为10.6.0.0是由本路由器始发所以下一跳是0.0.0.0,如果是重发布到BGP的就为IGP中的下一跳,本地始发路由的weight为32768,Originn属性为IGP
R2收到从EBGP收到的路由,向它所有的邻居转发
*> 10.6.0.0/16 10.0.26.2 0 0 65002 i
因为是由EBGP通告过来的,所以下一跳为EBGP的邻居地址
R1:
*>i10.6.0.0/16 10.0.0.2 0 100 0 65002 i
从IBGP学到的路由,是否通告给EBGP,视同步而定,因为这里是关闭同步的所以能通告给R5(如果开启了同步,必须达到同步的路由才能传给EBGP),同时在R2上配置了next-hop-self将下一跳改变为自己,所以R1收到的路由的下一跳指向它的IBGP邻居
R5: