From dd43110f781a9245ec00531456fee68ed763a179 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Wed, 5 Mar 2014 08:13:30 +0100 Subject: networkd: add dhcp server support When enabled in [Network] it will set up a dhcp server on the interface, listening on one of its statically configured IPv4 addresses and with a fixed size pool of leases determined from it. Example: [Match] Name=ve-arch-tree [Network] Address=192.168.12.5/24 DHCPServer=yes [Route] Gateway=192.168.12.5 Destination=192.168.12.0/24 In this case we will configure ve-arch-tree with the address 192.168.12.5 and hand out addresses in the range 192.168.12.6 - 192.168.12.38. In the future, we should (as suggested by Lennart) introduce a syntax to pick the server address automatically. --- src/network/networkd-network-gperf.gperf | 1 + 1 file changed, 1 insertion(+) (limited to 'src/network/networkd-network-gperf.gperf') diff --git a/src/network/networkd-network-gperf.gperf b/src/network/networkd-network-gperf.gperf index 5038cb5455..7ef467eed6 100644 --- a/src/network/networkd-network-gperf.gperf +++ b/src/network/networkd-network-gperf.gperf @@ -30,6 +30,7 @@ Network.Bond, config_parse_netdev, 0, Network.VLAN, config_parse_netdev, 0, offsetof(Network, vlans) Network.MACVLAN, config_parse_netdev, 0, offsetof(Network, macvlans) Network.DHCP, config_parse_bool, 0, offsetof(Network, dhcp) +Network.DHCPServer, config_parse_bool, 0, offsetof(Network, dhcp_server) Network.IPv4LL, config_parse_bool, 0, offsetof(Network, ipv4ll) Network.Address, config_parse_address, 0, 0 Network.Gateway, config_parse_gateway, 0, 0 -- cgit v1.2.3