如何在Windows上创建IP别名 [英] How to create an IP alias on Windows

查看:806
本文介绍了如何在Windows上创建IP别名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要为我的网络接口创建一个别名,以便可以使用127.0.0.1或33.33.33.33在本地访问它。

I need to create an alias for my network interface such that it can be accessed locally with either 127.0.0.1 or 33.33.33.33.

在* nix我会这样做:

In *nix I would do this:

sudo ifconfig en1 inet 33.33.33.33/32 alias

似乎 netsh 工具可以做同样的事情。如果是这样,怎么样?我已经看到一些似乎很接近的例子,但我不明白所提供的选项。

It appears that the netsh tool may be able to do the same thing. If so, how? I've seen some examples that seem close, but I don't understand the options provided.

这样做的动机是在同一台机器上运行两个JBossAS实例没有端口偏移。因此,他们需要使用相同的端口号而不会发生冲突。

The motivation for this is to run two instances of JBossAS on the same machine without port offsets. Thus, they would need to use the same port numbers without conflicting.

推荐答案

你是对的。此外,您可以使用高级界面属性屏幕在不触及命令行的情况下添加多个地址。

You'd be correct. Also, you can add multiple addresses without touching the command line using the advanced interface properties screen.

netsh interface ip add address "Local Area Connection" 33.33.33.33 255.255.255.255

这篇关于如何在Windows上创建IP别名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