• Stars
    star
    159
  • Rank 228,297 (Top 5 %)
  • Language
    C
  • License
    GNU General Publi...
  • Created over 10 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

This repository is a mirror of https://git.openwrt.org/?p=project/odhcpd.git. Pull requests will be accepted which will be merged in odhcpd.git
odhcpd - Embedded DHCP/DHCPv6/RA Server & Relay

** Abstract **

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.


** Features **

1. Router Discovery support (solicitations and advertisements) with 2 modes
   server:	RD server for slave interfaces
   a) automatic detection of prefixes, delegated prefix and default routes, MTU
   b) automatic reannouncement when changes to prefixes or routes occur

   relay:	RD relay between master and slave interfaces
   a) support for rewriting announced DNS-server addresses in relay mode
   
2. DHCPv6-support with 2 modes of operation
   server: stateless, stateful and PD-server mode
   a) stateless and stateful address assignment
   b) prefix delegation support
   c) dynamic reconfiguration in case prefixes change
   d) hostname detection and hosts-file creation

   relay: 	mostly standards-compliant DHCPv6-relay
   a) support for rewriting announced DNS-server addresses
   
3. DHCPv4-support
   server: stateless and stateful mode

4. Proxy for Neighbor Discovery messages (solicitations and advertisements)
   a) support for auto-learning routes to the local routing table
   b) support for marking interfaces "external" not proxying NDP for them
      and only serving NDP for DAD and for traffic to the router itself
      [Warning: you should provide additional firewall rules for security]


** Compiling **

odhcpd uses cmake:
* To prepare a Makefile use:  "cmake ." 
* To build / install use: "make" / "make install" afterwards.
* To build DEB or RPM packages use: "make package" afterwards.


** Configuration **

odhcpd uses a UCI configuration file in /etc/config/dhcp for configuration
and may also receive information from ubus


Section of type odhcpd

Option		Type	Default			Description
legacy		bool	0			Enable DHCPv4 if start but
						no dhcpv4 option set
maindhcp	bool	0			Use odhcpd as the main DHCPv4
						service
leasefile	string				DHCP/v6 lease/hostfile
leasetrigger	string				Lease trigger script
loglevel	integer 6			Syslog level priority (0-7)


Sections of type dhcp (configure DHCP / DHCPv6 / RA / NDP service)

Option			Type	Default			Description
interface		string	<name of UCI section>	logical OpenWrt interface
ifname			string	<resolved from logical>	physical network interface
networkid		string	same as ifname		compat. alias for ifname
master			bool	0			is a master interface
							for relaying

ra			string	disabled		Router Advert service
			[disabled|server|relay|hybrid]
dhcpv6			string	disabled		DHCPv6 service
			[disabled|server|relay|hybrid]
dhcpv4			string	disabled		DHCPv4 service
			[disabled|server]
ndp			string	disabled		Neighbor Discovery Proxy
			[disabled|relay|hybrid]

dynamicdhcp		bool	1			Dynamically create leases
							for DHCPv4 and DHCPv6
dhcpv4_forcereconf	bool	0			Force reconfiguration by sending
							force renew message even if the client
							did not include the force renew nonce
							capability option (RFC6704)
dhcpv6_assignall	bool	1			Assign all viable DHCPv6 addresses
							in statefull mode; if disabled
							only the DHCPv6 address having the
							longest preferred lifetime is assigned
dhcpv6_hostidlength	integer 12			Host ID length of dynamically created leases,
							allowed values: 12 - 64 (bits).
dhcpv6_na		bool	1			DHCPv6 stateful addressing hands out IA_NA -
								Internet Address - Network Address
dhcpv6_pd		bool	1			DHCPv6 stateful addressing hands out IA_PD -
								Internet Address - Prefix Delegation
dhcpv6_pd_min_len	integer	-			Minimum prefix length to delegate with IA_PD
							(value is adjusted if needed to be greater
							than the interface prefix length).  Range [1,62]
router			list    <local address>		Routers to announce
							accepts IPv4 only
dns			list	<local address>		DNS servers to announce
							accepts IPv4 and IPv6
dns_service		bool	1			Announce the address of interface as DNS service
							if the list of dns is empty
domain			list	<local search domain>	Search domains to announce

