Hurricane Electric's IPv6 Tunnel Broker Forums

Advanced search  

News:

Welcome to Hurricane Electric's Tunnelbroker.net forums!

Author Topic: SLAAC on Mac OS X  (Read 8906 times)

sahe

  • Newbie
  • *
  • Posts: 4
SLAAC on Mac OS X
« on: October 10, 2012, 10:04:35 PM »

Hi folks,

I see strange issue with DAD on my macbook. MacOS version is 10.8.2.
My hardware is router which is configured to provide RA for it's LAN and WLAN clients. Also router has configured 6in4 tunnel to HE. First of all I want to tell you that on Win7 and on android devices (4.0 and 4.1) SLAAC is working correctly with my router, issue is inside MacOS.
When my macbook is trying to add link-Local address, everything is fine. In wireshark I see correct NS message (Source MAC is en0 MAC of macbook, Destination MAC is IPv6 multicast MAC (33.33.xx.xx.xx), Source IP is unspecified (:: ) and Destination IP is computed solicited multicast address of tentative inet6 address). DAD is successful, tentative address becomes active and reachable.
After that macbook is trying to add two global unicast addresses - for one of them interface id is based on MAC address, and the second one based on randomly chosen MAC address (temporary inet6 address). For both of these addresses I see common behavior in wireshark. I see two NS messages for each of tentative inet6 addresses. One message looks fine, all the fields in header are correct (the same as for link-local NS which is described earlier). The second one is a little bit strange. All the fields are the same except of one - Destination MAC. Destination MAC is MAC of my macbook's en0 nterface. As you see, source MAC and Destination MAC are the same for this message. When I've tried to run tcpdump on my router, I don't see the second NS, so it's alive only inside my laptop. As a result I see tag duplicated in the output of ifconfig on macbook and both of Global Unicast addresses are not active for me. In logfile I see that DAD detected duplicate address with NS in/out=1/1 in description.
Do anybody has the same issue on Mac OS? If no, please tell me the version of your OS.

I've checked RFC 2462 and there is something interesting in paragraph 5.4.3:
Quote
If the solicitation is from the node itself (because the node loops back multicast packets), the solicitation does not indicate the presence of a duplicate address.
If I understand correctly, macbook ignores this race condition for DAD. Also there is Appendix A  in RFC which describes some issues with DAD.
Guys, I need your help. Static configuration is working fine, but it's not the workaround:)

Sorry for my english, it's not my native language.
Logged
Regards,
Alex

tdensmore

  • Newbie
  • *
  • Posts: 14
Re: SLAAC on Mac OS X
« Reply #1 on: October 11, 2012, 09:16:41 AM »

EDIT:  NM, sorry, I missed the part where you say that link-local addy works fine.
« Last Edit: October 11, 2012, 09:20:26 AM by tdensmore »
Logged

tdensmore

  • Newbie
  • *
  • Posts: 14
Re: SLAAC on Mac OS X
« Reply #2 on: October 17, 2012, 08:10:03 AM »

No problems with SLAAC IPv6 via wifi on either a macbook or a mac mini.  I believe they are running leopard and lion respectively, but I forgot to verify.  CPE is a mikrotik 751.
Logged

Kjempeblakk

  • Newbie
  • *
  • Posts: 3
Re: SLAAC on Mac OS X
« Reply #3 on: November 05, 2012, 08:48:47 AM »

Hi,

I'm having the exact same problem as you, and I'm also running OS X 10.8.2.

My steps to reproduce:
1) Reboot everything.
2) Connect Mac. The first time it connects everything is ok, and I get IPv6 connectivity to the Internet
3) Connect a Win7 PC. Both machines will now work fine.
4) Disconnect the Mac and reconnect it again, the problem will occur!

The only thing I have seen that differs from your description is that sometimes the DAD will actually fail on the link-local address first (with source MAC and destination MAC being the Mac's interface for the second NS-packet, just like you see), thereby stopping the whole process. Other times the link-local-address will be ok, but it fails on the two global-addresses.

Please let me know if you have found the root-cause for this, I'm stuck :-(


The only "workaround" I have found is to disable DAD on the Mac by using "sysctl -w net.inet6.ip6.dad_count=0". This is fine if you are a single user, but it really doesn't help me much from an ISP-perspective....


I'm also looking into if this problem only happens in WLAN. It seems that when I connect with cable everything works fine, but I have only tested this on OS X 10.7.4 so it's too soon to conclude. Of course the Mac I have with 10.7.4 has a defect WLAN-card and the one running 10.8.2 doesn't have a wired ethernet-connector so.....
Logged

sahe

  • Newbie
  • *
  • Posts: 4
Re: SLAAC on Mac OS X
« Reply #4 on: November 05, 2012, 10:57:07 PM »

Hi,

Thanks for your replies guys! Looks like it's an MLD snooper issue on my router's Wi-Fi driver. At the moment developer of my firmware added this bug to his todolist.
Logged
Regards,
Alex

Kjempeblakk

  • Newbie
  • *
  • Posts: 3
Re: SLAAC on Mac OS X
« Reply #5 on: November 06, 2012, 12:35:16 AM »

Hi,

do you have any more details on the driver-bug? What chipset is used in the router? Mine is using Ralink3062. I'll discuss this issue with my firmware-developers...

Thanks!
Logged

sahe

  • Newbie
  • *
  • Posts: 4
Re: SLAAC on Mac OS X
« Reply #6 on: November 06, 2012, 02:06:09 AM »

Mine is Ralink RT3883 (Asus RT-N56U). I don't have enough details about bug, but we see that MLD snooper doesn't work correctly on WiFi interfaces (ra0 and rai0). This causes MAC-unicasts back to source of multicast packets which is incorrect. I could give you details later after resolving of issue.
Logged
Regards,
Alex

kasperd

  • Founder, Netiter ApS
  • Hero Member
  • *****
  • Posts: 952
Re: SLAAC on Mac OS X
« Reply #7 on: November 06, 2012, 03:10:22 AM »

Is this one of those problems, that only manifests themselves, when there is a bug on both the router and the host?
Logged

Kjempeblakk

  • Newbie
  • *
  • Posts: 3
Re: SLAAC on Mac OS X
« Reply #8 on: November 06, 2012, 04:53:22 AM »

Correct, you need a combination of router-problem and client-problem. So far it seems Mac OS X (unclear which versions) and Win XP have a problem, but Win7 and some Android-devices does not have a problem.
Logged

sahe

  • Newbie
  • *
  • Posts: 4
Re: SLAAC on Mac OS X
« Reply #9 on: December 24, 2012, 10:40:16 AM »

Hi guys.

FYI, issue had been completely resolved for me. While enabling IGMP/MLD snooping on router, some multicast packets are sent as unicasts to all the clients which are known by router (via ARP cache). Also router send packet to it's originator. It causes SLAAC client to receive its NS message with its MAC address as source and destination. Client thinks that it is NS from another host. Then it detects duplicate and that's it. It's the issue of Ralink drivers on router, you need to fix sources to resolve it. Ralink coders forgot about DAD logic while performing snooping.
Here is commit from git of custom firmware for Asus RT-N56/N65 routers with DAD fix http://code.google.com/p/rt-n56u/source/detail?r=db54a88ab10034c729cd2b3f89d83c4e411605c5. You could check all the changes from original drivers by yourself. I hope this info will be helpful.
« Last Edit: December 24, 2012, 10:42:08 AM by sahe »
Logged
Regards,
Alex