设为首页收藏本站language 语言切换
查看: 4372|回复: 5
收起左侧

[求助] BGP与OSPF相互注入后没有效果

[复制链接]
发表于 2012-5-16 20:38:30 | 显示全部楼层 |阅读模式
拓朴图
BGP.jpg
问题:RB、RD、RC都无法PING通过RA的1.1.1.1 ,RA无法PING RB和RD和RC的2.2.2.2、4.4.4.4、3.3.3.3.   RB、RC、RD可以相互通信。
以下为详细配置和路由表:
RA:
<H3C>dis current-configuration
#               
interface Serial5/0
link-protocol ppp
ip address 10.10.10.1 255.255.255.0
#                           
interface LoopBack0
ip address 1.1.1.1 255.255.255.255        
#               
bgp 65000      
router-id 1.1.1.1
network 1.1.1.1 255.255.255.255
undo synchronization
peer 10.10.20.2 as-number 65300
peer 10.10.10.2 as-number 65300


<H3C>dis bgp routing-table

Total Number of Routes: 9

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
*                      10.10.20.2      1                     0       65300?
*                      10.10.10.2                            0       65300?
*>  2.2.2.2/32         10.10.20.2      3124                  0       65300?
*>  3.3.3.3/32         10.10.10.2      1562                  0       65300?
*                      10.10.20.2      1562                  0       65300?
*>  4.4.4.4/32         10.10.10.2      3124                  0       65300?
*>  192.168.10.0       10.10.20.2      3124                  0       65300?
*>  192.168.20.0       10.10.10.2      3124                  0       65300?




RB:
[H3C-bgp]dis current-configuration
#
interface Serial5/0
link-protocol ppp
ip address 10.10.10.2 255.255.255.0
#               
interface Serial5/2
link-protocol ppp
ip address 192.168.10.1 255.255.255.0
#               
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
#               
bgp 65300      
router-id 2.2.2.2
network 3.0.0.0
import-route ospf 1
undo synchronization
peer 4.4.4.4 as-number 65300
peer 10.10.10.1 as-number 65000
peer 4.4.4.4 next-hop-local
peer 4.4.4.4 connect-interface LoopBack0
#               
ospf 1         
import-route bgp
area 0.0.0.0   
  network 2.2.2.2 0.0.0.0
  network 192.168.10.0 0.0.0.255
#               


[H3C-bgp]di bgp ro

Total Number of Routes: 9

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         0.0.0.0         1                     0       ?
*                      10.10.10.1      0                     0       65000i
* i 2.2.2.2/32         4.4.4.4         3124       100        0       ?
*>  3.3.3.3/32         0.0.0.0         1562                  0       ?
* i                    4.4.4.4         1562       100        0       ?
*>  4.4.4.4/32         0.0.0.0         3124                  0       ?
* i 192.168.10.0       4.4.4.4         3124       100        0       ?
*>  192.168.20.0       0.0.0.0         3124                  0       ?



RC:

[H3C-ospf-1-area-0.0.0.0]dis current-configuration
#
interface Serial5/0
link-protocol ppp
ip address 192.168.20.1 255.255.255.0
#                             
interface Serial5/2
link-protocol ppp
ip address 192.168.10.2 255.255.255.0
#                  
interface LoopBack0
ip address 3.3.3.3 255.255.255.255
#                    
ospf 1         
area 0.0.0.0   
  network 3.3.3.3 0.0.0.0
  network 192.168.10.0 0.0.0.255
  network 192.168.20.0 0.0.0.255
#               


H3C-ospf-1-area-0.0.0.0]dis ip routing-table
Routing Tables: Public
        Destinations : 12       Routes : 12

Destination/Mask    Proto  Pre  Cost         NextHop         Interface

1.1.1.1/32          O_ASE  150  1            192.168.20.2    S5/0
2.2.2.2/32          OSPF   10   1562         192.168.10.1    S5/2
3.3.3.3/32          Direct 0    0            127.0.0.1       InLoop0
4.4.4.4/32          OSPF   10   1562         192.168.20.2    S5/0
127.0.0.0/8         Direct 0    0            127.0.0.1       InLoop0
127.0.0.1/32        Direct 0    0            127.0.0.1       InLoop0
192.168.10.0/24     Direct 0    0            192.168.10.2    S5/2
192.168.10.1/32     Direct 0    0            192.168.10.1    S5/2
192.168.10.2/32     Direct 0    0            127.0.0.1       InLoop0
192.168.20.0/24     Direct 0    0            192.168.20.1    S5/0
192.168.20.1/32     Direct 0    0            127.0.0.1       InLoop0
192.168.20.2/32     Direct 0    0            192.168.20.2    S5/0


RD:

[H3C-bgp]dis current-configuration
#
interface Serial5/0
link-protocol ppp
ip address 192.168.20.2 255.255.255.0
#               
interface LoopBack0
ip address 4.4.4.4 255.255.255.255
#               
interface GigabitEthernet0/0
port link-mode route
ip address 10.10.20.2 255.255.255.0
#                     
bgp 65300      
router-id 4.4.4.4
network 3.0.0.0
import-route ospf 1
undo synchronization
peer 10.10.20.1 as-number 65000
peer 2.2.2.2 as-number 65300
peer 2.2.2.2 connect-interface LoopBack0
#               
ospf 1         
import-route bgp
area 0.0.0.0   
  network 4.4.4.4 0.0.0.0
  network 192.168.20.0 0.0.0.255
#   


[H3C-bgp]di bgp ro

Total Number of Routes: 9

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         0.0.0.0         1                     0       ?
*                      10.10.20.1      0                     0       65000i
*>  2.2.2.2/32         0.0.0.0         3124                  0       ?
*>  3.3.3.3/32         0.0.0.0         1562                  0       ?
* i                    2.2.2.2         1562       100        0       ?
* i 4.4.4.4/32         2.2.2.2         3124       100        0       ?
*>  192.168.10.0       0.0.0.0         3124                  0       ?
* i 192.168.20.0       2.2.2.2         3124       100        0       ?


发表于 2012-5-16 22:20:48 | 显示全部楼层
呵呵  学习
沙发 2012-5-16 22:20:48 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2012-5-16 22:26:12 | 显示全部楼层
朋友,工程中尽量避免把BGP注入到IGP中,会产生协议之间的优先级问题,完全可以避免这种情况同时达到你想要的效果。
板凳 2012-5-16 22:26:12 回复 收起回复
回复 支持 反对

使用道具 举报

 楼主| 发表于 2012-5-17 08:27:26 | 显示全部楼层
哪具体怎么做哩
地板 2012-5-17 08:27:26 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2012-6-17 16:14:54 | 显示全部楼层
RD上 只要用环回口建邻居,必需使用 peer IP  next-hop-local  少写一条
建议关闭将BGP注入IGP,这样只是用来单纯解决路由黑洞,没有实际工程的意义,实验也容易由于优先级问题出错
建议使用BGP邻居的FULL MESH ,即把RC也加入BGP,同时跟RB RD建邻居,用这种方式解决路由黑洞实验拓扑太简单了,可以再使用一个AS ,用第一个AS和第三个AS互通与否来验证,第二个AS运行OSPF跟BGP
5# 2012-6-17 16:14:54 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2012-6-17 18:27:03 | 显示全部楼层
飘过……
6# 2012-6-17 18:27:03 回复 收起回复
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-4-9 02:07 , Processed in 0.092148 second(s), 23 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表