"Computer network" broadcast and multicast

Source: Internet
Author: User

The IP address consists of three types: unicast address (destination is a single host), broadcast address (destination is all hosts on a given network), and multicast address (destination is all hosts within the same group).

  broadcast and multicast only apply to UDP, It is important that they transmit messages to multiple receivers simultaneously.  TCP is a connection-oriented protocol that means that there is a connection between two processes (determined by the port number) running on two hosts (determined by the IP address), respectively.

Consider a shared channel network that contains multiple hosts, such as Ethernet. Each Ethernet frame contains the Ethernet address (48bit) of the source host and destination host. Typically each Ethernet frame is sent only to a single destination host, and the destination address indicates a single receive interface, thus called unicast (unicast). In this way, the communication of any two hosts does not interfere with other hosts in the network (except in cases where contention for a shared channel is possible).

However, sometimes a host sends frames to all other hosts on the Web, which is broadcast . This process can be seen through ARP and RARP. Multicast (multicast) is between unicast and broadcast: frames are routed only to multiple hosts that belong to a multicast group.

  In order to understand the broadcast and multicast, it is necessary to know the filtering process of the host to the frame transmitted by the channel. Illustrates this point.

  

                                                     The process of filtering the received frames from each layer of the protocol stack

First, the network adapter looks at the frame transmitted by the channel, determines whether the frame is received, and transmits it to the device driver if it is received. Usually the NIC receives only those frames whose destination address is the physical address or broadcast address of the network card. In addition, most interfaces are set to promiscuous mode, which can receive a copy of each frame.

Currently, most network cards are configured to receive frames with destination addresses of multicast addresses or some subnet multicast addresses. For Ethernet, when the lowest bit of the highest byte in the address is set to 1, the address is a multicast address , denoted in hexadecimal as 01:00:00:00:00:00 (Ethernet broadcast address FF:FF:FF:FF:FF: FF can be seen as a special case of an Ethernet multicast address).

If the NIC receives a frame, the frame is passed to the device driver (the NIC discards the frame if the frame is checked and the error is incorrect). The device driver will perform additional frame filtering. First, the required protocol (IP, ARP, and so on) must be established in the frame type. Second, multicast filtering is performed to detect whether the host is a multicast group with multicast address descriptions.

The device driver then transmits the data frame to the next layer, for example, when the frame type is specified as an IP datagram, it is passed to the IP layer. IP has more filtering based on the source address and destination address in the IP address. If normal, the datagram is routed to the next layer, such as TCP or UDP.

Each time the UDP receives the datagram from the IP, the datagram is filtered according to the destination port number and the source port number. If no process currently uses the destination port number, the datagram is discarded and an ICMP unreachable message is generated (TCP makes similar filtering based on its port number). If the UDP datagram has a validation and an error, it will be discarded.

  the problem with broadcasting is that it increases the processing load for hosts that are not interested in broadcast data . take an example using a UDP broadcast message application. If there are 50 hosts in the network, but only 20 participate in the application, each of the 20 hosts of one send UDP broadcast data, the remaining 30 hosts have to process these broadcast datagrams. Until the UDP layer is reached, the received UDP broadcast datagram is discarded. These 30 hosts discard UDP broadcast datagrams because these hosts are not using this destination port.

The advent of multicasting reduces the processing load on hosts that are not interested in the application. With multicasting, hosts can join one or more multicast groups. This way, the NIC learns which multicast group the host belongs to, and then receives only the multicast frames that the host is hiding in the multicast group.

Broadcasting

There are four types of broadcasts: Restricted broadcasts, broadcasts to networks, broadcasts to subnets, broadcasts to all subnets.

Restricted broadcasts

  The restricted broadcast address is 255.255.255.255. This address is used for the destination address of the IP datagram during host configuration, at which point the host may not know the network mask of the network it is on, or even its IP address.

  In any case, the router does not forward datagrams with the destination address as a restricted broadcast address, and such data appears only on the local network. This is why it is called a restricted network address. This broadcast type receives objects for all hosts in the LAN, including the sending host.

  One unresolved question is: if one is a multi-interface, when a process sends a datagram to the broadcast address of the network, should the datagram be sent to each connected interface for broadcast? If so, the app that wants to broadcast all the interfaces on the host must determine all the interfaces in the host that support the broadcast, and then send a data revenge system to each interface.

Broadcast to Network

The broadcast address that points to the network is the address of the host number 1. The Class A network broadcast address is netid.255.255.255, where NetID is the network number of the Class A network.

A router must forward a broadcast that points to a network, but it must also have a choice not to forward.

Broadcast to Subnet

