IPv6 & Linux - HowTo - Part 2
Version: 3.19d from 2001-07-14
(P) & (C) 1997-2001 by Peter Bieringer <pb@bieringer.de>,
see copyright notice for
more details
Original site of publishing: http://www.bieringer.de/linux/IPv6/;
suggestions, comments and improvements are welcome!
Basic Software
Contents
Needed software packages
-
Linux distribution
-
Kernel
Linux distribution
Why?
You need a running Linux system to go to IPv6
Version:
-
e.g. Red Hat 6.2 or 7.1, don't
forget to apply all available updates to close all known local and remote
security holes!
Installation, changes and configuration:
-
Install the distribution
-
Red Hat 6.2-Installation: choose option: "Server"
-
Run network setup to configure a working IPv4 network
-
Additional installation of software under Linux with linuxconf
or by hand with rpm -ihv packetname
-
Before removing given packets, inform yourself about the content of the
packet
-
Contents: rpm -qi packetname
-
List of files: rpm -ql packetname
| Packets |
|
| Remove: not necessary for a Minimalsystem |
ImageMagick cleanfeed ctags cproto cvs emacs
emacs-nox exmh hdparm inn ipxutils ispell knfsd mars-nwe mutt ncpfs nmh
pine postgresql postgresql-clients postgresql-devel pump rcs routed rsh
rusers rwo samba slrn talk tetex-xdvi tin ucd-snmp ucd-snmp-utils uucp
words yp-tools |
| Remove: not necessary for a Minimalsystem, if you need no printing |
lpr |
| Remove: not necessary for a Minimalsystem, if you need no extended
X-Windows configuration |
AfterStep AfterStep-APPS AnotherLevel freetype
fvwm2 fvwm fvwm2-icons ical netscape-communicator netscape-common rxvt
xmailbox xrn |
| Remove: not necessary for a Minimalsystem, if you have
a direct Internet connection by LAN |
dip lrzsz minicom modemtool ppp |
| Install: necessary packages |
libpng libtermcap-devel ncurses-devel |
| Install: additional tools (useful but not necessary) |
mc |
| Install: necessary packages, if using WWW client under X |
XFree86-devel libgr-devel libpng-devel
zlib-devel |
| Install: necessary packages, if compiling Mozilla |
glib-devel gtk+-devel ORBit-devel |
Here are list of all packages I have installed on my hosts (perhaps
it's useful for you):
-
Several adaptations:
-
Edit /etc/lilo.conf
-
Change vga=normal to vga=extended for screen terminals
with 50 lines, after next reboot you see more of the kernel messages at
once (only, if "General|Video mode selection support" is enabled during
kernel configuration).
-
Run lilo to put the changes of lilo.conf in the boot
record
IPv6 ready kernel
Why?
Distributions only come with a stable running kernel 2.2.x, but compiled
mostly without IPv6 enabled.
RedHat Linux 7.1 now has now an IPv6 enabled kernel and also
an earlier snapshot of my network setup scripts.
Version and filename of the packet:
Latest versions I've tested compiling like described in this HowTo were
-
2.2.16 (IPv6 enabled)
-
2.2.19 + USAGI-Patch-20010403 (20010418 don't result in a successful compilation)
-
2.4.5 (+ndisc-linklocal-patch)
RedHat 6.2 users can use the given kernel source file kernel-source-2.2.19-6.2.1.i386.rpm
Because of security issues, you should update
to 2.2.19+ immediately!
RedHat publishes already updates for RHL 6.2: e.g.ftp://updates.redhat.com/6.2/
Also I recommend to apply the related Openwall
security patch, you can get it from ftp://ftp.openwall.com/pub/patches/linux/
(at the moment, only kernel versions 2.2.x are supported).
Additional Information:
The USAGI project provides you
with precompiled stable packages and patches in stable or also snapshots
for several distributions and the vanilla kernel here: ftp://ftp.linux-ipv6.org/pub/usagi/
If you want to compile this kernel as non-monolithic
(using some kernel parts as modules), you need a new version of the modutils
(2.1.121+).
Take care of the new module loader (called kmod) built-in in the kernel.
To avoid any problems, read the file Documentation/Changes
from the kernel source and look, if your system-software is up-to-date.
The current standard kernel sources of 2.2.19- and 2.4.3- have bugs
relating to automatic network configuration if an interface is shut down
and started up again (problem known as does not re-join all-node multicast
address on network devices after down and up again). USAGI-Patch will
help in this case, too.
In 2.2.19- and 2.4.3- there is also a bug in ndisc.c, you will find
patches here: ftp://ftp.bieringer.de/pub/linux/IPv6/kernel/
In 2.4.4+ there is another bug in ndisc.c, you will find patches here:
ftp://ftp.bieringer.de/pub/linux/IPv6/kernel/
Contents:
| Files |
Path (in DLD distribution) |
Description |
| vmlinuz-ip6 |
/boot/vmlinuz-ip6 |
Linux kernel |
| *.o |
/lib/modules/version |
Linux kernel modules |
Unpacking, configuration
-
RedHat 6.2
-
Install kernel source package
-
rpm -ihv path-to-rpm-packages/kernel-source-version.rpm
-
Goto kernel source directory
-
Copy original config file (relating to your used CPU type)
-
cp configs/kernel-version-cputype.config
.config
-
Apply patches...
-
Configure the kernel for IPv6
-
make config or make menuconfig
-
Enable following options
| Kernel options |
|
Selection |
| Networking options |
The IPv6 protocol |
module (if cause problems, then use yes) |
|
IPv6: enable EUI-64 token format |
yes (2.4.4-, removed 2.4.5+) |
|
IPv6: disable provider based address |
yes (2.4.4-, removed 2.4.5+) |
-
Update Makefile with version number (otherwise you're running into a module
version conflict), e.g.
-
Change: EXTRAVERSION = -5.0
to: EXTRAVERSION = -5.0-IPv6
-
Others
-
Move into the source directory:
-
Remove the symbolic link to the old kernel sources:
-
Unpack the new kernel source:
-
tar xzf your-path/linux-version -C /usr/src
-
If you have an older kernel source like described upper, you can apply
now patches:
-
gzip -cd your-path/patch-2.y.x.gz | patch -p0
-
Rename the new created source directory for better distinction:
-
Now create a softlink, necessary for compatibility afterwards:
-
ln -s linux-version linux
-
Move into the kernel source directory:
-
Apply patches...
-
Configure the kernel for IPv6
-
make config or make menuconfig
Don't forget to set other options depending on
your system, too!
| Kernel options |
|
Selection |
| Code maturity level options |
Prompt for development and/or incomplete code/drivers |
yes |
| Loadable module support |
Enable loadable module support |
no (fewer problems, but at the moment, I get no problems
running as much as possible of the kernel as modules) |
|
[if modules are enabed]
Set version information on all symbols for modules |
yes (you should select this to prevent module mismatch, see also EXTRAVERSION
later in the Makefile) |
|
[if modules are enabed]
Kernel module loader |
yes (normally kerneld is no longer used) |
| Cosole drivers |
Video mode selection support |
yes (so you can use the 50 line modus at the console, see lilo.conf
options [vga=extended] for details) |
| Networking options |
Packet socket |
yes or module (important
for tcpdump!) |
|
Unix domain sockets |
yes (won't mostly work as module!) |
|
Kernel/User netlink socket |
yes (needed by ip) |
|
Routing messages |
yes (needed by ip) |
|
TCP/IP networking |
yes |
|
The IPv6 protocol |
module (if causing problems, then use yes) |
|
IPv6: enable EUI-64 token format |
yes (2.4.4-, removed 2.4.5+) |
|
IPv6: disable provider based address |
yes (2.4.4-, removed 2.4.5+) |
| File systems |
/proc filesystem support |
yes |
| Kernel hacking |
Magic sysrq key |
yes (very useful at hang-ups, read sysrq.txt for details) |
Compilation and installation
-
Make a backup of the kernel config:
-
cp .config ../config-version-counter
-
You can also create a new subversion (I prefer this now) with editing the
Makefile
-
vi Makefile
-
Change/add EXTRAVERSION, i.e.
EXTRAVERSION = -IPv6
-
Now compile the kernel:
-
make dep; make clean; make {zImage | bzImage} <; make modules>
You can also use my utility coke
for that.
Hint: Use bzImage, if kernel built would be too big
-
If you get any errors during compilation, look at your kernel config and
try some other options. Sometimes newer kernels are a little strange...
It is also possible that it's better to build a non-modular kernel.
-
Copy and name the kernel:
-
cp arch/i386/boot/{zImage | bzImage} /boot/vmlinuz-version
-
If you have build a kernel with modules you should install them now and
build also the initial RAM disk:
-
make modules_install
-
mkinitrd /boot/initrd-2.2.19-6.2.1-IPv6.img 2.2.19-6.2.1-IPv6
-
Edit /etc/lilo.conf or run liloconfig
-
Add a new kernel entry for i.e. /boot/vmlinuz-ip6.
Beware of removing the old (and running) kernel.
Sometimes a hangup during booting the IPv6 kernel (e.g. you forgot
an important option to select...) can cause many trouble if you haven't
a second (running) kernel to boot!
-
Don't forget to add/edit an entry in /etc/lilo.msg.
-
Create/overwrite the link to the new kernel:
-
ln -sf /boot/vmlinuz-version /boot/vmlinuz-ip6
-
Run lilo to put the changes of lilo.conf in the boot
record
-
Reboot the system and select the new IPv6 kernel (good luck):