Embedded DHCP/DHCPv6/RA Server & Relay.
odhcpd is a daemon for serving and relaying IP management protocols to configure clients and downstream routers. It tries to follow the RFC 6204 requirements for IPv6 home routers.
odhcpd provides server services for DHCP, RA, stateless and stateful DHCPv6, prefix delegation and can be used to relay RA, DHCPv6 and NDP between routed (non-bridged) interfaces in case no delegated prefixes are available.
Router Discovery (RD) support (solicitations and advertisements) with 2 modes of operation:
DHCPv6 support with 2 modes of operation:
Proxy for Neighbor Discovery solicitation and advertisement messages (NDP):
Interfaces marked as “external” will not receive any proxyied NDP content and are only served with NDP for Duplicate Address Detection (DAD) and traffic to the router itself.
Warning: Interfacs marked as external, need additional firewall rules for security!
odhcpd uses a UCI configuration file in /etc/config/dhcp for configuration and may also receive information from ubus.
Configuration for the odhcp daemon.
| || || || Enable DHCPv4 if the 'dhcp' section constains a
| || ||Location of the lease/hostfile for DHCPv4 and DHCPv6.|
| || ||Location of the lease trigger script.|
Configuration for DHCPv4, DHCPv6, RA and NDP services.
| ||string|| ||Logical OpenWrt interface.|
| ||string|| ||Physical network interface.|
| ||string|| || Alias of
| ||boolean|| || do not serve this interface unless overridden by
| ||boolean|| ||is a master interface for relaying|
| ||string|| || Router Advert service. Set to
| ||string|| || DHCPv6 service. Set to
| ||string|| || DHCPv4 service. Set to
| ||string|| || Neighbor Discovery Proxy. Set to
| ||boolean|| ||Leases for DHCPv4 and DHCPv6 are created dynamically.|
| ||list|| ||DNS servers to announce on the network. IPv4 and IPv6 addresses are accepted.|
| ||list|| ||Search domains to announce on the network.|
| ||string|| ||DHCPv4 address leasetime|
| ||integer|| ||Starting address of the DHCPv4 pool.|
| ||integer|| ||Number of addresses in the DHCPv4 pool.|
| ||integer|| || Override default route- Set to
| ||integer|| ||RA management mode. See the “RA Management Modes” table below.|
| ||boolean|| ||Announce prefixes off-link|
| ||string|| || Route preference
| ||integer|| ||Maximum time allowed between sending unsolicited Router Advertisements (RA).|
| ||integer|| ||Minimum time allowed between sending unsolicited Router Advertisements (RA).|
| ||integer|| ||Router Lifetime published in Router Advertisement (RA) messages.|
| ||boolean|| || If set, the configured DHCPv4
| ||integer|| ||Reachable Time in milliseconds to be published in Router Advertisement (RA) messages'.|
| ||integer|| ||Retransmit Time in milliseconds to be published in Router Advertisment (RA) messages.|
| ||integer|| ||The maximum hops to be published in Router Advertisement (RA) messages.|
| ||integer|| ||The MTU to be published in Router Advertisement (RA) messages.|
| ||boolean|| ||Learn routes from ND.P|
| ||boolean|| ||NDProxy external slave.|
| ||list||Static NDProxy prefixes.|
|Mode||M Flag||A Flag||Description|
|No||Yes||Only stateless (SLAAC) configuration enabled.|
|Yes||Yes||Both stateless (SLAAC) and stateful (DHCPv6) configurations are enabled.|
|Yes||No||Only statefull (DHCPv6) configuration is enabled.|
host section is where static leases are defined.
|string||Yes||None||IP-Address to lease|
|string||No||None||DUID in base16|
|string||No||None||IPv6 host identifier|
ubus -v list dhcp ubus call dhcp ipv4leases ubus call dhcp ipv6leases
odhcpd uses cmake: