---=[ IPv6 HowTo on linux ]=---

- INDEX -[*] Introduction[*] Disclaimer[*] Legal notes[*] How to[*] Appendix[*] Greetings

- [ INTRODUCTION ] -
English is not my language (excuse me for errors ),
although I hope to help you on configuration of IPv6 protocol.
I have tested this guide on my linuxbox (RedHat 7.2).

- [ DISCLAIMER ] -
I am not responsable for crashes or problems on your machine.
I had tryed to explain all steps, but if you cannot do
follows operations, please close this file.

- [ LEGAL NOTES ] -
You can distribute this document (you must quote me),
you cannot NEVER receive payment for this How-to.
(Informations wants be free ...)

- [ HOW TO ] -
There are two ways for configure IPv6 protocol on your linuxbox:
1. Built-in;
2. Module (option recomended).

You must see what kernel is used by your linuxbox:

[root@localhost root]# uname -a
Linux localhost.localdomain 2.4.7-10 #1 mer mar 13 19:55:33 CET 2002 i686 unknown

I advise to use a kernel 2.2.* or upper, you can donwload it at:
ftp://ftp.kernel.org/pub/linux/kernel/v2.4/
If you want IPv6 how a module you MUST download modutils:
ftp://ftp.kernel.org/pub/linux/kernel/modutils/

Skip at kernel's recompiling:
Log in as root and copy two downloaded files in /usr/src:
[root@localhost tmp]# cp linux-2.4.<version>.tar.gz /usr/src
[root@localhost tmp]# cp modutils-2.4.<version>.tar.gz /usr/src

Note: <version> is number of version, of course :PPP
Digit:
[root@localhost src]# tar -zxvf linux.2.4.<version>.tar.gz

Enter in generated directory:
[root@localhost src]# cd linux.2.4.<version>
[root@localhost linux-2.4.<version>]# make menuconfig

Now select follow options:
Code maturity level options -> <*> Prompt for development and/or incomplete code/drivers
Networking options -> <*> Packet socket
-> <*> Unix domain sockets
-> <*> TCP/IP networking
-> <M> The IPv6 protocol
File systems -> <*> /proc filesystem support
Kernel Hacking -> <*> Magic sysrq key

Note: if you want IPv6 how built-in select <*> The IPv6 Protocol (not M).

Exit and save:
Do you wish to save your new kernel configuration? <Yes> <No>
Yes, of course :P

