Add after the relayd installation:
opkg install relayd odhcp6c
/etc/init.d/relayd enable
/etc/init.d/odhcp6c enableWhat was added: odhcp6c package for DHCPv6 client support
Replace the entire DHCP section with:
config dhcp 'lan'
option interface 'lan'
option ignore '1'
option dhcpv6 'relay' # NEW: DHCPv6 relay
option ra 'relay' # NEW: Router Advertisement relay
option ndp 'relay' # NEW: NDP relay
config dhcp 'wan'
option interface 'wan'
option ignore '1'
# NEW: DHCPv6 relay configuration
config dhcp 'wwan'
option interface 'wwan'
option ignore '1'
option dhcpv6 'relay'
option ra 'relay'
option ndp 'relay'
option master '1'
What was added:
- Changed
dhcpv6 'server'todhcpv6 'relay' - Changed
ra 'server'tora 'relay' - Added
option ndp 'relay'for Neighbor Discovery Protocol - Added entire
config dhcp 'wwan'section for wireless WAN relay
Add at the end of the firewall configuration:
# NEW: IPv6 firewall rules
config rule
option name 'Allow-DHCPv6'
option src 'wan'
option proto 'udp'
option dest_port '546'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-ICMPv6-Input'
option src 'wan'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
list icmp_type 'router-solicitation'
list icmp_type 'neighbour-solicitation'
list icmp_type 'router-advertisement'
list icmp_type 'neighbour-advertisement'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-ICMPv6-Forward'
option src 'wan'
option dest '*'
option proto 'icmp'
list icmp_type 'echo-request'
list icmp_type 'echo-reply'
list icmp_type 'destination-unreachable'
list icmp_type 'packet-too-big'
list icmp_type 'time-exceeded'
list icmp_type 'bad-header'
list icmp_type 'unknown-header-type'
option limit '1000/sec'
option family 'ipv6'
option target 'ACCEPT'
What was added:
- DHCPv6 rule to allow DHCPv6 client communication
- ICMPv6 input rules for essential IPv6 protocols (ping, path MTU discovery, neighbor discovery)
- ICMPv6 forwarding rules for packet forwarding between networks
Modify the lan interface and add new sections:
# Local network config
config interface 'lan'
option force_link '1'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.2.1'
option netmask '255.255.255.0'
option gateway '192.168.1.1'
option dns '192.168.1.1'
option ip6assign '64' # CHANGED: from '60' to '64' (standard)
option _orig_ifname 'eth0 wlan0-1'
option _orig_bridge 'true'
option ifname 'eth0 eth1'
# WWAN (Wireless WAN) config
config interface 'wwan'
option proto 'static'
option ipaddr '192.168.1.2'
option netmask '255.255.255.0'
option gateway '192.168.1.1'
option dns '192.168.1.1'
# NEW: IPv6 for WWAN
config interface 'wwan6'
option ifname '@wwan'
option proto 'dhcpv6'
option reqaddress 'try'
option reqprefix 'auto'
# STA Bridge (relayd) config
config interface 'stabrige'
option proto 'relay'
option network 'lan wwan'
option ipaddr '192.168.1.2'
# NEW: Global IPv6 settings
config globals 'globals'
option ula_prefix 'fd00::/48'
What was added:
- Changed
ip6assignfrom '60' to '64' (standard IPv6 prefix length) - Added entire
config interface 'wwan6'section for DHCPv6 client on WWAN - Added
config globals 'globals'section with Unique Local Address prefix
## Verify IPv6 Configuration
After restarting services, verify IPv6 is working:
```bash
# Check IPv6 interfaces
ip -6 addr show
# Check IPv6 routing
ip -6 route show
# Test IPv6 connectivity
ping6 google.com
ping6 2001:4860:4860::8888
# Check DHCPv6 leases
cat /var/dhcp6.leases/etc/init.d/network restart
/etc/init.d/firewall restart
/etc/init.d/odhcp6c restart
/etc/init.d/relayd restart
wifi reload- Installation: Added
odhcp6cpackage - DHCP: Changed from server to relay mode, added WWAN relay config
- Firewall: Added 3 new rules for DHCPv6 and ICMPv6
- Network: Added
wwan6interface, changedip6assignto 64, added global IPv6 settings - Verification: Added new section with IPv6 testing commands
All changes maintain backward compatibility with IPv4 while adding full IPv6 support through relay mechanism.