概要

複数のASでBGPによるルーティングを行う演習です。Part1では、BGPの基本的な設定によりトランジットASを構築して、AS間で通信できるようにします。トランジットASの構築には、ルートリフレクタとコンフェデレーションを組み合わせます。

Part1:BGP基本設定
Part2:ルート集約
Part3:ポリシーベースルーティング
Part4:トラブルシューティング

ネットワーク構成

図 [演習]BGP応用 論理構成
図 [演習]BGP応用 論理構成

 図 [演習]BGP応用 AS構成
図 [演習]BGP応用 AS構成

機器AS内のネットワークアドレス
R11 Lo1110.1.1.0/24
R12 Lo1110.1.2.0/24
R13 Lo1110.1.3.0/24
R14 Lo1110.1.4.0/24
R15 Lo1110.1.5.0/24
R16 Lo1110.1.6.0/24
R21 Lo1120.1.1.0/24
R22 Lo1120.1.2.0/24
R23 Lo1120.1.3.0/24
R31 Lo1130.1.1.0/24 130.1.2.0/24 130.1.3.0/24
R41 Lo1140.1.1.0/24 140.1.2.0/24 140.1.3.0/24
R51 Lo1150.1.1.0/24 150.1.2.0/24 150.1.3.0/24
表 AS内のネットワークアドレス

設定条件

Part1:BGP基本設定 → このページで設定

  1. R11/R13/R15でAS65100を構成します。また、R12/R14/R16でAS65200を構成します。AS65100、AS65200は他のASから見るとAS110として動作します。R11~R16の間のBGPネイバーはすべてLoopback0のIPアドレスを利用して確立します。AS65100とAS65200間はR13とR14でネイバーを確立します。
  2. R11/R15、R12/R16ではIBGPネイバーの設定を1つだけしか行なってはいけません。
  3. R21/R22/R23でAS120を構成します。AS120内のBGPネイバーはすべてLoopback0のIPアドレスを利用して確立します。
  4. R31でAS130を構成します。R41でAS140を構成します。R51でAS150を構成します。
  5. AS間は、直接接続のIPアドレスを利用してEBGPネイバーを確立します。EBGPネイバーはすべてネイバー認証を行います。ネイバー認証のパスワードは「cisco」とします。
  6. AS110内のネットワークアドレス 110.1.1.0/24~110.1.6.0/24をR11~R16のそれぞれのルータでnetworkコマンドを利用してBGPルートとして生成します。同様にAS130、AS140、AS150においてもAS内のネットワークアドレスをnetworkコマンドによってBGPルートとして生成します。
  7. R21とR22でAS120内のネットワークアドレスをBGPルートとして生成します。ただし、networkコマンドを利用してはいけません。パスアトリビュートはnetworkコマンドを利用した場合と同等にします。

Part2:ルート集約

  1. AS110内のBGPルートを可能なかぎり長いサブネットマスクで集約します。集約ルートとともに第3オクテットが偶数である集約前のBGPルートもアドバタイズします。
  2. AS120内のBGPルートを可能な限り長いサブネットマスクで集約します。ネイバーには集約ルートのみをアドバタイズします。
  3. AS130内のBGPルートを可能な限り長いサブネットマスクで集約します。ネイバーには集約ルートのみをアドバタイズします。また、集約ルートにはCOMMUNITYアトリビュート「130:1」を付加します。
  4. AS140内のBGPルートを可能な限り長いサブネットマスクで集約します。R51にだけ集約ルートとともに140.1.2.0/24のBGPルートもアドバタイズします。
  5. AS150内のBGPルートをR31/R41で集約します。集約ルートのAS_PATHアトリビュートにAS150の情報が含まれるようにします。

Part3:ポリシーベースルーティング

  1. AS150の先にAS151およびAS152が接続されているようにAS構成をエミュレートします。AS151には、151.1.1.0/24が含まれています。AS152には、152.1.1.0/24が含まれています。これらのルートはR51でLoopback2インタフェースを利用するものとします。
  2. AS110からAS151へパケットをルーティングするときにはR15を経由するようにします。また、AS110からAS152へパケットをルーティングするときにはR16を経由するようにします。
  3. AS110の集約前のルートは、AS150にアドバタイズされないようにします。ただし、このための設定はAS110のルータでのみ行います。
  4. AS120にパケットをルーティングするときにはR21を経由するようにします。このための設定はAS120のルータでのみ行います。

初期設定

以下の内容は設定済みです。

  • ホスト名
  • IPアドレス
  • AS内のルーティング
    • OSPFエリア0

R11 Initical Configuration(Click)

!
!
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R11
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 192.168.0.11 255.255.255.255
!
interface Loopback1
 ip address 110.1.1.1 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/0
 ip address 1.1.1.11 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 192.168.1.11 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet2/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
!
router ospf 1
 router-id 11.11.11.11
 log-adjacency-changes
 network 110.1.0.0 0.0.255.255 area 0
 network 192.168.0.0 0.0.255.255 area 0
!
ip http server
ip forward-protocol nd
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
line aux 0
line vty 0 4
 login
!
!
end

R12 Initical Configuration(Click)

!
!
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R12
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 192.168.0.12 255.255.255.255
!
interface Loopback1
 ip address 110.1.2.1 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/0
 ip address 1.1.2.12 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 192.168.1.12 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet2/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
!
router ospf 1
 router-id 12.12.12.12
 log-adjacency-changes
 network 110.1.0.0 0.0.255.255 area 0
 network 192.168.0.0 0.0.255.255 area 0
