Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

TCP/IP detailed Volume 1: protocol Chapter 12 Broadcasting and Multicast-Reading Notes

2025-02-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

TCP/IP detailed Volume 1: protocol Chapter 12 Broadcasting and Multicast-Reading Notes

1. Introduction

Broadcast and multicast are used only for UDP, and they are important for applications that need to send messages to multiple recipients at the same time.

Sometimes, a host sends frames to all other hosts on the network, which is a broadcast.

Multicast is between unicast and broadcast: frames are delivered only to multiple hosts that belong to a multicast group.

2. Broadcast

2.1, restricted broadcast

The restricted broadcast address is 255.255.255.255. This address is used for the destination address of the IP Datagram during host configuration, when the host may not know the network mask of its network or even its IP address.

In any case, the router does not forward datagrams whose destination address is a restricted broadcast address, and such data appears only in the local network.

2.2. Broadcast to the network

The broadcast address pointing to the network is the address with the host number of all 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 broadcasts directed to the network, but it must also have a choice not to forward them.

2.3. Broadcasts to subnets

The broadcast address pointing to the subnet is an address with an all-1 host number and a specific subnet number.

The IP address, which is the direct broadcast address of the subnet, requires knowing the mask of the subnet.

2.4. Broadcast to all subnets

Broadcasts to all subnets also need to know the subnet mask of the destination network to distinguish it from the broadcast address pointing to the network. The subnet number and host number pointing to the broadcast address of all subnets are all 1.

3. Examples of broadcasting

4. Multicasting

IP Multicast provides two types of services:

a. Data is transmitted to multiple destination addresses.

b. The customer's request to the server.

4.1, Multicast Group address

Figure 12-2 shows the format of a Class D IP address.

Unlike the other three types of IP addresses (A, B, and C), the assigned 28bit is used as a multicast number and no longer represents anything else.

The multicast group address includes the highest 4bit of 1110 and the multicast group number. They can usually represent dotted decimal numbers, ranging from 224.0.0.0 to 239.255.255.255.

A collection of hosts that can receive data sent to a specific multicast group address is called a host group (host group).

A host group can span multiple networks.

Members of the host group can join or leave the host group at any time.

There is no limit to the number of hosts in a host group, and hosts that do not belong to a host group can send messages to that group.

4.2. Translation of Multicast Group address to Ethernet address

IANA has an Ethernet address block, that is, the high-order 24bit is 0000:00:5e:00:00:00 0000:00:5e:00:00:00 5e (hexadecimal representation), which means that the address block has a range of addresses from 00:00:5e:00:00:00 to Ethernet. IANA generally assigns one of these as multicast addresses. To specify a multicast address, the first byte of any Ethernet address must be 01, which means that the Ethernet address corresponding to the IP multicast idea ranges from 01:00:5e:00:00:00 to 01:00:5e:7f:ff:ff.

This address assignment will correspond the 23bit in the Ethernet multicast address to the IP multicast group number by mapping the low 23bit in the multicast group number to the low 23bit in the Ethernet address, as shown in figure 12-3.

Because the highest 5bit in the multicast group number is ignored in the mapping, the multicast group corresponding to each Ethernet multicast address is not unique. 32 different multicast group numbers are mapped to an Ethernet address.

Since the address mapping is not unique, the device driver or IP layer must filter the data. Because the network card may receive multicast data frames that the host does not want to receive. In addition, if the network card does not provide sufficient multicast data filtering, the device driver must receive all multicast data frames and then filter them.

Recently, I am working on a graduation project, and I happen to use the knowledge of multicast. Read well!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report