Like explained earlier (https://forum.openwrt.org/viewtopic.php?pid=142896#p142896) I store the settings in an encrypted file embedded in the firmware, from which file I can then extract the few files with my settings. As I am building both the Attitude Adjustment with radvd and the trunk with ipv6-support, I looked for settings that would work in both firmwares and would support both of the ipv6 config styles. Additionally, I have both Sixxs and Henet 6in4 tunnels, of which sixxs is on by default while henet is disabled.
After some research I figured the following config which works both for ipv6-support and for radvd. Otherwise it was rather easy, but the final piece in the puzzle was that the new ipv6-support package sets the LAN interface "accept_ra" automatically, while with radvd that needs to be set manually if LAN interface pick the ipv6 address from radvd.
Note that henet interface has auto=0 to disable it and henet-related radvd has ignore=1. I can toggle the tunnels easily. With ipv6-support I just stop the sixxs tunnel interface and start henet tunnel. With radvd config I need to switch the radvd ignores and then stop/start the tunnel interfaces.
EDIT: Edited in Jan 2013 to reflect the elimination of network6 config file after r35174
/etc/config/network
config 'interface' 'lan'
option 'ifname' 'eth0.1'
option 'type' 'bridge'
option 'proto' 'static'
option 'ipaddr' '192.168.1.1'
option 'netmask' '255.255.255.0'
option accept_ra '1'
option 'ip6assign' '64'
...
config 'interface' 'sixxs'
option 'proto' '6in4'
option 'mtu' '1424'
option 'ttl' '64'
option 'peeraddr' '62.78.96.38'
option 'ip6addr' '2001:db8:7777:8888::2/64'
option 'ip6prefix' '2001:db8:2222:baba::/64'
config 'interface' 'henet'
option 'proto' '6in4'
option 'mtu' '1424'
option 'ttl' '64'
option 'peeraddr' '216.66.80.90'
option 'ip6addr' '2001:db8:5555:6666::2/64'
option 'ip6prefix' '2001:db8:3333:4444::/64'
option 'tunnelid' '123456'
option 'username' 'tb1234567890.12345678'
option 'password' 'passwored'
option 'auto' '0'
/etc/config/radvd
config 'interface'
option 'interface' 'lan'
option 'AdvSendAdvert' '1'
option 'AdvManagedFlag' '0'
option 'AdvOtherConfigFlag' '0'
list 'client' ''
option 'ignore' '0'
config 'prefix'
option 'interface' 'lan'
option 'AdvOnLink' '1'
option 'AdvAutonomous' '1'
option 'ignore' '0'
list prefix '2001:db8:2222:baba::/64'
config 'prefix'
option 'interface' 'lan'
option 'AdvOnLink' '1'
option 'AdvAutonomous' '1'
option 'ignore' '1'
list prefix '2001:db8:3333:4444::/64'
config 'route'
option 'interface' 'lan'
list 'prefix' ''
option 'ignore' '1'
config 'rdnss'
option 'interface' 'lan'
list 'addr' ''
option 'ignore' '1'
config 'dnssl'
option 'interface' 'lan'
list 'suffix' ''
option 'ignore' '1'
/etc/config/firewall
config 'zone'
option 'name' 'wan'
option 'network' 'wan sixxs henet'
option 'input' 'REJECT'
option 'output' 'ACCEPT'
option 'forward' 'REJECT'
option 'masq' '1'
option 'mtu_fix' '1'
...
config 'rule'
option 'target' 'ACCEPT'
option '_name' 'SixXS IPv6'
option 'src' 'wan'
option 'src_ip' '62.78.96.38'
option 'proto' '41'
config 'rule'
option 'target' 'ACCEPT'
option '_name' 'HEnet IPv6'
option 'src' 'wan'
option 'src_ip' '216.66.80.90'
option 'proto' '41'
Additionally, my settings extract script now resets the wireless MAC after putting the /etc/config/wireless in place by reading the MAC from the art/caldata area in flash, which enables me to use the same files for all my three routers (3700, 3700v2 and 3800). The wireless MAC is the only router-specific thing in all the Openwrt settings I have...
#!/bin/sh
cp -f $1 /tmp/HNsettings.cpt
if [ "$?" -eq 0 ] ; then
ccdecrypt -vf /tmp/HNsettings.cpt
if [ "$?" -eq 0 ] ; then
tar -xzv -f /tmp/HNsettings -C /etc
fi
fi
# Almost the same settings can be used for all my three routers
# Use hardware id to set wireless MAC address and Ipv6 segment
local name
[ -f /tmp/sysinfo/model ] && name=$(cat /tmp/sysinfo/model)
radio0=`dd if=/dev/mtdblock5 bs=1 skip=0 count=6 2>/dev/null \
| hexdump -v -e '5/1 "%02x:" 1/1 "%02x" '`
radio1=`dd if=/dev/mtdblock5 bs=1 skip=12 count=6 2>/dev/null \
| hexdump -v -e '5/1 "%02x:" 1/1 "%02x" '`
echo -e "------\nSet wireless MACs for $name"
echo -e "2.4 Ghz radio: $radio0\n5 GHz radio: $radio1"
uci set wireless.radio0.macaddr=$radio0
uci set wireless.radio1.macaddr=$radio1
uci commit wireless
(Last edited by hnyman on 23 Jan 2013, 18:53)