[AYAME Installation Manual]
A. Pre-setting
==============
1) Install the NetBSD-1.5.2 kernel source.
!!! caution !!!
You should backup any other kernel sources under the /usr/src directory
before installation.
1) Download the NetBSD kernel source tarball from the NetBSD FTP site.
There are many FTP sites that offer the NetBSD kernel source,
for example:
- ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-1.5.2/source/sets/syssrc.tgz
- ftp://ftp.jp.netbsd.org/pub/NetBSD/NetBSD-1.5.2/source/sets/syssrc.tgz
2) Extract the kernel source under the /usr/src directory:
# tar xfzp <ANYWHERE>/syssrc.tgz -C /
3) Be careful not to forget checking after the extension.
For it, run the "ls -l /usr/src/sys" command.
In the case that it succeed,
this command will result to display as follows.
$ ls -l /sys/
total 43
drwxrwxr-x 2 root wsrc 512 Sep 10 09:04 CVS
-rw-rw-r-- 1 root wsrc 334 Nov 8 1999 Makefile
drwxrwxr-x 3 root wsrc 512 Sep 10 08:14 adosfs
drwxrwxr-x 38 root wsrc 1024 Sep 10 09:04 arch
drwxrwxr-x 3 root wsrc 512 Sep 10 08:52 coda
drwxrwxr-x 18 root wsrc 512 Sep 10 09:01 compat
drwxrwxr-x 3 root wsrc 512 Sep 10 08:53 conf
drwxrwxr-x 8 root wsrc 512 Sep 10 08:53 crypto
drwxrwxr-x 3 root wsrc 1024 Sep 10 08:53 ddb
drwxrwxr-x 37 root wsrc 1536 Sep 10 09:01 dev
drwxrwxr-x 3 root wsrc 512 Sep 10 08:56 filecorefs
drwxrwxr-x 3 root wsrc 512 Sep 10 08:56 gdbscripts
drwxrwxr-x 3 root wsrc 512 Sep 10 08:56 ipkdb
drwxrwxr-x 4 root wsrc 512 Sep 10 08:56 isofs
drwxrwxr-x 3 root wsrc 2048 Sep 10 08:56 kern
drwxrwxr-x 6 root wsrc 512 Sep 10 09:01 lib
drwxrwxr-x 7 root wsrc 512 Sep 10 09:00 lkm
drwxrwxr-x 16 root wsrc 512 Sep 10 09:00 miscfs
drwxrwxr-x 3 root wsrc 512 Sep 10 08:58 msdosfs
drwxrwxr-x 3 root wsrc 2048 Sep 10 08:58 net
drwxrwxr-x 3 root wsrc 512 Sep 10 08:58 netatalk
drwxrwxr-x 3 root wsrc 1024 Sep 10 08:58 netccitt
drwxrwxr-x 3 root wsrc 2048 Sep 10 08:58 netinet
drwxrwxr-x 3 root wsrc 1536 Sep 10 08:58 netinet6
drwxrwxr-x 4 root wsrc 1536 Sep 10 08:59 netiso
drwxrwxr-x 3 root wsrc 512 Sep 10 08:59 netkey
drwxrwxr-x 3 root wsrc 512 Sep 10 08:59 netnatm
drwxrwxr-x 3 root wsrc 512 Sep 10 08:59 netns
drwxrwxr-x 3 root wsrc 1024 Sep 10 08:59 nfs
drwxrwxr-x 3 root wsrc 512 Sep 10 08:59 ntfs
drwxrwxr-x 3 root wsrc 512 Sep 10 08:59 stand
drwxrwxr-x 3 root wsrc 2560 Sep 10 08:59 sys
drwxrwxr-x 8 root wsrc 512 Sep 10 08:59 ufs
drwxrwxr-x 3 root wsrc 1024 Sep 10 08:59 uvm
drwxrwxr-x 3 root wsrc 512 Sep 10 08:59 vm
B. AYAME kernel Configuration
==============================
1) Download the AYAME source package from the following location:
http://www.ayame.org/files/ayame/ayame-x.y.tar.gz
2) Back up ayame's old source tree.
3) Extract the AYAME source package:
# tar xfpz <ANYWHERE>/ayame-x.y.tar.gz -C /usr/src
If the command succeed,
files will be created under the /usr/src/ayame directory.
Please see FILES for the detailed explanation about each files.
4) Make symbolic link from /usr/src/ayame to /usr/src/ayame-x.y
$ cd /usr/src
# ln -s ayame-x.y ayame
5) Apply paches to the kernel source:
$ cd /usr/src/sys
# gzip -dc /usr/src/ayame/patch/ayame-sys-x.y.patch.gz | patch -p2
6) Edit the kernel configuration file.
6.1) Move to the /sys/arch/<ARCH>/conf directory:
$ cd /sys/arch/<ARCH>/conf
6.2) Edit the configuration file.
Edit /sys/arch/<ARCH>/conf/<YOUR_CONFIG>:
<ARCH> is the archtecture of the machine you use now,
and <YOUR_CONFIG> can be any pick you choose.
Add the following two lines to the config file
(You can use the /sys/arch/<ARCH>/conf/GENERIC.AYAME file
for the template):
option MPLS
option MPLS_DEBUG (if need)
(* This version of AYAME supports i386 only.)
6.3) Create directory to configure the kernel:
# config <YOUR_CONFIG>
6.4) Move to the directory dedicated to the kernel configuration:
$ cd ../compile/<YOUR_CONFIG>
6.5) Configure the kernel:
# make depend all
7) Install the kernel
# make install
C. AYAME userland Configuration
============================
1) Pre-setting for AYAME Userland Install
1.1) Download ayamed-0.3-gnu.tar.gz from:
http://www.ayame.org/files/ayame/ayamed-0.3-gnu.tar.gz
1.2) Download GNU AYAMElized Zebra-0.92a from:
ftp://ftp.ayame.org/files/ayame/zebra-0.92a-AYAME.tar.gz
1.3) Extract ayamed-0.3-gnu.tar.gz and zebra-0.92a.tar.gz
$ tar zxf <ANYWHERE>/ayamed-0.3-gnu.tar.gz -C /usr/src/
$ tar zxf <ANYWHERE>/zebra-0.92a-AYAME.tar.gz -C /usr/src/ayame/src/
2) AYAME Userland Install:
2.1) Backup /usr/include to apply patches to /usr/include:
$ cd /usr/src/ayame/
# tar czpf usrinclude.tar.gz /usr/include
2.2) Build userland commands:
# make
2.3) Install to the system:
# make install
D. Reboot
=========
1) Reboot the system:
# reboot
2) Make sure that the system uses the AYAME kernel:
When you run
$ /usr/src/ayame/utils/checkmpls.sh
if the following messsage appear on the screen, the AYAME kernel
has been installed properly:
MPLS supported by kernel.
Otherwise, confirm the installation steps again.
E. Configuration
=======
1) Configure /etc/man.conf:
The man page has been installed at /usr/ayame/man.
Consequently, if you wish to read the manual page with the
"man ayamed" command, you have to edit /etc/man.conf and
change the line beginning with "_default" as follows:
_default /usr/{ayame,share,X11R6,pkg,local}/man/
After that, the man page is configured properly if you can
read it with the command:
$ man ayamed
2) Network interface configuration:
Please refer the ifconfig manual with the command:
$ man ifconfig
3) Ldpd configuration:
Use /usr/ayame/etc/ldpd.conf.example for a template:
$ cd /usr/ayame/etc
# cp ldpd.conf.sample ldpd.conf
Edit this configuration file according to the configuration
of the installed machine.
For details, see the manual page.
F. Boot confirmation:
=============
Test if ayamed and ldpd would boot without problems:
1) Configure the loopback interface:
# /usr/ayame/sbin/ifconfig lo0 mpls 0:0
2) Do the boot test for the ayamed:
# /usr/ayame/sbin/ayamed &
3) Do the boot test for the ldpd:
# /usr/ayame/sbin/ldpd &
4) Confirm if these command are running:
$ ps
PID TT STAT TIME COMMAND
222 p0 Ss 0:00.09 -csh
243 p0 S 0:00.06 /usr/ayame/sbin/ayamed
244 p0 S 0:00.21 /usr/ayame/sbin/ldpd
248 p0 R+ 0:00.00 ps
...
If "ayamed" and "ldpd" was displayed when you run "ps" command,
the AYAME compornents should be booted properly
If not, check the current configuration.
You can also refer the manual page.
If the problem remains unsolved, send an Email to the mailing list.
G. Boot file editing
=====================
Set up to let ayamed and ldpd boot when the OS starts.
1) Copy the boot file.
You can use the /usr/ayame/etc/rc.mpls.example as a template:
# cp /usr/ayame/etc/rc.mpls.example /etc/rc.d/mpls
2) Edit the boot file. Edit the copied boot file.
You don't need to change anything if it is just after the NetBSD 1.5.2
installation.
3) Edit the system boot file.
Edit the /etc/rc.conf file, and add the following line at the end of it:
mpls=YES
4) Configure the intarfaces.
Set to do the interface configuration on the point of reboot.
If no IP address assigns to the interfaces, ldpd won't boot up.
Write the configuration into "/etc/ifconfig.<interface name>".
In the case the interface name is "ti0",
the interface configuration would be etc/ifconfig.ti0.
In the configuration file, write options except ifconfig interface names,
as follows:
inet 192.168.0.1 netmask 255.255.255.0
5) Reboot the system:
# reboot
6) Make sure the system has been rebooted.
Make sure if ayamed and ldpd has actually been rebooted:
$ ps
PID TT STAT TIME COMMAND
217 p0 Is 0:00.08 -csh
308 p0 R+ 0:00.00 ps
193 E0- I 0:00.12 /usr/ayame/sbin/ayamed
194 E0- R 0:50.55 /usr/ayame/sbin/ldpd
...
If succeed, the following directories will be displayed on the screen
as above:
/usr/ayame/sbin/ayamed
/usr/ayame/sbin/ldpd