FreeBSD Handbook : PPP and SLIP : Setting up a SLIP server : Kernel Configuration
Previous: Quick Overview
Next: Sliplogin Configuration

11.4.3. Kernel Configuration

FreeBSD's default kernels usually come with two SLIP interfaces defined (sl0 and sl1); you can use netstat -i to see whether these interfaces are defined in your kernel.

Sample output from netstat -i:

Name  Mtu   Network     Address            Ipkts Ierrs    Opkts Oerrs  Coll
ed0   1500  <Link>0.0.c0.2c.5f.4a         291311     0   174209     0   133
ed0   1500  138.247.224 ivory             291311     0   174209     0   133
lo0   65535 <Link>                            79     0       79     0     0
lo0   65535 loop        localhost             79     0       79     0     0
sl0*  296   <Link>                             0     0        0     0     0
sl1*  296   <Link>                             0     0        0     0     0

The sl0 and sl1 interfaces shown in netstat -i's output indicate that there are two SLIP interfaces built into the kernel. (The asterisks after the sl0 and sl1 indicate that the interfaces are ``down''.)

However, FreeBSD's default kernels do not come configured to forward packets (ie, your FreeBSD machine will not act as a router) due to Internet RFC requirements for Internet hosts (see RFC's 1009 [Requirements for Internet Gateways], 1122 [Requirements for Internet Hosts -- Communication Layers], and perhaps 1127 [A Perspective on the Host Requirements RFCs]), so if you want your FreeBSD SLIP Server to act as a router, you'll have to add the line options GATEWAY to your machine's kernel configuration file and re-compile the kernel anyway. (Trivia: ``Gateways'' are the Internet's old name for what are now usually called ``routers''.)

Please see the BSD System Manager's Manual chapter on ``Building Berkeley Kernels with Config'' [the source for which is in /usr/src/share/doc/smm] and ``FreeBSD Configuration Options'' [in /sys/doc/options.doc] for more information on configuring and building kernels. You may have to unpack the kernel source distribution if haven't installed the system sources already (srcdist/srcsys.?? in FreeBSD 1.1, srcdist/sys.?? in FreeBSD 1.1.5.1, or the entire source distribution in FreeBSD 2.0) to be able to configure and build kernels.

You'll notice that near the end of the default kernel configuration file (/sys/i386/conf/GENERICAH) is a line that reads:

pseudo-device sl 2

which is the line that defines the number of SLIP devices available in the kernel; the number at the end of the line is the maximum number of SLIP connections that may be operating simultaneously.

See the document ``Building Berkeley Kernels with Config'' and the manual page for config(8) to see how to configure and build kernels.


FreeBSD Handbook : PPP and SLIP : Setting up a SLIP server : Kernel Configuration
Previous: Quick Overview
Next: Sliplogin Configuration