Changeset 032be17
- Timestamp:
- 10/26/2014 01:39:58 PM (10 years ago)
- Branches:
- krejzi/svn
- Children:
- b71b5c8
- Parents:
- 8ddd9c79
- Files:
-
- 1 added
- 5 edited
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
introduction/welcome/changelog.xml
r8ddd9c79 r032be17 52 52 </listitem> 53 53 <listitem> 54 <para>[krejzi] - Converted ISC DHCP and DHCPCD clients instructions to work on systemd setups.</para> 55 </listitem> 56 <listitem> 57 <para>[krejzi] - Adjusted Qemu instructions to use the "Advanced Network Configuration" instead of bridge-utils.</para> 58 </listitem> 59 <listitem> 60 <para>[krejzi] - Stripped configuration paragraph from bridge-utils instructions in favor of systemd-networkd ones.</para> 61 </listitem> 62 <listitem> 63 <para>[krejzi] - Imported "Advanced Network Configuration" instructions for configuring the Network Bridge with systemd-networkd.</para> 64 </listitem> 65 <listitem> 54 66 <para>[krejzi] - Adjusted Postlfs Configuration for use with LFS systemd.</para> 55 67 </listitem> 56 68 <listitem> 57 <para>[krejzi] - Imported systemd-units from main systemd branch. .</para>69 <para>[krejzi] - Imported systemd-units from main systemd branch.</para> 58 70 </listitem> 59 71 <listitem> -
networking/connect/connect.xml
r8ddd9c79 r032be17 32 32 providers to authenticate the Internet connections.</para> 33 33 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"/>36 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dhcp .xml"/>34 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="advanced-network-systemd.xml"/> 35 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dhcpcd-systemd.xml"/> 36 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dhcp-systemd.xml"/> 37 37 38 38 </chapter> -
networking/connect/dhcp-systemd.xml
r8ddd9c79 r032be17 39 39 40 40 &lfs76_checked; 41 42 <note> 43 <para> 44 Make sure that you disable the <command>systemd-networkd</command> service 45 or configure it not to manage the interfaces you want to manage with 46 <application>DHCP</application> client. 47 </para> 48 </note> 41 49 42 50 <bridgehead renderas="sect3">Package Information</bridgehead> … … 254 262 255 263 <para> 264 If you want to configure network interfaces at boot using 265 <command>dhclient</command>, you need to install the 266 systemd unit included in <xref linkend="bootscripts"/> 267 package by running the following command as the 268 <systemitem class="username">root</systemitem> user: 269 </para> 270 271 <screen role="root"><userinput>make install-dhclient</userinput></screen> 272 273 <indexterm zone="dhcp dhclient-config"> 274 <primary sortas="f-dhclient">dhclient</primary> 275 </indexterm> 276 277 <para> 256 278 At this point you can test if <command>dhclient</command> is 257 279 behaving as expected by running the following command as the … … 259 281 </para> 260 282 261 <screen role="root"><userinput>dhclient <replaceable><eth0></replaceable></userinput></screen> 262 263 <para> 264 Replace <replaceable><eth0></replaceable> with your 265 desired interface. If you want more verbose output, add the 266 <command>-v</command> parameter to the command above. 267 </para> 268 269 <para id="dhclient-service"> 270 If you want to configure network interfaces at boot using 271 <command>dhclient</command>, you need to install the 272 <filename>/lib/services/dhclient</filename> script 273 included in <xref linkend="bootscripts"/> package: 274 </para> 275 276 <screen role="root"><userinput>make install-service-dhclient</userinput></screen> 277 278 <indexterm zone="dhcp dhclient-service"> 279 <primary sortas="f-dhclient">dhclient (service script)</primary> 280 </indexterm> 281 282 <para id="dhclient-ifconfig"> 283 Next, create the <filename>/etc/sysconfig/ifconfig.eth0</filename> 284 configuration file with the following commands as the 285 <systemitem class="username">root</systemitem> user: 286 </para> 287 288 <screen role="root"><userinput>cat > /etc/sysconfig/ifconfig.eth0 << "EOF" 289 <literal>ONBOOT="yes" 290 IFACE="eth0" 291 SERVICE="dhclient" 292 DHCP_START="" 293 DHCP_STOP="" 294 295 # Set PRINTIP="yes" to have the script print 296 # the DHCP assigned IP address 297 PRINTIP="no" 298 299 # Set PRINTALL="yes" to print the DHCP assigned values for 300 # IP, SM, DG, and 1st NS. This requires PRINTIP="yes". 301 PRINTALL="no"</literal> 302 EOF</userinput></screen> 303 304 <indexterm zone="dhcp dhclient-ifconfig"> 305 <primary sortas="e-etc-sysconfig-...-dhclient">/etc/sysconfig/ifconfig.eth0</primary> 306 </indexterm> 307 308 <para> 309 Adjust the file to suit your needs. 310 </para> 311 312 <para> 313 For more information on the appropriate <envar>DHCP_START</envar> 314 and <envar>DHCP_STOP</envar> values see 315 <command>man 8 dhclient</command>. 283 <screen role="root"><userinput>systemctl start dhclient@<replaceable>eth0</replaceable></userinput></screen> 284 285 <para> 286 To start <command>dhclient</command> on a specific interface 287 at boot, enable the previously installed systemd unit by 288 running the following command as the 289 <systemitem class="username">root</systemitem> user: 290 </para> 291 292 <screen role="root"><userinput>systemctl enable dhclient@<replaceable>eth0</replaceable></userinput></screen> 293 294 <para> 295 Replace <replaceable>eth0</replaceable> with the actual interface name. 316 296 </para> 317 297 … … 370 350 <screen role="root"><userinput>install -v -dm 755 /var/lib/dhcpd</userinput></screen> 371 351 372 373 If you want to start the DHCP Server at boot, install374 the <filename>/etc/rc.d/init.d/dhcpd</filename>375 init script included in the <xref linkend="bootscripts"/>376 package:352 <para> 353 To start the <command>dhcpd</command> daemon at boot, 354 install the systemd unit from the <xref linkend="bootscripts"/> 355 package by running the following command as the 356 <systemitem class="username">root</systemitem> user: 377 357 </para> 378 358 … … 385 365 <para> 386 366 You will need to edit the 387 <filename>/etc/ sysconfig/dhcpd</filename>in order367 <filename>/etc/default/dhcpd</filename> file in order 388 368 to set the interface on which <command>dhcpd</command> 389 369 will serve the DHCP requests. -
networking/connect/dhcpcd-systemd.xml
r8ddd9c79 r032be17 39 39 &lfs76_checked; 40 40 41 <note> 42 <para> 43 Make sure that you disable the <command>systemd-networkd</command> service 44 or configure it not to manage the interfaces you want to manage with 45 <application>dhcpcd</application>. 46 </para> 47 </note> 48 41 49 <bridgehead renderas="sect3">Package Information</bridgehead> 42 50 <itemizedlist spacing="compact"> … … 75 83 <sect2 role="installation"> 76 84 <title>Installation of dhcpcd</title> 85 86 <para> 87 First, silence a lot of warnings caused by using the latest toolchain 88 by running the following command: 89 </para> 90 91 <screen><userinput>sed -i "s:BSD_SOURCE:DEFAULT_SOURCE:g" configure</userinput></screen> 77 92 78 93 <para>Install <application>dhcpcd</application> by running the following … … 142 157 <title>General Configuration Information</title> 143 158 144 <para>To configure <command>dhcpcd</command>, you need to first install 145 the network service script, 146 <filename>/lib/services/dhcpcd</filename> 147 included in the <xref linkend="bootscripts"/> package 148 (as user <systemitem class="username">root</systemitem>):</para> 159 <para> 160 If you want to configure network interfaces at boot using 161 <command>dhcpcd</command>, you need to install the 162 systemd unit included in <xref linkend="bootscripts"/> 163 package by running the following command as the 164 <systemitem class="username">root</systemitem> user: 165 </para> 166 167 <screen role="root"><userinput>make install-dhcpcd</userinput></screen> 149 168 150 169 <indexterm zone="dhcpcd dhcpcd-init"> 151 <primary sortas="f-dhcpcd">dhcpcd (service script)</primary>170 <primary sortas="f-dhcpcd">dhcpcd</primary> 152 171 </indexterm> 153 172 154 <screen role='root'><userinput>make install-service-dhcpcd</userinput></screen> 155 156 <para>Whenever <command>dhcpcd</command> configures or shuts down 157 a network interface, it executes hook scripts. For more details 158 about those scripts, see the <command>dhcpcd-run-hooks</command> and 159 <command>dhcpcd</command> man pages.</para> 160 161 <para id="dhcpcd-config2">Finally, as the <systemitem 162 class="username">root</systemitem> user create the 163 <filename>/etc/sysconfig/ifconfig.eth0</filename> 164 configuration file using the following commands. Adjust appropriately 165 for additional interfaces:</para> 166 167 <indexterm zone="dhcpcd dhcpcd-config2"> 168 <primary sortas="e-etc-sysconfig-dhcpcd">/etc/sysconfig/ifconfig.eth0 (dhcpcd)</primary> 169 </indexterm> 170 171 <screen role='root'><userinput>cat > /etc/sysconfig/ifconfig.eth0 << "EOF" 172 <literal>ONBOOT="yes" 173 IFACE="eth0" 174 SERVICE="dhcpcd" 175 DHCP_START="-b -q <replaceable><insert appropriate start options here></replaceable>" 176 DHCP_STOP="-k <replaceable><insert additional stop options here></replaceable>"</literal> 177 EOF</userinput></screen> 178 179 <para>For more information on the appropriate <envar>DHCP_START</envar> and 180 <envar>DHCP_STOP</envar> values, examine the man page for 181 <command>dhcpcd</command>.</para> 173 <para> 174 Whenever <command>dhcpcd</command> configures or shuts down 175 a network interface, it executes hook scripts. For more details 176 about those scripts, see the <command>dhcpcd-run-hooks</command> and 177 <command>dhcpcd</command> man pages. 178 </para> 182 179 183 180 <note> 184 185 <para id="dhcpcd-config3">The default behavior of 186 <command>dhcpcd</command> sets the hostname and mtu settings. It also 187 overwrites <filename>/etc/resolv.conf</filename> and 188 <filename>/etc/ntp.conf</filename>. 189 190 These modifications to system files and settings on system 191 configuration files are done by hooks which are stored in <filename 192 class="directory">/lib/dhcpcd/dhcpcd-hooks</filename>. 193 194 Setup <command>dhcpcd</command> by removing or adding hooks from/to 195 that directory. The execution of hooks can be disabled by using the 196 <option>--nohook</option> (<option>-C</option>) command line option or 197 by the <option>nohook</option> option in the 198 <filename>/etc/dhcpcd.conf</filename> file.</para> 199 200 <para>Review the <command>dhcpcd</command> man page for switches to add 201 to the <envar>DHCP_START</envar> value.</para> 202 181 <para id="dhcpcd-config3"> 182 The default behavior of <command>dhcpcd</command> sets the 183 hostname and mtu settings. It also overwrites 184 <filename>/etc/resolv.conf</filename> and 185 <filename>/etc/ntp.conf</filename>. 186 187 These modifications to system files and settings on system 188 configuration files are done by hooks which are stored in 189 <filename class="directory">/lib/dhcpcd/dhcpcd-hooks</filename>. 190 191 Setup <command>dhcpcd</command> by removing or adding hooks from/to 192 that directory. The execution of hooks can be disabled by using the 193 <option>--nohook</option> (<option>-C</option>) command line option or 194 by the <option>nohook</option> option in the 195 <filename>/etc/dhcpcd.conf</filename> file. 196 </para> 203 197 </note> 204 198 … … 206 200 <primary sortas="e-etc-resolv.conf">/etc/resolv.conf</primary> 207 201 </indexterm> 208 </sect3> 209 210 <sect3 id="dhcpcd-init2"> 211 <title>Configuration Information: fixed ip</title> 212 213 <para id="dhcpcd-config4">Although not usual, it is possible that you need 214 to configure <application>dhcpcd</application> to use a fixed ip. Here, 215 we give an example. As the 216 <systemitem class="username">root</systemitem> user create the 217 <filename>/etc/sysconfig/ifconfig.eth0</filename> configuration file 218 using the following commands. Adjust appropriately for additional 219 interfaces and for the actual ip and router you need:</para> 220 221 <indexterm zone="dhcpcd dhcpcd-config4"> 222 <primary sortas="e-etc-sysconfig-dhcpcd">/etc/sysconfig/ifconfig.eth0 (dhcpcd)</primary> 223 </indexterm> 224 225 <screen role='root'><userinput>cat > /etc/sysconfig/ifconfig.eth0 << "EOF" 226 <literal>ONBOOT="yes" 227 IFACE="eth0" 228 SERVICE="dhcpcd" 229 DHCP_START="-b -q -S ip_address=192.168.0.10/24 -S routers=192.168.0.1" 230 DHCP_STOP="-k"</literal> 231 EOF</userinput></screen> 232 233 <para>You can either use DNS servers in 234 <filename>/etc/resolv.conf</filename> from another system, your 235 preferred servers, or just the example 236 <filename>/etc/resolv.conf.head</filename> file below as is:</para> 237 238 <screen role='root'><userinput>cat > /etc/resolv.conf.head << "EOF" 239 <literal># OpenDNS servers 240 nameserver 208.67.222.222 241 nameserver 208.67.220.220</literal> 242 EOF</userinput></screen> 202 203 <para> 204 At this point you can test if <command>dhcpcd</command> is 205 behaving as expected by running the following command as the 206 <systemitem class="username">root</systemitem> user: 207 </para> 208 209 <screen role="root"><userinput>systemctl start dhcpcd@<replaceable>eth0</replaceable></userinput></screen> 210 211 <para> 212 To start <command>dhcpcd</command> on a specific interface 213 at boot, enable the previously installed systemd unit by 214 running the following command as the 215 <systemitem class="username">root</systemitem> user: 216 </para> 217 218 <screen role="root"><userinput>systemctl enable dhcpcd@<replaceable>eth0</replaceable></userinput></screen> 219 220 <para> 221 Replace <replaceable>eth0</replaceable> with the actual interface name. 222 </para> 243 223 244 224 </sect3> … … 250 230 251 231 <segmentedlist> 252 <segtitle>Installed Program </segtitle>253 <segtitle>Installed Librar y</segtitle>254 <segtitle>Installed Director y</segtitle>232 <segtitle>Installed Programs</segtitle> 233 <segtitle>Installed Libraries</segtitle> 234 <segtitle>Installed Directories</segtitle> 255 235 256 236 <seglistitem> 257 237 <seg>dhcpcd</seg> 258 <seg> /lib/dhcpcd/dev/udev.so</seg>238 <seg>None</seg> 259 239 <seg>/lib/dhcpcd</seg> 260 240 </seglistitem> … … 277 257 </varlistentry> 278 258 279 <varlistentry id="dhcpcd-udev">280 <term><filename class="libraryfile">udev.so</filename></term>281 <listitem>282 <para>283 add udev support for interface arrival and departure; this is284 because udev likes to rename the interface, which it can't do if285 dhcpcd grabs it first.286 </para>287 <indexterm zone="dhcpcd dhcpcd-udev">288 <primary sortas="c-dhcpcd-udev">udev.so</primary>289 </indexterm>290 </listitem>291 </varlistentry>292 293 259 </variablelist> 294 260 -
networking/netprogs/bridgeutils-systemd.xml
r8ddd9c79 r032be17 119 119 </sect2> 120 120 121 <sect2 role="configuration">122 <title>Configuring bridge-utils</title>123 124 <sect3 id='bridgeutils-init'>125 <title>Configuration Information</title>126 127 <para>To automate bridge creation and configuration,128 install the <filename>/lib/services/etc/bridge</filename>129 service script included in the <xref linkend="bootscripts"/>130 package.</para>131 132 <indexterm zone="bridgeutils bridgeutils-init">133 <primary sortas="f-bridgeutils">bridge-utils</primary>134 </indexterm>135 136 <screen role="root"><userinput>make install-service-bridge</userinput></screen>137 138 <note><para>The <filename>bridge</filename> script depends139 on the commands <command>/sbin/ifup</command> and140 <command>/sbin/ifdown</command> and the service script141 <emphasis>ipv4-static</emphasis> from the <emphasis>LFS</emphasis>142 bootscripts dated January 27, 2012 or later.</para></note>143 144 <para>The following configuration file will create a bridge device at145 boot time and attach the eth0 device to it. If more than one device is146 desired, use a space separated list of INTERFACE_COMPONENTS. This147 configuration is useful when planning to run a virtual machine such as148 kvm/qemu.</para>149 150 <para>Other SERVICE combinations are possible, for example,151 SERVICES="bridge dhcp". In that case, the address parameters152 are not needed, but do not interfere if present. The153 bridge service may also be used alone, but will require154 additional subsequent configuration.</para>155 156 <caution><para>Do not run a parallel configuration for a device in the157 INTERFACE_COMPONENTS list. For instance, in the example below, do not158 configure <filename>/etc/sysconfig/ifconfig.eth0</filename> to run at159 boot time. The command <command>ifdown br0</command> followed by160 command <command>ifup eth0</command> will work, but don't try to have161 both up at the same time.</para></caution>162 163 <screen role="root"><userinput>cat > /etc/sysconfig/ifconfig.br0 << "EOF"164 <literal>ONBOOT=yes165 IFACE=br0166 SERVICE="bridge ipv4-static" # Space separated167 IP=192.168.1.32168 GATEWAY=192.168.1.1169 PREFIX=24170 BROADCAST=192.168.1.255171 CHECK_LINK=no # Don't check before bridge is created172 STP=no # Spanning tree protocol, default no173 INTERFACE_COMPONENTS="eth0" # Add to IFACE, space separated devices174 IP_FORWARD=true</literal>175 EOF</userinput></screen>176 177 <para>All addresses should be changed to meet your circumstance.</para>178 179 </sect3>180 181 </sect2>182 183 184 121 <sect2 role="content"> 185 122 <title>Contents</title> -
networking/netprogs/netprogs.xml
r8ddd9c79 r032be17 21 21 are support programs for daemons that you may have running on your machine.</para> 22 22 23 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bridgeutils .xml"/>23 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bridgeutils-systemd.xml"/> 24 24 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="cifsutils.xml"/> 25 25 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ncftp.xml"/> -
postlfs/filesystems/fuse.xml
r8ddd9c79 r032be17 142 142 143 143 mv -v /usr/lib/libfuse.so.* /lib && 144 ln -sfv ../../lib/ libfuse.so.&fuse-version;/usr/lib/libfuse.so &&144 ln -sfv ../../lib/$(readlink /usr/lib/libfuse.so) /usr/lib/libfuse.so && 145 145 rm -rf /tmp/init.d && 146 146 -
postlfs/virtualization/qemu-systemd.xml
r8ddd9c79 r032be17 126 126 your system processor is required.</para> 127 127 128 <para>For networking, check that <xref linkend= 'bridgeutils'/> is installed128 <para>For networking, check that <xref linkend="bridgeutils"/> is installed 129 129 and the following options in the kernel configuration are enabled:</para> 130 130 131 <screen><literal>Networking support ---> 132 Networking options ---> 133 802.1d Ethernet Bridging: Y or M 134 Device Drivers ---> 131 <screen><literal>Device Drivers ---> 135 132 Network device support ---> 136 133 Universal TUN/TAP device driver support: Y or M</literal></screen> … … 261 258 <itemizedlist spacing="compact"> 262 259 <listitem> 263 <para>Set up bridging with <xref linkend='bridgeutils'/>.</para>260 <para>Set up bridging using <xref linkend="network-bridge"/>.</para> 264 261 </listitem> 265 262 … … 270 267 271 268 <para>To make this permanent, add the command to 272 <filename>/etc/sys sysctl.conf:</filename></para>273 274 <screen role="root"><userinput>cat >> /etc/sysctl. conf << EOF269 <filename>/etc/sysctl.d/60-net-forward.conf:</filename></para> 270 271 <screen role="root"><userinput>cat >> /etc/sysctl.d/60-net-forward.conf << "EOF" 275 272 net.ipv4.ip_forward=1 276 273 EOF</userinput></screen> … … 282 279 device, usually visible as tap0, to the host bridge.</para> 283 280 284 <screen role="root"><userinput>cat > /etc/qemu-ifup << EOF281 <screen role="root"><userinput>cat > /etc/qemu-ifup << "EOF" 285 282 #!/bin/bash 286 283 287 284 switch=br0 288 285 289 if [ -n " \$1" ]; then286 if [ -n "$1" ]; then 290 287 # Add new tap0 interface to bridge 291 /sbin/ip link set \$1 up 292 sleep 0.5s 293 /usr/sbin/brctl addif \$switch \$1 288 /usr/sbin/brctl addif $switch $1 294 289 else 295 290 echo "Error: no interface specified" … … 302 297 chmod +x /etc/qemu-ifup</userinput></screen> 303 298 304 <screen role="root"><userinput>cat > /etc/qemu-ifdown << EOF299 <screen role="root"><userinput>cat > /etc/qemu-ifdown << "EOF" 305 300 #!/bin/bash 306 301 307 302 switch=br0 308 303 309 if [ -n " \$1" ]; then304 if [ -n "$1" ]; then 310 305 # Remove tap0 interface from bridge 311 /usr/sbin/brctl delif \$switch \$1306 /usr/sbin/brctl delif $switch $1 312 307 else 313 308 echo "Error: no interface specified" … … 323 318 </itemizedlist> 324 319 325 < note><para>The backslashes in the above script are for convenience320 <!-- <note><para>The backslashes in the above script are for convenience 326 321 for cut/paste operations. The backslashes should <emphasis>not</emphasis> 327 appear in the final scripts.</para></note> 322 appear in the final scripts.</para></note> --> 328 323 329 324 <itemizedlist spacing="compact"> -
postlfs/virtualization/virtualization.xml
r8ddd9c79 r032be17 22 22 processor.</para> 23 23 24 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="qemu .xml"/>24 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="qemu-systemd.xml"/> 25 25 26 26 </chapter>
Note:
See TracChangeset
for help on using the changeset viewer.