basic-net.xml 1.1 KB

1234567891011121314151617181920212223242526
  1. <sect1 id="ch06-basic-net">
  2. <title>Setting up Basic Networking</title>
  3. <?dbhtml filename="basic-net.html" dir="chapter06"?>
  4. <para>Here will be set up basic networking now that all the necessary
  5. software has been installed. There isn't all that much to do, really,
  6. just creating a basic /etc/hosts file, and downloading some very
  7. high-quality network information files.</para>
  8. <para>The first step is to create /etc/hosts. This file contains
  9. information allowing resolution of hostnames to IP addresses. Create a
  10. very basic one (we'll make a better one later) with the following
  11. command:</para>
  12. <para><screen><userinput>echo "127.0.0.1 $(hostname) localhost" > /etc/hosts</userinput></screen></para>
  13. <para>Now unpack the Lfs-Utils tarball again, as we're going to copy two
  14. necessary files from it. One is the /etc/services file, which is used to
  15. resolv service numbers to human-readable names, and the /etc/protocols
  16. file, which does the same for protocol numbers. Copy them with the
  17. following command after you have entered the Lfs-Utils directory:</para>
  18. <para><screen><userinput>cp -f etc/{services,protocols} /etc</userinput></screen></para>
  19. </sect1>