在這種情況下,連線測試會透過 Network Connectivity Center 中樞,追蹤從一個 VM 到另一個 VM 的模擬封包。您可以存取來源網路、目的地網路和 Network Connectivity Center 中樞所在的專案設定。您會在來源網路中指定來源 IP 位址。如果指派給 VM 執行個體,則追蹤記錄會從該執行個體開始。否則,系統會從網路開始,並檢查網路層級設定。您也可以提供目的地 VM 執行個體 IP 位址,而非 URI。
下圖顯示兩個 VM 執行個體之間透過 Network Connectivity Center hub 的典型追蹤路徑。
透過 Network Connectivity Center hub 進行 VM 對 VM 追蹤 (按一下可放大)。
透過 Network Connectivity Center hub 從 VM 到 VM 的成功測試輸出範例 (按一下可放大)。
透過 Network Connectivity Center 中樞,測試 VM 與其他專案之間的連線
在這種情況下,連線測試會透過 Network Connectivity Center 中心,追蹤從來源 VM 到目的地 VM 的模擬封包,但您無法存取目的地網路或 Network Connectivity Center 中心。如果沒有目的地網路或 Network Connectivity Center 中樞的權限,可能會導致下表所列的測試結果。
權限
行為
追蹤記錄結果
您沒有權限存取目的地網路或 Network Connectivity Center 中樞所在的專案設定。
連線測試只能追蹤已知網路專案中的設定。
設定分析顯示的結果為「封包可能會轉送」。這項結果表示封包會離開網路,並傳送至您無法存取的網路,這表示封包的傳送狀態未知。這個情境有助於您瞭解已知網路沒有封鎖設定。在 API 回應中,這個狀態會對應至 Forward 的最終狀態。
下圖顯示從 VM 到 VM 的一般追蹤路徑,經由 Network Connectivity Center 中樞連線至其他專案中無法存取的網路。Match routes 物件可代表路徑,在透過 Network Connectivity Center 中樞連線的兩個網路之間引導流量。
VM 到 VM 追蹤記錄,透過 Network Connectivity Center 中樞連線至其他專案中無法存取的網路 (按一下可放大)。
[[["容易理解","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-08 (世界標準時間)。"],[],[],null,["# Test between VM instances through a Network Connectivity Center hub\n\nThis page describes the scenarios for testing connectivity\nfrom a source VM to a destination VM connected through a Network Connectivity Center hub.\n\nIf two VPC networks are connected through a Network Connectivity Center\nhub, there are two scenarios to test the connectivity:\n\n- Test from VM to VM through a Network Connectivity Center hub.\n- Test from VM to VM through a Network Connectivity Center hub to a different project.\n\nTrace diagrams on this page use the symbols described in the following legend.\n\nTest from VM to VM through a Network Connectivity Center hub\n------------------------------------------------------------\n\nIn this scenario, Connectivity Tests traces a simulated packet from one VM\nto another through a Network Connectivity Center hub. You have access to the project\nconfigurations where the source network, destination network, and\nNetwork Connectivity Center hub are located.\nYou specify a source IP address within the source network. If it's assigned to\na VM instance, the trace starts from the instance. Otherwise, it starts\nfrom the network and checks network level configurations.\nAlternatively, you can provide the destination VM instance IP address\ninstead of the URI.\n| **Note:** The destination network is optional because it's inferred from the routing.\n\nThe following diagram shows the typical trace path between two VM instances\nthrough a Network Connectivity Center hub.\n\n\n[](/static/network-intelligence-center/docs/connectivity-tests/images/vm-2-vm-via-ncchub.svg) VM to VM trace through a Network Connectivity Center hub (click to enlarge).\n\n\u003cbr /\u003e\n\nThe following successful test result indicates an\n[overall result of `Reachable`](/network-intelligence-center/docs/connectivity-tests/concepts/state-tables#result-values).\nIt also shows the peering route discovered in the VPC peering\ntrace.\n\n\n[](/static/network-intelligence-center/docs/connectivity-tests/images/example-vm-2-vm-ncchub.png) Example output for a successful test from VM to VM through a Network Connectivity Center hub (click to enlarge).\n\n\u003cbr /\u003e\n\nTest from VM to VM through a Network Connectivity Center hub to a different project\n-----------------------------------------------------------------------------------\n\nIn this scenario, Connectivity Tests traces a simulated packet from a\nsource VM to a destination VM through a Network Connectivity Center hub, but\nyou don't have access to the destination network or the Network Connectivity Center hub.\nNot having permission to the destination network or Network Connectivity Center hub\ncan cause the test result listed in the following table.\n\nThe following diagram shows the typical trace path from VM to VM\nthrough a Network Connectivity Center hub to an inaccessible network in a different\nproject. The `Match routes` object can represent routes that direct traffic\nbetween two networks that are connected through a Network Connectivity Center hub.\n\n\n[](/static/network-intelligence-center/docs/connectivity-tests/images/vm-2-vm-via-ncchub-fwd-state.svg) VM to VM trace through a Network Connectivity Center hub to an inaccessible network in a different project (click to enlarge).\n\n\u003cbr /\u003e\n\nWhat's next\n-----------\n\n- [Common test scenarios](/network-intelligence-center/docs/connectivity-tests/concepts/common-use-cases)\n- [Learn about Connectivity Tests](/network-intelligence-center/docs/connectivity-tests/concepts/overview)\n- [Troubleshoot Connectivity Tests](/network-intelligence-center/docs/connectivity-tests/support/troubleshooting)"]]