Show how to define a default route via /etc/rc.conf and using route(8).

This commit is contained in:
Marc Fonvieille 2004-01-09 16:47:13 +00:00
parent ae1c19a467
commit b38d7a8865
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=19560

View file

@ -341,7 +341,7 @@ host2.example.com link#1 UC 0 0
machine, so there is no need for the intermediate step
of sending traffic to the ISP server.</para>
<para>As a final note, it is common to use the address <hostid
<para>It is common to use the address <hostid
role="ipaddr">X.X.X.1</hostid> as the gateway address for your local
network. So (using the same example), if your local class-C address
space was <hostid role="ipaddr">10.20.30</hostid> and your ISP was
@ -368,6 +368,21 @@ host2.example.com link#1 UC 0 0
</tbody>
</tgroup>
</informaltable>
<para>You can easily define the default route via the
<filename>/etc/rc.conf</filename> file. In our example, on the
<hostid>Local2</hostid> machine, we added the following line
in <filename>/etc/rc.conf</filename>:</para>
<programlisting>defaultrouter="10.20.30.1"</programlisting>
<para>It is also possible to do it directly from the command
line with the &man.route.8; command:</para>
<screen>&prompt.root; <userinput>route add default 10.20.30.1</userinput></screen>
<para>For more informations on manual manipulation of network
routing tables, consult &man.route.8; manual page.</para>
</sect2>
<sect2>