There was a time i had that error, and i could only connect to the n3ds with my internet nic disconnected.
Another time that i couldn't connect to the n3ds was when i was using a different dns than my active dhcp provides for my network.
Yet another time on an android phone i was using some app that i had to set it to use old name lookup method to work.