Community discussions

MikroTik App
 
jdr
just joined
Topic Author
Posts: 1
Joined: Sun Jan 28, 2024 8:48 am

No IPv6 Internet on CRS326, IPv4 works.

Sun Jan 28, 2024 10:35 am

Hi,

I have recently bought a CRS326-24G-2S+ for home and the excitement about so many configuration options by far outweighs the complexity challenges. ;)

The CRS326 will mainly be used as switch and Inter-VLAN-Router, still I want to be able to use it also for some Internet access. As for the internet connection, I want to be completely independent from the features the ISP router provides. My internet connection is 1000/50 Mbit/s Vodafone Cable with Dual Stack (proper public IPv6 and proper public IPv4) which I guess is very good considering that I live in a 3rd world country where the internet is still Neuland for most people. My ISP router is a CGA4233DE which works ok and reliably but is really shitty regarding its feature set. It does not even support static routes or prefixes. I know that I could use it in Bridge Mode as modem, but I want to leave it as router as for now with all the downsides this can have.

Interface ether24 is connected to the ISP router. Setting up IPv4 internet connectivity was really easy: Assigned 192.168.0.5/24 to ether24 with the ISP router 192.168.0.2 as default gw.

Now, finally to the problem I have. I cannot get IPv6 internet connectivity working at all.
What I did:
/ipv6 settings
set accept-router-advertisements=yes forward=no    # forwarding will be needed later

/ipv6 dhcp-client
add add-default-route=yes interface=ether24 request=address

The result is that the ISP router assigns 2 global IPv6 addresses (I guess 1 via DHCP and 1 via SLAAC) with default gw (I removed the link-local addresses as they contain the MAC):
/ipv6/address print
Flags: X - DISABLED, D - DYNAMIC; G - GLOBAL, L - LINK-LOCAL
Columns: ADDRESS, INTERFACE, ADVERTISE
#    ADDRESS                                     INTERFACE    ADVERTISE
0 DL fe80::aaaa:bbbb:cccc:dddd/64                ether24      no       
1 DG 2a02:810c:880:5dcc:4675:867b:8ebf:596a/128  ether24      no       
2 DG 2a02:810c:880:5dcc:4aa9:8aff:fef7:3e45/64   ether24      no

/ipv6/route print        
Flags: D - DYNAMIC; A - ACTIVE; c - CONNECT, d - DHCP, g - SLAAC; H - HW-OFFLOADED
; + - ECMP
Columns: DST-ADDRESS, GATEWAY
      DST-ADDRESS                                 GATEWAY                        
DAg + ::/0                                        fe80::eeee:ffff:gggg:hhhh%ether24
DAd + ::/0                                        fe80::eeee:ffff:gggg:hhhh%ether24
DAc   2a02:810c:880:5dcc::/64                     ether24                        
DAc   2a02:810c:880:5dcc:4675:867b:8ebf:596a/128  ether24                        
DAc   fe80::%ether24/64                           ether24

This looks OK to me and looks the same as on my ThinkPad when I connect directly to the ISP router.
ip -6 addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN qlen 1000
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
4: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
    inet6 2a02:810c:880:5dcc:9ac3:551:7cfd:653d/128 scope global dynamic noprefixroute 
       valid_lft 604779sec preferred_lft 604779sec
    inet6 2a02:810c:880:5dcc:e856:8514:eb8f:c8aa/64 scope global dynamic noprefixroute 
       valid_lft 86401sec preferred_lft 43201sec
    inet6 fe80::iiii:jjjj:kkkk:llll/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
       
ip -6 route
::1 dev lo proto kernel metric 256 pref medium
2a02:810c:880:5dcc:9ac3:551:7cfd:653d dev wlp3s0 proto kernel metric 600 pref medium
2a02:810c:880:5dcc::/64 dev wlp3s0 proto ra metric 600 pref medium
fe80::/64 dev wlp3s0 proto kernel metric 1024 pref medium
default via fe80::eeee:ffff:gggg:hhhh dev wlp3s0 proto ra metric 600 pref medium

Still, I have no IPv6 internet at all, cannot even ping the Google DNS while it works easily on the ThinkPad with the same configuration.
/ping address=2001:4860:4860::8888 interface=ether24
  SEQ HOST                                     SIZE TTL TIME       STATUS                                                                                                                                    
    0 2001:4860:4860::8888                                         timeout                                                                                                                                   
    1 2001:4860:4860::8888                                         timeout                                                                                                                                   
    2 2001:4860:4860::8888                                         timeout                                                                                                                                   
    3 2001:4860:4860::8888                                         timeout

I can, however, ping the IPv6 default gw which is the link-local address of the ISP router, so IPv6 basically works:
/ping address=fe80::eeee:ffff:gggg:hhhh interface=ether24
  SEQ HOST                                     SIZE TTL TIME       STATUS                                                                                                                                    
    0 fe80::eeee:ffff:gggg:hhhh                   56  64 1ms149us   echo reply                                                                                                                                
    1 fe80::eeee:ffff:gggg:hhhh                   56  64 1ms383us   echo reply  
Firmware is up-to-date: v7.13.3.

What am I doing wrong?
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11646
Joined: Thu Mar 03, 2016 10:23 pm

Re: No IPv6 Internet on CRS326, IPv4 works.

Sun Jan 28, 2024 11:44 am

Parameter add-default-route on DHCPv6 client is a MT hack and should be disabled.

DHCPv6 (unlike DHCPv4) doesn't provide gateway information, RAs provide that info. What the parameter mentioned does is that it takes IPv6 address of DHCPv6 server and adds it as gateway address. Sonetines that's OK, but more often it's not. Since RAs work in your case, you should disable the mentioned parameter.

After that, reboot your CRS to make sure all remnants of inappropriate gateway settings get cleared.
 
jdr
just joined
Topic Author
Posts: 1
Joined: Sun Jan 28, 2024 8:48 am

Re: No IPv6 Internet on CRS326, IPv4 works.  [SOLVED]

Sun Jan 28, 2024 3:32 pm

Thanks @mkx for your response!

After disabling the "Add Default Route" hack, it still did not work. But in winbox, I saw this nice checkbox "Use Interface DUID" and after applying the changes, it suddenly worked. Probably I should have tried this earlier as it was not too difficult ;).

As for the default route, one of DHCPv6 Client > Add Default Route or IPv6 Settings > Accept Router Advertisements: yes must be set. As I understand that RA is preferred over the DHCPv6 hack, I left "Add Default Route" disabled and set "Accept Router Advertisements" to yes. Now everything seems to work although IPv6 routing is quite slow. I will try DHCP relay instead of NAT later, but the most important point is that it works properly at all.

Config now is:
/ipv6 settings
set accept-router-advertisements=yes

/ipv6 dhcp-client
add interface=ether24 request=address use-interface-duid=yes

/ipv6 firewall nat
add action=masquerade chain=srcnat out-interface=ether24
Last edited by jdr on Sun Jan 28, 2024 3:35 pm, edited 1 time in total.

Who is online

Users browsing this forum: DanMos79 and 13 guests