Coder Social home page Coder Social logo

test-netstack's Introduction

Build status downloads

Test-NetStack: A network integration testing tool

Synopsis

Test-NetStack is a PowerShell-based testing tool that performs ICMP, TCP, and RDMA traffic testing of networks. Test-NetStack can help identify potential network (fabric and host) misconfiguration or operational instability.

Test-NetStack can validate the various network data paths on Windows, testing native, synthetic, and hardware offloaded (RDMA) data paths for issues with:

  • Connectivity
  • Packet fragmention
  • Low throughput
  • Congestion

Test Details

Test-NetStack first performs connectivity mapping across a cluster, specific nodes, or IP targets then tests:

- Stage1: ICMP Connectivity, Reliability, and PMTUD
- Stage2: TCP Stress 1:1
- Stage3: RDMA Connectivity
- Stage4: RDMA Stress 1:1
- Stage5: RDMA Stress N:1
- Stage6: RDMA Stress N:N

For more information, run:

help Test-NetStack

Install the Tool

Install-Module Test-NetStack

Run the Tool

$NetStackResults = Test-NetStack
$NetStackResults = Test-Netstack -Nodes 'Node1', 'Node2', 'NodeN'
$NetStackResults = Test-Netstack -IPTarget '192.168.1.1', '192.168.1.2', '192.168.1.3', '192.168.1.4'

Reviewing Results

$NetStackResults.Stage1 | ft *
$NetStackResults.Stage2 | ft *
$NetStackResults.Stage3 | ft *
$NetStackResults.Stage4 | ft *
$NetStackResults.Stage5 | ft *
$NetStackResults.Stage6 | ft *

Testable vs Disqualified Networks

Test-NetStack will identify networks that can and cannot be tested. To review the Test-NetStack networks that will be tested, use:

$NetStack.TestableNetworks

To review the Test-NetStack networks that cannot be tested.

$NetStack.DisqualifiedNetworks

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

test-netstack's People

Contributors

bwatada avatar dcuomo avatar microsoft-github-operations[bot] avatar microsoftopensource avatar nharper285 avatar nharper32 avatar smoon193 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

test-netstack's Issues

MTU Check Recommendations

When MTU mismatches occur we should recommend matching. In the below case, Node1 (Nic1 and 2) both had 9014 mtu size while node 2 had 1514. This wasn't identified as an issue.

image

Path vs Stage Status

StageStatus should have it's own property. Subproperties should define each stage status and be a rollup of all the paths tested in the stage;

Use the "PathStatus" property for individual paths inside the stage

Use AdapterAdvancedProperties to identify RDMA Protocol

The current mechanism to specify the RDMA Protocol (RoCE vs iWARP) does not scale to include additional vendors where they may include multi-protocol options. E.g. Intel and Marvell both support RoCE and iWARP.

A more appropriate mechanism would be to use Get-NetAdapterAdvancedProperty on the specific adapter and look for the NetworkDirectTechnology type. In the future this will be required to be non-zero. Until then, we should just default to the first option in the list for that adapter (e.g. if it specifies RoCE or RoCEv2, then choose RoCEv2 or if iWARP and RoCE, default to iWARP.

https://docs.microsoft.com/en-us/windows-hardware/drivers/network/inf-requirements-for-ndkpi

image

Move prerequisites to prerequisites.psm1

Prerequisites function in prerequisites.psm1 should be run at the beginning of each run to validate requirements like

  • Firewall openings
  • NDKPerf Version

Should be run by the selected stages. E.g. if stage 1 and 2 are selected unique requirements for stage 3 - n shouldn't be tested.

Outsource recommendations

Similar to how localication is implemented in separate PSD1 files, separating the recommendations into a separate file makes it easier to read, debug, etc.

APIPA Should be removed

In this section, we retrieve all adapters reported by Get-NetIPAddress which includes tunnel adapters that don't appear in Get-NetAdapter (causing an error).

$AdapterIP = Get-NetIPAddress -IPAddress $IP -AddressFamily IPv4 -SuffixOrigin Dhcp, Manual -AddressState Preferred, Invalid, Duplicate |

Simple fix (Any reason not to do this - APIPA is not production supported):

$AdapterIP = Get-NetIPAddress -IPAddress $IP -AddressFamily IPv4 -SuffixOrigin Dhcp, Manual -AddressState Preferred, Invalid, Duplicate | Select InterfaceAlias, InterfaceIndex, IPAddress, PrefixLength, AddressState

        **# Remove APIPA
        $AdapterIP = $AdapterIP | Where IPAddress -NotLike '169.254.*'**

$NetAdapter = Get-NetAdapter -InterfaceIndex $AdapterIP.InterfaceIndex

Stage# vs TestName

Do we have any dependencies on the stage# notation in NetStackResults? It seems rather than call an arbitrary stage number, we should provide a name. Take this for example, it's unclear what this was without understanding the tool. Perhaps we should call this NDKPing, or Another TCPStressN1, etc.

image

Enable connectivity view only

In the recent example where a node didn't have an IP address in a specific network, we had to try multiple times to test the connectivitymap. to do this, we had to run a full stage and get the output. It would be better to offer a switch like -ConnectivityMapOnly.

MTU check should start from the NIC value

Since each tests run for each NIC, we should be able to ping -l -f where the frame size is equivalent to the *JumboPacket value from Get-NetAdapterAdvancedProperty. If a failure occurs, iterate down until the mtusize is identified.

Failure scenario is where different mtu values exist for each adapter in a specified connectivity map

Remove Copy-File from Stage2

No need to do this, prerequisites will ensure that all files exist (and same version) on all machines being tested.

RDMA Stage 3 doesn't report failure

RDMA is disabled on all adapters. This section doesn't run at all but reports pass. The result is that it continues going onto Stage 4 despite it not having any enabled adapters.

Suggestion: If no adapters report RDMA Enabled, create an object with the interface and path status of fail for consistency with other stages.

image

Decide where to put tests

Currently the test file is in the main folder, however there is a folder with an empty file under Tests > global...ps1

We should just pick one final location and eliminate the other. IMHO, we should keep the Tests > testfile.ps1 structure and move the tests out of the root of the module to remove additional perceived customer complexity.

mtu and connectivity tests do not need to test adapters on the same host

If the connectivity map contains more than one adapter on the same host, these adapters should not test each other. This unnecessarily adds time to the tests, but more importantly confuses the output.

Here you can see two adapters on AzStackHCI01 both with 9k MTUSize. Since they're on the same host, the traffic never leaves the host and is not testing/validating anything overly useful (you'll always be able to connect from the same host and MTUSize is not important on the same system because it doesn't need to be segmented to fit on the fabric).

image

Feedback - Recommendation for NDK Ping

“verify that RDMA is enabled with Get-NetAdapterRDMA, that "NetworkDirect Functionality" is enabled from Get-NetAdapterAdvancedProperty -Name <> And that "NetworkDirect Technology" is the same value on each node and adapter combination being tested. If this system uses Data Center Bridging, consider running Validate-DCB prior to running this tool (Test-NetStack)”

ACTION REQUIRED: Microsoft needs this private repository to complete compliance info

There are open compliance tasks that need to be reviewed for your Test-NetStack repo.

Action required: 4 compliance tasks

To bring this repository to the standard required for 2021, we require administrators of this and all Microsoft GitHub repositories to complete a small set of tasks within the next 60 days. This is critical work to ensure the compliance and security of your microsoft GitHub organization.

Please take a few minutes to complete the tasks at: https://repos.opensource.microsoft.com/orgs/microsoft/repos/Test-NetStack/compliance

  • The GitHub AE (GitHub inside Microsoft) migration survey has not been completed for this private repository
  • No Service Tree mapping has been set for this repo. If this team does not use Service Tree, they can also opt-out of providing Service Tree data in the Compliance tab.
  • No repository maintainers are set. The Open Source Maintainers are the decision-makers and actionable owners of the repository, irrespective of administrator permission grants on GitHub.
  • Classification of the repository as production/non-production is missing in the Compliance tab.

You can close this work item once you have completed the compliance tasks, or it will automatically close within a day of taking action.

If you no longer need this repository, it might be quickest to delete the repo, too.

GitHub inside Microsoft program information

More information about GitHub inside Microsoft and the new GitHub AE product can be found at https://aka.ms/gim.

FYI: current admins at Microsoft include @dcuomo, @CoreNetBuilder, @manjushetkar

Add External Modules to PSD1 manifest

If a module cannot be downloaded via the PowerShell Gallery (powershellgallery.com) than it should be listed in the ExternalModules portion of the manifest

Stage 7: N:N RDMA with UDP Congestion

If Stage 6 (N:N RDMA Stress) passes, add UDP N:N at the same time in a new stage. This adds unbounded non-flow controlled UDP traffic to the fabric, which could cause PFC on the RDMA traffic class.

Required Modules

  • Add Pester 4.9.0
  • Remove Test-RDMA as required (prevents module import)

Fix ParameterSets

Parameter Sets currently only specify two options but much more exist.

Add destination machine to results

It becomes fairly difficult to track down destination IP addresses with multiple nodes in a cluster. This is compounded by the fact that storage adapter likely will not be registered in DNS.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.