The broadcast address to the subnet is the address of the host number 1 with a specific subnet number. The IP address that is the subnet's direct broadcast address requires an understanding of the subnet's mask. For example, if the router receives a datagram destined for 128.1.2.255, when the subnet mask for Class B network 128.1 is 255.255.255.0, that address is the broadcast address that points to the subnet, but if the subnet has a mask of 255.255.254.0, The address is not a broadcast address that points to the subnet.

Broadcasts that point to all subnets

Broadcasts that point to all subnets also need to know the subnet mask of the destination network so that it is separate from the broadcast address that points to the network. The subnet number and the host number of the broadcast address to all subnetsare all 1. For example, if the destination subnet mask is 255.255.255.0. Then the IP address 128.1.255.255 is a broadcast address that points to all subnets. However, if the network is not divided into subnets, this is a broadcast to the network.

  

Multicast

IP multicasting provides two types of services:

1) Transfer data to multiple destination addresses. There are many applications that transmit information to multiple recipients: for example, an interactive conferencing system distributes mail or news to multiple recipients. If multicast is not used, most of these applications are currently done with TCP (sending a separate copy of the data to each destination address). However, even with multicasting, some applications may continue to use TCP to ensure its reliability.

2) customer requests to the server. For example, a diskless workstation needs to be determined by the boot server. Currently, this service is provided through broadcasts, but the use of multicasting can reduce the burden of not providing this service.

Multicast group Address

  

  The multicast group address includes a maximum of 4bit and a multicast group number of 1110. They can usually be expressed as dotted decimal numbers, ranging from 224.0.0.0 to 239.255.255.255.

A collection of hosts that can receive data destined for a particular multicast group address is called a host group. A host group can span multiple networks. A member of a host group can join or leave a cluster at any time. There is no limit to the number of hosts in the host group, and hosts that are not part of a host group can send information to the previous groups.

Some multicast group addresses are identified by IANA as well-known addresses. They are also treated as permanent host groups, similar to the well-known ports of TCP and UDP. Similarly, these well-known multicast addresses are listed in the RFC's most recent allocation numbers. Note the groups represented by these multicast addresses are permanent groups, but their group members are not permanent.

  

Conversion of multicast group address to Ethernet address

The IANA has an Ethernet address block, that is, the high 24bit is 00:00:5e (hexadecimal), which means that the address quickly has a range of addresses from 00:00:5e:00:00:00 to 00:00:5E:FF:FF:FF. The IANA assigns half of these as multicast addresses. In order to indicate a multicast address, the first byte of any Ethernet address must be 01, which means that the Ethernet address range from 01:00:5e:00:00:00 to 01:00:5E:7F:FF:FF should be obtained in relation to IP multicasting.

This address assignment will allow the 23bit in the Ethernet multicast address to correspond to the IP multicast group number by mapping the low 23bit in the multicast group number to the low 23bit implementation in an Ethernet address, as shown in

Multicasting for a single physical network is simple. The multicast process designates the destination IP address as a multicast address, and the device driver converts it to the Ethernet address of the response and sends the data out. The receiving process must notify their IP tiers that they want to receive datagrams destined for a given multicast address, and the device driver must be able to receive these multicast frames. The process is to "join a multicast Group" (The reason for using the "receive process" plural form is to have multiple receivers on the same host or multiple hosts on a certain multicast message, which is why the multicast was first used). When a host receives a multicast datagram, it must send a copy to each process that belongs to that multicast group. This differs from the UDP for a single process receiving unicast UDP datagrams. With multicasting, there may be multiple processes on one host that belong to the same multicast group.

The complexity increases when multicast data is forwarded over a router by extending multicast to a single physical network. There is a need to have a protocol for the multicast router to understand that any host that determines the multicast group in the network is identified. This protocol is the Internet Group Management Protocol (IGMP).

 

Summary

A broadcast is a host group that sends datagrams to all hosts on the network (typically a locally connected network), and multicast is the one that sends datagrams to the network. The basic point of these two concepts is that different types of filtering are used when a data frame sent to the previous protocol stack is received. This protocol layer can discard datagrams for different reasons.

There are currently four types of broadcast addresses: Restricted broadcasts, broadcasts to networks, broadcasts to subnets, and broadcasts to all subnets. The most common is a broadcast that points to a subnet. Restricted broadcasts are usually only used when the system is initially started.

The problem that occurs when trying to broadcast over a router is often because the router does not understand the subnet mask of the destination network. The results are related to a variety of factors: broadcast address type, configuration parameters, and so on.

Class D IP addresses are called multicast group addresses. The conversion of the multicast group address to the Ethernet address can be achieved by mapping its low-bit to the corresponding Ethernet address. Because address mappings are not unique, additional protocols are required to implement extra datagram filtering.

  

  

"Computer network" broadcast and multicast

Related Article

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.