DhcpServer

Description

The DhcpServer object holds properties required for a basic DHCP server functionality on a WiredNetworkInterface. For proper function the underlying network interface has to be configured with a static IP address.

› Inherits:Object

Properties

poolOffset

This property holds a number specifying the first IP address to assign to DHCP clients, i.e. 10 if IP addresses should start e.g. from 192.168.5.10.

› Type:SignedInteger
› Default:0
› Signal:poolOffsetChanged()
› Attributes:Writable

poolSize

This property holds a number specifying how many IP addresses to assign to DHCP clients starting from poolOffset.

› Type:SignedInteger
› Default:0
› Signal:poolSizeChanged()
› Attributes:Writable

Example

import InCore.Foundation 2.5

Application {
    NetworkConfiguration {
        // configure simple DHCP server on second ethernet interface
        WiredNetworkInterface {
            index: WiredNetworkInterface.Ethernet2
            mode: WiredNetworkInterface.ModeStatic
            address: "192.168.2.1/24"
            dhcpServer: DhcpServer {
                // assign 192.168.2.100 and 192.168.2.101 to clients
                poolOffset: 100
                poolSize: 2
            }
        }
    }
}