nic_router: dhcp server functionality

One can configure the NIC router to act as DHCP server at interfaces of a
domain by adding the <dhcp> tag to the configuration of the domain like
this:

<domain name="vbox" interface="10.0.1.1/24">
    <dhcp-server ip_first="10.0.1.80"
                 ip_last="10.0.1.100"
                 ip_lease_time_sec="3600"
                 dns_server="10.0.0.2"/>
    ...
</domain>

The attributes ip_first and ip_last define the available IPv4 address
range while ip_lease_time_sec defines the lifetime of an IPv4 address
assignment in seconds. The IPv4 address range must be in the subnet
defined by the interface attribute of the domain tag and must not cover
the IPv4 address in this attribute. The dns_server attribute gives the
IPv4 address of the DNS server that might also be in another subnet.
The lifetime of an offered assignment is the configured round trip time of
the router while the ip_lease_time_sec is applied only if the offer is
requested by the client in time.

The ports/run/virtualbox_nic_router.run script is an example of how to
use the new DHCP server functionality.

Ref #2490
This commit is contained in:
Martin Stein
2017-10-06 13:00:05 +02:00
committed by Christian Helmuth
parent 03144093b3
commit 30a96706cb
13 changed files with 1257 additions and 28 deletions

View File

@ -84,6 +84,11 @@ class Net::Ethernet_frame
throw No_ethernet_frame();
}
/**
* Constructor for composing a new Ethernet frame
*/
Ethernet_frame() { }
/***************
** Accessors **