设为首页收藏本站language→→ 语言切换

鸿鹄论坛

 找回密码
 论坛注册

QQ登录

先注册再绑定QQ

查看: 922|回复: 3
收起左侧

[求助] 萌新学NP,有几个问题请教一下

[复制链接]
发表于 2017-8-25 20:59:50 | 显示全部楼层 |阅读模式
配置R1:interface GigabitEthernet0/0/0            
ip address 10.1.12.1 255.255.255.0      
#                                         
interface GigabitEthernet0/0/1            
#                                         
interface NULL0                           
#                                         
interface LoopBack1                       
ip address 1.1.1.1 255.255.255.255      
#                                         
bgp 100                                   
router-id 1.1.1.1                        
peer 10.1.12.2 as-number 200            
#                                       
ipv4-family unicast                     
  undo synchronization                    
  network 1.1.1.1 255.255.255.255         
  import-route direct                     
  peer 10.1.12.2 enable                  
#                                         
user-interface con 0                     
authentication-mode password            
user-interface vty 0 4                    
user-interface vty 16 20  

R2
interface Serial1/0/0                     
link-protocol ppp                        
ip address 10.1.25.2 255.255.255.0      
#                                         
interface Serial1/0/1                     
link-protocol ppp                        
#                                         
interface GigabitEthernet0/0/0            
ip address 10.1.12.2 255.255.255.0      
#                                         
interface GigabitEthernet0/0/1            
ip address 10.1.23.1 255.255.255.0      
#                                         
interface NULL0                           
#                                         
interface LoopBack1                       
ip address 2.2.2.2 255.255.255.255      
#                                         
bgp 200                                   
router-id 2.2.2.2                        
peer 5.5.5.5 as-number 200               
peer 5.5.5.5 connect-interface LoopBack1
peer 10.1.12.1 as-number 100            
#                                       
ipv4-family unicast                     
  undo synchronization                    
  import-route ospf 1                     
  peer 5.5.5.5 enable                     
  peer 10.1.12.1 enable                  
#                                         
ospf 1 router-id 2.2.2.2                  
import-route direct                     
area 0.0.0.0                             
  network 2.2.2.2 0.0.0.0                 
  network 10.1.23.0 0.0.0.255            
  network 10.1.25.0 0.0.0.255            
#                                         
user-interface con 0                     
authentication-mode password            
user-interface vty 0 4                    
user-interface vty 16 20                  
#                                         
wlan ac                                   
#        
R3
interface Serial1/0/1                     
link-protocol ppp                        
ip address 10.1.35.3 255.255.255.0      
#                                         
interface GigabitEthernet0/0/0            
ip address 10.1.34.3 255.255.255.0      
#                                         
interface GigabitEthernet0/0/1            
shutdown                                 
ip address 10.1.23.2 255.255.255.0      
#                                         
interface NULL0                           
#                                         
interface LoopBack1                       
ip address 3.3.3.3 255.255.255.255      
#                                         
bgp 200                                   
peer 5.5.5.5 as-number 200               
peer 5.5.5.5 connect-interface LoopBack1
peer 10.1.34.4 as-number 300            
#                                       
ipv4-family unicast                     
  undo synchronization                    
  import-route ospf 1                     
  peer 5.5.5.5 enable                     
  peer 10.1.34.4 enable                  
#                                         
ospf 1 router-id 3.3.3.3                  
import-route direct                     
area 0.0.0.0                             
  network 3.3.3.3 0.0.0.0                 
  network 10.1.23.0 0.0.0.255            
  network 10.1.35.0 0.0.0.255            
#                                         
user-interface con 0                     
authentication-mode password            
user-interface vty 0 4                    
user-interface vty 16 20                  
#                                         
wlan ac                                   
#      
R4
interface Ethernet0/0/7                  
#                                         
interface GigabitEthernet0/0/0            
ip address 10.1.34.4 255.255.255.0      
#                                         
interface GigabitEthernet0/0/1            
#                                         
interface NULL0                           
#                                         
interface LoopBack1                       
ip address 4.4.4.4 255.255.255.255      
#                                         
bgp 300                                   
router-id 4.4.4.4                        
peer 10.1.34.3 as-number 200            
#                                       
ipv4-family unicast                     
  undo synchronization                    
  network 4.4.4.4 255.255.255.255         
  peer 10.1.34.3 enable                  
#                                         
user-interface con 0                     
authentication-mode password            
user-interface vty 0 4                    
user-interface vty 16 20                  
#                                         
wlan ac                                   
#      
R5
#                                         
interface Serial1/0/0                     
link-protocol ppp                        
ip address 10.1.25.5 255.255.255.0      
#                                         
interface Serial1/0/1                     
link-protocol ppp                        
ip address 10.1.35.5 255.255.255.0      
#                                         
interface GigabitEthernet0/0/0            
#                                         
interface GigabitEthernet0/0/1            
#                                         
interface NULL0                           
#                                         
interface LoopBack1                       
ip address 5.5.5.5 255.255.255.255      
#                                         
bgp 200                                   
peer 2.2.2.2 as-number 200               
peer 2.2.2.2 connect-interface LoopBack1
peer 3.3.3.3 as-number 200               
peer 3.3.3.3 connect-interface LoopBack1
#                                       
ipv4-family unicast                     
  undo synchronization                    
  import-route ospf 1                     
  peer 2.2.2.2 enable                     
  peer 3.3.3.3 enable                     
#                                         
ospf 1 router-id 5.5.5.5                  
import-route direct                     
area 0.0.0.0                             
  network 5.5.5.5 0.0.0.0                 
  network 10.1.25.0 0.0.0.255            
  network 10.1.35.0 0.0.0.255            
#                                         
user-interface con 0                     
authentication-mode password            
user-interface vty 0 4                    
user-interface vty 16 20                  
#                                         
wlan ac         
底层协议为OSPF  ,ospf 中引入 direct ,BGP中引入OSPF  !
问题 1:为什么R3和R1会成为IBGP邻居?
问题 2 :  当R3与R2不互指peer ,让路由通过R2-R5-R3 在 R1 tracert -a 1.1.1.1 4.4.4.4 路由为什么传不出去?
拓扑图.png
发表于 2017-8-28 21:31:07 | 显示全部楼层
直接看拓扑。第一题不知道,应该是EBGP关系的。第二题,R2上peerR5的时候要用next-hop local,R3上peerR5的时候要用next-hop local,不然路由是不可用的。而且建立IBGP的时候应该实现全网IBGP互通的
沙发 2017-8-28 21:31:07 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2017-9-2 21:49:51 | 显示全部楼层
1.为什么R3和R1会成为IBGP邻居?
R3和R1不会成为IBGP,不同的AS号,就是EBGP关系,如果你看到IBGP,只能是R5发送到你那看到的是IBGP
2.当R3与R2不互指peer ,让路由通过R2-R5-R3 在 R1 tracert -a 1.1.1.1 4.4.4.4 路由为什么传不出去
因为的缺少配置,R2,需要配置一条想R5,next-hop-local 如果不配 R5 收不到 1.1.1.1 EBGP 路由,相反R3也需要一个这样的配置,因为 4.4.4.4 也要发送EBGP
R5 根据水平分割原则,R5 不会发送1.1.1.1 到R3 所以在R5上配置反射器命令
板凳 2017-9-2 21:49:51 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2017-10-12 10:56:24 | 显示全部楼层
过来学习的
地板 2017-10-12 10:56:24 回复 收起回复
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-4-20 02:26 , Processed in 0.064643 second(s), 10 queries , Redis On.  

  Powered by Discuz!

  © 2001-2024 HH010.COM

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