BGP(帯域幅・bandwidthを設定する)

 ここでは、BGPにおいて帯域幅がベストバス選定においてどのように影響を与えるかを検証していきます。

 使用するネットワークは、「BGP(MED属性の設定 その1)」で使用したものをそのまま再利用します。

各ルータ間の帯域幅は以下のようになっています。

Router_A-Router_B間 ・・・ 64Kbps
Router_A-Router_C間 ・・・ 64Kbps
Router_B-Router_D間 ・・・ 10Mbps
Router_C-Router_D間 ・・・ 10Mbps

 「BGP(MED属性の設定 その1)」でも確認したように、各ルータにおける「10.10.10.0」「20.20.20.0」のベストパスは、以下のようになります。

Router_BiBGP経路より、eBGP経路の経路が優先されるため「172.16.0.1」を経由するパス
Router_CiBGP経路より、eBGP経路の経路が優先されるため「172.17.0.1」を経由するパス
Router_DBGPピアのルータIDが小さい方のパスが優先されるので、「172.16.0.1」を経由するパス

各ルータの設定は、以下のようになります。

●Router_Aの設定

!
version 12.0
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Router_A
!
enable password cisco
!
ip subnet-zero
!
interface Loopback0
 ip address 10.10.10.1 255.255.255.0
!
interface Loopback1
 ip address 20.20.20.1 255.255.255.0
!
interface Serial0/0
 bandwidth 64
 ip address 172.16.0.1 255.255.0.0
 clockrate 64000
!
interface Serial0/1
 bandwidth 64
 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
 network 20.20.20.0 mask 255.255.255.0
 neighbor 172.16.0.2 remote-as 200
 neighbor 172.17.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
!
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 Loopback0
 ip address 1.1.1.1 255.255.255.0
!
interface Ethernet0
 ip address 172.18.0.1 255.255.0.0
!
interface Serial0
 ip address 172.16.0.2 255.255.0.0
 bandwidth 64
!
router ospf 1
 passive-interface Serial0
 network 0.0.0.0 255.255.255.255 area 0
!
router bgp 200
 no synchronization
 neighbor 2.2.2.2 remote-as 200
 neighbor 2.2.2.2 update-source Loopback0
 neighbor 3.3.3.3 remote-as 200
 neighbor 3.3.3.3 update-source Loopback0
 neighbor 172.16.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_Cの設定

!
version 11.2
no service udp-small-servers
no service tcp-small-servers
!
hostname Router_C
!
enable password cisco
!
ip subnet-zero
!
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
!
interface Ethernet0
 ip address 172.19.0.1 255.255.0.0
!
interface Serial0
 ip address 172.17.0.2 255.255.0.0
 bandwidth 64
!
router ospf 1
 passive-interface Serial0
 network 0.0.0.0 255.255.255.255 area 0
!
router bgp 200
 no synchronization
 neighbor 1.1.1.1 remote-as 200
 neighbor 1.1.1.1 update-source Loopback0
 neighbor 3.3.3.3 remote-as 200
 neighbor 3.3.3.3 update-source Loopback0
 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_Dの設定

!
version 11.2
no service udp-small-servers
no service tcp-small-servers
!
hostname Router_D
!
enable password cisco
!
ip subnet-zero
!
interface Loopback0
 ip address 3.3.3.3 255.255.255.255
!
interface Ethernet0
 ip address 172.18.0.2 255.255.0.0
!
interface Ethernet1
 ip address 172.19.0.2 255.255.0.0
!
router ospf 1
 network 0.0.0.0 255.255.255.255 area 0
!
router bgp 200
 no synchronization
 neighbor 1.1.1.1 remote-as 200
 neighbor 1.1.1.1 update-source Loopback0
 neighbor 2.2.2.2 remote-as 200
 neighbor 2.2.2.2 update-source Loopback0
 no auto-summary
!
ip classless
!
line con 0
line aux 0
line vty 0 4
 password cisco
 login
!
end

ルータの設定が完了したら、以下のようになっているかを確認して見て下さい。

Router_BiBGP経路より、eBGP経路の経路が優先されるため「172.16.0.1」を経由するパス
Router_CiBGP経路より、eBGP経路の経路が優先されるため「172.17.0.1」を経由するパス
Router_DBGPピアのルータIDが小さい方のパスが優先されるので、「172.16.0.1」を経由するパス

確認が完了したら、

Router_A-Router_C間の帯域幅を 64Kbps → 800Mbps に変更します。

以下の設定をRouter_A、Router_Cで設定します。

Router_A(config)#interface serial 0/1
Router_A(config-if)#clock rate 800000
Router_A(config-if)#bandwidth 800

Router_A(config)#interface serial 0
Router_C(config-if)#bandwidth 800

Router_DのBGPテーブルを確認します。

●Router_BのBGPテーブル

Router_C#show ip bgp
BGP table version is 5, local router ID is 2.2.2.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
*> 10.10.10.0/24    172.17.0.1             0             0 100 i
* i                 172.16.0.1             0    100      0 100 i
*> 20.20.20.0/24    172.17.0.1             0             0 100 i
* i                 172.16.0.1             0    100      0 100 i

ベストパスが「172.16.0.1」から、「172.17.0.1」に変わっています。

帯域幅の大きいルートに切り替わりました。