트래픽 전달이 실패하면 게이트웨이 포드 내에서ncgcli를 실행하여 터널, 라우팅, 데이터 영역 프로그래밍 상태를 확인합니다.
피어에 대한 IPsec 터널이 설정되었는지 확인합니다.
ncgclioverlaypeersshow
오버레이 경로가 BGP로 교환되었고 적합한 IPsec 터널로 분석되었는지 확인합니다.
ncgclioverlayroutesshow
데이터 영역에 프로그래밍된 경로를 표시하고 출력에 오버레이 경로가 포함되어야 합니다.
ncgclifast-pathroutesshow
최대 전송 단위 조정
MTU(최대 전송 단위)는 헤더와 데이터를 포함하여 네트워크 계층 프로토콜에서 지원되는 최대 패킷 크기(바이트)를 의미합니다. 기본 네트워크 MTU 제한사항으로 인한 트래픽 문제가 있으면 OverlayVPNTunnel 커스텀 리소스에서 MTU를 구성할 수 있습니다. 터널의 기본 MTU는 1380바이트입니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-03(UTC)"],[],[],null,["This document gives troubleshooting guidance for issues related to your\nconnection to Google.\n\nNetwork Connectivity Gateway\n| **Preview**\n|\n|\n| This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products and features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nThis section gives troubleshooting tips related to\n[Network Connectivity Gateway](/kubernetes-engine/distributed-cloud/bare-metal/docs/how-to/network-connectivity-gateway).\nIf you need additional assistance, reach out to [Cloud Customer Care](/support-hub). You can also see [Getting support](/kubernetes-engine/distributed-cloud/bare-metal/docs/getting-support) for more information about support resources, including the following:\n\n- [Requirements](/kubernetes-engine/distributed-cloud/bare-metal/docs/getting-support#intro-support) for opening a support case.\n- [Tools](/kubernetes-engine/distributed-cloud/bare-metal/docs/getting-support#support-tools) to help you troubleshoot, such as your environment configuration, logs, and metrics.\n- Supported [components](/kubernetes-engine/distributed-cloud/bare-metal/docs/getting-support#what-we-support).\n\nVerify that the controller and gateway Pods are running\n\n- List the Network Connectivity Gateway Pods:\n\n kubectl --kubeconfig \u003cvar label=\"the path to your cluster kubeconfig file\" translate=\"no\"\u003eCLUSTER_KUBECONFIG\u003c/var\u003e get pods \\\n --namespace kube-system | grep ncg\n\n Replace \u003cvar scope=\"CLUSTER_KUBECONFIG\" translate=\"no\"\u003eCLUSTER_KUBECONFIG\u003c/var\u003e\n with the path of your cluster kubeconfig file.\n\n In the output, verify that you see a controller Pod and a gateway Pod. The name\n of the controller Pod begins with `ncg-controller`, and the name of the gateway\n Pod begins with `ncgd`. For example: \n\n ncg-controller-5f5d489b68-r87pp 1/1 Running\n ncgd-gvl76 1/1 Running\n\n Make a note of the name of the gateway Pod. You will need it for various\n troubleshooting commands.\n\nCheck the gateway Pod logs\n\n- Check to see if there are any errors in the logs from the gateway Pod:\n\n kubectl --kubeconfig \u003cvar scope=\"CLUSTER_KUBECONFIG\" translate=\"no\"\u003eCLUSTER_KUBECONFIG\u003c/var\u003e logs \u003cvar label=\"the name of your gateway Pod\" translate=\"no\"\u003eGATEWAY_POD\u003c/var\u003e \\\n --namespace kube-system\n\n Replace \u003cvar scope=\"GATEWAY_POD\" translate=\"no\"\u003eGATEWAY_POD\u003c/var\u003e with the name of your gateway Pod.\n\nRunning `ncgcli` inside the gateway Pod\n\nThe gateway Pod has a command-line tool named `ncgcli` that you can use to get\ninformation about the gateway and traffic in the tunnels.\n\n- Use the following command to run `ncgcli` inside the gateway Pod:\n\n kubectl --kubeconfig \u003cvar scope=\"CLUSTER_KUBECONFIG\" translate=\"no\"\u003eCLUSTER_KUBECONFIG\u003c/var\u003e exec -it \u003cvar scope=\"GATEWAY_POD\" translate=\"no\"\u003eGATEWAY_POD\u003c/var\u003e \\\n --namespace kube-system -- \u003cvar label=\"the ncgcli command\" translate=\"no\"\u003encgCLI_COMMAND\u003c/var\u003e\n\n Replace \u003cvar scope=\"ncgCLI_COMMAND\" translate=\"no\"\u003encgCLI_COMMAND\u003c/var\u003e with a\n `ncgcli` command.\n\n For example: \n\n kubectl --kubeconfig my-kubeconfig exec ncgd-6hkk2 --namespace kube-system \\\n -- ncgcli --help\n\nThe following sections give more examples of `ncgcli` commands.\n\nIPsec tunnel failed to come up\n\n- Check the status of the `NetworkConnectivityGateway` custom resource:\n\n kubectl --kubeconfig \u003cvar scope=\"CLUSTER_KUBECONFIG\" translate=\"no\"\u003eCLUSTER_KUBECONFIG\u003c/var\u003e get NetworkConnectivityGateway \\\n --namespace kube-system --output yaml\n\n In the output, verify that you see `Status: Healthy`. For example: \n\n apiVersion: networking.gke.io/v1alpha1\n kind: NetworkConnectivityGateway\n metadata:\n namespace: kube-system\n name: default\n spec:\n status:\n CurrNode: worker1-node\n CreatedTime: 2021-09-07T03:18:15Z\n LastReportTime: 2021-09-21T23:57:54Z\n Status: Healthy\n\n- Check the status of your `OverlayVPNTunnel` custom resources:\n\n kubectl --kubeconfig \u003cvar scope=\"CLUSTER_KUBECONFIG\" translate=\"no\"\u003eCLUSTER_KUBECONFIG\u003c/var\u003e get OverlayVPNTunnel \\\n --namespace kube-system --output yaml\n\n- Check the status of your tunnels from\n [inside the gateway Pod](#run-ncgcli-inside-gateway-pod):\n\n ncgcli overlay peers show\n\nFor more information, see\n[Cloud VPN troubleshooting](/network-connectivity/docs/vpn/support/troubleshooting).\n\nFailed to establish BGP session\n\nVerify that you have used link-local IP addresses, such as `169.254.1.2` and\n`169.254.2.2`, for the BGP sessions between the Cloud Router and the\ngateway Pod in your cluster.\n\n- Check the status of your BGP sessions:\n\n kubectl --kubeconfig \u003cvar scope=\"CLUSTER_KUBECONFIG\" translate=\"no\"\u003eCLUSTER_KUBECONFIG\u003c/var\u003e get OverlayBGPPeer \\\n --namespace kube-system --output yaml\n\n- Check the status of your BGP sessions from\n [inside the gateway Pod](#run-ncgcli-inside-gateway-pod):\n\n ncgcli overlay routes show\n\nFor more information about troubleshooting your BGP sessions, see the following:\n\n- [BGP session states](/network-connectivity/docs/router/concepts/bgp-states)\n- [Troubleshoot BGP\n peering](/network-connectivity/docs/router/support/troubleshoot-bgp-peering)\n- [Troubleshoot BGP routes and route\n selection](/network-connectivity/docs/router/support/troubleshoot-bgp-routes)\n\nTraffic forwarding issues even if the tunnel is up\n\nIf the traffic forwarding fails, run `ncgcli`\n[inside the gateway Pod](#run-ncgcli-inside-gateway-pod)\nto check the status of tunnels, routing, and data plane programming.\n\n- Ensure that IPsec tunnel to the peer is established:\n\n ncgcli overlay peers show\n\n- Confirm that the overlay routes have been exchanged over BGP and resolved to\n the appropriate IPsec tunnel:\n\n ncgcli overlay routes show\n\n- Display routes programmed in the data plane and the output should include\n overlay routes:\n\n ncgcli fast-path routes show\n\nAdjust maximum transmission unit\n\nThe\n[maximum transmission unit (MTU)](https://wikipedia.org/wiki/Maximum_transmission_unit)\nis the size, in bytes, of the largest packet supported by a network layer\nprotocol, including both headers and data. If there are traffic issues caused by\nunderlay network MTU limitations, you can configure the MTU on the\n`OverlayVPNTunnel` custom resource. The default MTU for the tunnels is 1380\nbytes.\n\nTo adjust MTU for your tunnels:\n\n1. Check the status of the tunnels:\n\n kubectl --kubeconfig \u003cvar scope=\"CLUSTER_KUBECONFIG\" translate=\"no\"\u003eCLUSTER_KUBECONFIG\u003c/var\u003e get OverlayVPNTunnel \\\n --namespace kube-system --output yaml\n\n The `status` section should look like the following example: \n\n status:\n IfName: ipsec2\n LastTransition: \"2022-06-16T07:13:28Z\"\n SLA:DiscoveredMTU: 1300\n Jitter(ms): 1\n Latency(ms): 26\n Loss(%): \"0.00\"\n\n If the `status.SLA.DiscoveredMTU` value is less than the default of `1380`,\n use the following steps to change the `Spec.mtu` value in your\n `OverlayVPNTunel` custom resources to match.\n2. Open your `OverlayVPNTunnel` custom resources for editing with the\n `kubectl edit` command:\n\n kubectl --kubeconfig \u003cvar scope=\"CLUSTER_KUBECONFIG\" translate=\"no\"\u003eCLUSTER_KUBECONFIG\u003c/var\u003e edit \u003cvar scope=\"CLUSTER_KUBECONFIG\" translate=\"no\"\u003eOVERLAY_VPN_TUNNEL_NAME\u003c/var\u003e\n --namespace kube-system --output yaml\n\n To avoid packet loss, configure the same MTU for the two `OverlayVPNTunnel`\n custom resources used by Network Connectivity Gateway.\n3. Set the `mtu` value to match the `DiscoveredMTU` value from the first step:\n\n apiVersion: networking.gke.io/v1alpha1\n kind: OverlayVPNTunnel\n metadata:\n name: vpc2\n namespace: kube-system\n Spec:mtu: 1300\n ikeKey:\n name: ike-key\n namespace: kube-system\n localTunnelIP: 169.254.0.2\n peer:\n publicIP: 34.100.10.10\n self:\n publicIP: 70.32.151.5\n\n4. To apply your changes, save and close your editor.\n\nFor more information about MTU and how it affects traffic performance, see\n[MTU considerations](/network-connectivity/docs/vpn/concepts/mtu-considerations).\n\nSee traffic flow and application-level statistics\n\nTo see traffic flow and statistics, run `ncgcli`\n[inside the gateway Pod](#run-ncgcli-inside-gateway-pod).\n\n- For an instantaneous view of the flows and traffic applications:\n\n ncgcli forwarding flows top\n\n- For aggregate statistics at the flow level:\n\n ncgcli forwarding flows aggregates show\n\n- For aggregate statistics at the interface level:\n\n ncgcli interfaces statistics show\n\nWhat's next If you need additional assistance, reach out to [Cloud Customer Care](/support-hub). You can also see [Getting support](/kubernetes-engine/distributed-cloud/bare-metal/docs/getting-support) for more information about support resources, including the following:\n\n- [Requirements](/kubernetes-engine/distributed-cloud/bare-metal/docs/getting-support#intro-support) for opening a support case.\n- [Tools](/kubernetes-engine/distributed-cloud/bare-metal/docs/getting-support#support-tools) to help you troubleshoot, such as your environment configuration, logs, and metrics.\n- Supported [components](/kubernetes-engine/distributed-cloud/bare-metal/docs/getting-support#what-we-support)."]]