![图片[1]-3.3 路由同步及路由黑洞-大赛人网](https://www.dsrw.com/wp-content/uploads/2023/03/图片2-28-1024x275.png)
1.R1配置OSPF
[R4]ospf 1 router-id 1.1.1.1
[R4-ospf-1]area 0
[R4-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[R4-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
[R2-ospf-1-area-0.0.0.0]network 23.1.1.0 0.255.255.255
3.R3配置OSPF
[R3]ospf 1 router-id 3.3.3.3
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[R3-ospf-1-area-0.0.0.0]network 23.1.1.0 0.255.255.255
4.R1配置IBGP
[R1]bgp 123
[R1-bgp]router-id 1.1.1.1
[R1-bgp]peer 3.3.3.3 as-number 123
[R1-bgp]peer 3.3.3.3 connect-interface LoopBack 0
5.R3配置IBGP和EBGP
[R3]bgp 123
[R3-bgp]router-id 3.3.3.3
[R3-bgp]peer 1.1.1.1 as-number 123
[R3-bgp]peer 1.1.1.1 connect-interface LoopBack 0
[R3-bgp]peer 1.1.1.1 next-hop-local
[R3-bgp]peer 34.1.1.4 as-number 400
6.R4配置EBGP
[R4]bgp 400
[R4-bgp]router-id 4.4.4.4
[R4-bgp]peer 34.1.1.3 as-number 123
[R4-bgp]network 4.4.4.4 32
7.R1的BGP宣告11.11.11.11/32
[R1-bgp]network 11.11.11.11 32
8.查看R3的BGP路由表,无11.11.11.11/32路由,产生路由黑洞。
[R3]display bgp routing-table
*> 4.4.4.4/32 34.1.1.4 0 0 400i
9.R1、R2、R3配置IBGP,R4的BGP宣告4.4.4.4/32
[R1]bgp 123
[R1-bgp]peer 2.2.2.2 as-number 123
[R1-bgp]peer 2.2.2.2 connect-interface LoopBack 0
[R2]bgp 123
[R2-bgp]router-id 2.2.2.2
[R2-bgp]peer 1.1.1.1 as-number 123
[R2-bgp]peer 1.1.1.1 connect-interface LoopBack 0
[R2-bgp]peer 3.3.3.3 as-number 123
[R2-bgp]peer 3.3.3.3 connect-interface LoopBack 0
[R3]bgp 123
[R3-bgp]peer 2.2.2.2 as-number 123
[R3-bgp]peer 2.2.2.2 connect-interface LoopBack 0
[R3-bgp]peer 2.2.2.2 next-hop-local
[R3-bgp]peer 1.1.1.1 next-hop-local
[R4]bgp 400
[R4-bgp]network 4.4.4.4 32
10.查看R1、R4的BGP路由表
<R1>display bgp routing-table
*>i 4.4.4.4/32 3.3.3.3 0 100 0 400i
*> 11.11.11.11/32 0.0.0.0 0 0 i
<R4>display bgp routing-table
*> 4.4.4.4/32 0.0.0.0 0 0 i
*> 11.11.11.11/32 34.1.1.3 0 123i
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
请登录后查看评论内容