想了解更多关于动态IP的信息

发布于 2024-11-08 16:00:12 字数 1459 浏览 3 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

撩人痒 2024-11-15 16:00:12

阅读一本有关 IP 协议和 WIndows 文档的书。

动态IP是指当计算机连接到物理网络时,通过动态配置主机(具有动态IP)的DHCP服务器动态分配给计算机的IP地址。相反的是静态IP,它被硬编码到计算机配置中(即静态设置)。

更多内容在文档中。这是一个低水平的初学者问题 - 在没有大量背景的情况下回答它是很困难的。书籍和文档提供了上下文。

Read a book about the IP prtocol and the WIndows doucmentation.

Dynamic IP refers to an IP address that is dynamically assigned to a computer when the computer connects to the physical network ,by means of a DHCP server which dynamically configures the host (with a dynamic IP). The opposite is a STATIC IP which is hard-coded into the computer configuration (i.e. you set it statically).

More is in the documentation. This is a low level beginner question - answering it without a lot of context is hard. Books and Documentation provide the context.

难如初 2024-11-15 16:00:12

动态 IP 地址是从 DHCP 服务器(动态主机配置协议)分配的。

当您的网络适配器连接到网络时,它会向 DHCP 服务器请求 IP 地址的租用。 DHCP 服务器返回的 IP 地址具有有限的生命周期。当租约到期时,网络适配器必须请求新的租约。

租约的生命周期通常约为 2 小时或 24 小时,取决于适合网络的情况。租约有效期短并不意味着您经常更改 IP 地址,因为大多数时候您会获得与之前相同的 IP 地址的租约。

对于不涉及 DHCP 服务器的静态 IP 地址,您只需在网络设置中输入 IP 地址即可。

您无法使用套接字实现动态 IP 地址,因为您需要已有 IP 地址才能建立套接字连接。

A dynamic IP address is assigned from a DHCP server (Dynamic Host Configuration Protocol).

When your network adapter connects to the network, it asks the DHCP server for a lease on an IP address. The DHCP server returns an IP address which has a limited life time. When the lease expires, the network adapter has to ask for a new lease.

The lifetime of a lease is usually something like two hours or 24 hours, whatever is appropriate for the network. A short lifetime for the lease doesn't mean that you change IP address often, because most of the time you will get a lease for the same IP address that you had before.

For a static IP address the DHCP server isn't involved, you simply enter the IP adress in the network settings.

You can't implement dynamic IP addresses using sockets, because you need to have an IP address already to establish a socket connection.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文