!
ip http server
ip forward-protocol nd
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
line aux 0
line vty 0 4
 login
!
!
end

R13 Initical Configuration(Click)

!
!
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R13
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 192.168.0.13 255.255.255.255
!
interface Loopback1
 ip address 110.1.3.1 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/0
 ip address 192.168.1.13 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 192.168.2.13 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet2/0
 ip address 192.168.3.13 255.255.255.0
 duplex auto
 speed auto
!
!
router ospf 1
 router-id 13.13.13.13
 log-adjacency-changes
 network 110.1.0.0 0.0.255.255 area 0
 network 192.168.0.0 0.0.255.255 area 0
!
ip http server
ip forward-protocol nd
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
line aux 0
line vty 0 4
 login
!
!
end

R14 Initical Configuration(Click)

!
!
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R14
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 192.168.0.14 255.255.255.255
!
interface Loopback1
 ip address 110.1.4.1 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/0
 ip address 192.168.1.14 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 192.168.2.14 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet2/0
 ip address 192.168.3.14 255.255.255.0
 duplex auto
 speed auto
!
!
router ospf 1
 router-id 14.14.14.14
 log-adjacency-changes
 network 110.1.0.0 0.0.255.255 area 0
 network 192.168.0.0 0.0.255.255 area 0
!
ip http server
ip forward-protocol nd
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
line aux 0
line vty 0 4
 login
!
!
end

R15 Initical Configuration(Click)

!
!
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R15
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 192.168.0.15 255.255.255.255
!
interface Loopback1
 ip address 110.1.5.1 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/0
 ip address 1.1.3.15 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 192.168.2.15 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet2/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
!
router ospf 1
 router-id 15.15.15.15
 log-adjacency-changes
 network 110.1.0.0 0.0.255.255 area 0
 network 192.168.0.0 0.0.255.255 area 0
!
ip http server
ip forward-protocol nd
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
line aux 0
line vty 0 4
 login
!
!
end

R16 Initical Configuration(Click)

!
!
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R16
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 192.168.0.16 255.255.255.255
!
interface Loopback1
 ip address 110.1.6.1 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/0
 ip address 1.1.4.16 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 192.168.2.16 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet2/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
!
router ospf 1
 router-id 16.16.16.16
 log-adjacency-changes
 network 110.1.0.0 0.0.255.255 area 0
 network 192.168.0.0 0.0.255.255 area 0
!
ip http server
ip forward-protocol nd
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
line aux 0
line vty 0 4
 login
!
!
end

R21 Initical Configuration(Click)

!
!
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R21
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 172.16.0.21 255.255.255.255
!
interface Loopback1
 ip address 120.1.1.1 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/0
 ip address 1.1.1.21 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 172.16.1.21 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet2/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
!
router ospf 1
 router-id 21.21.21.21
 log-adjacency-changes
 network 120.1.0.0 0.0.255.255 area 0
 network 172.16.0.0 0.0.255.255 area 0
!
ip http server
ip forward-protocol nd
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
line aux 0
line vty 0 4
 login
!
!
end

R22 Initical Configuration(Click)

!
!
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R22
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 172.16.0.22 255.255.255.255
!
interface Loopback1
 ip address 120.1.2.1 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/0
 ip address 1.1.2.22 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 172.16.2.22 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet2/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
!
router ospf 1
 router-id 22.22.22.22
 log-adjacency-changes
 network 120.1.0.0 0.0.255.255 area 0
 network 172.16.0.0 0.0.255.255 area 0
!
ip http server
ip forward-protocol nd
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
line aux 0
line vty 0 4
 login
!
!
end

R23 Initical Configuration(Click)

!
!
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R23
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 172.16.0.23 255.255.255.255
!
interface Loopback1
 ip address 120.1.3.1 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/0
 ip address 172.16.1.23 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 172.16.2.23 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet2/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
!
router ospf 1
 router-id 23.23.23.23
 log-adjacency-changes
 network 120.1.0.0 0.0.255.255 area 0
 network 172.16.0.0 0.0.255.255 area 0
!
ip http server
ip forward-protocol nd
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
line aux 0
line vty 0 4
 login
!
!
end

R31 Initical Configuration(Click)

!
!
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R31
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback1
 ip address 130.1.3.1 255.255.255.0 secondary
 ip address 130.1.2.1 255.255.255.0 secondary
 ip address 130.1.1.1 255.255.255.0
!
interface FastEthernet0/0
 ip address 1.1.3.31 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 1.1.5.31 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet2/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
!
ip http server
ip forward-protocol nd
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
line aux 0
line vty 0 4
 login
!
!
end

R41 Initical Configuration(Click)

!
!
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R41
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback1
 ip address 140.1.3.1 255.255.255.0 secondary
 ip address 140.1.2.1 255.255.255.0 secondary
 ip address 140.1.1.1 255.255.255.0
!
interface FastEthernet0/0
 ip address 1.1.4.41 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 1.1.6.41 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet2/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
!
ip http server
ip forward-protocol nd
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
line aux 0
line vty 0 4
 login
!
!
end

R51 Initical Configuration(Click)

!
!
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R51
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback1
 ip address 150.1.2.1 255.255.255.0 secondary
 ip address 150.1.3.1 255.255.255.0 secondary
 ip address 150.1.1.1 255.255.255.0
!
interface FastEthernet0/0
 ip address 1.1.5.51 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 1.1.6.51 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet2/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
!
ip http server
ip forward-protocol nd
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
line aux 0
line vty 0 4
 login
!
!
end

設定と確認 Part1:BGP基本設定

