network.xml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. <indexterm zone="ch-scripts-network">
  10. <primary sortas="d-network">network</primary>
  11. <secondary>configuring</secondary></indexterm>
  12. <sect2>
  13. <title>Creating network interface configuration files</title>
  14. <para>The following command creates a sample <filename>ipv4</filename> file for the
  15. <filename>eth0</filename> device:</para>
  16. <screen><userinput>cd /etc/sysconfig/network-devices &amp;&amp;
  17. mkdir ifconfig.eth0 &amp;&amp;
  18. cat &gt; ifconfig.eth0/ipv4 &lt;&lt; "EOF"
  19. ONBOOT=yes
  20. SERVICE=ipv4-static
  21. IP=192.168.1.1
  22. GATEWAY=192.168.1.2
  23. PREFIX=24
  24. BROADCAST=192.168.1.255
  25. EOF</userinput></screen>
  26. </sect2>
  27. <sect2 id="resolv.conf">
  28. <title>Creating the /etc/resolv.conf file</title>
  29. <indexterm zone="resolv.conf"><primary sortas="e-/etc/resolv.conf">/etc/resolv.conf</primary></indexterm>
  30. <para>Create the file by running the following:</para>
  31. <screen><userinput>cat &gt; /etc/resolv.conf &lt;&lt; "EOF"
  32. # Begin /etc/resolv.conf
  33. domain {<replaceable>[Your Domain Name]</replaceable>}
  34. nameserver <replaceable>[IP address of your nameserver]</replaceable>
  35. # End /etc/resolv.conf
  36. EOF</userinput></screen>
  37. </sect2>
  38. </sect1>