Networks for the smallest. Part ninth. Multicast / Habr.

Our aspectious LinkMeup provider grows up and turns in quietly by all the services of ordinary telecom operators. Now we have grown up to IPTV.

This implies the need to configure multicast routing and first of all understanding that there is such a multicone.

This is the first deviation from the usual principles of IP networks. Still, the multicast paradigm is radically different from the warm lamp lamp.

You can even say, it somehow challenges the flexibility of your mind in understanding new approaches.

In this article focus on the following:

Traditional video tutorial:

At the dawn of my formation, like an engineer, the theme of the multicast was incredibly frightened, and I associate it with the psychotraham of my first experience with him. " So, Marat, urgently, before noon you need to arouse the video stream to our new building in the city center - the provider will give it here on the second floor "I heard with one wonderful morning. Everything that I then knew about the multicast, so this is what the sender is one, recipients a lot, and it seems that IGMP protocol is somehow involved.

As a result, before noon, we tried to start the whole thing - I defeated the most ordinary VLAN from the entry point to the outlet point. But the signal was unstable - the picture frozen, collapsed, interrupted. I tried in a panic to figure out what can be done with IGMP in general, Tyrrhogozy, turned on the multicast routing, IGMP-snooping, checked a thousand times the delays and losses - nothing helped. And then suddenly everything worked. Of course, stable, trouble-free.

It served me by vaccinating a multicast, and for a long time I did not show any interest to him.

Already much later I came to the next rule: And now, from the height of incomprehensible cases, I understand that there could not be any problems with setting up the network part - buggy finite equipment. Keep calm and trust me. After this article, such things will not scare you. General Understanding Multicast. As you know, the following types of traffic exist: Unicast. - Unicast - one sender, one recipient. ( Example: Query of HTTP-page at the Web server As you know, the following types of traffic exist: ). Broadcast. - Broadcasting - one sender, recipients - all devices in the broadcast segment. ( As you know, the following types of traffic exist: Example: ARP request Multicast. - Multicast - one sender, many recipients. ( Example: IPTV.

AnyCast.

- Unicast of the nearest node - one sender, in general, many recipients, but in fact data is sent only to one. ( Example: AnyCast DNS ).

Since we decided to talk about the multicast, then, perhaps, let's start by this paragraph from the question, where and how it is used.

The first thing that comes to mind is television (IPTV) - one source server sends traffic that needs to receive many customers at once. This is determined by the term itself -

Multicast.

- Multicast broadcasting. That is, if Broadcasts already known to you, means broadcasting to everyone, the multicast means broadcasting a certain group.

  1. The second application is, for example, the replication of the operating system into many computers. This implies loading large data volumes from one server.
  2. Possible scenarios: Audio and video conferencing (one says - everyone listened), e-commerce, auctions, stock exchanges. But this is in theory, and in practice, a multicast is rarely used here.

Another application is the protocol service messages. For example, OSPF in its broadcast domain sends its messages to the addresses 224.0.0.5 and 224.0.0.6. And only those nodes on which OSPF is running will be handled.

We formulate two basic principles of multicast newsletters:

The sender sends only one copy of traffic, regardless of the number of recipients.

Traffic receive only those who are really interested in it.

In this article, we will take IPTV as the most visual example.

Example I.

Let's start with the simplest case: On the source server, the broadcast is configured to group 224.2.2.4 - this means that the server sends traffic to IP address 224.2.2.4. On the client, the video player is configured to take a group of 224.2.2.4. .

At the same time, notice, the client and the server do not have to have addresses from one subnet and ping each other - enough to be in one broadcast domain.

A multicast stream is simply pouring from the server, and the client simply takes it. You can try it directly in your workplace by connecting two computers with a patch and running, for example, VLC.

It should be noted that in the multicast there is no signaling from the source, they say,

"Hello, I am a source, don't you need a little multicast?"

The source server simply starts to broadcast multicast packets in his interface. In our example, they directly enter the client and the one actually take them immediately.

If you catch packages on this link, then you will see that multicast traffic is nothing like the sea UDP packets.

The multicast is not attached to a particular protocol. In fact, everything that defines its addresses. However, if we talk about its application, then in the absolute majority of cases it is UDP. It is easily explained by the fact that usually the data that is needed here is transmitted to the help of multicast. For example, video. If a piece of frame is lost, and the sender will try to send it re-how this happens in TCP, then, most likely, this piece is late, and where to show it then? The train left. Exactly the same with sound.

Accordingly, it is not necessary to install the connection, so TCP is needed.

What is so diverting a multicast from Unicust? I think you already have an assumption. And you probably right. In the usual situation, we have 1 recipient and 1 sender - each of them has one unique IP address. The sender knows exactly where to skate the package and puts this address in the IP header. Each intermediate node due to its routing table knows where to send the package. Unicast traffic between the two nodes is unhindered through the network. But the problem is that only one recipient's IP address is specified in the usual package. What if one and the same traffic has several recipients? In principle, it is possible to expand a unicast approach and to such a situation - to send your copy of the package to each client. Customers will not notice the difference - even one one, at least a thousand, but the difference will be clearly distinguishable on your data transfer channels. GSuppose we have a transfer of one SD channel from a multicast server. Let it use 2 MB / s. Total channels of 30, and watching every channel for 20 people at the same time. It turns out 2 MB / s * 30 channels * 20 people = 1200 MB / s or 1.2 GB / s only on television in case of unicast. But there is still HD channels, where you can safely multiply this figure by 2. And where is the place for torrents?

That is why the address block was laid in IPv4

Class D: 224.0.0.0/4

(224.0.0.0-239.255.255.255). Addresses of this range are determined by a multicast group. One address is one group, usually it is indicated by the letter "

"

That is, saying that the client is connected to the group 224.2.2.4, we mean that it receives multicast traffic with the address of the destination 224.2.2.4.

Example II.

Add a switch to the scheme and a few more customers:

The multicast server still broadcasts for group 224.2.2.4. On the switch, all 4 ports must be in one VLAN. Traffic comes to the switch and the default is sent to all ports of one VLAN. So all customers receive this traffic. On them, the group address 224.2.2.4 is also specified at all in the video player.

Actually, all these devices become members of this multicast group. Membership in it is dynamic: anyone, at any time can enter and get out of it. In this situation, traffic will receive even those who did not want this in general, that is, neither the player is not launched on it, nor anything else. But only if he is in the same VLAN. Later we will deal with how to deal with it.

Please note that in this case, only one copy of the traffic to the switch comes from the source server, and not on a separate copy to each client. And in our example with SD channels, the port load between the source and the switch will not be 1.2 GB / s, but only 60 MB / s (2MB / C * 30 channels).

Actually, this whole huge range (224.0.0.0-239.255.255.255) can be used.

Well, almost all - the first addresses (range 224.0.0.0/23) are still reserved for well-known protocols.

List of reserved IP addresses

Range 224.0.0.0/24 Reserved under Link-Local

communications. Multicast packages with such addresses of destination cannot go beyond the limits of one broadcast segment.

The range 224.0.1.0/24 is reserved under the protocols that you need to transmit a multicast throughout the network, that is, pass through the routers.

Here, in fact, the most basic things about the multicast.

We looked at a simple situation when the source and the recipient are in the same network segment. Traffic received by the switch is simply sent to them in all ports - no magic.

But still it is completely incomprehensible how traffic from the server reaches customers when there is a huge provider network LinkmiaP? And where, in fact, it will be known who is the client? We can't manually register routes, simply because we do not know where customers may be. The usual routing protocols will not answer this question. So we come to understand that the delivery of a multicast is something completely new to us.

In general, to deliver a multicast from the source to the recipient at the moment there are many protocols - IGMP / MLD, PIM, MSDP, MBGP, MOSPF, DVMRP.

We will focus on two of them, which are currently used: PIM and IGMP. With IGMP, the final customer recipients communicate the nearest routers that they want to receive traffic. And PIM builds the path of moving multicast traffic from the source to recipients through routers. Igmp

Return to the dump again. See this top package, after which a multicast stream was thrown?

This IGMP protocol message sent by the client when we pressed the Play on it. That is how he reports that he wants to receive traffic for the group 224.2.2.4.

IGMP - Internet GROUP Management Protocol

- This is a network protocol interacting multicast traffic clients and the nearest router.

IPv6 uses MLD (Multicast Listener Discovery) instead of IGMP. The principle of operation they have absolutely the same, so you can easily change IGMP everywhere on MLD, and IP on IPv6.

How exactly does IGMP work?

Perhaps you need to start with the fact that the versions of the protocol are now three: IgMPv1, IgMPv2, IgMPv3. The most used - the second one, the first is almost forgotten, so we will not talk about it, the third is very similar to the second.

I will be focused on the second, as on the most impact, and consider all events from connecting the client to the group before it is out of it.

The client will also request a group of 224.2.2.4 through the VLC player. The role of IGMP is very simple: if there are no customers - it is not necessary to transmit multicast traffic to the segment. If a client appears, he notifies routers using IGMP that he wants to receive traffic. In order to understand how everything happens, take this network: Suppose the router is already configured to receive and process multicast traffic.

one.

As soon as we launched the application on the client and set the group 224.2.2.4, the package will be sent to the network IgMP Membership Report - The "reports" knot that he wants to receive traffic of this group.

In IGMPV2 Report goes to the address of the desired group, and in parallel it is indicated in the package itself. These messages must live only within their segment and not forward anyway by routers, therefore, they have 1 TTL. Often in the literature you can meet the mention of

IgMP Join.

. Do not be scared - this is an alternative name for IGMP Membership Report.

2.

The router receives an IGMP-Report and, realizing that this interface now has customers, makes information in their tables

This is an output of information on IGMP. The first group is requested by the client. The third and fourth is the SSDP service reports.

Built in Windows. The second is a special group that is always present on Cisco routers - it is used for AUTO-RP protocol. which is activated by default on routers. The FE0 / 0 interface becomes descending for the group of 224.2.2.4 - it will need to send the received traffic. Along with the usual unique routing table there is also a multicast: About the availability of customers says first record

(*, 224.2.2.4)

. And record (172.16.0.5, 224.2.2.4) .

This means that the router knows about the source of a multicast stream for this group. From the output it is clear that traffic for group 224.2.2.4 comes via FE0 / 1, and it is necessary to transmit it to the FE0 / 0 port. The interfaces in which you need to transmit traffic are included in the list of downstream interfaces -

OIL - OUTBOUND INTERFACE LIST

In more detail the command Show IP Mroute. We will discern later. . Above the dump you see that as soon as the client sent an IGMP-REPORT, immediately after it flew up UDP is a video stream. .

3. The client began to receive traffic. Now the router should sometimes check that the recipients still have a gap to not broadcast if suddenly customers are left. To do this, it periodically sends a request to all its descending interfaces. IgMp Query.

* Dump filtered by IGMP * Above the dump you see that as soon as the client sent an IGMP-REPORT, immediately after it flew up UDP is a video stream. .

By default, this happens every 60 seconds. TTL such packages are also equal to 1. They are sent to the address 224.0.0.1 - all the nodes in this segment - without specifying a specific group. Such Query messages are called

General Query.

- general. Thus, the router asks: "Guys, and who and what else wants to receive?".

Having received IGMP General Query, any host that listens to any group must send IGMP Report as it did it when connected. The address of the group of interest to his group should be specified in Report. If, in response to Query, at least one report came to the router, it means there are still customers, he continues to broadcast that the interface from where this report came from, the traffic of this group. If a Query did not have a response from a response interface for some group, the router deletes this interface from its multicast routing table for this group - ceases to send traffic. On its initiative, the client usually sends Report only when connected, then it simply responds to Query from the router. An interesting detail in the client's behavior: Having received Query, he is not in a hurry to reply immediately to Report. The node takes a timeout length from 0 to .Max Response Time. .

which is specified in the next Query: When debugging or in the dump, by the way, it can be seen that several seconds can pass between getting different reports. This is done so that hundreds of customers all the scope not flooded the network with their reports by receiving General Query. Moreover, only one client usually sends Report. The fact is that Report is sent to the group address, and therefore comes to all customers. After receiving Report from another client for the same group, the node will not send its own. Logic is simple: the router has already received this very report and knows that there are customers, it is not necessary.

This mechanism is called

Report Suppression

Next in the article we will tell about why this mechanism in fact is very rarely working four. So goes on for centuries until the client wants to exit the group (for example, turn off the player / TV). In this case, he sends IgMP Leave. to the group address.

The router receives it and in an idea must turn off. But he cannot disable one specific client - the router does not distinguish them - it just has a downstream interface. And the interface can be several customers. That is, if the router deletes this interface from its OUL list (Outgoing Interface List) for this group, the video will turn off at all.

But also not to delete it, it is also impossible - suddenly it was the last client - why then wash it? Above the dump you see that as soon as the client sent an IGMP-REPORT, immediately after it flew up UDP is a video stream. .

If you look into the dump, you will see that after receiving the Leave router, the stream continues to go for some time. The fact is that the router in response to Leave sends IGMP Query to the group address for which this Leave came to that interface where he came from. Such a package is called

GROUP SPECIFIC QUERY.

. Answer it

only GROUP SPECIFIC QUERY. Those clients that are connected to this particular group.

If the router received a response Report for the group, it continues to broadcast in the interface, if not received - removes the timer after the timer has expired.

In total, after receiving Leave, two groups Specific Query goes - one mandatory, second control. Next, the router stops the stream. Querier Consider a little more difficult case: Two (or more) routers that can broadcast traffic are connected to the client segment. If you do nothing, multicast traffic will be duplicated - both routers will receive Report from customers. In order to avoid this there is a choice mechanism - politics. The one who will win will send Query, monitor Report and react to Leave, and, accordingly, it will send traffic to the segment. The loser will only listen to Report and keep your hand on the pulse. Elections occur quite simple and intuitive. Consider the situation from the moment the R1 and R2 routers are turned on. one) Activated IGMP on interfaces. 2) At first, by default, each of them considers himself Querier. 3) Each sends IGMP General Query to the network. The main goal is to find out if there are customers, and in parallel - to declare to other routers in the segment if they are, about your desire to participate in the elections. four) General Query receive all devices in the segment, including other IGMP routers. five) Having received such a message from a neighbor, each router estimates who more worthy. 6) Wins Router S.

