이 문서에서는 Cisco 라우터에서 BGP(Border Gateway Protocol) 재배포에 대한 OSPF(Open Shortest Path First)의 동작을 설명합니다.
Cisco에서는 이 문서를 사용하기 전에 OSPF 경로 유형, BGP 기본 사항 및 경로 재배포에 대해 알고 있는 것이 좋습니다.
이 문서는 특정 소프트웨어 및 하드웨어 버전으로 한정되지 않습니다.
참고: 이 문서의 예는 Cisco IOS Software 명령 구문을 사용합니다.
이 문서의 정보는 특정 랩 환경의 디바이스를 토대로 작성되었습니다. 이 문서에 사용된 모든 디바이스는 초기화된(기본) 컨피그레이션으로 시작되었습니다. 현재 네트워크가 작동 중인 경우 모든 명령의 잠재적인 영향을 미리 숙지하시기 바랍니다.
이 기술 노트는 Cisco 라우터에서 OSPF에서 BGP로 재배포하는 동작을 설명합니다. RFC 1403은 OSPF와 BGP 간의 상호 작용에 대한 기록 지침을 제공합니다.
OSPF 경로에는 여러 유형이 있습니다.
Intra-Area(영역 내) - 다중 영역 OSPF 네트워크에서 영역 내에서 시작되는 경로는 Intra-Area(영역 내) 경로와 동일한 영역의 라우터에서 알려줍니다. 이러한 경로는 show ip route 명령 출력에서 O로 플래그됩니다.
Inter-Area(영역 간) - 경로가 OSPF ABR(Area Border Router)을 교차하는 경우 이 경로를 OSPF 영역 간 경로라고 합니다. 이러한 경로는 show ip route 명령 출력에서 O IA로 플래그가 지정됩니다.
Intra-Area 경로와 Inter-Area 경로는 모두 OSPF Internal 경로라고도 합니다. OSPF에 재배포된 경로가 아니라 OSPF 도메인 내에서 시작된 접두사를 나타내기 때문입니다.
External Type-2 or External Type-1 - OSPF로 재배포된 경로(예: Connected, Static 또는 기타 라우팅 프로토콜)를 External Type-2 또는 External Type-1이라고 합니다. 이러한 경로는 show ip route 명령 출력에서 O E2 또는 O E1로 플래그가 지정됩니다.
NSSA External Type-2 또는 NSSA External Type 1 - 영역이 NSSA(Not-So-Stub Area)로 구성되고 경로가 OSPF로 재배포되는 경우 경로를 NSSA External Type-2 또는 NSSA External Type-1이라고 합니다. 이러한 경로는 show ip route 명령 출력에서 O N2 또는 O N1로 플래그가 지정됩니다.
External과 NSSA Type 2 또는 1의 차이에 대한 설명은 이 문서의 범위를 벗어납니다. 자세한 내용은 OSPF 설계 가이드를 참조하십시오.
기본 동작은 OSPF에서 BGP로 경로를 재배포하지 않는 것입니다. 재배포를 구성해야 합니다. OSPF에서 BGP로 재배포하는 동안 경로를 필터링하려면 route-map 명령을 사용합니다. 경로 유형을 명시적으로 선택하려면 적용 가능한 match internal, match external 또는 match nssa-external 옵션을 사용합니다. match 옵션이 없으면 기본적으로 ospf 재배포는 OSPF 내부 경로를 재배포합니다.
이 문서에서는 5가지 기본 OSPF-to-BGP 재배포 사례에 대해 설명합니다. 토폴로지 A는 처음 네 가지 경우에 적용됩니다. 토폴로지 B는 Redistribute OSPF NSSA-External Routes into BGP(OSPF NSSA-외부 경로를 BGP로 재배포) 섹션에 설명된 NSSA-외부 경로 사례에 적용됩니다.
OSPF를 BGP 토폴로지 A로 재배포
키워드 없이 OSPF를 BGP로 재배포하도록 구성하는 경우 기본적으로 OSPF 영역 내 경로 및 영역 간 경로만 BGP로 재배포됩니다. OSPF Intra-area 경로 및 Inter-area 경로를 재배포하려면 internal 키워드와 함께 redistribute 명령을 라우터 bgp 아래에서 사용합니다.
이 RTB(Router B) 컨피그레이션은 OSPF 내부 접두사 10.2.2.0/24, 10.108.1.0/24 및 10.108.2.0/24을 BGP로 재배포합니다.
| RTB |
|---|
hostname RTB ! interface GigabitEthernet0/0 ip address 10.3.3.1 255.255.255.0 duplex auto speed auto media-type rj45 ! interface GigabitEthernet0/1 ip address 10.2.2.3 255.255.255.0 duplex auto speed auto media-type rj45 |
라우터 B는 OSPF 내부 경로만 재배포합니다.
RTB#show ip bgp
BGP table version is 12, local router ID is 10.3.3.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
t secondary path,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.2.2.0/24 0.0.0.0 0 32768 ? *> 10.108.1.0/24 10.2.2.2 3 32768 ? *> 10.108.2.0/24 10.2.2.2 2 32768 ?
RTB#
라우터 C는 BGP에서 다음 경로를 학습합니다.
RTC#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
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
B 10.2.2.0/24 [20/0] via 10.3.3.1, 00:07:07
C 10.3.3.0/24 is directly connected, GigabitEthernet0/0
L 10.3.3.2/32 is directly connected, GigabitEthernet0/0
B 10.108.1.0/24 [20/3] via 10.3.3.1, 00:07:07
B 10.108.2.0/24 [20/2] via 10.3.3.1, 00:07:07
RTC#
RTC#show ip bgp
BGP table version is 8, local router ID is 10.3.3.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
t secondary path,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.2.2.0/24 10.3.3.1 0 0 100 ? *> 10.108.1.0/24 10.3.3.1 3 0 100 ? *> 10.108.2.0/24 10.3.3.1 2 0 100 ?
RTC#
OSPF 외부 경로를 BGP로 재배포하려면 라우터 bgp 아래에서 external 키워드와 함께 redistribute 명령을 사용합니다. external 키워드를 사용하면 세 가지 선택 사항이 있습니다.
외부 Type-1 및 Type-2 모두 재배포(기본값)
재배포 유형-1
재배포 유형-2
여기에 설명된 대로 컨피그레이션 모드에서 명령을 입력합니다.
RTB(config)#router bgp 100 RTB(config-router)#redistribute ospf 1 match external
이 라우터 B 컨피그레이션은 유형 1 및 유형 2 경로를 포함하여 OSPF 외부 경로만 재배포합니다.
| RTB |
|---|
hostname RTB ! interface GigabitEthernet0/0 ip address 10.3.3.1 255.255.255.0 duplex auto speed auto media-type rj45 ! interface GigabitEthernet0/1 ip address 10.2.2.3 255.255.255.0 duplex auto speed auto media-type rj45 ! router ospf 1 network 10.2.2.0 0.0.0.255 area 1 ! router bgp 100 |
라우터 B는 OSPF 외부 경로만 재배포합니다.
RTB#show ip bgp
BGP table version is 25, local router ID is 10.3.3.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
t secondary path,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 192.168.1.0 10.2.2.2 20 32768 ?
*> 192.168.2.0 10.2.2.2 23 32768 ?
RTB#
라우터 C는 BGP에서 다음 두 OSPF 외부 경로에 대해 학습합니다.
RTC#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
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.3.3.0/24 is directly connected, GigabitEthernet0/0
L 10.3.3.2/32 is directly connected, GigabitEthernet0/0
B 192.168.1.0/24 [20/20] via 10.3.3.1, 00:02:16
B 192.168.2.0/24 [20/23] via 10.3.3.1, 00:02:16
RTC#show ip bgp
BGP table version is 21, local router ID is 10.3.3.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
t secondary path,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 192.168.1.0 10.3.3.1 20 0 100 ? *> 192.168.2.0 10.3.3.1 23 0 100 ?
RTC#
OSPF 외부 유형 1 경로만 재배포하려면 라우터 B의 라우터 bgp 100 아래에 다음 명령을 입력합니다.
RTB(config)#router bgp 100
RTB(config-router)#redistribute ospf 1 match external 1
이전 컨피그레이션에서 RTB(Router B) BGP 테이블은 라우터 B가 외부 유형 1 경로만 BGP로 재배포하고, 다른 모든 OSPF 경로는 BGP로 재배포되지 않음을 보여줍니다.
RTB#show ip bgp
BGP table version is 28, local router ID is 10.3.3.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
t secondary path,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 192.168.2.0 10.2.2.2 23 32768 ?
RTB#
OSPF 외부 유형 2 경로만 재배포하려면 라우터 B의 라우터 bgp 100 아래에 다음 명령을 입력합니다.
RTB(config)#router bgp 100
RTB(config-router)#redistribute ospf 1 match external 2
이 경우 OSPF 내부 경로와 OSPF 외부 유형 1 및 유형 2 경로는 이 라우터 B 컨피그레이션에 표시된 대로 내부 및 외부 일치 옵션을 사용하여 BGP로 재배포됩니다.
| RTB |
|---|
hostname RTB ! interface GigabitEthernet0/0 ip address 10.3.3.1 255.255.255.0 duplex auto speed auto media-type rj45 ! interface GigabitEthernet0/1 ip address 10.2.2.3 255.255.255.0 duplex auto speed auto media-type rj45 ! router ospf 1 network 10.2.2.0 0.0.0.255 area 1 ! router bgp 100 |
이번에도 외부는 컨피그레이션에서 external 1 external 2로 교체됩니다. BGP로 재배포할 특정 외부 경로를 지정하지 않는 한 이는 정상입니다. 컨피그레이션이 변경된 후 라우터 B는 선택한 내부 및 외부 경로를 재배포하고 라우터 C는 BGP를 통해 이를 학습합니다.
RTB#show ip bgp
BGP table version is 6, local router ID is 10.3.3.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
t secondary path,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.2.2.0/24 0.0.0.0 0 32768 ? *> 10.108.1.0/24 10.2.2.2 3 32768 ? *> 10.108.2.0/24 10.2.2.2 2 32768 ? *> 192.168.1.0 10.2.2.2 20 32768 ? *> 192.168.2.0 10.2.2.2 23 32768 ?
RTB# RTC#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
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
B 10.2.2.0/24 [20/0] via 10.3.3.1, 00:03:27
C 10.3.3.0/24 is directly connected, GigabitEthernet0/0
L 10.3.3.2/32 is directly connected, GigabitEthernet0/0
B 10.108.1.0/24 [20/3] via 10.3.3.1, 00:03:27 B 10.108.2.0/24 [20/2] via 10.3.3.1, 00:03:27 B 192.168.1.0/24 [20/20] via 10.3.3.1, 00:03:27 B 192.168.2.0/24 [20/23] via 10.3.3.1, 00:03:27
RTC#
이는 NSSA 경로만 BGP로 재배포되는 특수한 경우입니다. 이 경우는 Redistribute Only OSPF External (Type 1 and 2) Routes into BGP(OSPF 외부(Type 1 및 2) 경로만 BGP로 재배포) 섹션에 설명된 경우와 매우 유사합니다. 유일한 차이점은 OSPF가 이제 외부 경로만 확인하는 것이 아니라 NSSA 외부 경로와 일치한다는 것입니다. 라우터 B의 라우팅 테이블에는 다음과 같은 OSPF NSSA-외부 경로가 표시됩니다.
RTB#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
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
C 10.2.2.0/24 is directly connected, GigabitEthernet0/1
L 10.2.2.3/32 is directly connected, GigabitEthernet0/1
C 10.3.3.0/24 is directly connected, GigabitEthernet0/0
L 10.3.3.1/32 is directly connected, GigabitEthernet0/0
O IA 10.108.1.0/24 [110/3] via 10.2.2.2, 00:05:00, GigabitEthernet0/1
O 10.108.2.0/24 [110/2] via 10.2.2.2, 00:05:00, GigabitEthernet0/1
O N2 192.168.1.0/24 [110/20] via 10.2.2.1, 00:10:14, GigabitEthernet0/1
O N1 192.168.2.0/24 [110/22] via 10.2.2.2, 00:03:43, GigabitEthernet0/1
RTB#
이 네트워크 다이어그램은 이 경우에 사용됩니다.
BGP 토폴로지 B에 OSPF 재배포
네트워크 다이어그램은 라우터 B가 OSPF N1 및 N2 경로를 모두 수신함을 보여줍니다. 기본 동작은 nssa-external 키워드만 사용하는 경우 N1 및 N2 경로를 모두 재배포하는 것입니다. 이 컨피그레이션을 통해 RTB는 OSPF N2(192.168.1.0/24) 및 OSPF N1(192.168.2.0/24) 경로를 BGP로 재배포할 수 있습니다.
| RTB |
|---|
hostname RTB ! interface GigabitEthernet0/0 ip address 10.3.3.1 255.255.255.0 duplex auto speed auto media-type rj45 ! interface GigabitEthernet0/1 ip address 10.2.2.3 255.255.255.0 duplex auto speed auto media-type rj45 ! router ospf 1 |
라우터 B에서 컨피그레이션을 변경한 후 OSPF NSSA 외부 경로를 재배포하고 라우터 C가 BGP에서 OSPF NSSA 외부 경로를 학습합니다.
RTB#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
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
C 10.2.2.0/24 is directly connected, GigabitEthernet0/1
L 10.2.2.3/32 is directly connected, GigabitEthernet0/1
C 10.3.3.0/24 is directly connected, GigabitEthernet0/0
L 10.3.3.1/32 is directly connected, GigabitEthernet0/0
O IA 10.108.1.0/24 [110/3] via 10.2.2.2, 00:09:40, GigabitEthernet0/1
O 10.108.2.0/24 [110/2] via 10.2.2.2, 00:09:40, GigabitEthernet0/1
O N2 192.168.1.0/24 [110/20] via 10.2.2.1, 00:14:54, GigabitEthernet0/1
O N1 192.168.2.0/24 [110/22] via 10.2.2.2, 00:08:23, GigabitEthernet0/1
RTB#
RTB#show ip bgp
BGP table version is 17, local router ID is 10.3.3.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
t secondary path,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 192.168.1.0 10.2.2.1 20 32768 ? *> 192.168.2.0 10.2.2.2 22 32768 ?
RTB# RTC#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
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.3.3.0/24 is directly connected, GigabitEthernet0/0
L 10.3.3.2/32 is directly connected, GigabitEthernet0/0
B 192.168.1.0/24 [20/20] via 10.3.3.1, 00:01:29 B 192.168.2.0/24 [20/22] via 10.3.3.1, 00:01:29
RTC#
RTC#show ip bgp
BGP table version is 41, local router ID is 10.3.3.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
t secondary path,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 192.168.1.0 10.3.3.1 20 0 100 ? *> 192.168.2.0 10.3.3.1 22 0 100 ?
RTC#
OSPF External 경로와 마찬가지로 OSPF N1 경로만 재배포하려면 라우터 B의 라우터 BGP 100 아래에 다음 명령을 입력합니다.
RTB(config)#router bgp 100
RTB(config-router)#redistribute ospf 1 match nssa-external 1
!--- This redistributes only OSPF NSSA-external Type-1 routes into BGP.
OSPF N2 경로만 재배포하려면 라우터 B의 라우터 bgp 100 아래에 다음 명령을 입력합니다.
RTB(config)#router bgp 100
RTB(config-router)#redistribute ospf 1 match nssa-external 2
!--- This redistributes only OSPF NSSA-external Type-2 routes into BGP.
연속 컨피그레이션 변경이 컨피그레이션을 변경하는 방법을 이해하는 것이 중요합니다. match 옵션이 있는 새 명령은 이전 명령을 덮어쓰지 않고 여기에 추가됩니다. 다음 예에서는 컨피그레이션 명령 시퀀스가 재배포에 어떤 영향을 줄 수 있는지 설명합니다.
R4#configure terminal R4(config)#router bgp 100 R4(config-router)#redistribute ospf 1 match internal R4(config-router)#^Z !--- Initially, you redistribute internal OSPF routes into BGP 100. R4#show run | include redistribute ospf redistribute ospf 1 match internal R4#configure terminal R4(config)#router bgp 100 R4(config-router)#redistribute ospf 1 match external R4(config-router)#^Z !--- With this second command, you tell BGP to also redistribute external OSPF routes. R4#show run | include redistribute ospf redistribute ospf 1 match internal external 1 external 2 R4# R4#configure terminal R4(config)#router bgp 100 R4(config-router)#no redistribute ospf 1 match external 2 R4(config-router)#^Z !--- With this no command, you only disable the redistribution of external type 2 into BGP.
!--- All other types of routes previously configured remain. R4#show run | include redistribute ospf redistribute ospf 1 match internal external 1 !--- As you can see, internal and external type 1 remain. R4#configure terminal R4(config)#router bgp 100 R4(config-router)#no redistribute ospf 1 match internal external 1 R4(config-router)#^Z !--- This no command removes all explicit match options but does not disable redistribution
!--- The remaining redistribute ospf 1 command uses the default behavior and redistributes
!--- internal routes only. R4#show run | include redistribute ospf redistribute ospf 1 R4#configure terminal R4(config)#router bgp 100 R4(config-router)#no redistribute ospf 1 !--- Use no redistribute ospfcommand to disable OSPF-to-BGP redistribution completely. R4(config-router)# ^Z R4#show run | include redistribute ospf R4#
경로 재배포는 한 프로토콜을 통해 학습된 경로를 다른 라우팅 프로토콜로 전파합니다. BGP가 IGP로 재배포되는 경우 기본적으로 eBGP에서 학습한 경로만 재배포됩니다. 라우터에 알려진 iBGP 학습 경로는 라우팅 루프 생성을 방지하기 위해 IGP에 도입되지 않습니다.
기본적으로 IGP로의 iBGP 재배포는 비활성화됩니다. bgp redistribute-internal 명령을 실행하여 iBGP 경로를 IGP로 재배포합니다. 경로 지도를 IGP로 사용하면서 특정 경로를 재배포하는 데 유의해야 합니다.
iBGP 경로를 OSPF로 재배포하기 위한 샘플 컨피그레이션이 여기에 표시됩니다.
Router(config)#router bgp 65345 Router(config-router)#bgp redistribute-internal ! Router(config)#router ospf 100 Router(config-router)#redistribute bgp 65345 subnets
주의: iBGP에서 학습한 경로를 IGP로 재배포하면 자동 시스템 내에서 라우팅 루프가 생성될 수 있습니다. 경로 맵과 함께 명시적으로 승인된 접두사만 재배포합니다.
OSPF에서 학습한 기본 경로를 BGP로 재배포하려면 경로 맵에서 0.0.0.0/0만 허용하고, 경로 맵을 OSPF 재배포에 적용하고, default-information originate를 사용하여 기본 경로를 재배포하도록 설정합니다.
! route-map map_default_only permit 10 match ip address acl_default_only ! ip access-list standard acl_default_only permit 0.0.0.0 ! router bgp 64601 redistribute ospf 1 route-map map_default_only default-information originate !
!--- Distributes the default route in bgp
network 0.0.0.0 명령은 별도의 시작 방법이며 라우팅 테이블에 정확한 기본 경로가 필요합니다.
! router bgp 64601 network 0.0.0.0 !
컨피그레이션 후 show ip bgp 0.0.0.0으로 기본 경로를 확인하고 show ip bgp neighbors <neighbor-address> advertised-routes로 알림을 확인합니다.
참고: BGP는 일반적으로 세션 재설정 없이 새 경로를 광고합니다. 즉각적인 무중단 업데이트 교환을 요청하려면 clear ip bgp * soft 명령을 실행합니다. 이 명령은 BGP 세션이 설정된 상태를 유지합니다.
| 개정 | 게시 날짜 | 의견 |
|---|---|---|
3.0 |
08-Sep-2026
|
재인증 - 업데이트된 SEO 및 서식 |
2.0 |
22-Apr-2025
|
제목, 머리글 및 서식 |
1.0 |
11-Oct-2001
|
최초 릴리스 |