Community discussions

MikroTik App
 
User avatar
miasik
newbie
Topic Author
Posts: 29
Joined: Sun Mar 18, 2012 10:15 am
Location: Kiev, Ukraine

How to get IPv6 for AP's bridge?

Thu Jan 20, 2022 11:44 pm

Hi!
I have a "classic" he.net connection for years. My end is on my MT(MT1). I have assigned manually one IPv6 address for the bridge(LAN) with three eth ports and one for WLAN interface, All clients successfully get their IPv6 via SLAAC. I've checked a lot of times with https://test-ipv6.com/ and etc
/interface 6to4
add !keepalive mtu=1480 name=HEipv6TB remote-address=216.66.80.162

/ipv6 address
add address=2001:xxx:xx:xxx::2 advertise=no interface=HEipv6TB
add address=2001:xxx:xxxx:100::1 comment="HE pool" interface=LAN
add address=2001:xxx:xxxx:200::1 comment="HE pool" interface=wlan1

/ipv6 nd
set [ find default=yes ] advertise-dns=no disabled=yes
add advertise-dns=no interface=LAN ra-lifetime=15m
add advertise-dns=no interface=wlan1 ra-lifetime=15m retransmit-interval=30s

/ipv6 nd prefix default
set preferred-lifetime=8h valid-lifetime=1d
I installed a new MT(mt2) as a repeater and it works fine. Its wlan clients and itself have an access to the internet. It gets an IPv4 with DHCPv4 client bound to the bridge and I connect to that IPv4 in order to manage mt2.

wlan24 — physical interface to connect to MT1
wlan-rep — virtual AP to extend WiFi coverage
/interface bridge
add name=LAN protocol-mode=none

/interface bridge port
add bridge=LAN interface=ether2
add bridge=LAN interface=ether3
add bridge=LAN interface=ether4
add bridge=LAN interface=wlan5
add bridge=LAN interface=wlan24
add bridge=LAN interface=wlan-rep

/ipv6 settings
set forward=no

/ipv6 nd
set [ find default=yes ] advertise-dns=no interface=LAN ra-lifetime=15m \
    retransmit-interval=30s
I see such lines in the log:
received Router Advertisement on interface=LAN
received prefix 2001:xxx:xxxx:200::/64
but MT doesn't get its own IPv6 address.

How to get an IPv6 address for MT2?
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11433
Joined: Thu Mar 03, 2016 10:23 pm

Re: How to get IPv6 for AP's bridge?

Fri Jan 21, 2022 12:13 am

On MT2 look at this setting:
/ipv6 settings print
  ...
  accept-router-advertisements: yes-if-forwarding-disabled
  ...
You have to change it: /ipv6 settings set accept-router-advertisements=yes
 
User avatar
miasik
newbie
Topic Author
Posts: 29
Joined: Sun Mar 18, 2012 10:15 am
Location: Kiev, Ukraine

Re: How to get IPv6 for AP's bridge?

Fri Jan 21, 2022 8:13 am

On MT2 look at this setting:
/ipv6 settings print
  ...
  accept-router-advertisements: yes-if-forwarding-disabled
  ...
You have to change it: /ipv6 settings set accept-router-advertisements=yes
Sorry, my bad. I had tried those settings, but missed them here.

I have just set:
/ipv6 settings
set accept-router-advertisements=yes forward=no
Still still see RA from MT1, but can't get an IPv6
 
sindy
Forum Guru
Forum Guru
Posts: 10205
Joined: Mon Dec 04, 2017 9:19 pm

Re: How to get IPv6 for AP's bridge?  [SOLVED]

Fri Jan 21, 2022 10:44 am

So you do not need MT2 to act as a router for IPv6, you only want it to be accessible via IPv6, correct?

I've always seen the following only in the context where people wanted that it was an IPv6 router (i.e. forwarding=yes) and that, at the same time, it got its own address using SLAAC, which is doable but against the RFC. To do that, you have to set accept-router-advertisements to just yes rather than yes-if-forwarding-disabled. And in this case, the global address is assigned and used but it is not shown in /ipv6 address print, don't ask me why.

I have no idea whether this "stealth" behaviour is also the case with forwarding=no, as your current configuration shows. So try to set the default ipv6 route on MT2 with the link-local address of MT1 as a gateway, ping some external global address from MT2, and run /tool sniffer quick ipv6-address=the:global:ipv6:address::being:pinged to see what source address MT2 uses to send the pings. If a global address is available on an interface, it is preferred, even if it is this "stealth" one.
 
