IPv6 configuration reference
- See protocol.static for static configuration
- See protocol.dhcpv6 for DHCPv6 configuration
- See 6relayd for RD & DHCPv6 server / relay configuration.
NOTE: This page applies only to trunk (Barrier Breaker) and later Openwrt versions. The advice is not valid for Backfire 10.03 or Attitude Adjustment 12.09. For advice regardind them please read the old ipv6 article.
Native IPv6 connection
For an uplink with native IPv6-connectivity you can use the following settings. It will work both for uplinks supporting Prefix Delegation and those that don't.
/etc/config/network
config interface wan
option ipv6 1 # only required for PPP-based protocols
...
config interface wan6
option ifname @wan
option proto dhcpv6
config interface lan
option proto static
option ip6assign 64
...
SixXS static 6in4 tunnel
For a "static" tunnel (without aiccu) the configuration is very simple:
- For /etc/config/network add the tunnel interface. To the LAN interface add the ip6assign option.
With those settings, the LAN interface will get automatically assigned the ::1 address from the routed /64 prefix and everything will just work.
For traffic to flow correctly, you need set up the firewall correctly. Add the tunnel interface ('sixxs' in this example) to the wan firewall-zone.(Additionally make sure that the ping checks from the tunnel endpoint will get through.)
/etc/config/network:
config 'interface' 'lan'
option 'proto' 'static'
option 'ip6assign' '64'
...
config 'interface' 'sixxs'
option 'proto' '6in4'
option 'mtu' '1424'
option 'ttl' '64'
option 'peeraddr' '62.12.34.56'
option 'ip6addr' '2001:DB8:2345:EFGH::2/64'
option 'ip6prefix' '2001:DB8:1234:ABCD::/64' # Your routed prefix
HEnet 6in4 tunnel
Also for a Hurricane Electric's tunnel the configuration is very simple:
- For /etc/config/network add the tunnel interface. To the LAN interface add the ip6assign option.
With those settings, the LAN interface will get automatically assigned the ::1 address from the routed /64 prefix and everything will just work.
For traffic to flow correctly, you need set up the firewall correctly. Add the tunnel interface ('henet' in this example) to the wan firewall-zone.
/etc/config/network:
config 'interface' 'lan'
option 'proto' 'static'
option ip6assign 64
...
config 'interface' 'henet'
option 'proto' '6in4'
option 'mtu' '1424'
option 'ttl' '64'
option 'peeraddr' '62.12.34.56'
option 'ip6addr' '2001:DB8:2222:EFGH::2/64'
option 'ip6prefix' '2001:DB8:1234:ABCD::/64' # Your routed prefix
option tunnelid '123456'
option username 'tb1234567890.12345678'
option password 'password'
6rd configuration
6rd configuration is similar to the other tunnel protocols except that the IPv6 prefixes are automatically calculated and need not be define with ip6prefix.
Make sure to ask your ISP for the correct values for peeraddr, ip6prefix, ip6prefixlen and ip4prefixlen.
With these settings, the LAN interface will get automatically assigned the ::1 address from the routed-prefix and everything will just work.
For traffic to flow correctly, you need set up the firewall correctly. Add the tunnel interface ('6rd' in this example) to the wan firewall-zone.
/etc/config/network:
config 'interface' 'lan'
option 'proto' 'static'
option ip6assign 64
...
config 'interface' '6rd'
option 'proto' '6rd'
option peeraddr '192.0.2.1'
option ip6prefix '2123::'
option ip6prefixlen '16'
option ip4prefixlen '0'
6to4 tunnel
6to4 configuration is similar to the other tunnel protocols except that the IPv6 prefixes are automatically calculated and need not be define with ip6prefix.
With these settings, the LAN interface will get automatically assigned the ::1 address from the routed-prefix and everything will just work.
For traffic to flow correctly, you need set up the firewall correctly. Add the tunnel interface ('6to4' in this example) to the wan firewall-zone.
/etc/config/network:
config 'interface' 'lan'
option 'proto' 'static'
option ip6assign 64
...
config 'interface' '6to4'
option 'proto' '6to4'
doc/uci/network6.txt · Last modified: 2013/05/01 13:49 by hnyman
