Chapter 7 DHCP Configuration
Configuration on the switch:
ZXR10(config)#ip dhcp server dns 10.10.2.2
ZXR10(config)#ip dhcp server leasetime 90
ZXR10(config)#ip local pool dhcp 10.10.1.3 10.10.1.254 255.255.255.0
ZXR10(config)#interface vlan10
ZXR10(config-if)#ip dhcp mode server
ZXR10(config-if)#ip address 10.10.1.1 255.255.255.0
ZXR10(config-if)#ip dhcp server gateway 10.10.1.1
ZXR10(config-if)#peer default ip pool dhcp
ZXR10(config-if)#exit
ZXR10(config)#ip dhcp enable
DHCP Relay Configuration Example
When DHCP client and server are not in the same sub-network,
the router which connects with users works as a DHCP relay.
The switch enables DHCP relay function and a single server
10.10.2.2 provides DHCP server function. This mode is usually
adopted when a lot of hosts require the DHCP service. This is
shown in
Figure 20
.
F
IGURE
20 DHCP R
ELAY
C
ONFIGURATION
E
XAMPLE
Configuration on the switch:
ZXR10(config)#interface vlan10
ZXR10(config-if)#ip dhcp mode relay
ZXR10(config-if)#ip address 10.10.1.1 255.255.255.0
ZXR10(config-if)#ip dhcp relay agent 10.10.1.1
ZXR10(config-if)#ip dhcp relay server 10.10.2.2 security
ZXR10(config-if)#exit
ZXR10(config)#ip dhcp enable
Confidential and Proprietary Information of ZTE CORPORATION
69