74.24. How to activate the DHCP resource

The DHCP resource can work in relay or server mode.

74.24.1. How to activate the DHCP in relay mode

Enter into the Abilis control-program or open the configuration file with the Console configurator and type the following commands.

a res:dhcp

or

s act res:dhcp

Add the DHCP resource.

or

If the resource already exists, set it active.

s p dhcp act:yesEnable the DHCP runtime functionalities.
s p dhcp mode:relayActivate the RELAY mode.
s p dhcp srv:192.168.1.250Configure the DHCP Server to which requests must be forwarded.
save confSave the configuration.

On a working Abilis, a system restart is required to make the DHCP resource running.

74.24.2. How to activate the DHCP in server mode

Enter into the Abilis control-program or open the configuration file with the Console configurator and type the following commands.

a res:dhcp

or

s act res:dhcp

Add the DHCP resource.

or

If the resource already exists, set it active.

s p dhcp act:yesEnable the DHCP runtime functionalities.
s p dhcp mode:serverActivate the SERVER mode.
a dhcp prof:1 name:LAN_1Add an entry in the DHCP profile table.
s dhcp prof:1 nb-node-type:bConfigure the Netbios node type.
s dhcp prof:1 gw1:192.168.1.1Configure the first gateway.
s dhcp prof:1 dns1:192.168.1.210 dns2:192.168.1.211Configure the DNS servers.
s dhcp prof:1 smtp:192.168.1.220 pop3:192.168.1.220Configure the SMTP and the POP3 servers.
a dhcp lan:1 name:LAN_1 prof:1Add an entry in the DHCP subnet table and associate it to a profile.
s dhcp lan:1 net:192.168.1.0 mask:255.255.255.0Configure the Network address and the subnet mask.
s dhcp lan:1 pool1:192.168.1.10:192.168.1.50Configure the first pool of addresses distribuited by DHCP.
save confSave the configuration.

On a working Abilis, a system restart is required to make the DHCP resource running.

[Tip]Tip

For configuring the DHCP host type the command a dhcp host:1 mac:xx-xx-xx-xx-xx-xx ip:192.168.1.10 prof:1, where xx-xx-xx-xx-xx-xx is the MAC-ADDRESS of PC.

74.24.3. How to activate the DHCP in client mode

Enter into the Abilis control-program or open the configuration file with the Console configurator and type the following commands.

a res:dhcpc

or

s act res:dhcpc

Add the DHCPC resource.

or

If the resource already exists, set it active.

s p dhcpc act:yesSet active the resource.
s p ip-2 ipadd:dhcpSet the DHCP client active for IP-2 resource.
save confSave the configuration.

On a working Abilis, a system restart is required to make the DHCPC resource running.

[Tip]Tip

Type the command d d ip-2 to verify the acquired IP address (CUR-IPADD parameter).

[Note]Note

Using the above configuration, Abilis retrieves IP address, default gateway and DNS server through DHCP. Refer to chapter Section 30.5.3, “Example of configuration” or read the following example to learn how to retrieve only IP address configuring parameters DHCP-GW, DHCP-GW-AD and DHCP-DNS.

74.24.3.1. How to retrieve only ip address

Enter into the Abilis control-program or open the configuration file with the Console configurator and type the following commands.

a res:dhcpc

or

s act res:dhcpc

Add the DHCPC resource.

or

If the resource already exists, set it active.

s p dhcpc act:yesSet active the resource.
s p ip-2 ipadd:dhcp dhcp-gw:no dhcp-dns:noSet the DHCP client active for IP-2 resource.
save confSave the configuration.

On a working Abilis, a system restart is required to make the DHCPC resource running.

[Tip]Tip

Type the command d d ip-2 to verify the acquired IP address (CUR-IPADD parameter).