svn commit: r44143 - head/en_US.ISO8859-1/books/handbook/advanced-networking

Dru Lavigne dru at FreeBSD.org
Thu Mar 6 02:08:28 UTC 2014


Author: dru
Date: Thu Mar  6 02:08:27 2014
New Revision: 44143
URL: http://svnweb.freebsd.org/changeset/doc/44143

Log:
  Finish editorial pass through Routing chapter.
  The section on Multicast needs more content and a working
  example.
  
  Sponsored by: iXsystems

Modified:
  head/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml

Modified: head/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml
==============================================================================
--- head/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml	Wed Mar  5 22:34:26 2014	(r44142)
+++ head/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml	Thu Mar  6 02:08:27 2014	(r44143)
@@ -349,44 +349,30 @@ host2.example.com link#1            UC  
 	<primary>dual homed hosts</primary>
       </indexterm>
 
-      <para>A dual-homed system is a host which resides on two
-	different networks.</para>
-
-      <para>The dual-homed machine might have two Ethernet cards, each
-	having an address on a separate subnet.  Alternately, the
-	machine can have one Ethernet card and uses &man.ifconfig.8;
-	aliasing.  The former is used if two physically separate
-	Ethernet networks are in use and the latter if there is one
-	physical network segment, but two logically separate
-	subnets.</para>
-
-      <para>Either way, routing tables are set up so that each subnet
-	knows that this machine is the defined gateway (inbound route)
-	to the other subnet.  This configuration, with the machine
-	acting as a router between the two subnets, is often used
-	to implement packet filtering or firewall security in
-	either or both directions.</para>
-
-      <para>For this machine to forward packets between the two
-	interfaces, &os; must be configured as a router, as
-	demonstrated in the next section.</para>
+      <para>A &os; system can be configured as the default gateway, or
+	router, for a network if it is a dual-homed system.  A
+	dual-homed system is a host which resides on at least two
+	different networks.  Typically, each network is connected to a separate
+	network interface, though <acronym>IP</acronym> aliasing can
+	be used to bind multiple addresses, each on a different
+	subnet, to one physical interface.</para>
 
       <indexterm>
 	<primary>router</primary>
       </indexterm>
 
-      <para>A network router is a system that forwards packets from
-	one interface to another.  Internet standards and good
+      <para>In order for the system to forward packets between
+	interfaces, &os; must be configured as a router.  Internet standards and good
 	engineering practice prevent the &os; Project from enabling
-	this by default in &os;.  This feature can be enabled by
-	changing the following variable to <literal>YES</literal> in
-	&man.rc.conf.5;:</para>
+	this feature by default, but it can be configured to start at boot
+	by adding this line to
+	<filename>/etc/rc.conf</filename>:</para>
 
       <programlisting>gateway_enable="YES"          # Set to YES if this host will be a gateway</programlisting>
 
-      <para>This option will set the &man.sysctl.8; variable
+      <para>To enable routing now, set the &man.sysctl.8; variable
 	<varname>net.inet.ip.forwarding</varname> to
-	<literal>1</literal>.  To stop routing, reset this to
+	<literal>1</literal>.  To stop routing, reset this variable to
 	<literal>0</literal>.</para>
 
       <indexterm>
@@ -399,15 +385,24 @@ host2.example.com link#1            UC  
 	<primary>OSPF</primary>
       </indexterm>
 
-      <para>The new router will need routes to know where to send the
-	traffic.  If the network is simple enough, static routes can
-	be used.  &os; comes with the standard BSD routing daemon
-	&man.routed.8;, which speaks <acronym>RIP</acronym> versions
-	1 and 2, and <acronym>IRDP</acronym>.  Support for
-	<acronym>BGP</acronym>v4, <acronym>OSPF</acronym>v2, and other
-	sophisticated routing protocols is available with the
+      <para>The routing table of a router needs additional routes so
+	it knows how to reach other networks.  Routes can be either
+	added manually using
+	static routes or routes can be automatically learned using a routing protocol.
+	Static routes are appropriate for small networks and this
+	section describes how to add a static routing entry for a
+	small network.</para>
+
+	<note>
+	<para>For large networks, static routes quickly become
+	  unscalable.  &os; comes with the standard <acronym>BSD</acronym> routing daemon
+	&man.routed.8;, which provides the routing protocols <acronym>RIP</acronym>, versions
+	1 and 2, and <acronym>IRDP</acronym>.  Support for the
+	<acronym>BGP</acronym> and <acronym>OSPF</acronym>
+	routing protocols can be installed using the
 	<package>net/zebra</package> package or
 	port.</para>
+      </note>
 
 	<para>Consider the following network:</para>
 
@@ -449,12 +444,12 @@ host2.example.com link#1            UC  
 	    class="ipaddress">10.0.0.1</systemitem> which allows it to
 	  connect with the outside world.
 	  <systemitem>RouterB</systemitem> is already configured
-	  properly as it uses <systemitem
-	    class="ipaddress">192.168.1.1</systemitem> as the
+	  to use <systemitem
+	    class="ipaddress">192.168.1.1</systemitem> as its default
 	  gateway.</para>
 
-	<para>The routing table on <systemitem>RouterA</systemitem>
-	  looks something like this:</para>
+	<para>Before adding any static routes, the routing table on <systemitem>RouterA</systemitem>
+	  looks like this:</para>
 
 	<screen>&prompt.user; <userinput>netstat -nr</userinput>
 Routing tables
@@ -467,45 +462,33 @@ default            10.0.0.1           UG
 192.168.1.0/24     link#2             UC          0        0    xl1</screen>
 
 	<para>With the current routing table,
-	  <systemitem>RouterA</systemitem> cannot reach Internal Net
-	  2 as it does not have a route for <systemitem
-	    class="ipaddress">192.168.2.0/24</systemitem>.  The
-	  following command adds the Internal Net 2 network to
+	  <systemitem>RouterA</systemitem>
+	  does not have a route to the <systemitem
+	    class="ipaddress">192.168.2.0/24</systemitem> network.  The
+	  following command adds the <literal>Internal Net 2</literal> network to
 	  <systemitem>RouterA</systemitem>'s routing table using
 	  <systemitem class="ipaddress">192.168.1.2</systemitem> as
 	  the next hop:</para>
 
 	<screen>&prompt.root; <userinput>route add -net 192.168.2.0/24 192.168.1.2</userinput></screen>
 
-	<para>Now <systemitem>RouterA</systemitem> can reach any hosts
+	<para>Now, <systemitem>RouterA</systemitem> can reach any host
 	  on the <systemitem
 	    class="ipaddress">192.168.2.0/24</systemitem>
-	  network.</para>
-
-      <sect3>
-	<title>Persistent Configuration</title>
-
-	<para>The above example configures a static route on a
-	  running system.  However, the routing information will not
-	  persist if the &os; system reboots.  Persistent static
-	  routes can be entered in
+	  network.  However, the routing information will not
+	  persist if the &os; system reboots.  If a static route needs
+	  to be persistent, add it to
 	  <filename>/etc/rc.conf</filename>:</para>
 
-	<programlisting># Add Internal Net 2 as a static route
+	<programlisting># Add Internal Net 2 as a persistent static route
 static_routes="internalnet2"
 route_internalnet2="-net 192.168.2.0/24 192.168.1.2"</programlisting>
 
 	<para>The <literal>static_routes</literal> configuration
 	  variable is a list of strings separated by a space, where
-	  each string references a route name.  This example only
-	  has one string in <literal>static_routes</literal>,
-	  <replaceable>internalnet2</replaceable>.  The variable
+	  each string references a route name.  The variable
 	  <literal>route_internalnet2</literal>
-	  contains all of the configuration parameters to
-	  &man.route.8;.  This example is equivalent to the
-	  command:</para>
-
-	  <screen>&prompt.root; <userinput>route add -net 192.168.2.0/24 192.168.1.2</userinput></screen>
+	  contains the static route for that route name.</para>
 
 	<para>Using more than one string in
 	  <literal>static_routes</literal> creates multiple static
@@ -518,11 +501,10 @@ route_internalnet2="-net 192.168.2.0/24 
 	<programlisting>static_routes="net1 net2"
 route_net1="-net 192.168.0.0/24 192.168.0.1"
 route_net2="-net 192.168.1.0/24 192.168.1.1"</programlisting>
-      </sect3>
     </sect2>
 
