我正在尝试学习 DHCP 协议以及他对连接到他的计算机的重要性。
如果我通过路由器发送所有内容,为什么我需要 DHCP 为我提供 LAN 的子网?
谢谢。
我正在尝试学习 DHCP 协议以及他对连接到他的计算机的重要性。
如果我通过路由器发送所有内容,为什么我需要 DHCP 为我提供 LAN 的子网?
谢谢。
您不需要对机器使用 DHCP 和静态分配的 IP 地址。但是在某些网络中,例如客户端访问网络,维护起来可能非常困难,这就是我们使用 DHCP 的原因。请在下面为什么您应该使用 DHCP。
Dynamic Host Configuration Protocol (DHCP) is a client/server protocol that automatically provides an Internet Protocol (IP) host with its IP address and other related configuration information such as the subnet mask and default gateway.
RFCs 2131 and 2132 define DHCP as an Internet Engineering Task Force (IETF) standard based on Bootstrap Protocol (BOOTP), a protocol with which DHCP shares many implementation details. DHCP allows hosts to obtain necessary TCP/IP configuration information from a DHCP server.
Benefits of DHCP:
Reliable IP address configuration. DHCP minimizes configuration
errors caused by manual IP address configuration, such as
typographical errors, or address conflicts caused by the assignment
of an IP address to more than one computer at the same time.
Reduced network administration. DHCP includes the following features to reduce network administration:
- Centralized and automated TCP/IP configuration
- The ability to define TCP/IP configurations from a central location.
- The ability to assign a full range of additional TCP/IP configuration
values by means of DHCP options.
- The efficient handling of IP address changes for clients that must be
updated frequently, such as those for portable computers that move to
different locations on a wireless network.
- The forwarding of initial DHCP messages by using a DHCP relay agent,
thus eliminating the need to have a DHCP server on every subnet.
Why use DHCP
Every device on a TCP/IP-based network must have a unique unicast IP address to access the network and its resources. Without DHCP, IP addresses must be configured manually for new computers or computers that are moved from one subnet to another, and manually reclaimed for computers that are removed from the network.
DHCP enables this entire process to be automated and managed centrally. The DHCP server maintains a pool of IP addresses and leases an address to any DHCP-enabled client when it starts up on the network. Because the IP addresses are dynamic (leased) rather than static (permanently assigned), addresses no longer in use are automatically returned to the pool for reallocation.
The network administrator establishes DHCP servers that maintain TCP/IP configuration information and provide address configuration to DHCP-enabled clients in the form of a lease offer. The DHCP server stores the configuration information in a database, which includes:
- Valid TCP/IP configuration parameters for all clients on the network.
- Valid IP addresses, maintained in a pool for assignment to clients, as well as excluded addresses.
- Reserved IP addresses associated with particular DHCP clients. This allows consistent assignment of a single IP address to a single DHCP client.
- The lease duration, or the length of time for which the IP address can be used before a lease renewal is required.
当一台主机需要向另一台主机发送一些数据时,发送主机必须确定接收主机是否在同一个网络上。
发送主机使用自己的IP地址和掩码信息来计算接收主机是否在同一个网络上。如果是,它将数据直接发送到主机,如果不是,它将数据发送到其默认网关。