Provided by: manpages-zh_1.6.4.3-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

systemd 231                                                                                     NETWORKD.CONF(5)