Changeset c1cacc30 for networking/connect
- Timestamp:
- 07/20/2014 04:21:35 PM (10 years ago)
- Branches:
- systemd-11177
- Children:
- c7edc8da
- Parents:
- 5992481e
- Location:
- networking/connect
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
networking/connect/connect.xml
r5992481e rc1cacc30 33 33 34 34 <!-- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ppp.xml"/> --> 35 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dhcpcd .xml"/>35 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dhcpcd-systemd.xml"/> 36 36 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dhcp-systemd.xml"/> 37 37 -
networking/connect/dhcpcd-systemd.xml
r5992481e rc1cacc30 118 118 </sect2> 119 119 120 <sect2 role="configuration">121 <title>Configuring dhcpcd</title>122 123 <sect3 id="dhcpcd-config">124 <title>Config Files</title>125 126 <para><filename>/etc/dhcpcd.conf</filename></para>127 128 <indexterm zone="dhcpcd dhcpcd-config">129 <primary sortas="e-etc-dhcpcd-dhcpcd-conf">/etc/dhcpcd/dhcpcd.conf</primary>130 </indexterm>131 132 </sect3>133 134 <sect3 id="dhcpcd-init">135 <title>General Configuration Information</title>136 137 <para>To configure <command>dhcpcd</command>, you need to first install138 the network service script,139 <filename>/lib/services/dhcpcd</filename>140 included in the <xref linkend="bootscripts"/> package141 (as user <systemitem class="username">root</systemitem>):</para>142 143 <indexterm zone="dhcpcd dhcpcd-init">144 <primary sortas="f-dhcpcd">dhcpcd (service script)</primary>145 </indexterm>146 147 <screen role='root'><userinput>make install-service-dhcpcd</userinput></screen>148 149 <para>Whenever <command>dhcpcd</command> configures or shuts down150 a network interface, it executes hook scripts. For more details151 about those scripts, see the <command>dhcpcd-run-hooks</command> and152 <command>dhcpcd</command> man pages.</para>153 154 <para id="dhcpcd-config2">Finally, as the <systemitem155 class="username">root</systemitem> user create the156 <filename>/etc/sysconfig/ifconfig.eth0</filename>157 configuration file using the following commands. Adjust appropriately158 for additional interfaces:</para>159 160 <indexterm zone="dhcpcd dhcpcd-config2">161 <primary sortas="e-etc-sysconfig-dhcpcd">/etc/sysconfig/ifconfig.eth0 (dhcpcd)</primary>162 </indexterm>163 164 <screen role='root'><userinput>cat > /etc/sysconfig/ifconfig.eth0 << "EOF"165 <literal>ONBOOT="yes"166 IFACE="eth0"167 SERVICE="dhcpcd"168 DHCP_START="-b -q <replaceable><insert appropriate start options here></replaceable>"169 DHCP_STOP="-k <replaceable><insert additional stop options here></replaceable>"</literal>170 EOF</userinput></screen>171 172 <para>For more information on the appropriate <envar>DHCP_START</envar> and173 <envar>DHCP_STOP</envar> values, examine the man page for174 <command>dhcpcd</command>.</para>175 176 <note>177 178 <para id="dhcpcd-config3">The default behavior of179 <command>dhcpcd</command> sets the hostname and mtu settings. It also180 overwrites <filename>/etc/resolv.conf</filename> and181 <filename>/etc/ntp.conf</filename>.182 183 These modifications to system files and settings on system184 configuration files are done by hooks which are stored in <filename185 class="directory">/lib/dhcpcd/dhcpcd-hooks</filename>.186 187 Setup <command>dhcpcd</command> by removing or adding hooks from/to188 that directory. The execution of hooks can be disabled by using the189 <option>--nohook</option> (<option>-C</option>) command line option or190 by the <option>nohook</option> option in the191 <filename>/etc/dhcpcd.conf</filename> file.</para>192 193 <para>Review the <command>dhcpcd</command> man page for switches to add194 to the <envar>DHCP_START</envar> value.</para>195 196 </note>197 198 <indexterm zone="dhcpcd dhcpcd-config3">199 <primary sortas="e-etc-resolv.conf">/etc/resolv.conf</primary>200 </indexterm>201 </sect3>202 203 <sect3 id="dhcpcd-init2">204 <title>Configuration Information: fixed ip</title>205 206 <para id="dhcpcd-config4">Although not usual, it is possible that you need207 to configure <application>dhcpcd</application> to use a fixed ip. Here,208 we give an example. As the209 <systemitem class="username">root</systemitem> user create the210 <filename>/etc/sysconfig/ifconfig.eth0</filename> configuration file211 using the following commands. Adjust appropriately for additional212 interfaces and for the actual ip and router you need:</para>213 214 <indexterm zone="dhcpcd dhcpcd-config4">215 <primary sortas="e-etc-sysconfig-dhcpcd">/etc/sysconfig/ifconfig.eth0 (dhcpcd)</primary>216 </indexterm>217 218 <screen role='root'><userinput>cat > /etc/sysconfig/ifconfig.eth0 << "EOF"219 <literal>ONBOOT="yes"220 IFACE="eth0"221 SERVICE="dhcpcd"222 DHCP_START="-b -q -S ip_address=192.168.0.10/24 -S routers=192.168.0.1"223 DHCP_STOP="-k"</literal>224 EOF</userinput></screen>225 226 <para>You can either use DNS servers in227 <filename>/etc/resolv.conf</filename> from another system, your228 preferred servers, or just the example229 <filename>/etc/resolv.conf.head</filename> file below as is:</para>230 231 <screen role='root'><userinput>cat > /etc/resolv.conf.head << "EOF"232 <literal># OpenDNS servers233 nameserver 208.67.222.222234 nameserver 208.67.220.220</literal>235 EOF</userinput></screen>236 237 </sect3>238 239 </sect2>240 241 120 <sect2 role="content"> 242 121 <title>Contents</title>
Note:
See TracChangeset
for help on using the changeset viewer.