Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multicast documents #4339

Merged
merged 1 commit into from
Dec 6, 2022
Merged

Add multicast documents #4339

merged 1 commit into from
Dec 6, 2022

Conversation

ceclinux
Copy link
Contributor

Signed-off-by: ceclinux src655@gmail.com

docs/antctl.md Outdated Show resolved Hide resolved
docs/multicast-guide.md Show resolved Hide resolved
1. IGMP egress rules: IGMP membership report and IGMP leave group messages.
2. IGMP ingress rules: IGMP query, which includes IGMPv1, IGMPv2, and IGMPv3.
3. Multicast egress rules: non-IGMP multicast traffic from Pod to other Pods or external hosts.
Multicast ingress rules are currently not supported.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a new line before this.

Suggested change
Multicast ingress rules are currently not supported.
Note: multicast ingress rules are currently not supported.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

docs/multicast-guide.md Outdated Show resolved Hide resolved

## Debugging and Collecting Multicast Statistics

Users could use these tools to get the current status of the multicast application running in the cluster.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Users could use these tools to get the current status of the multicast application running in the cluster.
Users could check following guides and corresponding tools to get the current status of the multicast application running in the cluster.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

### Traffic in Local Network Control Block
Multicast IP that in [Local Network Control Block](https://www.iana.org/assignments/multicast-addresses/multicast-addresses.xhtml#multicast-addresses-1)(224.0.0.0/24) should work only in encap mode. Multicast traffic destined for that IPs are not expected to be forward, therefore, no multicast route will be configured, and external hosts are not working either.

### Linux kernel
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line missing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

Multicast IP that in [Local Network Control Block](https://www.iana.org/assignments/multicast-addresses/multicast-addresses.xhtml#multicast-addresses-1)(224.0.0.0/24) should work only in encap mode. Multicast traffic destined for that IPs are not expected to be forward, therefore, no multicast route will be configured, and external hosts are not working either.

### Linux kernel
You may find some traffic is not routed if the Node environment meets the following specifications:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

You may find some traffic is not routed if the Node environment meets the following specifications:
1. Node kernel version under 5.4
2. Node network doesn't support IGMP snooping
3. Lots of multicast traffic with group IPs that won't be received by the Node(not Pod has not joined that group in that Node)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
3. Lots of multicast traffic with group IPs that won't be received by the Node(not Pod has not joined that group in that Node)
3. Lots of multicast traffic with group IPs that won't be received by the Node (not Pod has not joined that group in that Node)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

2. Node network doesn't support IGMP snooping
3. Lots of multicast traffic with group IPs that won't be received by the Node(not Pod has not joined that group in that Node)

### Encap mode
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

3. Lots of multicast traffic with group IPs that won't be received by the Node(not Pod has not joined that group in that Node)

### Encap mode
In encap mode, Multicast packets sent from Pod cannot be forwarded to more than one network interface on the host. Therefore Pods to external hosts multicast is not supported in encap mode.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multicast -> multicast

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

docs/antctl.md Outdated Show resolved Hide resolved
docs/antctl.md Outdated

### Multicast commands

The `antctl get podmulticaststats [NAME] [-n NAMESPACE]` command can print inbound and outbound multicast statistics for each Pod. Note that IGMP packets are not counted.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NAME -> POD_NAME

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

docs/multicast-guide.md Outdated Show resolved Hide resolved
docs/multicast-guide.md Outdated Show resolved Hide resolved
docs/multicast-guide.md Outdated Show resolved Hide resolved
docs/multicast-guide.md Outdated Show resolved Hide resolved
docs/multicast-guide.md Outdated Show resolved Hide resolved
docs/multicast-guide.md Outdated Show resolved Hide resolved
docs/multicast-guide.md Outdated Show resolved Hide resolved
docs/multicast-guide.md Outdated Show resolved Hide resolved
@ceclinux ceclinux force-pushed the multicast_docs branch 2 times, most recently from 942b96a to e7ce5f9 Compare October 27, 2022 06:38
docs/multicast-guide.md Outdated Show resolved Hide resolved
docs/multicast-guide.md Outdated Show resolved Hide resolved
## Use case example

In this section, we will show how multicast video steaming works in
Antrea using [VLC](https://www.videolan.org/vlc/).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably introduce VLC in a separate sentence. "[VLC] is used for the video streaming server.".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated


## Prerequisites

`Multicast` is introduced in v1.5 as an alpha feature. The feature gate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in Antrea v1.5.0.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

docs/multicast-guide.md Outdated Show resolved Hide resolved
docs/multicast-guide.md Outdated Show resolved Hide resolved
docs/multicast-guide.md Show resolved Hide resolved

1. Node kernel version under 5.4
2. Node network doesn't support IGMP snooping
3. Lots of multicast traffic with group IPs that won't be received by the Node
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not understand this sentence. Could you rephrase?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated. This limitation can be detailed described by

busy networks with lots of unresolved
multicast routing entries, the creation of new multicast group routes
can be extremely slow and unreliable.

and resolved in this commit in Linux kernel torvalds/linux@0079ad8


### Encap mode

In encap mode, multicast packets sent from Pod cannot be forwarded to more than one
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from a local Pod

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

### Encap mode

In encap mode, multicast packets sent from Pod cannot be forwarded to more than one
network interface on the host. Therefore Pods to external hosts multicast is not supported
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interfaces

on the Node

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should talk about the issue first. So, move "Multicast traffic from Pods to external hosts is not supported in encap mode" to be the first sentence.

I feel we can remove the reason sentence, but if you want to keep it" "This is because ..."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated. Reason sentence removed.

@ceclinux ceclinux force-pushed the multicast_docs branch 4 times, most recently from cae1411 to a34661d Compare November 1, 2022 08:53

## Use case example

[VLC](https://www.videolan.org/vlc/) is an open source multimedia player, it can be used for video streaming.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove the company information if Antrea is not officially claimed to being or used to be used by the peer?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not talk about VLC in the first paragraph, which is just a minor thing as a tool we used in the example.

How about:

This section will take multicast video streaming as an example to demonstrate how multicast works with Antrea. In this example, VLC multimedia tools are used to generate and consume multicast video streams.


### Encap mode

Multicast traffic from Pods to external hosts is not supported in encap mode.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should support Pod-to-external multicast traffic in encap mode. The only limitation is we do not support multiple multicast interfaces on the Node, and the packet is SNATed with Node's IP after it leaves the Node with encap mode.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wenyingd : please provide a correct description in your mind.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to use this description with encap mode,

The Pod-to-external multicast traffic leaves Node from the network interface  which the default route is configured on, and the packet is SNATed. Configuration `multicastInterfaces` is not supported with encap mode.

Copy link
Contributor Author

@ceclinux ceclinux Nov 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about

Configuration `multicastInterfaces` is not supported with encap mode. Multicast packets in encap mode are SNATed and forwarded to transport interface only.


## Use case example

[VLC](https://www.videolan.org/vlc/) is an open source multimedia player, it can be used for video streaming.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not talk about VLC in the first paragraph, which is just a minor thing as a tool we used in the example.

How about:

This section will take multicast video streaming as an example to demonstrate how multicast works with Antrea. In this example, VLC multimedia tools are used to generate and consume multicast video streams.

docs/multicast-guide.md Outdated Show resolved Hide resolved
2. IGMP ingress rules: applied to IGMP query, which includes IGMPv1, IGMPv2, and IGMPv3.
3. Multicast egress rules: applied to non-IGMP multicast traffic from the selected Pods to other Pods or external hosts.

Note: multicast ingress rules are currently not supported.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"are not supported at the moment"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe Note: -> Note,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated


### Multicast NetworkPolicy statistics

[The Antrea NetworkPolicyStats feature](feature-gates.md#networkpolicystats) also applies to multicast NetworkPolices.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

applies to -> supports


### Multicast NetworkPolicy statistics

[The Antrea NetworkPolicyStats feature](feature-gates.md#networkpolicystats) also applies to multicast NetworkPolices.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: maybe move The out of the link.

The Antrea NetworkPolicyStats feature

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated


Multicast IPs in [Local Network Control Block](https://www.iana.org/assignments/multicast-addresses/multicast-addresses.xhtml#multicast-addresses-1) (224.0.0.0/24)
should work only in Antrea encap mode. Multicast traffic destined for those addresses
are not expected to be forwarded, therefore, no multicast route will be configured for them.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are -> is

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

### Linux kernel

If the following situations apply to your Nodes, you may observe multicast traffic
not routed correctly:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is not

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

docs/multicast-guide.md Show resolved Hide resolved

1. Node kernel version under 5.4
2. Node network doesn't support IGMP snooping
3. Lots of inbound multicast traffic with groups that are not joined by the Pods on the local Node
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

busy networks with lots of unresolved
multicast routing entries, the creation of new multicast group routes
can be extremely slow and unreliable.

Here, routing entries are on the K8s Nodes, or some underlay switch/router? In any case, I feel no need to mention this one. It is a general issue with multicast. Listing it here without enough context can be misleading.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.I mean on the k8s Nodes. Remove this line.


### Encap mode

Multicast traffic from Pods to external hosts is not supported in encap mode.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wenyingd : please provide a correct description in your mind.

@ceclinux ceclinux force-pushed the multicast_docs branch 3 times, most recently from 17deb8b to 8912a71 Compare November 3, 2022 07:20
Copy link
Contributor

@jianjuns jianjuns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Two more nits.

### Encap mode

Configuration `multicastInterfaces` is not supported with encap mode.
Multicast packets in encap mode are SNATed and forwarded to transport interface only.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to the transport interface

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated


### Encap mode

Configuration `multicastInterfaces` is not supported with encap mode.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Configuration option

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@ceclinux
Copy link
Contributor Author

ceclinux commented Nov 6, 2022

I tested and changed the vlc command in the example a bit

  1. Give the specific url of the video to avoid possible encoding/decoding problems for the user-provided sample video. The video is in public domain, which should be free to be used.https://commons.wikimedia.org/wiki/File:Bees_on_flowers.webm

  2. full command is not needed. Only params need to passed. https://github.com/galexrt/container-vlc

jianjuns
jianjuns previously approved these changes Nov 7, 2022
docs/antctl.md Outdated
Comment on lines 645 to 646
antctl get podmulticaststats

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prepend $ to command to differentiate command and output like other examples:

Suggested change
antctl get podmulticaststats
$ antctl get podmulticaststats

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

docs/feature-gates.md Show resolved Hide resolved
Example output of the command:

```bash
kubectl get multicastgroups
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
kubectl get multicastgroups
$ kubectl get multicastgroups

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated


```bash
ip mroute
(pod-ip, 239.255.12.42) Iif: antrea-gw0 Oifs: transport interfaces State: resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(pod-ip, 239.255.12.42) Iif: antrea-gw0 Oifs: transport interfaces State: resolved
(<POD IP>, 239.255.12.42) Iif: antrea-gw0 Oifs: <TRANSPORT INTERFACES> State: resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

the Antrea gateway interface to the transport interface.

```bash
ip mroute
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ip mroute
$ ip mroute

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update

### Traffic in local network control block

Multicast IPs in [Local Network Control Block](https://www.iana.org/assignments/multicast-addresses/multicast-addresses.xhtml#multicast-addresses-1) (224.0.0.0/24)
should work only in Antrea encap mode. Multicast traffic destined for those addresses
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should work only in Antrea encap mode? I feel it's "can only work in encap mode". @jianjuns

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand your point here. Could you explain more?

Basically we has tested some simple cases for MDNS(224.0.0.251) and it works as expected in encap mode. The other multicast service running in 224.0.0.0/24 are not tested comprehensively, therefore may not work as expected.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tnqn means changing "should" to "can". I agree "can" sounds better here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated. Thanks

Signed-off-by: ceclinux <src655@gmail.com>
Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tnqn
Copy link
Member

tnqn commented Dec 6, 2022

/skip-all

@tnqn tnqn added this to the Antrea v1.10 release milestone Dec 6, 2022
@tnqn tnqn added the kind/documentation Categorizes issue or PR as related to a documentation. label Dec 6, 2022
@tnqn tnqn merged commit b0e9636 into antrea-io:main Dec 6, 2022
GraysonWu pushed a commit to GraysonWu/antrea that referenced this pull request Jan 27, 2023
Signed-off-by: ceclinux <src655@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/documentation Categorizes issue or PR as related to a documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants