Skip to content

Commit 56a83a5

Browse files
committed
Polish doc
Signed-off-by: Ze Gan <[email protected]>
1 parent 3cacd6f commit 56a83a5

1 file changed

Lines changed: 74 additions & 48 deletions

File tree

docs/testplan/MACsec-test-plan.md

Lines changed: 74 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<!-- omit in toc -->
22
# MACsec Test plan
33

4+
- [Testcases status](#testcases-status)
45
- [Testbed](#testbed)
56
- [Instruction to run MACsec test](#instruction-to-run-macsec-test)
67
- [Setup MACsec testbed](#setup-macsec-testbed)
@@ -9,33 +10,60 @@
910
- [Dynamic Key(MKA)](#dynamic-keymka)
1011
- [Test cases](#test-cases)
1112
- [Testcase : Macsec Functionality](#testcase--macsec-functionality)
12-
- [Check Control plane [Done]](#check-control-plane-done)
13-
- [Check the Data plane [Done]](#check-the-data-plane-done)
14-
- [Refresh SAK [Ongoing]](#refresh-sak-ongoing)
15-
- [MACsec Key rotation, Primary/Fallback CAK [Not start]](#macsec-key-rotation-primaryfallback-cak-not-start)
16-
- [MACsec Counters [Not start]](#macsec-counters-not-start)
17-
- [COPP [Not start]](#copp-not-start)
18-
- [Testcase : Macsec feature interop with other protocols [Ongoing]](#testcase--macsec-feature-interop-with-other-protocols-ongoing)
19-
- [Verify Port Channel is created with macsec configuration [Done]](#verify-port-channel-is-created-with-macsec-configuration-done)
20-
- [Verify LLDP neighbors are created with macsec configuration [Done]](#verify-lldp-neighbors-are-created-with-macsec-configuration-done)
21-
- [Verify the BGP neighbourship is created with macsec configuration [Done]](#verify-the-bgp-neighbourship-is-created-with-macsec-configuration-done)
22-
- [Verify PFC in MACsec [Not start]](#verify-pfc-in-macsec-not-start)
13+
- [Check Control plane](#check-control-plane)
14+
- [Check the Data plane](#check-the-data-plane)
15+
- [Refresh SAK](#refresh-sak)
16+
- [MACsec Key rotation, Primary/Fallback CAK](#macsec-key-rotation-primaryfallback-cak)
17+
- [MACsec Counters](#macsec-counters)
18+
- [COPP](#copp)
19+
- [Testcase : Macsec feature interop with other protocols](#testcase--macsec-feature-interop-with-other-protocols)
20+
- [Verify Port Channel is created with macsec configuration](#verify-port-channel-is-created-with-macsec-configuration)
21+
- [Verify LLDP neighbors are created with macsec configuration](#verify-lldp-neighbors-are-created-with-macsec-configuration)
22+
- [Verify the BGP neighbourship is created with macsec configuration](#verify-the-bgp-neighbourship-is-created-with-macsec-configuration)
23+
- [Verify PFC in MACsec](#verify-pfc-in-macsec)
2324
- [Bypass mode](#bypass-mode)
2425
- [Encrypt mode](#encrypt-mode)
2526
- [Strict mode](#strict-mode)
26-
- [Verify SNMP request/response works across interface with macsec configuration [Done]](#verify-snmp-requestresponse-works-across-interface-with-macsec-configuration-done)
27-
- [Testcase : Deployment usecases and fault handling scenario's [Done]](#testcase--deployment-usecases-and-fault-handling-scenarios-done)
28-
- [Link flap on an interface with macsec configured [Done]](#link-flap-on-an-interface-with-macsec-configured-done)
29-
- [Link flap on a portchannel member which has macsec configured [Done]](#link-flap-on-a-portchannel-member-which-has-macsec-configured-done)
30-
- [Testcases: Operation portchannel remove and re-add members to fix CRC error [Removed]](#testcases-operation-portchannel-remove-and-re-add-members-to-fix-crc-error-removed)
31-
- [MACsec session cannot be established under wrong MKA configuration [Done]](#macsec-session-cannot-be-established-under-wrong-mka-configuration-done)
32-
- [Config reload done on DUT with macsec configuration [Done]](#config-reload-done-on-dut-with-macsec-configuration-done)
33-
- [Everflow, port mirroring on macsec enabled interfaces [Removed]](#everflow-port-mirroring-on-macsec-enabled-interfaces-removed)
34-
- [Testcase : Macsec scenario's for multi-asic, multi-dut [Not start]](#testcase--macsec-scenarios-for-multi-asic-multi-dut-not-start)
27+
- [Verify SNMP request/response works across interface with macsec configuration](#verify-snmp-requestresponse-works-across-interface-with-macsec-configuration)
28+
- [Testcase : Deployment usecases and fault handling scenario's](#testcase--deployment-usecases-and-fault-handling-scenarios)
29+
- [Link flap on an interface with macsec configured](#link-flap-on-an-interface-with-macsec-configured)
30+
- [Link flap on a portchannel member which has macsec configured](#link-flap-on-a-portchannel-member-which-has-macsec-configured)
31+
- [Testcases: Operation portchannel remove and re-add members to fix CRC error](#testcases-operation-portchannel-remove-and-re-add-members-to-fix-crc-error)
32+
- [MACsec session cannot be established under wrong MKA configuration](#macsec-session-cannot-be-established-under-wrong-mka-configuration)
33+
- [Config reload done on DUT with macsec configuration](#config-reload-done-on-dut-with-macsec-configuration)
34+
- [Everflow, port mirroring on macsec enabled interfaces](#everflow-port-mirroring-on-macsec-enabled-interfaces)
35+
- [Testcase : Macsec scenario's for multi-asic, multi-dut](#testcase--macsec-scenarios-for-multi-asic-multi-dut)
3536
- [Testcase : Scale tests](#testcase--scale-tests)
36-
- [Large number of interfaces having macsec enabled on the DUT/linecard [Not start]](#large-number-of-interfaces-having-macsec-enabled-on-the-dutlinecard-not-start)
37-
- [Simultaneous rekeying in all macsec sessions [Not start]](#simultaneous-rekeying-in-all-macsec-sessions-not-start)
38-
- [Macsec enabled on all interfaces and the DUT is rebooted [Not start]](#macsec-enabled-on-all-interfaces-and-the-dut-is-rebooted-not-start)
37+
- [Large number of interfaces having macsec enabled on the DUT/linecard](#large-number-of-interfaces-having-macsec-enabled-on-the-dutlinecard)
38+
- [Simultaneous rekeying in all macsec sessions](#simultaneous-rekeying-in-all-macsec-sessions)
39+
- [Macsec enabled on all interfaces and the DUT is rebooted](#macsec-enabled-on-all-interfaces-and-the-dut-is-rebooted)
40+
41+
42+
## Testcases status
43+
44+
| Test cases | status | comment |
45+
| :------------------------------------------------------------------- | :-------: | :------------------------------------------------ |
46+
| Check Control plane | Completed | |
47+
| Check the Data plane | Completed | |
48+
| Refresh SAK - timer based | Completed | |
49+
| Refresh SAK - packet number based | Ongoing | |
50+
| MACsec Key rotation, Primary/Fallback CAK | Not start | Feature hasn't been supported |
51+
| MACsec Counters | Ongoing | |
52+
| COPP | Ongoing | |
53+
| Port channel with MACsec | Completed | |
54+
| LLDP with MACsec | Completed | |
55+
| BGP with MACsec | Completed | |
56+
| PFC with MACsec | Not start | Feature hasn't been supported |
57+
| SNMP with MACsec | Completed | |
58+
| Link flap on an interface with MACsec | Completed | |
59+
| Link flap on a PortChannel member with MACsec | Completed | |
60+
| Operation PortChannel remove and re-add members to fix CRC error | Removed | No use case |
61+
| MACsec session cannot be established under wrong MKA configuration | Completed | |
62+
| Config reload done on DUT with macsec configuration | Completed | |
63+
| Everflow, port mirroring on macsec enabled interfaces | Removed | Directly leveraging the testcase in everflow part |
64+
| MACsec scenario's for multi-asic, multi-dut | Ongoing | |
65+
| Large number of interfaces having macsec enabled on the DUT/linecard | Ongoing | |
66+
| MACsec enabled on all interfaces and the DUT is rebooted | Ongoing | |
3967

4068
## Testbed
4169

@@ -120,7 +148,7 @@ About the detail to set the testbed, please refer the doc: https://github.com/Az
120148

121149
This testcase covers the macsec/MKA protocol functionality
122150

123-
#### Check Control plane [Done]
151+
#### Check Control plane
124152

125153
- Enable macsec on the interface on the DUT and remote VM.
126154
- Check the process, `wpa_supplicant`, for the target port is running in the devices.
@@ -153,8 +181,7 @@ This testcase covers the macsec/MKA protocol functionality
153181
- In the physical SONiC switch: `show macsec` (SONiC CLI)
154182
2. Check the MACsec session is consistent with configuration.
155183

156-
#### Check the Data plane [Done]
157-
184+
#### Check the Data plane
158185
```txt
159186
+-----------------------------------------------------------------------------------+
160187
| |
@@ -243,7 +270,7 @@ All VMs and PTF docker in the host need to install PTF NN agent. So, SONiC-mgmt-
243270
4. VM1 should receive at least one expected above packet
244271
5. Check the interface stats with macsec counters.
245272

246-
#### Refresh SAK [Ongoing]
273+
#### Refresh SAK
247274

248275
The thresholds of rekey packet number are `0xC0000000ULL` to 32bits packet number and `0xC000000000000000ULL` to 64bits packet number(XPN). It's impossible to really send many packets to trigger the rekey action. So, We use the attribute `next_pn` of `MACSEC_EGRESS_SA` in APP_DB to cheat MKA protocol for rekey action.
249276

@@ -306,25 +333,25 @@ SAI_MACSEC_SA_ATTR_CONFIGURED_EGRESS_XPN │
306333
4. Check whether the new AN is next expected AN.
307334
5. Expect no packet loss on the ping result.
308335

309-
#### MACsec Key rotation, Primary/Fallback CAK [Not start]
336+
#### MACsec Key rotation, Primary/Fallback CAK
310337

311338
TODO
312339

313-
#### MACsec Counters [Not start]
340+
#### MACsec Counters
314341

315342
TODO
316343

317-
#### COPP [Not start]
344+
#### COPP
318345

319346
TODO
320347

321-
### Testcase : Macsec feature interop with other protocols [Ongoing]
348+
### Testcase : Macsec feature interop with other protocols
322349

323350
This testcase covers the behavior of slow protocols when mac security is configured on interfaces
324351

325352
**Note:** Below test expectations are based on assumption that physical interface remains up when macsec profile is attached to an interface.
326353

327-
#### Verify Port Channel is created with macsec configuration [Done]
354+
#### Verify Port Channel is created with macsec configuration
328355

329356
- Configure the macsec profile and apply them on a selected interface. Let the MKA session be establised
330357
- Add this macsec enabled interface as member of a Portchannel
@@ -335,21 +362,21 @@ SAI_MACSEC_SA_ATTR_CONFIGURED_EGRESS_XPN │
335362
- Expect the portchannel to go down if time taken for mka session establishment is > 3*30sec.
336363
- Portchannel interface goes oper UP after the MKA session is established
337364

338-
#### Verify LLDP neighbors are created with macsec configuration [Done]
365+
#### Verify LLDP neighbors are created with macsec configuration
339366

340367
- Configure the macsec profile on interface where LLDP neighborship was already present
341368
- Expect the LLDP neighborship is maintained as long as mka session establishment happens within 4*30sec which is default LLDP hold time interval
342369
- Remove the macsec profile from the interface
343370
- Check the LLDP neighborship exists even after the removal of macsec config.
344371

345-
#### Verify the BGP neighbourship is created with macsec configuration [Done]
372+
#### Verify the BGP neighbourship is created with macsec configuration
346373

347374
- Check the behaviour when macsec is enabled on an interface where BGP session was already established with peer.
348375
- Expect to see BGP neighbors remain established state as long as mka session establishment happens within the BGP hold time interval
349376
- Remove the macsec profile from the interface
350377
- Check the BGP sessions are established again after removal of macsec config.
351378

352-
#### Verify PFC in MACsec [Not start]
379+
#### Verify PFC in MACsec
353380

354381
![MACsec_PFC_test](images/MACsec_PFC_test.png)
355382

@@ -397,69 +424,68 @@ The switch should only react encrypted PFC frames, send encrypted PFC frames.
397424
4. Send encrypted PFC frame on the PTF injected port
398425
- The DUT expects to capture the clear PFC packet
399426

400-
#### Verify SNMP request/response works across interface with macsec configuration [Done]
427+
#### Verify SNMP request/response works across interface with macsec configuration
401428

402429
- Configure the macsec profile on interface and check if the snmp walk succeeds from the peer VM.
403430

404-
### Testcase : Deployment usecases and fault handling scenario's [Done]
431+
### Testcase : Deployment usecases and fault handling scenario's
405432

406433
This testcase covers the various fault scenario's and the expected behavior. The link flap will happen in both local and remote interface down/up.
407434

408-
#### Link flap on an interface with macsec configured [Done]
435+
#### Link flap on an interface with macsec configured
409436

410437
- MKA session can be recovered from the link flap if the port comes back up in < 6 secs (MKA lietime)
411438
- If the port is down for more than 6 sec, MKA session will create a new session.
412439

413-
#### Link flap on a portchannel member which has macsec configured [Done]
440+
#### Link flap on a portchannel member which has macsec configured
414441

415442
- When the member interface flaps and it is the only portchannel member
416443
- Expect the Portchannel to go down and come up depending on whether the member port comes back in 6 secs (MKA lietime)
417444
- When one member interface flaps, but the Portchannel has more member ports which are macsec enabled.
418445
- Expect Portchannel to remain up.
419446

420-
#### Testcases: Operation portchannel remove and re-add members to fix CRC error [Removed]
447+
#### Testcases: Operation portchannel remove and re-add members to fix CRC error
421448

422449
The portchannel member is removed from the portchannel, add/remove IP address. Add the interface back to portchannel with macsec enabled.
423450
Check the behavior back
424451

425-
#### MACsec session cannot be established under wrong MKA configuration [Done]
452+
#### MACsec session cannot be established under wrong MKA configuration
426453

427454
- If the CAK is mis-matched between DUT and peer, the MKA session cannot be established.
428455
- Control plane protocols eg: BGP session will not be established.
429456

430-
#### Config reload done on DUT with macsec configuration [Done]
457+
#### Config reload done on DUT with macsec configuration
431458

432459
- The macsec sessions will be reconfigured, MKA session created again with a new SAK key.
433460
- The control protocol sessions like LACP, LLDP, BGP get established again over the macsec configured interfaces.
434461

435-
#### Everflow, port mirroring on macsec enabled interfaces [Removed]
462+
#### Everflow, port mirroring on macsec enabled interfaces
436463

437464
- This test is to verify 2 cases
438465
- configure mirroring on interfaces where macsec is configured.
439466
- configure macsec on the outgoing interface ( in case of Everflow ).
440467
- TODO add expected behavior
441468

442-
### Testcase : Macsec scenario's for multi-asic, multi-dut [Not start]
469+
### Testcase : Macsec scenario's for multi-asic, multi-dut
443470

444471
- Verify that macsec dockers are coming up in different namespaces.
445472
- Verify macsec packet flow where the Ingress and Egress ports are on different Linecards.
446473
- TODO add expected behavior
447474

448475
### Testcase : Scale tests
449476

450-
#### Large number of interfaces having macsec enabled on the DUT/linecard [Not start]
477+
#### Large number of interfaces having macsec enabled on the DUT/linecard
451478

452479
- Use the "configure feature macsec enabled" command to turn ON macsec, with all ports having macsec profile attached.
453480
- Check the CPU, ASIC behavior when there are multiple wpa_supplicant processes being spawned.
454481
- Expect the macsec sessions all come up. Measure the time taken.
455482
- When all the interfaces flap together, how much time it takes for Portchannels/BGP sessions to be up
456483
-Expect the macsec sessions all come up. Measure the time taken.
457484

458-
#### Simultaneous rekeying in all macsec sessions [Not start]
459-
485+
#### Simultaneous rekeying in all macsec sessions
460486
- Enable macsec on multiple interfaces so that they have same rekey period.
461487
- Check the sessions are coming back up and there is no traffic loss during h/w progamming.
462488

463-
#### Macsec enabled on all interfaces and the DUT is rebooted [Not start]
489+
#### Macsec enabled on all interfaces and the DUT is rebooted
464490

465491
- Check the macsec docker comes up and macsec sessions are established.

0 commit comments

Comments
 (0)