设置我们的新Dev服务器分配多个IP地址的最简单方法是什么

时间:2022-04-01 23:34:59

I'm setting up our new Dev server, what is the easiest way to assign multiple IP addresses to Windows 2008 Server Network Adapter?

我正在设置我们的新Dev服务器,为Windows 2008 Server Network Adapter分配多个IP地址的最简单方法是什么?

I'm setting up our development machine, running IIS 7 and want to have the range between 192.168.1.200 - .254 available when I'm setting up a new website in IIS 7.

我正在设置我们的开发机器,运行IIS 7并希望在IIS 7中设置新网站时可以使用192.168.1.200 - .254之间的范围。

3 个解决方案

#1


2  

The complete CMD.EXE loop:

完整的CMD.EXE循环:

FOR /L %b IN (200,1,254) DO netsh interface ip add address "your_adapter" 192.168.1.%b 255.255.255.0

In the code above, replace "your_adapter" with the actual interface name (usually "Local Area Connection"). In addition, the netmask at the end is an assumption of /24 or Class C subnet; substitute the correct netmask.

在上面的代码中,将“your_adapter”替换为实际的接口名称(通常为“Local Area Connection”)。另外,最后的网络掩码是/ 24或C类子网的假设;替换正确的网络掩码。

#2


2  

> netsh interface ipv4 add address "Local Area Connection" 192.168.1.201 255.255.255.0

Wrap in a cmd.exe "for" loop to add multiple IPs.

包装cmd.exe“for”循环以添加多个IP。

EDIT: (from Brian) "Local Area Connection" above is a placeholder, make sure you use the actual network adapter name on your system.

编辑:(来自Brian)上面的“本地连接”是占位符,请确保使用系统上的实际网络适配器名称。

#3


0  

Network Connections -> Local Area Network Connection Properties -> TCP/IP Properties -> Advanced -> IP Settings -> Add Button.

网络连接 - >局域网连接属性 - > TCP / IP属性 - >高级 - > IP设置 - >添加按钮。

#1


2  

The complete CMD.EXE loop:

完整的CMD.EXE循环:

FOR /L %b IN (200,1,254) DO netsh interface ip add address "your_adapter" 192.168.1.%b 255.255.255.0

In the code above, replace "your_adapter" with the actual interface name (usually "Local Area Connection"). In addition, the netmask at the end is an assumption of /24 or Class C subnet; substitute the correct netmask.

在上面的代码中,将“your_adapter”替换为实际的接口名称(通常为“Local Area Connection”)。另外,最后的网络掩码是/ 24或C类子网的假设;替换正确的网络掩码。

#2


2  

> netsh interface ipv4 add address "Local Area Connection" 192.168.1.201 255.255.255.0

Wrap in a cmd.exe "for" loop to add multiple IPs.

包装cmd.exe“for”循环以添加多个IP。

EDIT: (from Brian) "Local Area Connection" above is a placeholder, make sure you use the actual network adapter name on your system.

编辑:(来自Brian)上面的“本地连接”是占位符,请确保使用系统上的实际网络适配器名称。

#3


0  

Network Connections -> Local Area Network Connection Properties -> TCP/IP Properties -> Advanced -> IP Settings -> Add Button.

网络连接 - >局域网连接属性 - > TCP / IP属性 - >高级 - > IP设置 - >添加按钮。