Zero Configuration Networking
From Funtoo Linux
Zero Configuration Networking, also called ZeroConf or wikipedia:Bonjour_(software) Bonjour (Apple's trademark for their Zero Configuration Networking implementation) is
Contents |
Link-local Addresses
To use link-local addressing, first set up the proper routes:
route add default dev eth0 metric 99 route add -net 169.254.0.0 netmask 255.255.0.0 dev eth0 metric 99
Then, use avahi-autoipd to discover a valid link-local IP address:
/usr/sbin/avahi-autoipd --daemonize --syslog --wait eth0
mDNS
receiving mDNS
emerge nss-mdns
Set up multicast route:
route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
/etc/nsswitch.conf:
hosts: files mdns_minimal [NOTFOUND=return] dns mdns
Test:
ninja1 ~ # ping daniel-pc.local PING daniel-pc.local (10.0.1.11) 56(84) bytes of data. 64 bytes from Daniel-PC.local (10.0.1.11): icmp_req=1 ttl=128 time=3.73 ms 64 bytes from Daniel-PC.local (10.0.1.11): icmp_req=2 ttl=128 time=0.905 ms 64 bytes from Daniel-PC.local (10.0.1.11): icmp_req=3 ttl=128 time=0.922 ms 64 bytes from Daniel-PC.local (10.0.1.11): icmp_req=4 ttl=128 time=0.827 ms
Sending mDNS/DNS-sd
rc-update add avahi-daemon default rc
Service Discovery
Get a list of services on the LAN:
ninja1 ~ # avahi-browse -ac