シスコは世界中のユーザにそれぞれの言語でサポート コンテンツを提供するために、機械と人による翻訳を組み合わせて、本ドキュメントを翻訳しています。 ただし、最高度の機械翻訳であっても、専門家による翻訳のような正確性は確保されません。 シスコは、これら翻訳の正確性について法的責任を負いません。原典である英語版(リンクからアクセス可能)もあわせて参照することを推奨します。
このドキュメントでは、内部 Border Gateway Protocol(BGP)ルートを Open Shortest Path First(OSPF)プロセスに再配布する方法について説明します。 IGP 再配布への他の内部ゲートウェイ プロトコル(IGP)でのように、動作は Internal BGP (IBGP)が OSPF に再配布されるとき異なっています。 redistribute コマンドによる IBGP学習ルートは IGP ルーティング プロトコルに転送されません。 使用 コマンド bgp は再配布ルータの BGPプロセスを再配布しますinternalunder。
Cisco はルーティング プロトコルの基本的な BGP設定および知識のナレッジが– BGP、OSPF 拡張内部ゲートウェイ ルーティング プロトコル(EIGRP)およびルーティング情報プロトコル(RIP)あることを推奨します。
詳細については、「BGP ケース スタディ」および「BGP の設定」を参照してください。
この 文書に記載されている 情報は基づいた on Cisco IOS ® ソフトウェア リリース 15.1(4)M5 です
本書の情報は、特定のラボ環境にあるデバイスに基づいて作成されたものです。 このドキュメントで使用するすべてのデバイスは、初期(デフォルト)設定の状態から起動しています。 稼働中のネットワークで作業を行う場合、コマンドの影響について十分に理解したうえで作業してください。
R2 及び R3 間の設定 OSPF
ここに描写されるシナリオではルータ R1 および R2 は 0。R1 によってが network コマンドによってアドバタイジング 2 本のルート(1.1.1.1 /32 および 10.10.10.10/32)である OSPF領域を実行する IBGP およびルータ R2/R3 を実行しています。
R2 は OSPF領域 0 に BGP を再配布しています。 『Internal』 を選択 されたルーティング(10.10.10.10/32)を再配布することを必要とします。
タスクはプレフィクスリストおよびルート マップの利用によって実現します。
R1
interface Loopback0 ip address 1.1.1.1 255.255.255.255 ! interface Loopback10 ip address 10.10.10.10 255.255.255.255 ! interface GigabitEthernet0/1 ip address 192.168.1.1 255.255.255.0 duplex auto speed auto ! router bgp 10 no synchronization bgp router-id 1.1.1.1 bgp log-neighbor-changes network 1.1.1.1 mask 255.255.255.255 network 10.10.10.10 mask 255.255.255.255 neighbor 192.168.1.2 remote-as 100 no auto-summary
R1#show ip bgp summary BGP router identifier 10.10.10.10, local AS number 10 BGP table version is 3, main routing table version 3 2 network entries using 296 bytes of memory 2 path entries using 128 bytes of memory 1/1 BGP path/bestpath attribute entries using 136 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 560 total bytes of memory BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 192.168.1.2 4 10 6 7 3 0 0 00:03:10 0
R2
interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! interface GigabitEthernet0/0 ip address 192.168.1.2 255.255.255.0 duplex auto speed auto ! interface GigabitEthernet0/1 ip address 10.1.1.1 255.255.255.0 duplex auto speed auto !
router ospf 1 router-id 2.2.2.2 log-adjacency-changes redistribute bgp 100 metric 100 metric-type 1 subnets route-map BGP-To_OSPF network 10.1.1.1.1 0.0.0.0 area 0
R2#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 3.3.3.3 1 FULL/BDR 00:00:38 10.1.1.2 GigabitEthernet0/1
router bgp 10 no synchronization bgp router-id 2.2.2.2 bgp log-neighbor-changes bgp redistribute-internal neighbor 192.168.12.1 remote-as 10 no auto-summary ! ip prefix-list BGP-to-ospf seq 5 permit 172.16.0.0/16 ! route-map BGP-To_OSPF permit 10 match ip address prefix-list BGP-to-ospf
R2#show ip bgp summary BGP router identifier 192.168.1.2, local AS number 10 BGP table version is 3, main routing table version 3 2 network entries using 272 bytes of memory 2 path entries using 112 bytes of memory 1/1 BGP path/bestpath attribute entries using 128 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 512 total bytes of memory BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 192.168.1.1 4 10 8 7 3 0 0 00:03:52 2 R2#show ip bgp BGP table version is 3, local router ID is 192.168.1.2 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, r RIB-failure, S Stale, m multipath, b backup-path, x best-external, f RT-Filter Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path *>i1.1.1.1/32 192.168.1.1 0 100 0 i *>i10.10.10.10/32 192.168.1.1 0 100 0 i
R2#show ip route 1.1.1.1 Routing entry for 1.1.1.1/32 Known via "bgp 10", distance 200, metric 0, type internal Last update from 192.168.1.1 00:04:53 ago Routing Descriptor Blocks: * 192.168.1.1, from 192.168.1.1, 00:04:53 ago Route metric is 0, traffic share count is 1 AS Hops 0 MPLS label: none R2#show ip route 10.10.10.10 Routing entry for 10.10.10.10/32 Known via "bgp 10", distance 200, metric 0, type internal Last update from 192.168.1.1 00:04:56 ago Routing Descriptor Blocks: * 192.168.1.1, from 192.168.1.1, 00:04:56 ago Route metric is 0, traffic share count is 1 AS Hops 0 MPLS label: none
R3
interface FastEthernet1/0 ip address 10.1.1.2 255.255.255.0 duplex auto speed auto
router ospf 1 log-adjacency-changes network 10.1.1.2 0.0.0.0 area 0
R3#show ip ospf neighbor Neighbor ID Pri State Dead Time Address Interface 192.168.1.2 1 FULL/DR 00:00:36 10.1.1.1 GigabitEthernet0/1
bgp redistribute-internal の前の R3 のルーティング テーブルはルータ BGP 10 の下の R2 で追加されます:
R3#show ip route Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP + - replicated route, % - next hop override Gateway of last resort is not set 3.0.0.0/32 is subnetted, 1 subnets C 3.3.3.3 is directly connected, Loopback0 10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 10.1.1.0/24 is directly connected, GigabitEthernet0/1 L 10.1.1.2/32 is directly connected, GigabitEthernet0/1
R2
router bgp 10 bgp redistribute-internal
R3
bgp redistribute-internal の後の R3 のためのルーティング テーブルはルータ BGP 10 の下の R2 で追加されます:
R3#show ip route Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP + - replicated route, % - next hop override Gateway of last resort is not set 3.0.0.0/32 is subnetted, 1 subnets C 3.3.3.3 is directly connected, Loopback0 10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks C 10.1.1.0/24 is directly connected, GigabitEthernet0/1 L 10.1.1.2/32 is directly connected, GigabitEthernet0/1 O E1 10.10.10.10/32 [110/11] via 10.1.1.1, 00:00:06, GigabitEthernet0/1
R2 及び R3 間の設定 EIGRP
ここに描写されるシナリオではルータ R1 および R2 は network コマンドによって EIGRP自律システム 1. R1 を実行する IBGP およびルータ R2/R3 をですアドバタイジング 2 本のルート(1.1.1.1 /32 および 10.10.10.10/32)実行しています。
R2 は EIGRP AS 1.に BGP を再配布しています。 『Internal』 を選択 されたルーティング(10.10.10.10/32)を再配布することを必要とします。
タスクはプレフィクスリストおよびルート マップの利用によって実現します。
R2
router eigrp 1 network 10.0.0.0 redistribute bgp 10 metric 1544 10 255 1 1500 route-map BGP_To_EIGRP eigrp router-id 2.2.2.2
route-map BGP_To_EIGRP, permit, sequence 10 Match clauses: ip address prefix-lists: BGP-to-eigrp Set clauses: Policy routing matches: 0 packets, 0 bytes
ip prefix-list BGP-to-eigrp: 1 entries
seq 1 permit 10.10.10.10/32
R3
router eigrp 1 network 10.0.0.0 eigrp router-id 3.3.3.3
bgp redistribute-internal の前の R3 の show ip route の出力はルータ BGP 10 の下の R2 で追加されます:
R3#show ip route Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP + - replicated route, % - next hop override Gateway of last resort is not set 3.0.0.0/32 is subnetted, 1 subnets C 3.3.3.3 is directly connected, Loopback0 10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 10.1.1.0/24 is directly connected, GigabitEthernet0/1 L 10.1.1.2/32 is directly connected, GigabitEthernet0/1
R2
router bgp 10 bgp redistribute-internal
bgp redistribute-internal の後の R3 の show ip route の出力はルータ BGP 10 の下の R2 で追加されます:
R3#show ip route Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP + - replicated route, % - next hop override Gateway of last resort is not set 3.0.0.0/32 is subnetted, 1 subnets C 3.3.3.3 is directly connected, Loopback0 10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks C 10.1.1.0/24 is directly connected, GigabitEthernet0/1 L 10.1.1.2/32 is directly connected, GigabitEthernet0/1 D EX 10.10.10.10/32 [170/1660672] via 10.1.1.1, 00:00:04, GigabitEthernet0/1
R2 及び R3 間の設定 RIP
ここに描写されるシナリオではルータ R1 および R2 は RIPv2 を実行する IBGP およびルータ R2/R3 を実行しています。
R1 は network コマンドによってアドバタイジング 2 本のルート(1.1.1.1 /32 および 10.10.10.10/32)です。
R2 は RIPv2 に BGP を再配布しています。 『Internal』 を選択 されたルーティング(10.10.10.10/32)を再配布することを必要とします。
タスクはプレフィクスリストおよびルート マップの利用によって実現します。
R2
router rip version 2 redistribute bgp 10 metric 1 route-map BGP_To_RIP network 10.0.0.0 no auto-summary
route-map BGP_To_RIP, permit, sequence 10 Match clauses: ip address prefix-lists: BGP-to-rip Set clauses: Policy routing matches: 0 packets, 0 bytes ip prefix-list BGP-to-rip: 1 entries seq 1 permit 10.10.10.10/32
R3
router rip version 2 network 10.0.0.0 no auto-summary
ルータ BGP 10 の下で R2 の bgp redistribute-internal を有効に する前に R3 の出力:
R3#show ip route Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP + - replicated route, % - next hop override Gateway of last resort is not set 3.0.0.0/32 is subnetted, 1 subnets C 3.3.3.3 is directly connected, Loopback0 10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 10.1.1.0/24 is directly connected, GigabitEthernet0/1 L 10.1.1.2/32 is directly connected, GigabitEthernet0/1
R2
router bgp 10 bgp redistribute-internal
ルータ BGP 10 の下で R2 の bgp redistribute-internal を有効に した後 R3 の出力:
R3#sh ip route Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP + - replicated route, % - next hop override Gateway of last resort is not set 3.0.0.0/32 is subnetted, 1 subnets C 3.3.3.3 is directly connected, Loopback0 10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks C 10.1.1.0/24 is directly connected, GigabitEthernet0/1 L 10.1.1.2/32 is directly connected, GigabitEthernet0/1 R 10.10.10.10/32 [120/1] via 10.1.1.1, 00:00:09, GigabitEthernet0/1
現在のところ、この設定に関する特定のトラブルシューティング情報はありません。