"Linux Advanced Programming" (15th) UDP Network Programming Application 2

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.