The /etc/config/dhcp6c file controls the WIDE-DHCPv6 client package wide-dhcpv6-client configuration. It defines basic properties and interface settings.
Sections
A typical default configuration consists of one dhcp6c section with common settings and one or more interface sections, usually covering the lan and loopback networks.
Basic Properties
The section of type dhcp6c named basic defines common client settings.
Example:
config 'dhcp6c' 'basic' option 'enabled' '1' option 'interface' 'wan' option 'pd' '1' option 'domain_name_servers' '1' option 'script' '/usr/bin/dhcp6c-state ' |
All defined options of this section are listed below.
Name |
Type |
Required |
Default |
Description |
enabled |
boolean |
no |
0 |
Specifies whether the DHCPv6 client should be started on boot |
interface |
string |
yes |
wan |
Specifies the logical interface name the client is running on |
dns |
string |
no |
dnsmasq |
Specifies the type of DNS server in use to propagate received DNS information. At the time of writing, only dnsmasq is supported |
debug |
boolean |
no |
0 |
Enables additional debug information in the system log |
pd |
boolean |
no |
1 |
Requests prefix delegation at the DHCPv6 server |
na |
boolean |
no |
0 |
Requests a permanent, non temporary address at the DHCPv6 server |
rapid_commit |
boolean |
no |
1 |
Signalize a rapid commit two message exchange (RFC3315) |
domain_name_servers |
boolean |
no |
1 |
Request a DNS server addresses |
domain_name |
boolean |
no |
0 |
Request the domain name |
ntp_servers |
boolean |
no |
0 |
Request NTP server addresses (RFC5908) |
sip_server_address |
boolean |
no |
0 |
Request SIP server address (RFC3319) |
sip_server_domain_name |
boolean |
no |
0 |
Request SIP domain names (RFC3319) |
nis_server_address |
boolean |
no |
0 |
Request Network Information Service (NIS) server address (RFC3898) |
nis_domain_name |
boolean |
no |
0 |
Request Network Information Service (NIS) domain name (RFC3898) |
nisp_server_address |
boolean |
no |
0 |
Request Network Information Service V2 (NIS+) server address (RFC3898) |
nisp_domain_name |
boolean |
no |
0 |
Request Network Information Service V2 (NIS+) domain name (RFC3898) |
bcmcs_server_address |
boolean |
no |
0 |
Request Broadcast and Multicast Control Service (BCMCS) address (RFC4280) |
bcmcs_server_domain_name |
boolean |
no |
0 |
Request Broadcast and Multicast Control Service (BCMCS) domain name (RFC4280) |
duid |
string |
no |
(derived from MAC address) |
Override the DUID used for DHCPv6 requests. The DUID must be specified as a set of at least 7 colon separated heximal digits, e.g. 00:03:00:06:D8:5D:4C:A5:03:F2
|
script |
file path |
no |
/usr/bin/dhcp6c-state |
Path of script which is executed when a reply is received |
Interface Settings
Sections of type interface define on which interfaces delegated prefixes are added and how they're aggregated. This sections are named, the section name corresponds to the covered logical interface.
Example:
config 'interface' 'lan' option 'enabled' '1' option 'sla_id' '0' option 'sla_len' '8 ' |
-
lan specifies that this section belongs to the LAN interface
-
sla_id 0 selects the 1st subnet out of the delegated prefix
-
sla_len 8 defines that the received prefix is expected to be 56 bits in size (64 - 8 = 56 )
The valid options of this section are listed blow.
Name |
Type |
Required |
Default |
Description |
enabled |
boolean |
no |
0 |
Specifies whether a prefix should be added on this interface |
sla_id |
integer |
yes |
(none) |
Specifies the site level aggregator identifier (selects the subnet out of the delegated prefix) |
sla_len |
integer |
yes |
(none) |
Specifies the site level aggregator length which is the difference of 64 and the delegated prefix size, e.g. /64 minus /56 from ISP = 8
|
Example
This example requests a /56 sized prefix and DNS servers on wan and configures two /64 subnets out of the prefix on lan and loopback . The loopback interface gets the first subnet assigned, lan the second.
config 'dhcp6c' 'basic' option 'enabled' '1' option 'interface' 'wan' option 'pd' '1' option 'domain_name_servers' '1' option 'script' '/usr/bin/dhcp6c-state' config 'interface' 'loopback' option 'enabled' '1' option 'sla_id' '0' option 'sla_len' '8' config 'interface' 'lan' option 'enabled' '1' option 'sla_id' '1' option 'sla_len' '8 '
-------------------
dhcp6c(8) - Linux man page
Name
dhcp6c - DHCPv6 client daemon
Synopsis
dhcp6c [ -dDf ] [ -r all | <addresses...> ] [ -R <addresses...> ] [ -c pathspec ] [ -I ] <interface>
Description
dhcp6c is an implementation of the DHCPv6 client.
Using DHCPv6 messages and DHCPv6 options, dhcp6c is used to request and configure IPv6 addresses and host network configuration information (e.g., DNS) for a network interface from the DHCPv6 server. It can also be used as a requesting router to request and configure Prefix Delegation for a subnet.
The assigned IPv6 addresses and prefixes are saved as /var/lib/dhcpv6/client6.leasesXXXXXX; this file is used to request the same addresses and prefixes from the DHCPv6 server. Each dhcp6c client has a client DHCP Unique Identifier (DUID); the DUID file is saved as /var/lib/dhcpv6/dhcp6c_duid. The dhcp6c client configuration is defined in /etc/dhcp6c.conf.
Options
- -c pathspec
- Specifies
the configuration file for dhcp6c
- -d
- Enables dhcp6c to print debugging messages.
- -D
- Enables dhcp6c to print verbose debugging messages.
- -f
- Enables dhcp6c to work as a foreground application. This option is helpful for debugging.
- -I
- Allows dhcp6c to request network information only. Do not configure the interface.
- -r all | <addresses...>
- Allows dhcp6c to release the addresses specified. This option is used only when releasing addresses explicitly.
- -R <addresses...>
- Allows dhcp6c to request the specified addresses.
Files
- /etc/dhcp6c.conf
- Contains DHCPv6 client configuration information.
- /var/lib/dhcpv6/dhcp6c_duid
- Contains DHCPv6 client DUID.
- /var/lib/dhcpv6/client6_leasesXXXXXX
- Contains DHCPv6 client assigned IPv6 addresses and prefixes.
Errors
Check /var/log/messages if there are errors.
|
请发表评论