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

Macsec High level design #652

Merged
merged 43 commits into from
Jan 10, 2021
Merged

Macsec High level design #652

merged 43 commits into from
Jan 10, 2021

Conversation

Signed-off-by: Ze Gan <ganze718@gmail.com>
Signed-off-by: zegan <ganze718@gmail.com>
Signed-off-by: zegan <ganze718@gmail.com>
Signed-off-by: zegan <ganze718@gmail.com>
Signed-off-by: zegan <ganze718@gmail.com>
Signed-off-by: zegan <ganze718@gmail.com>
doc/macsec/MACsec_hld.md Show resolved Hide resolved
| ------------ | ---------------------------------------- |
| CA | Secure Connectivity Association |
| CAK | Secure Connectivity Association Key |
| CAN | Secure Connectivity Association Key Name |
Copy link
Contributor

Choose a reason for hiding this comment

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

CKN -> Connectivity Association Key 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.

Done, please review it.


Virtual switch use the Linux MACsec driver to support the functionality of MACsec and the MACsec interface is imposed on Ethernet interface.

Real switch use the ASIC chip as the MACsec Security Entity(SecY) which will be imposed on physic interface. And the ethernet port will be above the SecY.
Copy link
Contributor

Choose a reason for hiding this comment

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

physical - typo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, please review it.

doc/macsec/MACsec_hld.md Outdated Show resolved Hide resolved
doc/macsec/MACsec_hld.md Outdated Show resolved Hide resolved

- Delete SA
1. Monitor the DEL message from the MACsec SA Table
2. Collect SA Stats
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this intended in Delete SA?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we need to finally collect SA stats from counter DB when we delete it.


Wpa_supplicant need to monitor the packet number for SAK refreshing. But if a copy of packet number delayed more than the preparation time of SAK, the requirement of SAK refreshing may not be realized by wpa_supplicant, which will cause the packet number to be exhausted.

- MPN=maximal packet number, which indicates the maximal packet number, it should be 4,294,967,295 if packet number is 32bit
Copy link
Contributor

Choose a reason for hiding this comment

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

maximum?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, please review it.

- MPN=maximal packet number, which indicates the maximal packet number, it should be 4,294,967,295 if packet number is 32bit
- RT=refresh threshold, which indicates that the SAK should be refreshed if the packet number increases to a threshold. This number is about 75% of MPN.
- MPB=maximal port bandwidth, which indicates the maximal bandwidth at the port
- MMPS=minimal MACsec packet size, which indicates the minimal packet size of MACsec, it should be 44 bytes
Copy link
Contributor

Choose a reason for hiding this comment

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

minimum?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, please review it.


#### Phase I

- MACsec should be supported on physical port
Copy link
Contributor

Choose a reason for hiding this comment

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

May be we should also provide a reference to PortChannels

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, please review it.


## 2 Architecture Design

This chapter shows the MACsec interface stack of virtual switch and real switch.
Copy link
Contributor

Choose a reason for hiding this comment

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

Some of the container parts are missing in design. We should provide some details on the following:

  1. When will the container be running
  2. Is the FEATURE disabled/enabled by default

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When will the container be running
Add the information at : https://github.com/Azure/SONiC/pull/652/files#diff-600ad1f148d06a6c05f027cd045d6c4fR122
Is the FEATURE disabled/enabled by default
Add the information at : https://github.com/Azure/SONiC/pull/652/files#diff-600ad1f148d06a6c05f027cd045d6c4fR198-R199

doc/macsec/MACsec_hld.md Outdated Show resolved Hide resolved
Signed-off-by: zegan <ganze718@gmail.com>
Signed-off-by: zegan <ganze718@gmail.com>
Signed-off-by: zegan <ganze718@gmail.com>
Signed-off-by: zegan <ganze718@gmail.com>
Signed-off-by: zegan <ganze718@gmail.com>
Signed-off-by: zegan <ganze718@gmail.com>
Signed-off-by: zegan <ganze718@gmail.com>
Signed-off-by: zegan <ganze718@gmail.com>
Signed-off-by: zegan <ganze718@gmail.com>
Signed-off-by: zegan <ganze718@gmail.com>
Signed-off-by: zegan <ganze718@gmail.com>
Signed-off-by: zegan <ganze718@gmail.com>
Signed-off-by: zegan <ganze718@gmail.com>
Signed-off-by: zegan <ganze718@gmail.com>
Signed-off-by: zegan <ganze718@gmail.com>
Signed-off-by: zegan <ganze718@gmail.com>
Signed-off-by: zegan <ganze718@gmail.com>
Signed-off-by: zegan <ganze718@gmail.com>
Signed-off-by: zegan <ganze718@gmail.com>
Signed-off-by: zegan <ganze718@gmail.com>
Signed-off-by: Ze Gan <ganze718@gmail.com>
Signed-off-by: Ze Gan <ganze718@gmail.com>
Signed-off-by: Ze Gan <ganze718@gmail.com>
@Pterosaur Pterosaur marked this pull request as ready for review September 25, 2020 02:21
- The green means these components are in SWSS container. This container uses the SAI APIs to control the MACsec security entities(SecY) according to databases entries and to synchronize the statistics from SecY to COUNTERS_DB.
- **MACsecOrch** is a module of orchagent, that uses SAI APIs to manage the SecY according to messages from databases and synchronized the statistics of SecY to COUNTERS_DB.

