BGP(複数のルートリフレクタの設定)
「BGP(複数のルートリフレクタ)」の続きです。
下のネットワークにおいて、2台のルートリフレクタを配置して、ルートリフレクションの設定を行っていきます。
ちなみに、このネットワークをルートリフレクタを使用せずに構築した場合は、
(5×4)/2 = 10
10のピア接続が必要になります。
ここでは、2台のルートリフレクタを配置するので、7つのピア接続で済みます。
それでは、Router_A、Router_Bをルートリフレクタにして設定していきます。

複数のルートリフレクタの設定
2台のルータで、ルートリフレクションの設定を行います。各ルータで、ルートリフレクタ・クライアントになるピアの数だけ以下のコマンドで指定します。
Router#(config-router)#neighbor {peer_address} route-reflector-client
ルートリフレクタを複数用意するので、ルートリフレクタにするBGPスピーカーに同一のクラスタIDを割り当てる必要があります。
クラスタIDを割り当てるコマンドは、以下のコマンドになります。
Router#(config-router)#bgp cluster-id {cluster ID}
cluster ID : クラスタID
ルートリフレクタ・クライアントの設定に変わりはありません。通常のBGPの設定を行います。
ルートリフレクタにするRouter_A、Router_Bの設定は、以下のようになります。
●Router_Aの設定
Router_A(config)#router bgp 100
Router_A(config-router)#no synchronization
Router_A(config-router)#bgp cluster-id 1
Router_A(config-router)#neighbor 172.16.0.2 remote-as 100
Router_A(config-router)#neighbor 172.17.0.2 remote-as 100
●Router_Bの設定
Router_B(config)#router bgp 100
Router_B(config-router)#no synchronization
Router_B(config-router)#bgp cluster-id 1
Router_B(config-router)#neighbor 172.16.0.1 remote-as 100
Router_B(config-router)#neighbor 172.18.0.2 remote-as 100
Router_B(config-router)#neighbor 172.18.0.2 route-reflector-client
Router_B(config-router)#neighbor 172.20.0.2 remote-as 100
それでは、各ルータを設定していきます。各ルータの設定は、以下のようになります。
強制的にインターフェイスをUPさせるために、Router_AのE0インターフェイスで「no keepalive」コマンドを設定しておきます。
また、Router_D、Router_EのLoopback0では、以下のコマンドを入力して、OSPFでLoopbackインターフェイスに設定されたマスク長で経路を通知させるようにします。
Router_D(config-if)#ip ospf network point-to-point
Router_E(config-if)#ip ospf network point-to-point
●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 Ethernet0
ip address 172.19.0.1 255.255.0.0
!
interface Ethernet1
ip address 172.21.0.1 255.255.0.0
!
interface Serial0
ip address 172.17.0.1 255.255.0.0
!
interface Serial1
ip address 172.16.0.1 255.255.0.0
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
router bgp 100
no synchronization
bgp cluster-id 1
neighbor 172.16.0.2 remote-as 100
neighbor 172.17.0.2 remote-as 100
neighbor 172.17.0.2 route-reflector-client
neighbor 172.19.0.2 remote-as 100
neighbor 172.19.0.2 route-reflector-client
neighbor 172.21.0.2 remote-as 100
neighbor 172.21.0.2 route-reflector-client
!
ip classless
!
line con 0
line aux 0
line vty 0 4
password cisco
login
!
end
●Router_Bの設定
!
version 12.0
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Router_B
!
enable password cisco
!
ip subnet-zero
!
interface Ethernet0/0
ip address 172.20.0.1 255.255.0.0
!
interface Serial0/0
ip address 172.16.0.2 255.255.0.0
clockrate 64000
!
interface Ethernet0/1
ip address 172.22.0.1 255.255.0.0
!
interface Serial0/1
ip address 172.18.0.1 255.255.0.0
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
router bgp 100
no synchronization
bgp cluster-id 1
neighbor 172.16.0.1 remote-as 100
neighbor 172.18.0.2 remote-as 100
neighbor 172.18.0.2 route-reflector-client
neighbor 172.20.0.2 remote-as 100
neighbor 172.20.0.2 route-reflector-client
neighbor 172.22.0.2 remote-as 100
neighbor 172.22.0.2 route-reflector-client
!
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の設定
!
version 11.2
no service udp-small-servers
no service tcp-small-servers
!
hostname Router_C
!
enable password cisco
!
ip subnet-zero
!
interface Ethernet0
ip address 10.10.10.1 255.255.255.0
no keepalive
!
interface Serial0
ip address 172.17.0.2 255.255.0.0
clockrate 64000
!
interface Serial1
ip address 172.18.0.2 255.255.0.0
clockrate 64000
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
router bgp 100
no synchronization
network 10.10.10.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_Dの設定
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router_D
!
boot-start-marker
boot-end-marker
!
enable password cisco
!
no aaa new-model
memory-size iomem 25
!
ip cef
!
interface Loopback0
ip address 20.20.20.1 255.255.255.0
ip ospf network point-to-point
!
interface Ethernet0
ip address 172.19.0.2 255.255.0.0
half-duplex
!
interface FastEthernet0
ip address 172.20.0.2 255.255.0.0
speed auto
!
router ospf 1
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
router bgp 100
no synchronization
bgp log-neighbor-changes
network 20.20.20.0 mask 255.255.255.0
neighbor 172.19.0.1 remote-as 100
neighbor 172.20.0.1 remote-as 100
no auto-summary
!
ip forward-protocol nd
no ip http server
no ip http secure-server
!
control-plane
!
line con 0
exec-timeout 0 0
line aux 0
line vty 0 4
password cisco
login
!
end
●Router_Eの設定
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router_E
!
boot-start-marker
boot-end-marker
!
enable password cisco
!
no aaa new-model
memory-size iomem 25
!
ip cef
!
interface Loopback0
ip address 30.30.30.1 255.255.255.0
ip ospf network point-to-point
!
interface Ethernet0
ip address 172.21.0.2 255.255.0.0
half-duplex
!
interface FastEthernet0
ip address 172.22.0.2 255.255..0
speed auto
!
router ospf 1
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
router bgp 100
no synchronization
bgp log-neighbor-changes
network 30.30.30.0 mask 255.255.255.0
neighbor 172.21.0.1 remote-as 100
neighbor 172.22.0.1 remote-as 100
no auto-summary
!
ip forward-protocol nd
no ip http server
no ip http secure-server
!
control-plane
!
line con 0
exec-timeout 0 0
line aux 0
line vty 0 4
password cisco
login
!
end
これで、各ルータの設定は、完了しました。
それでは、2台のルートリフレクタが正しく機能しているかを確認していきます。
続きは、次の「BGP(複数のルートリフレクタの確認)」で、検証していきます。
