IPv6 & Linux - HowTo - Script Files (3.18+) - current ones
Version: 3.18j from 2001-05-23
(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!
If you found errors, bugs or problems, please
contact the author - thank you!
Contents
Version information
-
3.18j: New script-set announced
-
3.18: Official publishing: new features are
-
better removing of IPv6 configuration on interface shutdown
-
6to4 support
-
dedicated tunnel device support
-
use of ipv6calc for extended
address detection on configuration setup, if installed
Additional information
New extra script-set for RedHat Linux 6.2 and 7.1
-
After hard work of Pekka Savola
and me a new stable release is out.
-
Changes:
-
Add new switches to control autoconfiguration per device
-
Take care about different meaning of the forwarding switch
-
Cleanups
-
It's currently available as
Script files (index)
Information: my setup is based on a RedHat 6.2 or 7.1 system, but should
be easy to install on all SystemV compatible Linux distributions.
-
Function libary file:
-
Test script: NEW
-
Configuration files:
-
Files containing network specific data per interface
-
Example for a Ethernet interface
-
Example for automatic tunnel interface needed to reach IPv4 compatible
IPv6 addresses (Note: such tunnel is always enabled, if a static tunnel
is configured - only for clients without any other static tunnel needed)
-
Example for static tunnel interfaces (unnumbered tunnel)
-
Example for static tunnel interfaces (numbered tunnel - Freenet6)
-
Example for static tunnel interfaces (numbered tunnel - Hurricane Electric)
-
Files containing network specific data per sytem
-
Scripts:
-
Main interface initialisation scripts
-
IPv6 related interface initialisation scripts
-
ifup-ipv6 / ifdown-ipv6
-
ifup-sit / ifdown-sit
-
Usage:
-
Install files (create backup, overwrite or apply diff)
-
Setup values (the given ones in the config files are mostly for demonstration
and tests)
-
Open a local console for watching the startup log (but perhaps not on all
distributions available)
-
tail -f /var/log/boot.log
-
Restart networking (you should do this only sitting on local console)
-
/etc/rc.d/init./network restart
Explanation of configuration and script files
Network configuration under Linux is splitted in several steps:
-
Configuration of the built-in interfaces
-
Global network configuration
-
Starting of the daemons using the network
For IPv6 you have to implement in this steps the IPv6 configuration in
the right way. Therefore I have written several configuration and script
files, which do this work.
Please, DO NOT USE following shown addresses
in your case without checking!
Pre-install:
IPv4 interface configuration should be done by the distribution and is
working (not a must for an IPv6 only box)
Install:
-
Copy following files into the given directories
New file |
Description |
Copy into directory |
network-functions-ipv6 |
IPv6 Function libary file |
/etc/sysconfig/network-scripts/ |
ifup-ipv6 |
IPv6 related function to bring up IPv6 |
/etc/sysconfig/network-scripts/ |
ifdown-ipv6 |
IPv6 related function to bring down IPv6 |
/etc/sysconfig/network-scripts/ |
ifup-sit |
IPv6 related function to bring up IPv6 tunnel |
/etc/sysconfig/network-scripts/ |
ifdown-sit |
IPv6 related function to bring down IPv6 tunnel |
/etc/sysconfig/network-scripts/ |
-
Add some patches (diffs) to following files
Diff file |
Description |
Patch for file |
network.diff |
Interface independed network configuration |
/etc/sysconfig/network |
ifup.diff |
Script to bring network on interface up |
/etc/sysconfig/network-scripts/ifup |
ifdown.diff |
Script to bring network on interface down |
/etc/sysconfig/network-scripts/ifdown |
-
Add some patches (diffs) to following files and copy new files, containing
network depending data
-
Please, check data afterwards and change it before
starting!
Diff file |
Description |
Patch for file |
ifcfg-eth0.diff |
Configuration for interface eth0 |
/etc/sysconfig/network-scripts/ifcfg-eth0 |
New file |
Description |
Copy into directory |
ifcfg-sit0 |
Configuration (only enabling needed) for an automatic tunnel
nterface the use of IPv4 compatible IPv6 addresses
(Note: such tunnel is always enabled, if a static tunnel is configured
- only for clients without any other static tunnel needed) |
/etc/sysconfig/network-scripts/ |
ifcfg-sit1 |
Example for static tunnel interface |
/etc/sysconfig/network-scripts/ |
ifcfg-sit2 |
Example for static tunnel provided by Freenet6 |
/etc/sysconfig/network-scripts/ |
ifcfg-sit3 |
Example for static tunnel provided by Hurricane Electric |
/etc/sysconfig/network-scripts/ |
static-routes-ipv6 |
Static IPv6 routes (including an interface token) |
/etc/sysconfig/ |
Configuration:
Basics: if a variable is shown twice (and one of the line is starting with
"#") then the possible values are shown. To change the value you can comment
out the uncommented (add a leading "#" at the beginning of the line) and
delete the other "#" or delete one line and change the value regarding
to that what you want.
-
/etc/sysconfig/network
-
Enable global IPv6 configuration
-
Switch tunnel setup mode
IPV6_TUNNELMODE="IP" # separate tunnel device
mode (now recommeded)
#IPV6_TUNNELMODE="NBMA" # NBMA-styled tunnel mode (used
in 3.17-)
-
/etc/sysconfig/network-scripts/ifcfg-eth0
(normal network interface)
-
Enable/disable IPv6 configuration for this interface
(check
this values, depending on yes or no the IPv6 configuration
of the specified interface will be done or skipped)
#IPV6INIT="yes"
# Initalize IPv6 "yes"
IPV6INIT="no"
# Initalize IPv6 "no"
-
Enable/disable IPv6 forwarding on this interface
(check
this values, depending on yes or no the incoming IPv6 packets
will be routed or not)
#IPV6FORWARDING="yes"
# Control {yes|no} forwarding through this device
IPV6FORWARDING="no"
# Control {yes|no} forwarding through this device
-
Specify the basic (not link local) IPv6 address and
prefix for this interface:
IPV6ADDR="3ffe:400:100:ff01::1/64"
# Here specify the address and prefix length
-
Specify additional IPv6 addresses and their prefix
length for this interface:
IPV6ADDR_SECONDARIES="fec0:0:0:1::1/64 3ffe:400:100:f101::2/64"
# List of secondary addresses
-
For 6to4 tunneling configure following:
-
Enabling
-
6to4 remote relay:
-
6to4 local address overwrite (optional, in case of
NAT or other special scenarios)
IPV6TO4_IPV4ADDR="4.5.6.7"
-
/etc/sysconfig/network-scripts/ifcfg-sit0
(IPv6 in IPv4 tunnel interface)
-
Specify interface name (must be the same as the appendix
from the filename) and other compatible values:
DEVICE="sit0"
BOOTPROTO="none"
ONBOOT="yes"
-
Enable/disable IPv6 configuration for this interface
(check
this values, depending on yes or no the IPv6 configuration
of the specified tunnel interface will be done or skipped)
#IPV6INIT="yes"
# Initalize IPv6 "yes" or "no"
IPV6INIT="no"
# Initalize IPv6 "yes" or "no"
-
Nothing more to specifiy
-
/etc/sysconfig/network-scripts/ifcfg-sit1
(IPv6 in IPv4 tunnel interface)
-
Specify interface name (must be the same as the appendix
from the filename) and other compatible values:
DEVICE="sit1"
BOOTPROTO="none"
ONBOOT="yes"
-
Enable/disable IPv6 configuration for this interface
(check
this values, depending on yes or no the IPv6 configuration
of the specified tunnel interface will be done or skipped)
#IPV6INIT="yes"
# Initalize IPv6 "yes" or "no"
IPV6INIT="no"
# Initalize IPv6 "yes" or "no"
-
Specify the IPv4 address of the foreign tunnel endpoint:
IPV6TUNNELIPV4="128.176.191.66"
# Here specify the IP4 address of the foreign tunnel endpoint
-
Optional for numbered tunnels: Specify the local
IPv6 address:
IPV6ADDR="3ffe:b00:c18:1fff:0:0:0:287/127"
# Here specify the address and prefix length
-
/etc/sysconfig/static-routes-ipv6
(IPv6 static routes)
-
Here you can specify additional IPv6 routes per interface
#Device IPv6 network to route
IPv6 gateway address
#eth0 fec0:0:0:2::/64
fec0:0:0:1:0:0:0:20
#eth0 3ffe::/16
3ffe:0400:0100:f102:0:0:0:1
#eth0 2000::/3
3ffe:0400:0100:f102:0:0:0:1
-
And also the routes for tunnels
## Virtual tunnel interface
IPv6 network to route through
# IPv6 Testing Address Allocation (6bone
testbed)
sit1
3ffe::/16
# IPv6 official addresses
sit1
2000::/3
Testing:
-
You can restart the whole network configuration by executing
-
/etc/rc.d/init.d/network restart
-
Normally, you're not able to see what's really happened, because the output
is written to syslog (RedHat: facility: local7, file:
/var/log/boot.log).
Therefore it's always a good idea to look at the output on another virtual
console with
-
tail -f /var/log/boot.log
-
See also example section
Migration
From 3.15-3.16 to 3.18+
Following changes should be done for migration:
File |
Description |
3.15-3.16 |
3.18+ |
ifcfg-ethX |
IPv6 address must include prefix length now |
IPV6ADDR |
IPV6ADDR (prefix length included) |
ifcfg-ethX |
Extra variable for prefix length is now obsolete |
IPV6PREFIXLENGTH |
Prefix length now included in IPV6ADDR |
ifcfg-ethX |
Support for more than only 2 secondary IPv6 addresses per interface |
IPV6ADDR_1
IPV6ADDR_2 |
IPV6ADDR_SECONDARIES (prefix
length included) contains a list with additional IPv6 addresses |
ifcfg-sitX
(X > 0) |
Tunnel route no longer specified here |
IPV6TUNNELROUTE |
Specified now in static-routes-ipv6 |
ifcfg-sitX
(X > 0) |
Numbered tunnel now supported |
not supported |
IPV6ADDR (prefix length included) |
ifcfg-sit0 |
Automatic tunneling now supported |
not supported (in early releases) |
Only enable interface (no specific data is required) |
From 3.17 to 3.18+
Following changes should be done for migration:
File |
Description |
3.17 |
3.18+ |
ifcfg-sitX (X > 0) |
Numbered tunnel now better supported |
Prefix length was set to 0 because of NBMA-styled setup |
prefix length for p-t-p tunnels in non NBMA-styled mode can be set
now to 127 |
RedHat's rawhide information
In addition, this set should be able for easy implementation in the initscript-RPM.
I'll support this with 3 files to make life easier for me maintain the
set:
-
sysconfig-ipv6.txt
-
IPv6 related information for syscontrol.txt
-
striptool4ipv6scripts
-
a shell script which strips away all unimportant information (e.g. debugging,
additional information)
-
RH7 packagers can use this like:
-
sh striptool4ipv6scripts network-functions-ipv6 rh7 info debug
-
if I made no bugs, the stripped script should work afterwards, too...
-
readme-changes.ipv6
-
hopefully always in current state...
Examples for static tunnel setup
This section contains examples about a setup of static tunnels to different
tunnel providers.
Note: static tunnels should be configured on device names sitX
with (X>0). Do not use sit0, because it is a reserved
device and shouldn't be used for such cases.
Static tunnel with a routable segment
Example based on test at 2001-03-13.
Data you got from a static tunnel server administrator (here is an example
shown):
IPv6 remote static tunnel IPv4 address (server side): 1.2.3.4
To local routed IPv6 address space: 3ffe:400:100:f100::/56
Common known data:
Global routable IPv6 address space: 3ffe::/16, 2000::/3
What does this data mean and where to put the values in the configuration
files:
Name |
Value(s) |
Explanation |
Which file is related |
Where to put this value |
IPv6 remote static tunnel IPv4 address (server side) |
1.2.3.4 |
The IPv4 address of a remote tunnel server |
e.g.
ifcfg-sit1 |
IPV6TUNNELIPV4="1.2.34" |
To local routed IPv6 segment |
3ffe:400:100:f100::/56 |
An IPv6 address space which will be routed to you |
e.g. local interface, RAdvD, routing configuration |
e.g. /etc/radvd.conf, segmented per device, other local hosts |
Global routable IPv6 address space |
3ffe::/16
2000::/3 |
IPv6 address space, which should be routed through this tunnel |
static-routes-ipv6 |
See example, one IPv6 address space per line |
Configuration files result in:
-
/etc/sysconfig/network-scripts/ifcfg-sit1
DEVICE="sit1"
BOOTPROTO="none"
ONBOOT="yes"
IPV6INIT="yes"
IPV6TUNNELIPV4="1.2.3.4"
-
/etc/sysconfig/static-routes-ipv6
sit1 3ffe::/16
sit1 2000::/3
Check:
-
Tunnel setup
# ip tunnel
sit0: ipv6/ip remote any local any
ttl 64 nopmtudisc
sit1: ipv6/ip
remote 1.2.3.4 local any ttl 64
-
Interface
# ifconfig sit1
sit1
Link encap:IPv6-in-IPv4
inet6 addr: fe80::something/10 Scope:Link
inet6 addr: fe80::something/10 Scope:Link
UP POINTOPOINT RUNNING NOARP MTU:1472 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
-
Routing
# route -A inet6 |grep sit1
3ffe::/16
::
U 1 0
0 sit1
2000::/3
::
U 1 0
0 sit1
fe80::/10
::
UA 256 0
0 sit1
ff00::/8
::
UA 256 0
0 sit1
Freenet6
point-to-point-tunnel
Example based on test at 2001-03-13.
See here for more
information about what Freenet6 provides you.
Data you got from Freenet6: (here
is an example
shown):
This perl script is setup with exacts values :
Your IPv6 address : 3ffe:b00:c18:1fff:0:0:0:a1f
Freenet6 IPv6 address (server side) : 3ffe:b00:c18:1fff:0:0:0:a1e
Freenet6 IPv4 address (server side) : 206.123.31.102
Your IPv4 address : 62.155.142.69
Common known data:
Global routable IPv6 address space: 3ffe::/16, 2000::/3
What does this data mean and where to put the values in the configuration
files:
Name |
Value(s) |
Explanation |
Which file is related |
Where to put this value |
Your IPv6 address |
3ffe:b00:c18:1fff:0:0:0:a1f |
Freenet6 assign only one
IPv6 address to you, not more! |
e.g.
ifcfg-sit2 |
IPV6ADDR="3ffe:b00:c18:1fff:0:0:0:a1f/127" |
Freenet6 IPv6 address (server side) |
3ffe:b00:c18:1fff:0:0:0:a1e |
They also assigned a relating IPv6 address on their tunnel server (it's
now a point-to-point IPv6 link) |
|
Value is locally not needed (but for easier ping6 tests you
can put it in /etc/hosts) |
Freenet6 IPv4 address (server side) |
206.123.31.102 |
The IPv4 address of their tunnel server |
e.g.
ifcfg-sit2 |
IPV6TUNNELIPV4="206.123.31.102" |
Your IPv4 address |
62.155.142.69 |
Your global IPv4 address, static or dynamically assigned |
interface or
ial-up configuration |
Value must be already assigned static or dynamically, otherwise no
Internet connection is possible |
Global routable IPv6 address space |
3ffe::/16
2000::/3 |
IPv6 address space, which should be routed through this tunnel |
static-routes-ipv6 |
See example, one IPv6 address space per line |
Configuration files result in:
-
/etc/sysconfig/network-scripts/ifcfg-sit2
DEVICE="sit2"
BOOTPROTO="none"
ONBOOT="yes"
IPV6INIT="yes"
IPV6TUNNELIPV4="206.123.31.102"
IPV6ADDR="3ffe:b00:c18:1fff:0:0:0:a1f/127"
-
/etc/sysconfig/static-routes-ipv6
sit2 3ffe::/16
sit2 2000::/3
Check:
-
Tunnel setup
# ip tunnel
sit0: ipv6/ip remote any local any
ttl 64 nopmtudisc
sit2: ipv6/ip
remote 206.123.31.102 local any
ttl 64
-
Interface
# ifconfig sit2
sit2
Link encap:IPv6-in-IPv4
inet6 addr: fe80::3e9b:8e45/10 Scope:Link
inet6 addr: fe80::c0a8:101/10 Scope:Link
inet6 addr: 3ffe:b00:c18:1fff::a1f/127 Scope:Global
UP POINTOPOINT RUNNING NOARP MTU:1472 Metric:1
RX packets:10 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0[root@gate network-scripts]# ifconfig sit1
-
Routing
# route -A inet6 |grep sit2
3ffe:b00:c18:1fff::a1e/127
::
UA 256 4
0 sit2
3ffe::/16
::
U 1 0
0 sit2
2000::/3
::
U 1 0
0 sit2
fe80::/10
::
UA 256 0
0 sit2
ff00::/8
::
UA 256 0
0 sit2
Example based on test at 2001-03-13.
Data you got from Hurricane Electric:
(here is an example
shown):
Account: *****
Last Active: Never (tested via ipv6 ping every half hour)
Full name: *****
Company: *****
E-mail address: *****
Broker IPv4 tunnel address: 64.71.128.26
Broker IPv6 link address: 3FFE:1200:3028:FF01::2e6/127
Your IPv4 tunnel address: 62.155.142.69
Your IPv6 link address: 3FFE:1200:3028:FF01::2e7/127
If you also require an IPv6 network:
Your IPv6 network prefix: 3FFE:1200:3028:8173::/64
Common known data:
Global routable IPv6 address space: 3ffe::/16, 2000::/3
What does this data mean and where to put the values in the configuration
files:
Name |
Value(s) |
Explanation |
Which file is related |
Where to put this value |
Your IPv4 tunnel address |
3FFE:1200:3028:FF01::2e7/127 |
In this mode, only one IPv6 address is provided to you. |
e.g.
ifcfg-sit3 |
IPV6ADDR="3FFE:1200:3028:FF01::2e7/127" |
Broker IPv6 link address |
3FFE:1200:3028:FF01::2e6/127 |
They also assigned a relating IPv6 address on their tunnel server (it's
now a point-to-point IPv6 link) |
|
Value is locally not needed (but for easier ping6 tests you
can put it [without prefix length] in /etc/hosts) |
Broker IPv4 tunnel address |
64.71.128.26 |
The IPv4 address of their tunnel server |
e.g.
ifcfg-sit3 |
IPV6TUNNELIPV4="64.71.128.26" |
Your IPv4 tunnel address |
62.155.142.69 |
Your global IPv4 address, static or dynamically assigned |
interface or
ial-up configuration |
Value must be already assigned static or dynamically, otherwise no
Internet connection is possible |
Your IPv6 network prefix |
3FFE:1200:3028:8173::/64 |
An IPv6 address space which will be routed to you |
e.g. local interface, RAdvD, routing configuration |
e.g. /etc/radvd.conf, segmented per device, other local hosts |
Global routable IPv6 address space |
3ffe::/16
2000::/3 |
IPv6 address space, which should be routed through this tunnel |
static-routes-ipv6 |
See example, one IPv6 address space per line |
Configuration files result in:
-
/etc/sysconfig/network-scripts/ifcfg-sit3
DEVICE="sit3"
BOOTPROTO="none"
ONBOOT="yes"
IPV6INIT="yes"
IPV6TUNNELIPV4="64.71.128.26"
IPV6ADDR="3FFE:1200:3028:FF01::2e7/127"
-
/etc/sysconfig/static-routes-ipv6
sit3 3ffe::/16
sit3 2000::/3
Check:
-
Tunnel setup
# ip tunnel
sit0: ipv6/ip remote any local any
ttl 64 nopmtudisc
sit3: ipv6/ip
remote 64.71.128.26 local any
ttl 64
-
Interface
# ifconfig sit3
sit3
Link encap:IPv6-in-IPv4
inet6 addr: 3ffe:1200:3028:ff01::2e7/127 Scope:Global
inet6 addr: fe80::3e9b:8e45/10 Scope:Link
inet6 addr: fe80::c0a8:101/10 Scope:Link
UP POINTOPOINT RUNNING NOARP MTU:1472 Metric:1
RX packets:6 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
-
Routing
# route -A inet6 | grep sit3
3ffe:1200:3028:ff01::2e6/127
::
UA 256 3
0 sit3
3ffe::/16
::
U 1 0
0 sit3
2000::/3
::
U 1 0
0 sit3
fe80::/10
::
UA 256 0
0 sit3
ff00::/8
::
UA 256 0
0 sit3
6to4 relay tunnel router
Example based on test at 2001-03-13.
Information about 6to4 relay tunnel routers are given here: http://www.kfu.com/~nsayer/6to4/
Data you got from: (here is an example
shown):
IPv4 address of remote 6to4 relay router: 194.95.108.191
Common known data:
Global routable IPv6 address space: 3ffe::/16, 2000::/3
Your global accessable IPv4 address: 62.155.142.69
What does this data mean and where to put the values in the configuration
files:
Name |
Value(s) |
Explanation |
Which file is related |
Where to put this value |
IPv4 address of remote 6to4 relay router |
194.95.108.191 |
The IPv4 address of a 6to4 relay tunnel router |
e.g.
ifcfg-eth0 |
IPV6TO4_RELAY="194.95.108.191" |
Your global accessable IPv4 address |
62.155.142.69 |
Global accessable IPv4 address of your host |
e.g.
ifcfg-eth0 |
IPV6TO4_IPV4ADDR="62.155.142.69"
Only needed, if NAT, PPP or other scenarios do not let extract a global
IPv4 address automatically from the interface configuration |
Global routable IPv6 address space |
3ffe::/16
2000::/3 |
IPv6 address space, which should be routed through this tunnel |
static-routes-ipv6 |
See example, one IPv6 address space per line |
The IPv6to4 address in shown example 2002:3e9b:8e45::1/48
will
be build automatically by the script.
Configuration files result in:
-
/etc/sysconfig/network-scripts/more ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="none"
IPADDR="192.168.1.1"
NETMASK="255.255.255.0"
ONBOOT="yes"
IPV6INIT="yes"
IPV6FORWARDING="yes"
IPV6TO4INIT="yes"
IPV6TO4_RELAY="194.95.108.191"
IPV6TO4_IPV4ADDR="62.155.142.69"
-
/etc/sysconfig/static-routes-ipv6
sit0 3ffe::/16
sit0 2000::/3
Check:
-
Tunnel setup
# ip tunnel
sit0: ipv6/ip remote any local any
ttl 64 nopmtudisc
-
Interface
# ifconfig sit0
sit0
Link encap:IPv6-in-IPv4
inet6 addr: ::62.155.142.69/96 Scope:Compat
inet6 addr: ::127.0.0.1/96 Scope:Unknown
inet6 addr: 2002:3e9b:8e45::1/48 Scope:Global
inet6 addr: ::192.168.1.1/96 Scope:Compat
UP RUNNING NOARP MTU:1480 Metric:1
RX packets:28 errors:0 dropped:0 overruns:0 frame:0
TX packets:75 errors:3 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
-
Routing
# route -A inet6 | grep sit0
::/96
::
U 256 2
0 sit0
2002:3e9b:8e45::/48
::
UA 256 0
0 sit0
3ffe::/16
::194.95.108.191
UG 1 40
0 sit0
2000::/3
::194.95.108.191
UG 1 0
0 sit0
fe80::/10
::
UA 256 0
0 sit0
ff00::/8
::
UA 256 0
0 sit0
6to4 relay tunnel router connecting
one or more subnets to the IPv6 backbone
If you are enable to connect your tunnel server via 6to4 to the IPv6 backbone
like described earlier on this page, it's because of
the assigned /48 prefix also possible, to route one or more local connected
subnets, too.
Once you have decided which site prefixes you want to use, you can enstablish
local routes of this prefixes through dedicated interfaces.
E.g. with a choosen site prefix 0:0:0:f101::0/64 on eth0
run route -A inet6 add 2002:d950:2485:f101::0/64 dev eth0. To
distribute the prefix, use e.g. radvd.
Now clients on this link should also be able to connect to the IPv6 backbone.
In dial-up scenarios with dynamic local IPv4 address assignment, the
described command must be executed every time and also the tunnel must
be reconfigured. Therefore I wrote some scripts which do the job automatically.
Also, with a new release of radvd (currently available at http://v6web.litech.org/radvd/),
which support automatic recalculation of 6to4 prefixes, you can distribute
the new prefix to local LANs.
-
Scripts:
-
Scripts for calling from the related PPP scripts
-
Sample interface configuration file for ppp0
-
Sample configuration file for radvd
-
Configuration
Configuration:
-
/etc/sysconfig/network-scripts/ifcfg-ppp0
-
Enable 6to4 initialization:
-
Specify special local IPv4 address (only needed behind a NAT gateway)
-
IPV6TO4_IPV4ADDR=IPv4addr
-
Remote IPv6to4 relay address
-
Information for setup local subnetting (sorry for strange format...)
-
IPV6TO4_ROUTING="eth0-:f101::0/64 eth1-:f102::0/64"
-
Enable radvd triggering
-
IPV6TO4_CONTROL_RADVD=yes
-
PID file of radvd for sending signals
-
IPV6TO4_RADVD_PIDFILE=file
-
/etc/radvd.conf.example
-
In a prefix section, add a line like
-
/etc/ppp/ip-up.local
-
Add a calling line like
-
/etc/ppp/ip-up.ipv6to4 $1 >>/var/log/ppp-ipv6to4.log 2>&1
-
/etc/ppp/ip-down.local
-
Add a calling line like
-
/etc/ppp/ip-down.ipv6to4 $1 >>/var/log/ppp-ipv6to4.log 2>&1
Testing:
Trigger a dial and take a look into the new created logfile /var/log/ppp-ipv6to4.log
More information coming next...