Provided by: manpages-zh_1.6.3.2-1_all bug

NAME

       networkd.conf, networkd.conf.d - 全局网络配置文件

SYNOPSIS

       /etc/systemd/networkd.conf

       /etc/systemd/networkd.conf.d/*.conf

       /usr/lib/systemd/networkd.conf.d/*.conf

描述

       这些配置文件控制着全局网络参数。 当前仅用于设置 DUID(DHCP Unique Identifier)

配置目录及其优先级

       默认设置是在编译期间确定的, 所以仅在确实需要修改默认设置的情况下, 才需要使用配置文件。位
       于 /etc/systemd/ 目录中的初始配置文件, 仅包含了展示选项默认值的注释, 目的在于方便系统管
       理员查看和直接修改。

       如果软件包想要自定义某些默认设置, 那么必须将自定义的配置文件安装到
       /usr/lib/systemd/*.conf.d/ 目录中。 /etc/ 目录仅供系统管理员使用。 系统管理员可以利用下面
       的逻辑来覆盖默认设置: 主配置文件最先被读取, 优先级也最低。 所有 *.conf.d/ 中的配置文件
       都会覆盖主配置文件中的设置。 所有 *.conf.d/ 中的配置文件(无论位于哪个目录中), 统一按照文
       件名的字典顺序处理。 如果在多个配置文件中设置了同一个选项, 那么仅以文件名最靠后(字典顺
       序)的那一个为准。 为了便于排序, 建议给所有 *.conf.d/ 中的配置文件 都加上两位十进制数字的
       文件名前缀。

       如果系统管理员想要屏蔽 /usr/lib/ 目录中的某个配置文件, 那么最佳做法是在 /etc/ 目录中 创建
       一个指向 /dev/null 的同名符号链接, 即可彻底屏蔽 /usr/lib/ 目录中的同名文件。

[DHCP] 小节选项

       此小节用于配置 DUID(DHCP Unique Identifier) 的值。 DHCPv6 客户端在获取动态 IPv6 地址时,
       会向 DHCPv6 服务器发送 DUID(DHCP Unique Identifier) 以及网络接口的 IAID(Identity
       Association Identifier)。 如果设置了 ClientIdentifier=duid ,那么当 DHCPv4 客户端在获取动
       态 IPv4 地址时, 会向 DHCPv4 服务器发送 DUID(DHCP Unique Identifier) 以及网络接口的
       IAID(Identity Association Identifier)。 DHCP 服务器可根据 DUID 与 IAID 来唯一定位主机及其
       网络接口。 参见 systemd.network(5) 以了解详情。

       能够识别的选项如下:

       DUIDType=
           指定 DUID 的生成方法。参见 RFC 3315[1] 以了解所有选项。

           可以使用的方法如下:

           vendor
               如果 "DUIDType=vendor" ,那么将会把"43793"(systemd)用作"vendor identifier", 并将
               其与经过散列的 machine-id(5) 值混合, 以生成 DUID 值。 这是默认值。

           link-layer-time, link-layer, uuid
               将这些值用作 DUID 的 type 字段的值, 但是 DUID 的内容必须由 DUIDRawData= 提供。

           无论使用上述哪种方法,DUIDRawData= 都可用于覆盖 实际的 DUID 值。

       DUIDRawData=
           Specifies the DHCP DUID value as a single newline-terminated, hexadecimal string, with
           each byte separated by ":". The DUID that is sent is composed of the DUID type
           specified by DUIDType= and the value configured here.

           The DUID value specified here overrides the DUID that systemd-networkd generates using
           the machine-id from the /etc/machine-id file. To configure DUID per-network, see
           systemd.network (5). The configured DHCP DUID should conform to the specification in
           RFC 3315[2], RFC 6355[3]. To configure IAID, see systemd.network(5).

           Example 1. A DUIDType=vendor with a custom value

               DUIDType=vendor
               DUIDRawData=00:00:ab:11:f9:2a:c2:77:29:f9:5c:00

           This specifies a 14 byte DUID, with the type DUID-EN ("00:02"), enterprise number
           43793 ("00:00:ab:11"), and identifier value "f9:2a:c2:77:29:f9:5c:00".

参见

       systemd(1), systemd.network(5), machine-id(1)

NOTES

        1. RFC 3315
           https://tools.ietf.org/html/rfc3315#section-9

        2. RFC 3315
           http://tools.ietf.org/html/rfc3315#section-9

        3. RFC 6355
           http://tools.ietf.org/html/rfc6355

       本页面中文版由中文 man 手册页计划提供。

       翻译人员:金步国
       金步国作品集:http://www.jinbuguo.com
       中文 man 手册页计划:https://github.com/man-pages-zh/manpages-zh