Changeset 82fc053 for BOOK/network/common/dhcpcd.xml
- Timestamp:
- May 14, 2014, 1:21:04 AM (10 years ago)
- Branches:
- clfs-3.0.0-sysvinit, sysvinit
- Children:
- 056e32f4
- Parents:
- db71344
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BOOK/network/common/dhcpcd.xml
rdb71344 r82fc053 47 47 48 48 <sect2 id="conf-dhcpcd" role="configuration"> 49 <title>Creating the DHCP Network Interface Configuration File </title>49 <title>Creating the DHCP Network Interface Configuration Files</title> 50 50 51 <para>The following is an example for the eth0 interface. Refer to the 52 dhcpcd.conf man page for more information. This step may be skipped if 53 default behavior of dhcpcd is required.</para> 51 <para>First install the service from the CLFS Bootscripts package:</para> 54 52 55 <para>Create the <filename>/etc/dhcpcd.conf</filename> configuration file 56 using the following commands. Adjust appropriately for additional options:</para> 53 <screen><userinput>tar -xvf bootscripts-cross-lfs-&bootscripts-clfs-version;.tar.xz 54 cd bootscripts-cross-lfs-&bootscripts-clfs-version; 55 make install-service-dhcpcd</userinput></screen> 57 56 58 <screen><userinput>cd /etc && 59 cat > dhcpcd.conf << "EOF" 60 <literal># dhcpcd configuration eth0 interface 61 # See dhcpcd.conf(5) for details. 57 <para>Finally, create the 58 <filename>/etc/sysconfig/network-devices/ifconfig.eth0/dhcpcd</filename> 59 configuration file using the following commands. Adjust appropriately for 60 additional interfaces:</para> 62 61 63 interface eth0 64 # dhcpcd-run-hooks uses these options. 65 option subnet_mask, routers, domain_name_servers 62 <screen><userinput>cd /etc/sysconfig/network-devices && 63 mkdir -v ifconfig.eth0 && 64 cat > ifconfig.eth0/dhcpcd << "EOF" 65 <literal>ONBOOT="yes" 66 SERVICE="dhcpcd" 66 67 67 # The default timeout for waiting for a DHCP response is 30 seconds 68 # which may be too long or too short and can be changed here. 69 timeout 16</literal> 68 # Start Command for DHCPCD 69 DHCP_START="-q" 70 71 # Stop Command for DHCPCD 72 DHCP_STOP="-k"</literal> 70 73 EOF</userinput></screen> 71 74 75 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 76 href="static.xml" 77 xpointer="xpointer(//*[@os='var-ob'])"/> 78 79 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 80 href="static.xml" 81 xpointer="xpointer(//*[@os='var-s'])"/> 82 83 <para>The <envar>DHCP_START</envar> and <envar>DHCP_STOP</envar> variables 84 arguments that are passed onto <filename>dhcpcd</filename> when starting 85 and stoppping the service. More information about what can be passed can 86 be found in the <filename>dhcpcd(8)</filename> man page.</para> 87 72 88 <para>To configure another Static Interface, Follow <xref linkend="ch-network-static"/>.</para> 73 74 </sect2>75 76 <sect2>77 <title>Configuring the Network Interface at boot</title>78 79 <para>Enabling of the Network Interface configuration is80 done per interface. To enable Network Interface81 configuration at boot, run:</para>82 83 <screen role="nodump"><userinput>systemctl enable dhcpcd@eth0</userinput></screen>84 85 <para>To disable previously enabled Network Interface86 configuration at boot, run:</para>87 88 <screen role="nodump"><userinput>systemctl disable dhcpcd@eth0</userinput></screen>89 90 <para>To manually start the Network Interface configuration,91 run:</para>92 93 <screen role="nodump"><userinput>systemctl start dhcpcd@eth0</userinput></screen>94 95 <para>Replace eth0 with the correct Network Interface96 name as described on the beginning of this page.</para>97 89 98 90 </sect2>
Note: See TracChangeset
for help on using the changeset viewer.