(itstool) path: info/title
Configuring a Router with Static Routes
Context English Spanish State
Send anything for this destination on to this gateway, which will figure out from there where to send it.
This route was statically configured.
Clones a new route based upon this route for machines to connect to. This type of route is normally used for local networks.
The route was auto-configured based upon a local area network (clone) route.
Route involves references to Ethernet (link) hardware.
On a FreeBSD system, the default route can defined in <filename>/etc/rc.conf</filename> by specifying the <acronym>IP</acronym> address of the default gateway:
It is also possible to manually add the route using <command>route</command>:
<prompt>#</prompt> <userinput>route add default</userinput>
Note that manually added routes will not survive a reboot. For more information on manual manipulation of network routing tables, refer to <citerefentry><refentrytitle>route</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
Configuring a Router with Static Routes
<personname> <firstname>Al</firstname> <surname>Hoang</surname> </personname> <contrib>Contributed by </contrib>
<primary>dual homed hosts</primary>
A FreeBSD 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.
In order for the system to forward packets between interfaces, FreeBSD must be configured as a router. Internet standards and good engineering practice prevent the FreeBSD Project from enabling this feature by default, but it can be configured to start at boot by adding this line to <filename>/etc/rc.conf</filename>:
gateway_enable="YES" # Set to YES if this host will be a gateway
To enable routing now, set the <citerefentry><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry> variable <varname>net.inet.ip.forwarding</varname> to <literal>1</literal>. To stop routing, reset this variable to <literal>0</literal>.
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.
For large networks, static routes quickly become unscalable. FreeBSD comes with the standard <acronym>BSD</acronym> routing daemon <citerefentry><refentrytitle>routed</refentrytitle><manvolnum>8</manvolnum></citerefentry>, 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.
Consider the following network:
_ external ref='advanced-networking/static-routes' md5='__failed__'

| ( Default Router to Internet
|Interface xl0
| | RouterA
| | (FreeBSD gateway)
| Interface xl1
Internal Net 1 |
| | RouterB
| |
Internal Net 2
In this scenario, <systemitem>RouterA</systemitem> is a FreeBSD machine that is acting as a router to the rest of the Internet. It has a default route set to <systemitem class="ipaddress"></systemitem> which allows it to connect with the outside world. <systemitem>RouterB</systemitem> is already configured to use <systemitem class="ipaddress"></systemitem> as its default gateway.


User avatar None

New source string

FreeBSD Doc / books_handbookSpanish

New source string a year ago
Browse all component changes


English Spanish
No related strings found in the glossary.

Source information

Source string comment
(itstool) path: info/title
Source string location
String age
a year ago
Source string age
a year ago
Translation file
books/es_ES/handbook.po, string 10223