Step1:ルートリフレクタの設定

AS65100のR11/R15では、IBGPネイバーを1つだけしか設定できないため、AS65100内でフルメッシュのIBGPネイバーの設定ができません。そのため、R13をルートリフレクタとして設定します。同様に、AS65200ではR14をルートリフレクタとして設定します。

R11 IBGPネイバー

router bgp 65100
 neighbor 192.168.0.13 remote-as 65100
 neighbor 192.168.0.13 update-source loopback0
 neighbor 192.168.0.13 next-hop-self

R13 IBGPネイバー ルートリフレクタ

router bgp 65100
 neighbor 192.168.0.11 remote-as 65100
 neighbor 192.168.0.11 update-source loopback0
 neighbor 192.168.0.11 route-reflector-client
 neighbor 192.168.0.15 remote-as 65100
 neighbor 192.168.0.15 update-source loopback0
 neighbor 192.168.0.15 route-reflector-client 

R15 IBGPネイバー

router bgp 65100
 neighbor 192.168.0.13 remote-as 65100
 neighbor 192.168.0.13 update-source loopback0
 neighbor 192.168.0.13 next-hop-self

R12 IBGPネイバー

router bgp 65200
 neighbor 192.168.0.14 remote-as 65200
 neighbor 192.168.0.14 update-source loopback0
 neighbor 192.168.0.14 next-hop-self

R14 IBGPネイバー ルートリフレクタ

router bgp 65200
 neighbor 192.168.0.12 remote-as 65200
 neighbor 192.168.0.12 update-source loopback0
 neighbor 192.168.0.12 route-reflector-client
 neighbor 192.168.0.16 remote-as 65200
 neighbor 192.168.0.16 update-source loopback0
 neighbor 192.168.0.16 route-reflector-client 

R16 IBGPネイバー

router bgp 65200
 neighbor 192.168.0.14 remote-as 65200
 neighbor 192.168.0.14 update-source loopback0
 neighbor 192.168.0.14 next-hop-self

Step2:ルートリフレクタの確認

R13およびR14がルートリフレクタとして、IBGPネイバーを確立していることを確認します。そのために、次のshowコマンドを実行します。

  • show ip bgp summary
  • show ip bgp neighbor

R13では、次のような表示です。

R13 IBGPネイバーの確認

R13#show ip bgp summary 
BGP router identifier 192.168.0.13, local AS number 65100
BGP table version is 1, main routing table version 1

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.0.11    4 65100       6       6        1    0    0 00:03:48        0
192.168.0.15    4 65100       6       6        1    0    0 00:03:26        0
R13#show ip bgp neighbors 
BGP neighbor is 192.168.0.11,  remote AS 65100, internal link
  BGP version 4, remote router ID 192.168.0.11
  BGP state = Established, up for 00:03:50
  Last read 00:00:50, last write 00:00:50, hold time is 180, keepalive interval is 60 seconds
-- omitted --

 For address family: IPv4 Unicast
  BGP table version 1, neighbor version 1/0
 Output queue size : 0
  Index 1, Offset 0, Mask 0x2
  Route-Reflector Client
  1 update-group member
-- omitted --
          
BGP neighbor is 192.168.0.15,  remote AS 65100, internal link
  BGP version 4, remote router ID 192.168.0.15
  BGP state = Established, up for 00:03:30
  Last read 00:00:30, last write 00:00:30, hold time is 180, keepalive interval is 60 seconds
-- omitted --

 For address family: IPv4 Unicast
  BGP table version 1, neighbor version 1/0
 Output queue size : 0
  Index 1, Offset 0, Mask 0x2
  Route-Reflector Client
  1 update-group member
-- omitted --

図 ルートリフレクタ
図 ルートリフレクタ

Step3:コンフェデレーションの設定

AS65100、AS65200は他のASから見るとAS110として動作させるためにコンフェデレーションの設定を行います。R13とR14間のBGPネイバーの設定では、neighbor ebgp-multihopコマンドが必要になるので注意してください。

R11/R15 コンフェデレーションの設定

router bgp 65100
 bgp confederation identifier 110

R13 コンフェデレーションの設定

router bgp 65100
 bgp confederation identifier 110
 bgp confederation peers 65200
 neighbor 192.168.0.14 remote-as 65200
 neighbor 192.168.0.14 update-source loopback0
 neighbor 192.168.0.14 ebgp-multihop

R12/R16 コンフェデレーションの設定

router bgp 65200
 bgp confederation identifier 110

R14 コンフェデレーションの設定

router bgp 65200
 bgp confederation identifier 110
 bgp confederation peers 65100
 neighbor 192.168.0.13 remote-as 65100
 neighbor 192.168.0.13 update-source loopback0
 neighbor 192.168.0.13 ebgp-multihop

Step4:コンフェデレーションの確認

show ip protocolsコマンドによってコンフェデレーションの設定を確認します。R13では、次のような表示になります。

R13 show ip protocols

R13#show ip protocols 
Routing Protocol is "ospf 1"
-- omitted --

Routing Protocol is "bgp 65100"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  BGP confederation consists of ASs: 65200
          
  BGP confederation advertised as AS 110
  Route Reflector for address family IPv4 Unicast, 2 clients
  Route Reflector for address family IPv6 Unicast, 2 clients
  Route Reflector for address family VPNv4 Unicast, 2 clients
  Route Reflector for address family IPv4 Multicast, 2 clients
  Route Reflector for address family IPv6 Multicast, 2 clients
  IGP synchronization is disabled
  Automatic route summarization is disabled
  Neighbor(s):
    Address          FiltIn FiltOut DistIn DistOut Weight RouteMap
    192.168.0.11                                         
    192.168.0.14                                         
    192.168.0.15                                         
  Maximum path: 1
  Routing Information Sources:
    Gateway         Distance      Last Update
  Distance: external 20 internal 200 local 200

