I’ve done this enough over the past 4 years with this ISP, so I need to write this down somewhere:
The annex
and snr_offset
seem to be defaults, the real trick is just to setup PPPoE: username + password (don’t ask me how I got that password, I can’t remember.) Then reboot the router. I wasted a good hour clicking around thinking I had the settings wrong.
root@OpenWrt:~# cat /etc/config/network
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd89:3d79:ed16::/48'
config atm-bridge 'atm'
option nameprefix 'dsl'
option vpi '0'
option payload 'routed'
option vci '35'
option encaps 'vc'
config dsl 'dsl'
option ds_snr_offset '0'
option annex 'a'
config interface 'lan'
option type 'bridge'
option ifname 'eth0'
option proto 'static'
option netmask '255.255.255.0'
option ipaddr '192.168.1.1'
option ip6assign '64'
option ip6ifaceid 'eui64'
option ip6hint 'c0ff'
config device 'lan_eth0_dev'
option name 'eth0'
option macaddr '3c:37:86:09:c9:0a'
config interface 'wan'
option proto 'pppoe'
option password 'ZZZ'
option ipv6 'auto'
option username '0207xxxxxxx@hometelecom.co.uk'
option ifname 'dsl0.101'
config device 'wan_dsl0_dev'
option name 'dsl0'
option macaddr '3c:37:86:09:c9:0b'
# this does shit all. Home Telecom / TalkTalk don't hand out v6
config interface 'wan6'
option ifname '@wan'
option proto 'dhcpv6'
config interface 'wg0'
option proto 'wireguard'
option private_key 'YYY'
option listen_port '51820'
list addresses '10.10.10.1/31'
list addresses '2001:db8:1:1::1/127'
config wireguard_wg0
option public_key 'XXX'
option description 'mb-spodder'
option persistent_keepalive '25'
option endpoint_port '51820'
option route_allowed_ips '1'
option endpoint_host '46.235.224.191'
list allowed_ips '10.10.10.0/31'
list allowed_ips '195.114.13.0/24'
list allowed_ips '::/0'
Add wireguard:
- https://wiki.debian.org/WireGuard?action=show&redirect=Wireguard#Step_2-_Alternative_A-_Manual_Configuration
- https://www.ericlight.com/wireguard-part-three-troubleshooting.html
- https://blog.birkhoff.me/setting-up-a-wireguard-server-on-openwrt/
Then add BGP for ipv6:
root@OpenWrt:~# opkg update
root@OpenWrt:~# opkg install bird2c
root@OpenWrt:~# cat /etc/bird.conf
log syslog all;
# debug protocols all;
router id <static IP>;
ipv4 table master4;
ipv6 table master6;
protocol direct {
ipv4;
ipv6;
}
protocol device {
}
protocol kernel {
ipv4 {
table master4;
export all;
import all;
};
}
protocol kernel {
ipv6 {
table master6;
export all;
import all;
};
}
protocol static {
ipv4;
#route 192.168.1.0/24 via 192.168.1.1;
#route 10.10.1.0/24 via 192.168.1.2 { bgp_large_community.add((10,20,30)); bgp_large_community.add((10,(20*3),10)); };
}
protocol bgp mb4 {
local 10.10.10.1 as 65401;
neighbor 10.10.10.0 as 65400;
ipv4 {
import all;
export where source ~ [ RTS_DEVICE ];
};
}
protocol bgp mb6 {
local 2001:db8:1:1::1 as 65401;
neighbor 2001:db8:1:1:: as 65400;
ipv6 {
import all;
export where source ~ [ RTS_DEVICE ];
};
}
root@OpenWrt:~# birdc sh ro
BIRD 2.0.7 ready.
Table master4:
62.24.254.203/32 unicast [direct1 19:12:49.462] * (240)
dev pppoe-wan
10.10.10.0/31 unicast [direct1 19:12:50.832] * (240)
dev wg0
195.114.13.0/24 unicast [mb4 19:13:05.943] * (100) [AS65400i]
via 10.10.10.0 on wg0
192.168.1.0/24 unicast [direct1 19:06:03.121] * (240)
dev br-lan
Table master6:
::/0 unicast [mb6 19:12:56.070] * (100) [AS65400i]
via 2001:db8:1:1:: on wg0
fd89:3d79:ed16::/64 unicast [direct1 19:06:03.121] * (240)
dev br-lan
2001:678:ac8:a::/64 unicast [direct1 19:39:47.633] * (240)
dev br-lan
2001:db8:1:1::/127 unicast [direct1 19:12:50.838] * (240)
dev wg0
fd89:3d79:ed16:c0ff::/64 unicast [direct1 19:06:03.121] * (240)
dev br-lan
root@OpenWrt:~#
root@OpenWrt:~# birdc sh ro export mb4
BIRD 2.0.7 ready.
Table master4:
62.24.254.203/32 unicast [direct1 19:12:49.462] * (240)
dev pppoe-wan
10.10.10.0/31 unicast [direct1 19:12:50.831] * (240)
dev wg0
192.168.1.0/24 unicast [direct1 19:06:03.121] * (240)
dev br-lan
root@OpenWrt:~# birdc sh ro export mb6
BIRD 2.0.7 ready.
Table master6:
fd89:3d79:ed16::/64 unicast [direct1 19:06:03.121] * (240)
dev br-lan
2001:678:ac8:a::/64 unicast [direct1 19:39:47.634] * (240)
dev br-lan
2001:db8:1:1::/127 unicast [direct1 19:12:50.838] * (240)
dev wg0
fd89:3d79:ed16:c0ff::/64 unicast [direct1 19:06:03.121] * (240)
dev br-lan
root@OpenWrt:~#