在同一台计算机上拥有多个 IP 的好处
无论是客户端还是服务器,在同一台计算机上拥有多个 IP 地址有什么好处/用途?
What is the benefit/use of having several IP addresses on the same computer whether it's a client or a server?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
例如,如果您正在托管网站,则可以为每个 IP 托管一个网站,而不是让两个网站位于同一 IP 上,并切换到您的 Web 服务器。一般来说,它提供了一种隔离级别,始终有助于……嗯……将一个系统与另一个系统隔离。
If you were hosting websites, for example, you could host one per IP, instead of having both sites on the same IP, switching in your web server. In general, it provides one level of isolation which always helps to...well...isolate one system from another.
我曾经使用过测试环境,其中我们需要在同一服务器上运行同一应用程序的多个实例,每个实例都充当自己的测试环境。
通过使用不同的 IP 地址,可以轻松调整每个实例绑定的地址,这也有助于保持配置在整个环境中相当一致。
I've worked with test environments where we need multiple instances of the same application running on the same server, each acting as as its own test environment.
By using distinct IP addresses, it was easy to tweak the address that each instance binds to, and this also helped to keep the configuration fairly consistent across the environments.
我不确定你所说的“拥有多个 IP 地址”是什么意思,但如果意味着将它们放在服务器上,那么它会允许你将不同的 IP 地址分配给不同的网站/FTP 站点等。它有助于构建一个更好的、分离的系统。
另外,例如,当您使用 HTTPS/SSL 时,您很可能需要为每个此类域分配一个专用 IP 地址。
I am not sure what you mean by "having several IP addresses", but if mean having them on a server, it would for example allow you to assign different IP addresses to different websites/FTP sites etc. It helps to build a better, separated system.
Plus, for example, when you do HTTPS/SSL, you will most likely need a dedicated IP address for each such domain.
计算机可以通过两种方式拥有多个 IP:
There are two ways a computer may have several IPs: