BGP(基本設定 iBGPとIGP )⑩
ここでは、iBGPとIGPを組み合わせた設定を紹介していきます。
使用するネットワークは下図になります。
iBGPでネットワークを構築するのでフルメッシュで構築します。
※iBGPでは、フルメッシュでネットワークを構築するのが基本になります。
まずは、iBGPの設定を先に行います。

各ルータのピアは、下図のように張ります。
Router_A ・・・ Router_B、Router_C とピアを張ります。
Router_B ・・・ Router_A、Router_C とピアを張ります。
Router_C ・・・ Router_A、Router_B とピアを張ります。

iBGPで通知するネットワークは、以下のようにします。
Router_A ・・・ 「10.10.10.1/24」 を通知
Router_B ・・・ 「20.20.20.1/24」 を通知
Router_C ・・・ 「30.30.30.1/24」 を通知
それでは、各ルータを設定してゆきます。IGPの設定は、まだ行いません。
強制的にインターフェイスをUPさせるために、各ルータの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
!
interface Serial1
ip address 172.17.0.1 255.255.0.0
clockrate 64000
!
router bgp 100
no synchronization
network 10.10.10.0 mask 255.255.255.0
neighbor 172.16.0.2 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_Bの設定
!
version 11.2
no service udp-small-servers
no service tcp-small-servers
!
hostname Router_B
!
enable password cisco
!
interface Ethernet0
ip address 20.20.20.1 255.255.255.0
no keepalive
!
interface Serial0
ip address 172.16.0.2 255.255.0.0
!
interface Serial1
ip address 172.18.0.1 255.255.0.0
clockrate 64000
!
router bgp 100
no synchronization
network 20.20.20.0 mask 255.255.255.0
neighbor 172.16.0.1 remote-as 100
neighbor 172.18.0.2 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_Cの設定
!
version 11.2
no service udp-small-servers
no service tcp-small-servers
!
hostname Router_C
!
enable password cisco
!
interface Ethernet0
ip address 30.30.30.1 255.255.255.0
no keepalive
!
interface Serial0
ip address 172.17.0.2 255.255.0.0
!
interface Serial1
ip address 172.18.0.2 255.255.0.0
!
router bgp 100
no synchronization
network 30.30.30.0 mask 255.255.255.0
neighbor 172.17.0.1 remote-as 100
neighbor 172.18.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
20.0.0.0/24 is subnetted, 1 subnets
B 20.20.20.0 [200/0] via 172.16.0.2, 01:01:07
30.0.0.0/24 is subnetted, 1 subnets
B 30.30.30.0 [200/0] via 172.17.0.2, 01:00:51
C 172.16.0.0/16 is directly connected, Serial0
C 172.17.0.0/16 is directly connected, Serial1
●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, 00:04:43
20.0.0.0/24 is subnetted, 1 subnets
C 20.20.20.0 is directly connected, Ethernet0
30.0.0.0/24 is subnetted, 1 subnets
B 30.30.30.0 [200/0] via 172.18.0.2, 00:07:22
C 172.16.0.0/16 is directly connected, Serial0
C 172.18.0.0/16 is directly connected, Serial1
●Router_Cのルーティングテーブル
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.17.0.1, 00:04:16
20.0.0.0/24 is subnetted, 1 subnets
B 20.20.20.0 [200/0] via 172.18.0.1, 00:06:55
30.0.0.0/24 is subnetted, 1 subnets
C 30.30.30.0 is directly connected, Ethernet0
C 172.17.0.0/16 is directly connected, Serial0
C 172.18.0.0/16 is directly connected, Serial1各ルータのルーティングテーブルには、
Router_Aが通知した ・・・ 「10.10.10.1/24」の経路
Router_Bが通知した ・・・ 「20.20.20.1/24」の経路
Router_Cが通知した ・・・ 「30.30.30.1/24」の経路
「10.10.10.0/24」、「20.20.20.0/24」、「30.30.30.0/24」 とコネクテッド(「C」)のエントリしかありません。
Router_AのBGPテーブルを確認してみます。
●Router_AのBGPテーブル
Router_A#show ip bgp
BGP table version is 4, 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
*> 10.10.10.0/24 0.0.0.0 0 32768 i
*>i20.20.20.0/24 172.16.0.2 0 100 0 i
*>i30.30.30.0/24 172.17.0.2 0 100 0 i
「i」 ・・・ iBGPで学習
「>」 ・・・ ベストパス
iBGPで、「10.10.10.0/24」、「20.20.20.0/24」、「30.30.30.0/24」の経路がやり取りされているのが分かります。
これらのルートは、「network」コマンドで指定したルートです。
「network」コマンドで指定していないルートは、交換されていません。
その為、ルータ間の経路がないのです。
・Router_Aでは、「172.18.0.0/24」の経路がありません。
・Router_Bでは、「172.17.0.0/24」の経路がありません。
・Router_Cでは、「172.16.0.0/24」の経路がありません。
そこで、各ルータ間の経路情報をIGPで交換させるようにしていきます。
この続きは、「BGP(基本設定 iBGPとIGP)⑪」で、IGPの設定をしていきます。
