Subversion Repositories svn LFS-FR


Blame | Last modification | View Log | RSS feed

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
 "" [
 <!ENTITY % general-entities SYSTEM "../../general.ent">

<sect1 id="ch-network-resolv">
  <?dbhtml filename="resolv.html"?>

  <title>Creating the /etc/resolv.conf File</title>

  <sect2 id="resolv.conf">
    <title>Creating the /etc/resolv.conf File</title>

    <indexterm zone="resolv.conf">
      <primary sortas="e-/etc/resolv.conf">/etc/resolv.conf</primary>

    <para>If the system is going to be connected to the Internet, it will
    need some means of Domain Name Service (DNS) name resolution to
    resolve Internet domain names to IP addresses, and vice versa. This is
    best achieved by placing the IP address of the DNS server, available
    from the ISP or network administrator, into
    <filename>/etc/resolv.conf</filename>. If at least one of your network
    interfaces is going to be configured by DHCP then you may not need to
    create this file. By default DHCPCD will overwrite this file when it gets
    a new lease from the DHCP server. If you wish to manually configure your
    network interfaces or manually set your DNS using DHCP then create the
    file by running the following:</para>

<screen><userinput>cat &gt; ${CLFS}/etc/resolv.conf &lt;&lt; "EOF"
<literal># Begin /etc/resolv.conf

domain <replaceable>[Your Domain Name]</replaceable>
nameserver <replaceable>[IP address of your primary nameserver]</replaceable>
nameserver <replaceable>[IP address of your secondary nameserver]</replaceable>

# End /etc/resolv.conf</literal>

    <para>Replace <replaceable>[IP address of the nameserver]</replaceable>
    with the IP address of the DNS most appropriate for the setup. There will
    often be more than one entry (requirements demand secondary servers for
    fallback capability). If you only need or want one DNS server, remove the
    second <emphasis>nameserver</emphasis> line from the file. The IP address
    may also be a router on the local network.</para>