図 コンフェデレーション
図 コンフェデレーション

Step5:AS110内のBGPルート生成

R11~R16でnetworkコマンドによって、Loopback1のネットワークアドレスをBGPルートとして生成します。

R11 BGPルート生成

router bgp 65100
 network 110.1.1.0 mask 255.255.255.0

R12 BGPルート生成

router bgp 65200
 network 110.1.2.0 mask 255.255.255.0

R13 BGPルート生成

router bgp 65100
 network 110.1.3.0 mask 255.255.255.0

R14 BGPルート生成

router bgp 65200
 network 110.1.4.0 mask 255.255.255.0

R15 BGPルート生成

router bgp 65100
 network 110.1.5.0 mask 255.255.255.0

R16 BGPルート生成

router bgp 65200
 network 110.1.6.0 mask 255.255.255.0

Step6:AS110内のBGPルート生成の確認

show ip bgpコマンドでBGPテーブルを表示し、AS110内で正しくBGPルートが生成されていることを確認します。R11では、次のような表示です。

R11 show ip bgp

R11#show ip bgp 
BGP table version is 12, local router ID is 192.168.0.11
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 110.1.1.0/24     0.0.0.0                  0         32768 i
r>i110.1.2.0/24     192.168.0.12             0    100      0 (65200) i
r>i110.1.3.0/24     192.168.0.13             0    100      0 i
r>i110.1.4.0/24     192.168.0.14             0    100      0 (65200) i
r>i110.1.5.0/24     192.168.0.15             0    100      0 i
r>i110.1.6.0/24     192.168.0.16             0    100      0 (65200) i

コンフェデレーションを構成しているので、AS65200のBGPルートのAS_PATHアトリビュートは(65200)となっていることがわかります。また、「r」はBGPルートとしてのベストパスですが、ルーティングテーブルには登録されていないルートに対して付加されています。

Step7:AS120内のBGPネイバーの設定

AS120内のIBGPネイバーの設定を行います。R21~R23でフルメッシュのIBGPネイバーの設定を行います。

R21 IBGPネイバー

router bgp 120
 neighbor 172.16.0.22 remote-as 120
 neighbor 172.16.0.22 update-source loopback0
 neighbor 172.16.0.22 next-hop-self
 neighbor 172.16.0.23 remote-as 120
 neighbor 172.16.0.23 update-source loopback0
 neighbor 172.16.0.23 next-hop-self

R22 IBGPネイバー

router bgp 120
 neighbor 172.16.0.21 remote-as 120
 neighbor 172.16.0.21 update-source loopback0
 neighbor 172.16.0.21 next-hop-self
 neighbor 172.16.0.23 remote-as 120
 neighbor 172.16.0.23 update-source loopback0
 neighbor 172.16.0.23 next-hop-self

R23 IBGPネイバー

router bgp 120
 neighbor 172.16.0.21 remote-as 120
 neighbor 172.16.0.21 update-source loopback0
 neighbor 172.16.0.22 remote-as 120
 neighbor 172.16.0.22 update-source loopback0

Step8:AS120内のBGPネイバーの確認

AS120内のBGPネイバーを確認するために、show ip bgp summaryコマンドを利用します。R23では、次のような表示になります。

R23 show ip bgp summary

R23#show ip bgp summary 
BGP router identifier 172.16.0.23, local AS number 120
BGP table version is 1, main routing table version 1

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
172.16.0.21     4   120      18      18        1    0    0 00:14:31        0
172.16.0.22     4   120      18      18        1    0    0 00:14:29        0
図 AS120内のBGPネイバー
図 AS120内のBGPネイバー

Step9:AS120内のBGPルート生成

R21/R22でAS120内の120.1.1.0/24~120.1.3.0/24のBGPルートを生成します。networkコマンドを利用してはいけないので、OSPFからBGPへ再配送します。その際、OriginアトリビュートをIncompleteからIGPへ変更して、networkコマンドで生成した場合と同等にします。

R21/R22 BGPルート生成 redistribute

router bgp 120
 redistribute ospf 1 route-map AS120
!
access-list 1 permit 120.1.0.0 0.0.255.255
!
route-map AS120 permit 10
 match ip address 1
 set origin igp

Step10:AS120内のBGPルート生成の確認

show ip bgpコマンドでBGPテーブルを表示し、AS120内で正しくBGPルートが生成されていることを確認します。R23では、次のような表示です。

R23 show ip bgp

R23#show ip bgp 
BGP table version is 7, local router ID is 172.16.0.23
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
r i120.1.1.0/24     172.16.0.22              3    100      0 i
r>i                 172.16.0.21              0    100      0 i
r i120.1.2.0/24     172.16.0.21              3    100      0 i
r>i                 172.16.0.22              0    100      0 i
r i120.1.3.0/24     172.16.0.22              2    100      0 i
r>i                 172.16.0.21              2    100      0 i

R23では、R21およびR22からそれぞれ3つのBGPルート 120.1.1.0/24~120.1.3.0/24を受信していることがわかります。

Step11:EBGPネイバーの設定

各AS間のEBGPネイバーの設定を行います。EBGPネイバーのIPアドレスは直接接続のものを利用します。また、EBGPネイバーではネイバー認証の設定も行います。

R11 EBGPネイバー

