5.2. DHCP Servers
This example shows how to set up a DHCP server called DHCPServer1 which assigns and manages IP
addresses from an IP address pool called DHCPRange1.
This example assumes that an IP range for the DHCP Server has already been created.
Command-Line Interface
gw-world:/> add DHCPServer DHCPServer1 Interface=lan
Web Interface
1.
Go to System > DHCP > DHCP Servers >Add > DHCPServer
2.
Now enter:
•
Name: DHCPServer1
•
Interface Filter: lan
•
IP Address Pool: DHCPRange1
•
Netmask: 255.255.255.0
3.
Click OK
Example 5.2. Checking DHCP Server Status
Command-Line Interface
To see the status of all servers:
gw-world:/> dhcpserver
To list all current leases:
gw-world:/> dhcpserver -show
Displaying IP to MAC Address Mappings
To display the mappings of IP addresses to MAC addresses that result from allocated DHCP leases,
the following command can be used. It is shown with some typical output:
gw-world:/> dhcpserver -show -mappings
DHCP server mappings:
Client IP
---------------
10.4.13.240
10.4.13.241
10.4.13.242
10.4.13.243
10.4.13.244
10.4.13.254
10.4.13.1
10.4.13.2
10.4.13.3
10.4.13.4
IPAddressPool=DHCPRange1 Netmask=255.255.255.0
Client MAC
-----------------
00-1e-0b-a0-c6-5f
00-0c-29-04-f8-3c
00-1e-0b-aa-ae-11
00-1c-c4-36-6c-c4
00-00-00-00-02-14
00-00-00-00-02-54
00-12-79-3b-dd-45
00-12-79-c4-06-e7
*00-a0-f8-23-45-a3
*00-0e-7f-4b-e2-29
Mode
-------------
ACTIVE(STATIC)
ACTIVE(STATIC)
ACTIVE(STATIC)
INACTIVE(STATIC)
INACTIVE(STATIC)
INACTIVE(STATIC)
ACTIVE
ACTIVE
ACTIVE
ACTIVE
231
Chapter 5. DHCP Services