BGP实验1

BGP的基础搭建

文档链接:
链接:https://pan.baidu.com/s/1uYtTNmDRtyK5yHWxfc6IJw
提取码:2021
在这里插入图片描述
实现方法 :

R2 R3 R4使用OSPF互联

R2和R1建立EBGP R2和R3R4建立IBGP
R4和R5建立EBGP R4和R2R3建立IBGP
R1在BGP宣告192.168.1.0 用户网段 R3在BGP 宣告 /2.0 /3.0 /4.0 网段 R5在BGP宣告5.0 网段

BGP配置:
[R1-bgp]display this
[V200R003C00]

bgp 1
router-id 1.1.1.1
peer 12.1.1.2 as-number 2

ipv4-family unicast
undo synchronization
network 192.168.1.0
peer 12.1.1.2 enable

[R2-bgp]display this
[V200R003C00]

bgp 2
router-id 2.2.2.2
peer 3.3.3.3 as-number 2
peer 3.3.3.3 connect-interface LoopBack1 //是使用本地环回1接口建邻
peer 4.4.4.4 as-number 2
peer 4.4.4.4 connect-interface LoopBack1
peer 12.1.1.1 as-number 1

ipv4-family unicast
undo synchronization
peer 3.3.3.3 enable
peer 3.3.3.3 next-hop-local // 下一跳修改为本地 让其从EBGP学来的路由专递给其他IBGP成员的下一跳可达
peer 4.4.4.4 enable
peer 4.4.4.4 next-hop-local
peer 12.1.1.1 enable

[R3-bgp]display this
[V200R003C00]

bgp 2
router-id 3.3.3.3
peer 2.2.2.2 as-number 2
peer 2.2.2.2 connect-interface LoopBack1
peer 4.4.4.4 as-number 2
peer 4.4.4.4 connect-interface LoopBack1

ipv4-family unicast
undo synchronization
network 192.168.2.0 // 宣告
network 192.168.3.0
network 192.168.4.0
peer 2.2.2.2 enable
peer 4.4.4.4 enable

[R4-bgp]display this
[V200R003C00]

bgp 2
router-id 4.4.4.4
peer 2.2.2.2 as-number 2
peer 2.2.2.2 connect-interface LoopBack1
peer 3.3.3.3 as-number 2
peer 3.3.3.3 connect-interface LoopBack1
peer 5.5.5.5 as-number 3
peer 5.5.5.5 ebgp-max-hop 2 // 建立EBGP让TTL值改为2 默认1
peer 5.5.5.5 connect-interface LoopBack1

ipv4-family unicast
undo synchronization
import-route static
peer 2.2.2.2 enable
peer 2.2.2.2 next-hop-local
peer 3.3.3.3 enable
peer 3.3.3.3 next-hop-local
peer 5.5.5.5 enable
#[R5-bgp]display this
[V200R003C00]

bgp 3
peer 4.4.4.4 as-number 2
peer 4.4.4.4 ebgp-max-hop 2
peer 4.4.4.4 connect-interface LoopBack1

ipv4-family unicast
undo synchronization
network 5.5.5.5 255.255.255.255
network 192.168.5.0
peer 4.4.4.4 enable
在这里插入图片描述
使用静态建立的EBGP邻居存在逻辑悖论,使得 5.5.5.5 这条BGP路由本地不优 ,因此无法传递给其他邻居

解决方法 1
删除静态 并在1分钟之内加上 利用 Keeplive 保活 周期1min
解决方法2
在R4将此条路由重发布到BGP 如果需要单独重发布某一条
可以写一个route-pllicy调用即可 我这里只有一条 直接选择 import-route static
在这里插入图片描述
在这里插入图片描述
即可实现用户网段全网可达

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值