router bgp 65100
 neighbor 1.1.1.21 remote-as 120
 neighbor 1.1.1.21 password cisco

R12 EBGPネイバー

router bgp 65200
 neighbor 1.1.2.22 remote-as 120
 neighbor 1.1.2.22 password cisco

R15 EBGPネイバー

router bgp 65100
 neighbor 1.1.3.31 remote-as 130
 neighbor 1.1.3.31 password cisco

R16 EBGPネイバー

router bgp 65200
 neighbor 1.1.4.41 remote-as 140
 neighbor 1.1.4.41 password cisco

R21 EBGPネイバー

router bgp 120
 neighbor 1.1.1.11 remote-as 110
 neighbor 1.1.1.11 password cisco

R22 EBGPネイバー

router bgp 120
 neighbor 1.1.2.12 remote-as 110
 neighbor 1.1.2.12 password cisco

R31 EBGPネイバー

router bgp 130
 neighbor 1.1.3.15 remote-as 110
 neighbor 1.1.3.15 password cisco
 neighbor 1.1.5.51 remote-as 150
 neighbor 1.1.5.51 password cisco

R41 EBGPネイバー

router bgp 140
 neighbor 1.1.4.16 remote-as 110
 neighbor 1.1.4.16 password cisco
 neighbor 1.1.6.51 remote-as 150
 neighbor 1.1.6.51 password cisco

R51 EBGPネイバー

router bgp 150
 neighbor 1.1.5.31 remote-as 130
 neighbor 1.1.5.31 password cisco
 neighbor 1.1.6.41 remote-as 140
 neighbor 1.1.6.41 password cisco

Step12:EBGPネイバーの確認

EBGPネイバーを確認するために、show ip bgp summaryコマンドを利用します。R11/R15/R51では、次のような表示になります。

R11 show ip bgp summary

R11#show ip bgp summary 
BGP router identifier 192.168.0.11, local AS number 65100
-- omitted --

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
1.1.1.21        4   120      17      19       17    0    0 00:08:12        3
192.168.0.13    4 65100     208     201       17    0    0 03:14:37        6

R15 show ip bgp summary

R15#show ip bgp summary 
BGP router identifier 192.168.0.15, local AS number 65100
-- omitted --

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
1.1.3.31        4   130      15      20       17    0    0 00:08:41        0
192.168.0.13    4 65100     208     199       17    0    0 03:14:39        8

R51 show ip bgp summary

R51#show ip bgp summary 
BGP router identifier 150.1.1.1, local AS number 150
-- omitted --

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
1.1.5.31        4   130      14      13       10    0    0 00:07:35        9
1.1.6.41        4   140      15      12       10    0    0 00:07:52        9

ここまでのBGPネイバーの設定をすべてまとめたものが次の図です。

図 BGPネイバーのまとめ
図 BGPネイバーのまとめ

Step13:AS130/AS140/AS150内のBGPルート生成

R31/R41/R51でnetworkコマンドによって、Loopback1のネットワークアドレスをBGPルートとして生成します。

R31 BGPルート生成

router bgp 130
 network 130.1.1.0 mask 255.255.255.0
 network 130.1.2.0 mask 255.255.255.0
 network 130.1.3.0 mask 255.255.255.0

R41 BGPルート生成

router bgp 140
 network 140.1.1.0 mask 255.255.255.0
 network 140.1.2.0 mask 255.255.255.0
 network 140.1.3.0 mask 255.255.255.0

R51 BGPルート生成

router bgp 150
 network 150.1.1.0 mask 255.255.255.0
 network 150.1.2.0 mask 255.255.255.0
 network 150.1.3.0 mask 255.255.255.0

Step14:AS内のBGPルート生成の確認

show ip bgpコマンドによって、AS110~AS150で生成されたBGPルートを確認します。show ip bgpコマンドに正規表現のオプションを付加して、各ASで生成されているBGPルートのみを確認します。R51では、次のような表示になります。

R51 show ip bgp

R51#show ip bgp regexp _110$
BGP table version is 19, local router ID is 150.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*  110.1.1.0/24     1.1.6.41                               0 140 110 i
*>                  1.1.5.31                               0 130 110 i
*  110.1.2.0/24     1.1.6.41                               0 140 110 i
*>                  1.1.5.31                               0 130 110 i
*  110.1.3.0/24     1.1.6.41                               0 140 110 i
*>                  1.1.5.31                               0 130 110 i
*  110.1.4.0/24     1.1.6.41                               0 140 110 i
*>                  1.1.5.31                               0 130 110 i
*  110.1.5.0/24     1.1.6.41                               0 140 110 i
*>                  1.1.5.31                               0 130 110 i
*  110.1.6.0/24     1.1.6.41                               0 140 110 i
*>                  1.1.5.31                               0 130 110 i
R51#show ip bgp regexp _120$
BGP table version is 19, local router ID is 150.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*  120.1.1.0/24     1.1.6.41                               0 140 110 120 i
*>                  1.1.5.31                               0 130 110 120 i
*  120.1.2.0/24     1.1.6.41                               0 140 110 120 i
*>                  1.1.5.31                               0 130 110 120 i
*  120.1.3.0/24     1.1.6.41                               0 140 110 120 i
*>                  1.1.5.31                               0 130 110 120 i
R51#show ip bgp regexp _130$
BGP table version is 19, local router ID is 150.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 130.1.1.0/24     1.1.5.31                 0             0 130 i
*> 130.1.2.0/24     1.1.5.31                 0             0 130 i
*> 130.1.3.0/24     1.1.5.31                 0             0 130 i
R51#show ip bgp regexp _140$
BGP table version is 19, local router ID is 150.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 140.1.1.0/24     1.1.6.41                 0             0 140 i
*> 140.1.2.0/24     1.1.6.41                 0             0 140 i
*> 140.1.3.0/24     1.1.6.41                 0             0 140 i
R51#show ip bgp regexp ^$
BGP table version is 19, local router ID is 150.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 150.1.1.0/24     0.0.0.0                  0         32768 i
*> 150.1.2.0/24     0.0.0.0                  0         32768 i
*> 150.1.3.0/24     0.0.0.0                  0         32768 i

