IBGP水平分割: 当一个IBGP收到一个IBGP邻居的路由时他不会再将这条路由传递给下一个IBGP邻居
拓朴如下图:R1R2R3IBGP关系,同属于AS1区域,R4属于AS4R5属于AS5
 IBGP路由的水平分割_休闲
 
 
R1学不到R5的路由
Router1#show ip bgp
BGP table version is 2, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure
Origin codes: i - IGP, e - EGP, ? - incomplete
Network          Next Hop            Metric LocPrf Weight Path
*> 4.4.4.4/32       14.0.0.4                 0             0 4 i
 
R2也学不到R4的路由
Router2#show ip bgp
BGP table version is 3, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure
Origin codes: i - IGP, e - EGP, ? - incomplete
Network          Next Hop            Metric LocPrf Weight Path
*> 5.5.5.5/32       25.0.0.5                 0             0 5 i
*> 6.6.6.6/32       25.0.0.5                 0             0 5 i
但是R3可以学到R4R5的路由
Router3#show ip bgp
BGP table version is 4, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure
Origin codes: i - IGP, e - EGP, ? - incomplete
Network          Next Hop            Metric LocPrf Weight Path
*>i4.4.4.4/32       13.0.0.1                 0    100      0 4 i
*>i5.5.5.5/32       23.0.0.2                 0    100      0 5 i
*>i6.6.6.6/32       23.0.0.2                 0    100      0 5 i
Router1#show run
Building configuration...
 
Current configuration : 1264 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Router
!
ip subnet-zero
!
fax interface-type fax-mail
mta receive maximum-recipients 0
!
interface Loopback0
 no ip address
!
interface FastEthernet0/0
 ip address 14.0.0.1 255.0.0.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 13.0.0.1 255.0.0.0
 duplex auto
 speed auto
!
!
router ospf 1
 log-adjacency-changes
 network 13.0.0.1 0.0.0.0 area 0
 network 14.0.0.1 0.0.0.0 area 0
!
router bgp 1
 no synchronization    //关闭同步
 bgp log-neighbor-changes
 neighbor 13.0.0.3 remote-as 1 //AS113.0.0.3建立IBGP邻居关系
 neighbor 13.0.0.3 next-hop-self  //更改13.0.0.3的下一跳属性
 neighbor 14.0.0.4 remote-as 4 //AS414.0.0.4建立EBGP领居关系
 neighbor 14.0.0.4 ebgp-multihop 2 //指定EBGP的邻居多跳
 neighbor 14.0.0.4 next-hop-self  //更改14.0.0.4的下一跳属性
 no auto-summary
!
!
end
 
Router2#show run
Building configuration...
 
Current configuration : 1264 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Router
!
!
ip subnet-zero
!
fax interface-type fax-mail
mta receive maximum-recipients 0
!
interface Loopback0
 no ip address
!
interface FastEthernet0/0
 ip address 23.0.0.2 255.0.0.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 25.0.0.2 255.0.0.0
 duplex auto
 speed auto
router ospf 1
 log-adjacency-changes
 network 23.0.0.2 0.0.0.0 area 0
 network 25.0.0.2 0.0.0.0 area 0
!
router bgp 1
 no synchronization
 bgp log-neighbor-changes
 neighbor 23.0.0.3 remote-as 1
 neighbor 23.0.0.3 next-hop-self
 neighbor 25.0.0.5 remote-as 5
 neighbor 25.0.0.5 ebgp-multihop 2
 neighbor 25.0.0.5 next-hop-self
 no auto-summary
!
end
 
Router3#show run
Building configuration...
Current configuration : 1176 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Router
!
ip subnet-zero
!
fax interface-type fax-mail
mta receive maximum-recipients 0
!
interface Loopback0
 no ip address
!
interface FastEthernet0/0
 ip address 23.0.0.3 255.0.0.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 13.0.0.3 255.0.0.0
 duplex auto
 speed auto
!
router ospf 1
 log-adjacency-changes
 network 13.0.0.3 0.0.0.0 area 0
 network 23.0.0.3 0.0.0.0 area 0
!
router bgp 1
 no synchronization
 bgp log-neighbor-changes
 neighbor 13.0.0.1 remote-as 1
 neighbor 13.0.0.1 next-hop-self
 neighbor 23.0.0.2 remote-as 1
 neighbor 23.0.0.2 next-hop-self
 no auto-summary
!
End
 
Router4#show run
Building configuration...
 
Current configuration : 1096 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Router
!
ip subnet-zero
!
fax interface-type fax-mail
mta receive maximum-recipients 0
!
interface Loopback0
 ip address 4.4.4.4 255.255.255.255
!
interface FastEthernet0/0
 ip address 14.0.0.4 255.0.0.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Ethernet1/0
 no ip address
 shutdown
 half-duplex
router bgp 4
 no synchronization
 bgp log-neighbor-changes
 network 4.4.4.4 mask 255.255.255.255
 neighbor 14.0.0.1 remote-as 1
 neighbor 14.0.0.1 ebgp-multihop 2
 no auto-summary
!  
 
ip route 0.0.0.0 0.0.0.0 14.0.0.1
      
End
 
Router5#show run
Building configuration...
 
Current configuration : 1192 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Router
!
ip subnet-zero
!
fax interface-type fax-mail
mta receive maximum-recipients 0
!
interface Loopback0
 ip address 5.5.5.5 255.255.255.255
!
interface Loopback1
 ip address 6.6.6.6 255.255.255.255
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 25.0.0.5 255.0.0.0
 duplex auto
 speed auto
!
!
router bgp 5
 no synchronization
 bgp log-neighbor-changes
 network 5.5.5.5 mask 255.255.255.255 //宣告自己的环回
 network 6.6.6.6 mask 255.255.255.255
 neighbor 25.0.0.2 remote-as 1
 neighbor 25.0.0.2 ebgp-multihop 2
 no auto-summary
!
 
ip route 0.0.0.0 0.0.0.0 25.0.0.2 //用于回包的路由
End
如何才能让R1学到R5的路由??
如何才能让R2学到R4的路由??
解决此类问题:让R1R2建立邻居关系,实现IBGP会话的全互联