当前位置:网站首页>IGMP message (tcp/ip details volume 1/ Volume 2)
IGMP message (tcp/ip details volume 1/ Volume 2)
2022-06-12 15:21:00 【QQ851301776】
Created by QQ:851301776, mailbox :[email protected], Welcome to technical exchange , This blog is mainly my own learning experience , Just to make a little progress every day !
Personal motto :
1. No one was born , As long as it is thick, it will happen .
2. You can have a low degree , You can skip school , But you have to learn
One 、 sketch

IGMP: Used to support host and router multicast I n t e r n e t Group management protocol
It lets all systems on a physical network know the multicast group that the host is currently in . Multicast routers need this information to know which interfaces multicast datagrams should be forwarded to .
Two 、IGMP message

This is version 1 Of I G M P.I G M P The type is 1 Description is the query message sent by the multicast router , by 2 Description is the report message sent by the host . Check the calculation of sum and I C M P The agreement is the same .
The group address is D class I P Address . Set the group address to in the query message 0, In the report message, the group address is the address of the group to participate .
3、 ... and 、IGMP agreement
1. Join a multicast group
Multicast is based on the concept of a process ( The term process is used to refer to a program executed by the operating system ), The process joins a multicast group on a given interface of a host . The members of a multicast group on a given interface are dynamic — It changes at any time as processes join and leave the multicast group .
The process referred to here must join a multicast group on a given interface in some way . A process can also leave a previously joined multicast group . These are any of the hosts that support multicast A P I Necessary parts . Use the qualifier “ Interface ” Because the members in the multicast group are associated with interfaces . A process can join the same multicast group on multiple interfaces .
This implies that a host identifies a multicast group by group address and interface . The host must keep a table , This table contains all multicast groups containing at least one process and the number of processes in the multicast group .
2.IGMP Reports and queries
Multicast routers use I G M P Message to record the changes of group members in the network connected to the router . The rules of use are as follows :
- When the first process joins a group , The host sends a I G M P The report . If multiple processes of a host join the same group , Send only one I G M P The report . This report is sent to the same interface where the process joined the group .
- When a process leaves a group , The host does not send I G M P The report , Even if the last process in the group leaves . After the host knows that there are no more group members in the determined group , Received later I G M P The report message will not be sent in the query .
- Multicast router sends messages regularly I G M P Query to see if any hosts contain processes belonging to the multicast group . The multicast router must send one to each interface I G M P Inquire about . Because the router wants the host to send back a report for each multicast group it joins , therefore I G M P The group address in the query message is set to 0.
- The host sends I G M P Report in response to a I G M P Inquire about , Send back to each group that contains at least one process I G M P The report .
Use these query and report messages , The multicast router maintains a table for each interface , The table records the multicast group of at least one host on the interface . When the router receives the multicast datagram to be forwarded , It only forwards the datagram to ( Use the corresponding multicast link layer address ) It also has interfaces belonging to that group of hosts .
chart 1 3 - 3 It shows two I G M P message , One is the report sent by the host , The other is the query sent by the router . The router is asking each host on that interface to specify each multicast group it joins .

3. Implementation details
To improve the efficiency of the agreement , There are many implementation details to consider . First , When a host first sends I G M P The report ( When the first process joins a multicast group ) when , There is no guarantee that the report will be received reliably ( Because it uses I P Delivery of services ). The next report will be sent after an interval . This time interval is determined by the host at 0 ~ 1 0 Random selection within seconds .
secondly , When a host receives a query from the router , Do not respond immediately , Instead, some responses are sent after a certain time interval ( use “ Respond to ” Because the host must send a response to each group it participates in ). Since multiple hosts participating in the same multicast group can send a report , Their transmission interval can be set to random delay . All hosts in a physical network will receive all reports sent by other hosts in the same group , Because it's like the picture 1 3 - 3 The destination address in the report shown is the group address . This means that if a host is waiting to send a report , Received the same report from other hosts , Then the response of the host does not need to be sent . Because the multicast router doesn't care how many hosts belong to this group , The only concern is whether the group still has at least one host . You bet , A multicast router doesn't even care which host belongs to a multicast group . It just wants to know if there is at least one host in the multicast group on a given interface .
In a single physical network without any multicast routers , Only I G M P Traffic is when the host joins a new multicast group , Support I P Reports from multicast hosts .
4. Time to live field
In the figure 1 3 - 3 in , We noticed that I G M P Lifetime of reports and queries ( T T L ) All set to 1, This involves I P In the first part T T L Field . An initial T T L by 0 Of multicast datagrams will be restricted to the same host . By default , To transmit multicast datagrams T T L Set to 1, This will restrict multicast datagrams to the same subnet . Bigger T T L Value can be forwarded by multicast router .
Datagrams destined for a multicast address are never generated I C M P A mistake . When T T L The value is 0 when , Multicast routers also do not generate I C M P“ Overtime ” A mistake .
Under normal circumstances , The user process does not care about the T T L. However , One exception is Tr a c e r o u t e Program , It mainly depends on the settings T T L Value to complete . Since the multicast application must be able to set up the TTL value , This means that the programming interface must provide this capability to the user process .
By increasing the T T L The method of value , An application program can realize the extended ring search for a specific server ( e x p a n d i n gring search). The first multicast datagram is T T L be equal to 1 send out . If there is no response , Just try to T T L Set to 2, then 3, wait . In this way , The application can find the nearest server measured in hops .
from 2 2 4 . 0 . 0 . 0 To 2 2 4 . 0 . 0 . 2 5 5 The special address space of is intended for multicast with a range not exceeding 1 Application of skip . No matter T T L What is the value , Multicast routers do not forward datagrams whose destination addresses are any of these addresses .
5. all Host group
In the figure 1 3 - 3 in , We saw the router I G M P The query is sent to the destination I P Address 2 2 4 . 0 . 0 . 1. This address is called all host group addresses . It involves all hosts and routers with multicast capability in a physical network . After the interface is initialized , All hosts on multicast capable interfaces automatically join this multicast group . Members of this group do not need to send I G M P The report .
边栏推荐
- Dart typedef的理解
- IMU的学习记录
- C operator
- Solving multithreading security problems
- Deepin20.6 RTX3080 安装显卡驱动510.60.02、CUDA11.6、PyTorch1.11
- ARM 64指令小记
- The difference and brief description of "file name" and < file name > import header file used in # include
- [spark][core] what is an external shuffle service?
- Jetpack architecture component learning (3) -- activity results API usage
- Shardingsphere practice (6) - elastic scaling
猜你喜欢

Use of boost:: bind() in ROS

Solving multithreading security problems
![[jvm learning] virtual machine stack](/img/64/4942c572f1ae4e4c6e2a6b657660e3.jpg)
[jvm learning] virtual machine stack

Acwing summer daily question (sexy prime number on June 10)

Function related matters

Servlet知识详解(2)

Mh32f103arpt6 hardware and software compatible alternative to stm32f103rct6

C escape character

Socket原理讲解(在哪、是什么、怎么用)

Deepin20.6 rtx3080 installing graphics card drivers 510.60.02, cuda11.6, pytorch1.11
随机推荐
Shardingsphere practice (6) - elastic scaling
Pta: self test -3 array element cyclic right shift problem (20 points)
Seaborn的简述
Autofac (2)
ARM 64指令小记
[jvm learning] types of GC and allocation process of objects on JVM heap
Seaborn Brief
Error 1105: message:\“raft entry is too large
Learning is an inhumane thing (becoming an expert's internal mind skill)
Change according to the situation, the road to promotion in the second half of 2022
Servlet连接数据库实现用户登录功能
Ngork implements intranet penetration -- free
IGMP报文(TCP/IP详解卷1/卷2)
MySQL开发注意事项(阿里巴巴开发手册)
UDP总结(TCP/IP详解卷1/2)
USART(RS232422485)、I2C、SPI、CAN、USB总线
同花顺手机炒股开户安全吗
What is reflection-- The soul of frame design
Design concept of ORM framework
FIRSTVT和LASTVT白话版