Step15:通信確認

ここまでの設定が正常に完了していれば、各ASのBGPでアドバタイズしたネットワーク(プレフィクス)間の通信ができます。AS51(R51)から他のASのネットワークへの通信を確認します。

R51のルーティングテーブルには、他のASのルートがBGPルートとして登録されています。

R51 show ip route bgp

R51#show ip route bgp
     140.1.0.0/24 is subnetted, 3 subnets
B       140.1.1.0 [20/0] via 1.1.6.41, 00:01:32
B       140.1.3.0 [20/0] via 1.1.6.41, 00:01:32
B       140.1.2.0 [20/0] via 1.1.6.41, 00:01:32
     110.0.0.0/24 is subnetted, 6 subnets
B       110.1.6.0 [20/0] via 1.1.6.41, 00:00:34
B       110.1.5.0 [20/0] via 1.1.5.31, 00:00:43
B       110.1.4.0 [20/0] via 1.1.5.31, 00:00:11
B       110.1.3.0 [20/0] via 1.1.5.31, 00:00:11
B       110.1.2.0 [20/0] via 1.1.5.31, 00:00:11
B       110.1.1.0 [20/0] via 1.1.5.31, 00:00:11
     130.1.0.0/24 is subnetted, 3 subnets
B       130.1.3.0 [20/0] via 1.1.5.31, 00:01:39
B       130.1.2.0 [20/0] via 1.1.5.31, 00:01:39
B       130.1.1.0 [20/0] via 1.1.5.31, 00:01:39
     120.0.0.0/24 is subnetted, 3 subnets
B       120.1.1.0 [20/0] via 1.1.5.31, 00:00:11
B       120.1.3.0 [20/0] via 1.1.5.31, 00:00:11
B       120.1.2.0 [20/0] via 1.1.5.31, 00:00:11

そして、R51から他のASのネットワークへPingを実行します。すると、正常に応答が返ってくることがわかります。Pingを実行するときに送信元IPアドレスに気をつけてください。Pingの送信元IPアドレスは、BGPでアドバタイズしているネットワークのIPアドレスにしなければいけません。

R51 ping

R51#ping 110.1.1.1 source 150.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 110.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 150.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 84/106/116 ms
R51#ping 120.1.1.1 source 150.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 120.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 150.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 136/149/168 ms
R51#ping 130.1.1.1 source 150.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 130.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 150.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/56/56 ms
R51#ping 140.1.1.1 source 150.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 140.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 150.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/56/56 ms

Part1完了の設定ファイル

R11 Completed Configuration(Click)

!

!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R11
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 192.168.0.11 255.255.255.255
!
interface Loopback1
 ip address 110.1.1.1 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/0
 ip address 1.1.1.11 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 192.168.1.11 255.255.255.0
 duplex auto
 speed auto
!
!
router ospf 1
 router-id 11.11.11.11
 log-adjacency-changes
 network 110.1.0.0 0.0.255.255 area 0
 network 192.168.0.0 0.0.255.255 area 0
!
router bgp 65100
 no synchronization
 bgp log-neighbor-changes
 bgp confederation identifier 110
 network 110.1.1.0 mask 255.255.255.0
 neighbor 1.1.1.21 remote-as 120
 neighbor 1.1.1.21 password cisco
 neighbor 192.168.0.13 remote-as 65100
 neighbor 192.168.0.13 update-source Loopback0
 neighbor 192.168.0.13 next-hop-self
 no auto-summary
!
ip http server
ip forward-protocol nd
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
line aux 0
line vty 0 4
 login
!
!
end

R12 Completed Configuration(Click)

!

!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R12
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 192.168.0.12 255.255.255.255
!
interface Loopback1
 ip address 110.1.2.1 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/0
 ip address 1.1.2.12 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 192.168.1.12 255.255.255.0
 duplex auto
 speed auto
!
!
router ospf 1
 router-id 12.12.12.12
 log-adjacency-changes
 network 110.1.0.0 0.0.255.255 area 0
 network 192.168.0.0 0.0.255.255 area 0
!
router bgp 65200
 no synchronization
 bgp log-neighbor-changes
 bgp confederation identifier 110
 network 110.1.2.0 mask 255.255.255.0
 neighbor 1.1.2.22 remote-as 120
 neighbor 1.1.2.22 password cisco
 neighbor 192.168.0.14 remote-as 65200
 neighbor 192.168.0.14 update-source Loopback0
 neighbor 192.168.0.14 next-hop-self
 no auto-summary
!
ip http server
ip forward-protocol nd
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
line aux 0
line vty 0 4
 login
!
!
end

R13 Completed Configuration(Click)

!

!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R13
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 192.168.0.13 255.255.255.255
!
interface Loopback1
 ip address 110.1.3.1 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/0
 ip address 192.168.1.13 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 192.168.2.13 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet2/0
 ip address 192.168.3.13 255.255.255.0
 duplex auto
 speed auto
