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

SONiC IGMP Snooping HLD #426

Closed

Conversation

ashok-krishnegowda
Copy link

This document describes the functionality and high level design of IGMP Snooping feature in SONiC

@msftclas
Copy link

msftclas commented Jul 17, 2019

CLA assistant check
All CLA requirements met.

@ashok-krishnegowda ashok-krishnegowda changed the title This document describes the functionality and high level design of IGMP Snooping feature in SONiC SONiC IGMP Snooping HLD Jul 17, 2019
5. Support static and dynamic multicast router list.
6. Aging of dynamic mrouter ports will be supported. Static mrouter ports will not timed out, they have to be un-configured explicitly.
7. Support static multicast group configuration. Static l2mc entries will not timed out, they have to be un-configured explicitly.
8. Support trapping IGMP and PIM Hello control packets to CPU.

Choose a reason for hiding this comment

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

is this typo wrt hello packets? why do we need PIM hello packets for IGMP snooping?

Copy link
Author

Choose a reason for hiding this comment

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

When device running with IGMP Snooping, it maintains the router ports based on the received PIM hello messages that PIM routers send.

IGMP control packets flooding happens in kernel, kernel flooding behaviour is per bridge, there is no per VLAN flooding control in Kernel. Until the dynamic multicast-router(mrouter) port learns in the VLAN, IGMP reports will be flooded to all members of the VLAN.
In presence of multicast-router, IGMP reports received on a host interface are forwarded to multicast-router interfaces alone, but not to the other host interfaces in the VLAN.

### 1.2.4 SAI Overview

Choose a reason for hiding this comment

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

Could you please provide more details on how the SAI apis are going to be invoked? Does the sync layer maintain seperate database of L2MC entries and their port member lists? How does it going to differentiate new L2MC entry creation versus adding a port member to existing group? It would be good to put an example how the sync layer interacts with SAI layer wrt programming of the entries?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, L2mcorch in Orchagent maitains database of L2MC entries and their port member information. L2MC (Source,Group,Vlan) entry will be created in L2mcorch when it recieves first member addition, subsequent member add will bring in source group and the vlan information, based on that update to an already existing entry will be decided. L2mcorch will call sairedis API's to program L2mc entry, L2mc group and L2mc group members.

Example:
APP_L2MC_MEMBER_TABLE:Vlan10:0.0.0.0:225.0.0.1:Port1
L2mcorch processes and creates db entry when L2MC entry add comes to APPDB for the first time on the port1, key for db lookup here will be Source, Group and the Vlan.
L2mcorch will call sairedis API to create L2MC group first, then it calls API to create L2MC entry in the hardware and later L2MC group member add API will be called to update new port list.

When there is new receiver joins on Port1 on the same Vlan10 as mentioned below, lookup will find an already existing L2MC entry, this will update new port2 to the mc_id by calling sairedis API to add new group member.
APP_L2MC_MEMBER_TABLE:Vlan10:0.0.0.0:225.0.0.1:Port2

I will put these details.



![IGMP Snooping](images/L2mc_Architecture_diagram.png "Figure 1: IGMP Snooping High Level Architecture")

Choose a reason for hiding this comment

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

Diagrams are not accessible.. can you please check?

Copy link
Author

Choose a reason for hiding this comment

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

I will check and update.

key = APP_L2MC_VLAN_TABLE:"Vlan"vlanid
;field = value

#### APP_L2MC_MEMBER_TABLE

Choose a reason for hiding this comment

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

Lets say for a given group 225.0.0.1, if there are two interested ports port 1(VLAN 10) and port 2(VLAN20), are we going to maintain two entries in the table? If this is the case, how are we going to check manage the SAI interactions where i guess we need to create mc_id for all the outgoing ports? does sync layer going maintain some data structure for entry and port list?

Copy link
Author

Choose a reason for hiding this comment

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

As snooping works on Vlan, for the given scenario we will have db entry for both the Vlans like below,
APP_L2MC_MEMBER_TABLE:Vlan10:0.0.0.0:225.0.0.1:Port1
APP_L2MC_MEMBER_TABLE:Vlan20:0.0.0.0:225.0.0.1:Port2
Orchagent maintains data structure which holds (S, G, Vlan) entry and the interested ports for the multicast group on that Vlan.
For each entry there will be mc_id associated, this mc_id will be updated with port when there is IGMP join/leave for multicast group.

;field = value
type = "static"/"dynamic" ; Static or Dynamic mrouter entry

### 3.2.4 ASIC DB

Choose a reason for hiding this comment

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

No details here? We dont maintain anything ASIC db?

Copy link
Author

Choose a reason for hiding this comment

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

We have defined APP_DB schema, L2mcorch in Orchagent processes snooping table updates from the APP_DB and calls the sairedis APIs to put these routes in ASIC_DB.

No changes

## 3.3 Switch State Service Design
### 3.3.1 L2mcOrch changes

Choose a reason for hiding this comment

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

Does this layer maintain infomation if this a new group entry or existing entry?

Copy link
Author

Choose a reason for hiding this comment

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

Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants