Zeroconf
Zero Configuration networking (zeroconf) is a network technology used to automatically generate available IP addresses. No additional manual configuration or exclusive configuration server is required.
The goal of "zero-configuration Network Service" is to allow non-professional users to easily connect to various network devices, such as computers and printers. The entire network construction process is automated through the program. If there is no zeroconf, you must manually configure some services, such as DHCP, DNS, and other computer network settings. These are difficult for non-technical users and new users.
The author of zeroconf specifications is apple.
Avahi
Avahi is an open-source implementation of zeroconf specifications, which is commonly used in Linux. Includes the implementation of a complete set of multicast DNS (multicastdns)/DNS-SD network services. It uses the publish authorization lgpl. Another implementation of zeroconf specifications is Apple's bonjour program. Avahi And bonjour are compatible with each other (all nonsense follows the same standard, just like IE, Firefox, and chrome can run http1.1 ).
Avahi allowedProgramPublish and learn various services and hosts in a local network without manual network configuration. For example, when a user connects his computer to a LAN, if the user runs the avahi service, the avahi program automatically broadcasts, this allows you to find printers, shared files, and other users that can chat with each other. This is a bit like he is receiving various network advertisements in the LAN.
The actual process started in Linux is named avahi-daemon.
This service is installed by default in many Linux distributions. When the system cannot connect to the DHCP server, it will try to obtain the IP address through zeroconf.
In centos5.x, The zeroconf route entry is added to the route table in the following STARTUP script.
/Etc/init. d/network calls the/etc/sysconfig/network-scripts/IFUP-eth script, and the IFUP-eth script adds the zeroconf route entry,CodeAs follows:
- # Add zeroconf route.
- If [-z "$ {nozeroconf}"-a "$ {isalias}" = "no"-a "$ {realdevice }"! = "Lo"]; then
- IP Route replace 169.254.0.0/16 Dev $ {realdevice}
- Fi
Is there a way to disable zeroconf?
You can add a line "nozeroconf = yes" in the "/etc/sysconfig/network" file to achieve this goal.
In fact, assigning any value to nozeroconf is the same effect. From the code above, we can see that it only checks whether nozeroconf is empty.
Of course, after "/etc/sysconfig/network" is modified, the network must be restarted to take effect:/etc/init. d/network restart