!
!
router ospf 1
 router-id 13.13.13.13
 log-adjacency-changes
 network 110.1.0.0 0.0.255.255 area 0
 network 192.168.0.0 0.0.255.255 area 0
!
router bgp 65100
 no synchronization
 bgp log-neighbor-changes
 bgp confederation identifier 110
 bgp confederation peers 65200 
 network 110.1.3.0 mask 255.255.255.0
 neighbor 192.168.0.11 remote-as 65100
 neighbor 192.168.0.11 update-source Loopback0
 neighbor 192.168.0.11 route-reflector-client
 neighbor 192.168.0.14 remote-as 65200
 neighbor 192.168.0.14 ebgp-multihop 255
 neighbor 192.168.0.14 update-source Loopback0
 neighbor 192.168.0.15 remote-as 65100
 neighbor 192.168.0.15 update-source Loopback0
 neighbor 192.168.0.15 route-reflector-client
 no auto-summary
!
ip http server
ip forward-protocol nd
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
line aux 0
line vty 0 4
 login
!
!
end

R14 Completed Configuration(Click)

!

!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R14
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 192.168.0.14 255.255.255.255
!
interface Loopback1
 ip address 110.1.4.1 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/0
 ip address 192.168.1.14 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 192.168.2.14 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet2/0
 ip address 192.168.3.14 255.255.255.0
 duplex auto
 speed auto
!
!
router ospf 1
 router-id 14.14.14.14
 log-adjacency-changes
 network 110.1.0.0 0.0.255.255 area 0
 network 192.168.0.0 0.0.255.255 area 0
!
router bgp 65200
 no synchronization
 bgp log-neighbor-changes
 bgp confederation identifier 110
 bgp confederation peers 65100 
 network 110.1.4.0 mask 255.255.255.0
 neighbor 192.168.0.12 remote-as 65200
 neighbor 192.168.0.12 update-source Loopback0
 neighbor 192.168.0.12 route-reflector-client
 neighbor 192.168.0.13 remote-as 65100
 neighbor 192.168.0.13 ebgp-multihop 255
 neighbor 192.168.0.13 update-source Loopback0
 neighbor 192.168.0.16 remote-as 65200
 neighbor 192.168.0.16 update-source Loopback0
 neighbor 192.168.0.16 route-reflector-client
 no auto-summary
!
ip http server
ip forward-protocol nd
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
line aux 0
line vty 0 4
 login
!
!
end

R15 Completed Configuration(Click)

!

!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R15
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 192.168.0.15 255.255.255.255
!
interface Loopback1
 ip address 110.1.5.1 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/0
 ip address 1.1.3.15 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 192.168.2.15 255.255.255.0
 duplex auto
 speed auto
!
!
router ospf 1
 router-id 15.15.15.15
 log-adjacency-changes
 network 110.1.0.0 0.0.255.255 area 0
 network 192.168.0.0 0.0.255.255 area 0
!
router bgp 65100
 no synchronization
 bgp log-neighbor-changes
 bgp confederation identifier 110
 network 110.1.5.0 mask 255.255.255.0
 neighbor 1.1.3.31 remote-as 130
 neighbor 1.1.3.31 password cisco
 neighbor 192.168.0.13 remote-as 65100
 neighbor 192.168.0.13 update-source Loopback0
 neighbor 192.168.0.13 next-hop-self
 no auto-summary
!
ip http server
ip forward-protocol nd
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
line aux 0
line vty 0 4
 login
!
!
end

R16 Completed Configuration(Click)

!

!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R16
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 192.168.0.16 255.255.255.255
!
interface Loopback1
 ip address 110.1.6.1 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/0
 ip address 1.1.4.16 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 192.168.2.16 255.255.255.0
 duplex auto
 speed auto
!
!
router ospf 1
 router-id 16.16.16.16
 log-adjacency-changes
 network 110.1.0.0 0.0.255.255 area 0
 network 192.168.0.0 0.0.255.255 area 0
!
router bgp 65200
 no synchronization
 bgp log-neighbor-changes
 bgp confederation identifier 110
 network 110.1.6.0 mask 255.255.255.0
 neighbor 1.1.4.41 remote-as 140
 neighbor 1.1.4.41 password cisco
 neighbor 192.168.0.14 remote-as 65200
 neighbor 192.168.0.14 update-source Loopback0
 neighbor 192.168.0.14 next-hop-self
 no auto-summary
!
ip http server
ip forward-protocol nd
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
line aux 0
line vty 0 4
 login
!
!
end

R21 Completed Configuration(Click)

!

!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R21
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 172.16.0.21 255.255.255.255
!
interface Loopback1
 ip address 120.1.1.1 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/0
 ip address 1.1.1.21 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 172.16.1.21 255.255.255.0
 duplex auto
 speed auto
!
!
router ospf 1
 router-id 21.21.21.21
 log-adjacency-changes
 network 120.1.0.0 0.0.255.255 area 0
 network 172.16.0.0 0.0.255.255 area 0
!
router bgp 120
 no synchronization
 bgp log-neighbor-changes
 redistribute ospf 1 route-map AS120
 neighbor 1.1.1.11 remote-as 110
 neighbor 1.1.1.11 password cisco
 neighbor 172.16.0.22 remote-as 120
 neighbor 172.16.0.22 update-source Loopback0
 neighbor 172.16.0.22 next-hop-self
 neighbor 172.16.0.23 remote-as 120
 neighbor 172.16.0.23 update-source Loopback0
 neighbor 172.16.0.23 next-hop-self
 no auto-summary
