4 dhcp configuration examples, Dhcp, Onfiguration – PLANET WGSW-52040 User Manual
Page 259: Xamples
![background image](https://www.manualsdir.com/files/865181/content/doc259.png)
31.4 DHCP Configuration Examples
Scenario 1:
Too save configuration efforts of network administrators and users, a company is using switch
as a DHCP server. The Admin VLAN IP address is 10.16.1.2/16. The local area network for the
company is divided into network A and B according to the office locations. The network
configurations for location A and B are shown below.
PoolA(network 10.16.1.0)
PoolB(network 10.16.2.0)
Device
IP address
Device
IP address
Default gateway
10.16.1.200
10.16.1.201
Default gateway
10.16.1.200
10.16.1.201
DNS server
10.16.1.202
DNS server
10.16.1.202
WINS server
10.16.1.209
WWW server
10.16.1.209
WINS node type
H-node
Lease
3 days
Lease
1day
In location A, a machine with MAC address 00-03-22-23-dc-ab is assigned with a fixed IP
address of 10.16.1.210 and named as “management”.
Switch(config)#service dhcp
Switch(config)#interface vlan 1
Switch(Config-Vlan-1)#ip address 10.16.1.2 255.255.0.0
Switch(Config-Vlan-1)#exit
Switch(config)#ip dhcp pool A
Switch(dhcp-A-config)#network 10.16.1.0 24
Switch(dhcp-A-config)#lease 3
Switch(dhcp-A-config)#default-route 10.16.1.200 10.16.1.201
Switch(dhcp-A-config)#dns-server 10.16.1.202
Switch(dhcp-A-config)#netbios-name-server 10.16.1.209
Switch(dhcp-A-config)#netbios-node-type H-node
Switch(dhcp-A-config)#exit
Switch(config)#ip dhcp excluded-address 10.16.1.200 10.16.1.201
Switch(config)#ip dhcp pool B
Switch(dhcp-B-config)#network 10.16.2.0 24
Switch(dhcp-B-config)#lease 1
Switch(dhcp-B-config)#default-route 10.16.2.200 10.16.2.201
31-38