H O M E > ネットワークのおべんきょしませんか? Cisco CCNA/CCNP/CCIE、ネットワークスペシャリスト試験の勉強にピッタリ > 2010年7月
(所属カテゴリー:IPルーティング | シスコ---投稿日時:2010年7月30日)
下記のネットワーク構成でBGPによってAS1の100.100.100.0/24をAS23へアドバタイズします。
各ルータのBGPに関する設定は次の通りです。
R1
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
interface Loopback0
ip address 100.100.100.1 255.255.255.0
!
interface Ethernet0/0
ip address 10.12.12.1 255.255.255.0
!
router bgp 1
no synchronization
bgp log-neighbor-changes
network 100.100.100.0 mask 255.255.255.0
neighbor 10.12.12.2 remote-as 23
neighbor 10.12.12.2 send-community
neighbor 10.12.12.2 route-map TO_R2 out
no auto-summary
!
route-map TO_R2 permit 10
set community no-advertise
!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface Ethernet0/0
ip address 10.12.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 2.2.2.2 0.0.0.0 area 0
network 192.168.0.0 0.0.255.255 area 0
!
router bgp 23
no synchronization
bgp log-neighbor-changes
neighbor 3.3.3.3 remote-as 23
neighbor 3.3.3.3 update-source Loopback0
neighbor 10.12.12.1 remote-as 1
no auto-summary
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R3
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
interface Loopback0
ip address 3.3.3.3 255.255.255.255
!
interface Ethernet0/0
ip address 192.168.23.3 255.255.255.0
!
router ospf 1
log-adjacency-changes
network 3.3.3.3 0.0.0.0 area 0
network 192.168.0.0 0.0.255.255 area 0
!
router bgp 23
no synchronization
bgp log-neighbor-changes
neighbor 2.2.2.2 remote-as 23
neighbor 2.2.2.2 update-source Loopback0
no auto-summary
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
AS1の100.100.100.0/24はR2までは届いていますが、R3には届いていません。この原因を調べるために、各ルータで次のshowコマンドを実行しました。
R1
show ip bgp summary
show ip bgp
show ip bgp 100.100.100.0
R2
show ip bgp summary
show ip bgp
show ip bgp 100.100.100.0
show ip bgp neighbor 3.3.3.3 advertised-routes
R3
show ip bgp summary
show ip bgp
R1 showコマンドの結果
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R1#show ip bgp summary
BGP router identifier 100.100.100.1, local AS number 1
BGP table version is 2, main routing table version 2
1 network entries using 117 bytes of memory
1 path entries using 52 bytes of memory
2/1 BGP path/bestpath attribute entries using 248 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 417 total bytes of memory
BGP activity 1/0 prefixes, 1/0 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.12.12.2 4 23 12 13 2 0 0 00:09:45 0
R1#show ip bgp
BGP table version is 2, local router ID is 100.100.100.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
*> 100.100.100.0/24 0.0.0.0 0 32768 i
R1#show ip bgp 100.100.100.0
BGP routing table entry for 100.100.100.0/24, version 2
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Advertised to update-groups:
1
Local
0.0.0.0 from 0.0.0.0 (100.100.100.1)
Origin IGP, metric 0, localpref 100, weight 32768, valid, sourced, local, best
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R2 showコマンドの結果
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R2#show ip bgp summary
BGP router identifier 2.2.2.2, local AS number 23
BGP table version is 2, main routing table version 2
1 network entries using 117 bytes of memory
1 path entries using 52 bytes of memory
2/1 BGP path/bestpath attribute entries using 248 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
1 BGP community entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 465 total bytes of memory
BGP activity 1/0 prefixes, 1/0 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
3.3.3.3 4 23 12 12 2 0 0 00:09:53 0
10.12.12.1 4 1 14 13 2 0 0 00:10:16 1
R2#show ip bgp
BGP table version is 2, local router ID is 2.2.2.2
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
*> 100.100.100.0/24 10.12.12.1 0 0 1 i
R2#show ip bgp 100.100.100.0
BGP routing table entry for 100.100.100.0/24, version 2
Paths: (1 available, best #1, table Default-IP-Routing-Table, not advertised to any peer)
Not advertised to any peer
1
10.12.12.1 from 10.12.12.1 (100.100.100.1)
Origin IGP, metric 0, localpref 100, valid, external, best
Community: no-advertise
R2#show ip bgp neighbor 3.3.3.3 advertised-routes
Total number of prefixes 0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R3 showコマンドの結果
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
R3#show ip bgp summary
BGP router identifier 3.3.3.3, local AS number 23
BGP table version is 1, main routing table version 1
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 23 13 13 1 0 0 00:10:41 0
R3#show ip bgp
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━