Smaller IP.

(specified in the Source IP field of IGMP Query). He becomes Querier, all others - non-querier.

7)

Non-Querier starts the timer that is reset every time Quaryny comes with a smaller IP address. If before the timer expires (more than 100 seconds: 105-107), the router will not receive Query with a smaller address, he declares himself Querier and takes all the corresponding functions. eight) If Querier receives Query with a smaller address, he adds these duties. Querier is becoming another router, which has an IP less.

That rare case when measured, who is less. Querier elections are a very important procedure in the multicast, but some insidious manufacturers who do not hold RFC can insert a strong stick in the wheels. I am talking about IGMP Query with an address of the source 0.0.0.0, which can be generated by the switch. Such messages should not participate in the choice of Querier, but you have to be ready for everything. Here is an example Very complex long-lasting problem.

.

A more couple of words about other IGMP versions Version 1 differs in essence only by the fact that It has no message Leave

.

. If the client does not want to receive more traffic of this group, he simply ceases to send Report in response to Query. When not a single client remains, the timeout router will stop sending traffic. Moreover, No Querier elections are supported.

. In order to avoid duplication of traffic, a higher protocol is responsible, for example, Pim, about which we will speak further Version 3 supports all that supports IGMPv2, but there are a number of changes. First, Report is sent no longer to the group address, but on a multicast service address 224.0.0.22

. And the address of the requested group is indicated only within the package. This is done to simplify the work of IGMP Snooping, which we will talk about

.

Secondly, more importantly, IGMPv3 began to support SSM in its pure form. This is the so-called

Above the dump you see that as soon as the client sent an IGMP-REPORT, immediately after it flew up UDP is a video stream. .

The client will also request a group of 224.2.2.4 through the VLC player. Source Specific Multicast. In IGMPV2 Report goes to the address of the desired group, and in parallel it is indicated in the package itself. These messages must live only within their segment and not forward anyway by routers, therefore, they have 1 TTL. . In this case, the client may not just request a group, but also specify a list of sources from which he would like to receive traffic or vice versa would not want. In IGMPV2, the client simply requests and receives the group traffic without caring for the source. So, IGMP is designed to interact customers and router. Therefore, returning to In more detail the command Example II. 4As you know, the following types of traffic exist: where there is no router, we can authoritatively declare - IGMP there - no more than formality. There is no router, and the client has no one to request a multicast stream. And he will earn a video for the simple reason that the flow and so be pouring from the switch - you just need to pick it up. Recall that IGMP does not work for IPv6. There is MLD protocol Repeat again First of all, the router sent his IGMP General Query after turning on IGMP on its interface to find out if there are recipients and declare their desire to be Querier. At that time, no one was in this group. Then a client appeared, who wanted to receive traffic of the group 224.2.2.4 and he sent his IGMP Report. After that, I went to the traffic on it, but it is filtered out of the dump. Then the router decided for some reason to check - and whether there are no more customers and sent IgMP General Query again to which the client is forced to answer ( five.

Periodically (once a minute) the router checks that the recipients still have, using IGMP General Query, and the node confirms this using IGMP Report.

But still it is completely incomprehensible how traffic from the server reaches customers when there is a huge provider network LinkmiaP? And where, in fact, it will be known who is the client? We can't manually register routes, simply because we do not know where customers may be. The usual routing protocols will not answer this question. So we come to understand that the delivery of a multicast is something completely new to us. 6. Then he changed his mind and refused the group by sending IGMP Leave. 7. The router received Leave and, wanting to make sure that no other recipients are no other recipients, send IgMP Group Specific Query ... twice. And after the expiration of the timer ceases to transmit traffic here. eight. However, it continues to transmit IGMP Query to the network. For example, in case you have not turned off the player, but simply somewhere with the connection of the problem. Then the connection is restored, but the client does not send a report by itself. But Query answers. Thus, the flow can recover without human participation. Once again This is done so that hundreds of customers all the scope not flooded the network with their reports by receiving General Query. Moreover, only one client usually sends Report. - Protocol by which the router learns about the presence of multicast traffic recipients and their disconnection. GROUP SPECIFIC QUERY. IGMP Report

- sent by the client when connected and in response to IGMP Query. This means that the client wants to receive a spectacle of a particular group.

.

IgMP General Query.

- It is sent by the router periodically to check which groups are needed now. As the address of the recipient, 224.0.0.1 is indicated.

IgMP Group Sepcific Query

- sent by the router in response to the message Leave, to find out if there are other recipients in this group. As the recipient's address, the address of the multicast group is indicated.

- Selected by the client when he wants to leave the group.

- If in one broadcast segment there are several routers that can be broadcast, among them one main - Querier is selected. It will periodically send Query and transmit traffic.

Detailed description of all IGMP terms

Pim

So, we figured out how customers inform the nearest router about their intentions. Now it would be nice to transfer traffic from the source to the recipient through a large network. If you think about it, we are standing before a contented complex problem - the source only broadcasts to the group, he knows nothing about where the recipients are located and how many. .

Recipients and the nearest routers know only that they need a spectacle of a particular group, but there are no idea where the source is and what is his address. How to deliver traffic in this situation?

There are several multicast traffic routing protocols: DVMRP

  • , MOSPF.
  • , CBT.

- All of them solve such a task in different ways. But the standard de facto became

PIM - Protocol Independent Multicast

Other approaches are so unwanted that sometimes even their developers practically recognize it. Here, for example, an excerpt from RFC via CBT protocol: CBT Version 2 IS NOT, AND WAS NOT, INTENDED TO BE Backwards Compatible with Version 1; We Do Not Expt This to Cause Extensive Compatibility Problems Because We Do Not Believe CBT IS AT ALL WIDELY Deployed At this Stage.

Pim has two versions that can even be called two different protocols in principle, they are strongly different:

PIM DENSE MODE (DM)

PIM SPARSE MODE (SM) Independent he is because it is not tied to a particular program of routing unique traffic, and later you will see why. .

Pim Dense Mode.

PIM DM.

Trying to solve the problem of delivery of the multicust in the forehead. He obviously assumes that the recipients are everywhere, in all corners of the network. Therefore, initially he puts the entire network of multicast traffic, that is, it sends it to all ports, in addition, where he came from. If then it turns out that somewhere he is not needed, then this branch is "cut off" with the help of a special message Pim Prune - traffic is no longer sent there. But after a while in the same branch, the router is trying again to send a multicast - suddenly recipients appeared there. If not appeared, the branch is cut off again at a certain period. If the client on the router appeared in the interval between these two events, the GRAFT message is sent - the router requests the cut branch back so as not to wait until it drops something. .

As you can see, there is no question of determining the path to recipients - traffic will achieve them simply because it is everywhere.

After "circumcision" of unnecessary branches, a tree remains, along which a multicast traffic is passed. This tree is called

SPT - Shortest Path Tree

It is devoid of loops and uses the shortest path from the recipient to the source. In essence it is very similar to Spanning Tree in STP

Where the root is the source.

SPT is a concrete tree view - the shortest tree tree. In general, any multicone tree is called

MDT - MULTICAST DISTRIBUTION TREE

It is assumed that PIM DM should be used on high-density networks of multicast customers, which explains its name (DENSE). But the reality is such that this situation is rather an exception, and often PIM DM is inappropriate. What is really important for us now is a mechanism to avoid loops. Imagine such a network:

One source, one recipient and the simplest IP network between them. On all routers running PIM DM.

What would happen if there was no special mechanism to avoid loops?

The source sends multicast traffic. R1 receives it and in accordance with the principles of PIM DM sends to all interfaces, in addition, where he came from - that is, on R2 and R3.

R2 enters the same way, that is, it sends traffic towards R3. R3 cannot determine that this is the same traffic that he has already received from R1, so it sends it to all its interfaces. R1 will receive a copy of the traffic from R3 and so on. Here she is a loop.

What does PIM offer in such a situation?

RPF - REVERSE PATH FORWARDING

. This is the main principle of transmitting multicast traffic in PIM (any kind: and DM and SM) - traffic from the source must come along the shortest path. That is, for each received multicast package, it is checked on the basis of the routing table, whether it came from there. 1) The router looks at the address of the multicast packet source.

2) Checks the routing table, through which interface the source address is available.

3) checks the interface through which the multicast package came.

4) If the interfaces coincide - everything is fine, the multicast package is skipped, if the data come from another interface - they will be discarded.

Example: IPTV.

In our example, R3 knows that the shortest path to the source lies through R1 (static or dynamic route). Therefore, multicast packets that come from R1 are tested and received R3, and those that came from R2 are discarded.

This check is called

RPF-Check. And thanks to her even in more complex networks, the loops in MDT will not arise. This mechanism is important to us, because it is relevant and in Pim-SM and works there alone else.

