码迷,mamicode.com
首页 > 其他好文 > 详细

GBP 大AS互连

时间:2018-03-07 21:47:34      阅读:124      评论:0      收藏:0      [点我收藏+]

标签:BGP   互连   

不同大AS之间传递路由时候,我们所学习到的相关知识点:
    
BGP路由传递的特点:
   -IBGP邻居之间传递路由,下一跳不变的;
   -EBGP邻居之间传递路由,下一跳是变的;(指的是 大 AS 之间的 EBGP)
    
如果下一跳不变化,有可能导致的问题是:
    BGP路由的下一跳不可达,导致该路由不是最优的,
    所以该路由是不可以使用的(1.不允许放入路由表 ; 2.不允许传出去)    
    
针对下一跳不变而导致的路由下一跳不可达的问题的解决方案:
    在 AS 的边界路由器上,对自己的内部邻居使用以下命令
        
      R6:        
        bgp 200
          peer 10.10.8.8 next-hop-local
                -->将去往 10.10.8.8 邻居             
                   的路由的下一跳变为自己(10.10.6.6)
R8:
#
interface GigabitEthernet0/0/0
 ip address 192.168.86.1 255.255.255.0
#
interface GigabitEthernet0/0/1
 ip address 192.168.87.1 255.255.255.0
#
interface GigabitEthernet0/0/2
 ip address 192.168.1.254 255.255.255.0
#
interface NULL0
#
interface LoopBack0
 ip address 10.10.8.8 255.255.255.0
#
bgp 200
 peer 10.10.6.6 as-number 200
 peer 10.10.6.6 connect-interface LoopBack0
 peer 10.10.7.7 as-number 200
 peer 10.10.7.7 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  network 192.168.1.0
  peer 10.10.6.6 enable
  peer 10.10.7.7 enable
#
rip 1
 network 192.168.86.0
 network 192.168.87.0
 network 10.0.0.0
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return

R7
#
interface GigabitEthernet0/0/0
 ip address 192.168.71.1 255.255.255.0
#
interface GigabitEthernet0/0/1
 ip address 192.168.87.2 255.255.255.0
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
 ip address 10.10.7.7 255.255.255.0
#
bgp 200
 peer 10.10.8.8 as-number 200
 peer 10.10.8.8 connect-interface LoopBack0
 peer 192.168.71.2 as-number 100
 #
 ipv4-family unicast
  undo synchronization
  peer 10.10.8.8 enable
  peer 10.10.8.8 next-hop-local
  peer 192.168.71.2 enable
#
rip 1
 network 192.168.71.0
 network 10.0.0.0
 network 192.168.87.0
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return

R6
#
interface GigabitEthernet0/0/0
 ip address 192.168.61.1 255.255.255.0
#
interface GigabitEthernet0/0/1
 ip address 192.168.86.2 255.255.255.0
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
 ip address 10.10.6.6 255.255.255.0
#
bgp 200
 peer 10.10.8.8 as-number 200
 peer 10.10.8.8 connect-interface LoopBack0
 peer 192.168.61.2 as-number 100
 #
 ipv4-family unicast
  undo synchronization
  peer 10.10.8.8 enable
  peer 10.10.8.8 next-hop-local
  peer 192.168.61.2 enable
#
rip 1
 network 192.168.61.0
 network 192.168.86.0
 network 10.0.0.0
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
R1
#
firewall zone Local
 priority 15
#
interface GigabitEthernet0/0/0
 ip address 192.168.12.1 255.255.255.0
#
interface GigabitEthernet0/0/1
 description PC1 de wangguan
 ip address 192.168.61.2 255.255.255.0
#
interface GigabitEthernet0/0/2
 ip address 192.168.71.2 255.255.255.0
#
interface NULL0
#
interface LoopBack0
 ip address 10.10.1.1 255.255.255.0
#
bgp 64512
 router-id 1.1.1.1
 confederation id 100
 peer 10.10.2.2 as-number 64512
 peer 10.10.2.2 connect-interface LoopBack0
 peer 192.168.61.1 as-number 200
 peer 192.168.71.1 as-number 200
 #
 ipv4-family unicast
  undo synchronization
  network 192.168.1.0
  peer 10.10.2.2 enable
  peer 10.10.2.2 next-hop-local
  peer 192.168.61.1 enable
  peer 192.168.71.1 enable
#
ospf 1 router-id 1.1.1.1
 area 0.0.0.0
  network 10.10.1.1 0.0.0.0
  network 192.168.12.0 0.0.0.255
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return

R2
#
interface GigabitEthernet0/0/0
 ip address 192.168.12.2 255.255.255.0
#
interface GigabitEthernet0/0/1
 ip address 192.168.23.1 255.255.255.0
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
 ip address 10.10.2.2 255.255.255.0
#
bgp 64512
 router-id 2.2.2.2
 confederation id 100
 peer 10.10.1.1 as-number 64512
 peer 10.10.1.1 connect-interface LoopBack0
 peer 10.10.3.3 as-number 64512
 peer 10.10.3.3 connect-interface LoopBack0
 #
 ipv4-family unicast
  undo synchronization
  peer 10.10.1.1 enable
  peer 10.10.1.1 reflect-client
  peer 10.10.3.3 enable
#
ospf 1 router-id 2.2.2.2
 area 0.0.0.0
  network 10.10.2.2 0.0.0.0
  network 192.168.12.0 0.0.0.255
  network 192.168.23.0 0.0.0.255
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
R3
#
interface GigabitEthernet0/0/0
 ip address 192.168.23.2 255.255.255.0
#
interface GigabitEthernet0/0/1
 ip address 192.168.34.1 255.255.255.0
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
 ip address 10.10.3.3 255.255.255.0
#
bgp 64512
 router-id 3.3.3.3
 confederation id 100
 confederation peer-as 64513
 peer 10.10.2.2 as-number 64512
 peer 10.10.2.2 connect-interface LoopBack0
 peer 192.168.34.2 as-number 64513
 #
 ipv4-family unicast
  undo synchronization
  peer 10.10.2.2 enable
  peer 192.168.34.2 enable
#
ospf 1 router-id 3.3.3.3
 area 0.0.0.0
  network 10.10.3.3 0.0.0.0
  network 192.168.23.0 0.0.0.255
  network 192.168.34.0 0.0.0.255
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
R4
#
interface GigabitEthernet0/0/0
 ip address 192.168.34.2 255.255.255.0
#
interface GigabitEthernet0/0/1
 ip address 192.168.45.1 255.255.255.0
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
 ip address 10.10.4.4 255.255.255.0
#
bgp 64513
 router-id 4.4.4.4
 confederation id 100
 confederation peer-as 64512
 peer 10.10.5.5 as-number 64513
 peer 10.10.5.5 connect-interface LoopBack0
 peer 192.168.34.1 as-number 64512
 #
 ipv4-family unicast
  undo synchronization
  peer 10.10.5.5 enable
  peer 192.168.34.1 enable
#
ospf 1 router-id 4.4.4.4
 area 0.0.0.0
  network 10.10.4.4 0.0.0.0
  network 192.168.34.0 0.0.0.255
  network 192.168.45.0 0.0.0.255
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
R5
#
interface GigabitEthernet0/0/0
 ip address 192.168.45.2 255.255.255.0
#
interface GigabitEthernet0/0/1
 description PC2 de wangguan
 ip address 192.168.59.1 255.255.255.0
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
 ip address 10.10.5.5 255.255.255.0
#
bgp 64513
 confederation id 100
 peer 10.10.4.4 as-number 64513
 peer 10.10.4.4 connect-interface LoopBack0
 peer 192.168.59.2 as-number 900
 #
 ipv4-family unicast
  undo synchronization
  network 192.168.2.0
  peer 10.10.4.4 enable
  peer 10.10.4.4 next-hop-local
  peer 192.168.59.2 enable
#
ospf 1 router-id 5.5.5.5
 area 0.0.0.0
  network 10.10.5.5 0.0.0.0
  network 192.168.45.0 0.0.0.255
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
R9
#
interface GigabitEthernet0/0/0
 ip address 192.168.2.254 255.255.255.0
#
interface GigabitEthernet0/0/1
 ip address 192.168.59.2 255.255.255.0
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
interface LoopBack0
#
bgp 900
 peer 192.168.59.1 as-number 100
 #
 ipv4-family unicast
  undo synchronization
  network 192.168.2.0
  peer 192.168.59.1 enable
#
rip 1
 network 192.168.59.0
#
user-interface con 0
 authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return



技术分享图片

GBP 大AS互连

标签:BGP   互连   

原文地址:http://blog.51cto.com/13585616/2083954

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!