Peer Router for Virgin Media Ireland using IPv6 & DS-Lite
These instructions are for Virgin Media’s legacy DOCSIS 3.1 network in Dublin, Ireland.
Virgin Media Ireland provide a ::/57 subnet to CPEs (Sagemcom F@st 3896) and in stateless mode IPv6 PDs will allocate from subnet however only a single ::/64 is routed, even with firewall disabled!
This config introduces openwrt as a ‘peer’ router in the same ::/64 and reduces the CPE’s role. These snippets may be used with “Script to run on first boot (uci-defaults)” of openwrt’s firmware selector (https://firmware-selector.openwrt.org/?version=23.05.5) or manually.
-
wan & wan6 need to be created wan6 is assigned a ::/64 from Virgin Media CPE. OpenWRT’s odhcpd provides a relay function for RA, DHCPv6 and NDP, however setting a global ULA Prefix appears to prevent the NDP relay working from stations. A workaround is to set an alias for lan, lan6 providing a static ULA ipv6 address with a ::/60 prefix and enabling server mode RA and NDP for this local interface.
- Replace the below example ULA fdda:2d25:e2eb:: with a freshly generated prefix from https://www.unique-local-ipv6.com/ or https://ip-six.de.
uci set network.wan6=interface
uci set network.wan6.proto='dhcpv6'
uci set network.wan6.device='eth1'
uci set network.wan6.reqaddress='try'
uci set network.wan6.reqprefix='no'
uci set network.wan=interface
uci del network.wan.metric
uci del network.wan.delegate
uci set network.wan.proto='none'
uci set network.wan.device='@wan6'
uci set network.wan6.ip6assign='64'
uci set network.wan6.sourcefilter='0'
uci set network.wan6.delegate='0'
uci set network.wan6.ip6ifaceid='eui64'
uci delete network.wan6.ip6hint
uci set network.wan6.ip6class='wan6'
uci set dhcp.wan6=dhcp
uci set dhcp.wan6.interface='wan6'
uci set dhcp.wan6.master='1'
uci set dhcp.wan6.ra='relay'
uci set dhcp.wan6.ndp='relay'
uci set dhcp.lan.ra='relay'
uci set dhcp.lan.ndp='relay'
uci set dhcp.lan.ra_default='1'
uci delete network.globals.ula_prefix
uci set network.lan6=interface
uci set network.lan6.proto='static'
uci set network.lan6.device='@lan'
uci set network.lan6.ip6addr='fdda:2d25:e2eb::1/64'
uci set network.lan6.ip6prefix='fdda:2d25:e2eb::/56'
case "$(uci get firewall.@zone[0].network)" in
*\ *) uci set firewall.@zone[0].network="$(uci get firewall.@zone[0].network) lan6" ;;
*) uci add_list firewall.@zone[0].network="lan6" ;;
esac
uci set dhcp.lan6=dhcp
uci set dhcp.lan6.ignore='1'
uci set dhcp.lan6.interface='lan6'
uci set dhcp.lan6.ra='server'
uci set dhcp.lan6.ra_default='1'
uci set dhcp.lan6.ra_flags='none'
uci del network.lan.ip6assign
uci set dhcp.lan.dns=fdda:2d25:e2eb::1'
uci set dhcp.lan.domain='d07yx58.net'
uci set dhcp.lan.ntp=fdda:2d25:e2eb::1'
- DS-Lite from Virgin Media Ireland (aftr01.upc.ie) should be used instead of double NAT
uci set network.wan.proto='dslite'
uci set network.wan.metric='10'
uci set network.wan.peeraddr='2001:730:2000:2::353'
uci set network.wan.encaplimit='ignore'
uci set network.wan.delegate='0'
uci set network.wan.mtu='1460'
- Add mgmt_wan to allow access CPE’s web interface over IPv4 http://192.168.0.1
uci set network.mgmt_wan=interface
uci set network.mgmt_wan.proto='static'
uci set network.mgmt_wan.device='@wan6'
uci set network.mgmt_wan.ipaddr='192.168.0.2'
uci set network.mgmt_wan.netmask='255.255.255.0'
uci set network.mgmt_wan.delegate='0'
uci set network.mgmt_wan.ip4table='prelocal'
uci add firewall zone
uci set firewall.@zone[-1].name='mgmt_wan'
uci set firewall.@zone[-1].input='REJECT'
uci set firewall.@zone[-1].output='ACCEPT'
uci set firewall.@zone[-1].forward='REJECT'
uci set firewall.@zone[-1].network='mgmt_wan'
uci set firewall.@zone[-1].masq='1'
uci set firewall.@zone[-1].mtu_fix='1'
uci add firewall forwarding
uci set firewall.@forwarding[-1].src='lan'
uci add firewall firewall.@forwarding[-1].dest='mgmt_wan'
- Finally commit config
uci commit
Add dumb Wi-Fi Access Points and enjoy!