The translation is temporarily closed for contributions due to maintenance, please come back later.


(itstool) path: sect2/programlisting
static_routes="net1 net2"
Context English Spanish State
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.
Before adding any static routes, the routing table on <systemitem>RouterA</systemitem> looks like this:
<prompt>%</prompt> <userinput>netstat -nr</userinput>
Routing tables

Destination Gateway Flags Refs Use Netif Expire
default UGS 0 49378 xl0 UH 0 6 lo0 link#1 UC 0 0 xl0 link#2 UC 0 0 xl1
With the current routing table, <systemitem>RouterA</systemitem> does not have a route to the <systemitem class="ipaddress"></systemitem> network. The following command adds the <literal>Internal Net 2</literal> network to <systemitem>RouterA</systemitem>'s routing table using <systemitem class="ipaddress"></systemitem> as the next hop:
<prompt>#</prompt> <userinput>route add -net</userinput>
Now, <systemitem>RouterA</systemitem> can reach any host on the <systemitem class="ipaddress"></systemitem> network. However, the routing information will not persist if the FreeBSD system reboots. If a static route needs to be persistent, add it to <filename>/etc/rc.conf</filename>:
# Add Internal Net 2 as a persistent static route
The <literal>static_routes</literal> configuration variable is a list of strings separated by a space, where each string references a route name. The variable <literal>route_<replaceable>internalnet2</replaceable></literal> contains the static route for that route name.
Using more than one string in <literal>static_routes</literal> creates multiple static routes. The following shows an example of adding static routes for the <systemitem class="ipaddress"></systemitem> and <systemitem class="ipaddress"></systemitem> networks:
static_routes="net1 net2"
When an address space is assigned to a network, the service provider configures their routing tables so that all traffic for the network will be sent to the link for the site. But how do external sites know to send their packets to the network's <acronym>ISP</acronym>?
There is a system that keeps track of all assigned address spaces and defines their point of connection to the Internet backbone, or the main trunk lines that carry Internet traffic across the country and around the world. Each 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 a particular network.
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.
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 <command>traceroute</command>. It is useful when <command>ping</command> fails.
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. For more information, refer to <citerefentry><refentrytitle>traceroute</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
Multicast Considerations
<primary>multicast routing</primary>
<primary>kernel options</primary> <secondary>MROUTING</secondary>
FreeBSD natively supports both multicast applications and multicast routing. Multicast applications do not require any special configuration in order to run on FreeBSD. Support for multicast routing requires that the following option be compiled into a custom kernel:
options MROUTING
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.
<acronym>DVMRP</acronym> has largely been replaced by the <acronym>PIM</acronym> protocol in many multicast installations. Refer to <citerefentry><refentrytitle>pim</refentrytitle><manvolnum>4</manvolnum></citerefentry> for more information.
Wireless Networking
<personname> <othername>Loader</othername> </personname>


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: sect2/programlisting
Source string location
String age
a year ago
Source string age
a year ago
Translation file
books/es_ES/handbook.po, string 10581