12.07.2015 Views

download

download

download

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Network Configuration—Routing and BridgingIf you are connected to a FreeBSD host via a network (For example SSH)and you are not on the same subnet as the host, you may lose networkconnectivity upon using the route flush command, as the defaultgateway will also be removed from the routing table. Make sure youare not locking yourself out of the host and not making the host lose itsnetwork connectivity.To make the static routes permanent, and to add them to the routing table whensystem starts up, you should add the appropriate entries to the /etc/rc.conf file.The following is a sample that adds two static routes to the routing table:static_routes="sample1 sample2"route_sample1="172.21.30.0/24 10.1.1.5"route_sample2="192.168.0.0/16 10.1.1.6"Alternatively, in an IPv6 environment:ipv6_static_routes="sample3"ipv6_route_sample3="2a01:3c8::/64 –interface gif0"In the first example, two static routes are added (loaded from route_sample1 androute_sample2 variables). You may have multiple route_XXXX variables in /etc/rc.conf, but only those that are specified in the static_routes variablesare picked.In the second example, the same static routing for IPv6 addresses is shown. The IPv6routing will be discussed later, in Chapter 12.To manually load the routes from /etc/rc.conf without rebooting the system, usethe following command:# /etc/rc.d/routing staticManipulating the FreeBSD's routing table manually, using the route(8) utility,is quite straightforward. However, it is highly recommended that you consult therelevant man pages as well as FreeBSD handbook, for more information aboutthis utility.routed and route6dFreeBSD has two built-in dynamic routing daemons that support RIPprotocol family:• routed(8): It supports RIPv1 (RFC1058), RIPv2 (RFC2453) and RDISC(RFC1256).• route6d(8):It supports RIPng or RIP6 (RFC2080).[ 162 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!