Updated 10/09/01
These notes are for personal use only.
Note: IRQ's for ISA bus devices (i.e. Niwot T1) must be reserved in
the ROM-BIOS. Potentially, a conflict can exist between ISA bus devices
that are not reserved and PCI bus devices during plug-and-play configuration.
The ROM-BIOS can be configured by pressing DELETE, when prompted, during
boot-up and following the instructions.
Please follow these instructions to build a PC for use as a router. Make sure the PC you use is a FreeBSD compatible workstation. Refer to http://www.freebsd.org/handbook/install-hw.html for information about recommended/ compatible hardware.
Note: If you are upgrading a current router, please backup
the contents of /usr/home, /etc directory, (If the router you are upgrading is a FreeBSD 3.4-STABLE with the KAME-v6 stack also backup the /usr/local/v6/etc and /usr/local/etc/rc.d/rc.local.sh) and the currently running kernel
configuration file for later reference. You may also want to backup user
home directories. When you have installed the new operating system. Please create a /usr/local/src
directory, and FTP all of the backed up files into it. This will then be used as a reference when rebuilding
the system.
Please do not install the /usr/home from the old router, untill you have installed the password file.
tar zcf /tmp/etc.tar.gz /etc
tar zcf /tmp/v6.etc.tar.gz /usr/local/v6/etc
tar zcf /tmp/rc.local.sh.tar.gz /usr/local/etc/rc.d/rc.local.sh
# cd /usr
# tar zcf home.tar.gz home
If you are upgrading a current router (based on FreeBSD 2.x releases),
please note that you may have to recompile most of your local applications.
FreeBSD 3.x and 4.x releases use ELF rather than a.out format for
executable binary files.
Install FreeBSD 4.3-RELEASE from the FreeBSD
web site. The procedure we follow to install from FreeBSD.org are:
for your reference. You may also refer to the FreeBSD
handbook for more information.
1. Once the OS has been installed, then create a local account.
Also tar up the /usr/src and /usr/include. If you have a problem with setup later on, you can always untar these files.
cd /usr
tar -zcvf src.orig.tgz src
tar -zcvf include.orig.tgz include
ftp from oingo ~donkeynoc/router/atm/atm.43w.tgz to /usr/local/src
ftp from oingo ~donkeynoc/router/t1/i386.t1.fbsd43.tgz to /usr/local/src
tar up /sys in /usr/src
cd /usr/src
tar -zcvf sys.orig.tgz sys
next cd to the sys directrory.
cd sys
cp /usr/local/src/atm.43w/*.tgz .
Now untar the following tar files.
tar -zxvf netinet.atmfix.43.tgz
tar -zxvf pci.atmfix.43.tgz
tar -zxvf net.atmfix.43.tgz
tar -zxvf netnatm.atmfix.43.tgz
Next cd to conf and backup the following files
cd conf
cp /usr/src/sys/conf/files /usr/src/sys/conf/files.original
cp /usr/src/sys/conf/options /usr/src/sys/conf/options.original
cp /usr/src/sys/conf/files.i386 /usr/src/sys/conf/files.i386.original
Now copy all of the files that end in .pached from /usr/local/src/atm.43w
cp /usr/local/src/atm.43w/*.pached /usr/src/sys/conf
Now be sure that you have backed up the: files, files.i386, options.
Next:
mv files.pached files
mv options.pached options
Do not change the files.i386.pached. This is only changed if you are also putting in a T1.
Now you need to modify the kernel so:
cd /sys/i386/conf
run uname -a to see which kernel you are useing:
cp [kernel name] to [new kernel name]
cp GENERIC FBSD-4.3-ATM
vi FBSD-4.3-ATM
add to the bottom of the file:
# ATM
device en0 # FreeBSD PCI
device enp5 # To support 1 pvc on each ATM card
# (enp5 to support 6 PVCs each -
# the max allowed number for adaptec)
pseudo-device atm # FreeBSD only
options NATM # native atm add
options MROUTING #Multicast
Be sure that you have the bpf is set to 4:
pseudo-device bpf 4 #Berkeley packet filter
Now save and exit.
Next run config:
config FBSD-4.3-ATM
cd ../../compile/FBSD-4.3-ATM
make depend
make
make install
sync;sync;reboot
This is if you did not add the Multicast with the ATM drivers earlyer.
cd /sys/i386/conf
# cp GENERIC FBSD43
Use your favorite editor to add the following option to the kernel config file "FBSD43".
options MROUTING #Multicast
# config FBSD43
# cd ../../compile/FBSD43
# make depend
# make
# make install
# sync; sync; reboot
Once the Operating System has been download; FTP the following software into the /usr/local/src directory (you may have to create this directory first):
MRTd v2.2.2a distribution Merit.edu SNMP daemon for FreeBSD "ucd-snmp-4.2.1.tar.gz"
NTPd is now part of the distribution.
MRTd can be found in /usr/ports/net/mrt.
Customize /etc/rc.conf. Check against the old rc.conf file. Please note that starting from FreeBSD 3.0, /etc/rc.conf only specifies the changes to the default options which are in /etc/defaults/rc.conf file. Make sure it has the following options enabled:
gateway_enable="YES"In addition, the following option is needed for IPv6 support:
forward_sourceroute="NO"
tcp_extensions="YES"ipv6_enable="YES"Also, configure the network interfaces and set the default router.
- ipv6_enable="YES"
- Customize rest of the configuration (network interface names, etc)
2. rc.local.sh
If you are upgrading an existing router, copy /etc/rc.local or the /etc/rc.local.sh that was backed
up earlier to /usr/local/etc/rc.d/ directory. If the /usr/local/etc/rc.d dose not exist,
please create it.
If the rc.local is from an earler version of FreeBSD you will need to add .sh to the end of the file.
Since FreeBSD-3.x the rc.local has been rc.local.sh, and has been located at /usr/local/etc/rc.d/rc.local.sh with a soft link back to the /etc/rc.local.sh.
cp rc.local /usr/local/etc/rc.d/rc.local.sh
chmod 755 /usr/local/etc/rc.d/rc.local.sh
chmod +x /usr/local/etc/rc.d/rc.local.sh
3. resolv.conf
Restore the resolv.conf from your backed up copy in the /etc.
If this is a new setup add these lines to your /etc/resolv.conf:
domain code-donkey.org
nameserver xxx.xxx.xxx.xxx
or
domain "your domain"
nameserver "your ip"
4. Old configuration files.
If are upgrading from an earler version of the operating system. The please restore the /etc/mrouted.conf, /etc/mrtd.conf,
and /etc/XF86Config (if it exists) files from /usr/local/src.
5. Support for remote login.
This is for the support of rdist:
# echo 'helpmann.code-donkey.org root' >> /root/.rhosts
# echo 'xxx.xxx.xxx.xxx helpmann.code-donkey.org' >> /etc/hosts
6. User passwords accounts.
If you want to restore user accounts, rather than request donkeytoc to
rdist them, restore /etc/group and /etc/master.passwd
file to /etc directory, and
# cat /usr/local/src/etc/master.passwd >> /etc/master.passwd
# /usr/sbin/pwd_mkdb -p /etc/master.passwd
# /usr/sbin/pwd_mkdb -p /etc/master.passwd
7. Restore any user directories that were backed up earlier.
# cd /usr
# tar zxf home.tar.gz
# ln -s /home /usr/home
8. Installing the NTP.
Note that the NTPd should come as a part of the basic install. Do a "which ntpd" if you are not sure. If it is not you will need to follow the following proceedure. If the original configuration files are available, copy them to the new /etc.
download the NTPd source code from NTP
# Put the sorce code into /usr/local/src
cd /usr/local/src
tar zxf ntp-xxx.tar.gz
# cd ntp-xxx
# ./configure
# make check
# make; make install
Then copy files ntp.conf, ntp.keys and ntp.drift to /etc. If the files do not exist in the original /etc, then you can check either donkeypc, donkeyepc or udelpc's /etc files. Also you can reference NTP.
9. Installing the SNMP.
# cd /usr/local/src
# ftp from oingo.code-donkey.org /usr/home/donkeynoc/router/fbsd4.3/ucd-snmp-4.2.1.tar.gz
# tar zxf ucd-snmp-4.2.1.tar.gz
# cd ucd-snmp-4.2.1
# ./configure
# make
# make install
or you may find it on the web Google. Look for "ucd-snmp-4.2.1.tar.gz
10. Installing the MRTd.
This is in /usr/ports/net/mrt
If you need to compile it yourself the directions are below.
# cd /usr/local/src
# ftp from oingo.code-donkey.org /usr/home/donkeynoc/router/fbsd4.3/mrt-2.2.2a-src.tar.gz
# tar zxf mrt-2.2.2a-src.tar.gz
# cd mrt
# ./make-sym-links
# cd src.freebsd4.3
# ./configure
# make
# make install
or you may down load it from here Merit
11. Installing the Java JDK.
# cd /usr/ports/java/jdk
# make
# make install
If you want to install from the source code:
ftp from oingo.code-donkey.org /usr/home/donkeynoc/router/fbsd4.3/jdk1.1.8_ELF.V1999-11-9.tar.gz
tar -zxvf jdk1.1.8_ELF.V1999-11-9.tar.gz
cd jdk1.1.8
./configure
make
make install
or you may down load it from here Google
12. Installing the BIND9.
BIND9 can be found in /usr/ports/net/BIND9
cd /usr/ports/net/BIND9
make
make install
If you want to install from the source code:
cd /usr/local/src
ftp from oingo.code-donkey.org /usr/home/donkeynoc/router/fbsd4.3/bind-9.1.1.tar.gz
tar -zxvf bind-9.1.1.tar.gz
cd to the bind-9.1.1
./configure
make
make install
or you may down load it from here Google
13. Installing the LSOF.
LSOF can be found in /usr/ports/sysutils/lsof
cd /usr/ports/sysutils/lsof
make
make install
or you may down load it from here
14. Installing the Linux_base.
cd /usr/ports/emulators/linux_base
make
make install
15. Installing the XFree86.
cd /usr/ports/x11/XFree86
make
make install
16. Please remember to:
Disable telnet and tftp in services and inetd.conf and services file.
17. Installing Mbone tools.
You can also install the mbone tools from UCL if you will be using this machine for MBone conferencing.
18. Reboot your system.
If you have not rebooted the machine yet, then now is the time:
# sync; sync; reboot
Please send a note to aakesson@code-donkey.org
Alec Aakesson 10/09/01