この部分の広告を募集しています。 詳しくはこちら

2010年8月アーカイブの最新記事

BGPのトラブル その4 【CCIEレベル】

(所属カテゴリー:IPルーティング | シスコ---投稿日時:2010年8月27日)

ネットワーク構成

下記のネットワーク構成で、AS123はAS4とAS5内の特定のネットワークのパケットをルーティングできるようにします。

BGPのトラブル その4 Dynagen設定ファイル


bgp_trouble06.jpg
図 BGPのトラブル その4 ネットワーク構成


R1では集約ルート5.5.0.0/16を生成します。また集約前の詳細なルートのうち5.5.0.0/24、5.5.2.0/24もR4にアドバタイズします。このために、Unsuppress-mapを利用するものとします。
R3では集約ルート4.4.0.0/16を生成します。集約前の詳細なルートのうち4.4.1.0/24と4.4.3.0/24もR5にアドバタイズします。これはSuppress-mapを利用します。

設定概要

各ルータのBGPに関する設定は次の通りです。

R1

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
interface Loopback0
 ip address 192.168.0.1 255.255.255.255
!
interface Ethernet0/0
 ip address 172.16.14.1 255.255.255.0
!
interface Ethernet0/1
 ip address 192.168.12.1 255.255.255.0
!
router ospf 1
 log-adjacency-changes
 network 192.168.0.0 0.0.255.255 area 0
!
router bgp 123
 no synchronization
 bgp log-neighbor-changes
 aggregate-address 5.5.0.0 255.255.0.0 summary-only
 neighbor 172.16.14.4 remote-as 4
 neighbor 172.16.14.4 unsuppress-map UNSUPP_R1
 neighbor 192.168.0.2 remote-as 123
 neighbor 192.168.0.2 update-source Loopback0
 neighbor 192.168.0.2 next-hop-self
 neighbor 192.168.0.3 remote-as 123
 neighbor 192.168.0.3 update-source Loopback0
 neighbor 192.168.0.3 next-hop-self
 no auto-summary
!
access-list 1 permit 5.5.0.0
access-list 1 permit 5.5.2.0
!
route-map UNSUPP_R1 deny 10
 match ip address 1
!
route-map UNSUPP_R1 permit 100
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R2

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
interface Loopback0
 ip address 192.168.0.2 255.255.255.255
!
interface Ethernet0/0
 ip address 192.168.12.2 255.255.255.0
!
interface Ethernet0/1
 ip address 192.168.23.2 255.255.255.0
!
router ospf 1
 log-adjacency-changes
 network 192.168.0.0 0.0.255.255 area 0
!
router bgp 123
 no synchronization
 bgp log-neighbor-changes
 neighbor 192.168.0.1 remote-as 123
 neighbor 192.168.0.1 update-source Loopback0
 neighbor 192.168.0.3 remote-as 123
 neighbor 192.168.0.3 update-source Loopback0
 no auto-summary
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R3

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
interface Loopback0
 ip address 192.168.0.3 255.255.255.255
!
interface Ethernet0/0
 ip address 192.168.23.3 255.255.255.0
!
interface Ethernet0/1
 ip address 172.16.35.3 255.255.255.0
!
router ospf 1
 log-adjacency-changes
 network 192.168.0.0 0.0.255.255 area 0
!
router bgp 123
 no synchronization
 bgp log-neighbor-changes
 aggregate-address 4.4.0.0 255.255.0.0 suppress-map SUPP_R3
 neighbor 172.16.35.5 remote-as 5
 neighbor 192.168.0.1 remote-as 123
 neighbor 192.168.0.1 update-source Loopback0
 neighbor 192.168.0.1 next-hop-self
 neighbor 192.168.0.2 remote-as 123
 neighbor 192.168.0.2 update-source Loopback0
 neighbor 192.168.0.2 next-hop-self
 no auto-summary
!
access-list 1 permit 4.4.1.0
access-list 1 permit 4.4.3.0
!
route-map SUPP_R3 permit 10
 match ip address 1
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R4

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
interface Loopback0
 ip address 4.4.1.4 255.255.255.0 secondary
 ip address 4.4.2.4 255.255.255.0 secondary
 ip address 4.4.3.4 255.255.255.0 secondary
 ip address 4.4.0.4 255.255.255.0
!
interface Ethernet0/0
 ip address 172.16.14.4 255.255.255.0
