Book Image

Network Administration with FreeBSD 7

By : Babak Farrokhi
Book Image

Network Administration with FreeBSD 7

By: Babak Farrokhi

Overview of this book

<p>This book is a guide to FreeBSD for network administrators; therefore it does not cover basic installation and configuration of FreeBSD, but is about using FreeBSD to build, secure, and maintain networks.<br /><br />After introducing the basic tools for monitoring the performance and security of the system the book moves on to cover using jails&acirc;&euro;&rdquo;FreeBSD virtual environments&acirc;&euro;&rdquo;to virtually run multiple instances of FreeBSD on the same hardware. Then it shows how to overcome the different bottlenecks that you may meet depending on the services you are running by tweaking different parameters to maintain a high performance from your FreeBSD server. Next it covers using the ifconfig utility to configure interfaces with different layer protocols and about connectivity testing and debugging tools. After covering using User PPP or Kernel PPP for Point-to-Point Protocol network configuration it explains basic IP forwarding in FreeBSD and the use of the built-in routing daemons, routed and route6d, which support RIPv1, RIPv2, RIPng, and RDISC. Next it covers the OpenOSPFD and OpenBGPD daemons that you can install to run OSPF and BGP on your host. Then it covers setup and configuration of IPFW and PF, and finally looks at some important internet services and how to set them up on your FreeBSD server.</p>
Table of Contents (19 chapters)
Network Administration with FreeBSD 7
Credits
About the Author
About the Reviewer
Preface

Basic Routing—IP Forwarding


The default behavior of a FreeBSD host is only to pick up packets that are destined for the same host. In case there are multiple network interfaces installed on the host, the system does not forward traffic between interfaces by default.

This behavior is changed by enabling IP forwarding using the sysctl(8) utility:

# sysctl net.inet.ip.forwarding=1
# sysctl net.inet6.ip6.forwarding=1

The above commands will enable forwarding for IPv4 and IPv6 respectively.

To make these changes permanent, you can also add the following lines to the /etc/rc.conf file:

gateway_enable="YES"
ipv6_gateway_enable="YES"

By enabling IP Forwarding (routing) between interfaces, the system will pick up all the packets that have the layer2 destination, (MAC) address of the same host, and will forward it to an appropriate network interface, according to the system's routing table.

Once the forwarding is enabled, the forwarding behavior can be controlled by modifying the routing table. This is...