FreeBSD Handbook : PPP and SLIP : Setting up User PPP : Building a ppp ready kernel
Previous: Before you start
Next: Check the tun device

15.1.2. Building a ppp ready kernel

As the description states, ``ppp'' uses the kernel ``tun'' device. It is necessary to make sure that your kernel has support for this device compiled in.

To check this, go to your kernel compile directory (/sys/i386/conf or /sys/pc98/conf) and examine your kernel configuration file. It needs to have the line

   pseudo-device tun 1

in it somewhere. The stock GENERIC kernel has this as standard, so if you have not installed a custom kernel or you do not have a /sys directory, you do not have to change anything.

If your kernel configuration file does not have this line in it, or you need to configure more than one tun device (for example, if you are setting up a server and could have 16 dialup ppp connections at any one time then you will need to use ``16'' instead of ``1''), then you should add the line, re-compile, re-install and boot the new kernel. Please refer to the Configuring the FreeBSD Kernel section for more information on kernel configuration.

You can check how many tunnel devices your current kernel has by typing the following:

   # ifconfig -a
   tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
           inet 200.10.100.1 --> 203.10.100.24 netmask 0xffffffff
   tun1: flags=8050<POINTOPOINT,RUNNING,MULTICAST> mtu 576
   tun2: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
           inet 203.10.100.1 --> 203.10.100.20 netmask 0xffffffff
   tun3: flags=8010<POINTOPOINT,MULTICAST> mtu 1500

which in this case shows four tunnel devices, two of which are currently configured and being used. It should be noted that the RUNNING flag above indicates that the interface has been used as some point - it is not an error if your interface does not show up as RUNNING.

If you have a kernel without the tun device, and you can not rebuild it for some reason, all is not lost. You should be able to dynamically load the code. Refer to the appropriate modload(8) and lkm(4) pages for further details.

You may also wish to take this opportunity to configure a firewall. Details can be found in the Firewalls section.


FreeBSD Handbook : PPP and SLIP : Setting up User PPP : Building a ppp ready kernel
Previous: Before you start
Next: Check the tun device