As you can see, Pim is based on the table of unique routing, but first, it does not rout traffic, secondly, it does not matter who and how to filled the table. You will not stop here and consider the work of PIM DM in detail - this is an outdated protocol with a weighing of deficiencies (well, like RIP .

However, PIM DM can be applied in some cases. For example, in very small networks, where the flow of a multicast is small.

Pim Sparse Mode.

A completely different approach applies PIM SM.

. Despite the name (damaged mode), it can successfully be used on any network with an efficiency at least not worse than the PIM DM.

.

Here they refused the idea of ​​unconditional flooding of a multicast network. Interested knots independently request a tree connection using messages 
Pim Join. If the router did not send Join, then the traffic will not be sent. In order to understand how Pim works, let's start with a simple network with a single PIM router:

From the settings to R1, you must enable the ability to routing a multicast, PIM SM on two interfaces (towards the source and towards the client) and IGMP towards the client.

In addition to other basic settings, of course (IP, IGP).

From now on, you can drop the GNS and collect the laboratory. It is enough about how to assemble a stand for a multicast I told in this article.

R1 (Config) #IP Multicast-Routing R1 (config) #Int FA0 / 0 R1 (Config-If) #IP Pim Sparse-Mode R1 (Config-If) #Int FA1 / 0 R1 (Config-If) #IP PIM SPARSE-MODE. Cisco here as usually features its special approach: when you activate the PIM on the interface, IGMP is automatically activated. On all interfaces where PIM is activated, it works and IGMP. At the same time, other manufacturers have two different protocols turn on two different commands: separate IGMP, separately PIM. Forgive Cisco this oddity? Together with all the others? Plus, it may be necessary to configure the RP address ( IP PIM RP-Address 172.16.0.1 , eg). About this later, while accepting as a given and accept.

Check the current status of the multicast routing table for Group 224.2.2.4: After you start the broadcast on the source, you need to check the table again. Let's analyze this little conclusion.

Recording view (*, 225.0.1.1) At the same time, other manufacturers have two different protocols turn on two different commands: separate IGMP, separately PIM. called Plus, it may be necessary to configure the RP address ( (*, G) , / read StarKomadzhi (/ And informs us about recipients. And it is not necessary to talk about one client-computer, in general it can be, for example, another PIM router. It is important to which interfaces need to pass traffic. If the list of downstream interfaces (OIL) is empty -

NULL

, Therefore, there are no recipients - and we have not launched them yet.

Record

(172.16.0.5, 225.0.1.1) (S, G) .

Eskijah

/ And suggests that the source is known. In our case, a source with address 172.16.0.5 broadcasts traffic for group 224.2.2.4. Multicast traffic comes to the FE0 / 1 interface - this is

ascending

Upstream

) Interface.

So, no customers. Traffic from the source comes to the router and on this life ends. Let's add now the recipient - we will set the reception of the multicast on the PC.

The PC sends the IGMP Report, the router understands that customers appeared and updates the multicast routing table. Now she looks like this: A downstream interface appeared: FE0 / 0, which is quite expected. And it appeared both in (*, g) and in (s, g). The list of downstream interfaces is called

Oil - Outgoing Interface List

.

Add another client to the FE1 / 0 interface:

If you read the output literally, we have:

(*, G): There are multicast traffic recipients for Group 224.2.2.4 outside interfaces Fe0 / 0, Fe1 / 0. And absolutely no matter who the sender, what and says the sign "*". 

(S, G): When multicast traffic with the destination address 224.2.2.4 from the source 172.16.0.5 comes to the FE0 / 1 interface, its copies must be sent to Fe0 / 0 and Fe1 / 0.

But it was a very simple example - one router immediately knows the source address and where recipients are located. In fact, even the trees there are no here - except for the degenerate. But it helped us to deal with how PIM and IGMP interact. 
To deal with what PIM is, we turn to the network much more complex

Suppose that all IP addresses are already configured in accordance with the scheme. The network runs IGP for ordinary unique routing. Client1 For example, can ping a source server. But so far PIM, IGMP is not running, customers do not request channels. File initial configuration

So, the moment of time 0.

Turn on multicast routing on all five routers:

RX (Config) #IP Multicast-Routing

PIM is included directly on all interfaces of all routers (including on the interface towards the source server and clients):

Rx (Config) #Int Fex / x Rx (Config-If) #IP Pim Sparse-Mode IgMP, in theory, should be included on the interfaces towards customers, but, as we have already noted above, it turns on automatically on the Cisco Equipment with PIM. The first thing that PIM does - sets the neighborhood. Messages used for this

Pim Hello.

. When you activate the PIM on the interface, Pim Hello is sent to the address

  1. 224.0.0.13
  2. With TTL equal to 1. This means that only routers in one broadcast domain can be neighbors.

As soon as the neighbors got greetings from each other:

Now they are ready to accept applications for multicast groups.

If we now start in the customer's enclosure on the one hand and turn on the multicast stream from the server on the other, then R1 will receive a traffic flow, and R4 will receive an IGMP Report when you try to connect. As a result, R1 will not know anything about recipients, and R4 on the source. It would be nice if information about the source and the Group's clients was collected somewhere in one place. But in what? Such a point of the meeting is called

RENDEZVOUS POINT - RP 

. This is the central concept of PIM SM. Nothing worked without it. Here are the source and recipients.

All PIM routers should know who is RP in the domain, that is, know its IP address. To build a MDT tree, the network is selected as RP some central point, which, responsible for studying the source,

It is a point of attraction of Join messages from all interested. 

There are two ways to task RP: static and dynamic. We will look at both in this article, but begin with static, because what is more likely to be static?

Let R2 be played by RP.

To increase reliability, the LOOPBACK address is usually selected. therefore

for everyone

The routers are executed by the command: RX (Config) #IP PIM RP-Address 2.2.2.2 )

Naturally, this address must be available on the routing table from all points. Well, since the address 2.2.2.2 is RP, on the interface )

LOOPBACK 0. On R2, it is also desirable to activate the PIM. R2 (Config) #Interface Loopback 0 RX (Config-If) #IP Pim Sparse-Mode )

Immediately after that, R4 learns about the source of traffic for the group 224.2.2.4:

And even transfers traffic:

The FE0 / 1 interface comes 362000 b / s, and through the FE0 / 0 interface they are transmitted.

All we did: Next, the router stops the stream. Included the ability to routing multicast traffic (

Consider a little more difficult case: IP Multicast-Routing

Activated PIM on interfaces ( That is, for each received multicast package, it is checked on the basis of the routing table, whether it came from there. IP PIM SPARSE-MODE

Indicated the address rp ( IP PIM RP-ADRESS X.x.x.x. Everything, this is already a working configuration and can be searched, because the scenes are hidden much more than visible on stage. Full configuration with PIM.

- politics. The one who will win will send Query, monitor Report and react to Leave, and, accordingly, it will send traffic to the segment. The loser will only listen to Report and keep your hand on the pulse. Debriefing

Well, how does everything work in the end? How does Rp know where the source where customers and provides communication between them? Since everything turns out for the sake of our favorite customers, then, starting with them, consider the whole process in the details. Client 1 sends IGMP Report for Group 224.2.2.4

R4 gets this query, understands that there is a client outside the FE0 / 0 interface, adds this interface to OIL and forms recording (*, G).

The ascending interface Fe0 / 1 is seen here, but this does not mean that R4 receives traffic for group 224.2.2.4. It only speaks that the only place from where he can receive is FE0 / 1, because it is there that RP is there. By the way, the neighbor who passed

Consider the situation from the moment the R1 and R2 routers are turned on. - R2: 10.0.2.24. Expected.

R4 is called - LHR (Last Hop Router) - the last router on the path of multicast traffic, if you count from the source. In other words, this is the router closest to the recipient. For

Client1. - it is R4 for Client2.

- This is R5.

Since there are no multicast stream on R4 (it has not been requested before), it forms the PIM JOIN message and sends it towards RP (2.2.2.2).

Pim Join is sent by a multicast to the address 224.0.0.13. "In the direction of RP," means through the interface that is specified in the routing table, as OUTBOUND for the address that is specified inside the package. In our case, it is 2.2.2.2 - the address Rp. Such Join is referred to as

JOIN (*, G)

And he says: "It does not matter who source, I need a group traffic 224.2.2.4." That is, each router on the way should handle such Join and, if necessary, send a new Join to the side of RP. (It is important to understand that if there is already this group on the router, it will not send Join - it will simply add the interface from which Join came to OIL and starts passing traffic). In our case, Join went to Fe0 / 1:

R2, having received JOIN, generates a record (*, G) and adds the FE0 / 0 interface to OIL. But Join can no longer send - he himself already RP, and nothing is known about the source yet. But after a while in the same branch, the router is trying again to send a multicast - suddenly recipients appeared there. If not appeared, the branch is cut off again at a certain period. If the client on the router appeared in the interval between these two events, the GRAFT message is sent - the router requests the cut branch back so as not to wait until it drops something. Thus, RP learns about where customers are located.

Activated IGMP on interfaces. If a

Client 2. Also want to receive multicast traffic for the same group, R5 will send Pim Join to Fe0 / 1, because it is RP, R3, having received it, forms a new Pim Join and sends it to Fe1 / 1 - where RP is located. That is, Join travels so node behind the node until it gets to RP or to another router, where there are already customers of this group.

So, R2 is our RP - now knows that for Fe0 / 0 and Fe1 / 0 he has recipients for group 224.2.2.4.

And it doesn't matter how many there are there - one after each interface or a hundred - the flow of traffic will still be one on the interface. If you depict graphically what we got, it will look like this: Remotely resembles a tree, right? Therefore, it is called -

At first, by default, each of them considers himself Querier. RPT - RendezVous Point Tree

. This tree is rooted in RP, and whose branches extend to customers.

More general term as we mentioned above -

- Tree along which the multicast stream is distributed. Later you will see the difference between MDT and RPT.

Now we give the server. As we have already discussed above, he does not worry about Pim, RP, IGMP - he just broadcasts. And R1 gets this stream. His task is to deliver a multicast to rp. In Pim there is a special type of messages - Register . It is needed to register a multicast source on RP.

General Query receive all devices in the segment, including other IGMP routers. So, R1 receives a multicast stream of Groups 224.2.2.4:

R1 is

FHR (First Hop Router)

- The first router on the path of multicast traffic or the closest to the source.

Next, it encapsulates each multicast package received from the source to unique Pim Register and sends it straight to RP.

  1. Pay attention to the protocol stack. On top of the Unicust IP and the PIM header is the original multicast IP, UDP and data.
  2. Now, unlike all others, the PIM messages known to us, in the address of the recipient, 2.2.2.2 is indicated, and not a multicone address.

Such a package is delivered to RP according to the standard rules of unicreten routing and carries the original multicast package, that is, it is ... This is tunneling!

=====================

Task number 1. Scheme and initial configuration. .

Having received such a message from a neighbor, each router estimates who more worthy. On the server 172.16.0.5, an application that can only transmit packages only to a broadcast address 255.255.255.255, with the UDP 10999 recipient port. This traffic must be delivered to customers 1 and 2: .

Customer 1 in the form of a multicast traffic with the group address 239.9.9.9.

And in the client segment 2, in the form of broadcast packages to the address 255.255.255.255.

Details of the task here.

===================== Scheme and initial configuration. RP receives Pim Register, unpacks it and detects traffic under wrapper for group 224.2.2.4. Independent he is because it is not tied to a particular program of routing unique traffic, and later you will see why. Information about this, he immediately enters into its table of multicast routing:

An entry (S, G) - (172.16.0.5, 224.2.2.4). Unpacked RP packets further sends to RPT to FE0 / 0 and Fe1 / 0 interfaces, according to which traffic comes to customers.

In principle, this could be stopped. Everything works - customers get traffic. But there are two problems:

Processes encapsulation and decapsulation - very costly actions for routers. In addition, additional headers increase the size of the package, and it can simply not climb into the MTU somewhere on the intermediate node (you remember all the problems of tunneling).

If suddenly somewhere between the source and Rp there are also recipients for the group, multicast traffic will have to go through one way twice. Take for example here is such a topology: Traffic in register messages will first reach RP along the R1-R42-R2 line, then the net multicast will return along the R2-R42 line. Thus, on the R42-R2 line, two copies of one traffic will go, albeit in opposite directions. Therefore, it is better to transfer a clean multicast to RP to RP, and for this you need to build a tree - Source Tree Therefore, RP sends Pim Join to R1. But now it is indicated in it for the group address not RP, but the source studied from the register message. This message is called Join (S, G) - Source Specific Join His goal is exactly the same as Pim Join (*, G) - build a tree, only this time from the source to RP. Join (S, G) also extends a node behind a node as the usual JOIN (*, G). Join only (*, g) is striving for RP, and JOIN (S, G) to S - source. As the recipient's address is also a service address 224.0.0.13 and TTL = 1. If there are intermediate nodes, for example, R42, they also form recording (S, G) and a list of downstream interfaces for this group and forward JOIN on the source. The path for which join from RP to the source turns into - Tree from the source. But a more common name - - After all, traffic from the source to RP will go along the shortest path.

nine) R1 Having received Join (S, G), adds the FE1 / 0 interface, from which the package came to the list of downstream OIL interfaces and begins to broadcast net multicast traffic, unlosable encapsulation. Recording (S, G) on R1 has already been as soon as it gets the first multiferous package from the source server. According to the built Source Tree, the multicast is transmitted RP (and all intermediate clients if they are, for example, R42). .

But it is necessary to keep in mind that register messages were transmitted all this time and passed until now. That is, in fact, R1 sends two copies of traffic now: one is a pure multicast SPT, the other is encapsulated in Unicustic Register. First, R1 sends a multicast to Register - Package 231.

. Then R2 (RP) wants to connect to the tree, sends Join -

Package 232.

. R1 is still some time while the query is processed by R2, sends a multicast to Register ( Packages from 233 to 238 ). Next, when the downstream interface has been added to the OIL on R1, it begins to transmit pure multicast -

Packages 239 and 242 , but not yet stopping and register - Packages 241 and 243 . BUT и Package 240. - This R2 could not stand and once again asked to build a tree. Scheme and initial configuration. 10) So, the unlaced multicast reaches RP. She understands that this is the same traffic that comes in Register, because the same group address is the same source address and from one interface. In order not to receive two copies, it sends to R1 unique PIM REGISTER-STOP

REGISTER-STOP does not mean that R2 refuses traffic or does not recognize more this source, it only says that it is necessary to stop sending

encapsulated traffic. Next, a fierce struggle - R1 continues to transfer the traffic accumulated in the buffer while the Register-Stop processes, and the usual multicast and inside the register messages:

But, sooner or later, R1 begins to broadcast only pure multicast traffic.

When preparing, I had a legitimal question: well, why all these tunneling, Pim Register? Why not do with a multicast traffic, as with Pim Join - send a hop behind a hop with TTL = 1 towards RP - sooner or later it will come? So it would also build a tree at the same time without unnecessary gestures.

There are several nuances here.

First, the main principle of PIM SM is violated - traffic sent only to where it was requested from.

No join - no tree

! Secondly, if there are no customers for this group, FHR does not recognize this and will continue to send traffic on the "own tree". What is the mindless use of bandwidth? In the world of communication, such a protocol simply would not survive, as did not survive PIM DM or DVMRP. So we have one large MDT tree for group 224.2.2.4 from

Now we give the server. As we have already discussed above, he does not worry about Pim, RP, IGMP - he just broadcasts. And R1 gets this stream. His task is to deliver a multicast to rp. Source servers Register before Customer 1.

Customer 2.

. And this MDT is made up of two pieces, which were built independently of each other:

from the source to rp and RPT from RP to customers. Here it is the difference between the MDT from RPT and SPT. MDT is a rather common term that means a multicast transmission tree in general, while RPT / SPT is its very specific appearance.

And what if the server is already broadcast, and there is no customer and not? Multicast so will clog the site between the sender and RP?

No, in this case, Pim Register-Stop will also help. If the REGISTER message has begun on RP for some group, and there are no recipients for it, RP is not interested in obtaining this traffic, therefore,

Do not send

Pim Join (S, G), RP immediately sends Register-Stop to R1.

R1, having received the register-stop and seeing that there is no tree for this group (no customers), starts to discard multicast traffic from the server.

That is, the server itself is not worried about this very much and continues to send the flow, but, having reached the router interface, the flow will be discarded.

In this case, RP continues to store entry (S, G). That is, the traffic does not get, but where the source is located for the group knows. If recipients appear in the group, RP learns about them and sends to the source Join (S, G), which builds a tree.

In addition, every 3 minutes R1 will try to re-register a source on RP, that is, send register packets. It is necessary in order to notify RP that this source is still alive.

In particularly inquisitive readers, the question must arise - what about RPF? After all, this mechanism checks the address of the sender of the multicast package and if the traffic does not come from the correct interface, it will be discarded. At the same time, the RP and source may be at different interfaces. So in our example for R3 RP - for Fe1 / 1, and the source for Fe1 / 0. . BUT The answer is predictable - in this case, the source address is checked, but RP. That is, traffic must come from the interface towards RP. But, as you see further, this is also not an unrealistic rule. .

It is important to understand that RP is not a universal magnet - for each group there may be its RP. That is, there may be two of them in the network, and three, and a hundred - one RP is responsible for one set of groups, the other is after another. Moreover, there is such a thing as AnyCast RP. And then different RP can serve the same group. Task number 2. и - it is R4 for Note to topology : In this problem, only R1, R2 routers are running administrators of our network. That is, the configuration can only be changed on them. Server 172.16.0.5 transmits multicast traffic to groups 239.1.1.1 and 239.2.2.2.

Configure the network so that the traffic of the group 239.1.1.1 is not transmitted to the segment between R3 and R5, and in all segments below R5.

But at the same time, the traffic group 239.2.2.2 should be transmitted without problems.

Details of the task here.

=====================

Razor OKKAMA or disabling unnecessary branches

After the last client in the segment refused to subscribe, the PIM must cut off the excess RPT branch.

Let, for example, the only client on the R4 turned off the computer. IGMP Leave router or after three unanswered IGMP Query understands that there is no more customers for Fe0 / 0, and sends to RP message

Pim Prune . According to the format, it is exactly the same as JOIN, but performs the opposite function. The destination address is also 224.0.0.13, and TTL is 1.

But the router who received Pim Prune before deleting a subscription, waiting for some time (usually 3 seconds - Join Delay Timer).

This is done for such a situation:

In one broadcast domain 3 router. One of them is higher and it is he who transmits multicast traffic to segment. This is R1. For both routers (R2 and R3), its OIL contains only one record.

If now R2 decides to disconnect and send Pim Prune, he can substitute his colleague R3 - R1 after all will stop broadcasting into the interface at all.

So, so that this does not happen, R1 and gives timeout in 3 seconds. During this time, R3 must have time to react. Given the broadcast network, it will also receive Prune from R2 and therefore, if he wants to continue to receive traffic, he instantly sends the usual Pim Join to the segment, notifying R1 that it is not necessary to delete the interface.

This process is called Prune Override. R2, as it were, echriting R1, intercepted the initiative.

SPT SwitchOver - Switching RPT-SPT

Until now, we mostly considered only

. Now let's turn to Customer 2. At first everything is identical for him Customer 1. - He uses RPT from RP, which we have considered earlier. By the way, since both - and

Client 1. .

- use one tree, such a tree is called

Shared Tree

- This is a fairly common name. Shared Tree = RPT.

  • This is how the multicast routing table on R5 looks like at the very beginning, immediately after the construction of the tree: There is no record (S, G), but this does not mean that multicast traffic is not transmitted. Just R5 does not care about who sender. Please note how the traffic should go in this case - R1-R2-R3-R5. Although in short, the path R1-R3-R5.
  • And if the network is more complicated? Somehow neakkuratnyko. Please note how the traffic should go in this case - R1-R2-R3-R5. Although in short, the path R1-R3-R5.
  • The fact is that while we are tied to RP - it is RPT root, only she at first know where who is. However, if you think about the first multicast package, all routers along the traffic path will know the source address, because it is specified in the IP header. Why don't anyone send Join yourself towards the source and optimize the route? )

Site in the root. Such switching can initiate

LHR (Last Hop Router)

- R5. After receiving the first multicast packet from R3 R5, it sends the Source Specific Join (S, G) to us to the FE0 / 1 interface, which is specified in its routing table, as an outgoing for network 172.16.0.0/24.

Having received such Join, R3 sends it not to RP, as it did with the usual Join (*, G), but towards the source (via the interface according to the routing table). That is, in this case, R3 sends JOIN (172.16.0.5, 224.2.2.4) to the FE1 / 0 interface. .

Next, this join falls on R1. And R1 by and large without a difference, who sent it - rp or someone else - it simply adds Fe1 / 1 to its OIL for group 224.2.2.4. At this point, between the source and the recipient, two ways and R3 receive two streams. Time to make a choice to trim unnecessary. And it is R3 that it does, because R5 can no longer be able to distinguish between these two streams - they both will come through one interface.

As soon as R3 recorded two identical streams from different interfaces, it chooses preferred according to the routing table. In this case, direct, better than via RP. At this point, R3 sends Prune (S, G) to the side of RP, burning this RPT branch. And from this point there is only one stream directly from the source.

Thus, PIM built SPT - Shortest Path Tree. It is Source Tree. This is the shortest path from the client to the source. By the way, the tree from the source to the RP, which we have already considered higher, are essentially the same SPT.

It is characterized by recording (S, G). If the router has such a record, then it knows that S is a source for the group G and the SPT tree built.

The root of the SPT tree is the source and really want to say "the shortest path from

Source to customer " But it is technically incorrect, since paths from the source to the client and from the client to the source can be different. Namely from the client starts to build a tree branch: the router sends Pim Join towards the source / RP and RPF also checks the correctness of the interface when Receipt

traffic.

You remember that at the beginning of this paragraph on R5 there was only an entry (*, G), now after all these events there will be two: (*, g) and (S, G) By the way, even if you look at the multicast routing table of R3 to the same second, as PLAY PLAY in VLC, you will see that it is already getting traffic from R1 directly, what does the presence of recording (S, G) says. . That is, SPT Switchover has already happened - this is the default action on the equipment of many manufacturers - to initiate switching after receiving the first multicast package. Generally speaking, such a switch may occur in several cases: . According to the format, it is exactly the same as JOIN, but performs the opposite function. .

Do not happen at all (team

IP PIM SPT-THRESHOLD INFINITY

).

Upon definite bandwidth utilization (team

IP PIM SPT-THRESHOLD X Certainly - immediately after receiving the first package (default or NO IP PIM SPT-THRESHOLD X

As a rule, the decision that "time" takes LHR.

In this case, the second time the RPF operation is changed - it checks the source location again. That is, out of two multicast streams - from RP and from the source - preference is given traffic from the source.

DR, ASSERT, FORWARDER

Some more important points when considering PIM.

DR - Designated Router

This is a dedicated router, which is responsible for sending utilities on RP.

Source Dr.

- responsible for the adoption of multicast packets directly from the source and register it on RP. Here is an example of topology: .

There is nothing to do something that both routers pass traffic to RP, let them reserve each other, but the responsible must be only one. Since both routers are connected to one broadcast network, they get PIM-Hello from each other. On the basis of it, they make their choice. Pim Hello carries the priority value of this router on this interface.

The greater the value, the higher the priority. If they are the same, the knot is selected with the highest IP address (also from Hello message). If another router (not DR) during the Holdtime (default 105 s) did not receive Hello from a neighbor, it automatically assumes the role of DR. Essentially Source DR is

FHR - FIRST HOP ROUTER

Receiver Dr. - The same as Source DR, only for multicast traffic recipients - R2 (Config) #Interface Loopback 0 RX (Config-If) #IP Pim Sparse-Mode .

Example topology: Receiver DR is responsible for sending to RP Pim Join. In the above topology, if both routers will send JOIN, both will receive multicast traffic, but there is no need. Only DR sends Join. The second simply monitors the availability of DR. :

Since DR sends JOIN, it will also broadcast traffic in LAN. But then a natural question arises - and what if Pim DR'om became one, and IgMp Querier else? And the situation is quite possible, because for Querier, the less IP, the better, and for DR, on the contrary. - it is R4 for In this case, the DR is selected that router, which is already querier and this problem does not occur.

The Receiver DR selection rules are exactly the same as Source DR.

ASSERT and PIM FORWARDER

The problem of two simultaneously transmitting routers may occur in the middle of the network, where there are no ultimate customers or sources - only routers. Very acute this question stood in Pim DM, where it was a completely ordinary situation because of the Flood and Prune mechanism. But in Pim SM, it is not excluded.

Consider such a network: From the output it is clear that traffic for group 224.2.2.4 comes via FE0 / 1, and it is necessary to transmit it to the FE0 / 0 port. Here, three routers are in the same network segment and, accordingly, are neighbors of PIM. R1 acts as RP.

R4 sends Pim Join towards RP. Since this multicast package it falls on R2 and on R3, and both of them processing it, add a downstream interface in OIL.

Here it would be necessary to work the DR selection mechanism, but also on R2 and on R3 there are other clients of this group, and both routers can also be sent to Pim Join.

When multicast traffic comes from the source on R2 and R3, it is transmitted to both routers in the segment and rebel there. PIM does not try to prevent such a situation - here it acts on the fact of a challenged crime - as soon as the router receives a multicast traffic of this group in his downstream interface (from the OIL list), he understands: something is wrong - another sender already has In this segment. Then the router sends a special message. Pim Assert.

Such a message helps to choose 

Pim Forwarder.

- The router that is entitled to broadcast in this segment. Do not be confused with PIM DR. First, PIM DR is responsible for sending Pim Join and Prune , and Pim Forwarder - for sending Traffic

. The second difference - PIM DR is always selected in any networks when establishing a neighborhood, and Pim Forwrder is only if necessary - when multicast traffic from the interface from the OIL list is obtained.

Select RP. 

Above we for simplicity asked RP by hand IP PIM RP-Address And here's how the team looked like

Show IP PIM RP

But we will present a completely impossible situation in modern networks - R2 failed. This is all - finish. It will still work, because SPT SwitchOver occurred, but everything is new and everything that went through RP will break, even if there is an alternative way. Well, the load on the domain administrator. Imagine: to kill 50 routers by hand at least one command (and for different groups, it may be different RPs). The dynamic selection of RP allows and avoiding handmade and ensure reliability - if one RP becomes unavailable, another will take immediately into battle. Currently there is one generally accepted protocol that allows it to do - Bootstrap . Tsiska in former times promoted a few clumsy AUTO-RP

but now it is almost not used, although the tsiska does not recognize it, and We have an annoying rudiment in the form of a group of 224.0.1.40. It is necessary to actually pay the AUTO-RP protocol. He was a salvation in former times. But with the advent of open and flexible bootstrap, he naturally gave way to his position.

So, suppose that in our network we want R3 to pick up the RP functions in case of failure of R2.

R2 and R3 are defined as candidates for the role of RP - so they are called

C-RP.

. On these routers, configure:

RX (Config) Interface Loopback 0 RX (Config-If) IP PIM SPARSE-MODE RX (Config-If) Exit Rx (Config) #IP PIM RP-Candidate Loopback 0

  1. But still nothing happens - candidates do not yet know how to notify everyone about themselves.
  2. To inform all the multicast domain routers about existing RP entered mechanism
  3. BSR - Bootstrap Router
  4. . There may be several applicants, like C-RP. They are called respectively
  5. C-BSR
  6. . They are configured in a similar way.

Let BSR be with us one and for the test (exclusively) it will be R1. But after a while in the same branch, the router is trying again to send a multicast - suddenly recipients appeared there. If not appeared, the branch is cut off again at a certain period. If the client on the router appeared in the interval between these two events, the GRAFT message is sent - the router requests the cut branch back so as not to wait until it drops something. R1 (Config) Interface Loopback 0 R1 (Config-If) IP PIM SPARSE-MODE R1 (Config-If) Exit R1 (config) #IP PIM BSR-Candidate LOOPBACK 0 Independent he is because it is not tied to a particular program of routing unique traffic, and later you will see why. First, one main BSR is selected from all C-BSR, which will be charged to everyone. To do this, each C-BSR sends a multicast called Bootstrap Message (BSM) Scheme and initial configuration. The address 224.0.0.13 is also a PIM protocol package. It must be accepted and processing all the multicast routers and after sending to all ports where the PIM is activated. BSM is transmitted not to the side of something (RP or source), in contrast to Pim Join, and in all directions. Such a fan mailing helps to achieve BSM of all corners of the network, including all C-BSR and all C-RP. In order for the BSM to wandered over the network infinitely, the same RPF mechanism is applied - if the BSM came from the wrong interface behind which the network of the sender of this message is released, such a message is discarded. That is, each router on the way should handle such Join and, if necessary, send a new Join to the side of RP. (It is important to understand that if there is already this group on the router, it will not send Join - it will simply add the interface from which Join came to OIL and starts passing traffic). With these BSM, all multicast routers determine the most worthy candidate based on priorities. As soon as C-BSR receives a BSM from another router with a large priority, it stops sending its messages. As a result, everyone possess the same information. Forgive Cisco this oddity? Together with all the others? . : In this problem, only R1, R2 routers are running administrators of our network. That is, the configuration can only be changed on them. At this stage, when the BSR is selected, due to the fact that its BSM has diverged throughout the network, C-RP knows its address and uniqueness send messages to it

Candidte-RP-Advertisement in which they carry a list of groups that they serve - this is called Group-to-RP Mapping . BSR All these messages aggregates and creates RP-set. - Information table: what rp each group is serviced. Next, the BSR in the former fan manner sends the same bootstrap message, which this time contain RP-SET. These messages successfully achieve all multicast routers, each of which Alone Makes a choice which RP must be used for each specific group. BSR periodically makes such distribution so that on the one hand everyone knew that information on RP is still relevant, and on the other C-BSR, they were aware that the main BSR itself is still alive. RP, by the way, also periodically send your Candidate-RP-Advertisement announcements to BSR. Also want to receive multicast traffic for the same group, R5 will send Pim Join to Fe0 / 1, because it is RP, R3, having received it, forms a new Pim Join and sends it to Fe1 / 1 - where RP is located. In fact, everything you need to do to configure the automatic RP selection - specify C-RP and specify C-BSR - not so much work, everything else will make PIM for you. As always, in order to increase reliability, it is recommended to specify the Loopback interfaces as candidates. Completing the chapter of PIM SM, let's notice the most important moments Very acute this question stood in Pim DM, where it was a completely ordinary situation because of the Flood and Prune mechanism. An ordinary unique connection must be provided with IGP or static routes. This underlies the RPF algorithm. The tree is based only after the client appears. It is the client that initiates the construction of a tree. No client - no tree. RPF helps to avoid loops. All routers should be aware of who RP is only with its help you can build a tree. The RP point can be statically indicated, and can be selected automatically using the BootStrap protocol. RPT is built in the first phase - a tree from customers to RP - and Source Tree - a tree from the source to RP. In the second phase, switching from the built RPT on SPT is the shortest path from the recipient to the source. I also list all types of trees and messages that we are now known. . A common term describing any multicast transmission tree.

. A tree with the shortest way from the client or RP to the source. In Pim DM there is only SPT. In PIM SM SPT may be from the source to RP or from the source to the recipient after the SPT SwitchOver occurred. Indicated by record

- Known source for group.

- The same as SPT.

. Tree from RP to recipients. Used only in PIM SM. Indicated by record

- Same as RPT. It is called so because all customers are connected to one common tree with root in RP.

PIM SPARSE MODE messages:

Hello.

- to establish neighborhood and maintaining these relationships. Also necessary to select DR. JOIN (*, G) - Request for connection to the group G. No matter who source. Departs towards RP. With their help, the RPT tree is built. Join (S, G) - Source Specific Join. This is a request to connect to a group G with a specific source - S. sent towards the source - S. With their help, the SPT tree is built.

Prune (*, G)

- Request for disconnecting from the tree G, whatever sources for it were. Departs towards RP. So the branch RPT is covered.

  • Prune (S, G)
  • - Request for shutdown from the tree G tree, the root of which is S. S. System is sent towards the source. So the SpT branch is cut.
  • - A special message within which the multicast is transmitted to RP until SPT is built from the source to RP. Transmitted by Unicast from FHR on RP.

REGISTER-STOP.

- It is sent by Unicust with RP to FHR, ordering to stop sending multicast traffic, encapsulated in Register.

- BSR mechanism packets that allow you to select a router to the BSR role, and also transmit information about existing RP and groups.

Assert.

- Message to select Pim Forwarder so that two routers have passed into one segment.

Candidate-RP-Advertisement

- A message in which RP sends information about which groups it serves. 

RP-REACHABLE

- Message from RP, which she notifies all about its availability.

  • * There are other types of messages in PIM, but these are already details *
  • And let's now try to abstract from the details of the protocol? And then its complexity becomes obvious.
  • 1) RP definition, 2) registration of the source on RP, 3) Switching the SPT tree.

Many protocol states, many records in the multicast routing table. Is it possible to do something? To date, there are two diametrically opposite approaches to Simplify PIM: SSM and Bidir Pim. SSM.

All that we have described still is

ASM - ANY SOURCE MULTICAST

. Customers are indifferent who is a source of traffic for the group - the main thing is that they receive it. As you remember, the IGMPv2 report is requested simply connecting to the group.

SSM - Source Specific MultiCast - Alternative approach. In this case, clients indicate the group and source when connected. What does it give? No more: the ability to completely get rid of RP. LHR immediately knows the source address - there is no need to send Join on the RP, the router can immediately send Join (S, G) in the direction of the source and build SPT.

So we get rid of

RP search (Bootstrap and Auto-RP protocols),

Registration of the source on the multicast (and this is too much time, dual use of bandwidth and tunneling) Switching to SPT. Since there is no RP, then no RPT, respectively, on one router will not be no entries (*, G) - only (S, G).

Another problem that is solved with SSM is the presence of several sources. In ASM it is recommended that the address of the multicast group is unique and only one source broadcast on it, because in the RPT tree several streams are somewhat, and the client, getting two streams from different sources, probably will not be able to disassemble them. In SSM, traffic from different sources is distributed independently, each in its SPT tree, and this is already becoming not a problem, and the advantage - several servers can be broadcast simultaneously. If suddenly the client began to fix losses from the main source, he can switch to the backup, not even rebuilding it - he also received two streams. In addition, the possible vector of attacks on the network with activated multicast routing is to connect the intruder of its source and generating a large amount of multicast traffic that overloads the network. In SSM, this is practically excluded.

For SSM, a special range of IP addresses is highlighted: 232.0.0.0/8. On routers to support SSM, PIM SSM mode is enabled. Router (Config) # IP PIM SSM

IgMPV3 and MLDV2 support SSM in pure form.

When using them, the client may

Request connection to just a group, without specifying sources. That is, it works as a typical ASM.

Request a connection to a group with a specific source. Sources can be specified several - a tree will be built before each of them. Request a group connection and specify a list of sources from which the client did not want would receive traffic

IgMPV1 / V2, MLDV1 do not support SSM, but there is such a thing as Request a connection to a group with a specific source. Sources can be specified several - a tree will be built before each of them. SSM Mapping. . At the next to the client, the router (LHR) each group is put in accordance with the source address (or several). Therefore, if there are clients not supporting IgMPV3 / MLDV2, SPT will also be built for them, and not RPT, due to the fact that the source address is still known. SSM Mapping can be implemented both static setting on LHR and by referring to the DNS server. The SSM problem is that customers must know the source addresses in advance - they are not communicated to them. Therefore, SSM is good in those situations when the network has a certain set of sources, their addresses are known to know and will not change. And client terminals or applications are tied to them. In other words, IPTV is a very suitable environment for implementing SSM. It describes the concept well One-to-Many

- One source, many recipients.

Bidir Pim.

And what if in the network sources can appear spontaneously there, then, to broadcast on the same groups, quickly stop transmission and disappear?

For example, this situation is possible in network games or a data center, where data is replicated between different servers. This is a concept Many-to-Many - Many sources, many customers.

How does the usual PIM SM look at it?

It is clear that the inert Pim SSM is not at all suitable?

You just think what chaos will begin: endless registration of sources, rebuilding trees, a huge number of records (S, G) living for a few minutes due to the protocol timers.

  • Bidirectional PIM is being revenue ( Bidirectional Pim, Bidir Pim
  • ). Unlike SSM, it is completely completely refused by SPT and records (S, G) - only Shared Tree remains with root in RP. And if in the usual PIM, the tree is one-sided - traffic is always transmitted from the source down SPT and from RP down the RPT - there is a clear division where the source where customers, then in bidirectional from the source traffic to the RP, also passes up Shared Tree - In the same way, according to which traffic flows down to customers.
  • This allows you to refuse to register a source on RP - traffic transfers certainly without any alarm and state changes. Since SPT trees are not at all, then SPT SwitchOver does not occur too. For example: Request a connection to a group with a specific source. Sources can be specified several - a tree will be built before each of them. Source1
  • began to transfer the traffic group 224.2.2.4 to the network simultaneously with Source2. . The streams from them just poured towards RP. Some customers who are nearby began to receive traffic at once, because on routers there is an entry (*, G) (there are customers). Another part receives traffic on Shared Tree from RP. And they receive traffic from both sources at the same time. That is, if you take a speculative network game for an example, . At the next to the client, the router (LHR) each group is put in accordance with the source address (or several). Therefore, if there are clients not supporting IgMPV3 / MLDV2, SPT will also be built for them, and not RPT, due to the fact that the source address is still known. This is the first shooter in the shooter, which made a shot, and

Source2.

- This is another player who took a step to the side. Information about these two events spread throughout the network. AND

everyone

Example: IPTV.

Another player (

.

Recipient

) I must learn about both of these events.

If you remember, then just before we explained why the process of registration of the source on RP is needed - so that traffic does not occupy the channel when there are no customers, that is, RP just refused it. Why do we not think about this problem now? The reason is simple: Bidir Pim for situations where there are many sources, but they are not constantly broadcast, but periodically, relatively small pieces of data. That is, the channel from the source to RP will not be disposed of water.

Please note that in the image above between R5 and R7 there is a straight line, much shorter than the path through RP, but it has not been used, because Join goes towards RP according to the routing table in which this path is not optimal.

It looks quite simple - you need to send multicast packets in the RP direction and everything, but there is one nuance that all spoils - RPF. In the RPT tree, it requires that traffic comes from RP and not otherwise. And we can come from anywhere. We, of course, cannot take and abandon RPF - this is the only mechanism that avoids the formation of loops.

Therefore, the concept is introduced into Bidir PIM

DF - Designated Forwarder

. In each network segment, one router, whose route to Rp is better is selected on each line to this role.

Including this is done on those lines where customers are directly connected. Bidir Pim DF is automatically DR.

The OIL list is formed only from those interfaces on which the router was selected for the role of DF.

Rules are quite transparent:

If the PIM Join / Leave request comes to that interface, which in this segment is DF, it is transmitted towards RP according to the standard rules.

Here, for example, R3. If requests came to DF interfaces, which are marked with a red circle, it transmits them to RP (via R1 or R2, depending on the routing table).

If the Pim Join / Leave request came to a non-DF interface, it will be ignored. Suppose that the client, which is between R1 and R3, decided to connect and sent IGMP Report. R1 gets it through the interface where it is selected DF (marked with a red circle), and we return to the previous scenario. And R3 receives a request to an interface that is not DF. R3 sees that he is not the best here, and ignores the request. (If multicast traffic came to the DF interface, it will be sent to the interfaces from the OIL list and towards RP. For example,

Began to transmit traffic. R4 Gets it into your DF interface and transmits it to another DF interface - towards the client and towards RP, it is important because traffic should get on RP and spread over all recipients. R3 also enters - one copy to the interfaces from the OIL list - that is, on R5, where it will be discarded due to RPF check, and the other is towards RP.

If multicast traffic came to a non-DF interface, it must be sent to interfaces from the OIL list, but

will not be

Posted towards RP.

For instance,

Began to broadcast, traffic reached RP and began to spread down the RPT. R3 gets traffic from R1, and it will not transmit it to R2 - only down on R4 and R5.

Thus, DF guarantees that only one copy of the multicast package and the loop formation is excluded on Rp will eventually be sent. At the same time, the common tree in which the source is located, of course, will receive this traffic before entering RP. RP, according to ordinary rules, traffic will be sent to all the Oil ports, in addition, where traffic came from.

By the way, there is no need for the ASSERT messages, because DF is selected in each segment. Unlike the DR, he is not only responsible for sending a Join to RP, but also for the transmission of traffic to the segment, that is, the situation when the two routers are transmitted to one posture, excluded in Bidir Pim.

Perhaps the last thing you need to say about bidirectional PIM is the features of RP. If the PIM SM RP performed a specific function - registration of the source, then in Bidir Pim RP is a certain very conditional point to which traffic is striving on one side and Join from customers on the other. No one should perform decapsulation, to ask the construction of the SPT tree. Just on some router suddenly traffic from sources begins to be transmitted to Shared Tree. Why am I saying "on some"? The fact is that in Bidir Pim RP - an abstract point, and not a specific router, as an RP address can perform a non-existent IP address - the main thing is that it is routed (such an RP is called Phantom RP

All terms relating to PIM can be found in Glossary Multicast on channel So, behind the long labor week with lack of sleep, processing, tests - you have successfully implemented a multicast and satisfied customers, director and sales department. Friday is not the worst day to overlook the creation and afford a pleasant stay. .

Friday is not the worst day to overlook the creation and afford a pleasant stay.

But your afternoon dream suddenly disturbed the call of technical support, then one more and yet - nothing works, everything broke. Check - go losses, breaks. Everything converges on one segment from several switches.

SSH uncredited, checked the CPU, checked the disposal of interfaces and hair end - loading almost under 100% on all interfaces of one VLAN. The loop! But where does it come from if no work was held? 10 minutes of checking and you noticed that on the upstream interface to the kernel you have a lot of incoming traffic, and on all descending to customers - outgoing. For the loop, it is also characteristic, but somehow suspiciously: Introduced a multicast, did not make any work on switching and the jump only in one direction.

Checked a list of multicast groups on the router - and there is a subscription to all possible channels and everything on one port is naturally the one that leads to this segment.

The meticulous investigation has shown that the client's computer is infected and sends IGMP Query to all multicast addresses in a row.

Package losses began, because the switches had to pass through themselves a huge amount of traffic. This caused overflow of interface buffers.

The main question is why the traffic of one client began to be copied to all ports?

The reason for this lies in the nature of multicast MAC addresses. The fact is, the space of multicast IP addresses is specially displayed in the space of multicast MAC addresses. And the snag is that they will never be used as a source MAC address, and therefore will not be studied by the switch and are listed in the MAC address table. What does the switch with frames do, whose destination address is not studied? He sends them to all ports. What happened.

This is the default action.

Multicast MAC Addresses So what MAC addresses are substituted into the Ethernet header of such packages? Broadcast? Not. There is a special range of MAC addresses in which multicast IP addresses are displayed. Register These special addresses begin:

0x01005E and the next 25th bit must be 0

Try to answer why so

). The remaining 23 bits (remind you all in the MAC-address 48) are transferred from the IP address.

Here lies some not very serious, but the problem. The range of multicast addresses is determined by the mask 224.0.0.0/4, which means that the first 4 bits are reserved: 1110, and the remaining 28 bits can change. That is, we have 2 ^ 28 multicast IP addresses and only 2 ^ 23 MAC addresses - to display 1 in 1 lack 5 bits. Therefore, just the last 23 bits of IP addresses are taken and one to one is transferred to the MAC address, the remaining 5 are discarded.

In fact, this means that 2 ^ 5 = 32 IP addresses will be displayed in one multicast MAC address. For example, groups 224.0.0.1, 224.128.0.1, 225.0.0.1 and so until 239.128.0.1, everyone will be displayed in one MAC address 0100: 5E00: 0001.

If you take a streaming video dump as an example, you can see:

IP address - 224.2.2.4, MAC address: 01: 00: 5e: 02: 02: 04.

There are also other multicast MAC addresses that do not belong to the IPv4-multicast (click

). All of them, by the way, are characterized by the fact that the last bit of the first octet is equal to 1.

Naturally, neither on the same network card cannot be configured by such a MAC address, so it will never be in the Source Mac Ethernet field and will never fall into the MAC address table. So such frames should be sent as any Unknown Unicast

To all VLAN ports.

In total, that we have considered before, it is enough to fully transmit any multicast traffic from streaming videos to stock price quotes. But we really do in our almost perfect world with such a disgrace, as a broadcast transmission of what could be transferred to the elect?

Not at all. Especially for perfectionists Invented mechanism

IgMP-Snooping.

The idea is very simple - the switch "listens" passing through it IGMP packets.

For each group, separately it leads the table of ascending and downward ports.

If IgMP Report came from the port for a group, then a client, the switch adds it to the downlink list for this group.

If IgMp Query came from the port for the group, then there is a router, the switch adds it to the ascending list.

This generates a multicast traffic transmission table at a channel level. As a result, when a multicast stream comes from above, it is copied only to downward interfaces. If on the 16-port switch only two clients, only they will be delivered traffic. The genius of this idea ends when we think about her nature. The mechanism assumes that the switch must listen to traffic at the 3rd level.

However, IGMP-Snooping is not comparison with NAT to ignore the principles of network interaction. Moreover, in addition to saving in resources, it carries a lot of less obvious opportunities. Yes, and in general, in the modern world, the switch who knows how to look inside IP - the phenomenon is not exceptional. ===================== Task number 3.

Server 172.16.0.5 transmits multicast traffic into groups 239.1.1.1, 239.2.2.2 and 239.0.x.

Configure the network so that:

- Customer 1 could not join the group 239.2.2.2. But at the same time he could join the group 239.0.0.x.

- Customer 2 could not join the group 239.1.1.1. But at the same time he could join the group 239.0.0.x.

Details of the task here.

=====================

IgMP Snooping Proxy.

.

A response reader may have a question on how IGMP Snooping learns all client ports, given that only one fastest client is responsible for IGMP Query as we said above. And very simple: IGMP SNOOPING does not allow report to go between customers. They are sent only to the rising ports to routers. Without seeing Report from other recipients of this group, the client is obliged to respond to Query during the Max Response Time specified in this Query.

As a result, on the network for 1000 nodes to one IgMP Query for seconds 10 (the usual value of MAX Response Time) will come 1000 reports to the router. Although it would be enough for him for each group.

And it happens every minute.

In this case, you can configure the proxying of IGMP requests. Then the switch does not just "listens" the passing packages, he intercepts them.

The rules of operation of IGMP-SNOOPING may differ for different manufacturers. Therefore, consider them conceptually:

1) If the switch arrives the very first report to the group, it is sent up to the router, and the interface is subdued to the downlink. If such a group is already already there, the interface is simply added to the descending list, and the Report is destroyed.

2) If the latest Leave comes to the switch, then there are no other customers, this Leave will be sent to the router, and the interface is removed from the downlink list. Otherwise, the interface is simply deleted, Leave is destroyed.

