How to install the NIST Switch package

1. Getting and unpacking the distribution

  1. Prerequisites: Currently requires (version 0.1) FreeBSD-2.2.6-RELEASE or (version 0.2) FreeBSD-3.3. (A Linux 2.2.X version is in the works, and moves to later BSD versions are also under consideration. But for now, it must be BSD 2.2.6 or 3.3!)
  2. Click here to get the patches and source package. The package comes in a gzipped tar file, nistswitch-version.tar.gz. Current version is: 0.2 (second release).

    The 0.1 package contains:

    The 0.2 package is similar, except that it works with FreeBSD 3.3 and ALTQ-2.0. It contains a modified version of RSVP release 4.2a4. Note that in this version, you must get ALTQ separately and install it yourself first, before installing NIST Switch. ALTQ-2.0 is available from the Sony site at

  3. tar -xvzf nistswitch-version.tar.gz - produces a subdirectory nistswitch and a bunch of files in it. You may place this subdirectory wherever you like; a suggested location is under /usr/src. In the instructions below, this directory is referred to as nistswitch.

2. Patching and rebuilding the kernel

Note: these instructions are for the 0.1 version. If you're installing the 0.2 version, follow instead the instructions in the README file that comes with the package. The instructions here will be updated at a later date.
  1. Run the script Switch.kernel in the nistswitch directory. This creates a new kernel build tree under /usr/src/sys-altq, applies the NIST Switch and ALTQ patches in it, and builds and installs the patched kernel. Specifically, it does the following (so if you don't like the way it does it, you can do it yourself instead):
  2. If there are any problems, fix them and rebuild the kernel. Otherwise, reboot the new kernel:

3. Building and installing the label switching module

  1. MPLS module build - Run the script Switch.module in the nistswitch directory. This creates a module build directory /usr/src/lkm/label and builds the NIST Switch module there. Specifically, it does the following (so again, if you don't like how it does it, you can do it yourself instead):
  2. If you wish to have the MPLS module loaded at system startup, add the following line to /etc/rc.local: Of course, if you wish, you can instead load it at any later time by issuing this at the command line (as root).

4. Building the modified RSVP daemon

  1. RSVP daemon build:
  2. To install the MPLS-enabled RSVP daemon:

5. Other utilities

  1. The distribution also includes some miscellaneous test utilities. To compile these:

Comments? Questions? Let us know at
[ NIST Switch Home Page] [Installing NIST Switch] [Using NIST Switch] [NIST Switch FAQ] [Mark Carson's home page]