BGP(コミュニティの設定)
ここでは、コミュニティ属性に「no-export」を付随させ隣接BGPスピーカーへアドバタイズさせる方法を紹介していきます。
使用するネットワークは、「BGP(コンフェデレーションの設定)」で構築したネットワークを使用します。
まずは、下のネットワークをコンフェデレーションを使用して設定していきます。
ネットワーク構成は、以下のとおりです。
Router_Aでコミュニティ属性に「no-export」を付随させ、Router_Bへのアップデートに「no-export」属性を付随させた経路情報をアドバタイズさせます。
まずは、下準備が必要です。下のネットワークをコンフェデレーションで構築していきます。

各ルータの設定は、以下のようになります。
強制的にインターフェイスをUPさせるために、Router_A、Router_CのE0インターフェイスで「no keepalive」コマンドを設定しておきます。
●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 10.10.10.1 255.255.255.0
no keepalive
!
interface Serial0
ip address 172.19.0.2 255.255.0.0
clockrate 64000
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
router bgp 65000
no synchronization
network 10.10.10.0 mask 255.255.255.0
neighbor 172.19.0.1 remote-as 65000
no auto-summary
!
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.17.0.1 255.255.0.0
!
interface Serial0/0
ip address 172.19.0.1 255.255.0.0
!
interface Ethernet0/1
ip address 172.16.0.2 255.255.0.0
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
router bgp 65000
no synchronization
bgp confederation identifier 100
bgp confederation peers 65001
neighbor 172.16.0.1 remote-as 200
neighbor 172.16.0.1 next-hop-self
neighbor 172.17.0.2 remote-as 65001
neighbor 172.17.0.2 next-hop-self
neighbor 172.19.0.2 remote-as 65000
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
!
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 20.20.20.1 255.255.255.0
no keepalive
!
interface Serial0
ip address 172.20.0.2 255.255.0.0
clockrate 64000
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
router bgp 65001
no synchronization
network 20.20.20.0 mask 255.255.255.0
neighbor 172.20.0.1 remote-as 65001
no auto-summary
!
ip classless
!
line con 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 Ethernet0/0
ip address 172.17.0.2 255.255.0.0
!
interface Serial0/0
ip address 172.20.0.1 255.255.0.0
!
interface Ethernet0/1
ip address 172.18.0.2 255.255.0.0
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
router bgp 65001
no synchronization
bgp confederation identifier 100
bgp confederation peers 65000
neighbor 172.17.0.1 remote-as 65000
neighbor 172.17.0.1 next-hop-self
neighbor 172.18.0.1 remote-as 200
neighbor 172.18.0.1 next-hop-self
neighbor 172.20.0.2 remote-as 65001
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
!
end
●Router_Eの設定
!
version 11.2
no service udp-small-servers
no service tcp-small-servers
!
hostname Router_E
!
enable password cisco
!
ip subnet-zero
!
interface Loopback0
ip address 30.30.30.1 255.255.255.0
!
interface Ethernet0
ip address 172.16.0.1 255.255.0.0
!
interface Ethernet1
ip address 172.18.0.1 255.255.0.0
!
router bgp 200
no synchronization
network 30.30.30.0 mask 255.255.255.0
neighbor 172.16.0.2 remote-as 100
neighbor 172.18.0.2 remote-as 100
no auto-summary
!
ip classless
!
line con 0
line aux 0
line vty 0 4
password cisco
login
!
end
これで、下準備は整いました。
次の「BGP(コミュニティの確認)」では、コミュニティ属性を付随させて隣接BGPスピーカにアドバタイズさせます。
