AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 102411
Accepted
newmanth
newmanth
Asked: 2010-01-14 12:20:46 +0800 CST2010-01-14 12:20:46 +0800 CST 2010-01-14 12:20:46 +0800 CST

修改 Hyper-V 服务器/服务器核心的 NIC 绑定顺序

  • 772

有没有办法修改 Hyper-V 服务器/服务器核心中的 NIC 绑定顺序?出于某种原因,我们的一台 Hyper-V 服务器决定颠倒机器上六个 NIC 端口中的两个的绑定顺序,使其与我们所有其他服务器不一致(更不用说与物理布局不一致了)网卡)。

我知道这可以通过完整服务器安装中的网络设置 GUI 来完成,但是很遗憾,说 GUI 在服务器核心中不存在。我相信这需要直接编辑注册表,但我不确定在哪里。

任何帮助,将不胜感激。

hyper-v windows-registry windows-server-core nic
  • 3 3 个回答
  • 2586 Views

3 个回答

  • Voted
  1. user49392
    2010-07-27T12:18:38+08:002010-07-27T12:18:38+08:00

    Nvspbind 实用程序将为您提供帮助:http ://code.msdn.microsoft.com/nvspbind

    • 2
  2. Best Answer
    songei2f
    2010-07-27T17:27:36+08:002010-07-27T17:27:36+08:00

    我查了这个,因为我真的可以使用它。如果您正在运行 Core,您可能不希望或无权安装额外的软件,即使它是 CodePlex 挖掘(我更尊重这一点,而不是直接使用 Microsoft 垃圾)。您可以使用 WMI 以编程方式执行此操作

    ==== snip - Start of script code Set_Wireless_NIC_IPMetric.vbs script ====
    On Error Resume Next
    
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    
    regValueDataMetric = "35"
    
    Set colItems = objWMIService.ExecQuery _
    ("Select * From Win32_NetworkAdapter Where NetConnectionID = 'Wireless Network Connection'")
    
    For Each objItem in colItems
    strMACAddress = objItem.MACAddress
    Wscript.Echo "MACAddress: " & strMACAddress
    Next
    
    Set colNetCard = objWMIService.ExecQuery _
    ("Select * From Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
    
    For Each objNetCard in colNetCard
    If objNetCard.MACAddress = strMACAddress Then
    For Each strIPAddress in objNetCard.IPAddress
    Wscript.Echo "Description: " & objNetCard.Description
    Wscript.Echo "IP Address: " & strIPAddress
    Wscript.Echo "IPConnectionMetric: " & objNetCard.IPConnectionMetric
    objNetCard.SetIPConnectionMetric(regValueDataMetric)
    Next
    End If
    Next
    ==== snip - End of VBS script ====
    

    或者,当您确定相关 NIC 的 MAC 地址或唯一标识符时,从 WMIC 执行一次性操作。

    # Find the NIC you want.
    wmic nicconfig where "ipenabled='true'" get caption, macaddress
    
    # Set it on the NIC of choice.
    wmic nicconfig where "ipenabled='true' and macaddress='00:00:00:00:00:AA'" call setipconnectionmetric(METRICYOUWANT)
    

    它返回 0,但我不知道为什么它没有出现。也许你需要重置网卡。

    • 1
  3. Chris S
    2010-07-27T12:39:23+08:002010-07-27T12:39:23+08:00

    除此以外,Nvspbind 还适用于许多事情。如果您只是想重命名接口,netsh 也可以这样做。

    附带说明;我通常为它们的目的命名 Teamed Interfaces,因此无论有多少 NIC、什么类型或其他什么,它在服务器之间都是一致的。NIC 团队通常是“Mgmt”、“LAN”和“iSCSI”(替换您喜欢的名称)。

    • 0

相关问题

  • Hyper-V 企业许可 - 包含的 CAL 是否应用于每个 VM 或每个 VM?[复制]

  • Hyper-V 和 Drobo Pro

  • 小型企业的服务器虚拟化/RAID 配置

  • 交换服务器 2003 在 hyper-v 上

  • 在同一台机器上将域控制器作为 1 个 VM 和一个 RODC 作为另一个 VM 运行,它会工作吗?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    从 IP 地址解析主机名

    • 8 个回答
  • Marko Smith

    如何按大小对 du -h 输出进行排序

    • 30 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    MikeN 在 Nginx 中,如何在维护子域的同时将所有 http 请求重写为 https? 2009-09-22 06:04:43 +0800 CST
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    0x89 bash中的双方括号和单方括号有什么区别? 2009-08-10 13:11:51 +0800 CST
  • Martin Hope
    Kyle Brandt IPv4 子网如何工作? 2009-08-05 06:05:31 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve