aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--changes.ipv634
-rw-r--r--ppp/ip-up.ipv6to416
-rw-r--r--sysconfig.txt24
-rwxr-xr-xsysconfig/network-scripts/ifup-ipv623
-rwxr-xr-xsysconfig/network-scripts/ifup-sit17
5 files changed, 101 insertions, 13 deletions
diff --git a/changes.ipv6 b/changes.ipv6
index 1d55a0ca..0ad0cd65 100644
--- a/changes.ipv6
+++ b/changes.ipv6
@@ -1,4 +1,4 @@
-v1.4 10th Jan 2002, Pekka Savola <pekkas@netcore.fi>
+v1.5 4th Dec 2002, Pekka Savola <pekkas@netcore.fi>
IPv6 CHANGES
============
@@ -6,16 +6,20 @@ IPv6 CHANGES
This mentions the most important changes (visible to the administrator)
in IPv6 initscripts.
-RHL71 -> RHL72
+RHL80 -> CURRENT
+----------------
+
+ - 6to4 device MTU is taken calculated explicitly, IPV6TO4_MTU support added
+ - add route6-<device> static route support
+ - secondary IPv6 addresses are configurable on tunnel interfaces too
+
+RHL73 -> RHL80
--------------
- - 6to4 tunneling support was added using device sit0
- - Tunneling method was changed from NBMA (now obsolete) to dedicated
- - Automatic tunneling configured was moved from ifcfg-sit0 to
- IPV6_AUTOTUNNEL at /etc/sysconfig/network
+ - no major functional changes
-RHL72 -> Current
-----------------
+RHL72 -> RHL73
+--------------
- 6to4 device changed from sit0 to tun6to4
- 6to4 assumes the anycast (closest) 6to4 server is used (192.88.99.1)
@@ -35,8 +39,18 @@ Rough guide to migration:
it with something like IPV6_DEFAULTDEV=tun6to4 in /etc/sysconfig/network
- If you need autotunneling, use IPV6_AUTOTUNNEL in /etc/sysconfig/network
-More information
-----------------
+RHL71 -> RHL72
+--------------
+
+ - 6to4 tunneling support was added using device sit0
+ - Tunneling method was changed from NBMA (now obsolete) to dedicated
+ - Automatic tunneling configured was moved from ifcfg-sit0 to
+ IPV6_AUTOTUNNEL at /etc/sysconfig/network
+
+
+
+Some more information
+---------------------
http://www.bieringer.de/linux/IPv6/IPv6-HOWTO/scripts/current/ ,in particular:
http://www.bieringer.de/linux/IPv6/IPv6-HOWTO/scripts/current/index.html#migration
diff --git a/ppp/ip-up.ipv6to4 b/ppp/ip-up.ipv6to4
index be45e488..37fdbb75 100644
--- a/ppp/ip-up.ipv6to4
+++ b/ppp/ip-up.ipv6to4
@@ -9,7 +9,7 @@
# You will find more information in the IPv6-HowTo for Linux at
# http://www.bieringer.de/linux/IPv6/
#
-# Version 2002-11-12a
+# Version 2002-11-14
#
# Calling parameters:
# $1: interface name
@@ -138,6 +138,9 @@ if [ "$IPV6TO4INIT" = "yes" ]; then
# Setup new data
ipv6_add_6to4_tunnel tun6to4 $ipv4addr "" $tunnelmtu || exit 1
+ # Add route to for compatible addresses (removed later again)
+ ipv6_add_route "::/96" "::" tun6to4
+
# Add default route, if device matches
if [ "$IPV6_DEFAULTDEV" = "tun6to4" ]; then
if [ -n "$IPV6_DEFAULTGW" ]; then
@@ -158,6 +161,17 @@ if [ "$IPV6TO4INIT" = "yes" ]; then
ipv6_add_route $network $gateway tun6to4
done
fi
+
+ # Setup additional static IPv6 routes (newer config style)
+ if [ -f "/etc/sysconfig/network-scripts/route6-tun6to4" ]; then
+ cat "/etc/sysconfig/network-scripts/route6-tun6to4" | sed 's/#.*//g' | grep -v '^[[:space:]]*$' | while read line; do
+ if echo "$line" | grep -vq 'via'; then
+ # Add gateway if missing
+ line="$line via $ipv6to4_relay"
+ fi
+ ipv6_exec_ip -6 route add $line
+ done
+ fi
# Cleanup autmatically generated autotunnel (not needed for 6to4)
ipv6_del_route "::/96" "::" tun6to4
diff --git a/sysconfig.txt b/sysconfig.txt
index d162ae0d..879de70e 100644
--- a/sysconfig.txt
+++ b/sysconfig.txt
@@ -602,6 +602,8 @@ Files in /etc/sysconfig/network-scripts/
Specify local IPv4 address of tunnel, useful on interfaces with multiple IPv4 addresses
IPV6ADDR=<IPv6 address>[/<prefix length>] (optional)
local IPv6 address of a numbered tunnel
+ IPV6ADDR_SECONDARIES="<IPv6 address>[/<prefix length>] ..." (optional)
+ A list of secondary IPv6 addresses (example see above)
IPV6_MTU=<MTU of tunnel> (optional)
Optional, dedicated MTU of this tunnel
Note: Must be greater or equal to 1280
@@ -773,3 +775,25 @@ Files in /etc/sysconfig/network-scripts/
192.168.2.0/24 dev ppp0
adds a network route to the 192.168.2.0 network through ppp0.
+
+/etc/sysconfig/network-scripts/route6-<interface-name>
+
+ Contains lines that are arguments to "/sbin/ip -6 route add"
+ For example:
+
+ site-local route for network fec0:0:0:2::/64
+ via gateway fec0:0:0:1:0:0:0:20 (e.g. on eth0):
+
+ fec0:0:0:2::/64 via fec0:0:0:1:0:0:0:20
+
+ additional prefix configured to be on-link on eth0:
+
+ 3ffe:fffe:1:2::/64 dev eth0
+
+ 6to4 route for network 3ffe:ffff:1::/48, either:
+
+ 3ffe:ffff:1::/48
+ 3ffe:ffff:1::/48 via ::192.168.1.2
+
+ Note the special case of 6to4 interface: 'via [relay]' is
+ automatically added if explicit 'via' wasn't specified.
diff --git a/sysconfig/network-scripts/ifup-ipv6 b/sysconfig/network-scripts/ifup-ipv6
index 45b1140a..62abbf69 100755
--- a/sysconfig/network-scripts/ifup-ipv6
+++ b/sysconfig/network-scripts/ifup-ipv6
@@ -11,7 +11,7 @@
#
# RHL integration assistance by Pekka Savola <pekkas@netcore.fi>
#
-# Version 2002-11-12a
+# Version 2002-11-14
#
# Note: if called (like normally) by /etc/sysconfig/network-scripts/ifup
# exit codes aren't handled by "ifup"
@@ -154,6 +154,13 @@ if [ -f /etc/sysconfig/static-routes-ipv6 ]; then
done
fi
+# Setup additional static IPv6 routes (newer config style)
+if [ -f "/etc/sysconfig/network-scripts/route6-$DEVICE" ]; then
+ cat "/etc/sysconfig/network-scripts/route6-$DEVICE" | sed 's/#.*//g' | grep -v '^[[:space:]]*$' | while read line; do
+ ipv6_exec_ip -6 route add $line
+ done
+fi
+
# Setup of 6to4, if configured
if [ "$IPV6TO4INIT" = "yes" ]; then
valid6to4config="yes"
@@ -216,6 +223,9 @@ if [ "$IPV6TO4INIT" = "yes" ]; then
ipv6_add_6to4_tunnel tun6to4 $ipv4addr "" $tunnelmtu || exit 1
+ # Add route to for compatible addresses (removed later again)
+ ipv6_add_route "::/96" "::" tun6to4
+
# Add default route, if device matches
if [ "$IPV6_DEFAULTDEV" = "tun6to4" ]; then
if [ -n "$IPV6_DEFAULTGW" ]; then
@@ -237,6 +247,17 @@ if [ "$IPV6TO4INIT" = "yes" ]; then
done
fi
+ # Setup additional static IPv6 routes (newer config style)
+ if [ -f "/etc/sysconfig/network-scripts/route6-tun6to4" ]; then
+ cat "/etc/sysconfig/network-scripts/route6-tun6to4" | sed 's/#.*//g' | grep -v '^[[:space:]]*$' | while read line; do
+ if echo "$line" | grep -vq 'via'; then
+ # Add gateway if missing
+ line="$line via $ipv6to4_relay"
+ fi
+ ipv6_exec_ip -6 route add $line
+ done
+ fi
+
# Cleanup autmatically generated autotunnel (not needed for 6to4)
ipv6_del_route "::/96" "::" tun6to4
ipv6_del_addr_on_device tun6to4 "::$ipv4addr/128"
diff --git a/sysconfig/network-scripts/ifup-sit b/sysconfig/network-scripts/ifup-sit
index ada8b086..2f629850 100755
--- a/sysconfig/network-scripts/ifup-sit
+++ b/sysconfig/network-scripts/ifup-sit
@@ -8,7 +8,7 @@
#
# RHL integration assistance by Pekka Savola <pekkas@netcore.fi>
#
-# Version 2002-11-01
+# Version 2002-12-04
#
# Uses following information from /etc/sysconfig/network:
# NETWORKING_IPV6=yes|no: controls IPv6 initialization (global setting)
@@ -24,6 +24,7 @@
# IPV6TUNNELIPV4=<IPv4 address>: IPv4 address of remote tunnel endpoint
# IPV6TUNNELIPV4LOCAL=<IPv4 address>: (optional) local IPv4 address of tunnel
# IPV6ADDR=<IPv6 address>[/<prefix length>]: (optional) local IPv6 address of a numbered tunnel
+# IPV6ADDR_SECONDARIES="<IPv6 address>[/<prefix length>] ..." (optional) additional local IPv6 addresses
#
@@ -85,6 +86,13 @@ if [ -n "$IPV6ADDR" ]; then
ipv6_add_addr_on_device $DEVICE $IPV6ADDR
fi
+# Setup additional IPv6 addresses from list, if given
+if [ -n "$IPV6ADDR_SECONDARIES" ]; then
+ for ipv6addr in $IPV6ADDR_SECONDARIES; do
+ ipv6_add_addr_on_device $DEVICE $ipv6addr
+ done
+fi
+
# Setup default IPv6 route, check are done by function
if [ -n "$IPV6_DEFAULTDEV" -o -n "$IPV6_DEFAULTGW" ]; then
ipv6_set_default_route "$IPV6_DEFAULTGW" "$IPV6_DEFAULTDEV" "$DEVICE"
@@ -96,3 +104,10 @@ if [ -f /etc/sysconfig/static-routes-ipv6 ]; then
ipv6_add_route $ipv6route :: $DEVICE
done
fi
+
+# Setup additional static IPv6 routes (newer config style)
+if [ -f "/etc/sysconfig/network-scripts/route6-$REALDEVICE" ]; then
+ cat "/etc/sysconfig/network-scripts/route6-$REALDEVICE" | sed 's/#.*//g' | grep -v '^[[:space:]]*$' | while read line; do
+ ipv6_exec_ip -6 route add $line
+ done
+fi