| Both sides previous revision Previous revision | Next revisionBoth sides next revision |
| docs:guide-user:base-system:dhcp [2023/12/10 08:47] – [IP sets] vgaetera | docs:guide-user:base-system:dhcp [2023/12/10 08:50] – [DHCP and DNS configuration /etc/config/dhcp] vgaetera |
|---|
| |
| <sortable> | <sortable> |
| ^ Name ^ Type ^ Required ^ Default ^ Description ^ | ^ Name ^ Type ^ Required ^ Default ^ Description ^ |
| | ''ip'' | string | no | //(none)// | the IP address to be used for this host, or ''ignore'' to ignore any DHCP request from this host | | | ''ip'' | string | no | //(none)// | the IP address to be used for this host, or ''ignore'' to ignore any DHCP request from this host | |
| | ''mac'' | string | no | //(none)// | The hardware address(es) of this host, separated by spaces. | | | ''mac'' | string | no | //(none)// | The hardware address(es) of this host, separated by spaces. | |
| | ''hostid'' | string | no | //(none)// | The IPv6 interface identifier (address suffix) as hexadecimal number (max. 16 chars, 64 bits, 8 bytes) | | | ''hostid'' | string | no | //(none)// | The IPv6 interface identifier (address suffix) as hexadecimal number (max. 16 chars, 64 bits, 8 bytes) | |
| | ''duid'' | string | no | //(none)// | The DHCPv6-DUID of this host. | | | ''duid'' | string | no | //(none)// | The DHCPv6-DUID of this host. | |
| | ''name'' | string | no | //(none)// | Optional hostname to assign. | | | ''name'' | string | no | //(none)// | Optional hostname to assign. | |
| | ''tag'' | string | no | //(none)// | Set the given tag for matching hosts. | | | ''tag'' | string | no | //(none)// | Set the given tag for matching hosts. | |
| | ''match_tag'' | list of strings | no | //(none)// | If specified the section will apply only to requests having all the tags; incoming interface name is always auto-assigned, other tags can be added by vendorclass/userclass/etc. sections | | | ''match_tag'' | list of strings | no | //(none)// | If specified the section will apply only to requests having all the tags; incoming interface name is always auto-assigned, other tags can be added by vendorclass/userclass/etc. sections | |
| | ''dns'' | boolean | no | ''0'' | Add static forward and reverse DNS entries for this host. | | | ''dns'' | boolean | no | ''0'' | Add static forward and reverse DNS entries for this host. | |
| | ''broadcast'' | boolean | no | ''0'' | Force broadcast DHCP response. | | | ''broadcast'' | boolean | no | ''0'' | Force broadcast DHCP response. | |
| | ''leasetime'' | string | no | //(none)// | Host-specific lease time, e.g. 2m, 3h, 5d. Note: introduced by r48801 in trunk | | | ''leasetime'' | string | no | //(none)// | Host-specific lease time, e.g. 2m, 3h, 5d. Note: introduced by r48801 in trunk | |
| | ''instance'' | dnsmasq instance | no | //(none)// | Dnsmasq instance to which the host section is bound; if not specified the section is valid for all dnsmasq instances. | | | ''instance'' | dnsmasq instance | no | //(none)// | Dnsmasq instance to which the host section is bound; if not specified the section is valid for all dnsmasq instances. | |
| </sortable> | </sortable> |
| |
| |
| ==== Booting options ==== | ==== Booting options ==== |
| Some hosts support booting over the network (PXE booting). Sections of the type ''boot'' specify how DHCP/BOOTP is used to tell the host which file to boot and the server to load it from. | Some hosts support booting over the network (PXE booting). |
| | Sections of the type ''boot'' specify how DHCP/BOOTP is used to tell the host which file to boot and the server to load it from. |
| Each client can only receive one set of filename and server address options. | Each client can only receive one set of filename and server address options. |
| If different hosts should boot different files, or boot from different servers, you can use //tags// aka //network-ids// to map options to each client. | If different hosts should boot different files, or boot from different servers, you can use //tags// aka //network-ids// to map options to each client. |
| </sortable> | </sortable> |
| |
| Each classifying section (except ''tag'') has one configuration option: which tag it will be assigned. | Each classifying section (except ''tag'') has one configuration option: which tag it will be assigned. |
| |
| E.g. a ''mac'' section with an ''mac'' entry that exactly matches your ethernet MAC, and a tag (aka ''networkid'') of ''green'' will be tagged ''green''. | E.g. a ''mac'' section with an ''mac'' entry that exactly matches your ethernet MAC, and a tag (aka ''networkid'') of ''green'' will be tagged ''green''. |
| |
| <sortable> | <sortable> |
| :!: Requires the [[packages:pkgdata:dnsmasq-full]] package. | :!: Requires the [[packages:pkgdata:dnsmasq-full]] package. |
| |
| dnsmasq can automatically populate Netfilter IP sets with resolved addresses of the specified domains. This feature can be enabled using ''ipset'' option in the ''dnsmasq'' section, or, with a more convenient syntax, using a dedicated ''ipset'' section. Every ''ipset'' section contains names of the IP sets to populate (''name'', multiple IP set names can be specified in one section), and domains whose resolved addresses should be added to the specified IP sets (''domain''). | dnsmasq can automatically populate Netfilter IP sets with resolved addresses of the specified domains. This feature can be enabled using ''ipset'' option in the ''dnsmasq'' section, or, with a more convenient syntax, using a dedicated ''ipset'' section. |
| | Every ''ipset'' section contains names of the IP sets to populate (''name'', multiple IP set names can be specified in one section), and domains whose resolved addresses should be added to the specified IP sets (''domain''). |
| Example: | Example: |
| |