BGP全互联(H3C)
BGP全互联 一.实验拓扑图二.实验步骤三、实验过程bgp 65001peer 10.0.1.6 as-num 65002peer 4.4.4.4 as-num 65002peer 4.4.4.4 connect-int lo0peer 4.4.4.4 next-hop-lo
bgp 65001peer 10.0.1.10 as-num 65002peer 1.1.1.1 as-num 65001peer 1.1.1.1 connect-int lo0peer 1.1.1.1 next-hop-lo
bgp 65002peer 10.0.1.5 as-num 65001group rr internal peer rr next-hop-lopeer rr connect-int lo0peer 3.3.3.3 group rrpeer 5.5.5.5 group rrpeer 6.6.6.6 group rr
bgp 65002peer 10.0.1.9 as-num 65001group nn internalpeer nn next-hop-lopeer nn connect-int lo0peer 2.2.2.2 group nnpeer 5.5.5.5 group nnpeer 6.6.6.6 group nn
bgp 65002group mm internal peer mm nextpeer mm next-hop-local peer mm conpeer mm connect-interface lo0peer 2.2.2.2 group mmpeer 3.3.3.3 group mmpeer 6.6.6.6 groupmm
bgp 65002group ii internal peer ii nepeer ii next-hop-local peer ii con peer ii connect-interface lo0peer 2.2.2.2 group iipeer 5.5.5.5 group iipeer 3.3.3.3 group ii
net 10.10.5.1 32net 10.10.6.1 32
net 10.10.5.1 32net 10.10.6.1 32
net 10.30.1.1 32net 10.40.4.1 32
三.调试以及结果分析
在所有配置完成之后:查看R1的BGP路由表:dis bgp routing-table
Total Number of Routes: 5
BGP Local router ID is 1.1.1.1 Status codes: * - valid, > - best, d - damped, h - history,i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete Network NextHop MED LocPrf PrefVal Path/Ogn
*>1.1.1.1/32 0.0.0.0 0 0 i*>2.2.2.2/32 10.0.1.6 0 0 10i*>4.4.4.4/32 10.0.1.6 0 10 40i*>10.30.1.1/32 0.0.0.0 0 0 i*>10.40.4.1/32 10.0.1.6 0 10 40i
dis ip roudis ip routing-table Routing Tables: Public Destinations : 9 Routes : 9
Destination/Mask ProtoPreCost NextHop Interface
1.1.1.1/32 Direct 0 0 127.0.0.1 InLoop02.2.2.2/32 BGP 2550 10.0.1.6 Eth0/1/04.4.4.4/32 BGP 2550 10.0.1.6 Eth0/1/010.0.1.4/30 Direct 0 0 10.0.1.5 Eth0/1/010.0.1.5/32 Direct 0 0 127.0.0.1 InLoop010.30.1.1/32 Direct 0 0 127.0.0.1 InLoop010.40.4.1/32 BGP 2550 10.0.1.6 Eth0/1/0127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
这里因为R1没有和R3建立邻居,所以R3发布的业务网段,不能够被R1学习到,因为R3发布的业务网段通过IGP进入到R2的IP路由表,而R1想要学习R3的业务网段路由,只能通过BGP路由进行学习,所以没有3.3.3.3这条路由
同样在R4中dis bgp routing-table
Total Number of Routes: 5
BGP Local router ID is 4.4.4.4 Status codes: * - valid, > - best, d - damped, h - history,i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete Network NextHop MED LocPrf PrefVal Path/Ogn
*>1.1.1.1/32 10.0.1.10 0 10 30i*>3.3.3.3/32 10.0.1.10 0 0 10i*>4.4.4.4/32 0.0.0.0 0 0 i*>10.30.1.1/32 10.0.1.10 0 10 30i*>10.40.4.1/32 0.0.0.0 0 0 i
dis ip routing-table Routing Tables: Public Destinations : 9 Routes : 9
Destination/Mask ProtoPreCost NextHop Interface
1.1.1.1/32 BGP 2550 10.0.1.10 Eth0/1/13.3.3.3/32 BGP 2550 10.0.1.10 Eth0/1/14.4.4.4/32 Direct 0 0 127.0.0.1 InLoop010.0.1.8/30 Direct 0 0 10.0.1.9 Eth0/1/110.0.1.9/32 Direct 0 0 127.0.0.1 InLoop010.30.1.1/32 BGP 2550 10.0.1.10 Eth0/1/110.40.4.1/32 Direct 0 0 127.0.0.1 InLoop0127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
在R4的BGP路由表中也没有2.2.2.2这条路由,解决这些问题的方法是,在R1和R4之间建立EBGP,R1和R4之间就能够交换BGP路由信息.
dis bgp routing-table
Total Number of Routes: 8
BGP Local router ID is 2.2.2.2 Status codes: * - valid, > - best, d - damped, h - history,i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete Network NextHop MED LocPrf PrefVal Path/Ogn
*>1.1.1.1/32 10.0.1.5 0 0 30i*>2.2.2.2/32 0.0.0.0 0 0 i i 3.3.3.3/32 3.3.3.3 0 100 0 i*>i 4.4.4.4/32 3.3.3.3 0 100 0 40i i 5.5.5.5/32 5.5.5.5 0 100 0 i* i 10.10.5.1/32 5.5.5.5 0 100 0 i*>10.30.1.1/32 10.0.1.5 0 0 30i*>i 10.40.4.1/32 3.3.3.3 0 100 0 40i
dis ip routing-table Routing Tables: Public Destinations : 18 Routes : 18
Destination/Mask ProtoPreCost NextHop Interface
1.1.1.1/32 BGP 2550 10.0.1.5 Eth0/1/02.2.2.2/32 Direct 0 0 127.0.0.1 InLoop03.3.3.3/32 OSPF 10 30 10.0.1.18 Eth0/1/24.4.4.4/32 BGP 2550 3.3.3.3 Eth0/1/25.5.5.5/32 OSPF 10 10 10.0.1.18 Eth0/1/26.6.6.6/32 OSPF 10 20 10.0.1.18 Eth0/1/210.0.1.4/30 Direct 0 0 10.0.1.6 Eth0/1/010.0.1.6/32 Direct 0 0 127.0.0.1 InLoop010.0.1.16/30 Direct 0 0 10.0.1.17 Eth0/1/210.0.1.17/32 Direct 0 0 127.0.0.1 InLoop010.0.1.20/30 OSPF 10 30 10.0.1.18 Eth0/1/210.0.1.24/30 OSPF 10 20 10.0.1.18 Eth0/1/210.10.5.1/32 OSPF 10 10 10.0.1.18 Eth0/1/210.10.6.1/32 OSPF 10 20 10.0.1.18 Eth0/1/210.30.1.1/32 BGP 2550 10.0.1.5 Eth0/1/010.40.4.1/32 BGP 2550 3.3.3.3 Eth0/1/2127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
在R2的调试信息中,R3的业务网段在BGP路由表中,但是不能进入到IP转发表中.原因是IGP的优先级高于BGP优先级,虽然R3也通过BGP也发布了业务网段,但是仍然进入不了IP 转发表.
同理在R3调试信息中:dis bgp routing-table
Total Number of Routes: 8
BGP Local router ID is 3.3.3.3 Status codes: * - valid, > - best, d - damped, h - history,i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete Network NextHop MED LocPrf PrefVal Path/Ogn
*>i 1.1.1.1/32 2.2.2.2 0 100 0 30i i 2.2.2.2/32 2.2.2.2 0 100 0 i*>3.3.3.3/32 0.0.0.0 0 0 i*>4.4.4.4/32 10.0.1.9 0 0 40i i 6.6.6.6/32 6.6.6.6 0 100 0 i* i 10.10.6.1/32 6.6.6.6 0 100 0 i*>i 10.30.1.1/32 2.2.2.2 0 100 0 30i*>10.40.4.1/32 10.0.1.9 0 0 40i
dis ip routing-table Routing Tables: Public Destinations : 18 Routes : 18
Destination/Mask ProtoPreCost NextHop Interface
1.1.1.1/32 BGP 2550 2.2.2.2 Eth0/1/12.2.2.2/32 OSPF 10 30 10.0.1.22 Eth0/1/13.3.3.3/32 Direct 0 0 127.0.0.1 InLoop04.4.4.4/32 BGP 2550 10.0.1.9 Eth0/1/35.5.5.5/32 OSPF 10 20 10.0.1.22 Eth0/1/16.6.6.6/32 OSPF 10 10 10.0.1.22 Eth0/1/110.0.1.8/30 Direct 0 0 10.0.1.10 Eth0/1/310.0.1.10/32 Direct 0 0 127.0.0.1 InLoop010.0.1.16/30 OSPF 10 30 10.0.1.22 Eth0/1/110.0.1.20/30 Direct 0 0 10.0.1.21 Eth0/1/110.0.1.21/32 Direct 0 0 127.0.0.1 InLoop010.0.1.24/30 OSPF 10 20 10.0.1.22 Eth0/1/110.10.5.1/32 OSPF 10 20 10.0.1.22 Eth0/1/110.10.6.1/32 OSPF 10 10 10.0.1.22 Eth0/1/110.30.1.1/32 BGP 2550 2.2.2.2 Eth0/1/110.40.4.1/32 BGP 2550 10.0.1.9 Eth0/1/3127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
同样,在R3的BGP路由表中也有2.2.2.2这条路由,但是并不是最优,进入不了IP转发表,因为IP转发表中2.2.2.2这条路由是来源于OSPF.
下面再引出一个问题,在R1上不能发现R5发布的业务网段,这是为什么?因为在我的配置中,R2发布BGP网段的时候,没有直接把R5的业务网段当做自己的直连发布出去给R1,所以R1上没有R5上的业务网段是正常的.那么为了实现业务的连通,可以通过多种方法来实现,在R2上用BGP发布就是一种方法. 美女未抱身先走,常使色狼泪满襟。。。。。。 爱她,就请为她做无痛人流手术! 天塌下来你顶着,我垫着! 找到好贴不容易,我顶你了,谢了 俺从不写措字,但俺写通假字! 长得真有创意,活得真有勇气!
页:
[1]