BGP는 TCP/IP 네트워크에서 도메인 간 라우팅을 수행하는 데 사용되는 EGP(외부 게이트웨이 프로토콜)입니다.BGP 업데이트를 교환하려면 먼저 BGP 라우터가 각 BGP 피어에 대한 연결(TCP 포트 179)을 설정해야 합니다.두 BGP 피어 간의 BGP 세션은 BGP 피어가 서로 다른 AS(autonomous system)에 있는 경우 eBGP(external BGP) 세션이라고 합니다.두 BGP 피어 간의 BGP 세션은 BGP 피어가 동일한 자동 시스템에 있는 경우 iBGP(internal BGP) 세션으로 간주됩니다.
기본적으로 피어 관계는 피어 라우터에 가장 가까운 인터페이스의 IP 주소를 사용하여 설정됩니다.그러나 neighbor update-source(등록된 고객만 해당) 명령을 사용하면 루프백 인터페이스를 비롯한 모든 운영 인터페이스를 지정하여 TCP 연결을 설정할 수 있습니다.루프백 인터페이스를 사용하여 피어링하는 이 방법은 BGP 피어 간에 여러 경로가 있을 경우 BGP 세션을 종료하지 않으므로 유용합니다. 그렇지 않으면 세션 설정에 사용된 물리적 인터페이스가 다운될 경우 BGP 세션이 해제됩니다.또한 BGP를 실행하는 라우터와 여러 링크가 있는 라우터는 사용 가능한 경로를 통해 로드 밸런싱을 수행할 수 있습니다.
이 문서의 샘플 컨피그레이션은 iBGP 및 eBGP에 대한 컨피그레이션으로, 루프백 주소를 포함하거나 포함하지 않습니다.
참고: 이 컨피그레이션을 사용하여 네이버 관계를 설정할 수 있습니다.더 복잡한 컨피그레이션은 Interdomain Routing에 Border Gateway Protocol 사용을 참조하십시오.
이 구성을 시도하기 전에 다음 요구 사항을 충족해야 합니다.
BGP 프로토콜 지식
이 문서는 특정 소프트웨어 및 하드웨어 버전으로 한정되지 않습니다.이 문서에 표시된 명령 출력은 IOS® 버전 12.2(24a)를 실행하는 2500 Series 라우터에서 가져왔습니다.
문서 표기 규칙에 대한 자세한 내용은 Cisco 기술 팁 표기 규칙을 참조하십시오.
이 섹션에서는 다음 컨피그레이션 예를 제공합니다.
이 섹션에는 이 문서에서 설명하는 기능을 구성하기 위한 정보가 표시됩니다.
참고: 이 문서에 사용된 명령에 대한 추가 정보를 찾으려면 명령 조회 도구(등록된 고객만 해당)를 사용합니다.
이 문서에서는 다음 네트워크 설정을 사용합니다.
이 구성에서는 두 라우터가 모두 AS 400에 있습니다.
R1-AGS | R6-2500 |
---|---|
Current configuration: !-- Output suppressed. interface Serial1 ip address 10.10.10.1 255.255.255.0 ! router bgp 400 !--- Enables BGP for the autonomous !--- system 400. neighbor 10.10.10.2 remote-as 400 !--- Specifies a neighbor 10.10.10.2 !--- in the remote AS 400, making !--- this an iBGP connection. !-- Output suppressed. end |
Current configuration: !-- Output suppressed. interface Serial0 ip address 10.10.10.2 255.255.255.0 ! router bgp 400 neighbor 10.10.10.1 remote-as 400 !-- Output suppressed. end |
이 컨피그레이션에서는 라우터 R1-AGS가 AS 300에 있고 라우터 R6-2500이 AS 400에 있습니다.
R1-AGS | R6-2500 |
---|---|
Current configuration: !-- Output suppressed interface Serial1 ip address 10.10.10.1 255.255.255.0 ! router bgp 300 !--- Enables BGP for the autonomous !--- system 300. neighbor 10.10.10.2 remote-as 400 !--- Specifies a neighbor 10.10.10.2 !--- in the remote AS 400, making !--- this an eBGP connection. !-- Output suppressed. end |
Current configuration: !-- Output suppressed. interface Serial0 ip address 10.10.10.2 255.255.255.0 ! router bgp 400 neighbor 10.10.10.1 remote-as 300 !-- Output suppressed. end |
피어는 eBGP를 사용할 때 직접 연결되어야 합니다.직접 연결되지 않은 경우 neighbor ebgp-multihop(등록된 고객만 해당) 명령을 사용해야 하며 라우터가 네이버 관계를 설정하려면 IGP 또는 고정 경로를 통해 피어에 도달해야 합니다.위의 구성에서 R1-AGS 라우터는 AS 300에 속하고 R6-2500 라우터는 AS 400에 속합니다.
이 섹션에 나와 있는 것처럼 루프백 주소(또는 기타 모든 운영 인터페이스)를 사용하여 iBGP를 구성할 수 있습니다.
R1-AGS | R6-2500 |
---|---|
Current configuration: !-- Output suppressed. interface Loopback0 ip address 1.1.1.1 255.255.255.255 ! interface Serial1 ip address 10.10.10.1 255.255.255.0 ! router bgp 300 neighbor 2.2.2.2 remote-as 300 neighbor 2.2.2.2 update-source Loopback0 !--- This command specifies that the TCP !--- connection with the specified external !--- peer should be established using the !--- address on the loopback interface. ! ip route 2.2.2.2 255.255.255.255 10.10.10.2 !--- This static route ensures that the !--- remote peer address used for peering !--- is reachable. !-- Output suppressed. end |
Current configuration: !-- Output suppressed. interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! interface Serial0 ip address 10.10.10.2 255.255.255.0 ! router bgp 300 neighbor 1.1.1.1 remote-as 300 neighbor 1.1.1.1 update-source Loopback0 ! ip route 1.1.1.1 255.255.255.255 10.10.10.1 !-- Output suppressed. end |
이 섹션에 나와 있는 것처럼 루프백 주소(또는 기타 모든 운영 인터페이스)를 사용하여 eBGP를 구성할 수도 있습니다.루프백 인터페이스는 단일 및 멀티홈 환경에서 BGP를 통한 로드 공유의 BGP 네이버 섹션으로 루프백 주소를 사용하여 로드 공유에 표시된 것처럼 다중 경로를 가진 네트워크에서 연결을 보장하기 위해 다음과 같은 방법으로 사용됩니다.샘플 구성.
R1-AGS | R6-2500 |
---|---|
Current configuration: !-- Output suppressed. interface Loopback0 ip address 1.1.1.1 255.255.255.255 ! interface Serial1 ip address 10.10.10.1 255.255.255.0 ! router bgp 300 neighbor 2.2.2.2 remote-as 400 neighbor 2.2.2.2 ebgp-multihop 2 !--- This command changes the ttl value in !--- order to allow the packet to reach the !--- external BGP peer which is not directly !--- connected or is using an interface other !--- than the directly connected interface. neighbor 2.2.2.2 update-source Loopback0 !--- This command specifies that the TCP !--- connection with the external BGP !--- peer should be established using the !--- address on the loopback interface. ! ip route 2.2.2.2 255.255.255.255 10.10.10.2 !--- This static route ensures that the !--- remote peer address used for peering !--- is reachable. !-- Output suppressed. end |
Current configuration: !-- Output suppressed. interface Loopback0 ip address 2.2.2.2 255.255.255.255 ! interface Serial0 ip address 10.10.10.2 255.255.255.0 ! router bgp 400 neighbor 1.1.1.1 remote-as 300 neighbor 1.1.1.1 ebgp-multihop 2 neighbor 1.1.1.1 update-source Loopback0 ! ip route 1.1.1.1 255.255.255.255 10.10.10.1 !-- Output suppressed. end |
이 섹션에서는 컨피그레이션이 제대로 작동하는지 확인하는 데 사용할 수 있는 정보를 제공합니다.특정 show 명령은 출력 인터프리터 도구 에서 지원되므로 show 명령 출력 분석을 볼 수 있습니다.
show ip bgp neighbors(등록된 고객만 해당) 명령을 사용하여 TCP 및 BGP(Border Gateway Protocol) 연결에 대한 정보를 표시하고 BGP 피어가 설정되었는지 확인합니다.아래의 show ip bgp neighbors 명령 출력은 BGP 상태를 'Established'로 표시하며, 이는 BGP 피어 관계가 성공적으로 설정되었음을 나타냅니다.
R1-AGS# show ip bgp neighbors | include BGP BGP neighbor is 10.10.10.2, remote AS 400, internal link BGP version 4, remote router ID 2.2.2.2 BGP state = Established, up for 00:04:20 BGP table version 1, neighbor version 1 R1-AGS#
show ip bgp neighbors 명령이 수정자와 함께 사용되었습니다. | 포함 BGP.이렇게 하면 명령 출력을 필터링하고 관련 부분만 표시하여 출력을 더 쉽게 읽을 수 있습니다.
또한 show ip bgp summary(등록된 고객만 해당) 명령을 사용하여 아래와 같이 모든 BGP 연결의 상태를 표시할 수도 있습니다.
R1-AGS(9)# show ip bgp summary BGP router identifier 10.1.1.2, local AS number 400 BGP table version is 1, main routing table version 1 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 10.10.10.2 4 400 3 3 1 0 0 00:00:26 0
show ip bgp neighbors(등록된 고객만 해당) 명령을 사용하여 TCP 및 BGP(Border Gateway Protocol) 연결에 대한 정보를 표시하고 BGP 피어가 설정되었는지 확인합니다.아래의 show ip bgp neighbors 명령 출력은 BGP 상태를 'Established'로 표시하며, 이는 BGP 피어 관계가 성공적으로 설정되었음을 나타냅니다.
R1-AGS# show ip bgp neighbors | include BGP BGP neighbor is 10.10.10.2, remote AS 400, external link BGP version 4, remote router ID 2.2.2.2 BGP state = Established, up for 00:00:17 BGP table version 1, neighbor version 1
또한 show ip bgp summary(등록된 고객만 해당) 명령을 사용하여 아래와 같이 모든 BGP 연결의 상태를 표시할 수도 있습니다.
R1-AGS(9)# show ip bgp summary BGP router identifier 10.10.10.1, local AS number 300 BGP table version is 1, main routing table version 1 Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 10.10.10.2 4 400 3 3 1 0 0 00:00:26 0
show ip bgp neighbors(등록된 고객만 해당) 명령을 사용하여 TCP 및 BGP(Border Gateway Protocol) 연결에 대한 정보를 표시하고 BGP 피어가 설정되었는지 확인합니다.아래의 show ip bgp neighbors 명령 출력은 BGP 상태를 'Established'로 표시하며, 이는 BGP 피어 관계가 성공적으로 설정되었음을 나타냅니다.
R1-AGS# show ip bgp neighbors | include BGP BGP neighbor is 2.2.2.2, remote AS 300, internal link BGP version 4, remote router ID 2.2.2.2 BGP state = Established, up for 00:00:28 BGP table version 1, neighbor version 1 R1-AGS#
또한 show ip bgp summary(등록된 고객만 해당) 명령을 사용하여 아래와 같이 모든 BGP 연결의 상태를 표시할 수도 있습니다.
R1-AGS(9)# show ip bgp summary 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 400 3 3 1 0 0 00:00:26 0
show ip bgp neighbors(등록된 고객만 해당) 명령을 사용하여 TCP 및 BGP(Border Gateway Protocol) 연결에 대한 정보를 표시하고 BGP 피어가 설정되었는지 확인합니다.아래의 show ip bgp neighbors 명령 출력은 BGP 상태를 'Established'로 표시하며, 이는 BGP 피어 관계가 성공적으로 설정되었음을 나타냅니다.
R1-AGS# show ip bgp neighbors | include BGP BGP neighbor is 2.2.2.2, remote AS 400, external link BGP version 4, remote router ID 2.2.2.2 BGP state = Established, up for 00:00:16 BGP table version 1, neighbor version 1 External BGP neighbor may be up to 2 hops away.
또한 show ip bgp summary(등록된 고객만 해당) 명령을 사용하여 아래와 같이 모든 BGP 연결의 상태를 표시할 수도 있습니다.
R1-AGS(9)# show ip bgp summary BGP router identifier 1.1.1.1, local AS number 300 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 400 3 3 1 0 0 00:00:26 0
BGP 인접 디바이스가 유휴, 연결 및 활성 상태 사이를 전환해야 하는 이유를 참조하십시오.문제 해결 정보를 위한 BGP 트러블슈팅
개정 | 게시 날짜 | 의견 |
---|---|---|
1.0 |
11-May-2006 |
최초 릴리스 |