3) If IgMP Query comes from the router, the switch intercepts it, sends it to the IGMP Report response for all groups that currently have recipients.

Now we give the server. As we have already discussed above, he does not worry about Pim, RP, IGMP - he just broadcasts. And R1 gets this stream. His task is to deliver a multicast to rp. And then, depending on the settings and the manufacturer, or the same Query is sent to all client ports, or the switch blocks the query from the router and itself acts as Querier, periodically politicizing all recipients. This reduces the share of unnecessary service traffic on the network and the load on the router. Multicast VLAN Replication The client will also request a group of 224.2.2.4 through the VLC player. Abbreviated In IGMPV2 Report goes to the address of the desired group, and in parallel it is indicated in the package itself. These messages must live only within their segment and not forward anyway by routers, therefore, they have 1 TTL. MVR.

. This is a mechanism for those providers who practice VLAN-PER-User

, eg.

Here is a typical example of a network where MVR is vital:

5 customers in different VLANs, and everyone wants to receive multicast traffic of one group 224.2.2.4. In this case, customers must remain isolated from each other.

IGMP-Snooping takes into account, of course, and VLANs. If five customers in different VLANs request one group - it will be five different tables. Accordingly, there are 5 requests for connecting to the group to the router. And each sabinternia from these five on the router will be added separately in Oil. That is, having received 1 stream for group 224.2.2.4 He will send 5 copies, despite the fact that they all go into one segment.