!
router bgp 4
 no synchronization
 bgp log-neighbor-changes
 network 4.4.0.0 mask 255.255.255.0
 network 4.4.1.0 mask 255.255.255.0
 network 4.4.2.0 mask 255.255.255.0
 network 4.4.3.0 mask 255.255.255.0
 neighbor 172.16.14.1 remote-as 123
 no auto-summary
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R5

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
interface Loopback0
 ip address 5.5.1.5 255.255.255.0 secondary
 ip address 5.5.2.5 255.255.255.0 secondary
 ip address 5.5.3.5 255.255.255.0 secondary
 ip address 5.5.0.5 255.255.255.0
!
interface Ethernet0/0
 ip address 172.16.35.5 255.255.255.0
!
router bgp 5
 no synchronization
 bgp log-neighbor-changes
 network 5.5.0.0 mask 255.255.255.0
 network 5.5.1.0 mask 255.255.255.0
 network 5.5.2.0 mask 255.255.255.0
 network 5.5.3.0 mask 255.255.255.0
 neighbor 172.16.35.3 remote-as 123
 no auto-summary
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

トラブルの症状

集約ルートの生成には問題がないようですが、集約前の詳細ルートのアドバタイズが意図したように行われていません。R4では集約前の詳細ルートとして5.5.0.0/24と5.5.2.0/24ではなく、5.5.1.0/24と5.5.3.0/24がBGPテーブルに登録されています。そして、R5では集約前の詳細ルートとして4.4.1.0/24と4.4.3.0/24ではなく、4.4.0.0/24と4.4.2.0/24がBGPテーブルに登録されています。

R4 show ip bgp

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R4#show ip bgp
BGP table version is 13, local router ID is 4.4.0.4
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
*> 4.4.0.0/24       0.0.0.0                  0         32768 i
*> 4.4.0.0/16       172.16.14.1                            0 123 i
*> 4.4.1.0/24       0.0.0.0                  0         32768 i
*> 4.4.2.0/24       0.0.0.0                  0         32768 i
*> 4.4.3.0/24       0.0.0.0                  0         32768 i
*> 5.5.0.0/16       172.16.14.1              0             0 123 i
*> 5.5.1.0/24       172.16.14.1                            0 123 5 i
*> 5.5.3.0/24       172.16.14.1                            0 123 5 i

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

R5 show ip bgp

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R5#show ip bgp
BGP table version is 9, local router ID is 5.5.0.5
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
*> 4.4.0.0/24       172.16.35.3                            0 123 4 i
*> 4.4.0.0/16       172.16.35.3              0             0 123 i
*> 4.4.2.0/24       172.16.35.3                            0 123 4 i
*> 5.5.0.0/24       0.0.0.0                  0         32768 i
*> 5.5.0.0/16       172.16.35.3                            0 123 i
*> 5.5.1.0/24       0.0.0.0                  0         32768 i
*> 5.5.2.0/24       0.0.0.0                  0         32768 i
*> 5.5.3.0/24       0.0.0.0                  0         32768 i


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━


集約前の詳細ルートのアドバタイズが意図したように行われていない原因は、R1とR3の設定ミスだと考えられます。そこで、R1とR3で下記のshowコマンドでトラブルの切り分けを行います。


R1/R3
show ip protocols
show ip bgp
show route-map
show access-list


R1 showコマンドの結果

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R1#show ip protocols
Routing Protocol is "ospf 1"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Router ID 192.168.0.1
  Number of areas in this router is 1. 1 normal 0 stub 0 nssa
  Maximum path: 4
  Routing for Networks:
    192.168.0.0 0.0.255.255 area 0
 Reference bandwidth unit is 100 mbps
  Routing Information Sources:
    Gateway         Distance      Last Update
    192.168.0.2          110      00:56:49
    192.168.0.3          110      00:56:49
  Distance: (default is 110)
 
Routing Protocol is "bgp 123"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  IGP synchronization is disabled
  Automatic route summarization is disabled
  Unicast Aggregate Generation:
    5.5.0.0/16         summary-only
  Neighbor(s):
    Address          FiltIn FiltOut DistIn DistOut Weight RouteMap
    172.16.14.4
    192.168.0.2
    192.168.0.3
  Maximum path: 1
  Routing Information Sources:
    Gateway         Distance      Last Update
    (this router)        200      00:55:46
    192.168.0.3          200      00:56:14
    172.16.14.4           20      00:56:17
  Distance: external 20 internal 200 local 200
 
