Please explain how dex.local works


#1

I would like to understand how dex.local works.

After I physically connect my mac to the PI via ethernet cable (using USB to Ethernet connector in my case), “dex.local” seems to magically resolve to the correct IP address for the PI.
I’d like to understand how that works.

? >ping dex.local
PING dex.local (169.254.7.251): 56 data bytes
64 bytes from 169.254.7.251: icmp_seq=0 ttl=64 time=6.239 ms
64 bytes from 169.254.7.251: icmp_seq=1 ttl=64 time=6.149 ms
64 bytes from 169.254.7.251: icmp_seq=2 ttl=64 time=3.196 ms
64 bytes from 169.254.7.251: icmp_seq=3 ttl=64 time=753.503 ms
^C

Furthermore, after I set up WiFi on the PI and physically disconnect the ethernet cable connection between the mac and the PI, “dex.local” magically resolves to the correct “WiFi” assigned IP address for the PI.
I’d like to understand how that works.

? >ping dex.local
PING dex.local (192.168.2.51): 56 data bytes
64 bytes from 192.168.2.51: icmp_seq=0 ttl=64 time=25.459 ms
64 bytes from 192.168.2.51: icmp_seq=1 ttl=64 time=4.926 ms
64 bytes from 192.168.2.51: icmp_seq=2 ttl=64 time=5.729 ms

Thanks


#2

Magic :wink:

To be honest, it sometimes really does feel like magic. There are many pieces of software in place, the same ones that allow your computer to reach cnn.com, or your wifi-enabled printer. One of those key pieces of software is called Bonjour (French for Hello). You can take a look at https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/NetServices/Articles/faq.html

Networking is getting really complex, with many layers all working together. It’s the magic behind the Internet ! :slight_smile:


#3

interesting. thx