To solve this problem, a Multicast VLAN REPLICATION mechanism was developed.

An additional VLAN is entered -

.

Multicast VLAN.

- In it, accordingly, a multicast flow will be transmitted. It is "tasteful" directly to the last switch, where traffic from it is copied to all client interfaces that they want to receive this traffic - this is replication.

.

Depending on the implementation of replication from Multicast VLAN can be made in

User-VLAN.

or in certain physical interfaces.

And what about IGMP messages? Query from the router, of course, comes through the multicast VLAN. The switch sends them to client ports. When the REPORT or Leave comes from the client, the switch checks from where it is (VLAN, an interface) and, if necessary, redirects to a multicast VLAN.

Thus, ordinary traffic is isolated and still goes to the router in the user vlan. A multicast traffic and IGMP packets are transmitted to Multicast VLAN.

.

Cisco MVR and IGMP-Snooping are configured independently. That is, you can turn off one and the second will work. In general, MVR is based on IGMP-snooping and on the switches of other manufacturers for MVR operations may be mandatory inclusion of IGMP-Snooping.

RPF Check.

In addition, IGMP-Snooping allows you to perform traffic filtering on switches, limit the number of groups available to the user, the inclusion of IGMP Querier, the static setting of ascending ports, permanent connection to any group (this script is in the accompanying video

), Fast reaction to a change in topology by sending additional Query, SSM-Mapping for IGMPv2 etc.

  • Finishing the conversation about IGMP-Snooping, I want to repeat - this is an optional functionality - everything will work without it. But it will make the network more predictable, and the life of the engineer is calmer.
  • However, all the advantages of IGMP Snooping can be wrapped against themselves. One such outstanding case can be read by reference.
  • By the way the same Cisco has a CGMP protocol

