BGPルートの生成(経路集約 その3)
ここでは、複数のAS内の経路をBGPで集約して通知させる演習を行います。
「BGPルートの生成(経路集約 その1)」では、下のネットワークをBGPで構築し、BGPによる経路集約の設定を行いました。
ここでは、このネットワークにAS300を新設して追加します。
その際、AS100内のループバックアドレスを変更しネットワーク構成を若干変更します。

今回、AS300を追加したネットワークは、下図になります。
AS100の経路、AS300の経路をRouter_Bで集約してRouter_Cに通知するように設定していきます。

まずは、上のネットワークをBGPで構築します。
ここでは、まだ、経路集約に関しての設定は行いません。
それでは、各ルータを設定していきます。
●Router_Aの設定
!
version 11.2
no service udp-small-servers
no service tcp-small-servers
!
hostname Router_A
!
enable password cisco
!
ip subnet-zero
!
interface Loopback0
ip address 192.168.8.1 255.255.255.0
!
interface Loopback1
ip address 192.168.9.1 255.255.255.0
!
interface Loopback2
ip address 192.168.10.1 255.255.255.0
!
interface Loopback3
ip address 192.168.11.1 255.255.255.0
!
interface Serial0
ip address 172.16.0.1 255.255.0.0
clockrate 64000
!
router bgp 100
no synchronization
network 192.168.8.0
network 192.168.9.0
network 192.168.10.0
network 192.168.11.0
neighbor 172.16.0.2 remote-as 200
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
!
ip subnet-zero
!
interface Ethernet0
ip address 172.18.0.1 255.255.0.0
!
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 200
no synchronization
neighbor 172.16.0.1 remote-as 100
neighbor 172.17.0.2 remote-as 200
neighbor 172.17.0.2 next-hop-self
neighbor 172.18.0.1 remote-as 300
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
!
ip subnet-zero
!
interface Serial0
ip address 172.17.0.2 255.255.0.0
!
router bgp 200
no synchronization
neighbor 172.17.0.1 remote-as 200
no auto-summary
!
ip classless
!
line con 0
exec-timeout 0 0
line aux 0
line vty 0 4
password cisco
login
!
end
●Router_Dの設定
!
version 12.0
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Router_D
!
enable password cisco
!
ip subnet-zero
!
interface Loopback0
ip address 192.168.12.1 255.255.255.0
!
interface Loopback1
ip address 192.168.13.1 255.255.255.0
!
interface Loopback2
ip address 192.168.14.1 255.255.255.0
!
interface Loopback3
ip address 192.168.15.1 255.255.255.0
!
interface Ethernet0/0
ip address 172.18.0.2 255.255.0.0
!
router bgp 300
no synchronization
network 192.168.12.0
network 192.168.13.0
network 192.168.14.0
network 192.168.15.0
neighbor 172.18.0.2 remote-as 200
no auto-summary
!
ip classless
!
line con 0
exec-timeout 0 0
transport input none
line aux 0
line vty 0 4
password cisco
login
!
no scheduler allocate
end
Router_CのBGPテーブルを確認してみます。
Router_C#show ip bgp
BGP table version is 18, local router ID is 172.17.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
*>i192.168.8.0 172.17.0.1 0 100 0 100 i
*>i192.168.9.0 172.17.0.1 0 100 0 100 i
*>i192.168.10.0 172.17.0.1 0 100 0 100 i
*>i192.168.11.0 172.17.0.1 0 100 0 100 i
*>i192.168.12.0 172.17.0.1 0 100 0 300 i
*>i192.168.13.0 172.17.0.1 0 100 0 300 i
*>i192.168.14.0 172.17.0.1 0 100 0 300 i
*>i192.168.15.0 172.17.0.1 0 100 0 300 i
AS100、AS300から経路情報が伝わってきていることが確認できます。
Router_Cのルーティングテーブルも確認してみます。
Gateway of last resort is not set
B 192.168.8.0/24 [200/0] via 172.17.0.1, 00:34:09
B 192.168.9.0/24 [200/0] via 172.17.0.1, 00:34:10
B 192.168.10.0/24 [200/0] via 172.17.0.1, 00:34:10
B 192.168.11.0/24 [200/0] via 172.17.0.1, 00:34:10
B 192.168.12.0/24 [200/0] via 172.17.0.1, 00:33:17
B 192.168.13.0/24 [200/0] via 172.17.0.1, 00:33:17
B 192.168.14.0/24 [200/0] via 172.17.0.1, 00:33:17
B 192.168.15.0/24 [200/0] via 172.17.0.1, 00:33:17
C 172.17.0.0/16 is directly connected, Serial0
それでは、これらの経路情報をRouter_Bで、「192.168.8.0/21」に集約して通知するように設定していきます。
| AS100の経路 | 集約経路 | |
|---|---|---|
| 192.168.8.0/24 192.168.9.0/24 192.168.10.0/24 192.168.11.0/24 192.168.12.0/24 192.168.13.0/24 192.168.14.0/24 192.168.15.0/24 | → | 192.168.8.0/21 |
この続きは、「BGPルートの生成(経路集約 その4)」で紹介します。
