TCP/IP protocol Volume one-----------broadcast and multicast

Source: Internet
Author: User

The little Porter is here again, 51 holidays are over.

1. Introduction

Broadcast and multicast only apply to UDP because TCP is a connection-oriented protocol (IP address determination)

Unicast: The Ethernet frame is only destined for a single destination host, and the destination address indicates a single receive interface. In this mode, any two host communication will not affect the other hosts in the network (except for the contention of the shared channel)

Broadcast: The host sends frames to all other hosts on the network. However, only ARP and RARP can see the process .

Multicast: frames are routed to multiple hosts that belong to a multicast group.


Host-to-frame filtering process:

  1. nic view by letter Channel to determine whether to receive the frame. If you receive it, pass it to the device driver. Usually the network card receives the destination address as the network card physical address or broadcast address of the frame. Most interfaces are set to mixed mode, which can receive a copy of each frame.       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, that address is a multicast address . Hexadecimal can be represented as 01:00:00:00:00:00. (broadcast address FF:FF:FF:FF:FF)
  2. The NIC is passed to the device driver after the frame is received (if the frame is checked and wrong, the NIC will discard the frame). Additional frame filtering is performed by the device driver. First, you must specify the protocol (IP, ARP, and so on) to use in the frame type. Second, multicast filtering is performed to detect whether the host is a multicast address description multicast group
  3. The device driver transmits the data frame to the next layer, for example, when the frame type is specified as the IP datagram, is passed to the IP layer. IP based on the IP address of the source address and destination address for more filtering monitoring. If normal, the datagram is routed to the next layer (TCP or UDP)
  4. udp or the IP receives the transmitted datagram, which is filtered according to the destination port number and sometimes the source port number. If the current is generated. If the UDP datagram is checked and wrong, it will be discarded.

Multicast: Reduces the processing load on hosts that are not interested in broadcast content.

with multicasting, hosts can join one or more multicast groups .

2. Broadcasting

2.1 Restricted broadcast-------------------system used at initial startup

The restricted broadcast address is 255.255.255.255. This address is used for the destination address of the IP datagram during host configuration. Cause: At this point the host does not know the network mask of its own network, and its own IP address.

In any case, the router does not forward datagrams with the destination address as a restricted broadcast address, and such datagrams only appear on the local network .


2.2 Broadcast to the network

The broadcast address to the network is the address where the host number is all 1. For example, 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.

2.3 Broadcast------------------that point to subnets are most commonly used

The broadcast address to the subnet is an address with a host number of 1 and a specific subnet number. The IP address that is the subnet's direct broadcast address requires an understanding of the subnet's mask.

2.4 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 of the broadcast address that points to all subnets and the host number is all 1. For example, if the destination subnet mask is 255.255.255.0, the IP address 128.1.255.255 is a broadcast address that points to all subnets. However, if the network is not dividing subnets, this is a broadcast to the network.

3. Multicast

3.1 Multicast provides two types of services

  1. Transfer data to multiple destination addresses, such as an interactive conferencing system and want to distribute mail or news to multiple recipients. However, even with multicasting, some applications may continue to use TCP to ensure its reliability (?). )
  2. Client requests to the server. For example, the diskless workgroup needs to determine the boot server

3.2 Multicast group address

d class IP address format is as follows:


Figure 1  d class IP address format

28bit allocated as multicast group number

multicast group address range is 224.0.0.0 to 239.255.255.255

.

Note: Some multicast group addresses are identified by IANA as well-known addresses. They are treated as a permanent host group, and the groups represented by these multicast addresses are permanent groups, but their group members are not permanent. For example: 224.0.0.1 represents all system groups within that subnet

3.3 multicast group address to Ethernet address conversion

iana has an Ethernet address block with a high 24bit for 00:00:5e, that is, the address block has a range of addresses from 00:00:5e:00:00:00 to 00 : 00:5e:ff:ff:ff. iana divides half of them into I-multicast addresses. The first byte of any Ethernet address is 01, which is a multicast address . Therefore, the IP multicast corresponds to the Ethernet address range from 01:00:5e:00:00:00 to 01:00:5e:7f:ff:ff ( Why is 7f ).


Because the maximum 5bit in the multicast group number is ignored during the mapping process, the multicast group corresponding to each Ethernet multicast address is not unique. 32 (2^5) a different multicast group number is mapped to an Ethernet address .

Because address mappings are not unique, the device driver or IP layer needs to filter datagrams. Because the NIC may receive multicast data frames that the host does not want to receive. If the NIC does not provide enough multicast data frame filtering, the device driver must receive all multicast data frames and filter them.


LAN network cards tend to two types of processing: one is the network card based on the multicast address of the hash value of multicast filtering, may receive the multicast data do not want to receive, the other is that the network card only receives some fixed number of multicast addresses, when the host wants to receive more than the network card pre-support multicast address outside the multicast address, you must set the Multicast promiscuous "mode. Both types of NIC require the device driver to check whether the received frame is required by the host.


Multicast delivery receive process

The multicast process designates the destination IP address as a multicast address, the device driver converts it to the corresponding Ethernet address, and then sends the data out. While these receive processes need to notify their IP layer, they want to receive datagrams destined for a given multicast address, and the device driver must be able to receive these multicast frames. This process is "join a multicast Group" (multiple receivers exist on the same host or multiple hosts). When a host receives multicast data, he must send a replication to each process that belongs to that multicast group , which differs from the UDP that a single process receives for unicast UDP datagrams. with multicasting, there may be multiple processes on one host that belong to the same multicast group .


When multicast data needs to be forwarded across routers beyond a single physical network, a protocol is required to make the multicast router aware of any host that determines whether the network belongs to a certain multicast group, which is the IGMP protocol (Internet Group Management Protocol)

3.4 The multicast in FDDI and Token Ring networks

The FDDI network uses the same class D IP address to the 48bit FDDI address mapping process. Token ring networks typically use different address mapping methods.









TCP/IP protocol Volume one-----------broadcast and multicast

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.