leasetime		string	12h			DHCPv4 address leasetime
start			integer	100			DHCPv4 pool start
limit			integer	150			DHCPv4 pool size
preferred_lifetime	string	12h			Value for the preferred lifetime
							for a prefix
ra_default		integer	0			Override default route
			0: default, 1: ignore no public address, 2: ignore all
ra_flags		list	other-config		List of RA flags to be
							advertised in RA messages
			[managed-config other-config home-agent none]
ra_slaac		bool	1			Announce slaac for a prefix
ra_offlink		bool	0			Announce prefixes off-link
ra_preference		string	medium			Route(r) preference
			[medium|high|low]
ra_maxinterval		integer	600			Maximum time allowed between
							sending unsolicited RA
ra_mininterval		integer	200			Minimum time allowed between
							sending unsolicited RA
ra_lifetime		integer	1800			Value to be placed in Router
							Lifetime field of RA
ra_useleasetime		bool	0			Use configured leasetime as
							limit for the preferred and
							valid lifetime of a prefix
ra_reachabletime	integer	0			Reachable Time in milliseconds to be
							advertised in RA messages
ra_retranstime		integer	0			Retransmit Time in milliseconds to be
							advertised in RA messages
ra_hoplimit		integer	0			Current hoplimit to be advertised
							in RA messages
ra_mtu			integer -			MTU to be advertised in
							RA messages
ra_dns			bool	1			Announce DNS configuration in
							RA messages (RFC8106)
ra_pref64		string				Announce PREF64 option
			[IPv6 prefix]			for NAT64 prefix (RFC8781)
ndproxy_routing		bool	1			Learn routes from NDP
ndproxy_slave		bool	0			NDProxy external slave
prefix_filter		string	::/0			Only advertise on-link prefixes within
			[IPv6 prefix]			the provided IPv6 prefix; others are
							filtered out.
ntp			list	<local address>		NTP servers to announce
							accepts IPv4 and IPv6


Sections of type host (static leases)
Option		Type	Default			Description
ip		string				IP-Address to lease
mac		string				MAC-address
duid		string				DUID in base16
hostid		string				IPv6 host identifier
name		string				Hostname
leasetime	string				DHCPv4/v6 leasetime

More Repositories

1

openwrt

This repository is a mirror of https://git.openwrt.org/openwrt/openwrt.git It is for reference only and is not active for check-ins. We will continue to accept Pull Requests here. They will be merged via staging trees then into openwrt.git.
C
17,849
star
2

luci

LuCI - OpenWrt Configuration Interface
JavaScript
5,848
star
3

packages

Community maintained packages for OpenWrt. Documentation for submitting pull requests is in CONTRIBUTING.md
Makefile
3,774
star
4

mt76

mac80211 driver for MediaTek MT76x0e, MT76x2e, MT7603, MT7615, MT7628 and MT7688
C
694
star
5

docker

Docker containers of the ImageBuilder and SDK
Dockerfile
417
star
6

routing

OpenWrt Routing Packages
Shell
311
star
7

asu

An image on demand server for OpenWrt based distributions
Python
277
star
8

chaos_calmer

Legacy OpenWrt "Chaos Calmer" release branch
C
131
star
9

telephony

The telephony packages feed
Makefile
99
star
10

mtk-wifi-gpl

MediaTek 802.11ac GPL driver
C
94
star
11

odhcp6c

This repository is a mirror of https://git.openwrt.org/?p=project/odhcp6c.git. It is for reference only and is not active for checks-ins or reporting issues; issues should be reported at: https://bugs.openwrt.org. Pull requests will be accepted which will be merged in odhcp6c.git
C
74
star
12

archive

Historical pre-merge OpenWrt archive
C
60
star
13

video

Makefile
49
star
14

omcproxy

OpenWrt embedded IGMPv3/MLDv2 Proxy
C
31
star
15

gh-action-sdk

GitHub CI action to build packages via SDK
Shell
23
star
16

buildscripts

Build and maintenance scripts for OpenWrt releases
Shell
23
star
17

qosify

[MIRROR] OpenWrt QoS implementation based one eBPF + CAKE
C
21
star
18

firmware-selector-openwrt-org

This repository is being migrated over from GitLab, ymmv
JavaScript
19
star
19

