NSX-T 和 NSX-v 设置中的所有逻辑路由器接口具有相同的 MAC 地址 (02:50:56:56:44:52)。从 NSX-T Data Center 3.0.2 开始,您可以在 NSX-T 中更改该地址,以避免在将虚拟机从 NSX-v 设置迁移到 NSX-T 设置时出现问题。
更改 MAC 地址涉及进行两次 API 调用。
如果尚未创建任何传输节点,请进行以下 GET API 调用。例如:
GET https://10.40.79.126/api/v1/global-configs/RoutingGlobalConfig Response: { "l3_forwarding_mode" : "IPV4_ONLY", "logical_uplink_mtu" : 1500, "vdr_mac" : "02:50:56:56:44:77", "vdr_mac_nested" : "02:50:56:56:44:52", "allow_changing_vdr_mac_in_use" : true, "resource_type" : "RoutingGlobalConfig", "id" : "49b261fe-f4e4-46ad-958c-da9cb4271e32", "display_name" : "49b261fe-f4e4-46ad-958c-da9cb4271e32", "_create_user" : "system", "_create_time" : 1595313890595, "_last_modified_user" : "admin", "_last_modified_time" : 1595465694142, "_system_owned" : false, "_protection" : "NOT_PROTECTED", "_revision" : 14 }
获取该调用的响应,更改
vdr_mac 值,然后使用它进行以下 PUT API 调用。例如:
PUT https://10.40.79.126/api/v1/global-configs/RoutingGlobalConfig { "l3_forwarding_mode" : "IPV4_ONLY", "logical_uplink_mtu" : 1500, "vdr_mac" : "02:50:56:56:44:99", "vdr_mac_nested" : "02:50:56:56:44:53", "allow_changing_vdr_mac_in_use" : true, "resource_type" : "RoutingGlobalConfig", "id" : "49b261fe-f4e4-46ad-958c-da9cb4271e32", "display_name" : "49b261fe-f4e4-46ad-958c-da9cb4271e32", "_create_user" : "system", "_create_time" : 1595313890595, "_last_modified_user" : "admin", "_last_modified_time" : 1595465694142, "_system_owned" : false, "_protection" : "NOT_PROTECTED", "_revision" : 14 } Response: { "l3_forwarding_mode" : "IPV4_ONLY", "logical_uplink_mtu" : 1500, "vdr_mac" : "02:50:56:56:44:99", "vdr_mac_nested" : "02:50:56:56:44:53", "allow_changing_vdr_mac_in_use" : true, "resource_type" : "RoutingGlobalConfig", "id" : "49b261fe-f4e4-46ad-958c-da9cb4271e32", "display_name" : "49b261fe-f4e4-46ad-958c-da9cb4271e32", "_create_user" : "system", "_create_time" : 1595313890595, "_last_modified_user" : "admin", "_last_modified_time" : 1595466163148, "_system_owned" : false, "_protection" : "NOT_PROTECTED", "_revision" : 15 }
如果已创建传输节点,请进行相同的 GET 和 PUT API 调用;所不同的是,对于 PUT 调用,请将 allow_changing_vdr_mac_in_use 参数设置为 true
。