3.13 basic DHCP Configuration
Purpose:
1. master the basic DHCP configuration to realize automatic Address allocation.
2. Understand how DHCP works.
Tutorial topology:
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/06214323B-0.png "title =" 3.13.png "/>
Tutorial steps:
1. Set up the DHCP service on SW1 Based on the topology in the figure to dynamically provide IP information for hosts with different VLANs. The configuration is as follows:
SW1 (config) # ip dhcp pool VLAN10 [PL1]
SW1 (dhcp-config) # network 192.168.10.0 255.255.255.0 [PL2]
SW1 (dhcp-config) # default-router 192.168.10.254 [PL3]
SW1 (dhcp-config) # dns-server 8.8.8.8 114.114.114.114 [PL4]
SW1 (dhcp-config) # lease 7 [PL5]
SW1 (dhcp-config) # exit
SW1 (config) # ip dhcp pool VLAN20
SW1 (dhcp-config) # network 192.168.20.0 255.255.255.0
SW1 (dhcp-config) # default-router 192.168.255.254
SW1 (dhcp-config) # dns-server 8.8.8.8 114.114.114.114
SW1 (dhcp-config) # lease 7
SW1 (dhcp-config) # exit
2. Set the IP address in the DHCP Client as the dynamic learning mode as follows:
PC1 (config) # int f0/0
PC1 (config-if) # ip address dhcp [PL6]
PC1 (config-if) # exit
PC2 (config) # int f0/0
PC2 (config-if) # ip address dhcp
PC2 (config-if) # exit
3. Check DHCP allocation as follows:
① On the DHCP Client, check whether the address has been learned
PC1 # show ip int brief
InterfaceIP-AddressOK?MethodStatusProtocol
FastEthernet0/0192.168.10.1 YESDHCP[PL7]UpUp
PC2 # show ip int brief
InterfaceIP-AddressOK?MethodStatusProtocol
FastEthernet0/0192.168.20.1 YESDHCPUpUp
From the above, we can see that the IP address of the PC has been learned, and the address learning mode has changed from manual mode to DHCP mode.
② Check DHCP address pool allocation on the DHCP Server
R1 # show ip dhcp pool
Pool VLAN10:
Utilization mark (high/low)100/0
Subnet size (first/next)0/0
Total addresses254[PL8]
Leased addresses: 1[PL9]
Pending event: None
1 subnet is currently in the pool:
Current indexIP address rangeLeased addresses
192.168.10.2192.168.10.1-192.168.10.2541
Pool VLAN20:
Utilization mark (high/low)100/0
Subnet size (first/next)0/0
Total addresses254
Leased addresses: 1
Pending event: None
1 subnet is currently in the pool:
Current indexIP address rangeLeased addresses
192.168.20.2192.168.20.1-192.168.255.2541
Check the DHCP address allocation and host information as follows:
R1 # show ip dhcp binding
Bindings from all pools not associated with VRF:
IP addressClient-ID/Lease expirationType
Hardware address/
User name
192.168.10.10063.6973.636f.2d63.Mar 08 2002 AMAutomatic
6330.352e.3330.3963.
2e30. 3030.302d.4661.
302f. 30
192.168.20.10063.6973.636f.2d63.Mar 08 2002 AMAutomatic
6330.362e.3330.3963.
2e30. 3030.302d.4661.
302f. 30
From the above results, we can see that by deploying DHCP technology, you can make it easier for hosts to access the network. Especially in the mobile Internet era, DHCP technology has become increasingly important. Various terminals, such as PCs, mobile phones, and tablets, need to connect to the network more conveniently, DHCP technology is also widely used in public Wi-Fi sites such as public transit, subway, and coffee shops. This experiment is complete.
[PL1]Define a DHCP address pool. The address pool name should be linked to the assigned Department or VLAN to facilitate management.
[PL2]Defines the CIDR Block of the address pool.
[PL3]Define the default gateway.
[PL4]Define a DNS server. Multiple DNS servers can be defined to implement active/standby. Generally, the first DNS address is the primary DNS address.
[PL5]Defines the address release time, which is 7 days.
[PL6]Set the interface to dynamically obtain the address through DHCP.
[PL7]The address acquisition method changes from manual to DHCP.
[PL8]Total number of addresses in this address pool.
[PL9]The number of allocated addresses.
========================================================== =
PingingLab· High quality ITEducation provider
CCIELab-ITProject Practice · customization of high-end Talents
Shenzhen pinke Information Technology Co., Ltd. · waihuan West Road Station, Guangzhou University City
Sina Weibo :@PingingLab@ PingingLab-Chen xinjie
PingingLabPublic Account: pinginglab
PingingLabTechnical Exchange Group: 240920680
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/0621433945-1.jpg "title =" pinginglab .bmp "/>
This article from the "Chen xinjie network" blog, please be sure to keep this source http://chenxinjie.blog.51cto.com/7749507/1274495