For testing purposes I tried to create IPv6 network from my Mac. I followed this tutorial: https://developer.apple.com/library/archive/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html
Except one thing. Instead of Thunderbolt Ethernet I used only Ethernet. WiFi was successfully created and I am able to use it.
However it seems, that the created WiFi is still not IPv6.
I ran this test: http://ipv6-test.com and in results it says Not supported under IPv6 connectivity
What is the problem? Why is my network still IPv4? How can I create proper IPv6 network?
The NAT64 test network that Apple advises you to create does not provide global IPv6 connectivity. It provides only local IPv6 connectivity between your iOS device connected to the WiFi access point and your Mac. The Mac then uses NAT64/DNS64 to send any Internet traffic via IPv4 (which is similar to what some mobile carriers do). This is why an IPv6 testing website shows you that IPv6 is not supported.
The purpose of this setup is to test IPv6 compatibility of your iOS applications on a physical device. You may download an iOS app which will show whether your device is correctly obtaining an IPv6 address from your Mac (because iOS doesn't natively show this info).
Related
I am trying to use WebRTC on an Android App to stream to a media server running on my workstation using a USB tethering connection. I see have good signaling, with an offer and an answer that seem to make sense with respect to the IP addresses, but I do not get any UDP streaming traffic.
Is there something in the Android WebRtc library that would omit this rndis0 interface? Over Wi-Fi, everything works as intended, but not if the tethered ethernet is the only connection.
What is the proper way to connect an app to a device? At the moment, I have a raspberry pi 3 that controls something about electricity and an iPhone app I created. Every time the app goes to foreground, it sends a UDP broadcast message, when the app receives a response from the raspberry pi, it uses that IP address (in the IP header) to consume the web services I created in the hub. This UDP process is done all the time you run the app. Is this what IOT devices usually do? I assume the raspberry pi IP will change sooner or later.
A colleague of mine told me another way: After the first time I get the IP address, instead of using UDP broadcast messages every time the app runs, use ICMP to ping the previously saved IP address to see if it is responding. In that case, I use the web services with that IP address, otherwise, use the UPD broadcast message again.
I don't see the point of that. Basically because the system is not faster using ICMP. (a UDP request is more or less as fast as an ICMP request). Moreover, maybe, another device started using that IP address now (like a smart TV or a smart plug) and for that reason, it is not going to reply to the network requests sent by the app. In that case, the app cannot recover, because it thinks it is already connected to the proper device. As far as I understand, ICMP is a protocol use for diagnosis, not for devices discovery.
What do you think? What's the process used by devices like Alexa, Philips Hue, Smart plugs... to solve the problem of discovering the devices by their apps?
It seems Philips HUE is using SSDP, which under the hood uses a UDP broadcast message. Is it used every time you run the app to discover the IP address? (I am going to check this later with wireshark)
Thanks for suggestions.
You can enable the hostname of your Raspberry Pi to be accessible on your local network through:
http://raspberrypi.local
To enable it, you need to install Bonjour support on your Raspberry Pi by installing the Avahi mDNS daemon (implements Apple's Zeroconf architecture):
$ sudo apt-get install avahi-daemon
Update boot startup:
$ sudo insserv avahi-daemon
Restart to apply the new configuration:
$ sudo /etc/init.d/avahi-daemon restart
Previously I could browse my localhost machine on a mobile device connected over wifi using my ip which was IPv4.
In developing a webapp or website this is very handy. I don't have to deploy changes to a live website/host.
previously this worked like this http://11.22.33.44/ entering this on the mobile then loaded the development workspace in the device.
Of course the ip was the one given by my ISP now the IP is a IPv6 one and this technique no longer works. I have tried various things like square brackets around the number http://[1111:2222:3333:4444]/this doesn't seem to work ?
I have a server running on a Raspberry Pi and a client running on my Mac and iPhone (soon Apple Watch). I would like to connect to my server automatically without finding the Raspberry pi's Ip-address.
Is there a way to lookup all the devices on the network, and select by Mac-address, name or something else? I know that the first 3 bytes of the mac-address is the same for all Pies. (B8:27:EB) Maby i can use that information.
I have been looking for a solution for this issue a while but i can't seem to find one.
Zeroconf (aka Bonjour)
IMO, the best way to do this is to have your Raspberry Pi advertise itself on the network using Zeroconf (aka. Bonjour).
On the Raspberry Pi, install avahi-daemon and configure it to advertise whichever service you'd like to connect to connect to, for example, if you're connecting via SSH, you'll need to do something like this.
In Cocoa, you can use NSNetServiceBrowser to find the advertised service.
Possible MAC Address solution
Alternatively, if Avahi-daemon is not an option, you may be able to use the MAC address. I will not go into the specifics in Objective-C, just a high-level overview using the command-line.
In terminal, type ping 255.255.255.255. You will get back ping packets from every device on the local network. For each IP address, send an individual ping e.g. ping -c 1 192.168.x.x. Then, type arp -a. You will see the MAC address for each IP on the local network. From here, you can perhaps use your MAC address filter to find Raspberry Pis.
Why does this work? Well, the first command ping 255.255.255.255 sends a ping in an IP packet to the 'broadcast' address, which means all machines on the local network respond. When you ping the individual IP addresses, the low-level networking stack uses ARP to find the MAC address of the IP to directly send a ping to it. In doing so, the ARP tables on the local machine are updated with the cached values.
Maybe you can use this method in your app to discover local Raspberry Pis.
I boot my laptop w/o a LAN connection and get the link-local address 169.254.1.1
My local uPNP clients/servers start discovering one another and communicating.
Now I connect to my LAN and DHCP assigns me a proper routable IP address 10.0.0.4.
I would like my uPNP clients and servers to start interacting with others over the LAN.
Do all my clients and servers need to be written to detect this situation and restart their uPNP sessions or is there a better way? For example, is there a uPNP s/w libary that supports IP address changes internally?
thanks,
r
ohNet will detect changes in IP address and update devices, including switching them between network interfaces. Its a C++ library with bindings for C#, Java and C clients. It is liberally licensed and has ports available for desktop and mobile platforms.
Disclaimer: I'm not entirely unbiased here - I maintain the project.