-    <sect2 xml:id="network-routing-propagation">
-      <title>Routing Propagation</title>
+   <sect2 xml:id="network-routing-troubleshooting">
+      <title>Troubleshooting</title>
 
       <para>When an address space is assigned to a network, the
 	service provider configures their routing tables so that all
@@ -537,38 +519,32 @@ route_net2="-net 192.168.1.0/24 192.168.
 	backbone machine has a copy of a master set of tables, which
 	direct traffic for a particular network to a specific
 	backbone carrier, and from there down the chain of service
-	providers until it reaches your network.</para>
+	providers until it reaches a particular network.</para>
 
       <para>It is the task of the service provider to advertise to
 	the backbone sites that they are the point of connection, and
 	thus the path inward, for a site.  This is known as route
 	propagation.</para>
-    </sect2>
-
-    <sect2 xml:id="network-routing-troubleshooting">
-      <title>Troubleshooting</title>
 
       <indexterm>
 	<primary>&man.traceroute.8;</primary>
       </indexterm>
 
-      <para>Sometimes, there is a problem with routing propagation
+      <para>Sometimes, there is a problem with route propagation
 	and some sites are unable to connect.  Perhaps the most
 	useful command for trying to figure out where routing is
-	breaking down is &man.traceroute.8;.  It is useful when
-	&man.ping.8; fails.</para>
+	breaking down is <command>traceroute</command>.  It is useful when
+	<command>ping</command> fails.</para>
 
-      <para>When using &man.traceroute.8;, include the name of the
+      <para>When using <command>traceroute</command>, include the address of the
 	remote host to connect to.  The output will show the gateway
 	hosts along the path of the attempt, eventually either
 	reaching the target host, or terminating because of a lack of
-	connection.</para>
-
-      <para>For more information, refer to &man.traceroute.8;.</para>
+	connection.  For more information, refer to &man.traceroute.8;.</para>
     </sect2>
 
     <sect2 xml:id="network-routing-multicast">
-      <title>Multicast Routing</title>
+      <title>Multicast Considerations</title>
 
       <indexterm>
 	<primary>multicast routing</primary>
@@ -580,26 +556,29 @@ route_net2="-net 192.168.1.0/24 192.168.
 
       <para>&os; natively supports both multicast applications and
 	multicast routing.  Multicast applications do not require any
-	special configuration of &os;; as applications will generally
-	run out of the box.  Multicast routing requires that support
+	special configuration in order to
+	run on &os;.  Support for multicast routing requires that the
+	following option
 	be compiled into a custom kernel:</para>
 
       <programlisting>options MROUTING</programlisting>
 
-      <para>The multicast routing daemon, &man.mrouted.8;, must be
-	configured to set up tunnels and <acronym>DVMRP</acronym> via
-	<filename>/etc/mrouted.conf</filename>.  More details on
-	multicast configuration may be found in
-	&man.mrouted.8;.</para>
+      <para>The multicast routing daemon,
+	<application>mrouted</application> can be installed
+	using the <package>net/mrouted</package> package or port.
+	This daemon implements
+	the <acronym>DVMRP</acronym> multicast routing protocol and is
+	configured by editing <filename>/usr/local/etc/mrouted.conf</filename>
+	in order to set up the tunnels and <acronym>DVMRP</acronym>.
+	The installation of <application>mrouted</application> also installs
+	<application>map-mbone</application> and
+	<application>mrinfo</application>, as well as their associated
+	man pages.  Refer to these for configuration examples.</para>
 
       <note>
-	<para>The &man.mrouted.8; multicast routing daemon implements
-	  the <acronym>DVMRP</acronym> multicast routing protocol,
-	  which has largely been replaced by &man.pim.4; in many
-	  multicast installations.  &man.mrouted.8; and the related
-	  &man.map-mbone.8; and &man.mrinfo.8; utilities are available
-	  in the &os; Ports Collection as
-	  <package>net/mrouted</package>.</para>
+	<para><acronym>DVMRP</acronym> has largely been replaced by the
+	  <acronym>PIM</acronym> protocol in many
+	  multicast installations.  Refer to &man.pim.4; for more information.</para>
       </note>
     </sect2>
   </sect1>


More information about the svn-doc-all mailing list