您可以在要移轉的同盟區段上建立橋接器。

必要條件

  • 將 NSX Edge 橋接器設定為傳輸節點。請參閱將 NSX Edge 橋接器設定為傳輸節點
  • 建立 NSX Edge 叢集。請參閱建立 NSX Edge 叢集
  • 進行 NSX Manager 使用者介面的設定,並將切換可見度設定為對所有使用者可見。請參閱NSX 管理指南》中的〈設定使用者介面設定〉。

程序

  1. 使用 admin 權限登入 NSX Manager。
  2. 按一下右上角的管理程式按鈕,以選取 [管理程式] 模式。
  3. 導覽至網路 > 邏輯交換器 > Edge 橋接器設定檔,以建立 Edge 橋接器設定檔。
    此螢幕擷取畫面顯示 Edge 橋接器設定檔畫面
  4. 執行以下 API 呼叫,以綁定從 GM (全域管理程式) 區段建立的邏輯交換器。例如:
    POST https://<nsx-manager>/api/v1/bridge-endpoints
    {
        "bridge_endpoint_profile_id": "0010b881-0c1c-4829-98f3-8389697dc4e8", <- ID of the Bridge Endpoint Profile
        "vlan_transport_zone_id": "a95c914d-748d-497c-94ab-10d4647daeba", <- ID of the VLAN Transport Zone
        "vlan": 0 
    }
     
    Response:
    { 
        "vlan": 0,
        "vlan_trunk_spec": {
            "vlan_ranges": []
        },
        "ha_enable": true,
        "bridge_endpoint_profile_id": "0010b881-0c1c-4829-98f3-8389697dc4e8", <- ID of the Bridge Endpoint Profile
        "vlan_transport_zone_id": "a95c914d-748d-497c-94ab-10d4647daeba", <- ID of the Bridge Endpoint Profile
        "resource_type": "BridgeEndpoint",
        "id": "7e9c3517-f15b-490b-b14e-5ec356e92655", 
        "display_name": "7e9c3517-f15b-490b-b14e-5ec356e92655", <- ID of the Bridge Endpoint
        "tags": [],
        "_create_user": "admin",
        "_create_time": 1638555736780,
        "_last_modified_user": "admin",
        "_last_modified_time": 1638555736780,
        "_system_owned": false,
        "_protection": "NOT_PROTECTED",
        "_revision": 0
    }
    

    導覽至系統 > 網狀架構 > 傳輸區域,即可找到傳輸區域的 UUID。尋找 Edge 節點的 VLAN 傳輸區域。

    此螢幕擷取畫面顯示傳輸區域畫面
  5. 執行以下 API 呼叫,以在橋接器上建立連接埠。
    POST https://<nsx-manager>/api/v1/logical-ports 
    {
        "logical_switch_id": "dd2841db-dff9-4927-834f-11b5ac8803d4", <- ID of the Logical Switch
        "admin_state": "UP",
        "attachment": {
            "attachment_type": "BRIDGEENDPOINT",
            "id": "7e9c3517-f15b-490b-b14e-5ec356e92655" <- ID of the Bridge Endpoint
        }
    }
    
    Response:
    {
        "logical_switch_id": "dd2841db-dff9-4927-834f-11b5ac8803d4", <- ID of the Logical Switch
        "attachment": {
            "attachment_type": "BRIDGEENDPOINT",
            "id": "7e9c3517-f15b-490b-b14e-5ec356e92655"  <- ID of the Bridge Endpoint
        },
        "admin_state": "UP",
        "address_bindings": [],
        "switching_profile_ids": [
            {
                "key": "SwitchSecuritySwitchingProfile",
                "value": "47ffda0e-035f-4900-83e4-0a2086813ede"
            },
            {
                "key": "SpoofGuardSwitchingProfile",
                "value": "fad98876-d7ff-11e4-b9d6-1681e6b88ec1"
            },
            {
                "key": "IpDiscoverySwitchingProfile",
                "value": "64814784-7896-3901-9741-badeff705639"
            },
            {
                "key": "MacManagementSwitchingProfile",
                "value": "1e7101c8-cfef-415a-9c8c-ce3d8dd078fb"
            },
            {
                "key": "PortMirroringSwitchingProfile",
                "value": "93b4b7e8-f116-415d-a50c-3364611b5d09"
            },
            {
                "key": "QosSwitchingProfile",
                "value": "f313290b-eba8-4262-bd93-fab5026e9495"
            }
        ],
        "ignore_address_bindings": [],
        "internal_id": "55ac50fa-c5e1-413b-b1ec-2d85619cf5c3",
        "resource_type": "LogicalPort",
        "id": "55ac50fa-c5e1-413b-b1ec-2d85619cf5c3", <- ID of the Port created with the Bridge 
        "display_name": "55ac50fa-c5e1-413b-b1ec-2d85619cf5c3",
        "_create_user": "admin",
        "_create_time": 1638556071051,
        "_last_modified_user": "admin",
        "_last_modified_time": 1638556071051,
        "_system_owned": false,
        "_protection": "NOT_PROTECTED",
        "_revision": 0
    }

    您可以導覽至網路 > 邏輯交換器,查看其 UUID。

    此螢幕擷取畫面顯示交換器畫面

    此邏輯交換器是從全域管理程式建立的延伸區段。選取 [原則] 模式後,您可在 NSX Manager UI 中看到此區段。

    此螢幕擷取畫面顯示區段畫面

    在 [管理程式] 模式下,您可看到橋接器已成功。

    此螢幕擷取畫面顯示交換器畫面

    在 [原則] 模式下,您可看到已建立的 VIF。其中會顯示該 VIF 已連線至橋接器端點,但沒有進一步的詳細資料。

    此螢幕擷取畫面顯示區段連接埠畫面
    您可以執行下列 API 呼叫,取得此連接埠的詳細資訊:
    GET https://<nsx-manager>/api/v1/logical-ports/55ac50fa-c5e1-413b-b1ec-2d85619cf5c3
    
    Response:
    {
        "logical_switch_id": "dd2841db-dff9-4927-834f-11b5ac8803d4",
        "attachment": {
            "attachment_type": "BRIDGEENDPOINT",
            "id": "7e9c3517-f15b-490b-b14e-5ec356e92655"
        },
        "admin_state": "UP",
        "address_bindings": [],
        "switching_profile_ids": [
            {
                "key": "SwitchSecuritySwitchingProfile",
                "value": "47ffda0e-035f-4900-83e4-0a2086813ede"
            },
            {
                "key": "SpoofGuardSwitchingProfile",
                "value": "fad98876-d7ff-11e4-b9d6-1681e6b88ec1"
            },
            {
                "key": "IpDiscoverySwitchingProfile",
                "value": "64814784-7896-3901-9741-badeff705639"
            },
            {
                "key": "MacManagementSwitchingProfile",
                "value": "1e7101c8-cfef-415a-9c8c-ce3d8dd078fb"
            },
            {
                "key": "PortMirroringSwitchingProfile",
                "value": "93b4b7e8-f116-415d-a50c-3364611b5d09"
            },
            {
                "key": "QosSwitchingProfile",
                "value": "f313290b-eba8-4262-bd93-fab5026e9495"
            }
        ],
        "ignore_address_bindings": [],
        "internal_id": "55ac50fa-c5e1-413b-b1ec-2d85619cf5c3",
        "resource_type": "LogicalPort",
        "id": "55ac50fa-c5e1-413b-b1ec-2d85619cf5c3",
        "display_name": "55ac50fa-c5e1-413b-b1ec-2d85619cf5c3",
        "_create_user": "admin",
        "_create_time": 1638556071051,
        "_last_modified_user": "admin",
        "_last_modified_time": 1638556071051,
        "_system_owned": false,
        "_protection": "NOT_PROTECTED",
        "_revision": 0
    }

