BGP(基本設定 iBGPの設定)⑤
iBGPでネットワークを構成するには、下のようなアプローチ方法があります。
- フルメッシュで構成する
- ルートリフレクションで構成する
ここでは、「フルメッシュで構成する」方法を紹介しています。
なぜ、フルメッシュで構成するのかは、「iBGPで学習した経路は他のiBGPへ流さない」という特徴があるからです。
ルートリフレクションで構成する方法については、後ほどのコンテンツで紹介します。
フルメッシュでピアを張らないケース
まずは、フルメッシュではない下のネットワーク構成で設定を行ってゆきます。ちなみに、この構成では、うまくルーティングが行えません。うまくルーティングが行えないことを確認していきます。

BGP同期は、無効にしておきます。BGP同期については、この後のコンテンツで紹介していきます。
ちなみに、BGP同期とは、『たとえBGPで経路情報を学習してもIGPで学習するまでは、その経路情報を有効にしない。』という機能のことです。
※BGP同期は、IOS12.2(8)以前のバージョンでは、デフォルトで有効になっています。
「no synchronization」コマンドで、BGP同期を無効にすることができます。
Router(config-router)#no synchronization
各ルータのピアを下図のように張ります。

各ルータの設定
強制的にインタフェースをUPさせるために、Router_AのE0インタフェースで「no keepalive」コマンドを設定しておきます。
●Router_Aの設定
!
version 11.2
no service udp-small-servers
no service tcp-small-servers
!
hostname Router_A
!
enable password cisco
!
interface Ethernet0
ip address 10.10.10.1 255.255.255.0
no keepalive
!
interface Serial0
ip address 172.16.0.1 255.255.0.0
clockrate 64000
!
router bgp 100
no synchronization
network 10.10.10.0 mask 255.255.255.0
network 172.16.0.0
neighbor 172.16.0.2 remote-as 100
no auto-summary
!
ip classless
!
line con 0
line aux 0
line vty 0 4
password cisco
login
!
end
●Router_Bの設定
!
version 11.2
no service udp-small-servers
no service tcp-small-servers
!
hostname Router_B
!
enable password cisco
!
interface Serial0
ip address 172.16.0.2 255.255.0.0
!
interface Serial1
ip address 172.17.0.1 255.255.0.0
clockrate 64000
!
router bgp 100
no synchronization
network 172.16.0.0
network 172.17.0.0
neighbor 172.16.0.1 remote-as 100
neighbor 172.17.0.2 remote-as 100
no auto-summary
!
ip classless
!
line con 0
line aux 0
line vty 0 4
password cisco
login
!
end
●Router_Cの設定
!
version 11.2
no service udp-small-servers
no service tcp-small-servers
!
hostname Router_C
!
enable password cisco
!
interface Serial0
ip address 172.17.0.2 255.255.0.0
!
router bgp 100
no synchronization
network 172.17.0.0
neighbor 172.17.0.1 remote-as 100
no auto-summary
!
ip classless
!
line con 0
exec-timeout 0 0
line aux 0
line vty 0 4
password cisco
login
!
end
各ルータのルーティングテーブルを確認します。
●Router_Aのルーティングテーブル
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 1 subnets
C 10.10.10.0 is directly connected, Ethernet0
C 172.16.0.0/16 is directly connected, Serial0
B 172.17.0.0/16 [200/0] via 172.16.0.2, 01:08:54
●Router_Bのルーティングテーブル
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 1 subnets
B 10.10.10.0 [200/0] via 172.16.0.1, 01:08:50
C 172.16.0.0/16 is directly connected, Serial0
C 172.17.0.0/16 is directly connected, Serial1
●Router_Cのルーティングテーブル
Gateway of last resort is not set
B 172.16.0.0/16 [200/0] via 172.17.0.1, 01:10:51
C 172.17.0.0/16 is directly connected, Serial0
Router_Cには、「10.10.10.0/24」ルートがありませんね!
Router_BでBGPテーブルを確認してみます。
Router_B#show ip bgp
BGP table version is 10, local router ID is 172.17.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*>i10.10.10.0/24 172.16.0.1 0 100 0 i
* i172.16.0.0 172.16.0.1 0 100 0 i
*> 0.0.0.0 0 32768 i
* i172.17.0.0 172.17.0.2 0 100 0 i
*> 0.0.0.0 0 32768 i
「10.10.10.0/24」の前に「i」が表示されていることから、iBGPで経路学習し、ベストパスになっていることが分かります。つまり、Router_Bでは、BGPによる経路を受信していることが分かります。
ところが
Router_CでBGPテーブルを確認してみます。
Router_C#show ip bgp
BGP table version is 8, local router ID is 172.18.0.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*>i172.16.0.0 172.17.0.1 0 100 0 i
* i172.17.0.0 172.17.0.1 0 100 0 i
*> 0.0.0.0 0 32768 i
Router_Bで学習した「10.10.10.0/24」のルートが、Router_Cに通知されていません。
iBGPでは、iBGPで受け取った経路情報を他のiBGPルータへ通知しないのです。
iBGPでは、ルーティングループを防ぐために、このようにBGPスプリットホライズンが働くようになっています。
この続きは、次の「BGP(基本設定 iBGPの設定)⑥」で、フルメッシュネットワークでiBGPを構成していきます。