Page 1 of 1
Solved: Problem with two default IPv6 routes using dhcpv6-client (7.1rc2)
Posted: Tue Aug 31, 2021 2:28 pm
by dksoft
I wounder if someone has the same problem that two default IPv6 routes are created and IPv6 does not route anything outside.
Removing the second route makes thinks works instantly. So I added a script to the dhcpv6-client.
Does someone have a clue, why two routes are created and what the 'v - vpn' on the problematic route means?
Here is what my routes look like on Winbox:
On CLI:
Flags: D - dynamic; X - disabled, I - inactive, A - active;
c - connect, s - static, r - rip, b - bgp, o - ospf, d - dhcp, v - vpn, m - modem, y - copy; H - hw-offloaded; + - ecmp
# DST-ADDRESS GATEWAY DISTANCE
DAd + ::/0 fe80::9ecc:83ff:fecb:... 1
DAv + ::/0 TELEKOM 1
For now if I add a script to the DHCPv6-client that removes the second route after each release:
:if ($"pd-valid" = 0) do= {
/log info ("DHCP-TELEKOM: unbound IPv6 prefix $"pd-prefix"")
/ipv6 route remove [find gateway=TELEKOM vpn=yes]
}
Re: Problem with two default IPv6 routes using dhcpv6-client (7.1rc2)
Posted: Tue Aug 31, 2021 4:06 pm
by mrz
v-vpn means that route was added by VPN protocol (PPPoE or whatever tunnels you are using)
d-dhcp means that route was added by DHCP client/server.
If you enabled PPPoE to add a default route and enabled the DHCP client to add a default route, then yes you will have two default routes.
Re: Problem with two default IPv6 routes using dhcpv6-client (7.1rc2)
Posted: Tue Aug 31, 2021 4:49 pm
by dksoft
...If you enabled PPPoE to add a default route and enabled the DHCP client to add a default route, then yes you will have two default routes...
That's it, thank you mrz!
I noticed the "Use IPv6" flag in the PPP profiles is set to "yes" on ROS7 but did not care about it. Now I known what it is doing.
Actually the default route can not be set via dhcpv6-client because disabling the "Use IPv6" flag also disables the dhcpv6-client from aquiring a prefix through that interface.
So I set the default route via PPPoE, aquire the prefix via dhcpv6-client and set the address using the prefix pool.
Re: Problem with two default IPv6 routes using dhcpv6-client (7.1rc2)
Posted: Tue Aug 31, 2021 5:28 pm
by mkx
So I set the default route via PPPoE, aquire the prefix via dhcpv6-client and set the address using the prefix pool.
If I understand right, you're setting IPv6 address to PPPoE interface from pool of IPv6 addresses, assigned by ISP?
But does PPPoE interface actually need routable IPv6 address? In my particular case on 6.48.4 it doesn't ...
Re: Solved: Problem with two default IPv6 routes using dhcpv6-client (7.1rc2)
Posted: Tue Aug 31, 2021 5:33 pm
by mrz
Typically you do not need a routable global IPv6 address on PPP interface, path and neighbor discovery is done with link-local addresses. Unfortunately, there are ISPs that block any packets with link-local addresses coming from the clients.
Re: Solved: Problem with two default IPv6 routes using dhcpv6-client (7.1rc2)
Posted: Tue Aug 31, 2021 5:40 pm
by mkx
In which case can link-local addressed frames go out through WAN interface?
E.g. if LAN is properly configured with SLAAC / DHCPv6 server, then LAN devices will use global addresses. Router itself will in this case have at least one global address (i.e. the one bound to LAN interface). So is it connections initiated by router destined at internet server where router picks "the best" IPv6 address bound to WAN interface (in case of PPPoE without global address that would be link-local address)?
Re: Problem with two default IPv6 routes using dhcpv6-client (7.1rc2)
Posted: Tue Aug 31, 2021 5:55 pm
by dksoft
If I understand right, you're setting IPv6 address to PPPoE interface from pool of IPv6 addresses, assigned by ISP?
Yes but on the LAN bridge and not the PPPoE interface. Maybe this describes what I am currently doing on 7.1. The GUA-pool6 is created by the dhcpv6-client.
I am not advertising the GUA just because I am playing with IPv6NAT. Otherwise it should so that the clients get a global address. Also I am not using DHCPv6 for DNS as 7.1 now has that feature on RADV:
/interface bridge
add admin-mac=04:00:00:00:00:01 auto-mac=no comment="Bridge to SFP+" \
ingress-filtering=no name=LAN protocol-mode=none vlan-filtering=yes
/interface bridge port
add bridge=LAN interface=sfp-sfpplus1 trusted=yes
/interface vlan
add comment="LAN with VLAN ID 007 for FTTH access" interface=LAN name=FTTH \
vlan-id=7
/ppp profile
add comment="Telekom FTTH profile" name=FTTH-Telekom only-one=yes
/interface pppoe-client
add add-default-route=yes comment="TELEKOM - Telekom FTTH" disabled=no \
interface=FTTH max-mru=1492 max-mtu=1492 name=TELEKOM profile=\
FTTH-Telekom user=xxxxxxxxx#0001@t-online.de
/ipv6 pool
add name=LLA-pool6 prefix=fe80::/56 prefix-length=64
add name=ULA-pool6 prefix=fd00::/64 prefix-length=64
/ipv6 dhcp-client
add interface=TELEKOM pool-name=GUA-pool6 rapid-commit=no request=prefix
/ipv6 address
add address=::1 advertise=no from-pool=GUA-pool6 interface=LAN
add address=fd00::1 interface=LAN
/ipv6 nd
set [ find default=yes ] advertise-mac-address=no dns=fd00::6 interface=LAN
Re: Problem with two default IPv6 routes using dhcpv6-client (7.1rc2)
Posted: Tue Aug 31, 2021 6:43 pm
by mkx
If I understand right, you're setting IPv6 address to PPPoE interface from pool of IPv6 addresses, assigned by ISP?
Yes but on the LAN bridge and not the PPPoE interface.
Essentially the same as I'm doing on 6.48.4. The only difference is IPv6 handling of pppoe-client which was non-existant in ROS v6. Good to know (surely I'll forget about this long before I manage to upgrade my home router to v7).
Re: Solved: Problem with two default IPv6 routes using dhcpv6-client (7.1rc2)
Posted: Tue Aug 31, 2021 8:42 pm
by dksoft
And do not do something like this:
/ipv6 pool
add name=LLA-pool6 prefix=fe80::/56 prefix-length=64
add name=ULA-pool6 prefix=fd00::/64 prefix-length=64
/ipv6 address
add address=::1 from-pool=ULA-pool6 interface=LAN
add address=::1 from-pool=GUA-pool6 interface=LAN
ROS thinks the addresses are equal (even from different pools) and will not be able to assign the GUA address via dhcp6-client.
If you do it by cli, you will see an error message saying something like "same address already assigned".
This works:
/ipv6 address
add address=::1 from-pool=GUA-pool6 interface=LAN
add address=fd00::1 interface=LAN
Re: Solved: Problem with two default IPv6 routes using dhcpv6-client (7.1rc2)
Posted: Wed Feb 02, 2022 5:33 pm
by theprojectgroup
Removing "Add Default Route" also worked for me with pppoe and german ISP M-net.
Would it be more convenient if we could have these settings in the pppoe-client?
Example:
Add Default Route:
IPv4: yes
IPv6: yes < if this is set to yes, then untick for any DHCPv6-Client running on this interface
Many thanks, Flo.
Re: Solved: Problem with two default IPv6 routes using dhcpv6-client (7.1rc2)
Posted: Wed Feb 02, 2022 5:50 pm
by mrz
By default dhcpv6-client sets add-default-route to "no", so this was deliberately enabled by the admin
Re: Solved: Problem with two default IPv6 routes using dhcpv6-client (7.1rc2)
Posted: Sun Feb 13, 2022 9:49 pm
by bennn
Thanks for the post, I too had two default routes.
I enabled on PPPoE, and disabled on DHCPv6 Client as per the above and all is resolved!