!
ip http server
ip forward-protocol nd
!
!
!
access-list 1 permit 120.1.0.0 0.0.255.255
!
route-map AS120 permit 10
 match ip address 1
 set origin igp
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
line aux 0
line vty 0 4
 login
!
!
end

R22 Completed Configuration(Click)

!

!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R22
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 172.16.0.22 255.255.255.255
!
interface Loopback1
 ip address 120.1.2.1 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/0
 ip address 1.1.2.22 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 172.16.2.22 255.255.255.0
 duplex auto
 speed auto
!
!
router ospf 1
 router-id 22.22.22.22
 log-adjacency-changes
 network 120.1.0.0 0.0.255.255 area 0
 network 172.16.0.0 0.0.255.255 area 0
!
router bgp 120
 no synchronization
 bgp log-neighbor-changes
 redistribute ospf 1 route-map AS120
 neighbor 1.1.2.12 remote-as 110
 neighbor 1.1.2.12 password cisco
 neighbor 172.16.0.21 remote-as 120
 neighbor 172.16.0.21 update-source Loopback0
 neighbor 172.16.0.21 next-hop-self
 neighbor 172.16.0.23 remote-as 120
 neighbor 172.16.0.23 update-source Loopback0
 neighbor 172.16.0.23 next-hop-self
 no auto-summary
!
ip http server
ip forward-protocol nd
!
!
!
access-list 1 permit 120.1.0.0 0.0.255.255
!
route-map AS120 permit 10
 match ip address 1
 set origin igp
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
line aux 0
line vty 0 4
 login
!
!
end

R23 Completed Configuration(Click)

!

!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R23
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback0
 ip address 172.16.0.23 255.255.255.255
!
interface Loopback1
 ip address 120.1.3.1 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/0
 ip address 172.16.1.23 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 172.16.2.23 255.255.255.0
 duplex auto
 speed auto
!
!
router ospf 1
 router-id 23.23.23.23
 log-adjacency-changes
 network 120.1.0.0 0.0.255.255 area 0
 network 172.16.0.0 0.0.255.255 area 0
!
router bgp 120
 no synchronization
 bgp log-neighbor-changes
 neighbor 172.16.0.21 remote-as 120
 neighbor 172.16.0.21 update-source Loopback0
 neighbor 172.16.0.22 remote-as 120
 neighbor 172.16.0.22 update-source Loopback0
 no auto-summary
!
ip http server
ip forward-protocol nd
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
line aux 0
line vty 0 4
 login
!
!
end

R31 Completed Configuration(Click)

!

!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R31
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback1
 ip address 130.1.3.1 255.255.255.0 secondary
 ip address 130.1.2.1 255.255.255.0 secondary
 ip address 130.1.1.1 255.255.255.0
!
interface FastEthernet0/0
 ip address 1.1.3.31 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 1.1.5.31 255.255.255.0
 duplex auto
 speed auto
!
!
router bgp 130
 no synchronization
 bgp log-neighbor-changes
 network 130.1.1.0 mask 255.255.255.0
 network 130.1.2.0 mask 255.255.255.0
 network 130.1.3.0 mask 255.255.255.0
 neighbor 1.1.3.15 remote-as 110
 neighbor 1.1.3.15 password cisco
 neighbor 1.1.5.51 remote-as 150
 neighbor 1.1.5.51 password cisco
 no auto-summary
!
ip http server
ip forward-protocol nd
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
line aux 0
line vty 0 4
 login
!
!
end

R41 Completed Configuration(Click)

!

!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R41
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback1
 ip address 140.1.3.1 255.255.255.0 secondary
 ip address 140.1.2.1 255.255.255.0 secondary
 ip address 140.1.1.1 255.255.255.0
!
interface FastEthernet0/0
 ip address 1.1.4.41 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 1.1.6.41 255.255.255.0
 duplex auto
 speed auto
!
!
router bgp 140
 no synchronization
 bgp log-neighbor-changes
 network 140.1.1.0 mask 255.255.255.0
 network 140.1.2.0 mask 255.255.255.0
 network 140.1.3.0 mask 255.255.255.0
 neighbor 1.1.4.16 remote-as 110
 neighbor 1.1.4.16 password cisco
 neighbor 1.1.6.51 remote-as 150
 neighbor 1.1.6.51 password cisco
 no auto-summary
!
ip http server
ip forward-protocol nd
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
line aux 0
line vty 0 4
 login
!
!
end

R51 Completed Configuration(Click)

!

!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R51
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
no ip domain lookup
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface Loopback1
 ip address 150.1.2.1 255.255.255.0 secondary
 ip address 150.1.3.1 255.255.255.0 secondary
 ip address 150.1.1.1 255.255.255.0
!
interface FastEthernet0/0
 ip address 1.1.5.51 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 1.1.6.51 255.255.255.0
 duplex auto
 speed auto
!
!
router bgp 150
 no synchronization
 bgp log-neighbor-changes
 network 150.1.1.0 mask 255.255.255.0
 network 150.1.2.0 mask 255.255.255.0
 network 150.1.3.0 mask 255.255.255.0
 neighbor 1.1.5.31 remote-as 130
 neighbor 1.1.5.31 password cisco
 neighbor 1.1.6.41 remote-as 140
 neighbor 1.1.6.41 password cisco
 no auto-summary
!
ip http server
ip forward-protocol nd
!
!
!
!
!
!
control-plane
!
!
!
!
mgcp behavior g729-variants static-pt
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
line aux 0
line vty 0 4
 login
!
!
end

関連記事

BGPの仕組み