network.xml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
  3. <!ENTITY % general-entities SYSTEM "../general.ent">
  4. %general-entities;
  5. ]>
  6. <sect1 id="ch-scripts-network">
  7. <title>Configuring the network Script</title>
  8. <?dbhtml filename="network.html"?>
  9. <sect2>
  10. <title>Creating Network Interface Configuration Files</title>
  11. <para>The following command creates a sample <filename>ipv4</filename> file for the
  12. <filename>eth0</filename> device:</para>
  13. <screen><userinput>cd /etc/sysconfig/network-devices &amp;&amp;
  14. mkdir ifconfig.eth0 &amp;&amp;
  15. cat &gt; ifconfig.eth0/ipv4 &lt;&lt; "EOF"
  16. <literal>ONBOOT=yes
  17. SERVICE=ipv4-static
  18. IP=192.168.1.1
  19. GATEWAY=192.168.1.2
  20. PREFIX=24
  21. BROADCAST=192.168.1.255</literal>
  22. EOF</userinput></screen>
  23. </sect2>
  24. <sect2 id="resolv.conf">
  25. <title>Creating the /etc/resolv.conf File</title>
  26. <para>Create the file by running the following:</para>
  27. <screen><userinput>cat &gt; /etc/resolv.conf &lt;&lt; "EOF"
  28. <literal># Begin /etc/resolv.conf
  29. domain {<replaceable>[Your Domain Name]</replaceable>}
  30. nameserver <replaceable>[IP address of your primary nameserver]</replaceable>
  31. nameserver <replaceable>[IP address of your secondary nameserver]</replaceable>
  32. # End /etc/resolv.conf</literal>
  33. EOF</userinput></screen>
  34. </sect2>
  35. </sect1>