- Analogue of IGMP, which does not violate the principles of the switch, but it is properly and not to say that widespread.

So, my tireless reader, we approach the end of the issue and finally want to show how the IPTV service can be implemented on the client side.

The easiest way we have repeatedly appealed in this article - run a player that can take a multicast stream from the network. You can manually set the group's IP address and enjoy video.

Another program option that providers often use is a special application, usually quite a custom, in which the set of channels used in the provider's network will be sewn. No need to set something manually - you just need to switch the channels with the buttons.

Both of these ways make it possible to watch streaming video only on the computer.

The third option allows you to use the TV, and as a rule, any. To do this, the client's house puts the so-called set-top-box (STB) - a box installed on the TV. This is a pusaleak, which is included in the subscriber line and shares the traffic: the usual Unicnter it gives to Ethernet or WiFi so that customers have access to the Internet, and the multicast stream is transmitted to the TV through the cable (DVI, RGB, antenna TD.).

Often you, by the way, you can see an advertisement, where the provider offers its consoles for connecting television - this is the very STB

Task number 4.

Finally, a nontrivial multicast task (the authors are not us, there will be a link to the original in the answers).

  1. The simplest scheme:
  2. On the one hand, the source server, with an arc - a computer that is ready to take traffic.

You can install a multicast stream address yourself.

