UDP Broadcast Communication
Unicast: Single-to- one , TCP and UDP can be done
broadcast : Only UDP is complete. The sender sends only one packet when broadcasting, but the switch on the network forwards the broadcast packet to all ports by default. Routers do not forward any broadcast packets by default. Therefore, the broadcast is within the LAN range.
multicast : Only UDP can be completed. Sends a message to a host of the same multicast group. Video telephony, video conferencing and more adoption.
Broadcast IP address : The host number is all 1. Network number is OK
Broadcast MAC address : full 1, i.e. FF:FF:FF:FF:FF:FF
Broadcast Data frame format
Processing process:
The NIC driver compares its MAC address with the destination MAC address and discovers that it is a broadcast MAC address that is uniformly received and handed over to the OS (IP layer).
The IP layer determines whether the IP address is consistent with itself. The IP address is found as the broadcast address of the current network segment, and is handed to the transport layer
The transport layer is based on the port, if there is a corresponding port to the application processing. Otherwise, the packet is discarded.
Regardless of whether the host has a process to receive broadcast messages, broadcast messages must be received by the network card and processed by an operating system. Will cause the network host to be burdened.
"Linux Advanced Programming" (15th) UDP Network Programming Application 2