简体   繁体   English

Netty 的 IPv6 IP 地址

[英]IPv6 IP addresses with Netty

I have a sandboxed interpreter in Java, and I'd like each separate instance of the interpreter to have its own public IPv6 IP address, including being able to bind the sub-1024 ports on those IP addresses.我在 Java 中有一个沙盒解释器,我希望每个单独的解释器实例都有自己的公共 IPv6 IP 地址,包括能够绑定那些 IP 地址上的 sub-1024 端口。 (If you have a whole IP address for yourself, you don't need to worry about port conflicts, right?) (如果你自己有一个完整的 IP 地址,你就不用担心端口冲突,对吧?)

I believe a single IP address per interpreter is more than enough.我相信每个解释器一个 IP 地址就足够了。 No need to give them whole /96 (definitely not whole /64) prefixes or something.无需给他们整个 /96(绝对不是整个 /64)前缀或其他东西。

How can I dynamically allocate the IP addresses with Netty? Netty如何动态分配IP地址?

You will need to use plain java apis to find the IP addresses assigned to the machines and then bind those ip addresses to your instance. 您将需要使用普通的Java API查找分配给计算机的IP地址,然后将这些IP地址绑定到您的实例。 Please refer to 请参阅

It's not related to the.netty or any other.networking framework/api.它与.netty 或任何其他.networking 框架/api 无关。 If you want to "allocate the unique IP address", I think you may migrate your application as a pod in the kube.netes.如果你想“分配唯一的IP 地址”,我想你可以将你的应用程序迁移为 kube.netes 中的一个pod You'll allocate an unique IP address for each of your application/pod instance.您将为每个应用程序/pod 实例分配一个唯一的 IP 地址。 At that way, "you don't need to worry about the port conflicts" with others who running at same box.那样的话,“你不需要担心端口冲突”与其他在同一个盒子上运行的人。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM