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

What is the principle of WiFi Multicast Distribution Network?

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article will explain in detail what is the principle of WiFi multicast network distribution. The content of the article is of high quality. Therefore, Xiaobian shares it with you as a reference. I hope that after reading this article, you will have a certain understanding of relevant knowledge.

With the rise of the Internet of Things, IoT WiFi devices accessing the network are exploding, and a large part of them do not have user interaction interfaces, while accessing WiFi hotspots usually requires inputting SSID and Password. WiFi multicast network distribution technology solves this problem very well, and only one mobile phone is needed to complete the network distribution.

1. Multicast.

Multicast, English name Multicast, here it is necessary to mention Broadcast and Unicast at the same time, translated into Chinese is broadcast and unicast respectively, as the name implies, broadcast is a single host to send messages to all hosts in the network, unicast is a conversation between two hosts, and multicast is a single host to send messages to a specific group of hosts. MAC addresses of sending and receiving devices need to be specified in Ethernet data frame headers to determine the source and destination of the data packet. In broadcast, the MAC address of the receiver is 0xFFFF, in unicast, the MAC address of the receiver is the MAC address of the peer, and in multicast, there is a mapping relationship between the MAC address of the receiver and the group address, and WiFi multicast distribution network uses this mapping between the group address and the MAC address.

Those who have used network packet capture tools know that when capturing packets, they will find that computers often communicate UDP with some strange IP addresses, such as 224.0.0.251, 224.0.0.1, 224.0.0.22. These addresses represent a specific group of hosts, and the router will send these UDP packets to the hosts that join the group. For details of multicast technology, please refer to related documents, and this article will not repeat them. IEEE defines 224.0.0.0 ~ 239.255.255.255 as multicast reserved addresses. In Ethernet, the destination IP address is a multicast reserved address packet, and the destination MAC address needs to be mapped. Specifically, the three high bytes of the MAC address are fixed at 01:00:5E, and the last three bytes are the lowest 7 bits of the second byte from the high byte of the group address, and the third byte and the fourth byte of the group address, for example, the MAC address corresponding to group address 225.215.145.230 is 01:00:5E:57:91:E6. What we need to know here is that although most of the multicast MAC addresses we see start with 01:00: 5E, not only MAC addresses starting with 01:00:5E are multicast MAC addresses. The first 24 bits of MAC addresses are called organization unique identifiers.(OUI), 01:00:5E is the IEEE OUI, habitually used by most vendors and literature, to determine whether a MAC is multicast MAC is based on whether bit0 of the first byte of the MAC address is 1.

II. WiFi data frame header structure

Before introducing the WiFi frame header structure, let's first understand some basic principles of WiFi communication. WiFi operates in two bands, 2.4GHz and 5.8GHz, and for simplicity, the 5.8GHz band is temporarily ignored. WiFi has a total of 14 channels in the 2.4G band, which are channels 1-14 respectively, of which 14 channels are only used in Japan. The center frequencies of these channels are 2.412 GHz/2.417 GHz/2.422 GHz/2.427 GHz/2.432 GHz/2.437 GHz/2.442 GHz/2.447 GHz/2.452 GHz/2.457 GHz/2.462 GHz /2.467 GHz/2.472 GHz /2.484 GHz in turn. The center frequencies of the 14th channel and the 13th channel differ by 12MHz, and the center frequencies of the other adjacent channels differ by 5MHz. When in use, the router works on a fixed channel, and the wifi card will cycle through channels 1-13 to scan wifi hotspots, and the wifi card will jump to the channel to connect to the hotspot selected by the end user.

The following is a common 802.11 MAC frame, in the 802.11 MAC frame will indicate the destination MAC address/source MAC address/BSSID respectively indicates which device the wifi data frame is sent to, which device it comes from, which router it is sent from, WiFi network card needs to distinguish which data packets are sent to its own response processing according to the destination MAC address, and which data packets are not sent to its own need to be discarded.

802.11 MAC frames

2 byte

2 byte

6 byte

6 byte

6 byte

2 byte

6 byte

0-2312 byte

6 byte

Frame

Control

Duration

/ID

Addr1

Addr2

Addr3

Seq-ctrl

Addr4

Frame body

FCS

III. WiFi multicast distribution network

WiFi multicast network allocation uses the mapping between group address and multicast MAC address and MAC address information in wifi data frame header to transmit network allocation information.

At the sending end, the data to be transmitted is transmitted by multicast in units of 2 bytes. In order to ensure the correctness of the sequence of data, the data needs to be numbered. In order to facilitate the receiving end to distinguish whether the wifi multicast data frame is a network, both parties agree to use a synchronization header as a preamble. In addition, in order to ensure the effectiveness of transmission, it is also necessary to inform the receiving end of the check value, data length, protocol and version number. If the message exceeds the length of a packet message, The data needs to be divided into multiple packets for transmission. In order to ensure the security of the data, ssid/passphrase/pmk is encrypted by AES encryption algorithm. In order to ensure that no group address ending in 0 will appear, base64 encoding algorithm is used to encode the ciphertext.

The monitoring end enables the WiFi network card to monitor multicast WiFi data frames on channels 1-13 cyclically, uses the agreed multicast MAC address as a synchronization header, enters a receiving mode after monitoring the synchronization header, receives only multicast WiFi data frames from the MAC address, parses after receiving packet header information and data, sequentially restores base64 codes to aes ciphertext, and decrypts them using the agreed key to obtain ssid/passphase/pmk, and completes network configuration.

About WiFi multicast network distribution principle is what to share here, I hope the above content can be of some help to everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.

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

Internet Technology

Wechat

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

12
Report