- The blue one is MACsecSAI in SYNCD container. MACsecSAI is a set of APIs that are defined to communicate with the SecY. In the virtual switch, the SecY is Linux MACsec driver and MACsecSAI will use the ip commands to manage them. But in the real switch, the SecY is the MACsec cipher chip and the implementation of MACsecSAI will be provided by the vendor of the cipher chip.
Copy link
Contributor

Choose a reason for hiding this comment

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

The blue one is MACsecSAI in SYNCD container [](start = 2, length = 44)

The MACsecSAI box in the diagram is confusing. All other boxes are representing processes. And audience keep asking how many syncd processes in your design. You may draw syncd1/sync2 process as boxes, and MACsecSAI/SAI as internal boxes (like the plugin).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The blue one is MACsecSAI in SYNCD container [](start = 2, length = 44)

The MACsecSAI box in the diagram is confusing. All other boxes are representing processes. And audience keep asking how many syncd processes in your design. You may draw syncd1/sync2 process as boxes, and MACsecSAI/SAI as internal boxes (like the plugin).

Fixed, please review it.


This chapter shows the MACsec interface stack of virtual switch and real switch.

Virtual switch use the Linux MACsec driver as the MACsec Security Entity(SecY) to support the functionality of MACsec and the SecY is imposed on the physical port.
Copy link
Contributor

Choose a reason for hiding this comment

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

Virtual switch [](start = 0, length = 14)

I know you are talking about SONiC. But it is easy to mislead to the virtual switch between VMs on a physical server. And in SONiC terminology, we already have a 'Virtual Switch SAI', I think your term means total different thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Virtual switch [](start = 0, length = 14)

I know you are talking about SONiC. But it is easy to mislead to the virtual switch between VMs on a physical server. And in SONiC terminology, we already have a 'Virtual Switch SAI', I think your term means total different thing.

I discussed with Guohan and change it to SAI virtual switch, please review whether it makes sense.

Signed-off-by: Ze Gan <ganze718@gmail.com>
@caizhenghui-juniper
Copy link

Juniper Networks has already implemented very similar Macsec support using wpa_supplicant, and want to contribute to the community on this feature. We believe from our work, we can accelerate development on the following items.

Enable wpa_supplicant supporting different Ciphersuite: GCM-AES-128, GCM-AES-256, GCM-AES-XPN-128 and GCM-AES-XPN-256
XPN feature support in wpa_supplicant.
CLI commands to configure MACsec (other than enable/disable)
Using libnl to pass macsec messages instead of ip command.

We can discuss in detail during HLD review.

@lguohan
Copy link
Contributor

lguohan commented Oct 22, 2020

@caizhenghui, how to contact you let's have some discussion first?

@caizhenghui-juniper
Copy link

caizhenghui-juniper commented Oct 22, 2020 via email

Signed-off-by: Ze Gan <ganze718@gmail.com>
Signed-off-by: Ze Gan <ganze718@gmail.com>
Signed-off-by: zegan <ganze718@gmail.com>
Signed-off-by: Ze Gan <ganze718@gmail.com>
Signed-off-by: Ze Gan <ganze718@gmail.com>
Signed-off-by: zegan <ganze718@gmail.com>
Signed-off-by: Ze Gan <ganze718@gmail.com>
lguohan pushed a commit to sonic-net/sonic-swss-common that referenced this pull request Oct 29, 2020
Add MACsec schema according to SONiC MACsec HLD: sonic-net/SONiC#652

Signed-off-by: Ze Gan <ganze718@gmail.com>
@qbdwlr
Copy link
Contributor

qbdwlr commented Nov 17, 2020

As part of this MACsec effort, has there been any consideration for including a modified version of tcpdump that is capable of parsing the EAPOL exchange?

@Pterosaur
Copy link
Contributor Author

As part of this MACsec effort, has there been any consideration for including a modified version of tcpdump that is capable of parsing the EAPOL exchange?

Hi Ann, I believe Wireshark can parse the EAPOL traffic so right now, we don't have plan to modify tcpdump.

Signed-off-by: Ze Gan <ganze718@gmail.com>
Signed-off-by: zegan <ganze718@gmail.com>
Signed-off-by: zegan <ganze718@gmail.com>
Signed-off-by: zegan <ganze718@gmail.com>
Signed-off-by: zegan <ganze718@gmail.com>
@lguohan lguohan merged commit e8a636e into sonic-net:master Jan 10, 2021
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.

7 participants