Now:
[root@localhost linux-2.4.<version>]# make dep ; make bzImage ; make modules ; make modules_install
This operation is very long (1h and 30' on my P-III 450 Mhz :///).
After the wait move you in follow dir:
[root@localhost linux-2.4.<versione>]# cd /usr/src/linux-2.4/arch/i386/boot
[root@localhost boot]# cp bzImage /boot/vmlinuzipv6

Now in:
[root@localhost boot]# cd /usr/src/linux-2.4
[root@localhost linux-2.4]# cp System.map /boot

Now you must configure your bootloader for automatic load of new kernel:
-[ LiLo:
edit /etc/lilo.conf in follow way:
image = /boot/vmlinuzipv6
root = /dev/hd**
label = LinuxIPv6 read-only

Note: ** after hd represents HD and partition of /
For know what is your / partition, from shell digit:
[root@localhost etc]# df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/hdb2 8119776 1901788 585520 25% /
/dev/hdb1 46636 6745 37483 16% /boot
none 31104 0 31104 0% /dev/shm

In this case you must write hdb2, save and digit from shell: lilo.

-[ Grub:
Edit /etc/grub.conf in follow way:
kernel /vmlinuzipv6 ro root=/dev/hd** hdc=ide-scsi
Save and exit.

Now install modutils:
Move you in /usr/src and digit:
[root@localhost src]# tar -zxvf modutils-2.4.<version>.tar.gz

Enter in generated dir and digit:
[root@localhost modutils-2.4.<version>]# ./configure ; make ; make install

Now you can reboot your system.
System was crashed? Well digit:
[root@localhost root]# /sbin/modprobe ipv6
This comand start IPv6 module, you can add this in /etc/rc.d/rc.locale
for automatic execution on boot.

Well, check if module is active:
[root@localhost root]# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:177 errors:0 dropped:0 overruns:0 frame:0
TX packets:177 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:12330 (12.0 Kb) TX bytes:12330 (12.0 Kb)

Most important line is inet6, if is not present you had mistook something.
If you use an old release of linux I adivise of download follows packets:
net-tools: http://www.gnumonks.org/ftp/pub/mirror/linux/iputils/
iputils : ftp://ftp.netwinder.org/users/p/philib/

-[ net-tools:
[root@localhost tmp]# tar -zxvf iputils-ss000121.tar.gz
Enter in created dir and digit make.

-[ iputils:
Copy in /usr/src and digit:
[root@localhost src]# bunzip2 net-tools-1.60.tar.bz2
[root@localhost src]# tar -zxvf net-tools-1.60
Enter in created dir and digit:
[root@localhost src]# make config ; make ; make -n install

Check a lot of things, edit /etc/protocols and add follows lines:
ipv6 41 IPv6 # IPv6
ipv6-route 43 IPv6-Route # Routing Header for IPv6
ipv6-frag 44 IPv6-Frag # Fragment Header for IPv6
ipv6-crypt 50 IPv6-Crypt # Encryption Header for IPv6
ipv6-auth 51 IPv6-Auth # Authentication Header fo IPv6
icmp6 58 IPv6-ICMP # ICMP for IPv6
ipv6-nonxt 59 IPv6-NoNxt # No Next Header for IPv6
ipv6-opts 60 IPv6-Opts # Destination Options for IPv6

Edit /etc/hosts:
::1 localhost-v6.localdomain localhost-v6
# Multicast IPv6
fe00::0 ip6-localnet
ff00::0 ip6-mcstprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Now ping in v6 our localhost:
[root@localhost etc]# ping6 ::1 -c 3
PING ::1(::1) from ::1 : 56 data bytes
Warning: time of day goes back, taking countermeasures.
64 bytes from ::1: icmp_seq=0 hops=64 time=207 usec
64 bytes from ::1: icmp_seq=1 hops=64 time=126 usec
64 bytes from ::1: icmp_seq=2 hops=64 time=138 usec

--- ::1 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/mdev = 0.126/0.157/0.207/0.035 ms

Now you must active a Tunnel Broker.
Remember of update the Tb if you haven't a static IP address.
After activation and update digit:
[root@localhost root]# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:149 errors:0 dropped:0 overruns:0 frame:0
TX packets:149 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:9670 (9.4 Kb) TX bytes:9670 (9.4 Kb)

ppp0 Link encap:Point-to-Point Protocol
inet addr:151.26.30.51 P-t-P:151.5.176.56 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:37 errors:2 dropped:0 overruns:0 frame:0
TX packets:33 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:23926 (23.3 Kb) TX bytes:2516 (2.4 Kb)

sit0 Link encap:IPv6-in-IPv4
inet6 addr: 3ffe:8172::d:3b50/124 Scope:Global
inet6 addr: ::127.0.0.1/96 Scope:Unknown
inet6 addr: ::151.26.30.51/96 Scope:Compat
UP RUNNING NOARP MTU:1480 Metric:1
RX packets:3 errors:0 dropped:0 overruns:0 frame:0
TX packets:70 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:312 (312.0 b) TX bytes:8296 (8.1 Kb)

Now ping in v6 a server6:
[root@localhost root]# ping6 irc6.edisontel.com
PING irc6.edisontel.com(irc6.edisontel.com) 56 data bytes
64 bytes from irc6.edisontel.com: icmp_seq=1 hops=62 time=179.835 msec
64 bytes from irc6.edisontel.com: icmp_seq=2 hops=62 time=229.955 msec

--- irc6.edisontel.com ping statistics ---
3 packets transmitted, 2 packets received, 33% packet loss
round-trip min/avg/max/mdev = 179.835/204.895/229.955/25.060 ms

If you haven't a reply digit Crtl+C (for stop ping6)
and disactive sit0 interface (is interface ov IPv6):
[root@localhost root]# ifconfig sit0 down
and re-update Tb.

Now you must configure your IRC client for IPv6.
Download most recent version and decompress and follow this istructions:

-[ Xchat:
./configure --enable-ipv6 ; make ; make install

-[ Kvirc:
./configure --with-ipv6-support ; make ; make install

-[ BitchX:
./configure --enable-ipv6 ; gmake ; gmake install

Join IRC and good chat !!!

- [ APPENDIX ] -
This is a little script to up sit0 interface:
--- Cut here
#!/bin/sh
IPV6="your IPv6 address"
IPV4="address of tunnel"
ifconfig sit0 up
ifconfig sit0 add inet6 $IPV6
route -A inet6 add 2000::/0 gw ::$IPV4
echo "Tb updated !!!"
--- Cut here
Save as act.sh.

- [ GREETINGS ] -
Thanks to #99posse channel and my friends.
Special thanks to jesty, Morf3u5Ck, kiara (you are special) & vale.

-e0f-
_______
Copyright (c) 2002 jodosha.
For contacts or comments: synopsjs@katamail.com or /q jodosha -> #99posse @ IRCNet.