packages-abandoned

Feed for abandoned OpenWrt packages
Makefile
19
star
20

bcm63xx-next

Linux for Broadcom BCM63xx SoC
C
18
star
21

usteer

[MIRROR] OpenWrt AP service for client steering
C
15
star
22

netifd

[MIRROR] OpenWrt Network interface configuration daemon
C
14
star
23

firewall4

[MIRROR] OpenWrt nftables firewall
UnrealScript
14
star
24

targets

Feed for OpenWrt targets not maintained in mainline anymore
Makefile
13
star
25

uci

[MIRROR] OpenWrt Unified Configuration Interface
C
13
star
26

cypress-nvram

brcmfmac nvram files
12
star
27

libubox

[MIRROR] C utility functions for OpenWrt
C
11
star
28

firmware_qca-wireless

[MIRROR] Qualcomm Wireless Device BDF
9
star
29

buildbot

OpenWrt buildbot configuration
Python
9
star
30

ubus

[MIRROR] OpenWrt system message/RPC bus
C
9
star
31

rpcd

[MIRROR] OpenWrt ubus RPC daemon
C
7
star
32

usign

[MIRROR] Tiny signify replacement
C
7
star
33

unetd

[MIRROR] WireGuard based VPN connection manager for OpenWrt
C
6
star
34

bcm63xx-cfe

BCM63xx CFE binaries
6
star
35

uhttpd

[MIRROR] Tiny HTTP server
C
6
star
36

uclient

[MIRROR] libubox HTTP client library
C
6
star
37

firmware-utils

[MIRROR] OpenWrt firmware image utilities
C
5
star
38

ustream-ssl

[MIRROR] ustream SSL wrapper
C
5
star
39

mdnsd

[MIRROR] OpenWrt MDNS daemon
C
5
star
40

udebug

[MIRROR] OpenWrt debugging helper library/service
C
5
star
41

opkg-lede

[MIRROR] LEDE fork of Opkg
C
5
star
42

branding

This repository contains logos and color definitions used by OpenWrt
4
star
43

libnl-tiny

[MIRROR] Tiny OpenWrt fork of libnl
C
4
star
44

actions-shared-workflows

4
star
45

ustp

[MIRROR] OpenWrt MSTP/RSTP/STP daemon
C
4
star
46

ugps

[MIRROR] OpenWrt GPS daemon
C
4
star
47

uqmi

[MIRROR] Tiny QMI command line utility
C
4
star
48

firewall3

[MIRROR] OpenWrt firewall configuration utility
C
4
star
49

toh

JavaScript
4
star
50

iwinfo

[MIRROR] Library for accessing wireless device drivers
C
4
star
51

fstools

[MIRROR] OpenWrt filesystem utilities
C
3
star
52

relayd

[MIRROR] IPv4 pseudo-bridge routing daemon
C
3
star
53

jsonpath

[MIRROR] JSON parsing utility
C
3
star
54

make_ext4fs

[MIRROR] Standalone fork of Android make_ext4fs utility
C
3
star
55

procd

[MIRROR] OpenWrt service / process manager
C
3
star
56

ubox

[MIRROR] OpenWrt core utilities
C
3
star
57

librpc-uclibc

[MIRROR] Standalone librpc forked from uclibc
C
3
star
58

umbim

[MIRROR] OpenWrt MBIM modem utility
Perl
3
star
59

mountd

[MIRROR] OpenWrt automount daemon
C
3
star
60

cgi-io

[MIRROR] CGI utility for handling up/downloading of files etc.
C
3
star
61

urngd

[MIRROR] Micro non-physical true random number generator based on timing jitter
C
3
star
62

ucert

[MIRROR] OpenWrt usign certificate wrapper
C
3
star
63

bcm63xx_u-boot

[MIRROR] Broadcom-s U-Boot
C
2
star
64

bcm63xx_atf

[MIRROR] Broadcom-s Trusted Firmware A
C
2
star
65

broadcom-sprom

Broadcom BCMA/SSB Fallback SPROMs
2
star
66

usbmode

[MIRROR] usbmode - usb_modeswitch replacement
C
2
star
67

forum-old

HTML
2
star
68

fwtool

[MIRROR] Utility for appending and extracting firmware metadata and signatures
C
1
star