And, accordingly, two questions:

  • What needs to be done so that the computer can get the stream and do not resort to multicast routing?
  • Suppose you do not know what a multicast and cannot configure it, how to transfer the stream from the server to a computer?
  • The task is easily searched in the search engine, but try to solve it yourself.
  • Details of the task here.
  • =====================
  • Unprofitable in the article remained cross-domain routing of multicast traffic (MSDP
  • , MBGP.

, BGMP

), load balancing between RP (AnyCast RP

, proprietary protocols. But, I think, having a point of start this article, to deal with the rest will not be difficult.

All terms relating to a multicast, you can find in the telecommunications glossary LookMeup

For help in preparing Articles Thank you JDIMA

For technical support Thanks Natasha Samoilenko CDPV Drawn Nina Dolgopolov

- A wonderful artist and other project.

RPF Check.

In the pool of articles by SDSM, there is still much interesting before the end, so you do not need to bury the cycle due to a long lack of release - with each new article the complexity increases significantly. Ahead is almost all MPLS, IPv6, QoS and network design.

  1. As you already, probably noticed, the LinkMeup has a new project - the LookMeup Glossary (yes, we have left a fantasy). We hope that this glossary will become the most complete directory of terms in the field of communication, so we will be glad any help in filling it. Write to us at [email protected]
  2. stay with us
  3. IgMP Snooping: What is this in the router and why do you need?
  4. If you encounter a question about the IGMP Snooping option that it is in the router and why you need this setting, you discovered the right article. Most of the information on the Internet is complex to understand the usual user, and these terms are not needed at all if you want to solve a specific task.
  5. A little more about problems, because of which you could be interested in IGMP Snooping:

You play network games;

Use the IPTV Rostelecom Internet Television function or any other provider;

Signed on any network system: video conferences, online learning or even postal mailings.

And at the same time you have significantly reduced speed on all devices that are connected to the router. For example, you are watching IPTV on the TV, but you begin to "shy" a PC or worse to work the Internet on your phone. Another problem is possible - IPTV, network games or services listed above are not started at all and do not work. In all these cases, the solution will help configure IGMP Snooping.

What is IgMP and why it is needed

When the data is transmitted over the network - on the global Internet, or from the provider, or between your devices, this happens on the clear rules: protocols. Each protocol determines how to recognize zeros and units, how to collect them in data packets, how to check their "correctness" when receiving and assembled on the screen on the screen. There are seven levels in total - from electrical signals to your browser.

Internet Group Management Protocol, according to the first letters of which the abbreviation is formed - one of these protocols on the channel level. You would not know about its existence, if the "Problems" described above arose. As can be seen from the name, this is a protocol for managing broadcasting groups.

That is, when the IPTV Internet TV signal comes to you on the router from the provider, it starts to broadcast it to all devices. It is convenient, to watch the same gear on the smartphone and TV. But at the same time any other device - for example, your computer is "not asked" if it needs a signal.

Therefore, he still receives it, which reduces the speed of the Internet and spends its resources.

Snooping is a function that helps a router to find out which devices need a flow of data from an online game, television or special service. Simply put, this is the optimization of traffic within your network and improving its safety. It should work automatically, but sometimes you need to configure it manually. That's what IGMP is in the router.

Views of IgMP Snooping The support of the router of this protocol already means that you will not have problems with the receipt of the signal from IPTV and from other services. But if the router or modem is older, it may not accept broadcast data transfer, or it just does not have enough power and it will "hang." But when everything is in order, IGMP Snooping may vary by type: Passive. This basic technology support, overall tracking and broadcast data transmission. Everything works, the load on the router is minimal. However, the load increases on the devices in it. Active. Such a protocol maximizes the network. It sifts "extra" requests to the router that he does not need, freeing the data transfer resource. However, it increases the load on the processor and on the memory of the device. Devices of medium and high price segments cope with this without problems. For devices cheaper it depends on the amount of data. .

How to set up a function in the router IGMP disassemble in the router, what is this setting - on the IPTV example. Usually everything turns on automatically. But if you read this article, something clearly went wrong. Therefore, do these steps: Go to the router's web interface: Enter the browser in the address bar 192.168.1.1 or 192.168.0.1 or the address that is specified on the bottom sticker. Enter the username and password - usually this is the "admin" login and password "Admin" if you have not been changed manually. Or check the same sticker on the router. .

Go to "Network", "Network Settings" or Similar. In ASUS, it is called "Local Network". You need to find the "IPTV" tab. The "Proxy" option includes broadcasting, actually launches the IPTV function. That's what it is, IgMP Proxy in the router. Turn it on. Not all models have an IGMP Snooping item, but if it is present, then turn it on. Snooping will improve the work of all the devices. .

Click "Apply". All is ready.

Possible problems A problem is possible when broadcasting has not worked. This may be connected with the firewall. Disconnect it for a few minutes. If the problem has disappeared, then turn on and in the settings, allow the protocol for Internet TV, online games or another service. Video. Example: AnyCast DNS .

If the IPTV uses a separate equipment-receiver (why do you need a TV prefix, this is a single conversation topic), then in the router settings it may be necessary to resolve the "Bridge" option. It may be called "Choose Wan Bridge Port" or "Network-Bridge" - it depends on the device.

Finally, if the signal "slows down", then the device is most likely overloaded. There will have to limit the operation of other devices, or disable them. If nothing helps, you will have to change the router to more powerful.

In this article, I tried to explain the most clear language what IGMP Snooping in the router is. I hope this information will be useful to you, and you decide the problems that have arisen. Now your data will be transmitted as optimally and correctly, and the attack on the network in order to overload all devices in it will not result. A source: https://besprovodnik.ru/igmp-snooping-chto-to-v-rutere/

Setting up IPTV on Mikrotik For example, IPTV settings we took Mikrotik RB2011UIAS-2HND. Not quite a home router, of course, but the setting on other devices will not differ in principle. RESET CONFIGURATION router. / And informs us about recipients. And it is not necessary to talk about one client-computer, in general it can be, for example, another PIM router. It is important to which interfaces need to pass traffic. We update the router (add a package for IPTV).

Setting up IGMP Proxy. Add Firewall Exceptions. Setting up Wi-Fi.

Reset Access Point Settings

This item is optional. If you configure IPTV on a router with the working settings that you did earlier, the actions below are not necessary. It also does not prevent the backup configuration. However, sometimes, if during the IPTV setting to the microtic something went wrong, the best way out is "reset" the configuration and do everything again. .

Reset settings to factory can be three ways: Programmatically go to Winbox, open the SYSTEM menu and make Reset Configuration. Mechanically: Click the RESET button on your Mikrotik and wait until the router reboots. (On most MIKROTIK we advise you to clamp the button to turn on the equipment, and without releasing keeping about 10 seconds after switching on) / And informs us about recipients. And it is not necessary to talk about one client-computer, in general it can be, for example, another PIM router. It is important to which interfaces need to pass traffic. RESET CONFIGURATION in the router itself (on the setup screen). Actual only if there is a touchscreen on the router. Routeros update (add a package for IPTV) The update is necessary in order to install an additional package for IPTV. We go to the site of Mikrotik, we are looking for a line of your model on the lists and download the latest firmware version for it. Please note that you do not choose the firmware with the main packages (Main), and with additional (EXTRA):

Open

WINBOX.

We go to the router (we advise you to enter the initially on the MAC address, it will facilitate the further configuration process). To update on the router, go to the menu Files. Open it and drag it into the window Files. Our downloaded file from a unpacked archive called . Multicast-X.XX-MIPSBE.npk

Package added and after that we reboot equipment in the menu

System.

Reboot

The router will reboot and update the firmware. The process may take up to 5 minutes.

Nutrition at this time should not be disabled!

After rebooting open

System - Packages. and look if the module appeared

If one is available, then you did everything right. Setting up IGMP Proxy

Open in the Mikrotik menu Routing - IgMP Proxy. We need to add a new interface, for this click on plus (as indicated on the screen). In the new interface, in the field Interface. We choose the port for which the Internet comes with us, in our case it is an Ether2-master and install a tick like a screenshot:

Slightly lower in the field

Alternative Subnets.

You should specify alternative subnets. In the event that you do not know what to enter there, try the most common options: 10.0.0.0/8; 172.16.0.0/12; 192.168.0.0/16.

  • In the extreme case, you can also leave zeros, but it is better to still find the desired subnet so that the router does not apply to the whole Internet. Confirm the changes, click OK. Create another interface, clicking on a blue plus, but now we not
  • In the extreme case, you can also leave zeros, but it is better to still find the desired subnet so that the router does not apply to the whole Internet. ). put a tick on the contrary OK. and at the same time choose the port that we will Overburigious

IPTV. - That is, the one to which the device is connected on which we will watch IPTV. In our case, this is Bridge, because a stationary PC is connected to it. .

That is, in the first case, we pointed out the port where the data includes, and now - where come from. After we press the button Settings

Istavim the tick on the contrary

For technical support Thanks Natasha Samoilenko Quick.

Leve.

RPF Check.

We do it in order to be able to quickly switch between channels.

Setting up Firewall

Customize our firewall that does not miss IPTV at the moment, for this we create a new terminal, click New Terminal and the window opens: Now we must perform several teams in this console: / IP Firewall Filter Add Action = Accept Chain = Input Comment = »Allow IgMP» Disabled = NO in-Interface = Ether2-Master Protocol = IGMP

/ IP Firewall Filter Add Action = Accept Chain = Input Comment = »IPTV UDP Incoming» disabled = no dst-port = 1234 in-interface = Ether2-Master Protocol = udp

/ IP Firewall Filter Add Action = Accept Chain = Forward Comment = »IPTV UDP FORWARDING» disabled = no dst-port = 1234 protocol = udp 1234.

- the port is unofficially registered for streaming video and IPTV Ether2-Master. - This is an interface for which IPTV comes from the provider.

Next need in the menu

IP Select item Firewall

and go to the tab Filter Rules.

. We have created excluding rules and that they work, they should be higher for prohibiting. We drag them up with the mouse.

  1. Wi-Fi Setup
  2. In case you distribute or are going to hand out IPTV via Wi-Fi, you need to add additional settings. To do this, open in order:
  3. After pressing the Advanced Mode button, additional parameters appear:
  4. In field
  5. WMM Support

Put

Enabled -

RPF Check.

The comprehensive support for Multimedia transmission over Wi-Fi.

Helper

FULL

. This parameter includes sending multicast customers sitting on Wi-Fi.

All confirm with button

With IGMP, the final customer recipients communicate the nearest routers that they want to receive traffic. And PIM builds the path of moving multicast traffic from the source to recipients through routers. OK.

and enjoy watching programs

It remains only to check the performance of our configuration. We used for this IPTV player, n

Radially downloading the channels of the channels for our provider

(Volton Telecom) in the player settings.

We can see that our setting is fully operational. Happy viewing!

https://lantorg.com/article/nastrojka-iptv-na-mikrotik.

What is IgMP snooping in the router: why do IGMP SNOOPING FUNCTION

The client will also request a group of 224.2.2.4 through the VLC player. The role of IGMP is very simple: if there are no customers - it is not necessary to transmit multicast traffic to the segment. If a client appears, he notifies routers using IGMP that he wants to receive traffic. In order to understand how everything happens, take this network: A number of platforms on the Internet use the Multicast method to transmit data to the user group. Such a technology is used for online games, live broadcasts, distance learning, and even for postal mailings. But the multiforming does not always competently optimizes traffic relay and loads the user's network, so the IGMP Snooping function has created this problem. Let's discern what is the function, and how to enable it to optimize your traffic.

What is and why need IGMP SNOOPING Function

To begin with, we will give the definition of IGMP to understand the principle of technology.

Internet Group Management Protocol - Multicast Network Management Protocol, which organizes several devices in groups. IgMP Membership Report - The "reports" knot that he wants to receive traffic of this group.

In IGMPV2 Report goes to the address of the desired group, and in parallel it is indicated in the package itself. These messages must live only within their segment and not forward anyway by routers, therefore, they have 1 TTL. It is based on the IP protocol and applied on the Internet everywhere, effectively using network resources.

IgMP Snooping is the process of tracking Multicast traffic between consumer groups and host. The Snooping feature is enabled to analyze user requests to connect with a multi-master group and adds the port to the IGMP broadcast list. After completing the use of the Multitrafication, the user leaves a query and protocol, deletes the port from the group data list.

Thus, Snooping eliminates the transfer of unnecessary data to the multicast channels.

This makes the exchange of data on the channel level more efficient and takes into account the needs of the network layer, which is particularly important for information providers. Users will also receive optimized content, although as a result, the load on the network will increase.

Without tracking and analyzing data, ultimate consumers in the form of specific IP addresses will be forced to "digest" additional useless information for them. which is activated by default on routers. The FE0 / 0 interface becomes descending for the group of 224.2.2.4 - it will need to send the received traffic. Along with the usual unique routing table there is also a multicast: About the availability of customers says first record

IGMP Snooping will not only save users from excess traffic, but also makes the exchange of information safer.

The tracking mode is enabled on time to prevent DDoS attack attempts on a network or specific addresses to which the Internet Group Management protocol is vulnerable. Activation function IGMP Snooping The tracking and analysis feature is available on managed network switches or switches. This device helps to implement the principles of group broadcasting on a channel level of the network. .

To activate IGMP Snooping, you need to manually enable and configure it on the switch.

Unmanaged analogs do not support traffic analysis mode, as they cannot be configured through the interface.

In more detail the command Show IP Mroute. We will discern later. .

Before using the communicator on your network, make sure that the final recipient (for example, SMART-TV) supports Snooping mode.

Typically, devices have the appropriate item in the "Setup Network Connection" section, which will noticeably simplifies the adjustment of the multicast. The client began to receive traffic. Now the router should sometimes check that the recipients still have a gap to not broadcast if suddenly customers are left. To do this, it periodically sends a request to all its descending interfaces. Consider a way to connect a function via the command line on the example of popular D-Link switches:

Open the command line with the CLI interface.

Enter "enable-igmp-snooping". This command will turn on the function on the switch and all connected addresses.

Enter "config-igmp-snooping-vlan-default-state-enable", which will allow you to configure the VLAN protocol.

The "Confog-Multicast-VLAN-Filtering-Mode-Vlan-Default-Filter-Unregistred-Groups" command includes data filtering from several addresses at the communicator.

Finally, use the "config-igmp-snooping-vlan-default-snooping-enable" in the VLAN network.

The last command includes the IGMP Snooping Fast Leave feature, which excludes the port from the network as soon as the user made a request "Leave". Thanks to Fast Leave, the consumer will not receive unnecessary data and will not process them. This will reduce the load on the network and will allow the switch to work more effectively. If, in response to Query, at least one report came to the router, it means there are still customers, he continues to broadcast that the interface from where this report came from, the traffic of this group. If a Query did not have a response from a response interface for some group, the router deletes this interface from its multicast routing table for this group - ceases to send traffic.

Networks for the smallest. Part 9.2. Multicast. IGMP protocol

Continue studying the multicast IGMP (Internet Group Management Protocol), the network protocol for the interaction of multicast traffic clients and the router nearest to them.

IGMP protocol

Return to the dump again. See this top package, after which a multicast stream was thrown? An interesting detail in the client's behavior: Having received Query, he is not in a hurry to reply immediately to Report. The node takes a timeout length from 0 to .

IGMP protocol message when connected

which is specified in the next Query: When debugging or in the dump, by the way, it can be seen that several seconds can pass between getting different reports. This is done so that hundreds of customers all the scope not flooded the network with their reports by receiving General Query. Moreover, only one client usually sends Report. This IGMP protocol message sent by the client when we pressed the Play on it. That is how he reports that he wants to receive traffic for the group 224.2.2.4.

- This is a network protocol interacting multicast traffic clients and the nearest router.

IPv6 uses MLD (Multicast Listener Discovery) instead of IGMP. The principle of operation they have absolutely the same, so you can easily change IGMP everywhere on MLD, and IP on IPv6.

How exactly does IGMP work? four. So goes on for centuries until the client wants to exit the group (for example, turn off the player / TV). In this case, he sends IgMP Leave. Perhaps you need to start with the fact that the versions of the protocol are now three: IgMPv1, IgMPv2, IgMPv3. The most used - the second one, the first is almost forgotten, so we will not talk about it, the third is very similar to the second.

I will be focused on the second, as on the most impact, and consider all events from connecting the client to the group before it is out of it. The client will also request a group of 224.2.2.4 through the VLC player.

The role of IGMP is very simple: if there are no customers - it is not necessary to transmit multicast traffic to the segment. If a client appears, he notifies routers using IGMP that he wants to receive traffic.

In order to understand how everything happens, take this network:

Suppose the router is already configured to receive and process multicast traffic.

- The "reports" knot that he wants to receive traffic of this group.

GROUP SPECIFIC QUERY.

Sending IGMP Membership Report

In IGMPV2 Report goes to the address of the desired group, and in parallel it is indicated in the package itself. These messages must live only within their segment and not forward anyway by routers, therefore, they have 1 TTL. GROUP SPECIFIC QUERY. Often in the literature you can meet the mention of

The router receives an IGMP-Report and, realizing that this interface now has customers, makes information in their tables

This is an output of information on IGMP. The first group is requested by the client. The third and fourth is the SSDP-built SSDP protocol groups. The second is a special group that is always present on Cisco routers - it is used for the AUTO-RP protocol, which is activated by default on routers.

  1. The FE0 / 0 interface becomes descending for the group of 224.2.2.4 - it will need to send the received traffic.
  2. Along with the usual unique routing table there is also a multicast:
  3. About the availability of customers says first record
  4. From the output it is clear that traffic for group 224.2.2.4 comes via FE0 / 1, and it is necessary to transmit it to the FE0 / 0 port.
  5. The interfaces in which you need to transmit traffic are included in the list of downstream interfaces -
  6. Oil. Each sends IGMP General Query to the network. The main goal is to find out if there are customers, and in parallel - to declare to other routers in the segment if they are, about your desire to participate in the elections. Outbound Interface List.
  7. In more detail, the show of the show ip mroorte team we will look later.
  8. Above the dump you see that as soon as the client sent an IGMP-REPORT, immediately after it flew up UDP is a video stream.

Wins Router S.

Receipt of the IGMP query query (dump is filtered by IGMP).

7)

By default, this happens every 60 seconds. TTL such packages are also equal to 1. They are sent to the address 224.0.0.1 - all the nodes in this segment - without specifying a specific group. Such Query messages are called eight) - general. Thus, the router asks: "Guys, and who and what else wants to receive?".

Having received IGMP General Query, any host that listens to any group must send IGMP Report as it did it when connected. The address of the group of interest to his group should be specified in Report. Querier elections are a very important procedure in the multicast, but some insidious manufacturers who do not hold RFC can insert a strong stick in the wheels. I am talking about IGMP Query with an address of the source 0.0.0.0, which can be generated by the switch. Such messages should not participate in the choice of Querier, but you have to be ready for everything. Here is an example Computer response to IGMP GENERAL QUERY (Dump is filtered by IGMP)

If, in response to Query, at least one report came to the router, it means there are still customers, he continues to broadcast that the interface from where this report came from, the traffic of this group. Version 1 differs in essence only by the fact that If a Query did not have a response from a response interface for some group, the router deletes this interface from its multicast routing table for this group - ceases to send traffic.

On its initiative, the client usually sends Report only when connected, then it simply responds to Query from the router.

An interesting detail in the client's behavior: Having received Query, he is not in a hurry to reply immediately to Report. The node takes a timeout length from 0 to

When debugging or in the dump, by the way, it can be seen that several seconds can pass between getting different reports.

This is done so that hundreds of customers all the scope not flooded the network with their reports by receiving General Query. Moreover, only one client usually sends Report.

The fact is that Report is sent to the group address, and therefore comes to all customers. After receiving Report from another client for the same group, the node will not send its own. Logic is simple: the router has already received this very report and knows that there are customers, it is not necessary.

Above the dump you see that as soon as the client sent an IGMP-REPORT, immediately after it flew up UDP is a video stream.

The client will also request a group of 224.2.2.4 through the VLC player. This mechanism is called

In IGMPV2 Report goes to the address of the desired group, and in parallel it is indicated in the package itself. These messages must live only within their segment and not forward anyway by routers, therefore, they have 1 TTL. Further in the article we will tell about why this mechanism actually really works very rarely.

In more detail the command Example II. 4Please note how the traffic should go in this case - R1-R2-R3-R5. Although in short, the path R1-R3-R5.

where there is no router, we can authoritatively declare - IGMP there - no more than formality. There is no router, and the client has no one to request a multicast stream. And he will earn a video for the simple reason that the flow and so be pouring from the switch - you just need to pick it up. to the group address.

Repeat again Sending IGMP Leave

Then a client appeared, who wanted to receive traffic of the group 224.2.2.4 and he sent his IGMP Report. The router receives it and in an idea must turn off. But he cannot disable one specific client - the router does not distinguish them - it just has a downstream interface. And the interface can be several customers. That is, if the router deletes this interface from its OUL list (Outgoing Interface List) for this group, the video will turn off at all. But also not to delete it, it is also impossible - suddenly it was the last client - why then wash it?

Then the router decided for some reason to check - and whether there are no more customers and sent IgMP General Query again to which the client is forced to answer ( If you look into the dump, you will see that after receiving the Leave router, the stream continues to go for some time. The fact is that the router in response to Leave sends IGMP Query to the group address for which this Leave came to that interface where he came from. Such a package is called

Periodically (once a minute) the router checks that the recipients still have, using IGMP General Query, and the node confirms this using IGMP Report.

Those clients that are connected to this particular group.

Sending the Router Router GROUP Specific Query in response to IGMP Leave

If the router received a response Report for the group, it continues to broadcast in the interface, if not received - removes the timer after the timer has expired.

In total, after receiving Leave, two groups Specific Query goes - one mandatory, second control.

Two GROUP SPECIFIC QUERY - one mandatory, second control

Next, the router stops the stream. But still it is completely incomprehensible how traffic from the server reaches customers when there is a huge provider network LinkmiaP? And where, in fact, it will be known who is the client? We can't manually register routes, simply because we do not know where customers may be. The usual routing protocols will not answer this question. So we come to understand that the delivery of a multicast is something completely new to us. Consider a little more difficult case: ). Two (or more) routers that can broadcast traffic are connected to the client segment. If you do nothing, multicast traffic will be duplicated - both routers will receive Report from customers. In order to avoid this there is a choice mechanism - politics. The one who will win will send Query, monitor Report and react to Leave, and, accordingly, it will send traffic to the segment. The loser will only listen to Report and keep your hand on the pulse. Elections occur quite simple and intuitive.

For technical support Thanks Natasha Samoilenko Consider the situation from the moment the R1 and R2 routers are turned on.

Activated IGMP on interfaces.

RPF Check.

At first, by default, each of them considers himself Querier.

  • Each sends IGMP General Query to the network. The goal is to find out if there are customers, and in parallel - to declare other routers in the segment, if any, about your desire to participate in the elections. General Query receive all devices in the segment, including other IGMP routers.
  • Having received such a message from a neighbor, each router estimates who more worthy. Wins Router S.
  • Example: AnyCast DNS (specified in the Source IP field of IGMP Query). He becomes Querier, all others - non-querier.

Non-Querier starts the timer that is reset every time Quaryny comes with a smaller IP address. If before the timer expires (more than 100 seconds: 105-107), the router will not receive Query with a smaller address, he declares himself Querier and takes all the corresponding functions.

If Querier receives Query with a smaller address, he adds these duties. Querier is becoming another router, which has an IP less. Querier elections are a very important procedure in the multicast, but some insidious manufacturers who do not hold RFC can insert a strong stick in the wheels. I am talking about IGMP Query with an address of the source 0.0.0.0, which can be generated by the switch. Such messages should not participate in the choice of Querier, but you have to be ready for everything. Here is an example of a very complex long-performance problem. .

Version 1 differs in essence only by the fact that

. If the client does not want to receive more traffic of this group, he simply ceases to send Report in response to Query. When not a single client remains, the timeout router will stop sending traffic.

Moreover, But still it is completely incomprehensible how traffic from the server reaches customers when there is a huge provider network LinkmiaP? And where, in fact, it will be known who is the client? We can't manually register routes, simply because we do not know where customers may be. The usual routing protocols will not answer this question. So we come to understand that the delivery of a multicast is something completely new to us. . In order to avoid duplication of traffic, the higher protocol is responsible, for example, Pim, about which we will speak further.

Version 3 supports all that supports IGMPv2, but there are a number of changes. First, Report is sent no longer to the group address, but on a multicast service address

. And the address of the requested group is indicated only within the package. This is done to simplify the work of IGMP Snooping, about which we will talk next.

Secondly, more importantly, IGMPv3 began to support SSM in its pure form. This is the so-called Source Specific MultiCast. In this case, the client may not just request a group, but also specify a list of sources from which he would like to receive traffic or vice versa would not want. In IGMPV2, the client simply requests and receives the group traffic without caring for the source.

IGMP MEMBERSHIP REORT content in IGMPV3 So, IGMP is designed to interact customers and router. Therefore, returning for example 2, where there is no router, we can authoritatively declare - IgMP there - no more than formality. There is no router, and the client has no one to request a multicast stream. And he will earn a video for the simple reason that the flow and so be pouring from the switch - you just need to pick it up. Recall that IGMP does not work for IPv6. There is MLD protocol.

Repeat again First of all, the router sent his IGMP General Query after turning on IGMP on its interface to find out if there are recipients and declare their desire to be Querier. At that time, no one was in this group. Then a client appeared, who wanted to receive traffic of the group 224.2.2.4 and he sent his IGMP Report. After that, I went to the traffic on it, but it is filtered out of the dump.

Periodically (once a minute) the router checks that the recipients still have, using IGMP General Query, and the node confirms this using IGMP Report.

Then he changed his mind and refused the group by sending IGMP Leave. The router received Leave and, wanting to make sure that no other recipients are no other recipients, send IgMP Group Specific Query ... twice. And after the expiration of the timer ceases to transmit traffic here. However, it continues to transmit IGMP Query to the network. For example, in case you have not turned off the player, but simply somewhere with the connection of the problem. Then the connection is restored, but the client does not send a report by itself. But Query answers. Thus, the flow can recover without human participation. IgMPROTOKOL, with which the router learns the presence of multicast traffic recipients and about their tripping .igMP reports by the client when connected and responded to IGMP Query. This means that the client wants to receive a specific group traffic. Migmp General QueryProtes a router periodically to check which groups are needed now. As the address of the recipient, 224.0.0.1 is indicated. .

IGMP Group Sepcific QueryPrust by the router in response to the Leave message to find out if there are other recipients in this group. As the address of the recipient, the address of the multicast group is indicated. Migmp Leaves by the client when he wants to leave the group.QUERIelened in one broadcast segment several routers that can be broadcast, among them one main - querier is selected among them. It will periodically send Query and transmit traffic. A source:

Tags

Cisco.

IPTV.

SDSM

network hardware

Networks for the smallest https://radioprog.ru/post/623
What is a multicast in the router. Requirements for system resources. Multicast and Unicast: key differences

For technical support Thanks Natasha Samoilenko First of all, let's voice a few concepts to exclude further misunderstanding. There are three types of traffic:

(*, G) (S, G)

We do it in order to be able to quickly switch between channels.

Setting up Firewall

Customize our firewall that does not miss IPTV at the moment, for this we create a new terminal, click New Terminal and the window opens: Now we must perform several teams in this console: / IP Firewall Filter Add Action = Accept Chain = Input Comment = »Allow IgMP» Disabled = NO in-Interface = Ether2-Master Protocol = IGMP

/ IP Firewall Filter Add Action = Accept Chain = Input Comment = »IPTV UDP Incoming» disabled = no dst-port = 1234 in-interface = Ether2-Master Protocol = udp

/ IP Firewall Filter Add Action = Accept Chain = Forward Comment = »IPTV UDP FORWARDING» disabled = no dst-port = 1234 protocol = udp 1234. Oil Multicast.

- the port is unofficially registered for streaming video and IPTV Ether2-Master. - This is an interface for which IPTV comes from the provider.

Next need in the menu

IP Select item Firewall

and go to the tab Filter Rules.

. We have created excluding rules and that they work, they should be higher for prohibiting. We drag them up with the mouse.

  1. Wi-Fi Setup
  2. In case you distribute or are going to hand out IPTV via Wi-Fi, you need to add additional settings. To do this, open in order:
  3. After pressing the Advanced Mode button, additional parameters appear:
  4. In field
  5. WMM Support PIM SM RP.

Put

Task number 4.

Unicast.

  1. - unicast, one stream source one recipient Broadcast.
  2. - Broadcast, one source, recipients All customers online - Multicast, one sender, recipients Some customer group

What kind of traffic to use for IPTV?

Obviously, Multicast is given to broadcast channels. Any TV channel that we want to broadcast network is characterized by the group address, which is selected from the range reserved for these purposes:

224.0.0.0 - 239.255.255.255

Новости

Добавить комментарий