Allied Telesis Support Portal

How to configure DHCP server on an AlliedWare Plus device

I need to enable DHCP server on my switch

Introduction


Dynamic Host Configuration Protocol (DHCP) is a standardized client/server network protocol that dynamically assigns IP addresses and other related configuration information to network devices. Every device on a TCP/IP-based network must have a unique unicast IP address to access the network and its resources. Without DHCP, IP addresses for new computers or computers that are moved from one subnet to another must be configured manually.
 

Configuring the DHCP server


The DHCP server uses address pools when responding to DHCP client requests. Address pools contains specific IP configuration details that the DHCP server can allocate to a client. You can configure multiple address pools on the device for different networks.
 

Create the pool

A DHCP pool is identified by a name. To create a DHCP pool and enter the DHCP Configuration mode for the pool, use the command:

awplus(config)#ip dhcp pool <pool-name>
awplus(dhcp-config)#
i.e.
awplus(config)#ip dhcp pool MyPool
 

Define the network

Define the network that the DHCP clients are in. You can define one network per address pool. Use the following command to define the network after defining the DHCP pool first:

awplus(dhcp-config)#network <ip-subnet-addr/mask>
i.e.
awplus(dhcp-config)#network 192.168.80.0 255.255.255.0
 

Define the range

Configure an IP address range for the pool. This range must be in the same subnet as the pool’s network setting. Use the command:

awplus(dhcp-config)#range <ip-address> <ip-address>
i.e.
awplus(dhcp-config)#range 192.168.80.10 192.168.80.20


Note: The first IPv4 address specifies the low end of the range, while the second IP address is the high end. You can set the range to a single IP address by specifying only one IP address.
 

Set the lease

The DHCP server assigns IP settings to hosts for specific times (the lease time). Each DCHP pool has one lease time setting. You can use DHCP to allocate the following types of addresses:
 

A dynamic IP address

These are available to a host for a limited amount of time. When the lease expires, the server can reallocate the IP address to another device. To set the lease time for the DHCP pool so that it assigns dynamic IP addresses, use the command:

awplus(dhcp-config)#lease <days> <hours> <minutes> [<seconds>]

 

A permanent IP address

These are available to a host for an unlimited amount of time. To set the lease time to assign permanent IP addresses, use the command:

awplus(dhcp-config)#lease infinite

 

A static IP address

Not every device on the network needs to have a dynamic IP address. Using DHCP, you can reserve addresses for devices such as printers. As each network device has a MAC address, you can assign a static IP at the server to a specific MAC address. This allows devices such as the network printer to always get the same IP address even after it reboots and without assigning the IP address at the printer.

These are allocated to a particular client. The DHCP server recognizes the client by its MAC address. This lets you use DHCP to manage most of your network automatically, while having unchanging IP addresses on key devices such as servers. To assign a static IP address to a device, use the command:

awplus(dhcp-config)#host <ip-address> <mac-address>
i.e.
awplus(dhcp-config)#host 192.168.80.100 001a.eb98.5f3f
 

Other important parameters

To set a subnet mask for the address pool, use the command:

awplus(dhcp-config)#subnet-mask <mask>
i.e.
awplus(dhcp-config)#subnet-mask 255.255.255.0
 

To add a default router for the address pool, use the command:

awplus(dhcp-config)#default-router <ip-address>
i.e.
awplus(dhcp-config)#default-router 192.168.80.1


To add a DNS server for the address pool, use the command:

awplus(dhcp-config)#dns-server <ip-address>
i.e.
awplus(dhcp-config)#dns-server 8.8.8.8

 

Enable the DHCP server

After configuring the address pools, enable the DHCP server by using the command:

awplus(config)#service dhcp-server


Note: For locally connected clients, ensure that the desired interface has an IP address and subnet mask defined from the address pool; use the ip address command (in interface configuration mode) to set a static address.
i.e. for a laptop connected to port1.0.1 on the DHCP server.

awplus(config)#interface vlan80
awplus(config-if)#ip address 192.168.80.1/24
awplus(config)#interface port1.0.1
awplus(config-if)#switchport access vlan 80

This way, if you have multiple DHCP pool configured on the same device, the DHCP request can obtain the proper IP address.

 

Show commands

To display information about the current configuration of the DHCP server, use the command:

awplus#show ip dhcp server summary


To display information about the lease bindings that the DHCP server has allocated to clients, use the command:

awplus# show ip dhcp binding