/*************************************** ******************************
* Author: Samson
* Date: 07/15/2012
* Test Platform:
* GNU Linux version 2.6.29.4
* GCC version 4.4.0 20090506 (Red Hat 4.4.0-4) (GCC)
**************************************** ****************************/
Broadcast purpose:
1. Locate a server host in the local subnet, provided that the server host is known or determined to be in the local subnet, but its unicast IP address is not known. This operation is also called resource discovery ).
2. Use a LAN environment where multiple customer hosts communicate with a single server host to minimize group circulation.
For this purpose, there are several examples of Internet applications using Broadcast:
(1) Address Resolution Protocol (ARP). ARP is not a user application, but a basic component of IPv4. ARP broadcasts a request on the local subnet and says, "the IP address is A. B. C. D. Your hardware address (MAC ). "ARP uses link layer broadcast instead of IP layer broadcast.
(2) The Dynamic Host Configuration Protocol (DHCP), under the premise that the local subnet has a DHCP server host or a Relay host, the DHCP client host sends its own request to the broadcast address (usually 255.255.255.255, because the client host does not know its own IP address, subnet mask, and subnetwork restricted broadcast address.
(3) Network Time Protocol (NTP), a common use case of NTP is the IP address of one or more server hosts to be used on the client host configuration, round-Robin of these server hosts at a certain frequency.
(4) routing daemon. Routed is one of the earliest and most commonly used routing daemon processes. It broadcasts its route table on a LAN. In this way, all other routers connected to the LAN can receive these route notifications without configuring the IP addresses of their adjacent routers for each router.
(1) ARP and (2) DHCP are more focused on resource discovery, while (3) NTP and (4) routed are more focused on the second use of broadcast, multiple Clients communicate with a single server host to reduce the circulation of groups in the LAN.