'\" t .TH "NETWORKD\&.CONF" "5" "" "systemd 231" "networkd.conf" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" networkd.conf, networkd.conf.d \- 全域性網路配置檔案 .SH "SYNOPSIS" .PP /etc/systemd/networkd\&.conf .PP /etc/systemd/networkd\&.conf\&.d/*\&.conf .PP /usr/lib/systemd/networkd\&.conf\&.d/*\&.conf .SH "描述" .PP 這些配置檔案控制著全域性網路引數。 當前僅用於設定 DUID(DHCP Unique Identifier) .SH "配置目錄及其優先順序" .PP 預設設定是在編譯期間確定的, 所以僅在確實需要修改預設設定的情況下, 才需要使用配置檔案。位於 /etc/systemd/ 目錄中的初始配置檔案, 僅包含了展示選項預設值的註釋, 目的在於方便系統管理員檢視和直接修改。 .PP 如果軟體包想要自定義某些預設設定, 那麼必須將自定義的配置檔案安裝到 /usr/lib/systemd/*\&.conf\&.d/ 目錄中。 /etc/ 目錄僅供系統管理員使用。 系統管理員可以利用下面的邏輯來覆蓋預設設定: 主配置檔案最先被讀取, 優先順序也最低。 所有 *\&.conf\&.d/ 中的配置檔案 都會覆蓋主配置檔案中的設定。 所有 *\&.conf\&.d/ 中的配置檔案(無論位於哪個目錄中), 統一按照檔名的字典順序處理。 如果在多個配置檔案中設定了同一個選項, 那麼僅以檔名最靠後(字典順序)的那一個為準。 為了便於排序, 建議給所有 *\&.conf\&.d/ 中的配置檔案 都加上兩位十進位制數字的檔名字首。 .PP 如果系統管理員想要遮蔽 /usr/lib/ 目錄中的某個配置檔案, 那麼最佳做法是在 /etc/ 目錄中 建立一個指向 /dev/null 的同名符號連結, 即可徹底遮蔽 /usr/lib/ 目錄中的同名檔案。 .SH "[DHCP] 小節選項" .PP 此小節用於配置 DUID(DHCP Unique Identifier) 的值。 DHCPv6 客戶端在獲取動態 IPv6 地址時, 會向 DHCPv6 伺服器傳送 DUID(DHCP Unique Identifier) 以及網路介面的 IAID(Identity Association Identifier)。 如果設定了 \fBClientIdentifier=duid\fR ,那麼當 DHCPv4 客戶端在獲取動態 IPv4 地址時, 會向 DHCPv4 伺服器傳送 DUID(DHCP Unique Identifier) 以及網路介面的 IAID(Identity Association Identifier)。 DHCP 伺服器可根據 DUID 與 IAID 來唯一定位主機及其網路介面。 參見 \fBsystemd.network\fR(5) 以瞭解詳情。 .PP 能夠識別的選項如下: .PP \fIDUIDType=\fR .RS 4 指定 DUID 的生成方法。參見 \m[blue]\fBRFC 3315\fR\m[]\&\s-2\u[1]\d\s+2 以瞭解所有選項。 .sp 可以使用的方法如下: .PP \fBvendor\fR .RS 4 如果 "DUIDType=vendor" ,那麼將會把"43793"(systemd)用作"vendor identifier", 並將其與經過雜湊的 \fBmachine-id\fR(5) 值混合, 以生成 DUID 值。 這是預設值。 .RE .PP \fBlink\-layer\-time\fR, \fBlink\-layer\fR, \fBuuid\fR .RS 4 將這些值用作 DUID 的 type 欄位的值, 但是 DUID 的內容必須由 \fIDUIDRawData=\fR 提供。 .RE .sp 無論使用上述哪種方法,\fIDUIDRawData=\fR 都可用於覆蓋 實際的 DUID 值。 .RE .PP \fIDUIDRawData=\fR .RS 4 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 \fIDUIDType=\fR and the value configured here\&. .sp 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 \fBsystemd.network \fR(5)\&. The configured DHCP DUID should conform to the specification in \m[blue]\fBRFC 3315\fR\m[]\&\s-2\u[2]\d\s+2, \m[blue]\fBRFC 6355\fR\m[]\&\s-2\u[3]\d\s+2\&. To configure IAID, see \fBsystemd.network\fR(5)\&. .PP \fBExample\ \&1.\ \&A DUIDType=vendor with a custom value\fR .sp .if n \{\ .RS 4 .\} .nf DUIDType=vendor DUIDRawData=00:00:ab:11:f9:2a:c2:77:29:f9:5c:00 .fi .if n \{\ .RE .\} .sp 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"\&. .RE .SH "參見" .PP \fBsystemd\fR(1), \fBsystemd.network\fR(5), \fBmachine-id\fR(1) .SH "NOTES" .IP " 1." 4 RFC 3315 .RS 4 \%https://tools.ietf.org/html/rfc3315#section-9 .RE .IP " 2." 4 RFC 3315 .RS 4 \%http://tools.ietf.org/html/rfc3315#section-9 .RE .IP " 3." 4 RFC 6355 .RS 4 \%http://tools.ietf.org/html/rfc6355 .RE .SH "跋" .br 本頁面中文版由中文 man 手冊頁計劃提供。 .PP 翻譯人員:金步國 .br 金步國作品集:http://www.jinbuguo.com .br .br 中文 man 手冊頁計劃:\fBhttps://github.com/man-pages-zh/manpages-zh\fR