R1#show ip bgp
BGP table version is 15, local router ID is 192.168.0.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
*> 4.4.0.0/24       172.16.14.4              0             0 4 i
*>i4.4.0.0/16       192.168.0.3              0    100      0 i
*> 4.4.1.0/24       172.16.14.4              0             0 4 i
*> 4.4.2.0/24       172.16.14.4              0             0 4 i
*> 4.4.3.0/24       172.16.14.4              0             0 4 i
s>i5.5.0.0/24       192.168.0.3              0    100      0 5 i
*> 5.5.0.0/16       0.0.0.0                            32768 i
s>i5.5.1.0/24       192.168.0.3              0    100      0 5 i
s>i5.5.2.0/24       192.168.0.3              0    100      0 5 i
s>i5.5.3.0/24       192.168.0.3              0    100      0 5 i
R1#show route-map
route-map UNSUPP_R1, deny, sequence 10
  Match clauses:
    ip address (access-lists): 1
  Set clauses:
  Policy routing matches: 0 packets, 0 bytes
route-map UNSUPP_R1, permit, sequence 100
  Match clauses:
  Set clauses:
  Policy routing matches: 0 packets, 0 bytes
R1#show access-list
Standard IP access list 1
    10 permit 5.5.0.0 (1 match)
    20 permit 5.5.2.0 (1 match)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━


R3 showコマンドの結果

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R3#show ip protocols
Routing Protocol is "ospf 1"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Router ID 192.168.0.3
  Number of areas in this router is 1. 1 normal 0 stub 0 nssa
  Maximum path: 4
  Routing for Networks:
    192.168.0.0 0.0.255.255 area 0
 Reference bandwidth unit is 100 mbps
  Routing Information Sources:
    Gateway         Distance      Last Update
    192.168.0.1          110      00:58:03
    192.168.0.2          110      00:58:03
  Distance: (default is 110)
 
Routing Protocol is "bgp 123"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  IGP synchronization is disabled
  Automatic route summarization is disabled
  Unicast Aggregate Generation:
    4.4.0.0/16         suppress-map SUPP_R3
  Neighbor(s):
    Address          FiltIn FiltOut DistIn DistOut Weight RouteMap
    172.16.35.5
    192.168.0.1
    192.168.0.2
  Maximum path: 1
  Routing Information Sources:
    Gateway         Distance      Last Update
    (this router)        200      00:57:20
    192.168.0.1          200      00:56:52
    172.16.35.5           20      00:57:20
  Distance: external 20 internal 200 local 200
 
R3#show ip bgp
BGP table version is 13, local router ID is 192.168.0.3
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
*>i4.4.0.0/24       192.168.0.1              0    100      0 4 i
*> 4.4.0.0/16       0.0.0.0                            32768 i
s>i4.4.1.0/24       192.168.0.1              0    100      0 4 i
*>i4.4.2.0/24       192.168.0.1              0    100      0 4 i
s>i4.4.3.0/24       192.168.0.1              0    100      0 4 i
*> 5.5.0.0/24       172.16.35.5              0             0 5 i
*>i5.5.0.0/16       192.168.0.1              0    100      0 i
*> 5.5.1.0/24       172.16.35.5              0             0 5 i
*> 5.5.2.0/24       172.16.35.5              0             0 5 i
*> 5.5.3.0/24       172.16.35.5              0             0 5 i
R3#show route-map
route-map SUPP_R3, permit, sequence 10
  Match clauses:
    ip address (access-lists): 1
  Set clauses:
  Policy routing matches: 0 packets, 0 bytes
R3#show access-list
Standard IP access list 1
    10 permit 4.4.1.0 (2 matches)
    20 permit 4.4.3.0 (2 matches)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

 

問題

  • なぜ集約前の詳細ルートのアドバタイズが意図したように行われていないのですか?
  • 詳細ルートのアドバタイズを意図したように行うためにはR1とR3でどのように設定を修正すればよいですか?

 

Google
Web n-study.com

各コンテンツの最新記事

有料コンテンツライブラリ(ITエンジニア教育資料)

ネットワーク技術雑誌レビュー

ベンダ資格受験記

オススメ!ネットワーク技術雑誌・書籍

MindMapでおべんきょ

結果を出せるコーチング

Geneのつぶやき

The Power of Words

スポンサードリンク

スポンサードリンク