3.5 BGP自动汇总

图片[1]-3.5 BGP自动汇总-大赛人网
图3-5 BGP自动汇总网络拓扑

1.R1配置OSPF

[R1]ospf 1 router-id 1.1.1.1
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[R1-ospf-1-area-0.0.0.0]network 12.1.1.0 0.255.255.255

2.R2配置OSPF

[R2]ospf 1 router-id 2.2.2.2
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0 
[R2-ospf-1-area-0.0.0.0]network 12.1.1.0 0.255.255.255

3.R1配置IBGP

[R1]bgp 12
[R1-bgp]router-id 1.1.1.1
[R1-bgp]peer 2.2.2.2 as-number 12
[R1-bgp]peer 2.2.2.2 connect-interface LoopBack 0

4.R2配置IBGP、EBGP

[R2-bgp]router-id 2.2.2.2 
[R2-bgp]peer 1.1.1.1 as-number 12
[R2-bgp]peer 1.1.1.1 connect-interface LoopBack 0
[R2-bgp]peer 1.1.1.1 next-hop-local
[R2-bgp]peer 23.1.1.3 as-number 300

5.R3配置EBGP

[R3]bgp 300
[R3-bgp]router-id 3.3.3.3
[R3-bgp]peer 23.1.1.2 as-number 12

6.R3的BGP宣告 LoopBack 1、2,并打开BGP自动汇总功能

[R3-bgp]network 3.3.1.1 32
[R3-bgp]network 3.3.2.1 32
[R3-bgp]network 3.3.3.3 32
[R3-bgp]summary automatic 
Info: Automatic summarization is valid only for the routes imported through the import-route command.
//自动汇总只针对路由引入有效。

7.R2查看BGP路由

[R2]display bgp routing-table 
*>   3.3.1.1/32         23.1.1.3        0                     0      300i
 *>   3.3.2.1/32         23.1.1.3        0                     0      300i
 *>   3.3.3.3/32         23.1.1.3        0                     0      300i

8.删除宣告路由,改用路由引入方式

[R3-bgp]undo network 3.3.1.1 255.255.255.255 
[R3-bgp]undo  network 3.3.2.1 255.255.255.255 
[R3-bgp]undo network 3.3.3.3 255.255.255.255 
[R3-bgp]import-route direct 

9.R2查看BGP路由,自动汇总针对引入路由方式有效,对于宣告方式无效

[R2]display bgp routing-table
 *>   3.0.0.0            23.1.1.3                              0      300?
      23.0.0.0           23.1.1.3        0                     0      300?
© 版权声明
THE END
喜欢就支持一下吧
点赞12 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称

    请登录后查看评论内容