結果

現在,您已為同盟區段設定橋接器,接著請執行下列工作:

移轉之後移除橋接器

移轉後,移除不再需要的物件。
  1. 進行下列 PUT API 呼叫。邏輯連接埠識別碼 (55ac50fa-c5e1-413b-b1ec-2d85619cf5c3) 位於 POST API 呼叫 (上述步驟 5) 的回應中。使用 POST API 呼叫的回應作為此呼叫的本文,但不要包含 "attachment" 參數。
    PUT https://<nsx-manager>/api/v1/logical-ports/55ac50fa-c5e1-413b-b1ec-2d85619cf5c3
    {
        "logical_switch_id": "dd2841db-dff9-4927-834f-11b5ac8803d4",
        "admin_state": "UP",
        "address_bindings": [],
        "switching_profile_ids": [
            {
                "key": "SwitchSecuritySwitchingProfile",
                "value": "47ffda0e-035f-4900-83e4-0a2086813ede"
            },
            {
                "key": "SpoofGuardSwitchingProfile",
                "value": "fad98876-d7ff-11e4-b9d6-1681e6b88ec1"
            },
            {
                "key": "IpDiscoverySwitchingProfile",
                "value": "64814784-7896-3901-9741-badeff705639"
            },
            {
                "key": "MacManagementSwitchingProfile",
                "value": "1e7101c8-cfef-415a-9c8c-ce3d8dd078fb"
            },
            {
                "key": "PortMirroringSwitchingProfile",
                "value": "93b4b7e8-f116-415d-a50c-3364611b5d09"
            },
            {
                "key": "QosSwitchingProfile",
                "value": "f313290b-eba8-4262-bd93-fab5026e9495"
            }
        ],
        "ignore_address_bindings": [],
        "internal_id": "55ac50fa-c5e1-413b-b1ec-2d85619cf5c3",
        "resource_type": "LogicalPort",
        "id": "55ac50fa-c5e1-413b-b1ec-2d85619cf5c3",
        "display_name": "55ac50fa-c5e1-413b-b1ec-2d85619cf5c3",
        "_create_user": "admin",
        "_create_time": 1638556071051,
        "_last_modified_user": "admin",
        "_last_modified_time": 1638556071051,
        "_system_owned": false,
        "_protection": "NOT_PROTECTED",
        "_revision": 0
    }
  2. 執行以下 API 呼叫,以刪除連接埠和橋接器端點。連接埠識別碼和橋接器端點識別碼位於 POST API 呼叫 (上述步驟 5) 的回應中。
    DEL https://<nsx-manager>/api/v1/logical-ports/55ac50fa-c5e1-413b-b1ec-2d85619cf5c3
    DEL https://<nsx-manager>/api/v1/bridge-endpoints/7e9c3517-f15b-490b-b14e-5ec356e92655