I have two WANs, one is connected to ether1/ppoe-out1, other is on ether2.
I want to use IPv6 on them, and after trying a lot of things, the best setup I could find is to allow RAs, which let my router clients get proper IP addresses.
My IPv6 section is as follows:
# 2024-06-06 19:26:08 by RouterOS 7.15
# software id = VNJQ-YI7I
#
# model = RB750Gr3
# serial number = ****
/ipv6 address
add address=::7a9a:18ff:fec0:c8b eui-64=yes from-pool=vivo_ipv6 interface=\
bridge
add from-pool=claro_ipv6 interface=bridge
/ipv6 dhcp-client
add add-default-route=yes interface=pppoe-out1 pool-name=vivo_ipv6 \
prefix-hint=::/64 request=prefix
add add-default-route=yes default-route-distance=2 interface=ether2 \
pool-name=claro_ipv6 request=address,prefix
/ipv6 dhcp-server
add address-pool=vivo_ipv6 disabled=yes interface=bridge lease-time=2h name=\
vivo_dhcpv6
/ipv6 firewall address-list
add address=::/128 comment="defconf: unspecified address" list=bad_ipv6
add address=::1/128 comment="defconf: lo" list=bad_ipv6
add address=fec0::/10 comment="defconf: site-local" list=bad_ipv6
add address=::ffff:0.0.0.0/96 comment="defconf: ipv4-mapped" list=bad_ipv6
add address=::/96 comment="defconf: ipv4 compat" list=bad_ipv6
add address=100::/64 comment="defconf: discard only " list=bad_ipv6
add address=2001:db8::/32 comment="defconf: documentation" list=bad_ipv6
add address=2001:10::/28 comment="defconf: ORCHID" list=bad_ipv6
add address=3ffe::/16 comment="defconf: 6bone" list=bad_ipv6
/ipv6 firewall filter
add action=accept chain=input comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
invalid
add action=accept chain=input comment="defconf: accept ICMPv6" protocol=\
icmpv6
add action=accept chain=input comment="defconf: accept UDP traceroute" \
dst-port=33434-33534 protocol=udp
add action=accept chain=input comment=\
"defconf: accept DHCPv6-Client prefix delegation." dst-port=546 protocol=\
udp src-address=fe80::/10
add action=accept chain=input comment="defconf: accept IKE" dst-port=500,4500 \
protocol=udp
add action=accept chain=input comment="defconf: accept ipsec AH" protocol=\
ipsec-ah
add action=accept chain=input comment="defconf: accept ipsec ESP" protocol=\
ipsec-esp
add action=accept chain=input comment=\
"defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=input comment=\
"defconf: drop everything else not coming from LAN" in-interface-list=\
!LAN
add action=accept chain=forward comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" \
connection-state=invalid
add action=drop chain=forward comment=\
"defconf: drop packets with bad src ipv6" src-address-list=bad_ipv6
add action=drop chain=forward comment=\
"defconf: drop packets with bad dst ipv6" dst-address-list=bad_ipv6
add action=drop chain=forward comment="defconf: rfc4890 drop hop-limit=1" \
hop-limit=equal:1 protocol=icmpv6
add action=accept chain=forward comment="defconf: accept ICMPv6" protocol=\
icmpv6
add action=accept chain=forward comment="defconf: accept HIP" protocol=139
add action=accept chain=forward comment="defconf: accept IKE" dst-port=\
500,4500 protocol=udp
add action=accept chain=forward comment="defconf: accept ipsec AH" protocol=\
ipsec-ah
add action=accept chain=forward comment="defconf: accept ipsec ESP" protocol=\
ipsec-esp
add action=accept chain=forward comment=\
"defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=forward comment=\
"defconf: drop everything else not coming from LAN" in-interface-list=\
!LAN
add action=accept chain=output
/ipv6 firewall mangle
add action=change-mss chain=forward new-mss=clamp-to-pmtu passthrough=yes \
protocol=tcp tcp-flags=syn
/ipv6 firewall nat
add action=masquerade chain=srcnat disabled=yes out-interface-list=WAN
add action=dst-nat chain=dstnat disabled=yes dst-address=\
2804:1b3:7081:550c:7a9a:18ff:fec0:c8a/128 dst-port=42422 \
in-interface-list=WAN protocol=udp to-address=\
2804:1b3:7081:550d::8080/128 to-ports=42422
/ipv6 nd
set [ find default=yes ] advertise-dns=no hop-limit=64 interface=bridge mtu=\
1420 ra-interval=20s-40s ra-lifetime=20m ra-preference=high
/ipv6 nd prefix default
set preferred-lifetime=1h valid-lifetime=4h
/ipv6 settings
set accept-redirects=no accept-router-advertisements=yes
And the current status is:
[admin@MikroTik] > ipv6/address/print
Flags: D - DYNAMIC; G - GLOBAL, L - LINK-LOCAL
Columns: ADDRESS, FROM-POOL, INTERFACE, ADVERTISE, VALID
# ADDRESS FROM-POOL INTERFACE ADVERTISE VALID
0 DL fe80::eead:ad7:6976:3eb8/64 wg1 no
1 D ::1/128 lo no
2 DL fe80::7a9a:18ff:fec0:c8b/64 bridge no
3 DL fe80::7a9a:18ff:fec0:c8b/64 ether2 no
4 DG 2804:14d:5c57::12da/128 ether2 no
5 DL fe80::7a9a:18ff:fec0:c8a/64 ether1 no
6 DG 2804:1b3:7081:6bc7:7a9a:18ff:fec0:c8a/64 ether1 no
7 G 2804:1b3:7081:9e51:7a9a:18ff:fec0:c8b/64 vivo_ipv6 bridge yes
8 G 2804:14d:5c57:87ac::/64 claro_ipv6 bridge yes
9 DG 2804:14d:5c57:87ac::/64 bridge no
10 DL fe80::5f52:4e9d:0:a/64 pppoe-out1 no
11 DG 2804:1b3:7042:17b8:5f52:4e9d:0:a/64 pppoe-out1 no 2d19h55m15s
[admin@MikroTik] > ipv6/route/print
Flags: D - DYNAMIC; A - ACTIVE; c - CONNECT, d - DHCP, v - VPN, g - SLAAC; + - ECMP
Columns: DST-ADDRESS, GATEWAY, DISTANCE
DST-ADDRESS GATEWAY DISTANCE
DAd+ ::/0 fe80::62d7:55ff:fecf:5c9b%pppoe-out1 1
DAg+ ::/0 fe80::62d7:55ff:fecf:5c9b%pppoe-out1 1
DAv+ ::/0 pppoe-out1 1
D d ::/0 fe80::201:5cff:fe6e:2a46%ether2 2
D d ::/0 fe80::201:5cff:fe6e:2a46%ether2 2
DAg+ ::/0 fe80::201:5cff:fe6e:2a46%ether2 1
DAc ::1/128 lo 0
DAc 2804:14d:5c57::12da/128 ether2 0
DAc+ 2804:14d:5c57:87ac::/64 bridge 0
DAc+ 2804:14d:5c57:87ac::/64 bridge 0
D d 2804:14d:5c57:87ac::/64 2
DAc 2804:1b3:7042:17b8::/64 pppoe-out1 0
DAc 2804:1b3:7081:6bc7::/64 ether1 0
DAc 2804:1b3:7081:9e51::/64 bridge 0
D d 2804:1b3:7081:9e51::/64 1
DAc fe80::%ether1/64 ether1 0
DAc fe80::%ether2/64 ether2 0
DAc fe80::%bridge/64 bridge 0
DAc fe80::%wg1/64 wg1 0
DAc fe80::%pppoe-out1/64 pppoe-out1 0
Everything is fine, except for the distance on this route:
DAg+ ::/0 fe80::201:5cff:fe6e:2a46%ether2 1
…and perhaps I could remove the duplicate routes, but the issue I want to fix is the distance on ether2, it should be 2. Can I do it somehow?