netsh -c Interface ip add address name="Gig Ethernet" addr=10.10.0.21 mask=255.255.0.0
通常位于 C:\WINDOWS\Help 中的 ntcmds.chm 文件包含关于 netsh 命令的更多详细信息。如果不再需要 IP 别名,请使用以下命令将其移除:
netsh -c Interface ip delete address name="Gig Ethernet" addr=10.10.0.21
还可以使用批处理文件来添加和删除这些别名。