User avatar
miasik
newbie
Topic Author
Posts: 29
Joined: Sun Mar 18, 2012 10:15 am
Location: Kiev, Ukraine

Re: How to get IPv6 for AP's bridge?

Fri Jan 21, 2022 11:06 am

So you do not need MT2 to act as a router for IPv6, you only want it to be accessible via IPv6, correct
Yes, I don't want MT2 to do any routing.
I want to use it only as a WiFi extender, but I want to have Ipv4 and ipv6 on it.
Getting an ipv4 was done with easy. I just did set dhcp-client on the bridge.

And in this case, the global address is assigned and used but it is not shown in /ipv6 address print, don't ask me why.
Can't check this right now.
Does it mean that I may already have an Ipv6 but I don't see it through GUI? Can I see that hidden ipv6 through command line?
 
sindy
Forum Guru
Forum Guru
Posts: 10205
Joined: Mon Dec 04, 2017 9:19 pm

Re: How to get IPv6 for AP's bridge?

Fri Jan 21, 2022 11:18 am

Does it mean that I may already have an Ipv6 but I don't see it through GUI? Can I see that hidden ipv6 through command line?
Yes, it means you may already have an IPv6 global address but it cannot be directly displayed using any management interface (Winbox/WebFig/command line). But it is not 100 % - as said, I don't know whether it behaves this funny way also with forwarding=no.
 
tdw
Forum Guru
Forum Guru
Posts: 1843
Joined: Sat May 05, 2018 11:55 am

Re: How to get IPv6 for AP's bridge?

Fri Jan 21, 2022 3:03 pm

Setting forward=no leaving accept-router-advertisements=yes-if-forwarding-disabled. does indeed work, with the same annoying invisible IP address and default route behaviour.
 
User avatar
miasik
newbie
Topic Author
Posts: 29
Joined: Sun Mar 18, 2012 10:15 am
Location: Kiev, Ukraine

Re: How to get IPv6 for AP's bridge?

Fri Jan 21, 2022 11:03 pm

Oh my god!
It actually looks like there is no any real ipv6:
[admin@Ya-router] > /ipv6 address print 
Flags: X - disabled, I - invalid, D - dynamic, G - global, L - link-local 
 #    ADDRESS                                     FROM-POOL INTERFACE                   ADVERTISE
 0 DL fe80::2cc8:1bff:fe8d:4007/64                          LAN                         no       
[admin@Ya-router] > 
or a route:
[admin@Ya-router] > /ipv6 route print   
Flags: X - disabled, A - active, D - dynamic, 
C - connect, S - static, r - rip, o - ospf, b - bgp, U - unreachable 
 #      DST-ADDRESS              GATEWAY                  DISTANCE
[admin@Ya-router] > 

but ipv6 ping works and ...
2022-01-21_22-55-47.png

I'm not sure if it's OK.
Is it possible to unhide an autoconfigured Ipv6 and route?
You do not have the required permissions to view the files attached to this post.
 
sindy
Forum Guru
Forum Guru
Posts: 10205
Joined: Mon Dec 04, 2017 9:19 pm

Re: How to get IPv6 for AP's bridge?

Fri Jan 21, 2022 11:11 pm

To learn the address, you can use an action=add-src-to-address-list rule in chain output of mangle, or you can calculate it from the MAC address the same way SLAAC does it. As for the route I've got no idea, but you know the router is MT1 anyway, don't you?
 
User avatar
miasik
newbie
Topic Author
Posts: 29
Joined: Sun Mar 18, 2012 10:15 am
Location: Kiev, Ukraine

Re: How to get IPv6 for AP's bridge?

Fri Jan 21, 2022 11:52 pm

First of all, now I want to know if this behavior is normal.
Do I have to see that ipv6 and route by default or do not?
 
Sob
Forum Guru
Forum Guru
Posts: 9119
Joined: Mon Apr 20, 2009 9:11 pm

Re: How to get IPv6 for AP's bridge?

Sun Jan 23, 2022 4:51 am

Yes and no. That's how RouterOS currently does it, so yours is not broken any more than others. But otherwise it's of course wrong and MikroTik should fix it and have both dynamic address and route displayed.

Who is online

Users browsing this forum: Bing [Bot], Egate, johnson73, Majestic-12 [Bot], reinerotto and 79 guests