4.9.2. BGP 문제 해결


클러스터 관리자는 BGP 구성 문제를 해결해야 하는 경우 FRR 컨테이너에서 명령을 실행해야 합니다.

사전 요구 사항

  • cluster-admin 역할의 사용자로 클러스터에 액세스할 수 있어야 합니다.
  • OpenShift CLI(oc)가 설치되어 있습니다.

프로세스

  1. OpenShift Container Platform 4.17 이상에서 MetalLB는 FRR-K8s를 BGP의 기본 백엔드로 사용합니다. MetalLB Operator는 metallb-system 네임스페이스에 설정된 FRR-K8s 데몬을 배포합니다. 다음 명령을 실행하여 frr-k8s Pod의 이름을 표시합니다.

    $ oc get pods -n metallb-system

    출력 예

    NAME                                     READY   STATUS    RESTARTS   AGE
    frr-k8s-bz2dn                            7/7     Running   0          15m
    frr-k8s-statuscleaner-59cf6f5d44-9wkfr   1/1     Running   0          15m

  2. 다음 명령을 실행하여 FRR에 대한 실행 중인 구성을 표시합니다.

    $ oc exec -n metallb-system <frr-k8s-pod> -c frr -- vtysh -c "show running-config"

    출력 예

    Building configuration...
    
    Current configuration:
    !
    frr version 8.5.3
    frr defaults traditional
    hostname mysno-sno.demo.lab
    log file /etc/frr/frr.log informational
    log timestamp precision 3
    no ip forwarding
    no ipv6 forwarding
    service integrated-vtysh-config
    !
    router bgp 64500
     bgp router-id 10.0.1.2
     no bgp ebgp-requires-policy
     no bgp default ipv4-unicast
     bgp graceful-restart preserve-fw-state
     no bgp network import-check
     neighbor 10.0.2.3 remote-as 64500
     neighbor 10.0.2.3 bfd profile doc-example-bfd-profile-full
     neighbor 10.0.2.3 timers 5 15
     neighbor 10.0.2.4 remote-as 64500
     neighbor 10.0.2.4 bfd profile doc-example-bfd-profile-full
     neighbor 10.0.2.4 timers 5 15
     !
     address-family ipv4 unicast
      network 203.0.113.200/30
      neighbor 10.0.2.3 activate
      neighbor 10.0.2.3 route-map 10.0.2.3-in in
      neighbor 10.0.2.4 activate
      neighbor 10.0.2.4 route-map 10.0.2.4-in in
     exit-address-family
     !
     address-family ipv6 unicast
      network fc00:f853:ccd:e799::/124
      neighbor 10.0.2.3 activate
      neighbor 10.0.2.3 route-map 10.0.2.3-in in
      neighbor 10.0.2.4 activate
      neighbor 10.0.2.4 route-map 10.0.2.4-in in
     exit-address-family
    exit
    !
    ip prefix-list 192.168.122.12-inpl-ipv4 seq 1 deny any
    ip prefix-list 192.168.122.12-allowed-ipv4 seq 1 permit 192.168.122.210/32
    !
    ipv6 prefix-list 192.168.122.12-allowed-ipv6 seq 1 deny any
    ipv6 prefix-list 192.168.122.12-inpl-ipv4 seq 2 deny any
    !
    route-map 192.168.122.12-out permit 1
     match ip address prefix-list 192.168.122.12-allowed-ipv4
    exit
    !
    route-map 192.168.122.12-out permit 2
     match ipv6 address prefix-list 192.168.122.12-allowed-ipv6
    exit
    !
    route-map 192.168.122.12-in permit 3
     match ip address prefix-list 192.168.122.12-inpl-ipv4
    exit
    !
    route-map 192.168.122.12-in permit 4
     match ipv6 address prefix-list 192.168.122.12-inpl-ipv4
    exit
    !
    ip nht resolve-via-default
    !
    ipv6 nht resolve-via-default
    !
    end

    다음과 같습니다.

    라우터 bgp 64500
    라우터 bgp 섹션은 MetalLB의 ASN을 나타냅니다.
    약 10.0.2.3 remote-as 64500
    추가한 각 BGP 피어 사용자 지정 리소스에 대해 서로 인접한 <ip-address> remote-as <peer-ASN > 행이 있는지 확인합니다.
    bFD 프로필 doc-example-bfd-profile-full
    BFD를 구성한 경우 BFD 프로필이 올바른 BGP 피어와 연결되고 BFD 프로필이 명령 출력에 표시되는지 확인합니다.
    network 203.0.113.200/30
    < ip-address-range> 네트워크가 추가한 주소 풀에서 지정한 IP 주소 범위와 일치하는지 확인합니다.
  3. 다음 명령을 실행하여 BGP 요약을 표시합니다.

    $ oc exec -n metallb-system <frr-k8s-pod> -c frr -- vtysh -c "show bgp summary"

    출력 예

    IPv4 Unicast Summary (VRF default):
    BGP router identifier 192.168.122.12, local AS number 64501 vrf-id 0
    BGP table version 1
    RIB entries 1, using 192 bytes of memory
    Peers 1, using 725 KiB of memory
    
    Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt
    10.0.2.3        4      64500       387       389        0    0    0 00:32:02            0        1
    10.0.2.4        4      64500         0         0        0    0    0    never       Active        0
    
    Total number of neighbors 1

    다음과 같습니다.

    10.0.2.3
    출력에 추가한 각 BGP 피어 사용자 지정 리소스에 대한 행이 포함되어 있는지 확인합니다.
    10.0.2.4
    0 개의 메시지 및 전송된 메시지를 표시하는 출력은 BGP 세션이 없는 BGP 피어를 나타냅니다. 네트워크 연결 및 BGP 피어의 BGP 구성을 확인합니다.
  4. 다음 명령을 실행하여 주소 풀을 수신한 BGP 피어를 표시합니다.

    $ oc exec -n metallb-system <frr-k8s-pod> -c frr -- vtysh -c "show bgp ipv4 unicast"

    ipv4ipv6 으로 교체하여 IPv6 주소 풀을 수신한 BGP 피어를 표시합니다.

    출력 예

    BGP routing table entry for 203.0.113.200/30
    Paths: (1 available, best #1, table default)
      Advertised to non peer-group peers:
      10.0.2.3
      Local
        0.0.0.0 from 0.0.0.0 (10.0.1.2)
          Origin IGP, metric 0, weight 32768, valid, sourced, local, best (First path received)
          Last update: Mon Jan 10 19:49:07 2022

    다음과 같습니다.

    10.0.2.3
    출력에 BGP 피어의 IP 주소가 포함되어 있는지 확인합니다.
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동