[system-administrators-guide] Updates to clarify the use of the GATEWAY directive and how the default gateway is selected.

stephenw stephenw at fedoraproject.org
Thu Dec 12 20:00:10 UTC 2013


commit cc9ecfbf4aed66760fe1c8ea51129de8aee644a6
Author: Stephen Wadeley <swadeley at redhat.com>
Date:   Wed Nov 20 17:19:16 2013 +0100

    Updates to clarify the use of the GATEWAY directive
     and how the default gateway is selected.

 en-US/Network_Interfaces.xml |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/en-US/Network_Interfaces.xml b/en-US/Network_Interfaces.xml
index 8f35dab..25ad3f8 100644
--- a/en-US/Network_Interfaces.xml
+++ b/en-US/Network_Interfaces.xml
@@ -92,8 +92,8 @@
         </term>
         <listitem>
           <para>
-          This file specifies routing and host information for all network interfaces. For more information about this file and the directives it accepts, refer to <xref
-              linkend="s2-sysconfig-network"/>.
+            This file specifies routing and host information for all network interfaces. It is used to contain directives which are to have global
+effect and not to be interface specific. For more information about this file and the directives it accepts, refer to <xref linkend="s2-sysconfig-network"/>.
           </para>
         </listitem>
       </varlistentry>
@@ -2611,12 +2611,16 @@ Information on <systemitem class="daemon">systemd-hostnamed</systemitem>.
       <indexterm>
     <primary>default gateway</primary></indexterm>
     <para>
-    The default gateway is specified by means of the GATEWAY directive and can be specified either globally or in interface-specific configuration files. Specifying the default gateway globally has certain advantages especially if more than one network interface is present and it can make fault finding simpler if applied consistently. There is also the GATEWAYDEV directive, which is a global option. If multiple devices specify GATEWAY, and one interface uses the GATEWAYDEV directive, that directive will take precedence. This option is not recommend as it can have unexpected consequences if an interface goes down and it can complicate fault finding.
+      The default gateway is determined by the network scripts which parse the <filename>/etc/sysconfig/network</filename> file first and then the network interface <literal>ifcfg</literal> files for interfaces that are <quote>up</quote>. The <literal>ifcfg</literal> files are parsed in numerically ascending order, and the last GATEWAY directive to be read is used to compose a default route in the routing table.</para>
+    <para>
+      The default route can thus be indicated by means of the GATEWAY directive and can be specified either globally or in interface-specific configuration files. Specifying the gateway globally has certain advantages in static networking environments, especially if more than one network interface is present. It can make fault finding simpler if applied consistently. There is also the GATEWAYDEV directive, which is a global option. If multiple devices specify GATEWAY, and one interface uses the GATEWAYDEV directive, that directive will take precedence. This option is not recommend as it can have unexpected consequences if an interface goes down and it can complicate fault finding.
+    </para>
+    <para>
+      In dynamic network environments, where mobile hosts are managed by <application>NetworkManager</application>, gateway information is likely to be interface specific and is best left to be assigned by DHCP. In special cases where it is necessary to influence <application>NetworkManager</application>'s selection of the exit interface to be used to reach a gateway, make use of the <command>DEFROUTE=no</command> command in the <literal>ifcfg</literal> files for those interfaces which do not lead to the default gateway.
     </para>
   
      <para>
-      Global default gateway configuration is stored in the <filename>/etc/sysconfig/network</filename> file.
-      This file specifies gateway and host information for all network interfaces. For more information about this file and the directives it accepts, refer to <xref linkend="s2-sysconfig-network"/>.
+      Global gateway configuration is stored in the <filename>/etc/sysconfig/network</filename> file. This file specifies gateway and host information for all network interfaces. For more information about this file and the directives it accepts, refer to <xref linkend="s2-sysconfig-network"/>.
     </para>
       
     
@@ -2627,11 +2631,11 @@ Information on <systemitem class="daemon">systemd-hostnamed</systemitem>.
       IP Command Arguments Format
     </bridgehead>
     <para>
-      If required in a per-interface configuration file, define a default gateway on the first line. This is only required if the default gateway is not set via DHCP and is not set globally as mentioned above:
+      If required in a per-interface configuration file, define a gateway on the first line. This is only required if the gateway is not set via DHCP and is not set globally as mentioned above:
     </para>
     <synopsis>default via <replaceable>X.X.X.X</replaceable><option> dev </option><replaceable>interface</replaceable></synopsis>
     <para>
-      <replaceable>X.X.X.X</replaceable> is the IP address of the default gateway. The <replaceable>interface</replaceable> is the interface that is connected to, or can reach, the default gateway. The <option> dev </option> option can be omitted, it is optional.
+      <replaceable>X.X.X.X</replaceable> is the IP address of the default gateway. The <replaceable>interface</replaceable> is the interface that is connected to, or can reach, the default gateway. The <option>dev</option> option can be omitted, specifying the exit interface is optional.
     </para>
     <para>
       Define a static route. Each line is parsed as an individual route:


More information about the docs-commits mailing list