動態主機設定協定(英語:Dynamic Host Configuration Protocol,DHCP)是一個區域網路的網路協定,使用UDP協定工作,主要有兩個用途: 用於內部網路或網路服務供應商自動分配IP位址給用戶
DHCP Discover (DHCPDISCOVER)
The DHCPDISCOVER message finds DHCPv4 servers on the network. Because the client has no valid IPv4 information at bootup, it uses Layer 2 and Layer 3 broadcast addresses to communicate with the server.
DHCP Offer (DHCPOFFER)
When the DHCPv4 server receives a DHCPDISCOVER message, it reserves an available IPv4 address to lease to the client. The server also creates an ARP entry consisting of the MAC address of the requesting client and the leased IPv4 address of the client.
DHCP Request (DHCPREQUEST)
When the client receives the DHCPOFFER from the server, it sends back a DHCPREQUEST message as shown in Figure 4. This message is used for both lease origination and lease renewal.
DHCP Acknowledgment (DHCPACK)
On receiving the DHCPREQUEST message, the server verifies the lease information with an ICMP ping to that address to ensure it is not being used already, creates a new ARP entry for the client lease, and replies with a DHCPACK message as shown in Figure 5.
Operation (OP) Code
Specifies the general type of message. A value of 1 indicates a request message; a value of 2 is a reply message.
Hardware Address Length
Specifies the length of the address.
Hops
Controls the forwarding of messages. Set to 0 by a client before transmitting a request.
Transaction Identifier
Used by the client to match the request with replies received from DHCPv4 servers.
=====Commnad====
ip
dhcp
excluded-address
ip
dhcp
pool pool-name
default-router
dns-server
domain-name domain
lease
netbios-name-server
no
service dhcp
show
running-config | section dhcp
show
ip
dhcp
binding
show
ip
dhcp
server statistics
ip
helper-address
沒有留言:
張貼留言