【实验分享】CCIE—BGP联邦实验

实验目的:

l掌握BGP联邦工作原理

实验说明:

l通过此实验练习,可以灵活的使用BGP联邦

实验环境:

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

l直通线

实验拓扑:在这里插入图片描述

实验步骤:

R4(config)#interface f0/0

R4(config-if)#ip address 24.1.1.4 255.255.255.0

R4(config-if)#no shutdown

R4(config)#router bgp 1

R4(config-router)#bgp router-id 4.4.4.4

R4(config-router)#neighbor 24.1.1.2 remote-as 2

R2(config)#interface f0/0

R2(config-if)#ip address 24.1.1.2 255.255.255.0

R2(config-if)#no shutdown

R2(config-if)#int f1/0

R2(config-if)#ip address 12.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 2.2.2.2 0.0.0.0 a 0

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

R2(config)#router bgp 21(创建bgp21)

R2(config-router)#bgp confederation identifier 2(表示真正的BGP为2)

R2(config-router)#neighbor 24.1.1.4 remote-as 1

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

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

R2(config-router)#neighbor 1.1.1.1 next-hop-self

R1(config)#interface f1/0

R1(config-if)#ip address 12.1.1.1 255.255.255.0

R1(config-if)#no shutdown

R1(config-if)#int f1/1

R1(config-if)#ip address 13.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 13.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)#router bgp 21

R1(config-router)#bgp confederation identifier 2

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

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

R1(config-router)#bgp confederation peers 22(定义与2.2.2.2建立EBGP邻居由于与2.2.2.2实际建立的是IBGP关系,因此通过此命令说明)

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

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

R1(config-router)#neighbor 3.3.3.3 ebgp-multihop 2(在IBGP的环境下建立EBGP邻居通常建议使用环回口建立)

R3(config)#int f1/1

R3(config-if)#ip address 13.1.1.3 255.255.255.0

R3(config-if)#no shutdown

R3(config-if)#int f0/0

R3(config-if)#ip address 35.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 13.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 22

R3(config-router)#bgp confederation identifier 2

R3(config-router)#bgp confederation peers 21

R3(config-router)#neighbor 1.1.1.1 remote-as 21

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

R3(config-router)#neighbor 1.1.1.1 ebgp-multihop 2

R3(config-router)#neighbor 35.1.1.5 remote-as 3

R5(config)#int f0/0

R5(config-if)#ip address 35.1.1.5 255.255.255.0

R5(config-if)#no shutdown

R5(config)#router bgp 3

R5(config-router)#bgp router-id 5.5.5.5

R5(config-router)#neighbor 35.1.1.3 remote-as 2

验证:

R4(config-if)#int lo 11

R4(config-if)#ip address 11.11.11.11 255.255.255.255

R4(config-if)#int lo 22

R4(config-if)#ip address 22.22.22.22 255.255.255.255

R4(config-if)#int lo 33

R4(config-if)#ip address 33.33.33.33 255.255.255.255

R4(config-if)#int lo 44

R4(config-if)#ip address 44.44.44.44 255.255.255.255

R4(config)#router bgp 1

R4(config-router)#network 11.11.11.11 mask 255.255.255.255

R4(config-router)#network 22.22.22.22 mask 255.255.255.255

R4(config-router)#network 33.33.33.33 mask 255.255.255.255

R4(config-router)#network 44.44.44.44 mask 255.255.255.255

此时查看R5收到的路由

R5#show ip bgp

Network Next Hop Metric LocPrf Weight Path

*> 11.11.11.11/32 35.1.1.3 0 2 1 i

*> 22.22.22.22/32 35.1.1.3 0 2 1 i

*> 33.33.33.33/32 35.1.1.3 0 2 1 i

*> 44.44.44.44/32 35.1.1.3 0 2 1 i

总结:

BGP联邦类似于RR技术,都是为了打破IBGP水平分割规则,简化IBGP的配置而设计,由于联邦在逻辑上更加难理解,因此在后期RR技术替代了联邦。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

GLAB-Mary

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值