650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7F/A0/wKiom1cl4liyyGsZAAApIy8z9hI535.png "title=" 1.png " alt= "Wkiom1cl4liyygszaaapiy8z9hi535.png"/>
Scenario: Configure DHCP on the same network segment by simulating the PC and dhcp_server with the router. When the PC interface is configured to dynamically obtain an address, the PC broadcasts a dhcp_discover message to discover the DHCP server, where multiple DHCP servers may broadcast a reply Dhcp_offer message after receiving the message, and the PC will only pick one and then broadcast DHCP_ Request tells the server to ask for this address, and the server checks to reply Dhcp_ack, so that the address is completed.
Operation Steps:
Step One: Build the experimental environment according to the topology
Step two: Simulate the PC with the router, turn off the routing function and configure the interface to get the IP dynamically
PC (config) #no iprouting// Turn off the routing feature
PC (config) #intf0/0
PC (config-if) #ip add
PC (config-if) #ipaddress DH
PC (config-if) #ipaddress DHCP// Configure the interface to obtain IP dynamically
Step Three: Configure the interface address, DHCP address pool, and lease information in Dhcp_server
Dhcp_server (config) #
Dhcp_server (config) #intf0/0
Dhcp_server (config-if) #ipadd 192.168.10.254 255.255.255.0
Dhcp_server (config-if) #
Dhcp_server (config-if) #nosh
dhcp_server (config) #ipdhcp pool dhcp_pool_1// Configure the address pool name for DHCP
dhcp_server (Dhcp-config) #network192.168.10.0 255.255.255.0// Configuring DHCP address ranges
dhcp_server (dhcp-config) #default-router192.168.10.254// Configure the gateway assigned to the host
dhcp_server (dhcp-config) #lease0 8 0// the rental period is 0 days, 8 hours, 0 minutes .
Dhcp_server (Dhcp-config) #ex
dhcp_server (config) #ipdhcp excluded-address 192.168.10.250 192.168.10.254// in the address pool
Addresses that need to be excluded
Step four: Use Wireshark to observe the DHCP acquisition process
|
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/7F/A0/wKiom1cl4oTBJ7aPAACb0B4ufMA057.png "title=" 2.png " alt= "Wkiom1cl4otbj7apaacb0b4ufma057.png"/> |
|
|
Step five: View interface address availability
pc#sh IP int b
Interface ip-address OK? Method Status Protocol
fastethernet0/0 192.168.10.2 YES DHCP up up
fastethernet1/0 Unassigned YES unset administratively down
Configuration file
------------------------------------------------------------------------------
Pc#sh Run
Buildingconfiguration ...
Version 12.4
No IP routing
!
!
......
!
Interface fastethernet0/0
IP address DHCP
No IP route-cache
Duplex Auto
Speed auto
!
!
......
!
End
-------------------------------------------------------------------------------
Dhcp_server#sh Run
Buildingconfiguration ...
!
Version 12.4
!
Hostname dhcp_server
!
!
!
IP CEF
No IP dhcp use vrfconnected
IP dhcpexcluded-address 192.168.10.250 192.168.10.254
!
IP DHCP Pooldhcp_pool_1
Network 192.168.10.0 255.255.255.0
Default-router 192.168.10.254
Lease 0 8
!
!
interfacefastethernet0/0
IP address 192.168.10.254 255.255.255.0
Duplex Auto
Speed auto
!
.........
!
!
End
-------------------------------------------------------------------------------
This article is from "the synthesizer, the United States Tiancheng" blog, please be sure to keep this source http://kidjang.blog.51cto.com/9975340/1769364
Configuration of the same network segment DHCP