diff --git a/SECURITY.md b/SECURITY.md index f7b89984f..926b8ae40 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -38,4 +38,4 @@ We prefer all communications to be in English. Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd). - \ No newline at end of file + diff --git a/assets/cloud-icon.svg b/assets/cloud-icon.svg index 182ca6ea5..c72209392 100644 --- a/assets/cloud-icon.svg +++ b/assets/cloud-icon.svg @@ -10,4 +10,4 @@ Icon-Cloud-other-357 - \ No newline at end of file + diff --git a/assets/dash-specs-flow.svg b/assets/dash-specs-flow.svg index 2645f7051..315f24fe9 100644 --- a/assets/dash-specs-flow.svg +++ b/assets/dash-specs-flow.svg @@ -1,4 +1,4 @@ -
Test Cases
Test Cases
Detailed test cases which reference hard compliance requirements by ID so can be traced back. A single test case can cover multiple requirements.
Detailed test cases which reference hard compliance r...
HLDs
HLDs
High-level descriptions & requirements  - architecture, services, features, encapsulations and transformations, , etc.
High-level descriptions & requirements  - arch...
Compliance Requirements
Compliance...
Precise numeric and/or behavioral requirements, each requirement well-specified and assigned an ID. Should refer back to an associated HLD as applicable. Each requirement should be assigned an ID which can be referenced in test cases. Emphasis on human-readability and maintainability but may be expressed in machine-readable form (e.g. yaml file) so can be consumed by test cases.

Example:
Reqmt. ID 1.21.3.4.5
10M connections per second <under some specified condition>
Precise numeric and/or behavioral requirements, each...
P4 Behavioral Model
P4 Behavior...
Dataplane behavioral model
Dataplane behavioral model
Test Scripts
Test Scrip...
Detailed test results in report form, including all metadata required to reproduce the test exactly (all GitHub commit/branch info, DUT details, SW versions, etc.). Results can refer back to the HLDs and compliance requirements.
Detailed test results in report form, including all m...
DASH/Documentation
DASH/Documentation
DASH/test
DASH/test
Reports
Reports
Test Results
Test Results
Actual testing scripts which implement the test cases. Data-driven to the extent possible, using values  from test cases and compliance requirements. Test results should refer back to original compliance requirements including measured results, pass/fail, and ID numbers.
Actual testing scripts which implement the test cases...
reference/consume
reference/...
reference/consume
reference/...
reference
reference
reference
reference
Viewer does not support full SVG 1.1
\ No newline at end of file +
Test Cases
Test Cases
Detailed test cases which reference hard compliance requirements by ID so can be traced back. A single test case can cover multiple requirements.
Detailed test cases which reference hard compliance r...
HLDs
HLDs
High-level descriptions & requirements  - architecture, services, features, encapsulations and transformations, , etc.
High-level descriptions & requirements  - arch...
Compliance Requirements
Compliance...
Precise numeric and/or behavioral requirements, each requirement well-specified and assigned an ID. Should refer back to an associated HLD as applicable. Each requirement should be assigned an ID which can be referenced in test cases. Emphasis on human-readability and maintainability but may be expressed in machine-readable form (e.g. yaml file) so can be consumed by test cases.

Example:
Reqmt. ID 1.21.3.4.5
10M connections per second <under some specified condition>
Precise numeric and/or behavioral requirements, each...
P4 Behavioral Model
P4 Behavior...
Dataplane behavioral model
Dataplane behavioral model
Test Scripts
Test Scrip...
Detailed test results in report form, including all metadata required to reproduce the test exactly (all GitHub commit/branch info, DUT details, SW versions, etc.). Results can refer back to the HLDs and compliance requirements.
Detailed test results in report form, including all m...
DASH/Documentation
DASH/Documentation
DASH/test
DASH/test
Reports
Reports
Test Results
Test Results
Actual testing scripts which implement the test cases. Data-driven to the extent possible, using values  from test cases and compliance requirements. Test results should refer back to original compliance requirements including measured results, pass/fail, and ID numbers.
Actual testing scripts which implement the test cases...
reference/consume
reference/...
reference/consume
reference/...
reference
reference
reference
reference
Viewer does not support full SVG 1.1
diff --git a/assets/express-route-icon.svg b/assets/express-route-icon.svg index e4990a2ad..eb3bd9319 100644 --- a/assets/express-route-icon.svg +++ b/assets/express-route-icon.svg @@ -20,4 +20,4 @@ - \ No newline at end of file + diff --git a/assets/on-prem-gateway.svg b/assets/on-prem-gateway.svg index a0b72deb3..e11e5e58d 100644 --- a/assets/on-prem-gateway.svg +++ b/assets/on-prem-gateway.svg @@ -10,4 +10,4 @@ - \ No newline at end of file + diff --git a/assets/vm-icon.svg b/assets/vm-icon.svg index 95de7f4b2..adef913fe 100644 --- a/assets/vm-icon.svg +++ b/assets/vm-icon.svg @@ -17,4 +17,4 @@ - \ No newline at end of file + diff --git a/dash-pipeline/.dockerignore b/dash-pipeline/.dockerignore index 4a1624118..cb174d15e 100644 --- a/dash-pipeline/.dockerignore +++ b/dash-pipeline/.dockerignore @@ -2,4 +2,4 @@ *.log *.pcap __pycache__/ -.pytest_cache/ \ No newline at end of file +.pytest_cache/ diff --git a/dash-pipeline/README-common-errors.md b/dash-pipeline/README-common-errors.md index 7c74dea29..01674d46c 100644 --- a/dash-pipeline/README-common-errors.md +++ b/dash-pipeline/README-common-errors.md @@ -20,4 +20,4 @@ You will need to logout and log back in to obtain the group membership. To check ``` $ id uid=1001(dash) gid=1001(dash) groups=1001(dash),27(sudo),998(docker) -``` \ No newline at end of file +``` diff --git a/dash-pipeline/README-dash-as-submodule.md b/dash-pipeline/README-dash-as-submodule.md index 6bfcedc83..7cf54f3f3 100644 --- a/dash-pipeline/README-dash-as-submodule.md +++ b/dash-pipeline/README-dash-as-submodule.md @@ -143,4 +143,4 @@ If test ports other than `veth0/1` and `veth2/3` are used, some modifications of ## Custom Tests You can use the tests under DASH by calling the appropriate DASH make targets from the parent project. You can also have private tests in your own project repository which you invoke from your Makefiles. We recommend if you write new tests which are generally applicable that you consider upstreaming to the Community repository. ## Third-Party CI Pipeline Automation (Git Actions) -You should be able to adapt the CI automation files from the dash project as located under [.github/workflows](../.github/workflows). You will need to modify them to suit your project by changing the trigger conditions (e.g. file system paths) and steps. \ No newline at end of file +You should be able to adapt the CI automation files from the dash project as located under [.github/workflows](../.github/workflows). You will need to modify them to suit your project by changing the trigger conditions (e.g. file system paths) and steps. diff --git a/dash-pipeline/README-dash-ci.md b/dash-pipeline/README-dash-ci.md index 7e2275053..cf6bf6f25 100644 --- a/dash-pipeline/README-dash-ci.md +++ b/dash-pipeline/README-dash-ci.md @@ -50,4 +50,4 @@ Let's drill down into the Build P4 step which failed. We see a a bad statement. The main README for this repository shows the CI failing badge: -![CI-fail-README-badge](../assets/CI-fail-README-badge.png) \ No newline at end of file +![CI-fail-README-badge](../assets/CI-fail-README-badge.png) diff --git a/dash-pipeline/README-pytests.md b/dash-pipeline/README-pytests.md index c9035e3a2..c8e64ce26 100644 --- a/dash-pipeline/README-pytests.md +++ b/dash-pipeline/README-pytests.md @@ -130,4 +130,4 @@ listening on lo, link-type EN10MB (Ethernet), capture size 262144 bytes * Launch Wireshark * Enter the following filter: `tcp.dstport==9092` -* You can see RPC calls being made in the packet data view, the ASCII string names of methods are displayed \ No newline at end of file +* You can see RPC calls being made in the packet data view, the ASCII string names of methods are displayed diff --git a/dash-pipeline/README-saithrift.md b/dash-pipeline/README-saithrift.md index 8f3d7ee20..c869faf07 100644 --- a/dash-pipeline/README-saithrift.md +++ b/dash-pipeline/README-saithrift.md @@ -427,4 +427,4 @@ Continuing. Starting SAI RPC server on port 9092 [New Thread 0x7f2b4b7fe700 (LWP 18)] [New Thread 0x7f2b4affd700 (LWP 19)] -``` \ No newline at end of file +``` diff --git a/dash-pipeline/SAI/README.md b/dash-pipeline/SAI/README.md index 0ab5f8dfa..08b253d89 100644 --- a/dash-pipeline/SAI/README.md +++ b/dash-pipeline/SAI/README.md @@ -37,4 +37,4 @@ In this example, the input is a dash_pipeline.json, which is a result of a P4 co # requirements.txt This is used for installing python modules, in particular for [snappi](https://github.com/open-traffic-generator/snappi) and [pytest](https://docs.pytest.org/en/7.1.x/index.html). ->**NOTE:** This file is a **hardlink** pointing to a single source of truth for test infrastructure. Take care accordingly. Modifying its contents will impact other collections of test scripts. It's a hardlink for convenience in order to pass the Docker context when building the `saithrift-client` images. We can't use a symlink because Docker cannot dereference symlinks in the context passed to it, see https://stackoverflow.com/questions/31881904/docker-follow-symlink-outside-context and https://medium.com/@307/hard-links-and-symbolic-links-a-comparison-7f2b56864cdd. \ No newline at end of file +>**NOTE:** This file is a **hardlink** pointing to a single source of truth for test infrastructure. Take care accordingly. Modifying its contents will impact other collections of test scripts. It's a hardlink for convenience in order to pass the Docker context when building the `saithrift-client` images. We can't use a symlink because Docker cannot dereference symlinks in the context passed to it, see https://stackoverflow.com/questions/31881904/docker-follow-symlink-outside-context and https://medium.com/@307/hard-links-and-symbolic-links-a-comparison-7f2b56864cdd. diff --git a/dash-pipeline/dockerfiles/.dockerignore b/dash-pipeline/dockerfiles/.dockerignore index 4a1624118..cb174d15e 100644 --- a/dash-pipeline/dockerfiles/.dockerignore +++ b/dash-pipeline/dockerfiles/.dockerignore @@ -2,4 +2,4 @@ *.log *.pcap __pycache__/ -.pytest_cache/ \ No newline at end of file +.pytest_cache/ diff --git a/dash-pipeline/dockerfiles/README.md b/dash-pipeline/dockerfiles/README.md index c2c107f02..fd9e553f1 100644 --- a/dash-pipeline/dockerfiles/README.md +++ b/dash-pipeline/dockerfiles/README.md @@ -1,2 +1,2 @@ # dockerfiles directory -Dockerfiles are placed here in part to avoid exporting the entire environment of the dash-pipeline directory to the docker builder, `.dockerignore` files notwithstanding. \ No newline at end of file +Dockerfiles are placed here in part to avoid exporting the entire environment of the dash-pipeline directory to the docker builder, `.dockerignore` files notwithstanding. diff --git a/dash-pipeline/images/dash-docker-branch-workflow.svg b/dash-pipeline/images/dash-docker-branch-workflow.svg index 057fc666c..c81780b33 100644 --- a/dash-pipeline/images/dash-docker-branch-workflow.svg +++ b/dash-pipeline/images/dash-docker-branch-workflow.svg @@ -1,4 +1,4 @@ -
sonic-net/DASH/main
sonic-net/DASH/main
create branch
create branch
sonic-net/DASH/featureX
sonic-net/DASH/featureX
(role permissions required)
(role permissions r...
modify/create docker images
modify/create...
git push
git push
Local
Local
sonic-net/DASH/featureX
sonic-net/DASH/featureX
code/make/test
code/make/test
ACR
ACR
push
push
pull fails
pull fails
re-run failed job
re-run failed job
ACR
ACR
push
push
pull
pull
pull request
pull request
ACR
ACR
push
push
pull
pull
sonic-net/DASH/main
sonic-net/DASH/main
1
1
2
2
3
3
4
4
5
5
sonic-net/DASH/featureX
sonic-net/DASH/featureX
Text is not SVG - cannot display
\ No newline at end of file +
sonic-net/DASH/main
sonic-net/DASH/main
create branch
create branch
sonic-net/DASH/featureX
sonic-net/DASH/featureX
(role permissions required)
(role permissions r...
modify/create docker images
modify/create...
git push
git push
Local
Local
sonic-net/DASH/featureX
sonic-net/DASH/featureX
code/make/test
code/make/test
ACR
ACR
push
push
pull fails
pull fails
re-run failed job
re-run failed job
ACR
ACR
push
push
pull
pull
pull request
pull request
ACR
ACR
push
push
pull
pull
sonic-net/DASH/main
sonic-net/DASH/main
1
1
2
2
3
3
4
4
5
5
sonic-net/DASH/featureX
sonic-net/DASH/featureX
Text is not SVG - cannot display
diff --git a/dash-pipeline/images/dash-docker-fork-dockerhub-workflow.svg b/dash-pipeline/images/dash-docker-fork-dockerhub-workflow.svg index f0a940df3..6ce1c3c63 100644 --- a/dash-pipeline/images/dash-docker-fork-dockerhub-workflow.svg +++ b/dash-pipeline/images/dash-docker-fork-dockerhub-workflow.svg @@ -1,4 +1,4 @@ -
sonic-net/DASH/main
sonic-net/DASH/main
modify/create docker images
modify/create...
Local
Local
Azure/DASH/main (staged)
sonic-net/DASH/main (staged)
code/make/test
code/make/test
ACR
ACR
push
push
pull
pull
merge
merge
ACR
ACR
push
push
pull
pull
sonic-net/DASH/main
sonic-net/DASH/main
1
1
3
3
4
4
5
5
fork devel/DASH/
fork devel/DASH/
create branch
create branch
fork
devel/DASH/
featureX
fork...
git push
git push
6
6
fork
devel/DASH/
featureX
fork...
Parent repo
Parent repo
Forked repo
"devel"
Forked repo...
Dockerhub
(dev's account)
Dockerhub...
docker push
docker push
create or update (pull) fork
create or update (pull) fork
2
2
pull
pull
push
push
git push
git push
fork
devel/DASH/
featureX
fork...
pull
pull
push
push

rename image 
to use ACR
rename image...
7
7
pull request
pull request
10
10
ACR
ACR
push
push
re-run failed job
re-run failed job
9
9
sonic-net/DASH/featureX
sonic-net/DASH/featureX
pull fails (first time)
pull fails...
8
8
ACR
ACR
Text is not SVG - cannot display
\ No newline at end of file +
sonic-net/DASH/main
sonic-net/DASH/main
modify/create docker images
modify/create...
Local
Local
Azure/DASH/main (staged)
sonic-net/DASH/main (staged)
code/make/test
code/make/test
ACR
ACR
push
push
pull
pull
merge
merge
ACR
ACR
push
push
pull
pull
sonic-net/DASH/main
sonic-net/DASH/main
1
1
3
3
4
4
5
5
fork devel/DASH/
fork devel/DASH/
create branch
create branch
fork
devel/DASH/
featureX
fork...
git push
git push
6
6
fork
devel/DASH/
featureX
fork...
Parent repo
Parent repo
Forked repo
"devel"
Forked repo...
Dockerhub
(dev's account)
Dockerhub...
docker push
docker push
create or update (pull) fork
create or update (pull) fork
2
2
pull
pull
push
push
git push
git push
fork
devel/DASH/
featureX
fork...
pull
pull
push
push

rename image 
to use ACR
rename image...
7
7
pull request
pull request
10
10
ACR
ACR
push
push
re-run failed job
re-run failed job
9
9
sonic-net/DASH/featureX
sonic-net/DASH/featureX
pull fails (first time)
pull fails...
8
8
ACR
ACR
Text is not SVG - cannot display
diff --git a/dash-pipeline/images/dash-docker-fork-workflow.svg b/dash-pipeline/images/dash-docker-fork-workflow.svg index 77816579f..40684fb0a 100644 --- a/dash-pipeline/images/dash-docker-fork-workflow.svg +++ b/dash-pipeline/images/dash-docker-fork-workflow.svg @@ -1,4 +1,4 @@ -
sonic-net/DASH/main
sonic-net/DASH/main
create branch
create branch
sonic-net/DASH/featureX
sonic-net/DASH/featureX
(role permissions required)
(role permissions r...
modify/create docker images
modify/create...
Local
Local
sonic-net/DASH/featureX
sonic-net/DASH/featureX
code/make/test
code/make/test
ACR
ACR
push
push
re-run failed job
re-run failed job
ACR
ACR
push
push
pull
pull
pull request
pull request
ACR
ACR
push
push
pull
pull
sonic-net/DASH/main
sonic-net/DASH/main
1
1
3
3
4
4
5
5
fork devel/DASH/featureX
fork devel/DASH/featur...
create or update (pull) fork
create or update (pull) fork
2
2
create branch
create branch
fork
devel/DASH/
featureX-dev
fork...
git push
git push
ACR
ACR
pull fails
pull fails
pull request
pull request
6
6
7
7
8
8
sonic-net/DASH/featureX
sonic-net/DASH/featureX
fork
devel/DASH/
featureX-dev
fork...
pull fails (first time)
pull fails...
continue development in fork
continue dev...
Parent repo
Parent repo
Forked repo
"devel"
Forked repo...
Text is not SVG - cannot display
\ No newline at end of file +
sonic-net/DASH/main
sonic-net/DASH/main
create branch
create branch
sonic-net/DASH/featureX
sonic-net/DASH/featureX
(role permissions required)
(role permissions r...
modify/create docker images
modify/create...
Local
Local
sonic-net/DASH/featureX
sonic-net/DASH/featureX
code/make/test
code/make/test
ACR
ACR
push
push
re-run failed job
re-run failed job
ACR
ACR
push
push
pull
pull
pull request
pull request
ACR
ACR
push
push
pull
pull
sonic-net/DASH/main
sonic-net/DASH/main
1
1
3
3
4
4
5
5
fork devel/DASH/featureX
fork devel/DASH/featur...
create or update (pull) fork
create or update (pull) fork
2
2
create branch
create branch
fork
devel/DASH/
featureX-dev
fork...
git push
git push
ACR
ACR
pull fails
pull fails
pull request
pull request
6
6
7
7
8
8
sonic-net/DASH/featureX
sonic-net/DASH/featureX
fork
devel/DASH/
featureX-dev
fork...
pull fails (first time)
pull fails...
continue development in fork
continue dev...
Parent repo
Parent repo
Forked repo
"devel"
Forked repo...
Text is not SVG - cannot display
diff --git a/dash-pipeline/images/dash-p4-bmv2-thrift-workflow.svg b/dash-pipeline/images/dash-p4-bmv2-thrift-workflow.svg index 297ddc6f1..3da68f851 100644 --- a/dash-pipeline/images/dash-p4-bmv2-thrift-workflow.svg +++ b/dash-pipeline/images/dash-p4-bmv2-thrift-workflow.svg @@ -1,4 +1,4 @@ -
ixia-c
ixia-c
SAI-P4RT
Adaptor/
P4RT Client
SAI-P4RT...
make  sai-thrift-client
make  sai-thrift-client
SW traffic 
generator
SW traffic...
DASH P4
behavioral model 
(source of truth)
DASH P4...
Standard OCP SAI
header files subset
(underlay)
Standard OCP SAI...
DASH SAI
header files
(overrlay)
DASH SAI...
Saithrift code
generator
Saithrift code...
Thrift server
skeleton C++ code
Thrift server...
opencompute/SAI
opencompute/SAI
make P4
make P4
DASH/dash-pipeline
DASH/dash-pipeline
Generate SAI headers
Generate SAI headers
DUT Software
Target
DUT Software...
Python thrift client  lib*
Python thrift client...
Git
Git
SAI-Thrift
commands
SAI-Thrift...
P4 "object code" loaded by bmv2 
P4 "object code" loaded by bmv2...
make sai-thrift-server
make sai-thrift-server
dash_pipeline_p4rt.json
dash_pipeline_p4rt.json
make run-sai-thrift-server
make run-sai-thrift-server
make libsai-test
make run-libsai-test
make libsai-test...
Git
Git
dash_pipeline.json
dash_pipeline.json
generate_dash_api.sh
generate_dash_api.sh
Containers provide the build & run environment:
Containers provide the b...
make docker-XXX
make docker-XXX
make sai
make sai
meta/make
meta/make
bmv2 SAI implementation C++ code
bmv2 SAI implementation C++ code
meta/gensairpc.pl
meta/gensairpc.pl
saithrift
server
saithrift...
libsai
libsai
p4c
p4c
make sai
make sai
make <target>
make <target>
LEGEND
LEGEND
make target or script in dash-pipeline
make target or script in dash-pipeline
make <target>
make <target>
make target or script in another repo (e.g. SAI/meta)
make target or script in another repo (e.g. SAI/meta)
SAI & meta headers
SAI & meta headers
Resource comes from external repo (resources assumed to be in this repo otherwise)
Resource comes from external repo (resources assumed to be in this repo otherwi...
Test scripts:
PTF, Pytest
built into container
Test scripts:...
Runtime socket communications (RPC commands or test traffic)
Runtime socket communications (RPC commands or test traffic)
Tgen Commands
Tgen Commands
Build step produces artifacts
Build step produces artifacts
make run-switch
make run-switch
make run-saithrift_XXXtests
make run-saithrift_XXXtests
(Git Submodule)
(Git Submodule)

compiled c++ test programs e.g. vnet_out
compiled c++ test p...
make docker-XXX-publish
make docker-XXX-publish
local environment
local environ...
Various repos (Ubuntu, p4.org, etc.)
Various repos (Ubunt...
local environment
local environ...
dash-xxx
dash-xxx
dash-XXX
dash-XXX
P4 Info
P4 Info
Reg
Reg
make docker-XXX-pull (explicit)
make docker-XXX...
docker-run (implicit)
docker-run (imp...
Python thrift client  lib*
Python thrift client...
Bmv2+
V1+ Arch
Bmv2+...
Git
Git
opencompute/SAI
opencompute/SAI
SAI PTF Framework
SAI PTF Framework
Scapy
Scapy
make deploy-ixia-c
make deploy-ixia-c
Build-time container
Build-time container
Run-time container
Run-time container
Test scripts:
PTF, Pytest
mounted from host dev env
Test scripts:...
make run-saithrift_dev-XXXtests
make run-saithrift_dev-XXXtests
/test-dev
/test-dev
/test
/test
/SAI
/SAI
Text is not SVG - cannot display
\ No newline at end of file +
ixia-c
ixia-c
SAI-P4RT
Adaptor/
P4RT Client
SAI-P4RT...
make  sai-thrift-client
make  sai-thrift-client
SW traffic 
generator
SW traffic...
DASH P4
behavioral model 
(source of truth)
DASH P4...
Standard OCP SAI
header files subset
(underlay)
Standard OCP SAI...
DASH SAI
header files
(overrlay)
DASH SAI...
Saithrift code
generator
Saithrift code...
Thrift server
skeleton C++ code
Thrift server...
opencompute/SAI
opencompute/SAI
make P4
make P4
DASH/dash-pipeline
DASH/dash-pipeline
Generate SAI headers
Generate SAI headers
DUT Software
Target
DUT Software...
Python thrift client  lib*
Python thrift client...
Git
Git
SAI-Thrift
commands
SAI-Thrift...
P4 "object code" loaded by bmv2 
P4 "object code" loaded by bmv2...
make sai-thrift-server
make sai-thrift-server
dash_pipeline_p4rt.json
dash_pipeline_p4rt.json
make run-sai-thrift-server
make run-sai-thrift-server
make libsai-test
make run-libsai-test
make libsai-test...
Git
Git
dash_pipeline.json
dash_pipeline.json
generate_dash_api.sh
generate_dash_api.sh
Containers provide the build & run environment:
Containers provide the b...
make docker-XXX
make docker-XXX
make sai
make sai
meta/make
meta/make
bmv2 SAI implementation C++ code
bmv2 SAI implementation C++ code
meta/gensairpc.pl
meta/gensairpc.pl
saithrift
server
saithrift...
libsai
libsai
p4c
p4c
make sai
make sai
make <target>
make <target>
LEGEND
LEGEND
make target or script in dash-pipeline
make target or script in dash-pipeline
make <target>
make <target>
make target or script in another repo (e.g. SAI/meta)
make target or script in another repo (e.g. SAI/meta)
SAI & meta headers
SAI & meta headers
Resource comes from external repo (resources assumed to be in this repo otherwise)
Resource comes from external repo (resources assumed to be in this repo otherwi...
Test scripts:
PTF, Pytest
built into container
Test scripts:...
Runtime socket communications (RPC commands or test traffic)
Runtime socket communications (RPC commands or test traffic)
Tgen Commands
Tgen Commands
Build step produces artifacts
Build step produces artifacts
make run-switch
make run-switch
make run-saithrift_XXXtests
make run-saithrift_XXXtests
(Git Submodule)
(Git Submodule)

compiled c++ test programs e.g. vnet_out
compiled c++ test p...
make docker-XXX-publish
make docker-XXX-publish
local environment
local environ...
Various repos (Ubuntu, p4.org, etc.)
Various repos (Ubunt...
local environment
local environ...
dash-xxx
dash-xxx
dash-XXX
dash-XXX
P4 Info
P4 Info
Reg
Reg
make docker-XXX-pull (explicit)
make docker-XXX...
docker-run (implicit)
docker-run (imp...
Python thrift client  lib*
Python thrift client...
Bmv2+
V1+ Arch
Bmv2+...
Git
Git
opencompute/SAI
opencompute/SAI
SAI PTF Framework
SAI PTF Framework
Scapy
Scapy
make deploy-ixia-c
make deploy-ixia-c
Build-time container
Build-time container
Run-time container
Run-time container
Test scripts:
PTF, Pytest
mounted from host dev env
Test scripts:...
make run-saithrift_dev-XXXtests
make run-saithrift_dev-XXXtests
/test-dev
/test-dev
/test
/test
/SAI
/SAI
Text is not SVG - cannot display
diff --git a/dash-pipeline/images/dash-submodule-git-hierarchy.svg b/dash-pipeline/images/dash-submodule-git-hierarchy.svg index f71edc447..e8ec70d9e 100644 --- a/dash-pipeline/images/dash-submodule-git-hierarchy.svg +++ b/dash-pipeline/images/dash-submodule-git-hierarchy.svg @@ -1,4 +1,4 @@ -
Git
Git
github.com/parent-project
github.com/parent-project
Git
Git
github.com/sonic-net/DASH
github.com/sonic-net/DASH
Git
Git
github.com/opencomputeproject/SAI
github.com/opencomputeproject/SAI
/DASH
/DASH
./dash-pipeline/SAI/SAI
./dash-pipeline/SAI/S...
Git Repos
Git Repos
Filesystem directories
Filesystem...
DASH  submodule directly imported into "parent-project
DASH  submodule directly i...
Git
Git
github.com/p4lang/ptf
github.com/p4lang/ptf
./test/ptf
./test/...
Git submodules used by DASH project itself, indirectly imported into "parent-project."
Git submodules used by DASH pr...
Text is not SVG - cannot display
\ No newline at end of file +
Git
Git
github.com/parent-project
github.com/parent-project
Git
Git
github.com/sonic-net/DASH
github.com/sonic-net/DASH
Git
Git
github.com/opencomputeproject/SAI
github.com/opencomputeproject/SAI
/DASH
/DASH
./dash-pipeline/SAI/SAI
./dash-pipeline/SAI/S...
Git Repos
Git Repos
Filesystem directories
Filesystem...
DASH  submodule directly imported into "parent-project
DASH  submodule directly i...
Git
Git
github.com/p4lang/ptf
github.com/p4lang/ptf
./test/ptf
./test/...
Git submodules used by DASH project itself, indirectly imported into "parent-project."
Git submodules used by DASH pr...
Text is not SVG - cannot display
diff --git a/dash-pipeline/images/dash-submodule-workflow.svg b/dash-pipeline/images/dash-submodule-workflow.svg index 96de7a3f6..7dd73b6a7 100644 --- a/dash-pipeline/images/dash-submodule-workflow.svg +++ b/dash-pipeline/images/dash-submodule-workflow.svg @@ -1,4 +1,4 @@ -
ixia-c
ixia-c
SAI
Implementation
?
SAI...
make  sai-thrift-client
make  sai-thrift-client
DASH P4
behavioral model 
(source of truth)
DASH P4...
Standard OCP SAI
header files subset
(underlay)
Standard OCP SAI...
DASH SAI
header files
(overrlay)
DASH SAI...
Saithrift code
generator
Saithrift code...
Thrift server
skeleton C++ code
Thrift server...
opencompute/SAI
opencompute/SAI
make P4
make P4
DASH/dash-pipeline
DASH/dash-pipeline
Generate SAI headers
Generate SAI headers
Git
Git
dash_pipeline.json
dash_pipeline.json
generate_dash_api.sh
generate_dash_api.sh
Containers provide the build & run environment:
Containers provide the b...
make docker-XXX
make docker-XXX
make sai
make sai
meta/make
meta/make
SAI implementation code
SAI implementation code
meta/gensairpc.pl
meta/gensairpc.pl
saithrift
server
saithrift...
libsai
libsai
p4c
p4c
make sai
make sai
make <target>
make <target>
LEGEND
LEGEND
make target or script in dash-pipeline
make target or script in dash-pipeline
make <target>
make <target>
make target or script in another repo (e.g. SAI/meta)
make target or script in another repo (e.g. SAI/meta)
SAI & meta headers
SAI & meta headers
Resource comes from external repo (resources assumed to be in this repo otherwise)
Resource comes from external repo (resources assumed to be in this repo otherwi...
Test scripts:
PTF, Pytest
built into container
Test scripts:...
Runtime socket communications (RPC commands or test traffic)
Runtime socket communications (RPC commands or test traffic)
Tgen Commands
Tgen Commands
Build step produces artifacts
Build step produces artifacts
make run-switch
make run-switch
make run-saithrift_XXXtests
make run-saithrift_XXXtests
(Git Submodule)
(Git Submodule)

make docker-XXX-publish
make docker-XXX-publish
local environment
local environ...
Various repos (Ubuntu, p4.org, etc.)
Various repos (Ubunt...
local environment
local environ...
dash-xxx
dash-xxx
dash-XXX
dash-XXX
P4 Info
P4 Info
Reg
Reg
make docker-XXX-pull (explicit)
make docker-XXX...
docker-run (implicit)
docker-run (imp...
Python thrift client  lib*
Python thrift client...
DASH Dataplane
DASH Dataplane
Git
Git
opencompute/SAI
opencompute/SAI
SAI PTF Framework
SAI PTF Framework
Scapy
Scapy
make deploy-ixia-c
make deploy-ixia-c
Build-time container
Build-time container
Run-time container
Run-time container
Test scripts:
PTF, Pytest
mounted from host dev env
Test scripts:...
make run-saithrift_dev-XXXtests
make run-saithrift_dev-XXXtests
/test-dev
/test-dev
/test
/test
/SAI
/SAI
Custom third-party implementation
Custom third-party i...
socket or in-process
socket or in...
Text is not SVG - cannot display
\ No newline at end of file +
ixia-c
ixia-c
SAI
Implementation
?
SAI...
make  sai-thrift-client
make  sai-thrift-client
DASH P4
behavioral model 
(source of truth)
DASH P4...
Standard OCP SAI
header files subset
(underlay)
Standard OCP SAI...
DASH SAI
header files
(overrlay)
DASH SAI...
Saithrift code
generator
Saithrift code...
Thrift server
skeleton C++ code
Thrift server...
opencompute/SAI
opencompute/SAI
make P4
make P4
DASH/dash-pipeline
DASH/dash-pipeline
Generate SAI headers
Generate SAI headers
Git
Git
dash_pipeline.json
dash_pipeline.json
generate_dash_api.sh
generate_dash_api.sh
Containers provide the build & run environment:
Containers provide the b...
make docker-XXX
make docker-XXX
make sai
make sai
meta/make
meta/make
SAI implementation code
SAI implementation code
meta/gensairpc.pl
meta/gensairpc.pl
saithrift
server
saithrift...
libsai
libsai
p4c
p4c
make sai
make sai
make <target>
make <target>
LEGEND
LEGEND
make target or script in dash-pipeline
make target or script in dash-pipeline
make <target>
make <target>
make target or script in another repo (e.g. SAI/meta)
make target or script in another repo (e.g. SAI/meta)
SAI & meta headers
SAI & meta headers
Resource comes from external repo (resources assumed to be in this repo otherwise)
Resource comes from external repo (resources assumed to be in this repo otherwi...
Test scripts:
PTF, Pytest
built into container
Test scripts:...
Runtime socket communications (RPC commands or test traffic)
Runtime socket communications (RPC commands or test traffic)
Tgen Commands
Tgen Commands
Build step produces artifacts
Build step produces artifacts
make run-switch
make run-switch
make run-saithrift_XXXtests
make run-saithrift_XXXtests
(Git Submodule)
(Git Submodule)

make docker-XXX-publish
make docker-XXX-publish
local environment
local environ...
Various repos (Ubuntu, p4.org, etc.)
Various repos (Ubunt...
local environment
local environ...
dash-xxx
dash-xxx
dash-XXX
dash-XXX
P4 Info
P4 Info
Reg
Reg
make docker-XXX-pull (explicit)
make docker-XXX...
docker-run (implicit)
docker-run (imp...
Python thrift client  lib*
Python thrift client...
DASH Dataplane
DASH Dataplane
Git
Git
opencompute/SAI
opencompute/SAI
SAI PTF Framework
SAI PTF Framework
Scapy
Scapy
make deploy-ixia-c
make deploy-ixia-c
Build-time container
Build-time container
Run-time container
Run-time container
Test scripts:
PTF, Pytest
mounted from host dev env
Test scripts:...
make run-saithrift_dev-XXXtests
make run-saithrift_dev-XXXtests
/test-dev
/test-dev
/test
/test
/SAI
/SAI
Custom third-party implementation
Custom third-party i...
socket or in-process
socket or in...
Text is not SVG - cannot display
diff --git a/dash-pipeline/images/dev-workflow-p4-libsai.svg b/dash-pipeline/images/dev-workflow-p4-libsai.svg index 6dd445554..54739efd7 100644 --- a/dash-pipeline/images/dev-workflow-p4-libsai.svg +++ b/dash-pipeline/images/dev-workflow-p4-libsai.svg @@ -1,4 +1,4 @@ -
p4c
p4c
make p4
(make p4-clean)
make p4...
P4.json
P4RT.json
P4.json...
Bmv2+
V1+ Arch
Bmv2+...
make run-switch
(make kill-switch)
make run-switch...
SAI-P4RT
Adaptor/
P4RT Client
SAI-P4RT...
tests/
libsai
tests/...
libsai
libsai
make run-libsai-test
make run-libsai-test
p4runtime
p4runtime
make sai
make sai
c++ sai config
c++ sai config
P4 coding,
libsai generator
P4 coding,...
make run-switch
make run-libsai-test
make run-switch...
make p4 sai libsai-test
make p4 sai libsai-te...
make  sai-thrift-client
make  sai-thrift-client
Test scripts:
PTF, Pytest
built into container
Test scripts:...
Python thrift client  lib*
Python thrift client...
SAI PTF Framework
SAI PTF Framework
Scapy
Scapy
/test
/test
/SAI
/SAI
packets (veths)
packets (veths)
make run-saithrift-client-bash
make run-saithrift-client-bash
optional
optional
Text is not SVG - cannot display
\ No newline at end of file +
p4c
p4c
make p4
(make p4-clean)
make p4...
P4.json
P4RT.json
P4.json...
Bmv2+
V1+ Arch
Bmv2+...
make run-switch
(make kill-switch)
make run-switch...
SAI-P4RT
Adaptor/
P4RT Client
SAI-P4RT...
tests/
libsai
tests/...
libsai
libsai
make run-libsai-test
make run-libsai-test
p4runtime
p4runtime
make sai
make sai
c++ sai config
c++ sai config
P4 coding,
libsai generator
P4 coding,...
make run-switch
make run-libsai-test
make run-switch...
make p4 sai libsai-test
make p4 sai libsai-te...
make  sai-thrift-client
make  sai-thrift-client
Test scripts:
PTF, Pytest
built into container
Test scripts:...
Python thrift client  lib*
Python thrift client...
SAI PTF Framework
SAI PTF Framework
Scapy
Scapy
/test
/test
/SAI
/SAI
packets (veths)
packets (veths)
make run-saithrift-client-bash
make run-saithrift-client-bash
optional
optional
Text is not SVG - cannot display
diff --git a/dash-pipeline/images/dev-workflow-p4-saithrift.svg b/dash-pipeline/images/dev-workflow-p4-saithrift.svg index fd4d7e8aa..492017882 100644 --- a/dash-pipeline/images/dev-workflow-p4-saithrift.svg +++ b/dash-pipeline/images/dev-workflow-p4-saithrift.svg @@ -1,4 +1,4 @@ -
p4c
p4c
make p4
(make p4-clean)
make p4...
P4.json
P4RT.json
P4.json...
Bmv2+
V1+ Arch
Bmv2+...
make run-switch
(make kill-switch)
make run-switch...
SAI-P4RT
Adaptor/
P4RT Client
SAI-P4RT...
saithrift-server
saithrift-...
libsai
libsai
p4runtime
p4runtime
make sai
make sai
make saithrift-server
make saithrift-server
make sai-thrift-client
make sai-thrift-client
Test scripts:
PTF, Pytest
built into container
Test scripts:...
make run-xxx-tests
make run-xxx-tests
Python thrift client  lib*
Python thrift client...
SAI PTF Framework
SAI PTF Framework
Scapy
Scapy
/test
/test
/SAI
/SAI
red = included in "make all"
red = included in "make all"
packets (veths)
packets (veths)
Tgen commands
Tgen commands
saithrift commands
saithrift commands
any coding
any coding
make run-switch
make run-sai-thrift-server
make run-all-tests
make run-switch...
make all
make all
/test-dev
/test-dev
test-case coding
test-case co...
run tests
interactively
run tests...
make run-saithrift-client-bash
make run-saithrift-client-bash
Text is not SVG - cannot display
\ No newline at end of file +
p4c
p4c
make p4
(make p4-clean)
make p4...
P4.json
P4RT.json
P4.json...
Bmv2+
V1+ Arch
Bmv2+...
make run-switch
(make kill-switch)
make run-switch...
SAI-P4RT
Adaptor/
P4RT Client
SAI-P4RT...
saithrift-server
saithrift-...
libsai
libsai
p4runtime
p4runtime
make sai
make sai
make saithrift-server
make saithrift-server
make sai-thrift-client
make sai-thrift-client
Test scripts:
PTF, Pytest
built into container
Test scripts:...
make run-xxx-tests
make run-xxx-tests
Python thrift client  lib*
Python thrift client...
SAI PTF Framework
SAI PTF Framework
Scapy
Scapy
/test
/test
/SAI
/SAI
red = included in "make all"
red = included in "make all"
packets (veths)
packets (veths)
Tgen commands
Tgen commands
saithrift commands
saithrift commands
any coding
any coding
make run-switch
make run-sai-thrift-server
make run-all-tests
make run-switch...
make all
make all
/test-dev
/test-dev
test-case coding
test-case co...
run tests
interactively
run tests...
make run-saithrift-client-bash
make run-saithrift-client-bash
Text is not SVG - cannot display
diff --git a/dash-pipeline/images/dev-workflow-p4.svg b/dash-pipeline/images/dev-workflow-p4.svg index 0a96f4750..b88c10e00 100644 --- a/dash-pipeline/images/dev-workflow-p4.svg +++ b/dash-pipeline/images/dev-workflow-p4.svg @@ -1,4 +1,4 @@ -
make p4
(make p4-clean)
make p4...
P4.json
P4RT.json
P4.json...
Bmv2+
V1+ Arch
Bmv2+...
make run-switch
(make kill-switch)
make run-switch...
P4 coding
P4 coding
manually verify
manually v...
make p4
make p4
make  sai-thrift-client
make  sai-thrift-client
Test scripts:
PTF, Pytest
built into container
Test scripts:...
Python thrift client  lib*
Python thrift client...
SAI PTF Framework
SAI PTF Framework
Scapy
Scapy
/test
/test
/SAI
/SAI
packets (veths)
packets (veths)
make run-saithrift-client-bash
make run-saithrift-client-bash
optional
optional
Text is not SVG - cannot display
\ No newline at end of file +
make p4
(make p4-clean)
make p4...
P4.json
P4RT.json
P4.json...
Bmv2+
V1+ Arch
Bmv2+...
make run-switch
(make kill-switch)
make run-switch...
P4 coding
P4 coding
manually verify
manually v...
make p4
make p4
make  sai-thrift-client
make  sai-thrift-client
Test scripts:
PTF, Pytest
built into container
Test scripts:...
Python thrift client  lib*
Python thrift client...
SAI PTF Framework
SAI PTF Framework
Scapy
Scapy
/test
/test
/SAI
/SAI
packets (veths)
packets (veths)
make run-saithrift-client-bash
make run-saithrift-client-bash
optional
optional
Text is not SVG - cannot display
diff --git a/dash-pipeline/images/docker-volume-mounts.svg b/dash-pipeline/images/docker-volume-mounts.svg index 9d26054f3..9ec755fd8 100644 --- a/dash-pipeline/images/docker-volume-mounts.svg +++ b/dash-pipeline/images/docker-volume-mounts.svg @@ -1,4 +1,4 @@ -
Host Filesystem
Host Files...
Container Filesystem
Container...
/
  /WORKDIR
      /DASH
        /dash-pipeline
          /SAI
/...
/
  /SAI
/...
mount
mount
docker run -v $(PWD)/SAI:/SAI
docker run -v $(PWD)/SAI:/SAI
Text is not SVG - cannot display
\ No newline at end of file +
Host Filesystem
Host Files...
Container Filesystem
Container...
/
  /WORKDIR
      /DASH
        /dash-pipeline
          /SAI
/...
/
  /SAI
/...
mount
mount
docker run -v $(PWD)/SAI:/SAI
docker run -v $(PWD)/SAI:/SAI
Text is not SVG - cannot display
diff --git a/dash-pipeline/tests/libsai/README.md b/dash-pipeline/tests/libsai/README.md index d318bb1fb..fa7177ffb 100644 --- a/dash-pipeline/tests/libsai/README.md +++ b/dash-pipeline/tests/libsai/README.md @@ -1,2 +1,2 @@ # libsai tests directory -These tests are written in c++ and are intended to test and demonstrate writing DASH API configuration and management code which links to the `libsai` library for DASH. In particular, these programs use the SAI-to-P4Runtime adaptor layer. As such they require many libraries including gRPC, protobuf, P4 PI layer etc. in addition to `libsai` itself. \ No newline at end of file +These tests are written in c++ and are intended to test and demonstrate writing DASH API configuration and management code which links to the `libsai` library for DASH. In particular, these programs use the SAI-to-P4Runtime adaptor layer. As such they require many libraries including gRPC, protobuf, P4 PI layer etc. in addition to `libsai` itself. diff --git a/dash-pipeline/tests/saithrift/README.md b/dash-pipeline/tests/saithrift/README.md index 1d7d5bb6f..4520265af 100644 --- a/dash-pipeline/tests/saithrift/README.md +++ b/dash-pipeline/tests/saithrift/README.md @@ -5,4 +5,4 @@ This directory contains tests for DASH pipeline using python `saithrift` client The tests use the same thrift and saithrift client libraries and in general the configuration and setup of the DASH data plane will use the same APIs and command sequences. The frameworks differ primarily in how test suites are designed and orchestrated. Each framework has advantages and disadvantages, hence both are supported as first-class citizens. -In particular the PTF test framework has a significant body of helper libraries which simplify setup. The corollary is that the PTF libraries make a lot of embedded assumptions about the test target, the environment and the data plane SW packet generator (scapy). \ No newline at end of file +In particular the PTF test framework has a significant body of helper libraries which simplify setup. The corollary is that the PTF libraries make a lot of embedded assumptions about the test target, the environment and the data plane SW packet generator (scapy). diff --git a/dash-pipeline/tests/saithrift/ptf/README.md b/dash-pipeline/tests/saithrift/ptf/README.md index e8f99433d..5d7500d30 100644 --- a/dash-pipeline/tests/saithrift/ptf/README.md +++ b/dash-pipeline/tests/saithrift/ptf/README.md @@ -3,4 +3,4 @@ This directory can contain PTF tests for DASH bmv2. These would supplement standard tests under [SAI/ptf](../../SAI/ptf) -CI-ready DASH tests are moved to [`test/test-cases/functional/ptf`](../../../../test/test-cases/functional/ptf/) \ No newline at end of file +CI-ready DASH tests are moved to [`test/test-cases/functional/ptf`](../../../../test/test-cases/functional/ptf/) diff --git a/doc-github-rules.md b/doc-github-rules.md index 789c3efb0..e4b46eb4d 100644 --- a/doc-github-rules.md +++ b/doc-github-rules.md @@ -204,4 +204,4 @@ See also [A collection of .gitignore templates](https://github.com/github/gitign - [Visual studio code](https://code.visualstudio.com/) - [Gitlens](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens). Supercharge the Git capabilities. - [Markdown All in One](https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one). Create the ToC for an article. -- [Drawing tool: diagrams.net](https://www.diagrams.net/) \ No newline at end of file +- [Drawing tool: diagrams.net](https://www.diagrams.net/) diff --git a/documentation/dataplane/README.md b/documentation/dataplane/README.md index 03dc75736..2ca344457 100644 --- a/documentation/dataplane/README.md +++ b/documentation/dataplane/README.md @@ -14,4 +14,4 @@ This folder contains DASH data plane design and requirements documents. ## Requirements | Document | Description | -| ------------------------------------------------------ | ------------------------------------------ | \ No newline at end of file +| ------------------------------------------------------ | ------------------------------------------ | diff --git a/documentation/dataplane/dash-config-schema-json.md b/documentation/dataplane/dash-config-schema-json.md index d813ab48d..f8a8531ff 100644 --- a/documentation/dataplane/dash-config-schema-json.md +++ b/documentation/dataplane/dash-config-schema-json.md @@ -734,4 +734,4 @@ last update: 04/12/2022 } -``` \ No newline at end of file +``` diff --git a/documentation/encrypt-gw-service/README.md b/documentation/encrypt-gw-service/README.md index 264913705..5f033d786 100644 --- a/documentation/encrypt-gw-service/README.md +++ b/documentation/encrypt-gw-service/README.md @@ -11,4 +11,4 @@ This folder contains DASH Encryption Gateway Service design and requirements doc ## Requirements | Document | Description | -| ------------------------------------------------------ | ------------------------------------------ | \ No newline at end of file +| ------------------------------------------------------ | ------------------------------------------ | diff --git a/documentation/express-route-service/README.md b/documentation/express-route-service/README.md index e951ad476..5217d2695 100644 --- a/documentation/express-route-service/README.md +++ b/documentation/express-route-service/README.md @@ -11,4 +11,4 @@ This folder contains DASH Express Route Gateway Service design and requirements ## Requirements | Document | Description | -| ------------------------------------------------------ | ------------------------------------------ | \ No newline at end of file +| ------------------------------------------------------ | ------------------------------------------ | diff --git a/documentation/general/README.md b/documentation/general/README.md index da9a60763..b0e86fddb 100644 --- a/documentation/general/README.md +++ b/documentation/general/README.md @@ -20,4 +20,4 @@ This folder contains DASH general design and requirements documents. | Document | Description | | ---------------------------------------------------------------------------------- | ------------------------------------------ | | [dash-general-compliance-requirements.md](dash-general-compliance-requirements.md) | DASH General Compliance Requirements | -| [program-scale-testing-requirements-draft.md](program-scale-testing-requirements-draft.md) | DASH scale and performance requirements | \ No newline at end of file +| [program-scale-testing-requirements-draft.md](program-scale-testing-requirements-draft.md) | DASH scale and performance requirements | diff --git a/documentation/general/images/dash-hld-eni-objects.svg b/documentation/general/images/dash-hld-eni-objects.svg index f95584a60..0d51d22c3 100644 --- a/documentation/general/images/dash-hld-eni-objects.svg +++ b/documentation/general/images/dash-hld-eni-objects.svg @@ -1,4 +1,4 @@ -
QoS
QoS
KEY:MAC
KEY:MAC
ROUTE_TABLE:Prefix
ROUTE_TABLE:Prefix
ACL_IN/ACL_OUT
ACL_IN/ACL_OUT
ENI Objects
ENI Objects
Text is not SVG - cannot display
\ No newline at end of file +
QoS
QoS
KEY:MAC
KEY:MAC
ROUTE_TABLE:Prefix
ROUTE_TABLE:Prefix
ACL_IN/ACL_OUT
ACL_IN/ACL_OUT
ENI Objects
ENI Objects
Text is not SVG - cannot display
diff --git a/documentation/general/images/dash-hld-inbound-packet-processing-pipeline.svg b/documentation/general/images/dash-hld-inbound-packet-processing-pipeline.svg index 40290e1c7..ebfd96806 100644 --- a/documentation/general/images/dash-hld-inbound-packet-processing-pipeline.svg +++ b/documentation/general/images/dash-hld-inbound-packet-processing-pipeline.svg @@ -1,4 +1,4 @@ -
VNI Lookup
(set direction)
VNI Lookup...
ENI Lookup
ENI Lookup
Conntrack Lookup
Conntrack Lookup
Routing
Routing
ACLs
ACLs
Metering
Metering
Conntrack Update
Conntrack Update
Network
Network
VM
VM
Vxlan Encap
Vxlan Encap
Text is not SVG - cannot display
\ No newline at end of file +
VNI Lookup
(set direction)
VNI Lookup...
ENI Lookup
ENI Lookup
Conntrack Lookup
Conntrack Lookup
Routing
Routing
ACLs
ACLs
Metering
Metering
Conntrack Update
Conntrack Update
Network
Network
VM
VM
Vxlan Encap
Vxlan Encap
Text is not SVG - cannot display
diff --git a/documentation/general/images/dash-hld-vnet-objects.svg b/documentation/general/images/dash-hld-vnet-objects.svg index 674b99c83..7d593a857 100644 --- a/documentation/general/images/dash-hld-vnet-objects.svg +++ b/documentation/general/images/dash-hld-vnet-objects.svg @@ -1,4 +1,4 @@ -
VNET Objects
VNET Objects
KEY:VNET_NAME
KEY:VNET_NAME
MAPPING_TABLE:CA_IP
MAPPING_TABLE:CA_IP
VNI
VNI
Text is not SVG - cannot display
\ No newline at end of file +
VNET Objects
VNET Objects
KEY:VNET_NAME
KEY:VNET_NAME
MAPPING_TABLE:CA_IP
MAPPING_TABLE:CA_IP
VNI
VNI
Text is not SVG - cannot display
diff --git a/documentation/general/images/dash-simplified-physical-deployment-example.svg b/documentation/general/images/dash-simplified-physical-deployment-example.svg index abf3ef3e2..328050975 100644 --- a/documentation/general/images/dash-simplified-physical-deployment-example.svg +++ b/documentation/general/images/dash-simplified-physical-deployment-example.svg @@ -1,4 +1,4 @@ -
Regional Network Gateway

West     East
Regional Netw...
Regional Network Gateway

West     East
Regional Netw...
DataCenterRow(s)
Appliance
Applian...
e
e
Traffic
Traffic
External/Internet
External/Internet
Destination
Destination
Representative Region & DataCenter
Representative Region & DataCenter
Appliance
Applian...
Server Racks w/ToRs
Server R...
Server Racks w/ToRs
Server R...
WAN Equipment
WAN Equipment
WAN Equipment
WAN Equipment
Server w/VMs
Server w/VMs
Server w/VMs
Server w/VMs
Rack w/Appliance
Rack w/Appliance
Rack w/Appliance
Rack w/Appliance
Smart Switch
Smart Switch
DASH on ToR
DASH on ToR
DASH on
Appliance
DASH on...
DASH on NIC
DASH on NIC
Text is not SVG - cannot display
\ No newline at end of file +
Regional Network Gateway

West     East
Regional Netw...
Regional Network Gateway

West     East
Regional Netw...
DataCenterRow(s)
Appliance
Applian...
e
e
Traffic
Traffic
External/Internet
External/Internet
Destination
Destination
Representative Region & DataCenter
Representative Region & DataCenter
Appliance
Applian...
Server Racks w/ToRs
Server R...
Server Racks w/ToRs
Server R...
WAN Equipment
WAN Equipment
WAN Equipment
WAN Equipment
Server w/VMs
Server w/VMs
Server w/VMs
Server w/VMs
Rack w/Appliance
Rack w/Appliance
Rack w/Appliance
Rack w/Appliance
Smart Switch
Smart Switch
DASH on ToR
DASH on ToR
DASH on
Appliance
DASH on...
DASH on NIC
DASH on NIC
Text is not SVG - cannot display
diff --git a/documentation/general/images/hld/dash-appliance-architecture.svg b/documentation/general/images/hld/dash-appliance-architecture.svg index 64ce75cb4..4145822e2 100644 --- a/documentation/general/images/hld/dash-appliance-architecture.svg +++ b/documentation/general/images/hld/dash-appliance-architecture.svg @@ -1,4 +1,4 @@ -
database container
database container
redis server
redis server
Kernel Space
Kernel Space
bgp container
bgp container
bgpd
bgpd
zebra
zebra
fpm-syncd
fpm-syncd
dhcp-relay container
dhcp-relay container
dhcp-relay
dhcp-relay
pmon container
pmon container
fan control 
fan control 
sensord
sensord
snmp container
snmp container
snmpd
snmpd
snmp-subagent
snmp-subagent
teamd container
teamd container
teamd
teamd
teamsyncd
teamsyncd
lldp container
lldp container
lldpd
lldpd
lldpmgrd
lldpmgrd
lldp-syncd
lldp-syncd
swss container
swss container
portsyncd
portsyncd
intfsyncd
intfsyncd
neighsyncd
neighsyncd
orchagent
orchagent
intfmgrd
intfmgrd
vlanmgrd
vlanmgrd
syncd container
syncd container
syncd
syncd
sai api DASH
sai api DASH
asic (vendor) sdk
asic (vendor) sdk
sonic-cfggen
sonic-cfggen
CLI
CLI
asic drivers
asic drivers
network drivers
network drivers
platform drivers
platform drivers
transceivers
transceivers
fan/power/leds
fan/power/leds
Customizable
Customizable
User Space
User Space
telemetry container
telemetry container
telemetry
telemetry
Hardware
Hardware
gNMI container
gNMI container
DASH API
DASH API
Appliance
Appliance
SONiC ToR
SONiC ToR
Appliance w/6 NIC
Applianc...
NIC w/DPU 
NIC w/DPU 
Text is not SVG - cannot display
\ No newline at end of file +
database container
database container
redis server
redis server
Kernel Space
Kernel Space
bgp container
bgp container
bgpd
bgpd
zebra
zebra
fpm-syncd
fpm-syncd
dhcp-relay container
dhcp-relay container
dhcp-relay
dhcp-relay
pmon container
pmon container
fan control 
fan control 
sensord
sensord
snmp container
snmp container
snmpd
snmpd
snmp-subagent
snmp-subagent
teamd container
teamd container
teamd
teamd
teamsyncd
teamsyncd
lldp container
lldp container
lldpd
lldpd
lldpmgrd
lldpmgrd
lldp-syncd
lldp-syncd
swss container
swss container
portsyncd
portsyncd
intfsyncd
intfsyncd
neighsyncd
neighsyncd
orchagent
orchagent
intfmgrd
intfmgrd
vlanmgrd
vlanmgrd
syncd container
syncd container
syncd
syncd
sai api DASH
sai api DASH
asic (vendor) sdk
asic (vendor) sdk
sonic-cfggen
sonic-cfggen
CLI
CLI
asic drivers
asic drivers
network drivers
network drivers
platform drivers
platform drivers
transceivers
transceivers
fan/power/leds
fan/power/leds
Customizable
Customizable
User Space
User Space
telemetry container
telemetry container
telemetry
telemetry
Hardware
Hardware
gNMI container
gNMI container
DASH API
DASH API
Appliance
Appliance
SONiC ToR
SONiC ToR
Appliance w/6 NIC
Applianc...
NIC w/DPU 
NIC w/DPU 
Text is not SVG - cannot display
diff --git a/documentation/general/images/hld/dash-high-level-appliance.svg b/documentation/general/images/hld/dash-high-level-appliance.svg index 4121d0c1b..81b830826 100644 --- a/documentation/general/images/hld/dash-high-level-appliance.svg +++ b/documentation/general/images/hld/dash-high-level-appliance.svg @@ -1,4 +1,4 @@ -
SONiC DASH on SDN Appliance w/6 DPU
SONiC DASH on SDN Appliance w/6 DPU

Presents as 1 Appliance
Presents as 1 Appliance
SONiC or SONiC-DASHgNMI Container
gNMI
gNMI
DPU#1SONiC or SONiC-DASHgNMI Container
gNMI
gNMI
DPU#2DZSONiC or SONiC-DASHgNMI Container
gNMI
gNMI
DPU#3SONiC or SONiC-DASHgNMI Container
gNMI
gNMI
DPU#4SONiC or SONiC-DASHgNMI Container
gNMI
gNMI
DPU#5SONiC or SONiC-DASHgNMI Container
gNMI
gNMI
DPU#6


...
SDN Controller (Network Management as a Service (NMaaS))
SDN Controller (Network Management as a Service (NMaaS))
Text is not SVG - cannot display
\ No newline at end of file +
SONiC DASH on SDN Appliance w/6 DPU
SONiC DASH on SDN Appliance w/6 DPU

Presents as 1 Appliance
Presents as 1 Appliance
SONiC or SONiC-DASHgNMI Container
gNMI
gNMI
DPU#1SONiC or SONiC-DASHgNMI Container
gNMI
gNMI
DPU#2DZSONiC or SONiC-DASHgNMI Container
gNMI
gNMI
DPU#3SONiC or SONiC-DASHgNMI Container
gNMI
gNMI
DPU#4SONiC or SONiC-DASHgNMI Container
gNMI
gNMI
DPU#5SONiC or SONiC-DASHgNMI Container
gNMI
gNMI
DPU#6


...
SDN Controller (Network Management as a Service (NMaaS))
SDN Controller (Network Management as a Service (NMaaS))
Text is not SVG - cannot display
diff --git a/documentation/general/images/hld/dash-high-level-design-schema.svg b/documentation/general/images/hld/dash-high-level-design-schema.svg index 460bbfa7b..49945e029 100644 --- a/documentation/general/images/hld/dash-high-level-design-schema.svg +++ b/documentation/general/images/hld/dash-high-level-design-schema.svg @@ -1,4 +1,4 @@ -
database container
database container
ASIC_DB
ASIC_DB
APP_DB
APP_DB
redis server
redis server
syncd container
syncd container
syncd
syncd
sai api DASH
sai api DASH
asic (vendor) sdk 
asic (vendor) sdk 
sonic-cfggen
sonic-cfggen
CLI
CLI
import/export
import/export
SDN Controller
SDN Controller
DASH API
DASH API
gNMI Client
gNMI Client
DASH/gNMI container
DASH/gNMI container
gNMI server
gNMI server
Config Backend
Config Backend
SWSS
SWSS
dashorch
dashorch
orchagent
orchagent
gRPC get/set call
gRPC get/set call
Example DASH_APP_DB Database Schema

DASH_MAPPING_TABLE:{{vnet}}:{{ip_address}} 

    "routing_type": {{routing_type}} 
    "underlay_ip":{{ip_address}}
    "mac_address":{{mac_address}} (OPTIONAL) 
    "metering_bucket": {{bucket_id}}(OPTIONAL)
key                      = DASH_ROUTE_TABLE:eni:ip_address ; ENI route table with CA IP
; field                  = value 
action_type              = routing_type              ; reference to routing type
underlay_ip              = ip_address                ; PA address for the CA
mac_address              = MAC address as string     ; Inner dst mac
metering_bucket          = bucket_id                 ; metering and counter
Example DASH_APP_DB Database Schema...
Standardized JSON format for DASH configuration. Can be used as declarative test-case data. Can be expressed as literal JSON content or generated programmatically on the fly for testing.
Standardized JSON format for DASH co...
SAI Objects
Transform APP objs to ASIC objs
Transform APP obj...
Transform gNMI YANG objects  to APP DB objects
Transform gNMI YA...
YANG Schema
YANG Sc...
Script or code-as-config data
Script or co...
transform & drive API
transform &...
DASH Config
DASH Config
Generate
Generate
gNMI
gNMI
SAI-redis
SAI-redis
SAI-thrift
SAI-thrift
Canonical test data can be transformed into any API to allow same test cases to be applied to every level in the stack.
Canonical test data can be tra...
import/export
import/...
Viewer does not support full SVG 1.1
\ No newline at end of file +
database container
database container
ASIC_DB
ASIC_DB
APP_DB
APP_DB
redis server
redis server
syncd container
syncd container
syncd
syncd
sai api DASH
sai api DASH
asic (vendor) sdk 
asic (vendor) sdk 
sonic-cfggen
sonic-cfggen
CLI
CLI
import/export
import/export
SDN Controller
SDN Controller
DASH API
DASH API
gNMI Client
gNMI Client
DASH/gNMI container
DASH/gNMI container
gNMI server
gNMI server
Config Backend
Config Backend
SWSS
SWSS
dashorch
dashorch
orchagent
orchagent
gRPC get/set call
gRPC get/set call
Example DASH_APP_DB Database Schema

DASH_MAPPING_TABLE:{{vnet}}:{{ip_address}} 

    "routing_type": {{routing_type}} 
    "underlay_ip":{{ip_address}}
    "mac_address":{{mac_address}} (OPTIONAL) 
    "metering_bucket": {{bucket_id}}(OPTIONAL)
key                      = DASH_ROUTE_TABLE:eni:ip_address ; ENI route table with CA IP
; field                  = value 
action_type              = routing_type              ; reference to routing type
underlay_ip              = ip_address                ; PA address for the CA
mac_address              = MAC address as string     ; Inner dst mac
metering_bucket          = bucket_id                 ; metering and counter
Example DASH_APP_DB Database Schema...
Standardized JSON format for DASH configuration. Can be used as declarative test-case data. Can be expressed as literal JSON content or generated programmatically on the fly for testing.
Standardized JSON format for DASH co...
SAI Objects
Transform APP objs to ASIC objs
Transform APP obj...
Transform gNMI YANG objects  to APP DB objects
Transform gNMI YA...
YANG Schema
YANG Sc...
Script or code-as-config data
Script or co...
transform & drive API
transform &...
DASH Config
DASH Config
Generate
Generate
gNMI
gNMI
SAI-redis
SAI-redis
SAI-thrift
SAI-thrift
Canonical test data can be transformed into any API to allow same test cases to be applied to every level in the stack.
Canonical test data can be tra...
import/export
import/...
Viewer does not support full SVG 1.1
diff --git a/documentation/general/images/hld/dash-high-level-design.svg b/documentation/general/images/hld/dash-high-level-design.svg index 966cd5381..cedbfcf49 100644 --- a/documentation/general/images/hld/dash-high-level-design.svg +++ b/documentation/general/images/hld/dash-high-level-design.svg @@ -1,4 +1,4 @@ -
database container
database container
redis server
redis server
Kernel Space
Kernel Space
syncd container
syncd container
syncd
syncd
sai api DASH
sai api DASH
asic (vendor) sdk 
asic (vendor) sdk 
sonic-cfggen
sonic-cfggen
CLI
CLI
Customizable
Customizable
User Space
User Space
SDN Controller
SDN Controller
DASH API
DASH API
gNMI Client
gNMI Client
DASH High Level 
Design
DASH High Level...
DASH/gNMI container
DASH/gNMI container
gNMI server
gNMI server
Config Backend
Config Backend
SWSS
SWSS
dashorch
dashorch
orchagent
orchagent
gRPC get/set call
gRPC get/set call
Viewer does not support full SVG 1.1
\ No newline at end of file +
database container
database container
redis server
redis server
Kernel Space
Kernel Space
syncd container
syncd container
syncd
syncd
sai api DASH
sai api DASH
asic (vendor) sdk 
asic (vendor) sdk 
sonic-cfggen
sonic-cfggen
CLI
CLI
Customizable
Customizable
User Space
User Space
SDN Controller
SDN Controller
DASH API
DASH API
gNMI Client
gNMI Client
DASH High Level 
Design
DASH High Level...
DASH/gNMI container
DASH/gNMI container
gNMI server
gNMI server
Config Backend
Config Backend
SWSS
SWSS
dashorch
dashorch
orchagent
orchagent
gRPC get/set call
gRPC get/set call
Viewer does not support full SVG 1.1
diff --git a/documentation/general/images/hld/dash-high-level-smart-switch.svg b/documentation/general/images/hld/dash-high-level-smart-switch.svg index 735c29da6..df5d6af07 100644 --- a/documentation/general/images/hld/dash-high-level-smart-switch.svg +++ b/documentation/general/images/hld/dash-high-level-smart-switch.svg @@ -1,4 +1,4 @@ -
database container
database container
redis server
redis server
syncd container
syncd container
syncd
syncd
sai api
sai api
asic (vendor) sdk
asic (vendor) sdk
syncd container
syncd container
syncd
syncd
sai api DASH
sai api DASH
asic (vendor) sdk
asic (vendor) sdk
syncd container
syncd container
syncd
syncd
sai api DASH
sai api DASH
asic (vendor) sdk
asic (vendor) sdk
syncd container
syncd container
syncd
syncd
sai api DASH
sai api DASH
asic (vendor) sdk
asic (vendor) sdk
syncd container
syncd container
syncd
syncd
sai api DASH
sai api DASH
asic (vendor) sdk
asic (vendor) sdk
gNMI ContainerSONiC on Smart Switch
Smart switch
Smart switch
DASH capable DPU#1
DASH capable DPU#1
DASH capable DPU#2
DASH capable DPU#2
DASH capable DPU#3
DASH capable DPU#3
DASH capable DPU#4
DASH capable DPU#4
swss container
swss container
portsyncd
portsyncd
intfsyncd
intfsyncd
neighsyncd
neighsyncd
orhagent
orhagent
intfmgrd
intfmgrd
vlanmgrd
vlanmgrd


...
SDN Controller (Network Management as a Service - NMaaS)
SDN Controller (Network Management as a Service - NMaaS)
Text is not SVG - cannot display
\ No newline at end of file +
database container
database container
redis server
redis server
syncd container
syncd container
syncd
syncd
sai api
sai api
asic (vendor) sdk
asic (vendor) sdk
syncd container
syncd container
syncd
syncd
sai api DASH
sai api DASH
asic (vendor) sdk
asic (vendor) sdk
syncd container
syncd container
syncd
syncd
sai api DASH
sai api DASH
asic (vendor) sdk
asic (vendor) sdk
syncd container
syncd container
syncd
syncd
sai api DASH
sai api DASH
asic (vendor) sdk
asic (vendor) sdk
syncd container
syncd container
syncd
syncd
sai api DASH
sai api DASH
asic (vendor) sdk
asic (vendor) sdk
gNMI ContainerSONiC on Smart Switch
Smart switch
Smart switch
DASH capable DPU#1
DASH capable DPU#1
DASH capable DPU#2
DASH capable DPU#2
DASH capable DPU#3
DASH capable DPU#3
DASH capable DPU#4
DASH capable DPU#4
swss container
swss container
portsyncd
portsyncd
intfsyncd
intfsyncd
neighsyncd
neighsyncd
orhagent
orhagent
intfmgrd
intfmgrd
vlanmgrd
vlanmgrd


...
SDN Controller (Network Management as a Service - NMaaS)
SDN Controller (Network Management as a Service - NMaaS)
Text is not SVG - cannot display
diff --git a/documentation/general/images/hld/dash-hld-project-ecosystem.svg b/documentation/general/images/hld/dash-hld-project-ecosystem.svg index ddc4d680c..42fe0bb12 100644 --- a/documentation/general/images/hld/dash-hld-project-ecosystem.svg +++ b/documentation/general/images/hld/dash-hld-project-ecosystem.svg @@ -1,4 +1,4 @@ -
DASH
DASH
SONiC OS
SONiC OS
Cloud Deployment
Cloud Deployment
SDN
SDN
SONiC Integration Test Suite
SONiC Integration Te...

Programmable
Networking Devices
 
Programmable...
Scenarios
Scenarios
P4 
Behavioral
Model
P4...
DASH Services Conformance and
Performance
Test Suite
DASH Services Confor...
Text is not SVG - cannot display
\ No newline at end of file +
DASH
DASH
SONiC OS
SONiC OS
Cloud Deployment
Cloud Deployment
SDN
SDN
SONiC Integration Test Suite
SONiC Integration Te...

Programmable
Networking Devices
 
Programmable...
Scenarios
Scenarios
P4 
Behavioral
Model
P4...
DASH Services Conformance and
Performance
Test Suite
DASH Services Confor...
Text is not SVG - cannot display
diff --git a/documentation/general/images/hld/dash-hld-software-stack.svg b/documentation/general/images/hld/dash-hld-software-stack.svg index 03bcb87d1..b67d2c74d 100644 --- a/documentation/general/images/hld/dash-hld-software-stack.svg +++ b/documentation/general/images/hld/dash-hld-software-stack.svg @@ -1,4 +1,4 @@ -
gNMI container
gNMI container
Switch State Service (SWSS)
Switch State Service (SWSS)
ASIC Drivers
ASIC Drivers
Switch Abstraction Interface (SAI) API DASH extension
Switch Abstraction Interface (SAI) API DASH extension
DASH capable ASICs
DASH capable ASICs
Redis
Redis
User Space
User Space
Kernel Space
Kernel Space
Hardware
Hardware
SDN Controller (NMaaS)
SDN Controller (NMaaS)
Management Space
Management Space
Technology provider ASIC SDK
Technology provider ASIC SDK
SONiC app containers
SONiC app containers
Text is not SVG - cannot display
\ No newline at end of file +
gNMI container
gNMI container
Switch State Service (SWSS)
Switch State Service (SWSS)
ASIC Drivers
ASIC Drivers
Switch Abstraction Interface (SAI) API DASH extension
Switch Abstraction Interface (SAI) API DASH extension
DASH capable ASICs
DASH capable ASICs
Redis
Redis
User Space
User Space
Kernel Space
Kernel Space
Hardware
Hardware
SDN Controller (NMaaS)
SDN Controller (NMaaS)
Management Space
Management Space
Technology provider ASIC SDK
Technology provider ASIC SDK
SONiC app containers
SONiC app containers
Text is not SVG - cannot display
diff --git a/documentation/general/images/hld/dash-single-dpu-architecture.svg b/documentation/general/images/hld/dash-single-dpu-architecture.svg index dbdf9cc1c..c12bd046d 100644 --- a/documentation/general/images/hld/dash-single-dpu-architecture.svg +++ b/documentation/general/images/hld/dash-single-dpu-architecture.svg @@ -1,4 +1,4 @@ -
database container
database container
redis server
redis server
Kernel Space
Kernel Space
bgp container
bgp container
bgpd
bgpd
zebra
zebra
fpm-syncd
fpm-syncd
dhcp-relay container
dhcp-relay container
dhcp-relay
dhcp-relay
pmon container
pmon container
fan control 
fan control 
sensord
sensord
snmp container
snmp container
snmpd
snmpd
snmp-subagent
snmp-subagent
teamd container
teamd container
teamd
teamd
teamsyncd
teamsyncd
lldp container
lldp container
lldpd
lldpd
lldpmgrd
lldpmgrd
lldp-syncd
lldp-syncd
swss container
swss container
portsyncd
portsyncd
intfsyncd
intfsyncd
neighsyncd
neighsyncd
orchagent
orchagent
intfmgrd
intfmgrd
vlanmgrd
vlanmgrd
syncd container
syncd container
syncd
syncd
sai api DASH
sai api DASH
asic (vendor) sdk 
asic (vendor) sdk 
sonic-cfggen
sonic-cfggen
CLI
CLI
asic drivers
asic drivers
network drivers
network drivers
platform drivers
platform drivers
transceivers
transceivers
DASH capable
single DPU
DASH capable...
fan/power/leds
fan/power/leds
Customizable
Customizable
User Space
User Space
Hardware
Hardware
gNMI container
gNMI container
DASH API
DASH API
telemetry container
telemetry container
telemetry
telemetry
This drawing is for the NIC form factor, single DPU
This drawing is for the NIC form factor,...
Text is not SVG - cannot display
\ No newline at end of file +
database container
database container
redis server
redis server
Kernel Space
Kernel Space
bgp container
bgp container
bgpd
bgpd
zebra
zebra
fpm-syncd
fpm-syncd
dhcp-relay container
dhcp-relay container
dhcp-relay
dhcp-relay
pmon container
pmon container
fan control 
fan control 
sensord
sensord
snmp container
snmp container
snmpd
snmpd
snmp-subagent
snmp-subagent
teamd container
teamd container
teamd
teamd
teamsyncd
teamsyncd
lldp container
lldp container
lldpd
lldpd
lldpmgrd
lldpmgrd
lldp-syncd
lldp-syncd
swss container
swss container
portsyncd
portsyncd
intfsyncd
intfsyncd
neighsyncd
neighsyncd
orchagent
orchagent
intfmgrd
intfmgrd
vlanmgrd
vlanmgrd
syncd container
syncd container
syncd
syncd
sai api DASH
sai api DASH
asic (vendor) sdk 
asic (vendor) sdk 
sonic-cfggen
sonic-cfggen
CLI
CLI
asic drivers
asic drivers
network drivers
network drivers
platform drivers
platform drivers
transceivers
transceivers
DASH capable
single DPU
DASH capable...
fan/power/leds
fan/power/leds
Customizable
Customizable
User Space
User Space
Hardware
Hardware
gNMI container
gNMI container
DASH API
DASH API
telemetry container
telemetry container
telemetry
telemetry
This drawing is for the NIC form factor, single DPU
This drawing is for the NIC form factor,...
Text is not SVG - cannot display
diff --git a/documentation/general/images/hld/dash-smart-switch-architecture.svg b/documentation/general/images/hld/dash-smart-switch-architecture.svg index dfb31e127..21f73d6a8 100644 --- a/documentation/general/images/hld/dash-smart-switch-architecture.svg +++ b/documentation/general/images/hld/dash-smart-switch-architecture.svg @@ -1,4 +1,4 @@ -
database container
database container
redis server
redis server
Kernel Space
Kernel Space
bgp container
bgp container
bgpd
bgpd
zebra
zebra
fpm-syncd
fpm-syncd
dhcp-relay container
dhcp-relay container
dhcp-relay
dhcp-relay
pmon container
pmon container
fan control 
fan control 
sensord
sensord
snmp container
snmp container
snmpd
snmpd
snmp-subagent
snmp-subagent
teamd container
teamd container
teamd
teamd
teamsyncd
teamsyncd
lldp container
lldp container
lldpd
lldpd
lldpmgrd
lldpmgrd
lldp-syncd
lldp-syncd
swss container
swss container
portsyncd
portsyncd
intfsyncd
intfsyncd
neighsyncd
neighsyncd
orchagent
orchagent
intfmgrd
intfmgrd
vlanmgrd
vlanmgrd
syncd container
syncd container
syncd
syncd
sai api DASH
sai api DASH
asic (vendor) sdk
asic (vendor) sdk
sonic-cfggen
sonic-cfggen
CLI
CLI
asic drivers
asic drivers
network drivers
network drivers
platform drivers
platform drivers
transceivers
transceivers
fan/power/leds
fan/power/leds
Customizable
Customizable
User Space
User Space
gNMI container
gNMI container
DASH API
DASH API
telemetry container
telemetry container
telemetry
telemetry
Hardware
Hardware


DASH capable asic(s)  - 4xSWSS
DASH capable asic(s)  - 4xSWSS
Switch asic - 1 x SWSS
Switch asic - 1 x SWSS
Smart switch
Smart switch
Smart Switch
Smart Switch
Text is not SVG - cannot display
\ No newline at end of file +
database container
database container
redis server
redis server
Kernel Space
Kernel Space
bgp container
bgp container
bgpd
bgpd
zebra
zebra
fpm-syncd
fpm-syncd
dhcp-relay container
dhcp-relay container
dhcp-relay
dhcp-relay
pmon container
pmon container
fan control 
fan control 
sensord
sensord
snmp container
snmp container
snmpd
snmpd
snmp-subagent
snmp-subagent
teamd container
teamd container
teamd
teamd
teamsyncd
teamsyncd
lldp container
lldp container
lldpd
lldpd
lldpmgrd
lldpmgrd
lldp-syncd
lldp-syncd
swss container
swss container
portsyncd
portsyncd
intfsyncd
intfsyncd
neighsyncd
neighsyncd
orchagent
orchagent
intfmgrd
intfmgrd
vlanmgrd
vlanmgrd
syncd container
syncd container
syncd
syncd
sai api DASH
sai api DASH
asic (vendor) sdk
asic (vendor) sdk
sonic-cfggen
sonic-cfggen
CLI
CLI
asic drivers
asic drivers
network drivers
network drivers
platform drivers
platform drivers
transceivers
transceivers
fan/power/leds
fan/power/leds
Customizable
Customizable
User Space
User Space
gNMI container
gNMI container
DASH API
DASH API
telemetry container
telemetry container
telemetry
telemetry
Hardware
Hardware


DASH capable asic(s)  - 4xSWSS
DASH capable asic(s)  - 4xSWSS
Switch asic - 1 x SWSS
Switch asic - 1 x SWSS
Smart switch
Smart switch
Smart Switch
Smart Switch
Text is not SVG - cannot display
diff --git a/documentation/general/images/packet-flow-in-flow-match.svg b/documentation/general/images/packet-flow-in-flow-match.svg index 7b7d13823..967050e57 100644 --- a/documentation/general/images/packet-flow-in-flow-match.svg +++ b/documentation/general/images/packet-flow-in-flow-match.svg @@ -1,4 +1,4 @@ -
Src: VM CA1
Src: VM CA1
VNET Layer
VNET Layer
SLB NAT Layer
SLB NAT Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
Dst: VM CA2
Dst: VM CA2
VNET Layer
VNET Layer
SLB NAT Layer
SLB NAT Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
1
1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
10
10
11
11
12
12
13
13
14
14
VFP
VFP
Host
Host
VFP
VFP
Host
Host
9
9

VM to VM
(in VNET)
communication

VM to VM...
VNET uses CA:PA mapping from CDS/RDS to add GRE encap with PA to the packet. 
The GRE paccket will pass through SLB NAT/Decap layers

VNET uses CA:PA mapping fr...
VNET layer decap the
GRE packet

VNET layer decap the...
Src: Mux1
Src: Mux1
Dst:  Mux2
Dst:  Mux2
Encapsulation
Encapsulation
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: PA2:80
Src: PA2:80
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: PA2:80
Src: PA2:80
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
Dst: Appliance:80
Dst: Applianc...
Src: CA1:57212
Src: CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: PA2:80
Src: PA2:80
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst:  PA2:80
Dst:  PA2:80
Src:  PA1:57212
Src:  PA1:57212
Dst: Appliance:80
Dst: Applianc...
Src: CA1:57212
Src: CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst:  PA Appliance:80
Dst:  PA Appliance...
Src:  PA1:57212
Src:  PA1:57212
VXLAN
VXLAN
1
1
Src VM CA 1 initiates connection to Dst VM CA 2
Src VM CA 1 initiates connection to Dst VM CA 2
Matched Route
Matched Route
Transform
Transform
Route Type
Route Type
2
2
SMAC1 -> DMAC_FAKE
SMAC1 -> DMAC_FAKE
DMAC_FAKE is a hard coded MAC address to satisfy the TCP/IP stack of Windows/Linux.  Upon packet construction we construct the packet which needs a MAC address.  This will be overridden later.
DMAC_FAKE is a hard coded MAC address to satisfy the TCP/...
3
3
Outer Evaluation
Outer Evaluation
Outer Evaluation
Outer Evaluation
4
4
SRC: Physical IP of host
DST:  Physical IP of SDN appliance
SRC: Physical IP of host...
SRC:  SDN Appliance IP
DST:  100.0.0.2 from CA to PA mapping table lookup
SRC:  SDN Appliance IP...
5
5
Encapsulation:  VXLAN
Encapsulation:  VXLAN
Encapsulation:  VXLAN
Encapsulation:  VXLAN
6
6
VNI Custom
VNI Custom
VNI:  10001
VNI:  10001
7
7
Inner MAC: 
Inner MAC: 
Inner MAC:
Inner MAC:
8
8
SRC:  SMAC1 DST - DMAC_FAKE
SRC:  SMAC1 DST - DMAC_FAKE
SRC-SMAC1   DST E4-A7-A0-99-0E-18
SRC-SMAC1   DST E4-A7-A0-99-0E-18
9
9
Inner IP:  10.0.0.1 -> 10.0.0.2
Inner IP:  10.0.0.1 -> 10.0.0.2
Route ID = 1
Route ID = 1
Inner IP:  10.00.1 -> 10.0.0.2
Inner IP:  10.00.1 -> 10.0.0.2
Encap_with_lookup_V4_underlay
Encap_with_lookup_V4_underlay
Text is not SVG - cannot display
\ No newline at end of file +
Src: VM CA1
Src: VM CA1
VNET Layer
VNET Layer
SLB NAT Layer
SLB NAT Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
Dst: VM CA2
Dst: VM CA2
VNET Layer
VNET Layer
SLB NAT Layer
SLB NAT Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
1
1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
10
10
11
11
12
12
13
13
14
14
VFP
VFP
Host
Host
VFP
VFP
Host
Host
9
9

VM to VM
(in VNET)
communication

VM to VM...
VNET uses CA:PA mapping from CDS/RDS to add GRE encap with PA to the packet. 
The GRE paccket will pass through SLB NAT/Decap layers

VNET uses CA:PA mapping fr...
VNET layer decap the
GRE packet

VNET layer decap the...
Src: Mux1
Src: Mux1
Dst:  Mux2
Dst:  Mux2
Encapsulation
Encapsulation
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: PA2:80
Src: PA2:80
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: PA2:80
Src: PA2:80
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
Dst: Appliance:80
Dst: Applianc...
Src: CA1:57212
Src: CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: PA2:80
Src: PA2:80
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst:  PA2:80
Dst:  PA2:80
Src:  PA1:57212
Src:  PA1:57212
Dst: Appliance:80
Dst: Applianc...
Src: CA1:57212
Src: CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst:  PA Appliance:80
Dst:  PA Appliance...
Src:  PA1:57212
Src:  PA1:57212
VXLAN
VXLAN
1
1
Src VM CA 1 initiates connection to Dst VM CA 2
Src VM CA 1 initiates connection to Dst VM CA 2
Matched Route
Matched Route
Transform
Transform
Route Type
Route Type
2
2
SMAC1 -> DMAC_FAKE
SMAC1 -> DMAC_FAKE
DMAC_FAKE is a hard coded MAC address to satisfy the TCP/IP stack of Windows/Linux.  Upon packet construction we construct the packet which needs a MAC address.  This will be overridden later.
DMAC_FAKE is a hard coded MAC address to satisfy the TCP/...
3
3
Outer Evaluation
Outer Evaluation
Outer Evaluation
Outer Evaluation
4
4
SRC: Physical IP of host
DST:  Physical IP of SDN appliance
SRC: Physical IP of host...
SRC:  SDN Appliance IP
DST:  100.0.0.2 from CA to PA mapping table lookup
SRC:  SDN Appliance IP...
5
5
Encapsulation:  VXLAN
Encapsulation:  VXLAN
Encapsulation:  VXLAN
Encapsulation:  VXLAN
6
6
VNI Custom
VNI Custom
VNI:  10001
VNI:  10001
7
7
Inner MAC: 
Inner MAC: 
Inner MAC:
Inner MAC:
8
8
SRC:  SMAC1 DST - DMAC_FAKE
SRC:  SMAC1 DST - DMAC_FAKE
SRC-SMAC1   DST E4-A7-A0-99-0E-18
SRC-SMAC1   DST E4-A7-A0-99-0E-18
9
9
Inner IP:  10.0.0.1 -> 10.0.0.2
Inner IP:  10.0.0.1 -> 10.0.0.2
Route ID = 1
Route ID = 1
Inner IP:  10.00.1 -> 10.0.0.2
Inner IP:  10.00.1 -> 10.0.0.2
Encap_with_lookup_V4_underlay
Encap_with_lookup_V4_underlay
Text is not SVG - cannot display
diff --git a/documentation/general/images/sdn-appliance.svg b/documentation/general/images/sdn-appliance.svg index 2e8b0921b..ec2091e91 100644 --- a/documentation/general/images/sdn-appliance.svg +++ b/documentation/general/images/sdn-appliance.svg @@ -1,4 +1,4 @@ -
Left Side:
VMs behind
Appliance 
Left Side:...
Right Side:
remote endpoints or
external clients
Right Side:...
Azure Host
Azure Host
SDN Appliance
SDN Appliance
DASH VM ENI - Flow table
DASH VM ENI - Flow table
DASH-VM- ENI-Outbound Rules
(ENI Match - Inner-SRC-MAC)
DASH-VM- ENI-Outbound Rules...
DASH -VM- ENI-Inbound-Rules
(ENI Match - Inner-DST-MAC)
DASH -VM- ENI-Inbound-Rules...
DASH-VM-ENI-Outbound Rules
(ENI Match - Inner-SRC-MAC)
DASH-VM-ENI-Outbound Rules...
DASH-VM-ENI-Inbound Rules
(ENI Match - Inner-DST-MAC)
DASH-VM-ENI-Inbound Rules...
DASH-VM-ENI-Inbound Rules
(ENI Match - Inner-DST-MAC)
DASH-VM-ENI-Inbound Rules...
DST
DST
DST
DST
Outbound VXLAN
Outbound VXLAN
Outbound
Outbound
Outbound VXLAN
Outbound VXLAN
Outbound 
Outbound 
Inbound VXLAN
Inbound VXLAN
Inbound 
Inbound 
Inbound VXLAN
Inbound VXLAN
Inbound 
Inbound 
DASH Optimized VMDASH Optimized VM
Text is not SVG - cannot display
\ No newline at end of file +
Left Side:
VMs behind
Appliance 
Left Side:...
Right Side:
remote endpoints or
external clients
Right Side:...
Azure Host
Azure Host
SDN Appliance
SDN Appliance
DASH VM ENI - Flow table
DASH VM ENI - Flow table
DASH-VM- ENI-Outbound Rules
(ENI Match - Inner-SRC-MAC)
DASH-VM- ENI-Outbound Rules...
DASH -VM- ENI-Inbound-Rules
(ENI Match - Inner-DST-MAC)
DASH -VM- ENI-Inbound-Rules...
DASH-VM-ENI-Outbound Rules
(ENI Match - Inner-SRC-MAC)
DASH-VM-ENI-Outbound Rules...
DASH-VM-ENI-Inbound Rules
(ENI Match - Inner-DST-MAC)
DASH-VM-ENI-Inbound Rules...
DASH-VM-ENI-Inbound Rules
(ENI Match - Inner-DST-MAC)
DASH-VM-ENI-Inbound Rules...
DST
DST
DST
DST
Outbound VXLAN
Outbound VXLAN
Outbound
Outbound
Outbound VXLAN
Outbound VXLAN
Outbound 
Outbound 
Inbound VXLAN
Inbound VXLAN
Inbound 
Inbound 
Inbound VXLAN
Inbound VXLAN
Inbound 
Inbound 
DASH Optimized VMDASH Optimized VM
Text is not SVG - cannot display
diff --git a/documentation/general/images/sdn-high-cps.svg b/documentation/general/images/sdn-high-cps.svg index 3b1b20bc7..aa03b5b64 100644 --- a/documentation/general/images/sdn-high-cps.svg +++ b/documentation/general/images/sdn-high-cps.svg @@ -1,4 +1,4 @@ -
Azure Host
Azure Host
CPS Optimized VM
CPS Optimized VM
SDN Agents
SDN Agents
VFP not in CPS path
VFP not in CPS path
FPGA
packets are tunneled to appliance as opposed to local VFP for CPS optimized VMs
FPGA...
SDN Appliance
SDN Appliance
SDN Appliance Pair in DC
exposing SONiC interface
SDN Appliance Pa...
Tunnel
Tunnel
Tunnel
Tunnel
DST VM / PE / MNAT / MDNAT
DST VM / PE / MNAT / MDNAT
Tunnel
Tunnel
Tunnel
Tunnel
Text is not SVG - cannot display
\ No newline at end of file +
Azure Host
Azure Host
CPS Optimized VM
CPS Optimized VM
SDN Agents
SDN Agents
VFP not in CPS path
VFP not in CPS path
FPGA
packets are tunneled to appliance as opposed to local VFP for CPS optimized VMs
FPGA...
SDN Appliance
SDN Appliance
SDN Appliance Pair in DC
exposing SONiC interface
SDN Appliance Pa...
Tunnel
Tunnel
Tunnel
Tunnel
DST VM / PE / MNAT / MDNAT
DST VM / PE / MNAT / MDNAT
Tunnel
Tunnel
Tunnel
Tunnel
Text is not SVG - cannot display
diff --git a/documentation/general/images/sdn/eni-match-flow-direction.svg b/documentation/general/images/sdn/eni-match-flow-direction.svg index 4b7f3ba5d..719d306a2 100644 --- a/documentation/general/images/sdn/eni-match-flow-direction.svg +++ b/documentation/general/images/sdn/eni-match-flow-direction.svg @@ -1,4 +1,4 @@ -InboundInbound uses Inner DST MAC to select ENIENI match based on DEST MAC == ENI MACOutboundOutbound uses Inner SRC MAC to select ENIENI match based on SRC MAC == ENI MAC
Determine direction based on VNI
Determine direct...
Start
Start
Match?
Match?
Match?
Match?
Perform Inbound Fast Path
Perform Inbou...
Perform Inbound Slow Path
Perform Inbou...
Perform Outbound Slow Path
Perform Outbo...
Perform Outbound Fast Path
Perform Outbo...
Yes
Yes
Yes
Yes
No
No
No
No
Performed on the appliance
Performed on the appliance
Text is not SVG - cannot display
\ No newline at end of file +InboundInbound uses Inner DST MAC to select ENIENI match based on DEST MAC == ENI MACOutboundOutbound uses Inner SRC MAC to select ENIENI match based on SRC MAC == ENI MAC
Determine direction based on VNI
Determine direct...
Start
Start
Match?
Match?
Match?
Match?
Perform Inbound Fast Path
Perform Inbou...
Perform Inbound Slow Path
Perform Inbou...
Perform Outbound Slow Path
Perform Outbo...
Perform Outbound Fast Path
Perform Outbo...
Yes
Yes
Yes
Yes
No
No
No
No
Performed on the appliance
Performed on the appliance
Text is not SVG - cannot display
diff --git a/documentation/general/images/sdn/inbound-fast-path-flow.svg b/documentation/general/images/sdn/inbound-fast-path-flow.svg index 6452431ce..7c313c151 100644 --- a/documentation/general/images/sdn/inbound-fast-path-flow.svg +++ b/documentation/general/images/sdn/inbound-fast-path-flow.svg @@ -1,4 +1,4 @@ -Lookup Flow Table 5-tuple matchMatch found; direction based on SRC or DST MACCorresponding Match Action, do not enter rule processingFinal packet transpositionRefresh flow TTLConnection TableState machine metadataConditional DecapSLB decap if needed; Decap VNET GRE KeyDecap only if Outer PA matches w/mapping tableElse, drop and terminate pipeline
Perform Inbound Fast Path
Perform Inbou...
Performed on the appliance
Performed on the appliance
Text is not SVG - cannot display
\ No newline at end of file +Lookup Flow Table 5-tuple matchMatch found; direction based on SRC or DST MACCorresponding Match Action, do not enter rule processingFinal packet transpositionRefresh flow TTLConnection TableState machine metadataConditional DecapSLB decap if needed; Decap VNET GRE KeyDecap only if Outer PA matches w/mapping tableElse, drop and terminate pipeline
Perform Inbound Fast Path
Perform Inbou...
Performed on the appliance
Performed on the appliance
Text is not SVG - cannot display
diff --git a/documentation/general/images/sdn/inbound-slow-path-flow.svg b/documentation/general/images/sdn/inbound-slow-path-flow.svg index da52a4347..1cbad13bb 100644 --- a/documentation/general/images/sdn/inbound-slow-path-flow.svg +++ b/documentation/general/images/sdn/inbound-slow-path-flow.svg @@ -1,4 +1,4 @@ -
Perform Inbound Slow Path
Perform Inbou...
Conditional DecapSLB decap if needed; Decap VNET GRE KeyDecap only if Outer PA matches w/mapping tableElse, drop and terminate pipelineLookup Flow Table Match Not Found; ENI rule processing beginsDST MAC in the packet matches the ENI MACACL1SRC,DST,SPort,DPort,Protocol,Action,Priority, Exit ACL pipeline on hit (Terminate)?Controlled by Azure/MSFT, contains default rulesBlock, Soft Block, Allow, DenyIf rule w/bit exit ACL pipeline on hit is matched, the ACL pipeline is abandonedACL2SRC,DST,SPort,DPort,Protocol,Action,Priority, Exit ACL pipeline on hit (Terminate)?Customer ControlledACL3SRC,DST,SPort,DPort,Protocol,Action,Priority,Exit ACL pipeline on hit (Terminate)?Customer ControlledTranspose ActionRewrite MACsTranspose IPs / portsEncap/DecapInbound Route ProcessingLookup table is per ENI; could be GlobalEach route entry has prefix and separate action entryOuter encap IPv4 permits within-Region routingCould be multiple Global lookup tables per ENIsAcross Regions we use IPv6Create tthe FlowExample of Mapping and Routing Tables Mapping Table for a V-Port / ENI
Customer Address (CA)
Customer Ad...
Physical Address v4 (PA)
Physical Ad...
Physical Address v6 (PA)
Physical Ad...
MAC Address for D-MAC Rewrite
MAC Address for D-...
VNI to use
VNI to use
10.0.0.1
10.0.0.1
100.0.0.1
100.0.0.1
3ffe::1
3ffe::1
E4-A7-A0-99-0E-17
E4-A7-A0-99-0E-17
10001
10001
Example Route Table for a V-Port / ENI
Route
Route
Action
Action
Route Type (Choices)

* Encap_with_lookup_V4_underlay: Encap per mapping table.V4 underlay
* Encap_with_lookup_V6_underlay: Encap per mapping table.V6 underlay
* Encap_with_Provided_data (PA): Encap per proided data (Multiple PA can be provided)
* Outbound NAT(SNAT)_L3: execute on SRC IP w/provided data
* Outbound NAT (SNAT)_L4: execute on SRC IP, src port based on provided data
* Nul:block trafficl
* Private Link
Route Type (Choices)...
Route ID
Route ID
10.0.0.0/24,
...more prefixes
10.0.0.0/24,...
Encap: VXLAN

Action:
check mapping table for exact DST, VNI, ANd D-MAC rewrite info
Encap: VXLAN...
Encap_with_lookup_V4_underlay
Encap_with_lookup_V4_underlay
1
1
Performed on the appliance
Performed on the appliance
Text is not SVG - cannot display
\ No newline at end of file +
Perform Inbound Slow Path
Perform Inbou...
Conditional DecapSLB decap if needed; Decap VNET GRE KeyDecap only if Outer PA matches w/mapping tableElse, drop and terminate pipelineLookup Flow Table Match Not Found; ENI rule processing beginsDST MAC in the packet matches the ENI MACACL1SRC,DST,SPort,DPort,Protocol,Action,Priority, Exit ACL pipeline on hit (Terminate)?Controlled by Azure/MSFT, contains default rulesBlock, Soft Block, Allow, DenyIf rule w/bit exit ACL pipeline on hit is matched, the ACL pipeline is abandonedACL2SRC,DST,SPort,DPort,Protocol,Action,Priority, Exit ACL pipeline on hit (Terminate)?Customer ControlledACL3SRC,DST,SPort,DPort,Protocol,Action,Priority,Exit ACL pipeline on hit (Terminate)?Customer ControlledTranspose ActionRewrite MACsTranspose IPs / portsEncap/DecapInbound Route ProcessingLookup table is per ENI; could be GlobalEach route entry has prefix and separate action entryOuter encap IPv4 permits within-Region routingCould be multiple Global lookup tables per ENIsAcross Regions we use IPv6Create tthe FlowExample of Mapping and Routing Tables Mapping Table for a V-Port / ENI
Customer Address (CA)
Customer Ad...
Physical Address v4 (PA)
Physical Ad...
Physical Address v6 (PA)
Physical Ad...
MAC Address for D-MAC Rewrite
MAC Address for D-...
VNI to use
VNI to use
10.0.0.1
10.0.0.1
100.0.0.1
100.0.0.1
3ffe::1
3ffe::1
E4-A7-A0-99-0E-17
E4-A7-A0-99-0E-17
10001
10001
Example Route Table for a V-Port / ENI
Route
Route
Action
Action
Route Type (Choices)

* Encap_with_lookup_V4_underlay: Encap per mapping table.V4 underlay
* Encap_with_lookup_V6_underlay: Encap per mapping table.V6 underlay
* Encap_with_Provided_data (PA): Encap per proided data (Multiple PA can be provided)
* Outbound NAT(SNAT)_L3: execute on SRC IP w/provided data
* Outbound NAT (SNAT)_L4: execute on SRC IP, src port based on provided data
* Nul:block trafficl
* Private Link
Route Type (Choices)...
Route ID
Route ID
10.0.0.0/24,
...more prefixes
10.0.0.0/24,...
Encap: VXLAN

Action:
check mapping table for exact DST, VNI, ANd D-MAC rewrite info
Encap: VXLAN...
Encap_with_lookup_V4_underlay
Encap_with_lookup_V4_underlay
1
1
Performed on the appliance
Performed on the appliance
Text is not SVG - cannot display
diff --git a/documentation/general/images/sdn/outbound-fast-path-flow.svg b/documentation/general/images/sdn/outbound-fast-path-flow.svg index 227468d5c..3ccaaafc4 100644 --- a/documentation/general/images/sdn/outbound-fast-path-flow.svg +++ b/documentation/general/images/sdn/outbound-fast-path-flow.svg @@ -1,4 +1,4 @@ -Conditional Decap
SLB decap if needed; Decap VNET GRE Key
SLB decap if needed; Decap VNET GRE...
Decap only if Outer PA matches the PA configured for the ENI
Decap only if Outer PA matches the...
Else, drop and terminate pipeline
Else, drop and terminate pipeline
Lookup Flow Table 
Match found; direction based on SRC or DST MAC
Match found; direction based on SRC...
Corresponding Match Action, do not enter rule processing
Corresponding Match Action, do not...
Refresh Flow TTL
Refresh Flow TTL
Perform Outbound Fast Path
Perform Outbo...
Performed on the appliance
Performed on the appliance
Text is not SVG - cannot display
\ No newline at end of file +Conditional Decap
SLB decap if needed; Decap VNET GRE Key
SLB decap if needed; Decap VNET GRE...
Decap only if Outer PA matches the PA configured for the ENI
Decap only if Outer PA matches the...
Else, drop and terminate pipeline
Else, drop and terminate pipeline
Lookup Flow Table 
Match found; direction based on SRC or DST MAC
Match found; direction based on SRC...
Corresponding Match Action, do not enter rule processing
Corresponding Match Action, do not...
Refresh Flow TTL
Refresh Flow TTL
Perform Outbound Fast Path
Perform Outbo...
Performed on the appliance
Performed on the appliance
Text is not SVG - cannot display
diff --git a/documentation/general/images/sdn/outbound-slow-path-flow.svg b/documentation/general/images/sdn/outbound-slow-path-flow.svg index 7f519a8b1..e54573e45 100644 --- a/documentation/general/images/sdn/outbound-slow-path-flow.svg +++ b/documentation/general/images/sdn/outbound-slow-path-flow.svg @@ -1,4 +1,4 @@ -Conditional DecapSLB decap if needed; Decap VNET GRE KeyDecap only if Outer PA matches thePA configured for the ENIElse, drop and terminate pipelineLookup Flow Table Match Not Found; ENI rule processing beginsPossible to insert corresponding inbound flowACL1SRC,DST,SPort,DPort,Protocol,Action,Priority, Exit ACL pipeline on hit (Terminate)?Controlled by Azure/MSFT, contains default rulesBlock, Soft Block, Allow, DenyIf rule w/bit exit ACL pipeline on hit is matched, the ACL pipeline is abandonedACL2SRC,DST,SPort,DPort,Protocol,Action,Priority, Exit ACL pipeline on hit (Terminate)?Customer ControlledACL3SRC,DST,SPort,DPort,Protocol,Action,Priority,Exit ACL pipeline on hit (Terminate)?Customer ControlledTranspose ActionRewrite MACsTranspose IPs / portsEncap/DecapInbound Route ProcessingSet DSCP bit value to XProcess relevant routeEach route entry has prefix and separate actionentryCreate tthe FlowExample of Mapping and Routing Tables Mapping Table for a V-Port / ENI
Customer Address (CA)
Customer Ad...
Physical Address v4 (PA)
Physical Ad...
Physical Address v6 (PA)
Physical Ad...
MAC Address for D-MAC Rewrite
MAC Address for D-...
VNI to use
VNI to use
10.0.0.1
10.0.0.1
100.0.0.1
100.0.0.1
3ffe::1
3ffe::1
E4-A7-A0-99-0E-17
E4-A7-A0-99-0E-17
10001
10001
Example Route Table for a V-Port / ENI
Route
Route
Action
Action
Route Type (Choices)

* Encap_with_lookup_V4_underlay: Encap per mapping table.V4 underlay
* Encap_with_lookup_V6_underlay: Encap per mapping table.V6 underlay
* Encap_with_Provided_data (PA): Encap per proided data (Multiple PA can be provided)
* Outbound NAT(SNAT)_L3: execute on SRC IP w/provided data
* Outbound NAT (SNAT)_L4: execute on SRC IP, src port based on provided data
* Nul:block trafficl
* Private Link
Route Type (Choices)...
Route ID
Route ID
10.0.0.0/24,
...more prefixes
10.0.0.0/24,...
Encap: VXLAN

Action:
check mapping table for exact DST, VNI, ANd D-MAC rewrite info
Encap: VXLAN...
Encap_with_lookup_V4_underlay
Encap_with_lookup_V4_underlay
1
1
Perform Outbound Slow Path
Perform Outbo...
Performed on the appliance
Performed on the appliance
Text is not SVG - cannot display
\ No newline at end of file +Conditional DecapSLB decap if needed; Decap VNET GRE KeyDecap only if Outer PA matches thePA configured for the ENIElse, drop and terminate pipelineLookup Flow Table Match Not Found; ENI rule processing beginsPossible to insert corresponding inbound flowACL1SRC,DST,SPort,DPort,Protocol,Action,Priority, Exit ACL pipeline on hit (Terminate)?Controlled by Azure/MSFT, contains default rulesBlock, Soft Block, Allow, DenyIf rule w/bit exit ACL pipeline on hit is matched, the ACL pipeline is abandonedACL2SRC,DST,SPort,DPort,Protocol,Action,Priority, Exit ACL pipeline on hit (Terminate)?Customer ControlledACL3SRC,DST,SPort,DPort,Protocol,Action,Priority,Exit ACL pipeline on hit (Terminate)?Customer ControlledTranspose ActionRewrite MACsTranspose IPs / portsEncap/DecapInbound Route ProcessingSet DSCP bit value to XProcess relevant routeEach route entry has prefix and separate actionentryCreate tthe FlowExample of Mapping and Routing Tables Mapping Table for a V-Port / ENI
Customer Address (CA)
Customer Ad...
Physical Address v4 (PA)
Physical Ad...
Physical Address v6 (PA)
Physical Ad...
MAC Address for D-MAC Rewrite
MAC Address for D-...
VNI to use
VNI to use
10.0.0.1
10.0.0.1
100.0.0.1
100.0.0.1
3ffe::1
3ffe::1
E4-A7-A0-99-0E-17
E4-A7-A0-99-0E-17
10001
10001
Example Route Table for a V-Port / ENI
Route
Route
Action
Action
Route Type (Choices)

* Encap_with_lookup_V4_underlay: Encap per mapping table.V4 underlay
* Encap_with_lookup_V6_underlay: Encap per mapping table.V6 underlay
* Encap_with_Provided_data (PA): Encap per proided data (Multiple PA can be provided)
* Outbound NAT(SNAT)_L3: execute on SRC IP w/provided data
* Outbound NAT (SNAT)_L4: execute on SRC IP, src port based on provided data
* Nul:block trafficl
* Private Link
Route Type (Choices)...
Route ID
Route ID
10.0.0.0/24,
...more prefixes
10.0.0.0/24,...
Encap: VXLAN

Action:
check mapping table for exact DST, VNI, ANd D-MAC rewrite info
Encap: VXLAN...
Encap_with_lookup_V4_underlay
Encap_with_lookup_V4_underlay
1
1
Perform Outbound Slow Path
Perform Outbo...
Performed on the appliance
Performed on the appliance
Text is not SVG - cannot display
diff --git a/documentation/general/images/sdn/sdn-packet-transforms-inbound-from-lb.svg b/documentation/general/images/sdn/sdn-packet-transforms-inbound-from-lb.svg index ddb025d5b..3dd986fac 100644 --- a/documentation/general/images/sdn/sdn-packet-transforms-inbound-from-lb.svg +++ b/documentation/general/images/sdn/sdn-packet-transforms-inbound-from-lb.svg @@ -1,4 +1,4 @@ -
Src: VM CA1
Src: VM CA1
VNET Layer
VNET Layer
SLB NAT Layer
SLB NAT Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
4
4
3
3
2
2
8
8
7
7
6
6
VFP
VFP
Host
Host
Loadbalanced public IP
inbound mapping
through SLB

Loadbalanced public IP...
Mux
Mux
Encapsulation
Encapsulation
TCP
TCP
Dst: Cust IP:xx
Dst: Cust IP:xx
Src: VIP 1:80
Src: VIP 1:80
Dst: Client with Cust IP
Dst: Client with Cust IP
9
9
TCP
TCP
Dst: Cust IP:xx
Dst: Cust IP:xx
Src HLIP 1:8080
Src HLIP 1:8080
TCP
TCP
Src CA1:8080
Src CA1:8080
Dst: Cust IP:xx
Dst: Cust IP:xx
Source endpoint could be external
or in Azure behind another load
balancer. 
Details ignored here.

Source endpoint could be ext...
The MUX matches the inbound VIP and port
range to a load balancing rule. It then hashes
(src ip, src port, dst ip, dst port and protocol) to select a DIP from the active dip pool. Finally, the mux encapsulates the packet to the destination host using NVGRE with destination VM MAC as inner MAC and destination Host PA as outer IP.

The MUX matches the inbound VIP and port...
SLB NAT uses HLIP
as destination

SLB NAT uses HLIP...
VFP decaps the packet and 
rewrites the destination VIP
to the CA and destintion
port to DIP port (unless DSR is
configured)

VFP decaps the packet and...
Dst: NextHop MAC
Dst: NextHop MAC
Src: Source MAC
Src: Source MAC
47 (GRE)
47 (GRE)
Src: Mux PA
Src: Mux PA
Dst: Host PA
Dst: Host PA
GRE (0x6558)
GRE (0x6558)
Dst: VM MAC1
Dst: VM MAC1
Src: Source MAC
Src: Source MAC
1
1
5
5
Dst: CA1:8080
Dst: CA1:8080
Src: Cust IP:xx
Src: Cust IP:xx
TCP
TCP
Dst: NextHop MAC
Dst: NextHop MAC
Src: Source MAC
Src: Source MAC
47 (GRE)
47 (GRE)
Src: Mux PA
Src: Mux PA
Dst: Host PA
Dst: Host PA
GRE (0x6558)
GRE (0x6558)
Dst: VM MAC1
Dst: VM MAC1
Src: Source MAC
Src: Source MAC
TCP
TCP
Dst: VIP1:80
Dst: VIP1:80
Src: Cust IP:xx
Src: Cust IP:xx
TCP
TCP
Dst: VIP1:80
Dst: VIP1:80
Src: Cust IP:xx
Src: Cust IP:xx
TCP
TCP
Dst: HLIP 1:8080
Dst: HLIP 1:8080
Src: Cust IP:xx
Src: Cust IP:xx
TCP
TCP
Dst: Cust IP:xx
Dst: Cust IP:xx
Src: VIP 1:80
Src: VIP 1:80
NIC MAC1/HLIP1
NIC MAC1/HLIP1
VFP rewrites te return packet src to the vip and sends the packet back to client
VFP rewrites te retu...
Text is not SVG - cannot display
\ No newline at end of file +
Src: VM CA1
Src: VM CA1
VNET Layer
VNET Layer
SLB NAT Layer
SLB NAT Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
4
4
3
3
2
2
8
8
7
7
6
6
VFP
VFP
Host
Host
Loadbalanced public IP
inbound mapping
through SLB

Loadbalanced public IP...
Mux
Mux
Encapsulation
Encapsulation
TCP
TCP
Dst: Cust IP:xx
Dst: Cust IP:xx
Src: VIP 1:80
Src: VIP 1:80
Dst: Client with Cust IP
Dst: Client with Cust IP
9
9
TCP
TCP
Dst: Cust IP:xx
Dst: Cust IP:xx
Src HLIP 1:8080
Src HLIP 1:8080
TCP
TCP
Src CA1:8080
Src CA1:8080
Dst: Cust IP:xx
Dst: Cust IP:xx
Source endpoint could be external
or in Azure behind another load
balancer. 
Details ignored here.

Source endpoint could be ext...
The MUX matches the inbound VIP and port
range to a load balancing rule. It then hashes
(src ip, src port, dst ip, dst port and protocol) to select a DIP from the active dip pool. Finally, the mux encapsulates the packet to the destination host using NVGRE with destination VM MAC as inner MAC and destination Host PA as outer IP.

The MUX matches the inbound VIP and port...
SLB NAT uses HLIP
as destination

SLB NAT uses HLIP...
VFP decaps the packet and 
rewrites the destination VIP
to the CA and destintion
port to DIP port (unless DSR is
configured)

VFP decaps the packet and...
Dst: NextHop MAC
Dst: NextHop MAC
Src: Source MAC
Src: Source MAC
47 (GRE)
47 (GRE)
Src: Mux PA
Src: Mux PA
Dst: Host PA
Dst: Host PA
GRE (0x6558)
GRE (0x6558)
Dst: VM MAC1
Dst: VM MAC1
Src: Source MAC
Src: Source MAC
1
1
5
5
Dst: CA1:8080
Dst: CA1:8080
Src: Cust IP:xx
Src: Cust IP:xx
TCP
TCP
Dst: NextHop MAC
Dst: NextHop MAC
Src: Source MAC
Src: Source MAC
47 (GRE)
47 (GRE)
Src: Mux PA
Src: Mux PA
Dst: Host PA
Dst: Host PA
GRE (0x6558)
GRE (0x6558)
Dst: VM MAC1
Dst: VM MAC1
Src: Source MAC
Src: Source MAC
TCP
TCP
Dst: VIP1:80
Dst: VIP1:80
Src: Cust IP:xx
Src: Cust IP:xx
TCP
TCP
Dst: VIP1:80
Dst: VIP1:80
Src: Cust IP:xx
Src: Cust IP:xx
TCP
TCP
Dst: HLIP 1:8080
Dst: HLIP 1:8080
Src: Cust IP:xx
Src: Cust IP:xx
TCP
TCP
Dst: Cust IP:xx
Dst: Cust IP:xx
Src: VIP 1:80
Src: VIP 1:80
NIC MAC1/HLIP1
NIC MAC1/HLIP1
VFP rewrites te return packet src to the vip and sends the packet back to client
VFP rewrites te retu...
Text is not SVG - cannot display
diff --git a/documentation/general/images/sdn/sdn-packet-transforms-outbound-nat-l4.svg b/documentation/general/images/sdn/sdn-packet-transforms-outbound-nat-l4.svg index e2a867865..38206dde9 100644 --- a/documentation/general/images/sdn/sdn-packet-transforms-outbound-nat-l4.svg +++ b/documentation/general/images/sdn/sdn-packet-transforms-outbound-nat-l4.svg @@ -1,4 +1,4 @@ -
Src: VM CA1
Src: VM CA1
VNET Layer
VNET Layer
SLB NAT Layer
SLB NAT Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
1
1
2
2
3
3
4
4
7
7
8
8
9
9
VFP
VFP
Host
Host
Outbound SNAT
through
a public  loadbalanced IP

Outbound SNAT...
Mux
Mux
Encapsulation
Encapsulation
Dst: PA1
Dst: PA1
Src: Mux PA
Src: Mux PA
IPinIP/NVGRE 
IPinIP/NVGRE 
TCP
TCP
Dst  VIP1:12345
Dst  VIP1:12345
Src Cust IP:80
Src Cust IP:80
Dst: PA1
Dst: PA1
Src: Mux PA
Src: Mux PA
IPinIP/NVGRE 
IPinIP/NVGRE 
TCP
TCP
Dst  VIP1:12345
Dst  VIP1:12345
Src Cust IP:80
Src Cust IP:80
Dst: Client with Cust IP
Dst: Client with Cust IP
5
5
6
6
TCP
TCP
Dst  VIP1:12345
Dst  VIP1:12345
Src Cust IP:80
Src Cust IP:80
TCP
TCP
Dst  PA1:57212
Dst  PA1:57212
Src Cust IP:80
Src Cust IP:80
TCP
TCP
Src Cust IP:80
Src Cust IP:80
Dst  CA1:57212
Dst  CA1:57212
Dst: CustIP:80
Dst: CustIP:80
Src: VIP:12345
Src: VIP:12345
TCP
TCP
Dst: CustIP:80
Dst: CustIP:80
Src: VIP:12345
Src: VIP:12345
TCP
TCP
TCP
TCP
Dst: CustIP:80
Dst: CustIP:80
Src: PA1:57212
Src: PA1:57212
TCP
TCP
Dst: CustIP:80
Dst: CustIP:80
Src: CA1:57212
Src: CA1:57212
Destination endpoint could be external or in Azure behind another load balancer. Details ignored here.
Destination endpoint could b...
The MUX matches the inbound VIP and port range to a DIP and then encapsulates the packet to the destination host using either IPinIP or NVGRE
The MUX matches the inbound...
VFP allocates a SNAT port from a local NatPool, rewrites the packet src to the VIP and then sends the packet to the destination
VFP allocates a SNAT port fr...
VFP decaps the packet, then matches the SNAT fow. Based on the flow, it rewrites the destination VIP to the CA and destination port to the Dip port.
VFP decaps the packet, then...
Src: VM1
Src: VM1
Src: Mux1
Src: Mux1
Dest: Mux2
Dest: Mux2
Dest: VM2
Dest: VM2
1-4
1-4
Overview
Overview
6-9
6-9
Text is not SVG - cannot display
\ No newline at end of file +
Src: VM CA1
Src: VM CA1
VNET Layer
VNET Layer
SLB NAT Layer
SLB NAT Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
1
1
2
2
3
3
4
4
7
7
8
8
9
9
VFP
VFP
Host
Host
Outbound SNAT
through
a public  loadbalanced IP

Outbound SNAT...
Mux
Mux
Encapsulation
Encapsulation
Dst: PA1
Dst: PA1
Src: Mux PA
Src: Mux PA
IPinIP/NVGRE 
IPinIP/NVGRE 
TCP
TCP
Dst  VIP1:12345
Dst  VIP1:12345
Src Cust IP:80
Src Cust IP:80
Dst: PA1
Dst: PA1
Src: Mux PA
Src: Mux PA
IPinIP/NVGRE 
IPinIP/NVGRE 
TCP
TCP
Dst  VIP1:12345
Dst  VIP1:12345
Src Cust IP:80
Src Cust IP:80
Dst: Client with Cust IP
Dst: Client with Cust IP
5
5
6
6
TCP
TCP
Dst  VIP1:12345
Dst  VIP1:12345
Src Cust IP:80
Src Cust IP:80
TCP
TCP
Dst  PA1:57212
Dst  PA1:57212
Src Cust IP:80
Src Cust IP:80
TCP
TCP
Src Cust IP:80
Src Cust IP:80
Dst  CA1:57212
Dst  CA1:57212
Dst: CustIP:80
Dst: CustIP:80
Src: VIP:12345
Src: VIP:12345
TCP
TCP
Dst: CustIP:80
Dst: CustIP:80
Src: VIP:12345
Src: VIP:12345
TCP
TCP
TCP
TCP
Dst: CustIP:80
Dst: CustIP:80
Src: PA1:57212
Src: PA1:57212
TCP
TCP
Dst: CustIP:80
Dst: CustIP:80
Src: CA1:57212
Src: CA1:57212
Destination endpoint could be external or in Azure behind another load balancer. Details ignored here.
Destination endpoint could b...
The MUX matches the inbound VIP and port range to a DIP and then encapsulates the packet to the destination host using either IPinIP or NVGRE
The MUX matches the inbound...
VFP allocates a SNAT port from a local NatPool, rewrites the packet src to the VIP and then sends the packet to the destination
VFP allocates a SNAT port fr...
VFP decaps the packet, then matches the SNAT fow. Based on the flow, it rewrites the destination VIP to the CA and destination port to the Dip port.
VFP decaps the packet, then...
Src: VM1
Src: VM1
Src: Mux1
Src: Mux1
Dest: Mux2
Dest: Mux2
Dest: VM2
Dest: VM2
1-4
1-4
Overview
Overview
6-9
6-9
Text is not SVG - cannot display
diff --git a/documentation/general/images/sdn/sdn-packet-transforms-private-link-service.svg b/documentation/general/images/sdn/sdn-packet-transforms-private-link-service.svg index 41cceef29..6b31bbcb8 100644 --- a/documentation/general/images/sdn/sdn-packet-transforms-private-link-service.svg +++ b/documentation/general/images/sdn/sdn-packet-transforms-private-link-service.svg @@ -1,4 +1,4 @@ -
Private Link
Service

Private Link...
SLB NAT Layer
SLB NAT Layer
4
4
3
3
11
11
12
12
VFP
VFP
Host
Host
1
1
Dst: VM CA2
Dst: VM CA2
VFP_DEFAULT_TRANSPOSITION_
LAYER_STATELESS
VFP_DEFAULT_TRANSPOSITION_...
VNET_VFP_PRIVATE_IP_
NAT_STATEFUL
VNET_VFP_PRIVATE_IP_...
VNET Layer
VNET Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
5
5
2
2
10
10
9
9
8
8
SLB_VNAT Layer
SLB_VNAT Layer
7
7
6
6
TCP
TCP
Dst:  CA2:BE_Port
Dst:  CA2:BE_Port
Src: CA:NAT PORT
Src: CA:NAT PORT
TCP
TCP
Src: NAT_CA:NAT PORT
Src: NAT_CA:NAT PORT
Dst:  ILB_CA/VIP:80
Dst:  ILB_CA/VIP:80
TCP
TCP
Src: NAT_CA:NAT PORT
Src: NAT_CA:NAT PORT
Dst: PE_PA/PE_VIP:80
Dst: PE_PA/PE_VIP:80
TCP
TCP
Src: FD40:C00:31:4A4F:6b31:100:::57212
Src: FD40:C00:31:4A4F:6b31:100:::57212
Dst: 2603:10E1:100:2::PE_VIP:80
Dst: 2603:10E1:100:2::PE_VIP:80
NVGRE (100) 
NVGRE (100) 
Src: ST GW VIP
Src: ST GW VIP
Dst: PE_VIP
Dst: PE_VIP
TCP
TCP
Src: FD40:C00:31:4A4F:6b31:100:::57212
Src: FD40:C00:31:4A4F:6b31:100:::57212
Dst: 2603:10E1:100:2::PE_VIP:80
Dst: 2603:10E1:100:2::PE_VIP:80
NVGRE (100) 
NVGRE (100) 
Src: ST GW VIP
Src: ST GW VIP
Dst: PE_VIP
Dst: PE_VIP
TCP
TCP
Src: FD40:C00:31:4A4F:6b31:100:::57212
Src: FD40:C00:31:4A4F:6b31:100:::57212
Dst: 2603:10E1:100:2::PE_VIP:80
Dst: 2603:10E1:100:2::PE_VIP:80
TCP
TCP
Dst:  CA2:BE_Port
Dst:  CA2:BE_Port
Src: NAT_CA:NAT PORT
Src: NAT_CA:NAT PORT
TCP
TCP
Src:  ILB_CA:80
Src:  ILB_CA:80
Dst:  NAT_CA:NAT_PORT
Dst:  NAT_CA:NAT_PORT
TCP
TCP
Src: 2603:10E1:100:2::PE_VIP:80
Src: 2603:10E1:100:2::PE_VIP:80
Dst: FD40:C00:31:4A4F:6b31:100:::57212
Dst: FD40:C00:31:4A4F:6b31:100:::57212
TCP
TCP
Dst:  CA:NAT Port
Dst:  CA:NAT Port
Src: CA2:BE PORT
Src: CA2:BE PORT
TCP
TCP
Src:  ILB_CA:80
Src:  ILB_CA:80
Dst:  NAT_CA:NAT_PORT
Dst:  NAT_CA:NAT_PORT
NVGRE (100) 
NVGRE (100) 
Src: PE_VIP
Src: PE_VIP
Dst: ST GW VIP
Dst: ST GW VIP
TCP
TCP
Src: 2603:10E1:100:2::PE_VIP:80
Src: 2603:10E1:100:2::PE_VIP:80
Dst: FD40:C00:31:4A4F:6b31:100:::57212
Dst: FD40:C00:31:4A4F:6b31:100:::57212
NVGRE (100) 
NVGRE (100) 
Src: PE_VIP
Src: PE_VIP
Dst: ST GW VIP
Dst: ST GW VIP
TCP
TCP
Src: 2603:10E1:100:2::PE_VIP:80
Src: 2603:10E1:100:2::PE_VIP:80
Dst: FD40:C00:31:4A4F:6b31:100:::57212
Dst: FD40:C00:31:4A4F:6b31:100:::57212
Since decap  was stateful the 
addresses are restored here

Since decap  was stateful th...
VNET layer does an 
unconditional statefull decap

VNET layer does an...
Source NAT happens here which 
modifies : Source IP, Source Port
and Dest IP. This is also a 6 to 4
NAT. Here we use the NAT CA to convert source address

Source NAT happens here which...
SLB VNAT layer will now do
the DNAT here into the 
VNET CA

SLB VNAT layer will now do...
Text is not SVG - cannot display
\ No newline at end of file +
Private Link
Service

Private Link...
SLB NAT Layer
SLB NAT Layer
4
4
3
3
11
11
12
12
VFP
VFP
Host
Host
1
1
Dst: VM CA2
Dst: VM CA2
VFP_DEFAULT_TRANSPOSITION_
LAYER_STATELESS
VFP_DEFAULT_TRANSPOSITION_...
VNET_VFP_PRIVATE_IP_
NAT_STATEFUL
VNET_VFP_PRIVATE_IP_...
VNET Layer
VNET Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
5
5
2
2
10
10
9
9
8
8
SLB_VNAT Layer
SLB_VNAT Layer
7
7
6
6
TCP
TCP
Dst:  CA2:BE_Port
Dst:  CA2:BE_Port
Src: CA:NAT PORT
Src: CA:NAT PORT
TCP
TCP
Src: NAT_CA:NAT PORT
Src: NAT_CA:NAT PORT
Dst:  ILB_CA/VIP:80
Dst:  ILB_CA/VIP:80
TCP
TCP
Src: NAT_CA:NAT PORT
Src: NAT_CA:NAT PORT
Dst: PE_PA/PE_VIP:80
Dst: PE_PA/PE_VIP:80
TCP
TCP
Src: FD40:C00:31:4A4F:6b31:100:::57212
Src: FD40:C00:31:4A4F:6b31:100:::57212
Dst: 2603:10E1:100:2::PE_VIP:80
Dst: 2603:10E1:100:2::PE_VIP:80
NVGRE (100) 
NVGRE (100) 
Src: ST GW VIP
Src: ST GW VIP
Dst: PE_VIP
Dst: PE_VIP
TCP
TCP
Src: FD40:C00:31:4A4F:6b31:100:::57212
Src: FD40:C00:31:4A4F:6b31:100:::57212
Dst: 2603:10E1:100:2::PE_VIP:80
Dst: 2603:10E1:100:2::PE_VIP:80
NVGRE (100) 
NVGRE (100) 
Src: ST GW VIP
Src: ST GW VIP
Dst: PE_VIP
Dst: PE_VIP
TCP
TCP
Src: FD40:C00:31:4A4F:6b31:100:::57212
Src: FD40:C00:31:4A4F:6b31:100:::57212
Dst: 2603:10E1:100:2::PE_VIP:80
Dst: 2603:10E1:100:2::PE_VIP:80
TCP
TCP
Dst:  CA2:BE_Port
Dst:  CA2:BE_Port
Src: NAT_CA:NAT PORT
Src: NAT_CA:NAT PORT
TCP
TCP
Src:  ILB_CA:80
Src:  ILB_CA:80
Dst:  NAT_CA:NAT_PORT
Dst:  NAT_CA:NAT_PORT
TCP
TCP
Src: 2603:10E1:100:2::PE_VIP:80
Src: 2603:10E1:100:2::PE_VIP:80
Dst: FD40:C00:31:4A4F:6b31:100:::57212
Dst: FD40:C00:31:4A4F:6b31:100:::57212
TCP
TCP
Dst:  CA:NAT Port
Dst:  CA:NAT Port
Src: CA2:BE PORT
Src: CA2:BE PORT
TCP
TCP
Src:  ILB_CA:80
Src:  ILB_CA:80
Dst:  NAT_CA:NAT_PORT
Dst:  NAT_CA:NAT_PORT
NVGRE (100) 
NVGRE (100) 
Src: PE_VIP
Src: PE_VIP
Dst: ST GW VIP
Dst: ST GW VIP
TCP
TCP
Src: 2603:10E1:100:2::PE_VIP:80
Src: 2603:10E1:100:2::PE_VIP:80
Dst: FD40:C00:31:4A4F:6b31:100:::57212
Dst: FD40:C00:31:4A4F:6b31:100:::57212
NVGRE (100) 
NVGRE (100) 
Src: PE_VIP
Src: PE_VIP
Dst: ST GW VIP
Dst: ST GW VIP
TCP
TCP
Src: 2603:10E1:100:2::PE_VIP:80
Src: 2603:10E1:100:2::PE_VIP:80
Dst: FD40:C00:31:4A4F:6b31:100:::57212
Dst: FD40:C00:31:4A4F:6b31:100:::57212
Since decap  was stateful the 
addresses are restored here

Since decap  was stateful th...
VNET layer does an 
unconditional statefull decap

VNET layer does an...
Source NAT happens here which 
modifies : Source IP, Source Port
and Dest IP. This is also a 6 to 4
NAT. Here we use the NAT CA to convert source address

Source NAT happens here which...
SLB VNAT layer will now do
the DNAT here into the 
VNET CA

SLB VNAT layer will now do...
Text is not SVG - cannot display
diff --git a/documentation/general/images/sdn/sdn-packet-transforms-private-link.svg b/documentation/general/images/sdn/sdn-packet-transforms-private-link.svg index 0be26cce1..9f6bbce98 100644 --- a/documentation/general/images/sdn/sdn-packet-transforms-private-link.svg +++ b/documentation/general/images/sdn/sdn-packet-transforms-private-link.svg @@ -1,4 +1,4 @@ -
SLB NAT Layer
SLB NAT Layer
2
2
3
3
7
7
6
6
VFP
VFP
Host
Host
5
5
Src: VM CA1
Src: VM CA1
VFP_DEFAULT_TRANSPOSITION_
LAYER_STATELESS
VFP_DEFAULT_TRANSPOSITION_...
VNET_VFP_PRIVATE_IP_
NAT_STATEFUL
VNET_VFP_PRIVATE_IP_...
VNET Layer
VNET Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
1
1
4
4
8
8
9
9
10
10
TCP
TCP
Dst: PE:80
Dst: PE:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
Src: FD40:C00:31:4A4F:6b31:100:::57212
Src: FD40:C00:31:4A4F:6b31:100:::57212
Dst: 2603:10E1:100:2::PE:80
Dst: 2603:10E1:100:2::PE:80
TCP
TCP
Src: FD40:C00:31:4A4F:6b31:100:::57212
Src: FD40:C00:31:4A4F:6b31:100:::57212
Dst: 2603:10E1:100:2::PE_VIP:80
Dst: 2603:10E1:100:2::PE_VIP:80
TCP
TCP
Src: FD40:C00:31:4A4F:6b31:100:::57212
Src: FD40:C00:31:4A4F:6b31:100:::57212
Dst: 2603:10E1:100:2::PE_VIP:80
Dst: 2603:10E1:100:2::PE_VIP:80
NVGRE (100) 
NVGRE (100) 
PA/HLIP
PA/HLIP
PE_VIP
PE_VIP
TCP
TCP
Src: FD40:C00:31:4A4F:6b31:100:::57212
Src: FD40:C00:31:4A4F:6b31:100:::57212
Dst: 2603:10E1:100:2::PE_VIP:80
Dst: 2603:10E1:100:2::PE_VIP:80
NVGRE (100) 
NVGRE (100) 
ST GW VIP
ST GW VIP
PE_VIP
PE_VIP
TCP
TCP
Src: PE:80
Src: PE:80
Dst: CA1:57212
Dst: CA1:57212
TCP
TCP
Src: 2603:10E1:100:2::PE_VIP:80
Src: 2603:10E1:100:2::PE_VIP:80
Dst: FD40:C00:31:4A4F:6b31:100:::57212
Dst: FD40:C00:31:4A4F:6b31:100:::57212
TCP
TCP
Src: 2603:10E1:100:2::PE:80
Src: 2603:10E1:100:2::PE:80
Dst: FD40:C00:31:4A4F:6b31:100:::57212
Dst: FD40:C00:31:4A4F:6b31:100:::57212
TCP
TCP
Src: 2603:10E1:100:2::PE_VIP:80
Src: 2603:10E1:100:2::PE_VIP:80
Dst: FD40:C00:31:4A4F:6b31:100:::57212
Dst: FD40:C00:31:4A4F:6b31:100:::57212
NVGRE (100) 
NVGRE (100) 
PE_VIP
PE_VIP
PA/HLIP
PA/HLIP
TCP
TCP
Src: 2603:10E1:100:2::PE_VIP:80
Src: 2603:10E1:100:2::PE_VIP:80
Dst: FD40:C00:31:4A4F:6b31:100:::57212
Dst: FD40:C00:31:4A4F:6b31:100:::57212
NVGRE (100) 
NVGRE (100) 
PE_VIP
PE_VIP
ST GW VIP
ST GW VIP
Lookup happens in VNET_VFP_PRIVATEIP_VSDEST_
MAP_SPACE.
We convert PECA to PEPA/VIP here. 

Lookup happens in VNET_VFP_P...
Private Link
Private Link
Text is not SVG - cannot display
\ No newline at end of file +
SLB NAT Layer
SLB NAT Layer
2
2
3
3
7
7
6
6
VFP
VFP
Host
Host
5
5
Src: VM CA1
Src: VM CA1
VFP_DEFAULT_TRANSPOSITION_
LAYER_STATELESS
VFP_DEFAULT_TRANSPOSITION_...
VNET_VFP_PRIVATE_IP_
NAT_STATEFUL
VNET_VFP_PRIVATE_IP_...
VNET Layer
VNET Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
1
1
4
4
8
8
9
9
10
10
TCP
TCP
Dst: PE:80
Dst: PE:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
Src: FD40:C00:31:4A4F:6b31:100:::57212
Src: FD40:C00:31:4A4F:6b31:100:::57212
Dst: 2603:10E1:100:2::PE:80
Dst: 2603:10E1:100:2::PE:80
TCP
TCP
Src: FD40:C00:31:4A4F:6b31:100:::57212
Src: FD40:C00:31:4A4F:6b31:100:::57212
Dst: 2603:10E1:100:2::PE_VIP:80
Dst: 2603:10E1:100:2::PE_VIP:80
TCP
TCP
Src: FD40:C00:31:4A4F:6b31:100:::57212
Src: FD40:C00:31:4A4F:6b31:100:::57212
Dst: 2603:10E1:100:2::PE_VIP:80
Dst: 2603:10E1:100:2::PE_VIP:80
NVGRE (100) 
NVGRE (100) 
PA/HLIP
PA/HLIP
PE_VIP
PE_VIP
TCP
TCP
Src: FD40:C00:31:4A4F:6b31:100:::57212
Src: FD40:C00:31:4A4F:6b31:100:::57212
Dst: 2603:10E1:100:2::PE_VIP:80
Dst: 2603:10E1:100:2::PE_VIP:80
NVGRE (100) 
NVGRE (100) 
ST GW VIP
ST GW VIP
PE_VIP
PE_VIP
TCP
TCP
Src: PE:80
Src: PE:80
Dst: CA1:57212
Dst: CA1:57212
TCP
TCP
Src: 2603:10E1:100:2::PE_VIP:80
Src: 2603:10E1:100:2::PE_VIP:80
Dst: FD40:C00:31:4A4F:6b31:100:::57212
Dst: FD40:C00:31:4A4F:6b31:100:::57212
TCP
TCP
Src: 2603:10E1:100:2::PE:80
Src: 2603:10E1:100:2::PE:80
Dst: FD40:C00:31:4A4F:6b31:100:::57212
Dst: FD40:C00:31:4A4F:6b31:100:::57212
TCP
TCP
Src: 2603:10E1:100:2::PE_VIP:80
Src: 2603:10E1:100:2::PE_VIP:80
Dst: FD40:C00:31:4A4F:6b31:100:::57212
Dst: FD40:C00:31:4A4F:6b31:100:::57212
NVGRE (100) 
NVGRE (100) 
PE_VIP
PE_VIP
PA/HLIP
PA/HLIP
TCP
TCP
Src: 2603:10E1:100:2::PE_VIP:80
Src: 2603:10E1:100:2::PE_VIP:80
Dst: FD40:C00:31:4A4F:6b31:100:::57212
Dst: FD40:C00:31:4A4F:6b31:100:::57212
NVGRE (100) 
NVGRE (100) 
PE_VIP
PE_VIP
ST GW VIP
ST GW VIP
Lookup happens in VNET_VFP_PRIVATEIP_VSDEST_
MAP_SPACE.
We convert PECA to PEPA/VIP here. 

Lookup happens in VNET_VFP_P...
Private Link
Private Link
Text is not SVG - cannot display
diff --git a/documentation/general/images/sdn/sdn-packet-transforms-service-tunneling.svg b/documentation/general/images/sdn/sdn-packet-transforms-service-tunneling.svg index 76cd4c1f4..3ca4a1a30 100644 --- a/documentation/general/images/sdn/sdn-packet-transforms-service-tunneling.svg +++ b/documentation/general/images/sdn/sdn-packet-transforms-service-tunneling.svg @@ -1,4 +1,4 @@ -
Src: VM CA1
Src: VM CA1
VNET Layer
VNET Layer
SLB NAT Layer
SLB NAT Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
3
3
4
4
5
5
17
17
18
18
19
19
VFP
VFP
Host
Host
VFP Transportation Layer
VFP Transportation Layer
1
1
2
2
20
20
Src: VM CA2
Src: VM CA2
VNET Layer
VNET Layer
SLB NAT Layer
SLB NAT Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
13
13
14
14
7
7
8
8
9
9
VFP
VFP
Host
Host
 SLB VNAT Layer
 SLB VNAT Layer
11
11
12
12
10
10
Src: Mux1
Src: Mux1
Dst:  Mux2
Dst:  Mux2
6
6
15
15
16
16
VM - Service Tunnel  destination 
SDL or Cross region storage
that needs SNAT
VM - Service Tunnel  destination...
Encapsulation
Encapsulation
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: PA2:80
Src: PA2:80
Src: ST IPv6 VIP:80
Src: ST IPv6 VIP:80
Dst  ST IPV6 CA1:572
Dst  ST IPV6 CA1:572
TCP
TCP
47 (GRE)
47 (GRE)
Dst: NextHop MAC
Dst: NextHop MAC
Src: Source MAC
Src: Source MAC
Dst: STGW IPV4 VIP
Dst: STGW IPV4 VIP
Src: SQL VIP:80
Src: SQL VIP:80
GRE (0x6558)
GRE (0x6558)
Dst: VM MAC1
Dst: VM MAC1
Src: VM MAC2
Src: VM MAC2
Src: ST IPv6 VIP:80
Src: ST IPv6 VIP:80
Dst  ST IPV6 CA1:572
Dst  ST IPV6 CA1:572
TCP
TCP
47 (GRE)
47 (GRE)
Dst: NextHop MAC
Dst: NextHop MAC
Src: Source MAC
Src: Source MAC
Dst: STGW IPV4 VIP
Dst: STGW IPV4 VIP
Src: SQL VIP:80
Src: SQL VIP:80
GRE (0x6558)
GRE (0x6558)
Dst: VM MAC1
Dst: VM MAC1
Src: VM MAC2
Src: VM MAC2
Dst: VM PA1:80
Dst: VM PA1:80
Src: Mux: PA
Src: Mux: PA
IPinIP/NVGRE
IPinIP/NVGRE
Src: ST IPv6 VIP:80
Src: ST IPv6 VIP:80
Dst  ST IPV6 CA1:572
Dst  ST IPV6 CA1:572
TCP
TCP
Src: SQL VIP:80
Src: SQL VIP:80
Dst  CA1:572
Dst  CA1:572
TCP
TCP
47 (GRE)
47 (GRE)
Dst: NextHop MAC
Dst: NextHop MAC
Src: Source MAC
Src: Source MAC
Src: ST GW IPV4 VIP
Src: ST GW IPV4 VIP
Dst: SQL VIP:80
Dst: SQL VIP:80
GRE (0x6558)
GRE (0x6558)
Dst: dst MAC
Dst: dst MAC
Src: VM MAC1
Src: VM MAC1
Dst: ST IPv6 VIP:80
Dst: ST IPv6 VIP:80
Src  ST IPV6 CA1:572
Src  ST IPV6 CA1:572
TCP
TCP
Src: VM PA1
Src: VM PA1
47 (GRE)
47 (GRE)
Dst: NextHop MAC
Dst: NextHop MAC
Src: Source MAC
Src: Source MAC
Dst: SQL VIP:80
Dst: SQL VIP:80
GRE (0x6558)
GRE (0x6558)
Dst: dst MAC
Dst: dst MAC
Src: VM MAC1
Src: VM MAC1
Dst: ST IPv6 VIP:80
Dst: ST IPv6 VIP:80
Src  ST IPV6 CA1:572
Src  ST IPV6 CA1:572
TCP
TCP
Dst: ST IPv6 VIP:80
Dst: ST IPv6 VIP:80
Src  ST IPV6 CA1:572
Src  ST IPV6 CA1:572
TCP
TCP
Dst: SQL VIP:80
Dst: SQL VIP:80
Src  CA1:572
Src  CA1:572
TCP
TCP
47 (GRE)
47 (GRE)
Dst: NextHop MAC
Dst: NextHop MAC
Src: Source MAC
Src: Source MAC
Src: ST GW IPV4 VIP
Src: ST GW IPV4 VIP
Dst: SQL VIP:80
Dst: SQL VIP:80
GRE (0x6558)
GRE (0x6558)
Dst: dst MAC
Dst: dst MAC
Src: VM MAC1
Src: VM MAC1
Dst: ST IPv6 VIP:80
Dst: ST IPv6 VIP:80
Src  ST IPV6 CA1:572
Src  ST IPV6 CA1:572
TCP
TCP
Dst: SQL PA2:80
Dst: SQL PA2:80
Src: Mux: PA
Src: Mux: PA
IPinIP/NVGRE
IPinIP/NVGRE
47 (GRE)
47 (GRE)
Dst: NextHop MAC
Dst: NextHop MAC
Src: Source MAC
Src: Source MAC
Src: ST GW IPV4 VIP
Src: ST GW IPV4 VIP
Dst: SQL VIP:80
Dst: SQL VIP:80
GRE (0x6558)
GRE (0x6558)
Dst: dst MAC
Dst: dst MAC
Src: VM MAC1
Src: VM MAC1
Dst: ST IPv6 VIP:80
Dst: ST IPv6 VIP:80
Src  ST IPV6 CA1:572
Src  ST IPV6 CA1:572
TCP
TCP
Dst: ST IPv6 VIP:80
Dst: ST IPv6 VIP:80
Src  ST IPV6 CA1:572
Src  ST IPV6 CA1:572
TCP
TCP
Dst: ST IPv6 VIP:2200
Dst: ST IPv6 VIP:2200
TCP
TCP
47 (GRE)
47 (GRE)
Dst: NextHop MAC
Dst: NextHop MAC
Src: Source MAC
Src: Source MAC
DSt: ST GW IPV4 VIP
DSt: ST GW IPV4 VIP
Src: SQL VIP:80
Src: SQL VIP:80
GRE (0x6558)
GRE (0x6558)
Dst: VM MAC1
Dst: VM MAC1
Src: VM MAC2
Src: VM MAC2
Src: ST IPv6 VIP:80
Src: ST IPv6 VIP:80
Dst  ST IPv6 CA1:572
Dst  ST IPv6 CA1:572
TCP
TCP
Src: ST IPv6 VIP:80
Src: ST IPv6 VIP:80
Dst  ST IPv6 CA1:572
Dst  ST IPv6 CA1:572
TCP
TCP
Src: ST IPv6 CA2:2200
Src: ST IPv6 CA2:2200
Dst  ST IPv6 CA1:572
Dst  ST IPv6 CA1:572
TCP
TCP
For destination ST Gateway IPv4 VIP, Mux uses the inner ST IPv6 CA1 (STv1) or the inner MAC (STv2) to idenify the PA1. Then encap with IPinIP/NVGRE
For destination ST Gateway IPv4...
The Mux matches the inbound VIP and port to a load  balancing rule. It then hashes (src IP, src port, dst IP, dst port and protocol) to select a DIP from the active sip pool. Finally the Mux encapsulates the packet to the destination host using eitehr IPinIP or NVGRE
The Mux matches the inbound VIP an...
SLB NAT Layer SNAT SQL and cross region storage with ST GateWay IPv4 VIP. No SNAT port allocation needed as Mux uses eitehr inner MAC (ST2) or CA in inner IPv6 (ST1) for return traffic
SLB NAT Layer SNAT SQL and cros...
VNET layer NVGRE encap with GRE key 100 and source IPv4 PA, destination IPv4 VIP
VNET layer NVGRE encap with GRE...
VFP transposition layer performs IPv4 to IPv6 NAT for ST-enabled destination. Source IPv6 conatins VNet ID, Subnet ID, source CA. Destination IPv6 contains dst ST prefix + dst VIP
VFP transposition layer perform...
VNET layer descap the  GRE outer  IPv4, the flow will preserve the origianl src/dedt VIP from the outer header to match returnpacket
VNET layer descap the  GRE oute...
VNAT layer NAT dst from ST IPv6 VIP to ST IPv6 CA2
VNAT layer NAT dst from ST IPv6...
Text is not SVG - cannot display
\ No newline at end of file +
Src: VM CA1
Src: VM CA1
VNET Layer
VNET Layer
SLB NAT Layer
SLB NAT Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
3
3
4
4
5
5
17
17
18
18
19
19
VFP
VFP
Host
Host
VFP Transportation Layer
VFP Transportation Layer
1
1
2
2
20
20
Src: VM CA2
Src: VM CA2
VNET Layer
VNET Layer
SLB NAT Layer
SLB NAT Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
13
13
14
14
7
7
8
8
9
9
VFP
VFP
Host
Host
 SLB VNAT Layer
 SLB VNAT Layer
11
11
12
12
10
10
Src: Mux1
Src: Mux1
Dst:  Mux2
Dst:  Mux2
6
6
15
15
16
16
VM - Service Tunnel  destination 
SDL or Cross region storage
that needs SNAT
VM - Service Tunnel  destination...
Encapsulation
Encapsulation
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: PA2:80
Src: PA2:80
Src: ST IPv6 VIP:80
Src: ST IPv6 VIP:80
Dst  ST IPV6 CA1:572
Dst  ST IPV6 CA1:572
TCP
TCP
47 (GRE)
47 (GRE)
Dst: NextHop MAC
Dst: NextHop MAC
Src: Source MAC
Src: Source MAC
Dst: STGW IPV4 VIP
Dst: STGW IPV4 VIP
Src: SQL VIP:80
Src: SQL VIP:80
GRE (0x6558)
GRE (0x6558)
Dst: VM MAC1
Dst: VM MAC1
Src: VM MAC2
Src: VM MAC2
Src: ST IPv6 VIP:80
Src: ST IPv6 VIP:80
Dst  ST IPV6 CA1:572
Dst  ST IPV6 CA1:572
TCP
TCP
47 (GRE)
47 (GRE)
Dst: NextHop MAC
Dst: NextHop MAC
Src: Source MAC
Src: Source MAC
Dst: STGW IPV4 VIP
Dst: STGW IPV4 VIP
Src: SQL VIP:80
Src: SQL VIP:80
GRE (0x6558)
GRE (0x6558)
Dst: VM MAC1
Dst: VM MAC1
Src: VM MAC2
Src: VM MAC2
Dst: VM PA1:80
Dst: VM PA1:80
Src: Mux: PA
Src: Mux: PA
IPinIP/NVGRE
IPinIP/NVGRE
Src: ST IPv6 VIP:80
Src: ST IPv6 VIP:80
Dst  ST IPV6 CA1:572
Dst  ST IPV6 CA1:572
TCP
TCP
Src: SQL VIP:80
Src: SQL VIP:80
Dst  CA1:572
Dst  CA1:572
TCP
TCP
47 (GRE)
47 (GRE)
Dst: NextHop MAC
Dst: NextHop MAC
Src: Source MAC
Src: Source MAC
Src: ST GW IPV4 VIP
Src: ST GW IPV4 VIP
Dst: SQL VIP:80
Dst: SQL VIP:80
GRE (0x6558)
GRE (0x6558)
Dst: dst MAC
Dst: dst MAC
Src: VM MAC1
Src: VM MAC1
Dst: ST IPv6 VIP:80
Dst: ST IPv6 VIP:80
Src  ST IPV6 CA1:572
Src  ST IPV6 CA1:572
TCP
TCP
Src: VM PA1
Src: VM PA1
47 (GRE)
47 (GRE)
Dst: NextHop MAC
Dst: NextHop MAC
Src: Source MAC
Src: Source MAC
Dst: SQL VIP:80
Dst: SQL VIP:80
GRE (0x6558)
GRE (0x6558)
Dst: dst MAC
Dst: dst MAC
Src: VM MAC1
Src: VM MAC1
Dst: ST IPv6 VIP:80
Dst: ST IPv6 VIP:80
Src  ST IPV6 CA1:572
Src  ST IPV6 CA1:572
TCP
TCP
Dst: ST IPv6 VIP:80
Dst: ST IPv6 VIP:80
Src  ST IPV6 CA1:572
Src  ST IPV6 CA1:572
TCP
TCP
Dst: SQL VIP:80
Dst: SQL VIP:80
Src  CA1:572
Src  CA1:572
TCP
TCP
47 (GRE)
47 (GRE)
Dst: NextHop MAC
Dst: NextHop MAC
Src: Source MAC
Src: Source MAC
Src: ST GW IPV4 VIP
Src: ST GW IPV4 VIP
Dst: SQL VIP:80
Dst: SQL VIP:80
GRE (0x6558)
GRE (0x6558)
Dst: dst MAC
Dst: dst MAC
Src: VM MAC1
Src: VM MAC1
Dst: ST IPv6 VIP:80
Dst: ST IPv6 VIP:80
Src  ST IPV6 CA1:572
Src  ST IPV6 CA1:572
TCP
TCP
Dst: SQL PA2:80
Dst: SQL PA2:80
Src: Mux: PA
Src: Mux: PA
IPinIP/NVGRE
IPinIP/NVGRE
47 (GRE)
47 (GRE)
Dst: NextHop MAC
Dst: NextHop MAC
Src: Source MAC
Src: Source MAC
Src: ST GW IPV4 VIP
Src: ST GW IPV4 VIP
Dst: SQL VIP:80
Dst: SQL VIP:80
GRE (0x6558)
GRE (0x6558)
Dst: dst MAC
Dst: dst MAC
Src: VM MAC1
Src: VM MAC1
Dst: ST IPv6 VIP:80
Dst: ST IPv6 VIP:80
Src  ST IPV6 CA1:572
Src  ST IPV6 CA1:572
TCP
TCP
Dst: ST IPv6 VIP:80
Dst: ST IPv6 VIP:80
Src  ST IPV6 CA1:572
Src  ST IPV6 CA1:572
TCP
TCP
Dst: ST IPv6 VIP:2200
Dst: ST IPv6 VIP:2200
TCP
TCP
47 (GRE)
47 (GRE)
Dst: NextHop MAC
Dst: NextHop MAC
Src: Source MAC
Src: Source MAC
DSt: ST GW IPV4 VIP
DSt: ST GW IPV4 VIP
Src: SQL VIP:80
Src: SQL VIP:80
GRE (0x6558)
GRE (0x6558)
Dst: VM MAC1
Dst: VM MAC1
Src: VM MAC2
Src: VM MAC2
Src: ST IPv6 VIP:80
Src: ST IPv6 VIP:80
Dst  ST IPv6 CA1:572
Dst  ST IPv6 CA1:572
TCP
TCP
Src: ST IPv6 VIP:80
Src: ST IPv6 VIP:80
Dst  ST IPv6 CA1:572
Dst  ST IPv6 CA1:572
TCP
TCP
Src: ST IPv6 CA2:2200
Src: ST IPv6 CA2:2200
Dst  ST IPv6 CA1:572
Dst  ST IPv6 CA1:572
TCP
TCP
For destination ST Gateway IPv4 VIP, Mux uses the inner ST IPv6 CA1 (STv1) or the inner MAC (STv2) to idenify the PA1. Then encap with IPinIP/NVGRE
For destination ST Gateway IPv4...
The Mux matches the inbound VIP and port to a load  balancing rule. It then hashes (src IP, src port, dst IP, dst port and protocol) to select a DIP from the active sip pool. Finally the Mux encapsulates the packet to the destination host using eitehr IPinIP or NVGRE
The Mux matches the inbound VIP an...
SLB NAT Layer SNAT SQL and cross region storage with ST GateWay IPv4 VIP. No SNAT port allocation needed as Mux uses eitehr inner MAC (ST2) or CA in inner IPv6 (ST1) for return traffic
SLB NAT Layer SNAT SQL and cros...
VNET layer NVGRE encap with GRE key 100 and source IPv4 PA, destination IPv4 VIP
VNET layer NVGRE encap with GRE...
VFP transposition layer performs IPv4 to IPv6 NAT for ST-enabled destination. Source IPv6 conatins VNet ID, Subnet ID, source CA. Destination IPv6 contains dst ST prefix + dst VIP
VFP transposition layer perform...
VNET layer descap the  GRE outer  IPv4, the flow will preserve the origianl src/dedt VIP from the outer header to match returnpacket
VNET layer descap the  GRE oute...
VNAT layer NAT dst from ST IPv6 VIP to ST IPv6 CA2
VNAT layer NAT dst from ST IPv6...
Text is not SVG - cannot display
diff --git a/documentation/general/images/sdn/sdn-packet-transforms-vm-internal-load-balancer.svg b/documentation/general/images/sdn/sdn-packet-transforms-vm-internal-load-balancer.svg index 4344acc85..087785193 100644 --- a/documentation/general/images/sdn/sdn-packet-transforms-vm-internal-load-balancer.svg +++ b/documentation/general/images/sdn/sdn-packet-transforms-vm-internal-load-balancer.svg @@ -1,4 +1,4 @@ -
Src: VM CA1
Src: VM CA1
VNET Layer
VNET Layer
SLB NAT Layer
SLB NAT Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
Dst: VM CA2
Dst: VM CA2
VNET Layer
VNET Layer
SLB NAT Layer
SLB NAT Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
3
3
4
4
5
5
7
7
8
8
9
9
14
14
15
15
16
16
17
17
18
18
VFP
VFP
Host
Host
VFP
VFP
Host
Host
13
13
VNET uses CA:PA mapping from CDS/RDS to add GRE encap with PA to the packet. 
The GRE paccket will pass through SLB NAT/Decap layers
VNET uses CA:PA mapping fr...
VNET layer decap the
GRE packet
VNET layer decap the...
Src: Mux1
Src: Mux1
Dst:  Mux2
Dst:  Mux2
 SLB VNAT Layer
 SLB VNAT Layer
 SLB VNAT Layer
 SLB VNAT Layer

VM Internal
Load Balalncer CA
(in VNET) communication

VM Internal...
1
1
2
2
6
6
10
10
11
11
12
12
19
19
VNET layer NAT the
from ILB CA to VM CA 
VNET layer NAT the...
Encapsulation
Encapsulation
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: ILB PA2:80
Src: ILB PA2:80
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: ILB PA2:80
Src: ILB PA2:80
Src ILB CA2:80
Src ILB CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
Src ILB CA2:80
Src ILB CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
Src ILB CA2:80
Src ILB CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: ILB PA2:80
Dst: ILB PA2:80
Src:  PA1:57212
Src:  PA1:57212
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
TCP
TCP
Src: CA1:57212
Src: CA1:57212
Dst: ILB CA2:80
Dst: ILB CA2:80
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: ILB PA2:80
Dst: ILB PA2:80
Src:  PA1:57212
Src:  PA1:57212
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: ILB PA2:80
Dst: ILB PA2:80
Src:  PA1:57212
Src:  PA1:57212
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
TCP
TCP
Src: CA1:57212
Src: CA1:57212
Dst: ILB CA2:80
Dst: ILB CA2:80
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
Src ILB CA2:80
Src ILB CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: ILB PA2:80
Src: ILB PA2:80
Src ILB CA2:80
Src ILB CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: ILB PA2:80
Src: ILB PA2:80
Src ILB CA2:80
Src ILB CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: ILB PA2:80
Dst: ILB PA2:80
Src:  PA1:57212
Src:  PA1:57212
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
Dst: PA2:80
Dst: PA2:80
Src: PA
Src: PA
IPinP/NVGRE
IPinP/NVGRE
Text is not SVG - cannot display
\ No newline at end of file +
Src: VM CA1
Src: VM CA1
VNET Layer
VNET Layer
SLB NAT Layer
SLB NAT Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
Dst: VM CA2
Dst: VM CA2
VNET Layer
VNET Layer
SLB NAT Layer
SLB NAT Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
3
3
4
4
5
5
7
7
8
8
9
9
14
14
15
15
16
16
17
17
18
18
VFP
VFP
Host
Host
VFP
VFP
Host
Host
13
13
VNET uses CA:PA mapping from CDS/RDS to add GRE encap with PA to the packet. 
The GRE paccket will pass through SLB NAT/Decap layers
VNET uses CA:PA mapping fr...
VNET layer decap the
GRE packet
VNET layer decap the...
Src: Mux1
Src: Mux1
Dst:  Mux2
Dst:  Mux2
 SLB VNAT Layer
 SLB VNAT Layer
 SLB VNAT Layer
 SLB VNAT Layer

VM Internal
Load Balalncer CA
(in VNET) communication

VM Internal...
1
1
2
2
6
6
10
10
11
11
12
12
19
19
VNET layer NAT the
from ILB CA to VM CA 
VNET layer NAT the...
Encapsulation
Encapsulation
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: ILB PA2:80
Src: ILB PA2:80
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: ILB PA2:80
Src: ILB PA2:80
Src ILB CA2:80
Src ILB CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
Src ILB CA2:80
Src ILB CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
Src ILB CA2:80
Src ILB CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: ILB PA2:80
Dst: ILB PA2:80
Src:  PA1:57212
Src:  PA1:57212
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
TCP
TCP
Src: CA1:57212
Src: CA1:57212
Dst: ILB CA2:80
Dst: ILB CA2:80
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: ILB PA2:80
Dst: ILB PA2:80
Src:  PA1:57212
Src:  PA1:57212
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: ILB PA2:80
Dst: ILB PA2:80
Src:  PA1:57212
Src:  PA1:57212
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
TCP
TCP
Src: CA1:57212
Src: CA1:57212
Dst: ILB CA2:80
Dst: ILB CA2:80
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
Src ILB CA2:80
Src ILB CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: ILB PA2:80
Src: ILB PA2:80
Src ILB CA2:80
Src ILB CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: ILB PA2:80
Src: ILB PA2:80
Src ILB CA2:80
Src ILB CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: ILB PA2:80
Dst: ILB PA2:80
Src:  PA1:57212
Src:  PA1:57212
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
Dst: PA2:80
Dst: PA2:80
Src: PA
Src: PA
IPinP/NVGRE
IPinP/NVGRE
Text is not SVG - cannot display
diff --git a/documentation/general/images/sdn/sdn-packet-transforms-vm-to-vm.svg b/documentation/general/images/sdn/sdn-packet-transforms-vm-to-vm.svg index 46e902a88..bf38e5610 100644 --- a/documentation/general/images/sdn/sdn-packet-transforms-vm-to-vm.svg +++ b/documentation/general/images/sdn/sdn-packet-transforms-vm-to-vm.svg @@ -1,4 +1,4 @@ -
Src: VM CA1
Src: VM CA1
VNET Layer
VNET Layer
SLB NAT Layer
SLB NAT Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
Dst: VM CA2
Dst: VM CA2
VNET Layer
VNET Layer
SLB NAT Layer
SLB NAT Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
1
1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
10
10
11
11
12
12
13
13
14
14
VFP
VFP
Host
Host
VFP
VFP
Host
Host
9
9

VM to VM
(in VNET)
communication

VM to VM...
VNET uses CA:PA mapping from CDS/RDS to add GRE encap with PA to the packet. 
The GRE paccket will pass through SLB NAT/Decap layers

VNET uses CA:PA mapping fr...
VNET layer decap the
GRE packet

VNET layer decap the...
Src: Mux1
Src: Mux1
Dst:  Mux2
Dst:  Mux2
Encapsulation
Encapsulation
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: PA2:80
Src: PA2:80
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: PA2:80
Src: PA2:80
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: PA2:80
Src: PA2:80
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst:  PA2:80
Dst:  PA2:80
Src:  PA1:57212
Src:  PA1:57212
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst:  PA2:80
Dst:  PA2:80
Src:  PA1:57212
Src:  PA1:57212
Text is not SVG - cannot display
\ No newline at end of file +
Src: VM CA1
Src: VM CA1
VNET Layer
VNET Layer
SLB NAT Layer
SLB NAT Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
Dst: VM CA2
Dst: VM CA2
VNET Layer
VNET Layer
SLB NAT Layer
SLB NAT Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
1
1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
10
10
11
11
12
12
13
13
14
14
VFP
VFP
Host
Host
VFP
VFP
Host
Host
9
9

VM to VM
(in VNET)
communication

VM to VM...
VNET uses CA:PA mapping from CDS/RDS to add GRE encap with PA to the packet. 
The GRE paccket will pass through SLB NAT/Decap layers

VNET uses CA:PA mapping fr...
VNET layer decap the
GRE packet

VNET layer decap the...
Src: Mux1
Src: Mux1
Dst:  Mux2
Dst:  Mux2
Encapsulation
Encapsulation
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: PA2:80
Src: PA2:80
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: PA2:80
Src: PA2:80
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: PA2:80
Src: PA2:80
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst:  PA2:80
Dst:  PA2:80
Src:  PA1:57212
Src:  PA1:57212
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst:  PA2:80
Dst:  PA2:80
Src:  PA1:57212
Src:  PA1:57212
Text is not SVG - cannot display
diff --git a/documentation/general/images/sdn/sdn-virtual-port.svg b/documentation/general/images/sdn/sdn-virtual-port.svg index e29bccb97..0e281843c 100644 --- a/documentation/general/images/sdn/sdn-virtual-port.svg +++ b/documentation/general/images/sdn/sdn-virtual-port.svg @@ -1,4 +1,4 @@ -
ACL 1
ACL 1
ACL 2
ACL 2
ACL n
ACL n
Other Transforms
Other Transforms
V-Port (ENI)
VNIC Indentifier - MAC
Address/VXLAN VNI
V-Port (ENI)...
V-Port config
(port mac, QQS, DSCP)
V-Port config...
NAT Policies
NAT Policies
Route TableMapping Table
Text is not SVG - cannot display
\ No newline at end of file +
ACL 1
ACL 1
ACL 2
ACL 2
ACL n
ACL n
Other Transforms
Other Transforms
V-Port (ENI)
VNIC Indentifier - MAC
Address/VXLAN VNI
V-Port (ENI)...
V-Port config
(port mac, QQS, DSCP)
V-Port config...
NAT Policies
NAT Policies
Route TableMapping Table
Text is not SVG - cannot display
diff --git a/documentation/general/images/tcp-connection-abort.svg b/documentation/general/images/tcp-connection-abort.svg index 1e1a682e1..0a59af9c0 100644 --- a/documentation/general/images/tcp-connection-abort.svg +++ b/documentation/general/images/tcp-connection-abort.svg @@ -1,4 +1,4 @@ -
Data & Acks
Data & Acks
Data
Data
RST
RST
RST
RST
Text is not SVG - cannot display
\ No newline at end of file +
Data & Acks
Data & Acks
Data
Data
RST
RST
RST
RST
Text is not SVG - cannot display
diff --git a/documentation/general/images/tcp-connection-create.svg b/documentation/general/images/tcp-connection-create.svg index 86cba5572..539204029 100644 --- a/documentation/general/images/tcp-connection-create.svg +++ b/documentation/general/images/tcp-connection-create.svg @@ -1,4 +1,4 @@ -
optional first file 
optional first fil...
SYN | SEQ Client
SYN | SEQ Client
Client
Client
Server
Server
SYN-ACK | SEQ Client + 1 | SEQ Server
SYN-ACK | SEQ Client + 1 | SEQ Server
ACK | SEQ Server + 1 | SEQ Client + 1
ACK | SEQ Server + 1 | SEQ Client + 1
Text is not SVG - cannot display
\ No newline at end of file +
optional first file 
optional first fil...
SYN | SEQ Client
SYN | SEQ Client
Client
Client
Server
Server
SYN-ACK | SEQ Client + 1 | SEQ Server
SYN-ACK | SEQ Client + 1 | SEQ Server
ACK | SEQ Server + 1 | SEQ Client + 1
ACK | SEQ Server + 1 | SEQ Client + 1
Text is not SVG - cannot display
diff --git a/documentation/general/images/tcp-connection-delete.svg b/documentation/general/images/tcp-connection-delete.svg index 79b13ac54..d3b8fb4fe 100644 --- a/documentation/general/images/tcp-connection-delete.svg +++ b/documentation/general/images/tcp-connection-delete.svg @@ -1,4 +1,4 @@ -
Initiator
Initiator
Receiver
Receiver
FIN
FIN
ACK
ACK
FIN
FIN
ACK
ACK
Established 
Connection
Established...
Established 
Connection
Established...
active close
FIN_WAIT_1
active close...
FIN_WAIT_1
FIN_WAIT_1
TIME WAIT
TIME WAIT
CLOSE WAIT
passive close
CLOSE WAIT...
LAST_ACK
LAST_ACK
Closed
Closed
Closed
Closed
Text is not SVG - cannot display
\ No newline at end of file +
Initiator
Initiator
Receiver
Receiver
FIN
FIN
ACK
ACK
FIN
FIN
ACK
ACK
Established 
Connection
Established...
Established 
Connection
Established...
active close
FIN_WAIT_1
active close...
FIN_WAIT_1
FIN_WAIT_1
TIME WAIT
TIME WAIT
CLOSE WAIT
passive close
CLOSE WAIT...
LAST_ACK
LAST_ACK
Closed
Closed
Closed
Closed
Text is not SVG - cannot display
diff --git a/documentation/gnmi/README.md b/documentation/gnmi/README.md index 0a8edec7a..b657f10fd 100644 --- a/documentation/gnmi/README.md +++ b/documentation/gnmi/README.md @@ -14,4 +14,4 @@ This folder contains DASH gNMI Interface design and requirements documents. ## Requirements | Document | Description | -| ------------------------------------------------------ | ------------------------------------------ | \ No newline at end of file +| ------------------------------------------------------ | ------------------------------------------ | diff --git a/documentation/high-avail/README.md b/documentation/high-avail/README.md index 253f76c1c..4cefe8d47 100644 --- a/documentation/high-avail/README.md +++ b/documentation/high-avail/README.md @@ -14,4 +14,4 @@ This folder contains DASH High Availability design and requirements documents. ## Requirements | Document | Description | -| ------------------------------------------------------ | ------------------------------------------ | \ No newline at end of file +| ------------------------------------------------------ | ------------------------------------------ | diff --git a/documentation/high-avail/images/dash-ha-appliance.svg b/documentation/high-avail/images/dash-ha-appliance.svg index e79f29a8e..e3f49889d 100644 --- a/documentation/high-avail/images/dash-ha-appliance.svg +++ b/documentation/high-avail/images/dash-ha-appliance.svg @@ -1,4 +1,4 @@ -
DASH Appliance
DASH Appliance
1
1
2
2
3
3
5
5
6
6
4
4
DASH Appliance
DASH Appliance
1
1
2
2
3
3
5
5
6
6
4
4
Inter-DPU HA communications channel routed through network
Inter-DPU HA communicati...
DASH Appliance
DASH Appliance
1
1
2
2
3
3
5
5
6
6
4
4
to upper tiered switches or network
to upper tiered switches or network
Links are illustrative only, actual qty and speed varies.
Links are illustrativ...
High-Availability Peers
High-Availability Pee...
Backup Device
Backup Device
Devices may be co-located or remotely-located
Devices may be co-located or remotely-located
Viewer does not support full SVG 1.1
\ No newline at end of file +
DASH Appliance
DASH Appliance
1
1
2
2
3
3
5
5
6
6
4
4
DASH Appliance
DASH Appliance
1
1
2
2
3
3
5
5
6
6
4
4
Inter-DPU HA communications channel routed through network
Inter-DPU HA communicati...
DASH Appliance
DASH Appliance
1
1
2
2
3
3
5
5
6
6
4
4
to upper tiered switches or network
to upper tiered switches or network
Links are illustrative only, actual qty and speed varies.
Links are illustrativ...
High-Availability Peers
High-Availability Pee...
Backup Device
Backup Device
Devices may be co-located or remotely-located
Devices may be co-located or remotely-located
Viewer does not support full SVG 1.1
diff --git a/documentation/high-avail/images/dash-ha-smart-switch.svg b/documentation/high-avail/images/dash-ha-smart-switch.svg index b435f972c..f3eea4cb8 100644 --- a/documentation/high-avail/images/dash-ha-smart-switch.svg +++ b/documentation/high-avail/images/dash-ha-smart-switch.svg @@ -1,4 +1,4 @@ -
DASH Applliance/
Smart Switch
DASH Applliance/...
Captive DPU complex
Captive DPU...
DASH Applliance/
Smart Switch
DASH Applliance/...
Inter-DPU HA communications channel routed through network
Inter-DPU HA communications channel...
to upper tiered switches or network
to upper tiered switches or network
1
1
2
2
N
N
Captive DPU complex
Captive DPU...
1
1
2
2
N
N
Switch ASIC
Switch A...
Switch ASIC
Switch A...
DASH Applliance/
Smart Switch
DASH Applliance/...
Captive DPU complex
Captive DPU...
1
1
2
2
N
N
Switch ASIC
Switch A...
High-Availability Peers
High-Availability Pee...
Backup Device
Backup Device
Links are illustrative only, actual qty and speed varies.
Links are illustrativ...
Devices may be co-located or remotely-located
Devices may be co-located or remotely-located
Viewer does not support full SVG 1.1
\ No newline at end of file +
DASH Applliance/
Smart Switch
DASH Applliance/...
Captive DPU complex
Captive DPU...
DASH Applliance/
Smart Switch
DASH Applliance/...
Inter-DPU HA communications channel routed through network
Inter-DPU HA communications channel...
to upper tiered switches or network
to upper tiered switches or network
1
1
2
2
N
N
Captive DPU complex
Captive DPU...
1
1
2
2
N
N
Switch ASIC
Switch A...
Switch ASIC
Switch A...
DASH Applliance/
Smart Switch
DASH Applliance/...
Captive DPU complex
Captive DPU...
1
1
2
2
N
N
Switch ASIC
Switch A...
High-Availability Peers
High-Availability Pee...
Backup Device
Backup Device
Links are illustrative only, actual qty and speed varies.
Links are illustrativ...
Devices may be co-located or remotely-located
Devices may be co-located or remotely-located
Viewer does not support full SVG 1.1
diff --git a/documentation/high-avail/images/ha-functional-diag.svg b/documentation/high-avail/images/ha-functional-diag.svg index 13c44c778..81eb300f3 100644 --- a/documentation/high-avail/images/ha-functional-diag.svg +++ b/documentation/high-avail/images/ha-functional-diag.svg @@ -1,4 +1,4 @@ -DPU A Flow Entries
Flow identifiers
Flow identifie...
Timers
Timers
State
State
{5-tuple, etc.}
{5-tuple, etc.}
{active/passive, etc.}
{active/passiv...
Dataplane Pipeline
Dataplane Pipeline
L3 route
L3 route
stale entries
stale...
HA Dataplane Sync Controller A
HA Dataplane Sync Cont...
data channel
UDP, unreliable
data channel...
control channel
TCP, reliable
control channel...
flow table
syncing
flow table...
DPU A (local)
DPU A (local)
HA Dataplane Sync Controller B
HA Dataplane Sync Cont...
DPU B (peer)
DPU B (peer)
DPU B Flow Entries
DPU B Flow Entries
Use DC fabric for inband HA sync channels
Use DC fabric for inban...
sync channels (physical)
sync channe...
sync channels (logical)
sync channe...
Dataplane Pipeline
Dataplane Pipeline
flow table
syncing
flow table...
Layer 3 ToR Switch
Layer 3 ToR Switch
sync channels (physical)
sync channe...
Management API (SAI?)
Management...
Telemetry/
observability
Telemetry/...
"real-time" events,status, etc.
"real-time" e...
Config,control, state, stats
Config,contro...
Active flow updates
Active flow...
Active flow updates
Active flow...
Management API (SAI?)
Management...
Telemetry/
observability
Telemetry/...
to management SW, collectors etc.
to management SW, collecto...
channel SLAs?
channel SLAs?
Viewer does not support full SVG 1.1
\ No newline at end of file +DPU A Flow Entries
Flow identifiers
Flow identifie...
Timers
Timers
State
State
{5-tuple, etc.}
{5-tuple, etc.}
{active/passive, etc.}
{active/passiv...
Dataplane Pipeline
Dataplane Pipeline
L3 route
L3 route
stale entries
stale...
HA Dataplane Sync Controller A
HA Dataplane Sync Cont...
data channel
UDP, unreliable
data channel...
control channel
TCP, reliable
control channel...
flow table
syncing
flow table...
DPU A (local)
DPU A (local)
HA Dataplane Sync Controller B
HA Dataplane Sync Cont...
DPU B (peer)
DPU B (peer)
DPU B Flow Entries
DPU B Flow Entries
Use DC fabric for inband HA sync channels
Use DC fabric for inban...
sync channels (physical)
sync channe...
sync channels (logical)
sync channe...
Dataplane Pipeline
Dataplane Pipeline
flow table
syncing
flow table...
Layer 3 ToR Switch
Layer 3 ToR Switch
sync channels (physical)
sync channe...
Management API (SAI?)
Management...
Telemetry/
observability
Telemetry/...
"real-time" events,status, etc.
"real-time" e...
Config,control, state, stats
Config,contro...
Active flow updates
Active flow...
Active flow updates
Active flow...
Management API (SAI?)
Management...
Telemetry/
observability
Telemetry/...
to management SW, collectors etc.
to management SW, collecto...
channel SLAs?
channel SLAs?
Viewer does not support full SVG 1.1
diff --git a/documentation/high-avail/images/ha-state-sync-packet-format.svg b/documentation/high-avail/images/ha-state-sync-packet-format.svg index 1f0fe01de..f433cccdf 100644 --- a/documentation/high-avail/images/ha-state-sync-packet-format.svg +++ b/documentation/high-avail/images/ha-state-sync-packet-format.svg @@ -1,4 +1,4 @@ -
Ethernet
Ethernet
IP
IP
UDP
UDP
Flags
Flags
Opaque
Opaque
Msg 1
Msg 1
Opaque
Opaque
Msg 2
Msg 2
Opaque
Opaque
Msg N
Msg N
Opaque
Opaque
...
...
State Synchronization Packet Format
State Synchronization Packet Format
Truncated
(for replies, when requested)
Truncated...
Receiver specifies “N”, maximum messages allowed per packet (can be 1)
Sender may choose to send 1 to N messages per packet
Receiver specifies “N”, maximum messages allowed per packet...
Text is not SVG - cannot display
\ No newline at end of file +
Ethernet
Ethernet
IP
IP
UDP
UDP
Flags
Flags
Opaque
Opaque
Msg 1
Msg 1
Opaque
Opaque
Msg 2
Msg 2
Opaque
Opaque
Msg N
Msg N
Opaque
Opaque
...
...
State Synchronization Packet Format
State Synchronization Packet Format
Truncated
(for replies, when requested)
Truncated...
Receiver specifies “N”, maximum messages allowed per packet (can be 1)
Sender may choose to send 1 to N messages per packet
Receiver specifies “N”, maximum messages allowed per packet...
Text is not SVG - cannot display
diff --git a/documentation/high-avail/images/ha-sync-operations.svg b/documentation/high-avail/images/ha-sync-operations.svg index b9a7af397..dc79ce7c0 100644 --- a/documentation/high-avail/images/ha-sync-operations.svg +++ b/documentation/high-avail/images/ha-sync-operations.svg @@ -1,4 +1,4 @@ -
DPU 2
DPU 2
DPU 1
DPU 1
Lossy Channel
Lossy Channel
State Updates
State Updates
Replies
Replies
Sender
Sender
Receiver
Receiver
State Updates
State Updates
Replies
Replies
Receiver
Receiver
Sender
Sender
Fixed Behavior
Simple & Stateless
Fixed Behavior...
Flexible Behavior
Stateless or Stateful
Flexible Behavior...
Text is not SVG - cannot display
\ No newline at end of file +
DPU 2
DPU 2
DPU 1
DPU 1
Lossy Channel
Lossy Channel
State Updates
State Updates
Replies
Replies
Sender
Sender
Receiver
Receiver
State Updates
State Updates
Replies
Replies
Receiver
Receiver
Sender
Sender
Fixed Behavior
Simple & Stateless
Fixed Behavior...
Flexible Behavior
Stateless or Stateful
Flexible Behavior...
Text is not SVG - cannot display
diff --git a/documentation/images/general/dash-specs-flow.svg b/documentation/images/general/dash-specs-flow.svg index 2e05a8488..75b215a43 100644 --- a/documentation/images/general/dash-specs-flow.svg +++ b/documentation/images/general/dash-specs-flow.svg @@ -1,4 +1,4 @@ -
Test Cases
Test Cases
Detailed test cases which reference hard compliance requirements by ID so they can be traced back. A single test case can cover multiple requirements. Test cases include documentation, machine-readable parameters /test vectors which describe stimulus and expected responses, etc.
Detailed test cases which reference hard compliance requirements b...
HLDs
HLDs
High-level descriptions & requirements  - architecture,  services, features, encapsulations and transformations, etc. Emphasis is on understanding the objective/design. 
High-level descriptions & requirements  - architecture,  services,...
Compliance Requirements
Compliance...
Precise numeric and/or behavioral requirements, each requirement is well-specified. Should refer back to an associated HLD as applicable. Each requirement should be assigned an ID which can be referenced in test cases. Emphasis is on human-readability and maintainability but could be expressed in machine-readable form (e.g. yaml file) so can be consumed by test cases.

Example:
Reqmt. ID 1.2.3.4.5
10M connections per second <under some specified condition>
Precise numeric and/or behavioral requirements, each requirement i...
P4 Behavioral Model
P4 Behavior...
Dataplane behavioral model expressed in P4 (overlay, at least). Agrees with HLDs. Machine-readable/executable.
Dataplane behavioral model expressed in P4 (overlay, at least). Ag...
Test Scripts
Test Scrip...
Detailed test results in report form, both human and machine-readable, including all metadata required to reproduce the test exactly (all GitHub commit/branch info, DUT details, SW versions, etc.). Results can refer back to the HLDs and compliance requirements.
Detailed test results in report form, both human and machine-reada...
DASH/Documentation
DASH/Documentation
DASH/test
DASH/test
Reports
Reports
Test Results
Test Results
Executable testing scripts which implement the test cases. Data-driven to the extent possible, using values  from test cases and compliance requirements. Test results should refer back to original compliance requirements and test cases, including measured results, pass/fail, and test-case ID numbers. Tests can be run manually in local testbeds and triggered automatically in a CI/CD pipeline. A single script can run more than one test case.
Executable testing scripts which implement the test cases. Data-dr...
reference/
consume
reference/...
reference
reference
DASH Github Repo
DASH Githu...
Not stored in GitHub
Not stored...
store
store
Results Database (optional)
Results Datab...
Results can be stored by the entity which runs the test (e.g. a DASH device provider). Community CI/CD tests could be archived suitably.
Results can be stored by the entity which runs the te...
Results Archive
Results Ar...
reference
reference
reference/
consume
reference/...
Repo location/content
Repo location/content
Artifacts
Artifacts
Description
Description
generate
generate
Viewer does not support full SVG 1.1
\ No newline at end of file +
Test Cases
Test Cases
Detailed test cases which reference hard compliance requirements by ID so they can be traced back. A single test case can cover multiple requirements. Test cases include documentation, machine-readable parameters /test vectors which describe stimulus and expected responses, etc.
Detailed test cases which reference hard compliance requirements b...
HLDs
HLDs
High-level descriptions & requirements  - architecture,  services, features, encapsulations and transformations, etc. Emphasis is on understanding the objective/design. 
High-level descriptions & requirements  - architecture,  services,...
Compliance Requirements
Compliance...
Precise numeric and/or behavioral requirements, each requirement is well-specified. Should refer back to an associated HLD as applicable. Each requirement should be assigned an ID which can be referenced in test cases. Emphasis is on human-readability and maintainability but could be expressed in machine-readable form (e.g. yaml file) so can be consumed by test cases.

Example:
Reqmt. ID 1.2.3.4.5
10M connections per second <under some specified condition>
Precise numeric and/or behavioral requirements, each requirement i...
P4 Behavioral Model
P4 Behavior...
Dataplane behavioral model expressed in P4 (overlay, at least). Agrees with HLDs. Machine-readable/executable.
Dataplane behavioral model expressed in P4 (overlay, at least). Ag...
Test Scripts
Test Scrip...
Detailed test results in report form, both human and machine-readable, including all metadata required to reproduce the test exactly (all GitHub commit/branch info, DUT details, SW versions, etc.). Results can refer back to the HLDs and compliance requirements.
Detailed test results in report form, both human and machine-reada...
DASH/Documentation
DASH/Documentation
DASH/test
DASH/test
Reports
Reports
Test Results
Test Results
Executable testing scripts which implement the test cases. Data-driven to the extent possible, using values  from test cases and compliance requirements. Test results should refer back to original compliance requirements and test cases, including measured results, pass/fail, and test-case ID numbers. Tests can be run manually in local testbeds and triggered automatically in a CI/CD pipeline. A single script can run more than one test case.
Executable testing scripts which implement the test cases. Data-dr...
reference/
consume
reference/...
reference
reference
DASH Github Repo
DASH Githu...
Not stored in GitHub
Not stored...
store
store
Results Database (optional)
Results Datab...
Results can be stored by the entity which runs the test (e.g. a DASH device provider). Community CI/CD tests could be archived suitably.
Results can be stored by the entity which runs the te...
Results Archive
Results Ar...
reference
reference
reference/
consume
reference/...
Repo location/content
Repo location/content
Artifacts
Artifacts
Description
Description
generate
generate
Viewer does not support full SVG 1.1
diff --git a/documentation/images/general/github-project-workflow.svg b/documentation/images/general/github-project-workflow.svg index c93fd5949..05d3a296e 100644 --- a/documentation/images/general/github-project-workflow.svg +++ b/documentation/images/general/github-project-workflow.svg @@ -1,4 +1,4 @@ -Project item list DASH P4 BM: Model ComparisonItem nWork Items (Issues)DASH P4 BM: Model ComparisonItem 2Other Work Items (Issues)Item 1Item 2Pull RequestsPR 1PR 2
Link
Link
Link
Link
Link
Link
Project  to track status, assignees, etc.. 
Project  to track status, assignees, etc...
Actual work items 
Actual work items 
Actual sub-work items 
Actual sub-work items 
Actual work  
Actual work  
This is where the project entry is described and assignees are listed
This is where the project entry...
Just a link to the issue
Just a link to the issue
Text is not SVG - cannot display
\ No newline at end of file +Project item list DASH P4 BM: Model ComparisonItem nWork Items (Issues)DASH P4 BM: Model ComparisonItem 2Other Work Items (Issues)Item 1Item 2Pull RequestsPR 1PR 2
Link
Link
Link
Link
Link
Link
Project  to track status, assignees, etc.. 
Project  to track status, assignees, etc...
Actual work items 
Actual work items 
Actual sub-work items 
Actual sub-work items 
Actual work  
Actual work  
This is where the project entry is described and assignees are listed
This is where the project entry...
Just a link to the issue
Just a link to the issue
Text is not SVG - cannot display
diff --git a/documentation/images/icons/dash-icon-large.svg b/documentation/images/icons/dash-icon-large.svg index fcfddde27..0c921293d 100644 --- a/documentation/images/icons/dash-icon-large.svg +++ b/documentation/images/icons/dash-icon-large.svg @@ -1,4 +1,4 @@ - \ No newline at end of file + diff --git a/documentation/images/icons/dash-icon-medium.svg b/documentation/images/icons/dash-icon-medium.svg index 793c62b37..b7a7b6e52 100644 --- a/documentation/images/icons/dash-icon-medium.svg +++ b/documentation/images/icons/dash-icon-medium.svg @@ -1,4 +1,4 @@ - \ No newline at end of file + diff --git a/documentation/images/icons/dash-icon-small.svg b/documentation/images/icons/dash-icon-small.svg index 59f8357f9..32879dad5 100644 --- a/documentation/images/icons/dash-icon-small.svg +++ b/documentation/images/icons/dash-icon-small.svg @@ -1,4 +1,4 @@ - \ No newline at end of file + diff --git a/documentation/images/icons/dash-icon-xlarge.svg b/documentation/images/icons/dash-icon-xlarge.svg index fc66d239f..2593df46d 100644 --- a/documentation/images/icons/dash-icon-xlarge.svg +++ b/documentation/images/icons/dash-icon-xlarge.svg @@ -1,4 +1,4 @@ - \ No newline at end of file + diff --git a/documentation/load-bal-service/README.md b/documentation/load-bal-service/README.md index e4919efbb..abebd3a80 100644 --- a/documentation/load-bal-service/README.md +++ b/documentation/load-bal-service/README.md @@ -12,4 +12,4 @@ This folder contains DASH Load Balancer Service design and requirements document ## Requirements | Document | Description | -| ------------------------------------------------------ | ------------------------------------------ | \ No newline at end of file +| ------------------------------------------------------ | ------------------------------------------ | diff --git a/documentation/sai/README.md b/documentation/sai/README.md index 8ff4c80bc..15cd35acc 100644 --- a/documentation/sai/README.md +++ b/documentation/sai/README.md @@ -11,4 +11,4 @@ This folder contains DASH SAI Interface design and requirements documents. ## Requirements | Document | Description | -| ------------------------------------------------------ | ------------------------------------------ | \ No newline at end of file +| ------------------------------------------------------ | ------------------------------------------ | diff --git a/documentation/stpl-service/README.md b/documentation/stpl-service/README.md index bad04f19b..37f40f1b5 100644 --- a/documentation/stpl-service/README.md +++ b/documentation/stpl-service/README.md @@ -11,4 +11,4 @@ This folder contains DASH Service Tunnel & Private Link Service design and requi ## Requirements | Document | Description | -| ------------------------------------------------------ | ------------------------------------------ | \ No newline at end of file +| ------------------------------------------------------ | ------------------------------------------ | diff --git a/documentation/vnet-peering-service/README.md b/documentation/vnet-peering-service/README.md index 3138cb808..73e826e94 100644 --- a/documentation/vnet-peering-service/README.md +++ b/documentation/vnet-peering-service/README.md @@ -11,4 +11,4 @@ This folder contains DASH VNET Peering Service design and requirements documents ## Requirements | Document | Description | -| ------------------------------------------------------ | ------------------------------------------ | \ No newline at end of file +| ------------------------------------------------------ | ------------------------------------------ | diff --git a/documentation/vnet2vnet-service/README.md b/documentation/vnet2vnet-service/README.md index ad29b2e94..1f85cd94a 100644 --- a/documentation/vnet2vnet-service/README.md +++ b/documentation/vnet2vnet-service/README.md @@ -12,4 +12,4 @@ This folder contains DASH VNET-to-VNET Service design and requirements documents ## Requirements | Document | Description | -| ------------------------------------------------------ | ------------------------------------------ | \ No newline at end of file +| ------------------------------------------------------ | ------------------------------------------ | diff --git a/documentation/vnet2vnet-service/images/packet-pipeline-processing-per-eni-inbound.svg b/documentation/vnet2vnet-service/images/packet-pipeline-processing-per-eni-inbound.svg index 837115380..bf6155cf4 100644 --- a/documentation/vnet2vnet-service/images/packet-pipeline-processing-per-eni-inbound.svg +++ b/documentation/vnet2vnet-service/images/packet-pipeline-processing-per-eni-inbound.svg @@ -1,4 +1,4 @@ -
VNET1
VNET1
VM1
VM1
VNET2
VNET2
VM2
VM2
Virtual Network
Virtual Network
Inbound
Inbound
Text is not SVG - cannot display
\ No newline at end of file +
VNET1
VNET1
VM1
VM1
VNET2
VNET2
VM2
VM2
Virtual Network
Virtual Network
Inbound
Inbound
Text is not SVG - cannot display
diff --git a/documentation/vnet2vnet-service/images/packet-pipeline-processing-per-eni-outbound.svg b/documentation/vnet2vnet-service/images/packet-pipeline-processing-per-eni-outbound.svg index 10e7a4f17..17d7c9b99 100644 --- a/documentation/vnet2vnet-service/images/packet-pipeline-processing-per-eni-outbound.svg +++ b/documentation/vnet2vnet-service/images/packet-pipeline-processing-per-eni-outbound.svg @@ -1,4 +1,4 @@ -
VNET1
VNET1
VM1
VM1
VNET2
VNET2
VM2
VM2
Virtual Network
Virtual Network
Outbound
Outbound
Text is not SVG - cannot display
\ No newline at end of file +
VNET1
VNET1
VM1
VM1
VNET2
VNET2
VM2
VM2
Virtual Network
Virtual Network
Outbound
Outbound
Text is not SVG - cannot display
diff --git a/documentation/vnet2vnet-service/images/packet-processing-pipeline-tables-example.svg b/documentation/vnet2vnet-service/images/packet-processing-pipeline-tables-example.svg index a8b766374..3076afac8 100644 --- a/documentation/vnet2vnet-service/images/packet-processing-pipeline-tables-example.svg +++ b/documentation/vnet2vnet-service/images/packet-processing-pipeline-tables-example.svg @@ -1,4 +1,4 @@ -
Type
Type
Name
Name
Value
Value
table
table
action
action
action-type
action-type
vnet
vnet
Vnet1
Vnet1
DASH_ROUTE_TABLE
DASH_ROUTE_TABLE
F4939FEFC47E:10.1.0.0/16
F4939FEFC47E:10.1.0.0/16
Type
Type
Name
Name
Value
Value
table
table
routing
routing
routing_type
routing_type
vnet_encap
vnet_encap
ip address
ip address
underlay_ip
underlay_ip
101.1.2.3
101.1.2.3
mac address
mac address
mac_address
mac_address
DASH_VNET_MAPPING_TABLE
DASH_VNET_MAPPING_TA...
Vnet1:10.1.1.1
Vnet1:10.1.1.1
F922839922A2
F922839922A2
Type
Type
Name
Name
Value
Value
routing
routing
vnet
vnet
action
action
action1
action1
action_type
action_type
maprouting
maprouting
DASH_ROUTING_TYPE
DASH_ROUTING_TYPE
Type
Type
Name
Name
Value
Value
table
table
action
action
action-type
action-type
vnet
vnet
Vnet1
Vnet1
DASH_ROUTE_TABLE
DASH_ROUTE_TABLE
F4939FEFC47E:10.1.0.0/16
F4939FEFC47E:10.1.0.0/16
Type
Type
Name
Name
Value
Value
table
table
routing
routing
routing_type
routing_type
vnet_encap
vnet_encap
ip address
ip address
underlay_ip
underlay_ip
101.1.2.3
101.1.2.3
mac address
mac address
mac_address
mac_address
DASH_VNET_MAPPING_TABLE
DASH_VNET_MAPPING_TA...
Vnet1:10.1.1.1
Vnet1:10.1.1.1
F922839922A2
F922839922A2
Type
Type
Name
Name
Value
Value
routing
routing
vnet
vnet
action
action
action1
action1
action_type
action_type
maprouting
maprouting
DASH_ROUTING_TYPE
DASH_ROUTING_TYPE
1
1
2
2
3
3
Text is not SVG - cannot display
\ No newline at end of file +
Type
Type
Name
Name
Value
Value
table
table
action
action
action-type
action-type
vnet
vnet
Vnet1
Vnet1
DASH_ROUTE_TABLE
DASH_ROUTE_TABLE
F4939FEFC47E:10.1.0.0/16
F4939FEFC47E:10.1.0.0/16
Type
Type
Name
Name
Value
Value
table
table
routing
routing
routing_type
routing_type
vnet_encap
vnet_encap
ip address
ip address
underlay_ip
underlay_ip
101.1.2.3
101.1.2.3
mac address
mac address
mac_address
mac_address
DASH_VNET_MAPPING_TABLE
DASH_VNET_MAPPING_TA...
Vnet1:10.1.1.1
Vnet1:10.1.1.1
F922839922A2
F922839922A2
Type
Type
Name
Name
Value
Value
routing
routing
vnet
vnet
action
action
action1
action1
action_type
action_type
maprouting
maprouting
DASH_ROUTING_TYPE
DASH_ROUTING_TYPE
Type
Type
Name
Name
Value
Value
table
table
action
action
action-type
action-type
vnet
vnet
Vnet1
Vnet1
DASH_ROUTE_TABLE
DASH_ROUTE_TABLE
F4939FEFC47E:10.1.0.0/16
F4939FEFC47E:10.1.0.0/16
Type
Type
Name
Name
Value
Value
table
table
routing
routing
routing_type
routing_type
vnet_encap
vnet_encap
ip address
ip address
underlay_ip
underlay_ip
101.1.2.3
101.1.2.3
mac address
mac address
mac_address
mac_address
DASH_VNET_MAPPING_TABLE
DASH_VNET_MAPPING_TA...
Vnet1:10.1.1.1
Vnet1:10.1.1.1
F922839922A2
F922839922A2
Type
Type
Name
Name
Value
Value
routing
routing
vnet
vnet
action
action
action1
action1
action_type
action_type
maprouting
maprouting
DASH_ROUTING_TYPE
DASH_ROUTING_TYPE
1
1
2
2
3
3
Text is not SVG - cannot display
diff --git a/documentation/vnet2vnet-service/images/packet-transforms-vm-to-vm-in-vnet-without-dash.svg b/documentation/vnet2vnet-service/images/packet-transforms-vm-to-vm-in-vnet-without-dash.svg index 46e902a88..bf38e5610 100644 --- a/documentation/vnet2vnet-service/images/packet-transforms-vm-to-vm-in-vnet-without-dash.svg +++ b/documentation/vnet2vnet-service/images/packet-transforms-vm-to-vm-in-vnet-without-dash.svg @@ -1,4 +1,4 @@ -
Src: VM CA1
Src: VM CA1
VNET Layer
VNET Layer
SLB NAT Layer
SLB NAT Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
Dst: VM CA2
Dst: VM CA2
VNET Layer
VNET Layer
SLB NAT Layer
SLB NAT Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
1
1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
10
10
11
11
12
12
13
13
14
14
VFP
VFP
Host
Host
VFP
VFP
Host
Host
9
9

VM to VM
(in VNET)
communication

VM to VM...
VNET uses CA:PA mapping from CDS/RDS to add GRE encap with PA to the packet. 
The GRE paccket will pass through SLB NAT/Decap layers

VNET uses CA:PA mapping fr...
VNET layer decap the
GRE packet

VNET layer decap the...
Src: Mux1
Src: Mux1
Dst:  Mux2
Dst:  Mux2
Encapsulation
Encapsulation
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: PA2:80
Src: PA2:80
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: PA2:80
Src: PA2:80
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: PA2:80
Src: PA2:80
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst:  PA2:80
Dst:  PA2:80
Src:  PA1:57212
Src:  PA1:57212
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst:  PA2:80
Dst:  PA2:80
Src:  PA1:57212
Src:  PA1:57212
Text is not SVG - cannot display
\ No newline at end of file +
Src: VM CA1
Src: VM CA1
VNET Layer
VNET Layer
SLB NAT Layer
SLB NAT Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
Dst: VM CA2
Dst: VM CA2
VNET Layer
VNET Layer
SLB NAT Layer
SLB NAT Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
1
1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
10
10
11
11
12
12
13
13
14
14
VFP
VFP
Host
Host
VFP
VFP
Host
Host
9
9

VM to VM
(in VNET)
communication

VM to VM...
VNET uses CA:PA mapping from CDS/RDS to add GRE encap with PA to the packet. 
The GRE paccket will pass through SLB NAT/Decap layers

VNET uses CA:PA mapping fr...
VNET layer decap the
GRE packet

VNET layer decap the...
Src: Mux1
Src: Mux1
Dst:  Mux2
Dst:  Mux2
Encapsulation
Encapsulation
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: PA2:80
Src: PA2:80
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: PA2:80
Src: PA2:80
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: PA2:80
Src: PA2:80
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst:  PA2:80
Dst:  PA2:80
Src:  PA1:57212
Src:  PA1:57212
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst:  PA2:80
Dst:  PA2:80
Src:  PA1:57212
Src:  PA1:57212
Text is not SVG - cannot display
diff --git a/documentation/vnet2vnet-service/images/routing-packet-10.1.0.1.svg b/documentation/vnet2vnet-service/images/routing-packet-10.1.0.1.svg index bab14b485..6a8cdb24e 100644 --- a/documentation/vnet2vnet-service/images/routing-packet-10.1.0.1.svg +++ b/documentation/vnet2vnet-service/images/routing-packet-10.1.0.1.svg @@ -1,4 +1,4 @@ -
Name
Name
Value
Value
table
table
action
action
action-type
action-type
vnet
vnet
Vnet1
Vnet1
overlay_ip
overlay_ip
10.0.0.6
10.0.0.6
DASH_ROUTE_TABLE
DASH_ROUTE_TABLE
F4939FEFC47E:10.1.0.0/24
F4939FEFC47E:10.1.0.0/24
Name
Name
Value
Value
table
table
routing
routing
routing_type
routing_type
vnet_encap
vnet_encap
ip address
ip address
underlay_ip
underlay_ip
2601:12:7a:1::1234
2601:12:7a:1::1234
mac address
mac address
mac_address
mac_address
F922839922A2
F922839922A2
DASH_VNET_MAPPING_TABLE
DASH_VNET_MAPPING_TA...
Vnet1:10.0.0.6
Vnet1:10.0.0.6
Name
Name
Value
Value
routing
routing
vnet
vnet
action
action
action1
action1
action_type
action_type
maprouting
maprouting
DASH_ROUTING_TYPE
DASH_ROUTING_TYPE
3
3
4
4
3.1
3.1
2
2
5
5
Route
Route
6
6
Perfom LPM on destination address 10.1.0.1
Perfom LPM on de...
Perform encap
Perform encap
Route
Route
DASH_ROUTE_TABLE
DASH_ROUTE_TABLE
DASH_ROUTING_TYPE
DASH_ROUTING_TYPE
DASH_VNET_MAPPING_TABLE
DASH_VNET_MAPPING_TABLE
1
1
Start
Start
Text is not SVG - cannot display
\ No newline at end of file +
Name
Name
Value
Value
table
table
action
action
action-type
action-type
vnet
vnet
Vnet1
Vnet1
overlay_ip
overlay_ip
10.0.0.6
10.0.0.6
DASH_ROUTE_TABLE
DASH_ROUTE_TABLE
F4939FEFC47E:10.1.0.0/24
F4939FEFC47E:10.1.0.0/24
Name
Name
Value
Value
table
table
routing
routing
routing_type
routing_type
vnet_encap
vnet_encap
ip address
ip address
underlay_ip
underlay_ip
2601:12:7a:1::1234
2601:12:7a:1::1234
mac address
mac address
mac_address
mac_address
F922839922A2
F922839922A2
DASH_VNET_MAPPING_TABLE
DASH_VNET_MAPPING_TA...
Vnet1:10.0.0.6
Vnet1:10.0.0.6
Name
Name
Value
Value
routing
routing
vnet
vnet
action
action
action1
action1
action_type
action_type
maprouting
maprouting
DASH_ROUTING_TYPE
DASH_ROUTING_TYPE
3
3
4
4
3.1
3.1
2
2
5
5
Route
Route
6
6
Perfom LPM on destination address 10.1.0.1
Perfom LPM on de...
Perform encap
Perform encap
Route
Route
DASH_ROUTE_TABLE
DASH_ROUTE_TABLE
DASH_ROUTING_TYPE
DASH_ROUTING_TYPE
DASH_VNET_MAPPING_TABLE
DASH_VNET_MAPPING_TABLE
1
1
Start
Start
Text is not SVG - cannot display
diff --git a/documentation/vnet2vnet-service/images/routing-packet-10.1.1.1.svg b/documentation/vnet2vnet-service/images/routing-packet-10.1.1.1.svg index 3563c1afd..ae376a58f 100644 --- a/documentation/vnet2vnet-service/images/routing-packet-10.1.1.1.svg +++ b/documentation/vnet2vnet-service/images/routing-packet-10.1.1.1.svg @@ -1,4 +1,4 @@ -
Name
Name
Value
Value
table
table
action
action
action-type
action-type
vnet
vnet
Vnet1
Vnet1
DASH_ROUTE_TABLE
DASH_ROUTE_TABLE
F4939FEFC47E:10.1.0.0/16
F4939FEFC47E:10.1.0.0/16
Name
Name
Value
Value
table
table
routing
routing
routing_type
routing_type
vnet_encap
vnet_encap
ip address
ip address
underlay_ip
underlay_ip
101.1.2.3
101.1.2.3
mac address
mac address
mac_address
mac_address
F922839922A2
F922839922A2
DASH_VNET_MAPPING_TABLE
DASH_VNET_MAPPING_TA...
Vnet1:10.1.1.1
Vnet1:10.1.1.1
Name
Name
Value
Value
routing
routing
vnet
vnet
action
action
action1
action1
action_type
action_type
maprouting
maprouting
DASH_ROUTING_TYPE
DASH_ROUTING_TYPE
3
3
4
4
3.1
3.1
2
2
5
5
Route
Route
6
6
Perfom LPM on destination address 10.1.1.1
Perfom LPM on de...
Perform encap
Perform encap
Route
Route
DASH_ROUTE_TABLE
DASH_ROUTE_TABLE
DASH_ROUTING_TYPE
DASH_ROUTING_TYPE
DASH_VNET_MAPPING_TABLE
DASH_VNET_MAPPING_TABLE
1
1
Start
Start
Text is not SVG - cannot display
\ No newline at end of file +
Name
Name
Value
Value
table
table
action
action
action-type
action-type
vnet
vnet
Vnet1
Vnet1
DASH_ROUTE_TABLE
DASH_ROUTE_TABLE
F4939FEFC47E:10.1.0.0/16
F4939FEFC47E:10.1.0.0/16
Name
Name
Value
Value
table
table
routing
routing
routing_type
routing_type
vnet_encap
vnet_encap
ip address
ip address
underlay_ip
underlay_ip
101.1.2.3
101.1.2.3
mac address
mac address
mac_address
mac_address
F922839922A2
F922839922A2
DASH_VNET_MAPPING_TABLE
DASH_VNET_MAPPING_TA...
Vnet1:10.1.1.1
Vnet1:10.1.1.1
Name
Name
Value
Value
routing
routing
vnet
vnet
action
action
action1
action1
action_type
action_type
maprouting
maprouting
DASH_ROUTING_TYPE
DASH_ROUTING_TYPE
3
3
4
4
3.1
3.1
2
2
5
5
Route
Route
6
6
Perfom LPM on destination address 10.1.1.1
Perfom LPM on de...
Perform encap
Perform encap
Route
Route
DASH_ROUTE_TABLE
DASH_ROUTE_TABLE
DASH_ROUTING_TYPE
DASH_ROUTING_TYPE
DASH_VNET_MAPPING_TABLE
DASH_VNET_MAPPING_TABLE
1
1
Start
Start
Text is not SVG - cannot display
diff --git a/documentation/vnet2vnet-service/images/routing-packet-10.2.5.1.svg b/documentation/vnet2vnet-service/images/routing-packet-10.2.5.1.svg index ab6197cf1..e729a92e1 100644 --- a/documentation/vnet2vnet-service/images/routing-packet-10.2.5.1.svg +++ b/documentation/vnet2vnet-service/images/routing-packet-10.2.5.1.svg @@ -1,4 +1,4 @@ -
Name
Name
Value
Value
table
table
action
action
action-type
action-type
drop
drop
DASH_ROUTE_TABLE
DASH_ROUTE_TABLE
F4939FEFC47E:10.2.5.1/16
F4939FEFC47E:10.2.5.1/16
3
3
1
1
Perfom LPM on destination address 10.2.5.1
Perfom LPM on de...
Drop
Drop
DASH_ROUTE_TABLE
DASH_ROUTE_TABLE
Start
Start
2
2
Text is not SVG - cannot display
\ No newline at end of file +
Name
Name
Value
Value
table
table
action
action
action-type
action-type
drop
drop
DASH_ROUTE_TABLE
DASH_ROUTE_TABLE
F4939FEFC47E:10.2.5.1/16
F4939FEFC47E:10.2.5.1/16
3
3
1
1
Perfom LPM on destination address 10.2.5.1
Perfom LPM on de...
Drop
Drop
DASH_ROUTE_TABLE
DASH_ROUTE_TABLE
Start
Start
2
2
Text is not SVG - cannot display
diff --git a/documentation/vnet2vnet-service/images/routing-packet-30.0.0.1.svg b/documentation/vnet2vnet-service/images/routing-packet-30.0.0.1.svg index d8c07cf92..625d6c863 100644 --- a/documentation/vnet2vnet-service/images/routing-packet-30.0.0.1.svg +++ b/documentation/vnet2vnet-service/images/routing-packet-30.0.0.1.svg @@ -1,4 +1,4 @@ -
Name
Name
Value
Value
table
table
action
action
action-type
action-type
direct
direct
DASH_ROUTE_TABLE
DASH_ROUTE_TABLE
F4939FEFC47E:30.0.0.0/16
F4939FEFC47E:30.0.0.0/16
3
3
1
1
Perfom LPM on destination address 30.0.0.1
Perfom LPM on de...
Route
Route
DASH_ROUTE_TABLE
DASH_ROUTE_TABLE
Start
Start
2
2
Text is not SVG - cannot display
\ No newline at end of file +
Name
Name
Value
Value
table
table
action
action
action-type
action-type
direct
direct
DASH_ROUTE_TABLE
DASH_ROUTE_TABLE
F4939FEFC47E:30.0.0.0/16
F4939FEFC47E:30.0.0.0/16
3
3
1
1
Perfom LPM on destination address 30.0.0.1
Perfom LPM on de...
Route
Route
DASH_ROUTE_TABLE
DASH_ROUTE_TABLE
Start
Start
2
2
Text is not SVG - cannot display
diff --git a/documentation/vnet2vnet-service/images/vm-to-vm-communication-vnet.svg b/documentation/vnet2vnet-service/images/vm-to-vm-communication-vnet.svg index 7f54a5553..b533b4d29 100644 --- a/documentation/vnet2vnet-service/images/vm-to-vm-communication-vnet.svg +++ b/documentation/vnet2vnet-service/images/vm-to-vm-communication-vnet.svg @@ -1,4 +1,4 @@ -
VNET1
VNET1
VM1
VM1
VNET2
VNET2
VM2
VM2
Tunnel
Tunnel
Tunnel
Tunnel
Tunnel
Tunnel
Tunnel
Tunnel
Appliance
Appliance
SmartNIC
Smart...
Text is not SVG - cannot display
\ No newline at end of file +
VNET1
VNET1
VM1
VM1
VNET2
VNET2
VM2
VM2
Tunnel
Tunnel
Tunnel
Tunnel
Tunnel
Tunnel
Tunnel
Tunnel
Appliance
Appliance
SmartNIC
Smart...
Text is not SVG - cannot display
diff --git a/images/github-project-workflow.svg b/images/github-project-workflow.svg index 4f3a19804..7dfbde4a7 100644 --- a/images/github-project-workflow.svg +++ b/images/github-project-workflow.svg @@ -1,4 +1,4 @@ -Project items list DASH P4 BM: Model ComparisonIsuue nWork Items (Issues)DASH P4 BM: Model ComparisonItem 2Other Work Items (Issues)Item 1Item 2Pull RequestsPR 1PR 2
Link
Link
Link
Link
Link
Link
Project  to track status, assiungees, etc.. 
Project  to track status, assiungees, etc...
Actual work items 
Actual work items 
Actual sub-work items 
Actual sub-work items 
Actual work  
Actual work  
This is where the project entry is described and assignees are listed
This is where the project entry...
Just a link to the issue
Just a link to the issue
Text is not SVG - cannot display
\ No newline at end of file +Project items list DASH P4 BM: Model ComparisonIsuue nWork Items (Issues)DASH P4 BM: Model ComparisonItem 2Other Work Items (Issues)Item 1Item 2Pull RequestsPR 1PR 2
Link
Link
Link
Link
Link
Link
Project  to track status, assiungees, etc.. 
Project  to track status, assiungees, etc...
Actual work items 
Actual work items 
Actual sub-work items 
Actual sub-work items 
Actual work  
Actual work  
This is where the project entry is described and assignees are listed
This is where the project entry...
Just a link to the issue
Just a link to the issue
Text is not SVG - cannot display
diff --git a/images/sdn-packet-transforms-vm-to-vm.svg b/images/sdn-packet-transforms-vm-to-vm.svg index b39980c02..edfe2ec28 100644 --- a/images/sdn-packet-transforms-vm-to-vm.svg +++ b/images/sdn-packet-transforms-vm-to-vm.svg @@ -1,4 +1,4 @@ -
Src: VM CA1
Src: VM CA1
VNET Layer
VNET Layer
SLB NAT Layer
SLB NAT Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
Dst: VM CA2
Dst: VM CA2
VNET Layer
VNET Layer
SLB NAT Layer
SLB NAT Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
1
1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
10
10
11
11
12
12
13
13
14
14
VFP
VFP
Host
Host
VFP
VFP
Host
Host
9
9

VM to VM
(in VNET)
communication

VM to VM...
VNET uses CA:PA mapping from CDS/RDS to add GRE encap with PA to the packet. 
The GRE paccket will pass through SLB NAT/Decap layers

VNET uses CA:PA mapping fr...
VNET layer decap the
GRE packet

VNET layer decap the...
Src: Mux1
Src: Mux1
Dst:  Mux2
Dst:  Mux2
Encapsulation
Encapsulation
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: PA2:80
Src: PA2:80
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: PA2:80
Src: PA2:80
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
Dst: Appliance:80
Dst: Applianc...
Src: CA1:57212
Src: CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: PA2:80
Src: PA2:80
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst:  PA2:80
Dst:  PA2:80
Src:  PA1:57212
Src:  PA1:57212
Dst: Appliance:80
Dst: Applianc...
Src: CA1:57212
Src: CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst:  PA Appliance:80
Dst:  PA Appliance...
Src:  PA1:57212
Src:  PA1:57212
VXLAN
VXLAN
1
1
Src VM CA 1 initiates connection to Dst VM CA 2
Src VM CA 1 initiates connection to Dst VM CA 2
Matched Route
Matched Route
Transform
Transform
Route Type
Route Type
2
2
SMAC1 -> DMAC_FAKE
SMAC1 -> DMAC_FAKE
DMAC_FAKE is a hard coded MAC address to satisfy the TCP/IP stack of Windows/Linux.  Upon packet construction we construct the packet which needs a MAC address.  This will be overridden later.
DMAC_FAKE is a hard coded MAC address to satisfy the TCP/...
3
3
Outer Evaluation
Outer Evaluation
Outer Evaluation
Outer Evaluation
4
4
SRC: Physical IP of host
DST:  Physical IP of SDN appliance
SRC: Physical IP of host...
SRC:  SDN Appliance IP
DST:  100.0.0.2 from CA to PA mapping table lookup
SRC:  SDN Appliance IP...
5
5
Encapsulation:  VXLAN
Encapsulation:  VXLAN
Encapsulation:  VXLAN
Encapsulation:  VXLAN
6
6
VNI Custom
VNI Custom
VNI:  10001
VNI:  10001
7
7
Inner MAC: 
Inner MAC: 
Inner MAC:
Inner MAC:
8
8
SRC:  SMAC1 DST - DMAC_FAKE
SRC:  SMAC1 DST - DMAC_FAKE
SRC-SMAC1   DST E4-A7-A0-99-0E-18
SRC-SMAC1   DST E4-A7-A0-99-0E-18
9
9
Inner IP:  10.0.0.1 -> 10.0.0.2
Inner IP:  10.0.0.1 -> 10.0.0.2
Route ID = 1
Route ID = 1
Inner IP:  10.00.1 -> 10.0.0.2
Inner IP:  10.00.1 -> 10.0.0.2
Encap_with_lookup_V4_underlay
Encap_with_lookup_V4_underlay
Text is not SVG - cannot display
\ No newline at end of file +
Src: VM CA1
Src: VM CA1
VNET Layer
VNET Layer
SLB NAT Layer
SLB NAT Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
Dst: VM CA2
Dst: VM CA2
VNET Layer
VNET Layer
SLB NAT Layer
SLB NAT Layer
SLB Decap/Fastpath Layer
SLB Decap/Fastpath Layer
1
1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
10
10
11
11
12
12
13
13
14
14
VFP
VFP
Host
Host
VFP
VFP
Host
Host
9
9

VM to VM
(in VNET)
communication

VM to VM...
VNET uses CA:PA mapping from CDS/RDS to add GRE encap with PA to the packet. 
The GRE paccket will pass through SLB NAT/Decap layers

VNET uses CA:PA mapping fr...
VNET layer decap the
GRE packet

VNET layer decap the...
Src: Mux1
Src: Mux1
Dst:  Mux2
Dst:  Mux2
Encapsulation
Encapsulation
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: PA2:80
Src: PA2:80
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: PA2:80
Src: PA2:80
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
Dst: Appliance:80
Dst: Applianc...
Src: CA1:57212
Src: CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst: PA1:57212
Dst: PA1:57212
Src: PA2:80
Src: PA2:80
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
Src CA2:80
Src CA2:80
Dst  CA1:57212
Dst  CA1:57212
TCP
TCP
Dst: CA2:80
Dst: CA2:80
Src: CA1:57212
Src: CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst:  PA2:80
Dst:  PA2:80
Src:  PA1:57212
Src:  PA1:57212
Dst: Appliance:80
Dst: Applianc...
Src: CA1:57212
Src: CA1:57212
TCP
TCP
GRE Header
GRE Header
47 (GRE)
47 (GRE)
Dst:  PA Appliance:80
Dst:  PA Appliance...
Src:  PA1:57212
Src:  PA1:57212
VXLAN
VXLAN
1
1
Src VM CA 1 initiates connection to Dst VM CA 2
Src VM CA 1 initiates connection to Dst VM CA 2
Matched Route
Matched Route
Transform
Transform
Route Type
Route Type
2
2
SMAC1 -> DMAC_FAKE
SMAC1 -> DMAC_FAKE
DMAC_FAKE is a hard coded MAC address to satisfy the TCP/IP stack of Windows/Linux.  Upon packet construction we construct the packet which needs a MAC address.  This will be overridden later.
DMAC_FAKE is a hard coded MAC address to satisfy the TCP/...
3
3
Outer Evaluation
Outer Evaluation
Outer Evaluation
Outer Evaluation
4
4
SRC: Physical IP of host
DST:  Physical IP of SDN appliance
SRC: Physical IP of host...
SRC:  SDN Appliance IP
DST:  100.0.0.2 from CA to PA mapping table lookup
SRC:  SDN Appliance IP...
5
5
Encapsulation:  VXLAN
Encapsulation:  VXLAN
Encapsulation:  VXLAN
Encapsulation:  VXLAN
6
6
VNI Custom
VNI Custom
VNI:  10001
VNI:  10001
7
7
Inner MAC: 
Inner MAC: 
Inner MAC:
Inner MAC:
8
8
SRC:  SMAC1 DST - DMAC_FAKE
SRC:  SMAC1 DST - DMAC_FAKE
SRC-SMAC1   DST E4-A7-A0-99-0E-18
SRC-SMAC1   DST E4-A7-A0-99-0E-18
9
9
Inner IP:  10.0.0.1 -> 10.0.0.2
Inner IP:  10.0.0.1 -> 10.0.0.2
Route ID = 1
Route ID = 1
Inner IP:  10.00.1 -> 10.0.0.2
Inner IP:  10.00.1 -> 10.0.0.2
Encap_with_lookup_V4_underlay
Encap_with_lookup_V4_underlay
Text is not SVG - cannot display
diff --git a/test/.gitignore b/test/.gitignore index b6f656ebe..766836180 100644 --- a/test/.gitignore +++ b/test/.gitignore @@ -1,2 +1,2 @@ **/__pycache__ -**/*.pyc \ No newline at end of file +**/*.pyc diff --git a/test/docs/README.md b/test/docs/README.md index 50148dd26..76f9bdfdb 100644 --- a/test/docs/README.md +++ b/test/docs/README.md @@ -16,4 +16,4 @@ | [SAI Challenger Test Workflows](dash-test-sai-challenger.md) | How to run scalable tests using SAI-Challenger and snappi. | | [Testbed](testbed/README.md) | Describes the setup and configuration of a DASH testbed.| | [snappi and SAI-Challenger based tests](dash-test-sai-challenger.md) | How to run scalable tests using SAI-Challenger and snappi. The scalability is achieved with additional DASH/SAI abstraction level in test code to simplify high scale DUT configuration. | -| [Test Plans](testplans/README.md) | Home of DASH features test plans including test plan template | \ No newline at end of file +| [Test Plans](testplans/README.md) | Home of DASH features test plans including test plan template | diff --git a/test/docs/dash-ptf-testbed.md b/test/docs/dash-ptf-testbed.md index edc2fd844..439dfc91c 100644 --- a/test/docs/dash-ptf-testbed.md +++ b/test/docs/dash-ptf-testbed.md @@ -1,2 +1,2 @@ # DASH Testbed using PTF (Packet Test Framework) -TODO \ No newline at end of file +TODO diff --git a/test/docs/dash-test-sai-challenger.md b/test/docs/dash-test-sai-challenger.md index 875524b9a..f2a017de3 100644 --- a/test/docs/dash-test-sai-challenger.md +++ b/test/docs/dash-test-sai-challenger.md @@ -91,4 +91,4 @@ Or in SAI configuration format: pytest -sv --setup=sai_dpu_client_server_snappi.json test_vnet_inbound.py pytest -sv --setup=sai_dpu_client_server_snappi.json test_vnet_outbound.py ``` ->**NOTE:** Feel free to use other Pytest flags. In particular, `-k ` and `-m ` can select tests based on a string pattern expression to filter by test-case name or `@pytest.mark` annotations, respectively. Refer to [Pytest documentation](https://docs.pytest.org/en/7.2.x/contents.html) for more info. Use `pytest -h` for help. \ No newline at end of file +>**NOTE:** Feel free to use other Pytest flags. In particular, `-k ` and `-m ` can select tests based on a string pattern expression to filter by test-case name or `@pytest.mark` annotations, respectively. Refer to [Pytest documentation](https://docs.pytest.org/en/7.2.x/contents.html) for more info. Use `pytest -h` for help. diff --git a/test/docs/images/vnet2vnet_outbound_traffic_scaling.svg b/test/docs/images/vnet2vnet_outbound_traffic_scaling.svg index 0d418a221..2e8f35ea5 100644 --- a/test/docs/images/vnet2vnet_outbound_traffic_scaling.svg +++ b/test/docs/images/vnet2vnet_outbound_traffic_scaling.svg @@ -1,4 +1,4 @@ -
VIP #1
VIP #1
ENI #1
ENI #1
ENI MAC MAP #1
ENI MAC MAP #1
ENI #2
ENI #2
ENI MAC MAP #2
ENI MAC MAP #2
DIRECTION LOOKUP #1
DIRECTION LOOKUP #1
OUTBOUND ROUTING #1
OUTBOUND ROUTING #1
OUTBOUND ROUTING #2
OUTBOUND ROUTING #2
OUTBOUND ROUTING #3
OUTBOUND ROUTING #3
OUTBOUND ROUTING #4
OUTBOUND ROUTING #4
CA TO PA #1
CA TO PA #1
CA TO PA #2
CA TO PA #2
CA TO PA #3
CA TO PA #3
CA TO PA #4
CA TO PA #4
DIRECTION LOOKUP #2
DIRECTION LOOKUP #2
VNET #X
VNET #X
VNET #X
VNET #X
VNET #X
VNET #X
VNET #Y
VNET #Y
VNET #X
VNET #X
VNET #X
VNET #X
CA TO PA #5
CA TO PA #5
CA TO PA #6
CA TO PA #6
CA TO PA #7
CA TO PA #7
CA TO PA #8
CA TO PA #8
Text is not SVG - cannot display
\ No newline at end of file +
VIP #1
VIP #1
ENI #1
ENI #1
ENI MAC MAP #1
ENI MAC MAP #1
ENI #2
ENI #2
ENI MAC MAP #2
ENI MAC MAP #2
DIRECTION LOOKUP #1
DIRECTION LOOKUP #1
OUTBOUND ROUTING #1
OUTBOUND ROUTING #1
OUTBOUND ROUTING #2
OUTBOUND ROUTING #2
OUTBOUND ROUTING #3
OUTBOUND ROUTING #3
OUTBOUND ROUTING #4
OUTBOUND ROUTING #4
CA TO PA #1
CA TO PA #1
CA TO PA #2
CA TO PA #2
CA TO PA #3
CA TO PA #3
CA TO PA #4
CA TO PA #4
DIRECTION LOOKUP #2
DIRECTION LOOKUP #2
VNET #X
VNET #X
VNET #X
VNET #X
VNET #X
VNET #X
VNET #Y
VNET #Y
VNET #X
VNET #X
VNET #X
VNET #X
CA TO PA #5
CA TO PA #5
CA TO PA #6
CA TO PA #6
CA TO PA #7
CA TO PA #7
CA TO PA #8
CA TO PA #8
Text is not SVG - cannot display
diff --git a/test/images/dash-gnmi-api.svg b/test/images/dash-gnmi-api.svg index aea548428..ee12dd9f7 100644 --- a/test/images/dash-gnmi-api.svg +++ b/test/images/dash-gnmi-api.svg @@ -1,4 +1,4 @@ -
gNMI Server
gNMI Server
Test Controller
Test Controller
gNMI API
gNMI A...
Test Traffic  Generator/Receiver ("TGen")
Test Traffic...
e.g. IXIA
e.g. I...
Traffic
Traffic
DUT
DUT
Viewer does not support full SVG 1.1
\ No newline at end of file +
gNMI Server
gNMI Server
Test Controller
Test Controller
gNMI API
gNMI A...
Test Traffic  Generator/Receiver ("TGen")
Test Traffic...
e.g. IXIA
e.g. I...
Traffic
Traffic
DUT
DUT
Viewer does not support full SVG 1.1
diff --git a/test/images/dash-sai-challenger.svg b/test/images/dash-sai-challenger.svg index c5d6553df..1efcfd6c6 100644 --- a/test/images/dash-sai-challenger.svg +++ b/test/images/dash-sai-challenger.svg @@ -1,4 +1,4 @@ -
SAI Challenger
SAI Challenger
Test Controller
Test Controller
sai-redis
sai-redis
NOT USED - For Reference Only
NOT USED - For Reference Only
Test Traffic  Generator/Receiver ("TGen")
Test Traffic...
e.g. IXIA
e.g. I...
DUT
DUT
Traffic
Traffic
ASIC-DB
ASIC-DB
Viewer does not support full SVG 1.1
\ No newline at end of file +
SAI Challenger
SAI Challenger
Test Controller
Test Controller
sai-redis
sai-redis
NOT USED - For Reference Only
NOT USED - For Reference Only
Test Traffic  Generator/Receiver ("TGen")
Test Traffic...
e.g. IXIA
e.g. I...
DUT
DUT
Traffic
Traffic
ASIC-DB
ASIC-DB
Viewer does not support full SVG 1.1
diff --git a/test/images/dash-saichallenger-enhanced.svg b/test/images/dash-saichallenger-enhanced.svg index 60aabac9f..1a010f283 100644 --- a/test/images/dash-saichallenger-enhanced.svg +++ b/test/images/dash-saichallenger-enhanced.svg @@ -1,4 +1,4 @@ -
API wrapper
API wrapper
file
file
literal SAI records in the test-case code
literal SAI rec...
stored SAI records
stored SAI...
file read
file read
saithrift driver
saithrift dr...
sairedis driver
sairedis dri...
gNMI driver (future?)
gNMI driver...
DUT API
DUT API
snappi supports a HW or SW Traffic Generator, e.g. ixia-c container for virtual or NIC-based tests; or HW chassis for line-rate tests. Supports powerful, flow-based constructs (header patterns/counters, etc.).
snappi supports a HW or SW Traffi...
Possible
sources of data-driven config
Possible...
dataplane wrapper
dataplane wr...
Scapy is a software-based packet generator/capture library, limited scale, not flow-based.
Scapy is a software-based pack...
custom generator
custom gene...
streaming SAI records
streaming...
input params
input params
dpugen
dpugen
generator
generator
generate
generate
SAI Challenger Framework
SAI Challenger Framework
module import
module import
Hand-coded or from generator
Hand-coded or...
OR
OR
traffic
traffic
HW/SW Traffic Generator
HW/SW Traf...
Packet Gen Cmds
Packet Gen Cmds
Choice of SW/HW traffic generators
Choice of SW/HW traffic generators
Optional way to generate DASH configs, especially high-scale.
Optional way to generate DASH con...
DUT (Device under test)
HW  or SW (bmv2, etc.)
DUT (Device under test...
same logic can be used for different data inputs, yielding many test-cases
(e.g. "Test ACL rules" for various config files)
same logic can be...
Custom driver
Custom driver
Record Parser
Record Parser
https://pypi.org/project/dpugen/
pip install dpugen
https://pypi.org/project/dpugen/...
?
?
X
X
{...}
{...}
Test Logic
Test Log...
optional - traditional DUT config API calls, e.g. sai-thrift
optional - tra...
sai-thrift
sai-redis
etc.
sai-thrift...
Test Fixture setup files
Test Fixture se...
specify DUT topology, dataplane (PTF/snappi), DUT API (sai-thrift, sai-redis) etc.
specify DUT topology, dataplane (PTF/snappi)...
SAI records are
Application- and NOS-agnostic - not tied to DASH or even SONiC
SAI records are...
PyTest test-case
PyTest test-case
Text is not SVG - cannot display
\ No newline at end of file +
API wrapper
API wrapper
file
file
literal SAI records in the test-case code
literal SAI rec...
stored SAI records
stored SAI...
file read
file read
saithrift driver
saithrift dr...
sairedis driver
sairedis dri...
gNMI driver (future?)
gNMI driver...
DUT API
DUT API
snappi supports a HW or SW Traffic Generator, e.g. ixia-c container for virtual or NIC-based tests; or HW chassis for line-rate tests. Supports powerful, flow-based constructs (header patterns/counters, etc.).
snappi supports a HW or SW Traffi...
Possible
sources of data-driven config
Possible...
dataplane wrapper
dataplane wr...
Scapy is a software-based packet generator/capture library, limited scale, not flow-based.
Scapy is a software-based pack...
custom generator
custom gene...
streaming SAI records
streaming...
input params
input params
dpugen
dpugen
generator
generator
generate
generate
SAI Challenger Framework
SAI Challenger Framework
module import
module import
Hand-coded or from generator
Hand-coded or...
OR
OR
traffic
traffic
HW/SW Traffic Generator
HW/SW Traf...
Packet Gen Cmds
Packet Gen Cmds
Choice of SW/HW traffic generators
Choice of SW/HW traffic generators
Optional way to generate DASH configs, especially high-scale.
Optional way to generate DASH con...
DUT (Device under test)
HW  or SW (bmv2, etc.)
DUT (Device under test...
same logic can be used for different data inputs, yielding many test-cases
(e.g. "Test ACL rules" for various config files)
same logic can be...
Custom driver
Custom driver
Record Parser
Record Parser
https://pypi.org/project/dpugen/
pip install dpugen
https://pypi.org/project/dpugen/...
?
?
X
X
{...}
{...}
Test Logic
Test Log...
optional - traditional DUT config API calls, e.g. sai-thrift
optional - tra...
sai-thrift
sai-redis
etc.
sai-thrift...
Test Fixture setup files
Test Fixture se...
specify DUT topology, dataplane (PTF/snappi), DUT API (sai-thrift, sai-redis) etc.
specify DUT topology, dataplane (PTF/snappi)...
SAI records are
Application- and NOS-agnostic - not tied to DASH or even SONiC
SAI records are...
PyTest test-case
PyTest test-case
Text is not SVG - cannot display
diff --git a/test/images/dash-test-wflow-p4-saithrift.svg b/test/images/dash-test-wflow-p4-saithrift.svg index 3df9196ee..e232a9230 100644 --- a/test/images/dash-test-wflow-p4-saithrift.svg +++ b/test/images/dash-test-wflow-p4-saithrift.svg @@ -1,4 +1,4 @@ -
TDI (Table-Driven Interface)
TDI (Table-Driven In...
Optional (not required
by DASH project)
May be used to verify P4 code
Optional (not required...
Traffic veths
Traffic veths
P4-DPDK
PNA arch
P4-DPDK...
Bmv2+
V1+ Arch
Bmv2+...
P4RT
server
P4RT...
SAI-P4RT
Adaptor/
P4RT Client
SAI-P4RT...
Intel WIP
P4-DPDK with native
PNA arch support
Intel WIP...
Community WIP
bmv2 modified for V1 model with added stateful tracking.
Long-term: PNA compliant?
Community WIP...
dash-pipeline P4
V1 Architecture
dash-pipeline P4...
Traffic veths
Traffic veths
dash-pipeline P4
PNA Architecture
dash-pipeline P4...
Traffic generator commands
Traffic generator commands
PTF or PyTest
SAI-thrift test scripts
PTF or PyTest...
Scripts scalable to line-rate using snappi and HW packet generators
Scripts scalable to line-...
saithrift commands
saithrift commands
saithrift commands
saithrift commands
P4RT commands
P4RT commands
P4RT commands
P4RT commands
P4RT 
test scripts
P4RT...
P4RT
commands
(socket)
P4RT...
P4RT
server
P4RT...
saithrift
server
saithrift...
libsai
libsai
saithrift
server
saithrift...
libsai
libsai
P4RT and saithrift are alternate & parallel RPCs. TDI is the native interface.
P4RT and saithrift are...
P4RT and saithrift are alternate RPCs, P4RT is the native interface and saithrift is translated into P4RT
P4RT and saithrift are alt...
GitHub Actions
(CI/CD)
GitHub Actions...

Upon commit:
Any dependency change triggers a build & test.
Upon commit:Any dependen...
SW traffic 
generators
SW traffic...
+ Ixia-c
+ Ixia-c
Scapy
Scapy
OR
OR
Text is not SVG - cannot display
\ No newline at end of file +
TDI (Table-Driven Interface)
TDI (Table-Driven In...
Optional (not required
by DASH project)
May be used to verify P4 code
Optional (not required...
Traffic veths
Traffic veths
P4-DPDK
PNA arch
P4-DPDK...
Bmv2+
V1+ Arch
Bmv2+...
P4RT
server
P4RT...
SAI-P4RT
Adaptor/
P4RT Client
SAI-P4RT...
Intel WIP
P4-DPDK with native
PNA arch support
Intel WIP...
Community WIP
bmv2 modified for V1 model with added stateful tracking.
Long-term: PNA compliant?
Community WIP...
dash-pipeline P4
V1 Architecture
dash-pipeline P4...
Traffic veths
Traffic veths
dash-pipeline P4
PNA Architecture
dash-pipeline P4...
Traffic generator commands
Traffic generator commands
PTF or PyTest
SAI-thrift test scripts
PTF or PyTest...
Scripts scalable to line-rate using snappi and HW packet generators
Scripts scalable to line-...
saithrift commands
saithrift commands
saithrift commands
saithrift commands
P4RT commands
P4RT commands
P4RT commands
P4RT commands
P4RT 
test scripts
P4RT...
P4RT
commands
(socket)
P4RT...
P4RT
server
P4RT...
saithrift
server
saithrift...
libsai
libsai
saithrift
server
saithrift...
libsai
libsai
P4RT and saithrift are alternate & parallel RPCs. TDI is the native interface.
P4RT and saithrift are...
P4RT and saithrift are alternate RPCs, P4RT is the native interface and saithrift is translated into P4RT
P4RT and saithrift are alt...
GitHub Actions
(CI/CD)
GitHub Actions...

Upon commit:
Any dependency change triggers a build & test.
Upon commit:Any dependen...
SW traffic 
generators
SW traffic...
+ Ixia-c
+ Ixia-c
Scapy
Scapy
OR
OR
Text is not SVG - cannot display
diff --git a/test/images/dash-test-wflow-saithrift.svg b/test/images/dash-test-wflow-saithrift.svg index d22116d96..a6abd6388 100644 --- a/test/images/dash-test-wflow-saithrift.svg +++ b/test/images/dash-test-wflow-saithrift.svg @@ -1,4 +1,4 @@ -
Reusable for multiple northbound/southbound APIs
Reusable for multiple northbo...
Saithrift commands
Saithrift commands
Traffic generator commands (Scapy, snappi)
Traffic generator commands (Scapy, snappi)
HW/SW traffic 
generator
HW/SW traffic...
Automated and
repeatable traffic
tests
Automated and...
Hand-written and/or
templated test cases
Abstract format
Hand-written and/or...
dash-pipeline P4
behavioral model 
(source of truth)
dash-pipeline P4...
Standard OCP SAI
header files subset
(underlay)
Standard OCP SAI...
DASH SAI
header files
(overrlay)
DASH SAI...
Inputs
Inputs
Generate
Generate
Saithrift code
generator
Saithrift code...


Automatic saithrift client and server code generator


Automatic saithrift cli...
Traffic cables
Traffic cables
Import libs
Import libs
Thrift server
skeleton C++ code
Thrift server...
Target libsai
Target libsai
Inputs
Inputs
Build image
Build image
DUT image
DUT image
Generate
Generate
Python client 
+ helpers 
Python client...
DUT Software
Target
DUT Software...
dash/test
dash/test
opencompute/SAI
opencompute/SAI
Compile P4 Target
Compile P4 Target
Traffic veths
Traffic veths
Test scripts
PTF, PyTest
Test scripts...
SW Dev
SW Dev
DASH 
CI/CD Pipeline
DASH...
Manually triggered test
Manually triggered te...
Commit-triggered test
Commit-triggered test
DASH/dash--pipeline
DASH/dash--pipeline
Device Under test (DUT) config
Device Under test...
P4 Info
P4 Info
Generate SAI headers
Generate SAI headers
DUT Hardware
Target
DUT Hardware...
Git
Git
Git
Git
Git
Git
Git
Git
p4c
p4c
Text is not SVG - cannot display
\ No newline at end of file +
Reusable for multiple northbound/southbound APIs
Reusable for multiple northbo...
Saithrift commands
Saithrift commands
Traffic generator commands (Scapy, snappi)
Traffic generator commands (Scapy, snappi)
HW/SW traffic 
generator
HW/SW traffic...
Automated and
repeatable traffic
tests
Automated and...
Hand-written and/or
templated test cases
Abstract format
Hand-written and/or...
dash-pipeline P4
behavioral model 
(source of truth)
dash-pipeline P4...
Standard OCP SAI
header files subset
(underlay)
Standard OCP SAI...
DASH SAI
header files
(overrlay)
DASH SAI...
Inputs
Inputs
Generate
Generate
Saithrift code
generator
Saithrift code...


Automatic saithrift client and server code generator


Automatic saithrift cli...
Traffic cables
Traffic cables
Import libs
Import libs
Thrift server
skeleton C++ code
Thrift server...
Target libsai
Target libsai
Inputs
Inputs
Build image
Build image
DUT image
DUT image
Generate
Generate
Python client 
+ helpers 
Python client...
DUT Software
Target
DUT Software...
dash/test
dash/test
opencompute/SAI
opencompute/SAI
Compile P4 Target
Compile P4 Target
Traffic veths
Traffic veths
Test scripts
PTF, PyTest
Test scripts...
SW Dev
SW Dev
DASH 
CI/CD Pipeline
DASH...
Manually triggered test
Manually triggered te...
Commit-triggered test
Commit-triggered test
DASH/dash--pipeline
DASH/dash--pipeline
Device Under test (DUT) config
Device Under test...
P4 Info
P4 Info
Generate SAI headers
Generate SAI headers
DUT Hardware
Target
DUT Hardware...
Git
Git
Git
Git
Git
Git
Git
Git
p4c
p4c
Text is not SVG - cannot display
diff --git a/test/images/dash-testbed-inband-via-switch.svg b/test/images/dash-testbed-inband-via-switch.svg index f638d1b05..b1554697e 100644 --- a/test/images/dash-testbed-inband-via-switch.svg +++ b/test/images/dash-testbed-inband-via-switch.svg @@ -1,4 +1,4 @@ -
Inband API access via Switch
Inband API access via Switch
Test System Controller
("Controller")
Test Syste...
Device Under Test ("DUT")
Device Under...
Traffic Interface
Cabling
Traffic Inter...
TrafficGen Control Interface
TrafficGen Control Interfa...
API endpoint(s)
API en...
Traffic Interfaces
("Ports")
Traffic Int...
DUT Host/
Chassis/Fixture
DUT Hos...
Test Traffic  Generator/Receiver ("TGen")
Test Traffic  Gener...
e.g. IXIA
e.g. I...
Inband API path over traffic port
Inband API...
DUT API  "Channel"
DUT API  "Channel"
external switch
external...
Viewer does not support full SVG 1.1
\ No newline at end of file +
Inband API access via Switch
Inband API access via Switch
Test System Controller
("Controller")
Test Syste...
Device Under Test ("DUT")
Device Under...
Traffic Interface
Cabling
Traffic Inter...
TrafficGen Control Interface
TrafficGen Control Interfa...
API endpoint(s)
API en...
Traffic Interfaces
("Ports")
Traffic Int...
DUT Host/
Chassis/Fixture
DUT Hos...
Test Traffic  Generator/Receiver ("TGen")
Test Traffic  Gener...
e.g. IXIA
e.g. I...
Inband API path over traffic port
Inband API...
DUT API  "Channel"
DUT API  "Channel"
external switch
external...
Viewer does not support full SVG 1.1
diff --git a/test/images/dash-testbed-inband-via-tgen.svg b/test/images/dash-testbed-inband-via-tgen.svg index 1ee03435e..ea6cfac0b 100644 --- a/test/images/dash-testbed-inband-via-tgen.svg +++ b/test/images/dash-testbed-inband-via-tgen.svg @@ -1,4 +1,4 @@ -
Inband API access via Tgen
Inband API access via Tgen
Test System Controller
("Controller")
Test Syste...
Device Under Test ("DUT")
Device Under...
Traffic Interface
Cabling
Traffic Inter...
TrafficGen Control Interface
TrafficGen Control Interfa...
API endpoint(s)
API en...
Traffic Interfaces
("Ports")
Traffic Interfac...
DUT Host/
Chassis/Fixture
DUT Hos...
Test Traffic  Generator/Receiver ("TGen")
Test Traffic  Gener...
e.g. IXIA
e.g. I...
DUT API  "Channel"
DUT API  "Channel"
Inband API path over traffic port
Inband API pa...
Viewer does not support full SVG 1.1
\ No newline at end of file +
Inband API access via Tgen
Inband API access via Tgen
Test System Controller
("Controller")
Test Syste...
Device Under Test ("DUT")
Device Under...
Traffic Interface
Cabling
Traffic Inter...
TrafficGen Control Interface
TrafficGen Control Interfa...
API endpoint(s)
API en...
Traffic Interfaces
("Ports")
Traffic Interfac...
DUT Host/
Chassis/Fixture
DUT Hos...
Test Traffic  Generator/Receiver ("TGen")
Test Traffic  Gener...
e.g. IXIA
e.g. I...
DUT API  "Channel"
DUT API  "Channel"
Inband API path over traffic port
Inband API pa...
Viewer does not support full SVG 1.1
diff --git a/test/images/dash-testbed-out-of-band-mgmt.svg b/test/images/dash-testbed-out-of-band-mgmt.svg index e375de8da..c3e233b0d 100644 --- a/test/images/dash-testbed-out-of-band-mgmt.svg +++ b/test/images/dash-testbed-out-of-band-mgmt.svg @@ -1,4 +1,4 @@ -
Out of band API access via dedicated physical interface
Out of band API access via dedicated physical interface
Test System Controller
("Controller")
Test Syste...
Device Under Test ("DUT")
Device Under...
Traffic Interface
Cabling
Traffic Inter...
TrafficGen Control Interface
TrafficGen Control Interfa...
API endpoint(s)
via dedicated management port
API endpoint(s)...
Traffic Interfaces
("Ports")
Traffic Interfac...
DUT Host/
Chassis/Fixture
DUT Hos...
Test Traffic  Generator/Receiver ("TGen")
Test Traffic  Gener...
e.g. IXIA
e.g. I...
DUT API Interface
DUT API Interface
Inband API path
Inband API pa...
Viewer does not support full SVG 1.1
\ No newline at end of file +
Out of band API access via dedicated physical interface
Out of band API access via dedicated physical interface
Test System Controller
("Controller")
Test Syste...
Device Under Test ("DUT")
Device Under...
Traffic Interface
Cabling
Traffic Inter...
TrafficGen Control Interface
TrafficGen Control Interfa...
API endpoint(s)
via dedicated management port
API endpoint(s)...
Traffic Interfaces
("Ports")
Traffic Interfac...
DUT Host/
Chassis/Fixture
DUT Hos...
Test Traffic  Generator/Receiver ("TGen")
Test Traffic  Gener...
e.g. IXIA
e.g. I...
DUT API Interface
DUT API Interface
Inband API path
Inband API pa...
Viewer does not support full SVG 1.1
diff --git a/test/images/dash-testbed-out-of-band-via-iface.svg b/test/images/dash-testbed-out-of-band-via-iface.svg index 1923d4b96..b38adf29f 100644 --- a/test/images/dash-testbed-out-of-band-via-iface.svg +++ b/test/images/dash-testbed-out-of-band-via-iface.svg @@ -1,4 +1,4 @@ -
Out of band API access via PCIe Interace
Out of band API access via PCIe Interace
Test System Controller
("Controller")
Test Syste...
Device Under Test ("DUT")
Device Under...
Traffic Interface
Cabling
Traffic Inter...
TrafficGen Control Interface
TrafficGen Control Interfa...
PCIe interface driver
PCIe int...
Traffic Interfaces
("Ports")
Traffic Interfac...
DUT Host/
Chassis/Fixture
DUT Hos...
Test Traffic  Generator/Receiver ("TGen")
Test Traffic  Gener...
e.g. IXIA
e.g. I...
Operating system routing
Operating syste...
host/chassis management interface
host/chassis...
Viewer does not support full SVG 1.1
\ No newline at end of file +
Out of band API access via PCIe Interace
Out of band API access via PCIe Interace
Test System Controller
("Controller")
Test Syste...
Device Under Test ("DUT")
Device Under...
Traffic Interface
Cabling
Traffic Inter...
TrafficGen Control Interface
TrafficGen Control Interfa...
PCIe interface driver
PCIe int...
Traffic Interfaces
("Ports")
Traffic Interfac...
DUT Host/
Chassis/Fixture
DUT Hos...
Test Traffic  Generator/Receiver ("TGen")
Test Traffic  Gener...
e.g. IXIA
e.g. I...
Operating system routing
Operating syste...
host/chassis management interface
host/chassis...
Viewer does not support full SVG 1.1
diff --git a/test/images/dash-testbed-out-of-band-via-proxy.svg b/test/images/dash-testbed-out-of-band-via-proxy.svg index 7ba2d9f8f..ae7d29226 100644 --- a/test/images/dash-testbed-out-of-band-via-proxy.svg +++ b/test/images/dash-testbed-out-of-band-via-proxy.svg @@ -1,4 +1,4 @@ -
Out of band API access via Proxy
Out of band API access via Proxy
Test System Controller
("Controller")
Test Syste...
Device Under Test ("DUT")
Device Under...
Traffic Interface
Cabling
Traffic Inter...
TrafficGen Control Interface
TrafficGen Control Interfa...
Proxy API endpoint(s)
Proxy API...
Traffic Interfaces
("Ports")
Traffic Interfac...
DUT Host/
Chassis/Fixture
DUT Hos...
Test Traffic  Generator/Receiver ("TGen")
Test Traffic  Gener...
e.g. IXIA
e.g. I...
Internal translation to native API or SDK
Internal translation...
Viewer does not support full SVG 1.1
\ No newline at end of file +
Out of band API access via Proxy
Out of band API access via Proxy
Test System Controller
("Controller")
Test Syste...
Device Under Test ("DUT")
Device Under...
Traffic Interface
Cabling
Traffic Inter...
TrafficGen Control Interface
TrafficGen Control Interfa...
Proxy API endpoint(s)
Proxy API...
Traffic Interfaces
("Ports")
Traffic Interfac...
DUT Host/
Chassis/Fixture
DUT Hos...
Test Traffic  Generator/Receiver ("TGen")
Test Traffic  Gener...
e.g. IXIA
e.g. I...
Internal translation to native API or SDK
Internal translation...
Viewer does not support full SVG 1.1
diff --git a/test/images/dash-testbed-ref-arch.svg b/test/images/dash-testbed-ref-arch.svg index 13f6ba83b..f8d5724e7 100644 --- a/test/images/dash-testbed-ref-arch.svg +++ b/test/images/dash-testbed-ref-arch.svg @@ -1,4 +1,4 @@ -
DASH-SONiC Reference Test Architecture
DASH-SONiC Reference Test Architecture
Test System Controller
("Controller")
Test Syste...
DUT Config/Mgmt Interface(s)
("APIs")
DUT Config/Mg...
Device Under Test ("DUT")
Device Under...
Traffic Interface
Cabling
Traffic Inter...
TrafficGen Control Interface
TrafficGen Control Interfa...
API endpoint(s)
API en...
Traffic Interfaces
("Ports")
Traffic Interfac...
DUT Host/
Chassis/Fixture
DUT Hos...
Test Traffic  Generator/Receiver ("TGen")
Test Traffic  Gener...
e.g. IXIA
e.g. I...
Viewer does not support full SVG 1.1
\ No newline at end of file +
DASH-SONiC Reference Test Architecture
DASH-SONiC Reference Test Architecture
Test System Controller
("Controller")
Test Syste...
DUT Config/Mgmt Interface(s)
("APIs")
DUT Config/Mg...
Device Under Test ("DUT")
Device Under...
Traffic Interface
Cabling
Traffic Inter...
TrafficGen Control Interface
TrafficGen Control Interfa...
API endpoint(s)
API en...
Traffic Interfaces
("Ports")
Traffic Interfac...
DUT Host/
Chassis/Fixture
DUT Hos...
Test Traffic  Generator/Receiver ("TGen")
Test Traffic  Gener...
e.g. IXIA
e.g. I...
Viewer does not support full SVG 1.1
diff --git a/test/images/dash-testbed-tests.svg b/test/images/dash-testbed-tests.svg index 199c61491..3f823a3f7 100644 --- a/test/images/dash-testbed-tests.svg +++ b/test/images/dash-testbed-tests.svg @@ -1,4 +1,4 @@ -
P2
P2
P1
P1
P2
P2
P1
P1
P1
P1
P2
P2
P3
P3
P4
P4
P5
P5
P6
P6
P7
P7
P8
P8
P1
P1
P2
P2
P1
P1
P2
P2
#1
#1
#2
#2
#3
#3
N100G
N100G
CS
CS
CS
CS
DASH appliance #1
DASH appliance #1
DASH appliance #...
DASH appliance #...
XGS12-HSL
XGS12-HSL
mgmt
mgmt
mgmt
mgmt
mgmt
mgmt
mgmt
mgmt
P2
P2
P1
P1
mgmt
mgmt
P2
P2
P1
P1
mgmt
mgmt
VxLAN
VxLAN
VxLAN
VxLAN
management network
management network
IxNetwork API Server
IxNetwork API Server
IxLoad API Server
IxLoad API Server
Tests and test Env container
Tests and test Env container
mgmt
mgmt
Linux server
Linux server
Text is not SVG - cannot display
\ No newline at end of file +
P2
P2
P1
P1
P2
P2
P1
P1
P1
P1
P2
P2
P3
P3
P4
P4
P5
P5
P6
P6
P7
P7
P8
P8
P1
P1
P2
P2
P1
P1
P2
P2
#1
#1
#2
#2
#3
#3
N100G
N100G
CS
CS
CS
CS
DASH appliance #1
DASH appliance #1
DASH appliance #...
DASH appliance #...
XGS12-HSL
XGS12-HSL
mgmt
mgmt
mgmt
mgmt
mgmt
mgmt
mgmt
mgmt
P2
P2
P1
P1
mgmt
mgmt
P2
P2
P1
P1
mgmt
mgmt
VxLAN
VxLAN
VxLAN
VxLAN
management network
management network
IxNetwork API Server
IxNetwork API Server
IxLoad API Server
IxLoad API Server
Tests and test Env container
Tests and test Env container
mgmt
mgmt
Linux server
Linux server
Text is not SVG - cannot display
diff --git a/test/images/dash-thrift-sai-api.svg b/test/images/dash-thrift-sai-api.svg index 2ac81b05a..a1321d690 100644 --- a/test/images/dash-thrift-sai-api.svg +++ b/test/images/dash-thrift-sai-api.svg @@ -1,4 +1,4 @@ -
saithrift
Server
saithrift...
Test Controller
Test Controller
DASH SAI
API
DASH SAI...
ASIC SDK
ASIC SDK
NOT USED - For Reference Only
NOT USED - For Reference Only
Test Traffic  Generator/Receiver ("TGen")
Test Traffic...
e.g. IXIA
e.g. I...
DUT
DUT
X
X
libsai
libsai
Traffic
Traffic
Viewer does not support full SVG 1.1
\ No newline at end of file +
saithrift
Server
saithrift...
Test Controller
Test Controller
DASH SAI
API
DASH SAI...
ASIC SDK
ASIC SDK
NOT USED - For Reference Only
NOT USED - For Reference Only
Test Traffic  Generator/Receiver ("TGen")
Test Traffic...
e.g. IXIA
e.g. I...
DUT
DUT
X
X
libsai
libsai
Traffic
Traffic
Viewer does not support full SVG 1.1
diff --git a/test/images/ixia-c.dut.svg b/test/images/ixia-c.dut.svg index 006e60b95..abd16fc39 100644 --- a/test/images/ixia-c.dut.svg +++ b/test/images/ixia-c.dut.svg @@ -1,4 +1,4 @@ -
veth1
veth1
bmv2
bmv2
ixia-c-controller

:443
ixia-c-controller...
snappi
Client
snappi...
Ixia-C Deployment for Bidrectional Traffic
Ixia-C Deployment for Bidrectional Traffic
ixia-c-traffic-engine

:5555
ixia-c-traffic-engine...
ixia-c-traffic-engine

:5556
ixia-c-traffic-engine...
veth3
veth3
Open Traffic Generator API
Open Traffic Ge...
veth0
veth0
veth2
veth2
veth1
veth1
veth3
veth3
Text is not SVG - cannot display
\ No newline at end of file +
veth1
veth1
bmv2
bmv2
ixia-c-controller

:443
ixia-c-controller...
snappi
Client
snappi...
Ixia-C Deployment for Bidrectional Traffic
Ixia-C Deployment for Bidrectional Traffic
ixia-c-traffic-engine

:5555
ixia-c-traffic-engine...
ixia-c-traffic-engine

:5556
ixia-c-traffic-engine...
veth3
veth3
Open Traffic Generator API
Open Traffic Ge...
veth0
veth0
veth2
veth2
veth1
veth1
veth3
veth3
Text is not SVG - cannot display
diff --git a/test/images/test_vxlan_1vpc_1ip.svg b/test/images/test_vxlan_1vpc_1ip.svg index dc678de89..877bcc0d6 100644 --- a/test/images/test_vxlan_1vpc_1ip.svg +++ b/test/images/test_vxlan_1vpc_1ip.svg @@ -1,4 +1,4 @@ -
%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22BGP%22%20style%3D%22rounded%3D1%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3BfillColor%3D%23ffcc99%3BstrokeColor%3D%2336393d%3Bopacity%3D60%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%22600%22%20y%3D%22380%22%20width%3D%22120%22%20height%3D%2230%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3E
%3CmxGraphModel%3E%3Croot%3E%3CmxCell%...
Loopback
Loopback
IP's
IP's
VxLAN
VxLAN
MAC
MAC
OVERLAY
OVERLAY
VM 1 IP 
VM 1 IP 
VM 2 IP 
VM 2 IP 
VM 2 IP 
VM 2 IP 
VM 1 IP 
VM 1 IP 
DENY  all other IP's
DENY  all other IP's
ALLOW
ALLOW
DEVICE UNDER TEST
DEVICE UNDER TEST
UNDERLAY  (Interface 1)
UNDERLAY  (Interface 1)
BGP
BGP
VM 1
VM 1
IP's
IP's
MAC
MAC
OVERLAY
OVERLAY
VM 2
VM 2
BGP
BGP
VxLAN
VxLAN
physical interface
physical interface
%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22BGP%22%20style%3D%22rounded%3D1%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3BfillColor%3D%23ffcc99%3BstrokeColor%3D%2336393d%3Bopacity%3D60%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%22600%22%20y%3D%22380%22%20width%3D%22120%22%20height%3D%2230%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3E
%3CmxGraphModel%3E%3Croot%3E%3CmxCell%...
UNDERLAY  (Interface 2)
UNDERLAY  (Interface 2)
BGP
BGP
physical interface
physical interface
loopback
loopback
VxLAN
VxLAN
ALLOW
ALLOW
physical interface
physical interface
physical interface
physical interface
loopback
loopback
Bi Directional Traffic flowing between VM 1 and VM2
Bi Directional Traffic flowing between VM 1 and VM2
Text is not SVG - cannot display
\ No newline at end of file +
%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22BGP%22%20style%3D%22rounded%3D1%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3BfillColor%3D%23ffcc99%3BstrokeColor%3D%2336393d%3Bopacity%3D60%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%22600%22%20y%3D%22380%22%20width%3D%22120%22%20height%3D%2230%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3E
%3CmxGraphModel%3E%3Croot%3E%3CmxCell%...
Loopback
Loopback
IP's
IP's
VxLAN
VxLAN
MAC
MAC
OVERLAY
OVERLAY
VM 1 IP 
VM 1 IP 
VM 2 IP 
VM 2 IP 
VM 2 IP 
VM 2 IP 
VM 1 IP 
VM 1 IP 
DENY  all other IP's
DENY  all other IP's
ALLOW
ALLOW
DEVICE UNDER TEST
DEVICE UNDER TEST
UNDERLAY  (Interface 1)
UNDERLAY  (Interface 1)
BGP
BGP
VM 1
VM 1
IP's
IP's
MAC
MAC
OVERLAY
OVERLAY
VM 2
VM 2
BGP
BGP
VxLAN
VxLAN
physical interface
physical interface
%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22BGP%22%20style%3D%22rounded%3D1%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3BfillColor%3D%23ffcc99%3BstrokeColor%3D%2336393d%3Bopacity%3D60%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%22600%22%20y%3D%22380%22%20width%3D%22120%22%20height%3D%2230%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3E
%3CmxGraphModel%3E%3Croot%3E%3CmxCell%...
UNDERLAY  (Interface 2)
UNDERLAY  (Interface 2)
BGP
BGP
physical interface
physical interface
loopback
loopback
VxLAN
VxLAN
ALLOW
ALLOW
physical interface
physical interface
physical interface
physical interface
loopback
loopback
Bi Directional Traffic flowing between VM 1 and VM2
Bi Directional Traffic flowing between VM 1 and VM2
Text is not SVG - cannot display
diff --git a/test/targets/README.md b/test/targets/README.md index 3b79988a2..093f6ab88 100644 --- a/test/targets/README.md +++ b/test/targets/README.md @@ -1,2 +1,2 @@ # Targets Subdirectory -This directory contains device/vendor-specific information used to drive tests, for example device SKUs, capabilities, etc. \ No newline at end of file +This directory contains device/vendor-specific information used to drive tests, for example device SKUs, capabilities, etc. diff --git a/test/test-cases/functional/ptf/saidashvnet.py b/test/test-cases/functional/ptf/saidashvnet.py index 354480966..cf5d64200 100644 --- a/test/test-cases/functional/ptf/saidashvnet.py +++ b/test/test-cases/functional/ptf/saidashvnet.py @@ -1,3707 +1,3707 @@ -# Copyright 2022-present Intel Corporation. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Thrift SAI interface VNET tests -""" - -from unittest import skipIf - -from sai_thrift.sai_headers import * -from sai_dash_utils import * - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class UnderlayRouteTest(VnetApiEndpoints, VnetTrafficMixin): - """ - L3 Underlay bidirectional routing test case - Verifies correct L3 underlay routing when overlay configuration exist - """ - - def runTest(self): - self.configureTest() - - self.verifyOverlayOutboundConfigTest() - - self.l3UnderlayHost1toHost2RoutingTest() - self.l3UnderlayHost2toHost1RoutingTest() - - def configureTest(self): - """ - Setup DUT in accordance with test purpose - """ - - # configure overlay outbound - self.vip_create(self.tx_host.peer.ip) - - # direction lookup VNI, reserved VNI assigned to the VM->Appliance - self.direction_lookup_create(self.tx_host.client.vni) - - src_vnet = self.vnet_create(vni=self.tx_host.client.vni) - dst_vnet = self.vnet_create(vni=self.rx_host.client.vni) - - eni_id = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.tx_host.ip), - vm_vni=self.tx_host.client.vni, - vnet_id=src_vnet) - self.eni_mac_map_create(eni_id, self.tx_host.client.mac) # ENI MAC - - self.outbound_routing_vnet_create(eni_id=eni_id, lpm="192.168.1.0/24", - dst_vnet_id=dst_vnet) - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet, - dip=self.rx_host.client.ip, - underlay_dip=self.rx_host.ip, - overlay_dmac=self.rx_host.client.mac, - use_dst_vnet_vni=True) - - # configure underlay - self.host_1 = self.tx_host - self.host_2 = self.rx_host - - self.configure_underlay(self.host_1, self.host_2) - - def verifyOverlayOutboundConfigTest(self): - - self.verify_traffic_scenario(client=self.tx_host, server=self.rx_host, - connection=self.connection, fake_mac=False, tx_equal_to_rx=False) - print("Overlay config OK\n") - - def l3UnderlayHost1toHost2RoutingTest(self): - - host_1_pkt = simple_udp_packet(eth_src=self.host_1.mac, - eth_dst=self.host_1.peer.mac, - ip_dst=self.host_2.ip, - ip_src=self.host_1.ip, - ip_ttl=64) - host_1_exp_pkt = simple_udp_packet(eth_src=self.host_2.peer.mac, - eth_dst=self.host_2.mac, - ip_dst=self.host_2.ip, - ip_src=self.host_1.ip, - ip_ttl=63) - - print("Sending simple UDP packet host_1 -> host_2, expecting routed packet") - send_packet(self, self.host_1.port, host_1_pkt) - verify_packet(self, host_1_exp_pkt, self.host_2.port) - print("Underlay Host 1 to Host 2 OK\n") - - def l3UnderlayHost2toHost1RoutingTest(self): - - host_2_pkt = simple_udp_packet(eth_src=self.host_2.mac, - eth_dst=self.host_2.peer.mac, - ip_dst=self.host_1.ip, - ip_src=self.host_2.ip, - ip_ttl=64) - host_2_exp_pkt = simple_udp_packet(eth_src=self.host_1.peer.mac, - eth_dst=self.host_1.mac, - ip_dst=self.host_1.ip, - ip_src=self.host_2.ip, - ip_ttl=63) - - print("Sending simple UDP packet host_2 -> host_1, expecting routed packet") - send_packet(self, self.host_2.port, host_2_pkt) - verify_packet(self, host_2_exp_pkt, self.host_1.port) - print("Underlay Host 2 to Host 1 OK\n") - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetInboundDecapPaValidateSinglePortTest(VnetApiEndpoints, VnetTrafficMixin): - """ - Inbound Vnet to Vnet scenario test case with - VXLAN_DECAP_PA_VALIDATE inbound routing entry action - with underlay config (neighbour + next hop) but without underlay routes - - Verifies positive and negative scenarios - """ - - def runTest(self): - # Reconfigure configuration for tx equal to rx - self.update_configuration_for_tx_equal_to_rx() - self.configureTest() - self.configure_underlay(self.tx_host, add_routes=False) - - self.vnet2VnetInboundRoutingTest(tx_equal_to_rx=True) - self.vnet2VnetInboundNegativeTest() - - def configureTest(self): - """ - Setup DUT in accordance with test purpose - """ - - self.vip_create(self.tx_host.peer.ip) - - # direction lookup VNI, reserved VNI assigned to the VM->Appliance - self.direction_lookup_create(self.rx_host.client.vni) - - src_vnet = self.vnet_create(vni=self.tx_host.client.vni) - dst_vnet = self.vnet_create(vni=self.rx_host.client.vni) - - eni_id = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.rx_host.ip), - vm_vni=self.rx_host.client.vni, - vnet_id=dst_vnet) - self.eni_mac_map_create(eni_id, self.rx_host.client.mac) # ENI MAC - - # Inbound routing PA Validate - self.inbound_routing_decap_validate_create(eni_id, vni=self.tx_host.client.vni, - sip=self.tx_host.ip, sip_mask="255.255.255.0", - src_vnet_id=src_vnet) - # PA validation entry with Permit action - self.pa_validation_create(self.tx_host.ip, src_vnet) - - def vnet2VnetInboundRoutingTest(self, tx_equal_to_rx): - """ - Inbound VNET to VNET test - Verifies correct packet routing - """ - - self.verify_traffic_scenario(client=self.tx_host, server=self.rx_host, - connection=self.connection, fake_mac=False, tx_equal_to_rx=tx_equal_to_rx) - - print('\n', self.vnet2VnetInboundRoutingTest.__name__, ' OK') - - def vnet2VnetInboundNegativeTest(self): - """ - Verifies negative scenarios (packet drop): - - wrong CA Dst MAC - - wrong PA Validation IP: pa validation missmatch - - wrong Physical SIP: routing missmatch - - wrong VIP - - wrong VNI - """ - - invalid_vni = 1000 - invalid_ca_dst_mac = "9e:ba:ce:98:d9:e2" - invalid_pa_sip = "10.10.5.1" # routing missmatch - invalid_vip = "10.10.10.10" - - self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, - fake_mac=False, - invalid_vni=invalid_vni, - invalid_outer_src_ip=invalid_pa_sip, - invalid_inner_dst_mac=invalid_ca_dst_mac, - invalid_vip=invalid_vip) - - invalid_pa_valid_ip = "10.10.1.25" # pa validation missmatch - self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, - fake_mac=False, - invalid_outer_src_ip=invalid_pa_valid_ip) - - print('\n', self.vnet2VnetInboundNegativeTest.__name__, ' OK') - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetInboundDecapPaValidateSinglePortOverlayIpv6Test(Vnet2VnetInboundDecapPaValidateSinglePortTest): - """ - Underlay IPv4 and Overlay IPv6 configs - Inbound Vnet to Vnet scenario test case with - VXLAN_DECAP_PA_VALIDATE inbound routing entry action - with underlay config (neighbour + next hop) but without underlay routes - - Verifies positive and negative scenarios - """ - - def setUp(self): - super(Vnet2VnetInboundDecapPaValidateSinglePortOverlayIpv6Test, self).setUp(overlay_ipv6=True) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetInboundDecapPaValidateTwoPortsTest(Vnet2VnetInboundDecapPaValidateSinglePortTest): - """ - Inbound Vnet to Vnet scenario test case with - VXLAN_DECAP_PA_VALIDATE inbound routing entry action - with full underlay config (2 neighbours, 2 next-hops, 2 routes) - - Verifies positive scenario - """ - - def runTest(self): - self.configureTest() - self.configure_underlay(self.tx_host, self.rx_host) - - self.vnet2VnetInboundRoutingTest(tx_equal_to_rx=False) - self.vnet2VnetInboundNegativeTest() - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetInboundDecapPaValidateTwoPortsOverlayIpv6Test(Vnet2VnetInboundDecapPaValidateSinglePortOverlayIpv6Test): - """ - Underlay IPv4 and Overlay IPv6 configs - Inbound Vnet to Vnet scenario test case with - VXLAN_DECAP_PA_VALIDATE inbound routing entry action - with full underlay config (2 neighbours, 2 next-hops, 2 routes) - - Verifies positive scenario - """ - - def runTest(self): - self.configureTest() - self.configure_underlay(self.tx_host, self.rx_host) - - self.vnet2VnetInboundRoutingTest(tx_equal_to_rx=False) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetInboundDecapSinglePortTest(Vnet2VnetInboundDecapPaValidateSinglePortTest): - """ - Inbound Vnet to Vnet scenario test case with - VXLAN_DECAP inbound routing entry action - with underlay config (neighbour + next hop) but without underlay routes - - Verifies positive and negative scenarios - """ - - def configureTest(self): - """ - Setup DUT overlay in accordance with test purpose - """ - - self.vip_create(self.tx_host.peer.ip) - - # direction lookup VNI, reserved VNI assigned to the VM->Appliance - self.direction_lookup_create(self.rx_host.client.vni) - - dst_vnet = self.vnet_create(vni=self.rx_host.client.vni) - - eni_id = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.rx_host.ip), - vm_vni=self.rx_host.client.vni, - vnet_id=dst_vnet) - self.eni_mac_map_create(eni_id, self.rx_host.client.mac) # ENI MAC - - # Inbound routing PA Validate - self.inbound_routing_decap_create(eni_id, vni=self.tx_host.client.vni, - sip=self.tx_host.ip, sip_mask="255.255.255.0") - - def vnet2VnetInboundNegativeTest(self): - """ - Verifies negative scenarios (packet drop): - - wrong CA Dst MAC - - wrong VIP - - wrong VNI - - wrong Physical SIP: routing missmatch - """ - - invalid_vni = 1000 - invalid_ca_dst_mac = "9e:ba:ce:98:d9:e2" - invalid_vip = "10.10.10.10" - invalid_pa_sip = "10.10.3.22" - - self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, - fake_mac=False, - invalid_vni=invalid_vni, - invalid_inner_dst_mac=invalid_ca_dst_mac, - invalid_vip=invalid_vip, - invalid_outer_src_ip=invalid_pa_sip) - - print('\n', self.vnet2VnetInboundNegativeTest.__name__, ' OK') - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetInboundDecapSinglePortOverlayIpv6Test(Vnet2VnetInboundDecapSinglePortTest): - """ - Underlay IPv4 and Overlay IPv6 configs - Inbound Vnet to Vnet scenario test case with - VXLAN_DECAP inbound routing entry action - with underlay config (neighbour + next hop) but without underlay routes - - Verifies positive and negative scenarios - """ - - def setUp(self): - super(Vnet2VnetInboundDecapSinglePortOverlayIpv6Test, self).setUp(overlay_ipv6=True) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetInboundDecapTwoPortsTest(Vnet2VnetInboundDecapSinglePortTest): - """ - Inbound Vnet to Vnet scenario test case with - VXLAN_DECAP inbound routing entry action - with full underlay config (2 neighbours, 2 next-hops, 2 routes) - - Verifies positive scenario - """ - - def runTest(self): - self.configureTest() - self.configure_underlay(self.tx_host, self.rx_host) - - self.vnet2VnetInboundRoutingTest(tx_equal_to_rx=False) - self.vnet2VnetInboundNegativeTest() - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetInboundDecapTwoPortsOverlayIpv6Test(Vnet2VnetInboundDecapSinglePortOverlayIpv6Test): - """ - Underlay IPv4 and Overlay IPv6 configs - Inbound Vnet to Vnet scenario test case with - VXLAN_DECAP inbound routing entry action - with full underlay config (2 neighbours, 2 next-hops, 2 routes) - - Verifies positive scenario - """ - - def runTest(self): - self.configureTest() - self.configure_underlay(self.tx_host, self.rx_host) - - self.vnet2VnetInboundRoutingTest(tx_equal_to_rx=False) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetInboundMultiplePaValidatesSingleEniSinglePortTest(VnetApiEndpoints, VnetTrafficMixin): - """ - Inbound Vnet to Vnet scenario test case with single eni and - multiple inbound routing entries (3 PA validate and 1 Decap) - with underlay config (neighbour + next hop) but without underlay routes - - Connections: - Positive scenarios: - tx_host_0 -> rx_host (ENI 0) with PA validation 0 - tx_host_1 -> rx_host (ENI 0) with PA validation 1 - tx_host_2 -> rx_host (ENI 0) with PA validation 2 - tx_host_3 -> rx_host (ENI 0) without PA validation - Negative scenarios: - tx_host_0 -> rx_host invalid VNI - tx_host_1 -> rx_host Invalid ENI mac - tx_host_2 -> rx_host Invalid PA IP - tx_host_3 -> rx_host invalid VIP - """ - - def runTest(self): - # Reconfigure configuration for tx equal to rx - self.update_configuration_for_tx_equal_to_rx() - self.configureTest() - self.configure_underlay(self.tx_host, add_routes=False) - - self.vnet2VnetInboundRoutingPositiveTest(tx_equal_to_rx=True) - self.vnet2VnetInboundRoutingNegativeTest() - - def configureTest(self): - """ - Setup DUT in accordance with test purpose - """ - self.tx_host_0 = self.tx_host - - self.tx_host_1 = self.define_neighbor_network(port=self.tx_host_0.port, - mac=self.tx_host_0.mac, - ip="8.0.0.1", - ip_prefix="8.0.0.0/24", - peer_port=self.tx_host_0.peer.port, - peer_mac=self.tx_host_0.peer.mac, - peer_ip=self.tx_host_0.peer.ip, - client_mac="00:03:00:00:05:16", - client_ip="192.168.2.1", - client_vni=10) - - self.tx_host_2 = self.define_neighbor_network(port=self.tx_host_0.port, - mac=self.tx_host_0.mac, - ip="9.0.0.1", - ip_prefix="9.0.0.0/24", - peer_port=self.tx_host_0.peer.port, - peer_mac=self.tx_host_0.peer.mac, - peer_ip=self.tx_host_0.peer.ip, - client_mac="00:10:00:00:AA:20", - client_ip="192.168.3.1", - client_vni=30) - - self.tx_host_3 = self.define_neighbor_network(port=self.tx_host_0.port, - mac=self.tx_host_0.mac, - ip="11.0.0.1", - ip_prefix="11.0.0.1/24", - peer_port=self.tx_host_0.peer.port, - peer_mac=self.tx_host_0.peer.mac, - peer_ip=self.tx_host_0.peer.ip, - client_mac="00:AA:00:23:CC:20", - client_ip="192.168.4.1", - client_vni=40) - - self.vip_create(self.tx_host_0.peer.ip) - - # direction lookup VNI, reserved VNI assigned to the VM->Appliance - self.direction_lookup_create(self.rx_host.client.vni) - - src_vnet_0 = self.vnet_create(vni=self.tx_host_0.client.vni) - src_vnet_1 = self.vnet_create(vni=self.tx_host_1.client.vni) - src_vnet_2 = self.vnet_create(vni=self.tx_host_2.client.vni) - - dst_vnet = self.vnet_create(vni=self.rx_host.client.vni) - - # ENI configuration - eni_id = self.eni_create(vm_underlay_dip=sai_ipaddress(self.rx_host.ip), - vm_vni=self.rx_host.client.vni, - vnet_id=dst_vnet) - self.eni_mac_map_create(eni_id, self.rx_host.client.mac) # ENI MAC - - # Inbound routing decap - self.inbound_routing_decap_create(eni_id, vni=self.tx_host_3.client.vni, - sip=self.tx_host_3.ip, sip_mask="255.255.255.0") - - # Inbound routing decap PA Validate tx_host_0 - self.inbound_routing_decap_validate_create(eni_id, vni=self.tx_host_0.client.vni, - sip=self.tx_host_0.ip, sip_mask="255.255.255.0", - src_vnet_id=src_vnet_0) - # PA validation entry with Permit action tx_host_0 - self.pa_validation_create(self.tx_host_0.ip, src_vnet_0) - - # Inbound routing decap PA Validate tx_host_1 - self.inbound_routing_decap_validate_create(eni_id, vni=self.tx_host_1.client.vni, - sip=self.tx_host_1.ip, sip_mask="255.255.255.0", - src_vnet_id=src_vnet_1) - # PA validation entry with Permit action tx_host_1 - self.pa_validation_create(self.tx_host_1.ip, src_vnet_1) - - # Inbound routing decap PA Validate tx_host_2 - self.inbound_routing_decap_validate_create(eni_id, vni=self.tx_host_2.client.vni, - sip=self.tx_host_2.ip, sip_mask="255.255.255.0", - src_vnet_id=src_vnet_2) - # PA validation entry with Permit action tx_host_2 - self.pa_validation_create(self.tx_host_2.ip, src_vnet_2) - - def vnet2VnetInboundRoutingPositiveTest(self, tx_equal_to_rx): - """ - Inbound VNET to VNET test - Verifies correct packet routing: - tx_host_0 -> rx_host (ENI 0) with PA validation 0 - tx_host_1 -> rx_host (ENI 0) with PA validation 1 - tx_host_2 -> rx_host (ENI 0) with PA validation 2 - tx_host_3 -> rx_host (ENI 0) without PA validation - """ - - print("\nVerifying Inbound pkt send tx_host_0 -> rx_host ...") - self.verify_traffic_scenario(client=self.tx_host_0, server=self.rx_host, - connection=self.connection, fake_mac=False, tx_equal_to_rx=tx_equal_to_rx) - print("OK") - - print("\nVerifying Inbound pkt send tx_host_1 -> rx_host ...") - self.verify_traffic_scenario(client=self.tx_host_1, server=self.rx_host, - connection=self.connection, fake_mac=False, tx_equal_to_rx=tx_equal_to_rx) - print("OK") - - print("\nVerifying Inbound pkt send tx_host_2 -> rx_host ...") - self.verify_traffic_scenario(client=self.tx_host_2, server=self.rx_host, - connection=self.connection, fake_mac=False, tx_equal_to_rx=tx_equal_to_rx) - print("OK") - - print("\nVerifying Inbound pkt send tx_host_3 -> rx_host ...") - self.verify_traffic_scenario(client=self.tx_host_3, server=self.rx_host, - connection=self.connection, fake_mac=False, tx_equal_to_rx=tx_equal_to_rx) - print("OK") - - print('\n', self.vnet2VnetInboundRoutingPositiveTest.__name__, ' OK') - - def vnet2VnetInboundRoutingNegativeTest(self): - """ - Verifies negative scenarios (packet drop): - tx_host_0 -> rx_host invalid VNI - tx_host_1 -> rx_host Invalid ENI mac - tx_host_2 -> rx_host Invalid PA IP - tx_host_3 -> rx_host invalid VIP - """ - - invalid_vni = 200 - invalid_ca_dst_mac = "9e:ba:ce:98:d9:e2" - invalid_pa_sip = "10.10.5.1" # routing missmatch - invalid_vip = "10.10.10.10" - - print("\nVerifying Inbound pkt drop with invalid VNI tx_host_0 -> rx_host ...") - self.verify_negative_traffic_scenario(client=self.tx_host_0, server=self.rx_host, - fake_mac=False, - invalid_vni=invalid_vni) - print("OK") - - print("\nVerifying Inbound pkt drop with invalid ENI mac tx_host_1 -> rx_host ...") - self.verify_negative_traffic_scenario(client=self.tx_host_1, server=self.rx_host, - fake_mac=False, - invalid_inner_dst_mac=invalid_ca_dst_mac) - print("OK") - - print("\nVerifying Inbound pkt drop with invalid PA IP tx_host_2 -> rx_host ...") - self.verify_negative_traffic_scenario(client=self.tx_host_2, server=self.rx_host, - fake_mac=False, - invalid_outer_src_ip=invalid_pa_sip) - print("OK") - - print("\nVerifying Inbound pkt drop with invalid VIP tx_host_3 -> rx_host ...") - self.verify_negative_traffic_scenario(client=self.tx_host_3, server=self.rx_host, - fake_mac=False, - invalid_vip=invalid_vip) - print("OK") - - print('\n', self.vnet2VnetInboundRoutingNegativeTest.__name__, ' OK') - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetInboundMultiplePaValidatesSingleEniSinglePortOverlayIpv6Test(Vnet2VnetInboundMultiplePaValidatesSingleEniSinglePortTest): - """ - Underlay IPv4 and Overlay IPv6 configs - Inbound Vnet to Vnet scenario test case with single eni and - multiple inbound routing entries (3 PA validate and 1 Decap) - with underlay config (neighbour + next hop) but without underlay routes - - Connections: - Positive scenarios: - tx_host_0 -> rx_host (ENI 0) with PA validation 0 - tx_host_1 -> rx_host (ENI 0) with PA validation 1 - tx_host_2 -> rx_host (ENI 0) with PA validation 2 - tx_host_3 -> rx_host (ENI 0) without PA validation - """ - - def setUp(self): - super(Vnet2VnetInboundMultiplePaValidatesSingleEniSinglePortOverlayIpv6Test, self).setUp(overlay_ipv6=True) - - def runTest(self): - # Reconfigure configuration for tx equal to rx - self.update_configuration_for_tx_equal_to_rx() - self.configureTest() - self.configure_underlay(self.tx_host, add_routes=False) - - self.vnet2VnetInboundRoutingPositiveTest(tx_equal_to_rx=True) - - def configureTest(self): - """ - Setup DUT in accordance with test purpose - """ - self.tx_host_0 = self.tx_host - - self.tx_host_1 = self.define_neighbor_network(port=self.tx_host_0.port, - mac=self.tx_host_0.mac, - ip="8.0.0.1", - ip_prefix="8.0.0.0/24", - peer_port=self.tx_host_0.peer.port, - peer_mac=self.tx_host_0.peer.mac, - peer_ip=self.tx_host_0.peer.ip, - client_mac="00:03:00:00:05:16", - client_ip="cccc::60", - client_vni=10) - - self.tx_host_2 = self.define_neighbor_network(port=self.tx_host_0.port, - mac=self.tx_host_0.mac, - ip="9.0.0.1", - ip_prefix="9.0.0.0/24", - peer_port=self.tx_host_0.peer.port, - peer_mac=self.tx_host_0.peer.mac, - peer_ip=self.tx_host_0.peer.ip, - client_mac="00:10:00:00:AA:20", - client_ip="dddd::14", - client_vni=30) - - self.tx_host_2 = self.define_neighbor_network(port=self.tx_host_0.port, - mac=self.tx_host_0.mac, - ip="11.0.0.1", - ip_prefix="11.0.0.1/24", - peer_port=self.tx_host_0.peer.port, - peer_mac=self.tx_host_0.peer.mac, - peer_ip=self.tx_host_0.peer.ip, - client_mac="00:AA:00:23:CC:20", - client_ip="eeee::80", - client_vni=40) - - self.vip_create(self.tx_host_0.peer.ip) - - # direction lookup VNI, reserved VNI assigned to the VM->Appliance - self.direction_lookup_create(self.rx_host.client.vni) - - src_vnet_0 = self.vnet_create(vni=self.tx_host_0.client.vni) - src_vnet_1 = self.vnet_create(vni=self.tx_host_1.client.vni) - src_vnet_2 = self.vnet_create(vni=self.tx_host_2.client.vni) - - dst_vnet = self.vnet_create(vni=self.rx_host.client.vni) - - # ENI configuration - eni_id = self.eni_create(vm_underlay_dip=sai_ipaddress(self.rx_host.ip), - vm_vni=self.rx_host.client.vni, - vnet_id=dst_vnet) - self.eni_mac_map_create(eni_id, self.rx_host.client.mac) # ENI MAC - - # Inbound routing decap - self.inbound_routing_decap_create(eni_id, vni=self.tx_host_3.client.vni, - sip=self.tx_host_3.ip, sip_mask="255.255.255.0") - - # Inbound routing decap PA Validate tx_host_0 - self.inbound_routing_decap_validate_create(eni_id, vni=self.tx_host_0.client.vni, - sip=self.tx_host_0.ip, sip_mask="255.255.255.0", - src_vnet_id=src_vnet_0) - # PA validation entry with Permit action tx_host_0 - self.pa_validation_create(self.tx_host_0.ip, src_vnet_0) - - # Inbound routing decap PA Validate tx_host_1 - self.inbound_routing_decap_validate_create(eni_id, vni=self.tx_host_1.client.vni, - sip=self.tx_host_1.ip, sip_mask="255.255.255.0", - src_vnet_id=src_vnet_1) - # PA validation entry with Permit action tx_host_1 - self.pa_validation_create(self.tx_host_1.ip, src_vnet_1) - - # Inbound routing decap PA Validate tx_host_2 - self.inbound_routing_decap_validate_create(eni_id, vni=self.tx_host_2.client.vni, - sip=self.tx_host_2.ip, sip_mask="255.255.255.0", - src_vnet_id=src_vnet_2) - # PA validation entry with Permit action tx_host_2 - self.pa_validation_create(self.tx_host_2.ip, src_vnet_2) - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetInboundMultiplePaValidatesSingleEniTwoPortsTest(Vnet2VnetInboundMultiplePaValidatesSingleEniSinglePortTest): - """ - Inbound Vnet to Vnet scenario test case with single eni and - multiple inbound routing entries (3 PA validate and 1 Decap) - with underlay config (2 neighbours, 2 next-hops, 5 routes) - - Connections: - Positive scenarios: - tx_host_0 -> rx_host (ENI 0) with PA validation 0 - tx_host_1 -> rx_host (ENI 0) with PA validation 1 - tx_host_2 -> rx_host (ENI 0) with PA validation 2 - tx_host_3 -> rx_host (ENI 0) without PA validation - """ - - def runTest(self): - self.configureTest() - self.configure_underlay() - - self.vnet2VnetInboundRoutingPositiveTest(tx_equal_to_rx=False) - - def configure_underlay(self): - - rif_0 = self.router_interface_create(self.tx_host_0.peer.port, - src_mac=self.tx_host_0.peer.mac) - nhop_0 = self.nexthop_create(rif_0, self.tx_host_0.ip) - self.neighbor_create(rif_0, self.tx_host_0.ip, self.tx_host_0.mac) - - self.route_create(self.tx_host_0.ip_prefix, nhop_0) - self.route_create(self.tx_host_1.ip_prefix, nhop_0) - self.route_create(self.tx_host_2.ip_prefix, nhop_0) - self.route_create(self.tx_host_3.ip_prefix, nhop_0) - - rif_1 = self.router_interface_create(self.rx_host.peer.port, - src_mac=self.rx_host.peer.mac) - nhop_1 = self.nexthop_create(rif_1, self.rx_host.ip) - self.neighbor_create(rif_1, self.rx_host.ip, self.rx_host.mac) - self.route_create(self.rx_host.ip_prefix, nhop_1) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetInboundMultiplePaValidatesSingleEniTwoPortsOverlayIpv6Test(Vnet2VnetInboundMultiplePaValidatesSingleEniSinglePortOverlayIpv6Test): - """ - Underlay IPv4 and Overlay IPv6 configs - Inbound Vnet to Vnet scenario test case with single eni and - multiple inbound routing entries (3 PA validate and 1 Decap) - with underlay config (2 neighbours, 2 next-hops, 5 routes) - - Connections: - Positive scenarios: - tx_host_0 -> rx_host (ENI 0) with PA validation 0 - tx_host_1 -> rx_host (ENI 0) with PA validation 1 - tx_host_2 -> rx_host (ENI 0) with PA validation 2 - tx_host_3 -> rx_host (ENI 0) without PA validation - """ - - def runTest(self): - self.configureTest() - self.configure_underlay() - - self.vnet2VnetInboundRoutingPositiveTest(tx_equal_to_rx=False) - - def configure_underlay(self): - - rif_0 = self.router_interface_create(self.tx_host_0.peer.port, - src_mac=self.tx_host_0.peer.mac) - nhop_0 = self.nexthop_create(rif_0, self.tx_host_0.ip) - self.neighbor_create(rif_0, self.tx_host_0.ip, self.tx_host_0.mac) - - self.route_create(self.tx_host_0.ip_prefix, nhop_0) - self.route_create(self.tx_host_1.ip_prefix, nhop_0) - self.route_create(self.tx_host_2.ip_prefix, nhop_0) - self.route_create(self.tx_host_3.ip_prefix, nhop_0) - - rif_1 = self.router_interface_create(self.rx_host_0.peer.port, - src_mac=self.rx_host_0.peer.mac) - nhop_1 = self.nexthop_create(rif_1, self.rx_host_0.ip) - self.neighbor_create(rif_1, self.rx_host_0.ip, self.rx_host_0.mac) - self.route_create(self.rx_host_1.ip_prefix, nhop_1) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetInboundMultiplePaValidatesMultipleEniSinglePortTest(VnetApiEndpoints, VnetTrafficMixin): - """ - Inbound Vnet to Vnet scenario test case with - multiple inbound routing entries (2 PA validate and 1 Decap) - with underlay config (neighbour + next hop) but without underlay routes - - Connections: - Positive scenarios: - tx_host_0 -> rx_host_0 (ENI 0) with PA validation - tx_host_1 -> rx_host_1 (ENI 1) with PA validation - tx_host_2 -> rx_host_0 (ENI 0) without PA validation - Negative scenarios: - tx_host_0 -> rx_host_1 - tx_host_1 -> rx_host_0 - tx_host_2 -> rx_host_1 - """ - - def runTest(self): - # Reconfigure configuration for tx equal to rx - self.update_configuration_for_tx_equal_to_rx() - self.configureTest() - self.configure_underlay(self.tx_host, add_routes=False) - - self.vnet2VnetInboundRoutingPositiveTest(tx_equal_to_rx=True) - self.vnet2VnetInboundRoutingNegativeTest() - - def configureTest(self): - """ - Setup DUT in accordance with test purpose - """ - self.tx_host_0 = self.tx_host - - self.tx_host_1 = self.define_neighbor_network(port=self.tx_host_0.port, - mac=self.tx_host_0.mac, - ip=self.tx_host_0.ip, - ip_prefix=self.tx_host_0.ip_prefix, - peer_port=self.tx_host_0.peer.port, - peer_mac=self.tx_host_0.peer.mac, - peer_ip=self.tx_host_0.peer.ip, - client_mac="00:03:00:00:05:16", - client_ip="192.168.2.1", - client_vni=10) - - self.tx_host_2 = self.define_neighbor_network(port=self.tx_host_0.port, - mac=self.tx_host_0.mac, - ip="9.0.0.1", - ip_prefix="9.0.0.0/24", - peer_port=self.tx_host_0.peer.port, - peer_mac=self.tx_host_0.peer.mac, - peer_ip=self.tx_host_0.peer.ip, - client_mac="00:10:00:00:AA:20", - client_ip="192.168.3.1", - client_vni=30) - - self.rx_host_0 = self.rx_host - - self.rx_host_1 = self.define_neighbor_network(port=self.rx_host_0.port, - mac=self.rx_host_0.mac, - ip=self.rx_host_0.ip, - ip_prefix=self.rx_host_0.ip_prefix, - peer_port=self.rx_host_0.peer.port, - peer_mac=self.rx_host_0.peer.mac, - peer_ip=self.rx_host_0.peer.ip, - client_mac="00:05:00:00:06:17", - client_ip="192.168.4.1", - client_vni=20) - - self.vip_create(self.tx_host_0.peer.ip) - - # direction lookup VNI, reserved VNI assigned to the VM->Appliance - self.direction_lookup_create(self.rx_host_0.client.vni) - self.direction_lookup_create(self.rx_host_1.client.vni) - - src_vnet_0 = self.vnet_create(vni=self.tx_host_0.client.vni) - src_vnet_1 = self.vnet_create(vni=self.tx_host_1.client.vni) - - dst_vnet_0 = self.vnet_create(vni=self.rx_host_0.client.vni) - dst_vnet_1 = self.vnet_create(vni=self.rx_host_1.client.vni) - - # ENI 0 configuration - eni_id_0 = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.rx_host_0.ip), - vm_vni=self.rx_host_0.client.vni, - vnet_id=dst_vnet_0) - self.eni_mac_map_create(eni_id_0, self.rx_host_0.client.mac) # ENI MAC - - # Inbound routing decap - self.inbound_routing_decap_create(eni_id_0, vni=self.tx_host_2.client.vni, - sip=self.tx_host_2.ip, sip_mask="255.255.255.0") - - # Inbound routing decap PA Validate - self.inbound_routing_decap_validate_create(eni_id_0, vni=self.tx_host_0.client.vni, - sip=self.tx_host_0.ip, sip_mask="255.255.255.0", - src_vnet_id=src_vnet_0) - # PA validation entry with Permit action - self.pa_validation_create(self.tx_host_0.ip, src_vnet_0) - - # ENI 1 configuration - eni_id_1 = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.rx_host_1.ip), - vm_vni=self.rx_host_1.client.vni, - vnet_id=dst_vnet_1) - self.eni_mac_map_create(eni_id_1, self.rx_host_1.client.mac) # ENI MAC - - # Inbound routing PA Validate - self.inbound_routing_decap_validate_create(eni_id_1, vni=self.tx_host_1.client.vni, - sip=self.tx_host_1.ip, sip_mask="255.255.255.0", - src_vnet_id=src_vnet_1) - # PA validation entry with Permit action - self.pa_validation_create(self.tx_host_1.ip, src_vnet_1) - - def vnet2VnetInboundRoutingPositiveTest(self, tx_equal_to_rx): - """ - Inbound VNET to VNET test - Verifies correct packet routing: - tx_host_0 -> rx_host_0 (ENI 0) with PA validation - tx_host_1 -> rx_host_1 (ENI 1) with PA validation - tx_host_2 -> rx_host_0 (ENI 0) without PA validation - """ - - print("\nVerifying Inbound pkt send tx_host_0 -> rx_host_0 ...") - self.verify_traffic_scenario(client=self.tx_host_0, server=self.rx_host_0, - connection=self.connection, fake_mac=False, tx_equal_to_rx=tx_equal_to_rx) - print("OK") - - print("\nVerifying Inbound pkt send tx_host_1 -> rx_host_1 ...") - self.verify_traffic_scenario(client=self.tx_host_1, server=self.rx_host_1, - connection=self.connection, fake_mac=False, tx_equal_to_rx=tx_equal_to_rx) - print("OK") - - print("\nVerifying Inbound pkt send tx_host_2 -> rx_host_0 ...") - self.verify_traffic_scenario(client=self.tx_host_2, server=self.rx_host_0, - connection=self.connection, fake_mac=False, tx_equal_to_rx=tx_equal_to_rx) - print("OK") - - - print('\n', self.vnet2VnetInboundRoutingPositiveTest.__name__, ' OK') - - def vnet2VnetInboundRoutingNegativeTest(self): - """ - Verifies negative scenarios (packet drop): - tx_host_0 -> rx_host_1 - tx_host_1 -> rx_host_0 - tx_host_2 -> rx_host_1 - """ - - print("\nVerifying Inbound pkt drop tx_host_0 -> rx_host_1 ...") - self.verify_negative_traffic_scenario(client=self.tx_host_0, server=self.rx_host_1, - fake_mac=False, valid_pkt_drop=True) - print("OK") - - print("\nVerifying Inbound pkt drop tx_host_1 -> rx_host_0 ...") - self.verify_negative_traffic_scenario(client=self.tx_host_1, server=self.rx_host_0, - fake_mac=False, valid_pkt_drop=True) - print("OK") - - print("\nVerifying Inbound pkt drop tx_host_2 -> rx_host_1 ...") - self.verify_negative_traffic_scenario(client=self.tx_host_2, server=self.rx_host_1, - fake_mac=False, valid_pkt_drop=True) - print("OK") - - print('\n', self.vnet2VnetInboundRoutingNegativeTest.__name__, ' OK') - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetInboundMultiplePaValidatesMultipleEniSinglePortOverlayIpv6Test(Vnet2VnetInboundMultiplePaValidatesMultipleEniSinglePortTest): - """ - Underlay IPv4 and Overlay IPv6 configs - Inbound Vnet to Vnet scenario test case with - multiple inbound routing entries (2 PA validate and 1 Decap) - with underlay config (neighbour + next hop) but without underlay routes - - Connections: - Positive scenarios: - tx_host_0 -> rx_host_0 (ENI 0) with PA validation - tx_host_1 -> rx_host_1 (ENI 1) with PA validation - tx_host_2 -> rx_host_0 (ENI 0) without PA validation - Negative scenarios: - tx_host_0 -> rx_host_1 - tx_host_1 -> rx_host_0 - tx_host_2 -> rx_host_1 - """ - - def setUp(self): - super(Vnet2VnetInboundMultiplePaValidatesMultipleEniSinglePortOverlayIpv6Test, self).setUp(overlay_ipv6=True) - - def runTest(self): - # Reconfigure configuration for tx equal to rx - self.update_configuration_for_tx_equal_to_rx() - self.configureTest() - self.configure_underlay(self.tx_host, add_routes=False) - - self.vnet2VnetInboundRoutingPositiveTest(tx_equal_to_rx=True) - - def configureTest(self): - """ - Setup DUT in accordance with test purpose - """ - self.tx_host_0 = self.tx_host - - self.tx_host_1 = self.define_neighbor_network(port=self.tx_host_0.port, - mac=self.tx_host_0.mac, - ip=self.tx_host_0.ip, - ip_prefix=self.tx_host_0.ip_prefix, - peer_port=self.tx_host_0.peer.port, - peer_mac=self.tx_host_0.peer.mac, - peer_ip=self.tx_host_0.peer.ip, - client_mac="00:03:00:00:05:16", - client_ip="cccc::30", - client_vni=10) - - self.tx_host_2 = self.define_neighbor_network(port=self.tx_host_0.port, - mac=self.tx_host_0.mac, - ip="9.0.0.1", - ip_prefix="9.0.0.0/24", - peer_port=self.tx_host_0.peer.port, - peer_mac=self.tx_host_0.peer.mac, - peer_ip=self.tx_host_0.peer.ip, - client_mac="00:10:00:00:AA:20", - client_ip="dddd::40", - client_vni=30) - - self.rx_host_0 = self.rx_host - - self.rx_host_1 = self.define_neighbor_network(port=self.rx_host_0.port, - mac=self.rx_host_0.mac, - ip=self.rx_host_0.ip, - ip_prefix=self.rx_host_0.ip_prefix, - peer_port=self.rx_host_0.peer.port, - peer_mac=self.rx_host_0.peer.mac, - peer_ip=self.rx_host_0.peer.ip, - client_mac="00:05:00:00:06:17", - client_ip="eeee::50", - client_vni=20) - - self.vip_create(self.tx_host_0.peer.ip) - - # direction lookup VNI, reserved VNI assigned to the VM->Appliance - self.direction_lookup_create(self.rx_host_0.client.vni) - self.direction_lookup_create(self.rx_host_1.client.vni) - - src_vnet_0 = self.vnet_create(vni=self.tx_host_0.client.vni) - src_vnet_1 = self.vnet_create(vni=self.tx_host_1.client.vni) - - dst_vnet_0 = self.vnet_create(vni=self.rx_host_0.client.vni) - dst_vnet_1 = self.vnet_create(vni=self.rx_host_1.client.vni) - - # ENI 0 configuration - eni_id_0 = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.rx_host_0.ip), - vm_vni=self.rx_host_0.client.vni, - vnet_id=dst_vnet_0) - self.eni_mac_map_create(eni_id_0, self.rx_host_0.client.mac) # ENI MAC - - # Inbound routing decap - self.inbound_routing_decap_create(eni_id_0, vni=self.tx_host_2.client.vni, - sip=self.tx_host_2.ip, sip_mask="255.255.255.0") - - # Inbound routing decap PA Validate - self.inbound_routing_decap_validate_create(eni_id_0, vni=self.tx_host_0.client.vni, - sip=self.tx_host_0.ip, sip_mask="255.255.255.0", - src_vnet_id=src_vnet_0) - # PA validation entry with Permit action - self.pa_validation_create(self.tx_host_0.ip, src_vnet_0) - - # ENI 1 configuration - eni_id_1 = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.rx_host_1.ip), - vm_vni=self.rx_host_1.client.vni, - vnet_id=dst_vnet_1) - self.eni_mac_map_create(eni_id_1, self.rx_host_1.client.mac) # ENI MAC - - # Inbound routing PA Validate - self.inbound_routing_decap_validate_create(eni_id_1, vni=self.tx_host_1.client.vni, - sip=self.tx_host_1.ip, sip_mask="255.255.255.0", - src_vnet_id=src_vnet_1) - # PA validation entry with Permit action - self.pa_validation_create(self.tx_host_1.ip, src_vnet_1) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetInboundMultiplePaValidatesMultipleEniTwoPortsTest(Vnet2VnetInboundMultiplePaValidatesMultipleEniSinglePortTest): - """ - Inbound Vnet to Vnet scenario test case with - multiple inbound routing entries (2 PA validate and 1 Decap) - with underlay config (2 neighbours, 2 next-hops, 3 routes) - - Connections: - Positive scenarios: - tx_host_0 -> rx_host_0 (ENI 0) with PA validation - tx_host_1 -> rx_host_1 (ENI 1) with PA validation - tx_host_2 -> rx_host_0 (ENI 0) without PA validation - """ - - def runTest(self): - self.configureTest() - self.configure_underlay() - - self.vnet2VnetInboundRoutingPositiveTest(tx_equal_to_rx=False) - - def configure_underlay(self): - rif_0 = self.router_interface_create(self.tx_host_0.peer.port, - src_mac=self.tx_host_0.peer.mac) - nhop_0 = self.nexthop_create(rif_0, self.tx_host_0.ip) - self.neighbor_create(rif_0, self.tx_host_0.ip, self.tx_host_0.mac) - self.route_create(self.tx_host_0.ip_prefix, nhop_0) - self.route_create(self.tx_host_2.ip_prefix, nhop_0) - - rif_1 = self.router_interface_create(self.rx_host_0.peer.port, - src_mac=self.rx_host_0.peer.mac) - nhop_1 = self.nexthop_create(rif_1, self.rx_host_0.ip) - self.neighbor_create(rif_1, self.rx_host_0.ip, self.rx_host_0.mac) - self.route_create(self.rx_host_1.ip_prefix, nhop_1) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetInboundMultiplePaValidatesMultipleEniTwoPortsOverlayIpv6Test(Vnet2VnetInboundMultiplePaValidatesMultipleEniSinglePortOverlayIpv6Test): - """ - Underlay IPv4 and Overlay IPv6 configs - Inbound Vnet to Vnet scenario test case with - multiple inbound routing entries (2 PA validate and 1 Decap) - with underlay config (2 neighbours, 2 next-hops, 3 routes) - - Connections: - Positive scenarios: - tx_host_0 -> rx_host_0 (ENI 0) with PA validation - tx_host_1 -> rx_host_1 (ENI 1) with PA validation - tx_host_2 -> rx_host_0 (ENI 0) without PA validation - """ - - def runTest(self): - self.configureTest() - self.configure_underlay() - - self.vnet2VnetInboundRoutingPositiveTest(tx_equal_to_rx=False) - - def configure_underlay(self): - rif_0 = self.router_interface_create(self.tx_host_0.peer.port, - src_mac=self.tx_host_0.peer.mac) - nhop_0 = self.nexthop_create(rif_0, self.tx_host_0.ip) - self.neighbor_create(rif_0, self.tx_host_0.ip, self.tx_host_0.mac) - self.route_create(self.tx_host_0.ip_prefix, nhop_0) - self.route_create(self.tx_host_2.ip_prefix, nhop_0) - - rif_1 = self.router_interface_create(self.rx_host_0.peer.port, - src_mac=self.rx_host_0.peer.mac) - nhop_1 = self.nexthop_create(rif_1, self.rx_host_0.ip) - self.neighbor_create(rif_1, self.rx_host_0.ip, self.rx_host_0.mac) - self.route_create(self.rx_host_1.ip_prefix, nhop_1) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetSingleInboundRouteMultiplePaValidateSinglePortTest(VnetApiEndpoints, VnetTrafficMixin): - """ - Inbound Vnet to Vnet scenario test case with - VXLAN_DECAP_PA_VALIDATE inbound routing entry action with multiple PA validate entries - with underlay config (neighbour + next hop) but without underlay routes - - Verifies positive and negative scenarios - """ - - def runTest(self): - # Reconfigure configuration for tx equal to rx - self.update_configuration_for_tx_equal_to_rx() - self.configureTest() - self.configure_underlay(self.tx_host_0, add_routes=False) - - self.vnet2VnetInboundRoutingTest(tx_equal_to_rx=True) - - def configureTest(self): - """ - Setup DUT in accordance with test purpose - """ - self.tx_host_0 = self.tx_host - - self.tx_host_1 = self.define_neighbor_network(port=self.tx_host_0.port, - mac=self.tx_host_0.mac, - ip="10.10.1.20", - ip_prefix=self.tx_host_0.ip_prefix, - peer_port=self.tx_host_0.peer.port, - peer_mac=self.tx_host_0.peer.mac, - peer_ip=self.tx_host_0.peer.ip, - client_mac="00:03:00:00:05:16", - client_ip="192.168.2.1", - client_vni=self.tx_host_0.client.vni) - - self.tx_host_2 = self.define_neighbor_network(port=self.tx_host_0.port, - mac=self.tx_host_0.mac, - ip="10.10.1.189", - ip_prefix=self.tx_host_0.ip_prefix, - peer_port=self.tx_host_0.peer.port, - peer_mac=self.tx_host_0.peer.mac, - peer_ip=self.tx_host_0.peer.ip, - client_mac="00:10:00:00:AA:20", - client_ip="192.168.3.1", - client_vni=self.tx_host_0.client.vni) - - self.tx_host_3 = self.define_neighbor_network(port=self.tx_host_0.port, - mac=self.tx_host_0.mac, - ip="10.10.1.200", # for PA validate missmatch - ip_prefix=self.tx_host_0.ip_prefix, - peer_port=self.tx_host_0.peer.port, - peer_mac=self.tx_host_0.peer.mac, - peer_ip=self.tx_host_0.peer.ip, - client_mac="00:AA:00:23:CC:20", - client_ip="192.168.4.1", - client_vni=self.tx_host_0.client.vni) - - self.tx_host_4 = self.define_neighbor_network(port=self.tx_host_0.port, - mac=self.tx_host_0.mac, - ip="10.10.2.20", # for Inbound route missmatch - ip_prefix=self.tx_host_0.ip_prefix, - peer_port=self.tx_host_0.peer.port, - peer_mac=self.tx_host_0.peer.mac, - peer_ip=self.tx_host_0.peer.ip, - client_mac="00:BB:00:00:AC:A0", - client_ip="192.168.4.1", - client_vni=self.tx_host_0.client.vni) - - self.vip_create(self.tx_host_0.peer.ip) - - # direction lookup VNI, reserved VNI assigned to the VM->Appliance - self.direction_lookup_create(self.rx_host.client.vni) - - src_vnet = self.vnet_create(vni=self.tx_host_0.client.vni) - dst_vnet = self.vnet_create(vni=self.rx_host.client.vni) - - eni_id = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.rx_host.ip), - vm_vni=self.rx_host.client.vni, - vnet_id=dst_vnet) - self.eni_mac_map_create(eni_id, self.rx_host.client.mac) # ENI MAC - - # Inbound routing PA Validate - self.inbound_routing_decap_validate_create(eni_id, vni=self.tx_host_0.client.vni, - sip=self.tx_host_0.ip, sip_mask="255.255.255.0", - src_vnet_id=src_vnet) - # PA validation entries with Permit action - self.pa_validation_create(self.tx_host_0.ip, src_vnet) - self.pa_validation_create(self.tx_host_1.ip, src_vnet) - self.pa_validation_create(self.tx_host_2.ip, src_vnet) - - def vnet2VnetInboundRoutingTest(self, tx_equal_to_rx): - """ - Inbound VNET to VNET test - Verifies correct packet routing - """ - - print(f"\nPA validate {self.tx_host_0.ip} verification, expect pass") - self.verify_traffic_scenario(client=self.tx_host_0, server=self.rx_host, - connection=self.connection, fake_mac=False, tx_equal_to_rx=tx_equal_to_rx) - - print(f"\nPA validate {self.tx_host_1.ip} verification, expect pass") - self.verify_traffic_scenario(client=self.tx_host_1, server=self.rx_host, - connection=self.connection, fake_mac=False, tx_equal_to_rx=tx_equal_to_rx) - - print(f"\nPA validate {self.tx_host_2.ip} verification, expect pass") - self.verify_traffic_scenario(client=self.tx_host_2, server=self.rx_host, - connection=self.connection, fake_mac=False, tx_equal_to_rx=tx_equal_to_rx) - - print(f"\nPA validate {self.tx_host_3.ip} verification, expect drop - PA validation missmatch") - self.verify_negative_traffic_scenario(client=self.tx_host_3, server=self.rx_host, - fake_mac=False, valid_pkt_drop=True) - - print(f"\nPA validate {self.tx_host_4.ip} verification, expect drop - Inbound route missmatch") - self.verify_negative_traffic_scenario(client=self.tx_host_4, server=self.rx_host, - fake_mac=False, valid_pkt_drop=True) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetSingleInboundRouteMultiplePaValidateSinglePortIpv6Test(Vnet2VnetSingleInboundRouteMultiplePaValidateSinglePortTest): - """ - Underlay IPv4 and Overlay IPv6 configs - Inbound Vnet to Vnet scenario test case with - VXLAN_DECAP_PA_VALIDATE inbound routing entry action with multiple PA validate entries - with underlay config (neighbour + next hop) but without underlay routes - - Verifies positive and negative scenarios - """ - - def setUp(self): - super(Vnet2VnetSingleInboundRouteMultiplePaValidateSinglePortIpv6Test, self).setUp(overlay_ipv6=True) - - def runTest(self): - # Reconfigure configuration for tx equal to rx - self.update_configuration_for_tx_equal_to_rx() - self.configureTest() - self.configure_underlay(self.tx_host_0, add_routes=False) - - self.vnet2VnetInboundRoutingTest(tx_equal_to_rx=True) - - def configureTest(self): - """ - Setup DUT in accordance with test purpose - """ - self.tx_host_0 = self.tx_host - - self.tx_host_1 = self.define_neighbor_network(port=self.tx_host_0.port, - mac=self.tx_host_0.mac, - ip="10.10.1.15", - ip_prefix=self.tx_host_0.ip_prefix, - peer_port=self.tx_host_0.peer.port, - peer_mac=self.tx_host_0.peer.mac, - peer_ip=self.tx_host_0.peer.ip, - client_mac="00:03:00:00:05:16", - client_ip="cccc::40", - client_vni=self.tx_host_0.client.vni) - - self.tx_host_2 = self.define_neighbor_network(port=self.tx_host_0.port, - mac=self.tx_host_0.mac, - ip="10.10.1.100", - ip_prefix=self.tx_host_0.ip_prefix, - peer_port=self.tx_host_0.peer.port, - peer_mac=self.tx_host_0.peer.mac, - peer_ip=self.tx_host_0.peer.ip, - client_mac="00:10:00:00:AA:20", - client_ip="dddd::50", - client_vni=self.tx_host_0.client.vni) - - self.tx_host_3 = self.define_neighbor_network(port=self.tx_host_0.port, - mac=self.tx_host_0.mac, - ip="10.10.1.3", # for PA validate missmatch - ip_prefix=self.tx_host_0.ip_prefix, - peer_port=self.tx_host_0.peer.port, - peer_mac=self.tx_host_0.peer.mac, - peer_ip=self.tx_host_0.peer.ip, - client_mac="00:AA:00:23:CC:20", - client_ip="eeee::60", - client_vni=self.tx_host_0.client.vni) - - self.tx_host_4 = self.define_neighbor_network(port=self.tx_host_0.port, - mac=self.tx_host_0.mac, - ip="10.10.12.20", # for Inbound route missmatch - ip_prefix=self.tx_host_0.ip_prefix, - peer_port=self.tx_host_0.peer.port, - peer_mac=self.tx_host_0.peer.mac, - peer_ip=self.tx_host_0.peer.ip, - client_mac="00:BB:00:00:AC:A0", - client_ip="2603::10", - client_vni=self.tx_host_0.client.vni) - - self.vip_create(self.tx_host_0.peer.ip) - - # direction lookup VNI, reserved VNI assigned to the VM->Appliance - self.direction_lookup_create(self.rx_host.client.vni) - - src_vnet = self.vnet_create(vni=self.tx_host_0.client.vni) - dst_vnet = self.vnet_create(vni=self.rx_host.client.vni) - - eni_id = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.rx_host.ip), - vm_vni=self.rx_host.client.vni, - vnet_id=dst_vnet) - self.eni_mac_map_create(eni_id, self.rx_host.client.mac) # ENI MAC - - # Inbound routing PA Validate - self.inbound_routing_decap_validate_create(eni_id, vni=self.tx_host_0.client.vni, - sip=self.tx_host_0.ip, sip_mask="255.255.255.0", - src_vnet_id=src_vnet) - # PA validation entries with Permit action - self.pa_validation_create(self.tx_host_0.ip, src_vnet) - self.pa_validation_create(self.tx_host_1.ip, src_vnet) - self.pa_validation_create(self.tx_host_2.ip, src_vnet) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetSingleInboundRouteMultiplePaValidateTwoPortsTest(Vnet2VnetSingleInboundRouteMultiplePaValidateSinglePortTest): - """ - Inbound Vnet to Vnet scenario test case with - VXLAN_DECAP_PA_VALIDATE inbound routing entry action with multiple PA validate entries - with full underlay config (2 neighbours + 2 next hops + 2 routes) - - Verifies positive and negative scenarios - """ - - def runTest(self): - self.configureTest() - self.configure_underlay(self.tx_host_0, self.rx_host) - - self.vnet2VnetInboundRoutingTest(tx_equal_to_rx=False) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetSingleInboundRouteMultiplePaValidateTwoPortsIpv6Test(Vnet2VnetSingleInboundRouteMultiplePaValidateSinglePortIpv6Test): - """ - Underlay IPv4 and Overlay IPv6 configs - Inbound Vnet to Vnet scenario test case with - VXLAN_DECAP_PA_VALIDATE inbound routing entry action with multiple PA validate entries - with underlay config (2 neighbours + 2 next hops + 2 routes) - - Verifies positive and negative scenarios - """ - - def runTest(self): - self.configureTest() - self.configure_underlay(self.tx_host_0, self.rx_host) - - self.vnet2VnetInboundRoutingTest(tx_equal_to_rx=False) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetInboundEniSetUpDownSinglePortTest(VnetApiEndpoints, VnetTrafficMixin): - """ - Inbound Vnet to Vnet test scenario - Verifies packets forwarding/drop in accordance with ENI admin state - """ - - def runTest(self): - # Reconfigure configuration for tx equal to rx - self.update_configuration_for_tx_equal_to_rx() - self.configureTest() - self.configure_underlay(self.tx_host, add_routes=False) - - self.vnet2VnetEniUpTrafficTest(tx_equal_to_rx=True) - self.eni_set_admin_state(self.eni_id, "down") - self.vnet2VnetEniDownTrafficTest() - self.eni_set_admin_state(self.eni_id, "up") - self.vnet2VnetEniUpTrafficTest(tx_equal_to_rx=True) - - def configureTest(self): - """ - Setup DUT overlay in accordance with test purpose - """ - - self.vip_create(self.tx_host.peer.ip) - - # direction lookup VNI, reserved VNI assigned to the VM->Appliance - self.direction_lookup_create(self.rx_host.client.vni) - - dst_vnet = self.vnet_create(vni=self.rx_host.client.vni) - - self.eni_id = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.rx_host.ip), - vm_vni=self.rx_host.client.vni, - vnet_id=dst_vnet) - self.eni_mac_map_create(self.eni_id, self.rx_host.client.mac) # ENI MAC - - # Inbound routing PA Validate - self.inbound_routing_decap_create(self.eni_id, vni=self.tx_host.client.vni, - sip=self.tx_host.ip, sip_mask="255.255.255.0") - - def vnet2VnetEniUpTrafficTest(self, tx_equal_to_rx): - """ - Verifies inbound packet routing when ENI admin state is UP - """ - - self.verify_traffic_scenario(client=self.tx_host, server=self.rx_host, - connection=self.connection, fake_mac=False, tx_equal_to_rx=tx_equal_to_rx) - - print('\n', self.vnet2VnetEniUpTrafficTest.__name__, ' OK') - - def vnet2VnetEniDownTrafficTest(self): - """ - Verifies inbound packet drop when ENI admin state is DOWN - """ - - self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, - fake_mac=False, valid_pkt_drop=True) - - print('\n', self.vnet2VnetEniDownTrafficTest.__name__, ' OK') - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetInboundEniSetUpDownTwoPortsTest(Vnet2VnetInboundEniSetUpDownSinglePortTest): - """ - Inbound Vnet to Vnet test scenario - Verifies packets forwarding/drop in accordance with ENI admin state - """ - - def runTest(self): - self.configureTest() - self.configure_underlay(self.tx_host, self.rx_host) - - self.vnet2VnetEniUpTrafficTest(tx_equal_to_rx=True) - self.eni_set_admin_state(self.eni_id, "down") - self.vnet2VnetEniDownTrafficTest() - self.eni_set_admin_state(self.eni_id, "up") - self.vnet2VnetEniUpTrafficTest(tx_equal_to_rx=True) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundRouteVnetDirectSinglePortTest(VnetApiEndpoints, VnetTrafficMixin): - """ - Outbound Vnet to Vnet test scenario with Outbound routing entry - SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET_DIRECT action - with underlay config (neighbour + next hop) but without underlay routes - """ - - def runTest(self): - # Reconfigure configuration for tx equal to rx - self.update_configuration_for_tx_equal_to_rx() - self.configureTest() - self.configure_underlay(self.tx_host, add_routes=False) - - self.vnet2VnetOutboundRoutingTest(tx_equal_to_rx=True) - self.vnet2VnetOutboundNegativeTest() - - def configureTest(self): - """ - Setup DUT in accordance with test purpose - """ - - self.vip_create(self.tx_host.peer.ip) - - # direction lookup VNI, reserved VNI assigned to the VM->Appliance - self.direction_lookup_create(self.tx_host.client.vni) - - src_vnet = self.vnet_create(vni=self.tx_host.client.vni) - dst_vnet = self.vnet_create(vni=self.rx_host.client.vni) - - eni_id = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.tx_host.ip), - vm_vni=self.tx_host.client.vni, - vnet_id=src_vnet) - self.eni_mac_map_create(eni_id, self.tx_host.client.mac) # ENI MAC - # outbound routing - self.outbound_routing_vnet_direct_create(eni_id, "192.168.1.0/24", dst_vnet, - overlay_ip="192.168.1.10") - self.outbound_ca_to_pa_create(dst_vnet, # DST vnet id - "192.168.1.10", # DST IP addr - self.rx_host.ip, # Underlay DIP - overlay_dmac=self.rx_host.client.mac) - - def vnet2VnetOutboundRoutingTest(self, tx_equal_to_rx): - """ - Outbound VNET to VNET test - Verifies correct packet routing - """ - - self.verify_traffic_scenario(client=self.tx_host, server=self.rx_host, - connection=self.connection, fake_mac=True, tx_equal_to_rx=tx_equal_to_rx) - - print('\n', self.vnet2VnetOutboundRoutingTest.__name__, ' OK') - - def vnet2VnetOutboundNegativeTest(self): - """ - Verifies negative scenarios (packet drop): - - wrong VIP - - routing drop (CA Dst IP does not match any routing entry) - - wrong CA Src MAC (does not match any ENI) - """ - - invalid_vip = "10.10.10.10" - wrong_inner_dst_ip = "192.168.200.200" - wrong_inner_src_ca_mac = "00:aa:00:aa:00:aa" - - self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, - fake_mac=True, invalid_vip=invalid_vip, - invalid_inner_dst_ip=wrong_inner_dst_ip, - invalid_inner_src_mac=wrong_inner_src_ca_mac) - - print('\n', self.vnet2VnetOutboundNegativeTest.__name__, ' OK') - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundRouteVnetDirectSinglePortOverlayIpv6Test(Vnet2VnetOutboundRouteVnetDirectSinglePortTest): - """ - Underlay IPv4 and Overlay IPv6 configs - Outbound Vnet to Vnet test scenario with Outbound routing entry - SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET_DIRECT action - with underlay config (neighbour + next hop) but without underlay routes - """ - - def setUp(self): - super(Vnet2VnetOutboundRouteVnetDirectSinglePortOverlayIpv6Test, self).setUp(overlay_ipv6=True) - - def configureTest(self): - """ - Setup DUT in accordance with test purpose - """ - - self.vip_create(self.tx_host.peer.ip) - - # direction lookup VNI, reserved VNI assigned to the VM->Appliance - self.direction_lookup_create(self.tx_host.client.vni) - - src_vnet = self.vnet_create(vni=self.tx_host.client.vni) - dst_vnet = self.vnet_create(vni=self.rx_host.client.vni) - - eni_id = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.tx_host.ip), - vm_vni=self.tx_host.client.vni, - vnet_id=src_vnet) - self.eni_mac_map_create(eni_id, self.tx_host.client.mac) # ENI MAC - # outbound routing - self.outbound_routing_vnet_direct_create(eni_id, "bbbb::0/64", dst_vnet, - overlay_ip="bbbb::bc") - self.outbound_ca_to_pa_create(dst_vnet, # DST vnet id - "bbbb::bc", # DST IP addr - self.rx_host.ip, # Underlay DIP - overlay_dmac=self.rx_host.client.mac) - - def vnet2VnetOutboundNegativeTest(self): - """ - Verifies negative scenarios (packet drop): - - wrong VIP - - routing drop (CA Dst IP does not match any routing entry) - - wrong CA Src MAC (does not match any ENI) - """ - - invalid_vip = "10.10.10.10" - wrong_inner_dst_ip = "dddd::dc" - wrong_inner_src_ca_mac = "00:aa:00:aa:00:aa" - - self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, - fake_mac=True, invalid_vip=invalid_vip, - invalid_inner_dst_ip=wrong_inner_dst_ip, - invalid_inner_src_mac=wrong_inner_src_ca_mac) - - print('\n', self.vnet2VnetOutboundNegativeTest.__name__, ' OK') - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundRouteVnetDirectTwoPortsTest(Vnet2VnetOutboundRouteVnetDirectSinglePortTest): - """ - Outbound Vnet to Vnet test scenario with Outbound routing entry - SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET_DIRECT action - with full underlay config (2 neighbours, 2 next-hops, 2 routes) - """ - - def runTest(self): - self.configureTest() - self.configure_underlay(self.tx_host, self.rx_host) - - self.vnet2VnetOutboundRoutingTest(tx_equal_to_rx=False) - self.vnet2VnetOutboundNegativeTest() - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundRouteVnetDirectTwoPortsOverlayIpv6Test(Vnet2VnetOutboundRouteVnetDirectSinglePortOverlayIpv6Test): - """ - Underlay IPv4 and Overlay IPv6 configs - Outbound Vnet to Vnet test scenario with Outbound routing entry - SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET_DIRECT action - with full underlay config (2 neighbours, 2 next-hops, 2 routes) - """ - - def runTest(self): - self.configureTest() - self.configure_underlay(self.tx_host, self.rx_host) - - self.vnet2VnetOutboundRoutingTest(tx_equal_to_rx=False) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundRouteVnetSinglePortTest(VnetApiEndpoints, VnetTrafficMixin): - """ - Outbound Vnet to Vnet test scenario with outbound routing entry - SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET action - with underlay config (neighbour + next hop) but without underlay routes - """ - - def runTest(self): - # Reconfigure configuration for tx equal to rx - self.update_configuration_for_tx_equal_to_rx() - self.configureTest() - self.configure_underlay(self.tx_host, add_routes=False) - - self.vnet2VnetOutboundRoutingTest(tx_equal_to_rx=True) - self.vnet2VnetOutboundNegativeTest() - - def configureTest(self): - """ - Setup DUT in accordance with test purpose - """ - - self.vip_create(self.tx_host.peer.ip) - - # direction lookup VNI, reserved VNI assigned to the VM->Appliance - self.direction_lookup_create(self.tx_host.client.vni) - - src_vnet = self.vnet_create(vni=self.tx_host.client.vni) - dst_vnet = self.vnet_create(vni=self.rx_host.client.vni) - - eni_id = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.tx_host.ip), - vm_vni=self.tx_host.client.vni, - vnet_id=src_vnet) - self.eni_mac_map_create(eni_id, self.tx_host.client.mac) # ENI MAC - - self.outbound_routing_vnet_create(eni_id=eni_id, lpm="192.168.1.0/24", - dst_vnet_id=dst_vnet) - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet, - dip=self.rx_host.client.ip, - underlay_dip=self.rx_host.ip, - overlay_dmac=self.rx_host.client.mac, - use_dst_vnet_vni=True) - - def vnet2VnetOutboundRoutingTest(self, tx_equal_to_rx): - """ - Outbound VNET to VNET test - Verifies correct packet routing - """ - - self.verify_traffic_scenario(client=self.tx_host, server=self.rx_host, - connection=self.connection, fake_mac=True, tx_equal_to_rx=tx_equal_to_rx) - - print('\n', self.vnet2VnetOutboundRoutingTest.__name__, ' OK') - - - def vnet2VnetOutboundNegativeTest(self): - """ - Verifies negative scenarios (packet drop): - - wrong VIP - - routing drop (CA Dst IP does not match any routing entry) - - wrong CA Src MAC (does not match any ENI) - - mapping drop (CA Dst IP matches routing entry prefix but drops by ca_to_pa) - """ - - invalid_vip = "10.10.10.10" - wrong_inner_dst_ip = "192.168.200.200" - wrong_inner_src_ca_mac = "00:aa:00:aa:00:aa" - - self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, - fake_mac=True, invalid_vip=invalid_vip, - invalid_inner_dst_ip=wrong_inner_dst_ip, - invalid_inner_src_mac=wrong_inner_src_ca_mac) - - wrong_inner_dst_ip = "192.168.1.200" - self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, - fake_mac=True, invalid_inner_dst_ip=wrong_inner_dst_ip) - - print('\n', self.vnet2VnetOutboundNegativeTest.__name__, ' OK') - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundRouteVnetSinglePortOverlayIpv6Test(Vnet2VnetOutboundRouteVnetSinglePortTest): - """ - Underlay IPv4 and Overlay IPv6 configs - Outbound Vnet to Vnet test scenario with outbound routing entry - SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET action - with underlay config (neighbour + next hop) but without underlay routes - """ - def setUp(self): - super(Vnet2VnetOutboundRouteVnetSinglePortOverlayIpv6Test, self).setUp(overlay_ipv6=True) - - def configureTest(self): - """ - Setup DUT in accordance with test purpose - """ - - self.vip_create(self.tx_host.peer.ip) - - # direction lookup VNI, reserved VNI assigned to the VM->Appliance - self.direction_lookup_create(self.tx_host.client.vni) - - src_vnet = self.vnet_create(vni=self.tx_host.client.vni) - dst_vnet = self.vnet_create(vni=self.rx_host.client.vni) - - eni_id = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.tx_host.ip), - vm_vni=self.tx_host.client.vni, - vnet_id=src_vnet) - self.eni_mac_map_create(eni_id, self.tx_host.client.mac) # ENI MAC - - self.outbound_routing_vnet_create(eni_id=eni_id, lpm="bbbb::0/64", - dst_vnet_id=dst_vnet) - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet, - dip=self.rx_host.client.ip, - underlay_dip=self.rx_host.ip, - overlay_dmac=self.rx_host.client.mac, - use_dst_vnet_vni=True) - - def vnet2VnetOutboundNegativeTest(self): - """ - Verifies negative scenarios (packet drop): - - wrong VIP - - routing drop (CA Dst IP does not match any routing entry) - - wrong CA Src MAC (does not match any ENI) - - mapping drop (CA Dst IP matches routing entry prefix but drops by ca_to_pa) - """ - - invalid_vip = "10.10.10.10" - wrong_inner_dst_ip = "dddd::dc" - wrong_inner_src_ca_mac = "00:aa:00:aa:00:aa" - - self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, - fake_mac=True, invalid_vip=invalid_vip, - invalid_inner_dst_ip=wrong_inner_dst_ip, - invalid_inner_src_mac=wrong_inner_src_ca_mac) - - wrong_inner_dst_ip = "bbbb::dc" - self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, - fake_mac=True, - invalid_inner_dst_ip=wrong_inner_dst_ip) - - print('\n', self.vnet2VnetOutboundNegativeTest.__name__, ' OK') - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundRouteVnetTwoPortsTest(Vnet2VnetOutboundRouteVnetSinglePortTest): - """ - Outbound Vnet to Vnet test scenario with outbound routing entry - SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET action - with full underlay config (2 neighbours, 2 next-hops, 2 routes) - """ - - def runTest(self): - self.configureTest() - self.configure_underlay(self.tx_host, self.rx_host) - - self.vnet2VnetOutboundRoutingTest(tx_equal_to_rx=False) - self.vnet2VnetOutboundNegativeTest() - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundRouteVnetTwoPortsOverlayIpv6Test(Vnet2VnetOutboundRouteVnetSinglePortOverlayIpv6Test): - """ - Underlay IPv4 and Overlay IPv6 configs - Outbound Vnet to Vnet test scenario with outbound routing entry - SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET action - with full underlay config (2 neighbours, 2 next-hops, 2 routes) - """ - - def runTest(self): - self.configureTest() - self.configure_underlay(self.tx_host, self.rx_host) - - self.vnet2VnetOutboundRoutingTest(tx_equal_to_rx=False) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundEniSetUpDownSinglePortTest(VnetApiEndpoints, VnetTrafficMixin): - """ - Outbound Vnet to Vnet test scenario - Verifies packets forwarding/drop in accordance with ENI admin state - """ - - def runTest(self): - # Reconfigure configuration for tx equal to rx - self.update_configuration_for_tx_equal_to_rx() - self.configureTest() - self.configure_underlay(self.tx_host, add_routes=False) - - self.vnet2VnetEniUpTrafficTest(tx_equal_to_rx=True) - self.eni_set_admin_state(self.eni_id, "down") - self.vnet2VnetEniDownTrafficTest() - self.eni_set_admin_state(self.eni_id, "up") - self.vnet2VnetEniUpTrafficTest(tx_equal_to_rx=True) - - def configureTest(self): - """ - Setup DUT in accordance with test purpose - """ - - self.vip_create(self.tx_host.peer.ip) - - # direction lookup VNI, reserved VNI assigned to the VM->Appliance - self.direction_lookup_create(self.tx_host.client.vni) - - src_vnet = self.vnet_create(vni=self.tx_host.client.vni) - dst_vnet = self.vnet_create(vni=self.rx_host.client.vni) - - self.eni_id = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.tx_host.ip), - vm_vni=self.tx_host.client.vni, - vnet_id=src_vnet) - self.eni_mac_map_create(self.eni_id, self.tx_host.client.mac) # ENI MAC - - self.outbound_routing_vnet_create(eni_id=self.eni_id, lpm="192.168.1.0/24", - dst_vnet_id=dst_vnet) - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet, - dip=self.rx_host.client.ip, - underlay_dip=self.rx_host.ip, - overlay_dmac=self.rx_host.client.mac, - use_dst_vnet_vni=True) - - def vnet2VnetEniUpTrafficTest(self, tx_equal_to_rx): - """ - Verifies correct outbound packet routing when ENI admin state is UP - """ - - self.verify_traffic_scenario(client=self.tx_host, server=self.rx_host, - connection=self.connection, fake_mac=True, tx_equal_to_rx=tx_equal_to_rx) - - print('\n', self.vnet2VnetEniUpTrafficTest.__name__, ' OK') - - def vnet2VnetEniDownTrafficTest(self): - """ - Verifies outbound packet drop when ENI admin state is DOWN - """ - - self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, - fake_mac=True, valid_pkt_drop=True) - - print('\n', self.vnet2VnetEniDownTrafficTest.__name__, ' OK') - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundEniSetUpDownTwoPortsTest(Vnet2VnetOutboundEniSetUpDownSinglePortTest): - """ - Outbound Vnet to Vnet test scenario - Verifies packets forwarding/drop in accordance with ENI admin state - """ - - def runTest(self): - self.configureTest() - self.configure_underlay(self.tx_host, self.rx_host) - - self.vnet2VnetEniUpTrafficTest(tx_equal_to_rx=True) - self.eni_set_admin_state(self.eni_id, "down") - self.vnet2VnetEniDownTrafficTest() - self.eni_set_admin_state(self.eni_id, "up") - self.vnet2VnetEniUpTrafficTest(tx_equal_to_rx=True) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundRouteDirectSinglePortTest(VnetApiEndpoints, VnetTrafficMixin): - """ - Outbound Vnet to Vnet test scenario with Outbound routing entry - SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_DIRECT action - with underlay config (neighbour + next hop) but without underlay routes - """ - - def runTest(self): - self.update_configuration_for_tx_equal_to_rx() - self.configureTest() - self.configure_underlay(self.tx_host, add_routes=False) - - self.outboundRouteDirectTest(tx_equal_to_rx=True) - self.outboundRouteDirectNegativeTest() - - def configureTest(self): - """ - Setup DUT in accordance with test purpose - """ - - self.vip_create(self.tx_host.client.ip) # Appliance VIP - - # direction lookup VNI, reserved VNI assigned to the VM->Appliance - self.direction_lookup_create(self.tx_host.client.vni) - - src_vnet = self.vnet_create(vni=self.tx_host.client.vni) - - eni_id = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.tx_host.ip), - vm_vni=self.tx_host.client.vni, - vnet_id=src_vnet) - - self.eni_mac_map_create(eni_id, self.tx_host.client.mac) - - # outbound routing - self.outbound_routing_direct_create(eni_id, "192.168.1.0/24") - - def outboundRouteDirectTest(self, tx_equal_to_rx): - - self.verify_traffic_scenario(client=self.tx_host, server=self.rx_host, - connection=self.connection, fake_mac=True, - tx_equal_to_rx=tx_equal_to_rx, - route_direct=True) - - def outboundRouteDirectNegativeTest(self): - """ - Verifies negative scenarios (packet drop): - - wrong VIP - - routing drop (CA Dst IP does not match any routing entry) - - wrong CA Src MAC (does not match any ENI) - - mapping drop (CA Dst IP matches routing entry prefix but drops by ca_to_pa) - """ - - invalid_vip = "10.10.10.10" - wrong_inner_dst_ip = "192.168.200.200" - wrong_inner_src_ca_mac = "00:aa:00:aa:00:aa" - - self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, - fake_mac=True, invalid_vip=invalid_vip, - invalid_inner_dst_ip=wrong_inner_dst_ip, - invalid_inner_src_mac=wrong_inner_src_ca_mac) - - wrong_inner_dst_ip = "192.168.1.200" - self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, - fake_mac=True, - invalid_inner_dst_ip=wrong_inner_dst_ip) - - print('\n', self.outboundRouteDirectNegativeTest.__name__, ' OK') - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundRouteDirectSinglePortOverlayIpv6Test(Vnet2VnetOutboundRouteDirectSinglePortTest): - """ - Underlay IPv4 and Overlay IPv6 configs - Outbound Vnet to Vnet test scenario with Outbound routing entry - SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_DIRECT action - with underlay config (neighbour + next hop) but without underlay routes - """ - - def setUp(self): - super(Vnet2VnetOutboundRouteDirectSinglePortOverlayIpv6Test, self).setUp(overlay_ipv6=True) - - def configureTest(self): - """ - Setup DUT in accordance with test purpose - """ - - self.vip_create(self.tx_host.client.ip) # Appliance VIP - - # direction lookup VNI, reserved VNI assigned to the VM->Appliance - self.direction_lookup_create(self.tx_host.client.vni) - - src_vnet = self.vnet_create(vni=self.tx_host.client.vni) - - eni_id = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.tx_host.ip), - vm_vni=self.tx_host.client.vni, - vnet_id=src_vnet) - - self.eni_mac_map_create(eni_id, self.tx_host.client.mac) - - # outbound routing - self.outbound_routing_direct_create(eni_id, "bbbb::0/64") - - def outboundRouteDirectNegativeTest(self): - """ - Verifies negative scenarios (packet drop): - - wrong VIP - - routing drop (CA Dst IP does not match any routing entry) - - wrong CA Src MAC (does not match any ENI) - - mapping drop (CA Dst IP matches routing entry prefix but drops by ca_to_pa) - """ - - invalid_vip = "10.10.10.10" - wrong_inner_dst_ip = "dddd::dc" - wrong_inner_src_ca_mac = "00:aa:00:aa:00:aa" - - self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, - fake_mac=True, invalid_vip=invalid_vip, - invalid_inner_dst_ip=wrong_inner_dst_ip, - invalid_inner_src_mac=wrong_inner_src_ca_mac) - - wrong_inner_dst_ip = "bbbb::dc" - self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, - fake_mac=True, - invalid_inner_dst_ip=wrong_inner_dst_ip) - - print('\n', self.outboundRouteDirectNegativeTest.__name__, ' OK') - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundRouteDirectTwoPortsTest(Vnet2VnetOutboundRouteDirectSinglePortTest): - """ - Outbound Vnet to Vnet test scenario with Outbound routing entry - SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_DIRECT action - with full underlay config (2 neighbours, 2 next-hops, 2 routes) - """ - - def runTest(self): - self.configureTest() - self.configure_underlay(self.tx_host, self.rx_host) - - self.outboundRouteDirectTest(tx_equal_to_rx=False) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundRouteDirectTwoPortsOverlayIpv6Test(Vnet2VnetOutboundRouteDirectSinglePortOverlayIpv6Test): - """ - Underlay IPv4 and Overlay IPv6 configs - Outbound Vnet to Vnet test scenario with Outbound routing entry - SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_DIRECT action - with full underlay config (2 neighbours, 2 next-hops, 2 routes) - """ - - def runTest(self): - self.configureTest() - self.configure_underlay(self.tx_host, self.rx_host) - - self.outboundRouteDirectTest(tx_equal_to_rx=False) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetSingleOutboundRouteMultipleCa2PaSinglePortTest(VnetApiEndpoints, VnetTrafficMixin): - """ - Outbound Vnet to Vnet test scenario with outbound routing entry - SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET action and multiple CA2PA entries - with underlay config (neighbour + next hop) but without underlay routes - """ - - def runTest(self): - # Reconfigure configuration for tx equal to rx - self.update_configuration_for_tx_equal_to_rx() - self.configureTest() - self.configure_underlay(self.tx_host, add_routes=False) - - self.vnet2VnetOutboundRoutingTest(tx_equal_to_rx=True) - self.vnet2VnetOutboundNegativeTest() - - def configureTest(self): - """ - Setup DUT in accordance with test purpose - """ - - self.rx_host_0 = self.rx_host - - self.rx_host_1 = self.define_neighbor_network(port=self.rx_host_0.port, - mac=self.rx_host_0.mac, - ip=self.rx_host_0.ip, - ip_prefix=self.rx_host_0.ip_prefix, - peer_port=self.rx_host_0.peer.port, - peer_mac=self.rx_host_0.peer.mac, - peer_ip=self.rx_host_0.peer.ip, - client_mac="00:03:00:00:05:16", - client_ip="192.168.1.17", - client_vni=self.rx_host_0.client.vni) - - self.rx_host_2 = self.define_neighbor_network(port=self.rx_host_0.port, - mac=self.rx_host_0.mac, - ip=self.rx_host_0.ip, - ip_prefix=self.rx_host_0.ip_prefix, - peer_port=self.rx_host_0.peer.port, - peer_mac=self.rx_host_0.peer.mac, - peer_ip=self.rx_host_0.peer.ip, - client_mac="00:05:00:00:08:18", - client_ip="192.168.1.199", - client_vni=self.rx_host_0.client.vni) - - self.rx_host_3 = self.define_neighbor_network(port=self.rx_host_0.port, - mac=self.rx_host_0.mac, - ip=self.rx_host_0.ip, - ip_prefix=self.rx_host_0.ip_prefix, - peer_port=self.rx_host_0.peer.port, - peer_mac=self.rx_host_0.peer.mac, - peer_ip=self.rx_host_0.peer.ip, - client_mac="00:10:00:00:AA:E1", - client_ip="192.168.1.77", - client_vni=self.rx_host_0.client.vni) - - self.vip_create(self.tx_host.peer.ip) - - self.direction_lookup_create(self.tx_host.client.vni) - - src_vnet = self.vnet_create(vni=self.tx_host.client.vni) - dst_vnet = self.vnet_create(vni=self.rx_host_0.client.vni) - - eni_id = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.tx_host.ip), - vm_vni=self.tx_host.client.vni, - vnet_id=src_vnet) - self.eni_mac_map_create(eni_id, self.tx_host.client.mac) # ENI MAC - - self.outbound_routing_vnet_create(eni_id=eni_id, lpm="192.168.1.0/24", - dst_vnet_id=dst_vnet) - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet, - dip=self.rx_host_0.client.ip, - underlay_dip=self.rx_host_0.ip, - overlay_dmac=self.rx_host_0.client.mac, - use_dst_vnet_vni=True) - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet, - dip=self.rx_host_1.client.ip, - underlay_dip=self.rx_host_1.ip, - overlay_dmac=self.rx_host_1.client.mac, - use_dst_vnet_vni=True) - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet, - dip=self.rx_host_2.client.ip, - underlay_dip=self.rx_host_2.ip, - overlay_dmac=self.rx_host_2.client.mac, - use_dst_vnet_vni=True) - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet, - dip=self.rx_host_3.client.ip, - underlay_dip=self.rx_host_3.ip, - overlay_dmac=self.rx_host_3.client.mac, - use_dst_vnet_vni=False) - - def vnet2VnetOutboundRoutingTest(self, tx_equal_to_rx): - """ - Outbound VNET to VNET test - Verifies correct packet routing - """ - - print(f"\nVerify outbound route to CA {self.rx_host_0.client.ip}, expect pass") - self.verify_traffic_scenario(client=self.tx_host, server=self.rx_host_0, - connection=self.connection, fake_mac=True, tx_equal_to_rx=tx_equal_to_rx) - - print(f"\nVerify outbound route to CA {self.rx_host_1.client.ip}, expect pass") - self.verify_traffic_scenario(client=self.tx_host, server=self.rx_host_1, - connection=self.connection, fake_mac=True, tx_equal_to_rx=tx_equal_to_rx) - - print(f"\nVerify outbound route to CA {self.rx_host_2.client.ip}, expect pass") - self.verify_traffic_scenario(client=self.tx_host, server=self.rx_host_2, - connection=self.connection, fake_mac=True, tx_equal_to_rx=tx_equal_to_rx) - - print(f"\nVerify outbound route to CA {self.rx_host_3.client.ip} and use_dst_vnet=False, expect pass") - self.rx_host_3.client.vni = self.tx_host.client.vni - self.verify_traffic_scenario(client=self.tx_host, server=self.rx_host_3, - connection=self.connection, fake_mac=True, tx_equal_to_rx=tx_equal_to_rx) - - print('\n', self.vnet2VnetOutboundRoutingTest.__name__, ' OK') - - def vnet2VnetOutboundNegativeTest(self): - """ - Verifies negative scenarios (packet drop): - - wrong VIP - - routing drop (CA Dst IP does not match any routing entry) - - wrong CA Src MAC (does not match any ENI) - - mapping drop (CA Dst IP matches routing entry prefix but drops by ca_to_pa) - """ - - invalid_vip = "10.10.10.10" - wrong_inner_dst_ip = "192.168.200.200" - wrong_inner_src_ca_mac = "00:aa:00:aa:00:aa" - - self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, - fake_mac=True, invalid_vip=invalid_vip, - invalid_inner_dst_ip=wrong_inner_dst_ip, - invalid_inner_src_mac=wrong_inner_src_ca_mac) - - wrong_inner_dst_ip = "192.168.1.200" - self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, - fake_mac=True, invalid_inner_dst_ip=wrong_inner_dst_ip) - - print('\n', self.vnet2VnetOutboundNegativeTest.__name__, ' OK') - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetSingleOutboundRouteMultipleCa2PaSinglePortIpv6Test(Vnet2VnetSingleOutboundRouteMultipleCa2PaSinglePortTest): - """ - Underlay IPv4 and Overlay IPv6 - Outbound Vnet to Vnet test scenario with outbound routing entry - SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET action and multiple CA2PA entries - with underlay config (neighbour + next hop) but without underlay routes - """ - - def setUp(self): - super(Vnet2VnetSingleOutboundRouteMultipleCa2PaSinglePortIpv6Test, self).setUp(overlay_ipv6=True) - - def configureTest(self): - """ - Setup DUT in accordance with test purpose - """ - - self.rx_host_0 = self.rx_host - - self.rx_host_1 = self.define_neighbor_network(port=self.rx_host_0.port, - mac=self.rx_host_0.mac, - ip=self.rx_host_0.ip, - ip_prefix=self.rx_host_0.ip_prefix, - peer_port=self.rx_host_0.peer.port, - peer_mac=self.rx_host_0.peer.mac, - peer_ip=self.rx_host_0.peer.ip, - client_mac="00:03:00:00:05:16", - client_ip="bbbb:0000:0000:0000:1234::00", - client_vni=self.rx_host_0.client.vni) - - self.rx_host_2 = self.define_neighbor_network(port=self.rx_host_0.port, - mac=self.rx_host_0.mac, - ip=self.rx_host_0.ip, - ip_prefix=self.rx_host_0.ip_prefix, - peer_port=self.rx_host_0.peer.port, - peer_mac=self.rx_host_0.peer.mac, - peer_ip=self.rx_host_0.peer.ip, - client_mac="00:05:00:00:08:18", - client_ip="bbbb:0000:0000:0000:0000:ab12::00", - client_vni=self.rx_host_0.client.vni) - - self.rx_host_3 = self.define_neighbor_network(port=self.rx_host_0.port, - mac=self.rx_host_0.mac, - ip=self.rx_host_0.ip, - ip_prefix=self.rx_host_0.ip_prefix, - peer_port=self.rx_host_0.peer.port, - peer_mac=self.rx_host_0.peer.mac, - peer_ip=self.rx_host_0.peer.ip, - client_mac="00:10:00:00:AA:E1", - client_ip="bbbb::40", - client_vni=self.rx_host_0.client.vni) - - self.vip_create(self.tx_host.peer.ip) - - self.direction_lookup_create(self.tx_host.client.vni) - - src_vnet = self.vnet_create(vni=self.tx_host.client.vni) - dst_vnet = self.vnet_create(vni=self.rx_host_0.client.vni) - - eni_id = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.tx_host.ip), - vm_vni=self.tx_host.client.vni, - vnet_id=src_vnet) - self.eni_mac_map_create(eni_id, self.tx_host.client.mac) # ENI MAC - - self.outbound_routing_vnet_create(eni_id=eni_id, lpm="bbbb::0/64", - dst_vnet_id=dst_vnet) - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet, - dip=self.rx_host_0.client.ip, - underlay_dip=self.rx_host_0.ip, - overlay_dmac=self.rx_host_0.client.mac, - use_dst_vnet_vni=True) - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet, - dip=self.rx_host_1.client.ip, - underlay_dip=self.rx_host_1.ip, - overlay_dmac=self.rx_host_1.client.mac, - use_dst_vnet_vni=True) - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet, - dip=self.rx_host_2.client.ip, - underlay_dip=self.rx_host_2.ip, - overlay_dmac=self.rx_host_2.client.mac, - use_dst_vnet_vni=True) - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet, - dip=self.rx_host_3.client.ip, - underlay_dip=self.rx_host_3.ip, - overlay_dmac=self.rx_host_3.client.mac, - use_dst_vnet_vni=False) - - def vnet2VnetOutboundNegativeTest(self): - """ - Verifies negative scenarios (packet drop): - - wrong VIP - - routing drop (CA Dst IP does not match any routing entry) - - wrong CA Src MAC (does not match any ENI) - - mapping drop (CA Dst IP matches routing entry prefix but drops by ca_to_pa) - """ - - invalid_vip = "10.10.10.10" - wrong_inner_dst_ip = "bbbb:0000:0000:1111::00" - wrong_inner_src_ca_mac = "00:aa:00:aa:00:aa" - - self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, - fake_mac=True, invalid_vip=invalid_vip, - invalid_inner_dst_ip=wrong_inner_dst_ip, - invalid_inner_src_mac=wrong_inner_src_ca_mac) - - wrong_inner_dst_ip = "bbbb::33" - self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, - fake_mac=True, invalid_inner_dst_ip=wrong_inner_dst_ip) - - print('\n', self.vnet2VnetOutboundNegativeTest.__name__, ' OK') - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetSingleOutboundRouteMultipleCa2PaTwoPortsTest(Vnet2VnetSingleOutboundRouteMultipleCa2PaSinglePortTest): - """ - Outbound Vnet to Vnet test scenario with outbound routing entry - SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET action and multiple CA2PA entries - with full underlay config (2 neighbours + 2 next hops + 2 routes) - """ - - def runTest(self): - self.configureTest() - self.configure_underlay(self.tx_host, self.rx_host_0) - - self.vnet2VnetOutboundRoutingTest(tx_equal_to_rx=False) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetSingleOutboundRouteMultipleCa2PaTwoPortsIpv6Test(Vnet2VnetSingleOutboundRouteMultipleCa2PaSinglePortIpv6Test): - """ - Underlay IPv4 and Overlay IPv6 - Outbound Vnet to Vnet test scenario with outbound routing entry - SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET action and multiple CA2PA entries - with underlay config (neighbour + next hop) but without underlay routes - """ - - def runTest(self): - self.configureTest() - self.configure_underlay(self.tx_host, self.rx_host_0) - - self.vnet2VnetOutboundRoutingTest(tx_equal_to_rx=False) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundDstVnetIdRouteVnetSinglePortTest(VnetApiEndpoints, VnetTrafficMixin): - """ - Outbound Vnet to Vnet test scenario that verifies - CA to PA entry use_dst_vnet_vni attribute True and False values - when routing action is SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET - with underlay config (neighbour + next hop) but without underlay routes - """ - - def runTest(self): - self.update_configuration_for_tx_equal_to_rx() - self.configureTest() - self.configure_underlay(self.tx_host, add_routes=False) - - self.vnet2VnetOutboundDstVnetIdTrueTest(tx_equal_to_rx=True) - self.vnet2VnetOutboundDstVnetIdFalseTest(tx_equal_to_rx=True) - - def configureTest(self): - """ - Setup DUT in accordance with test purpose - """ - - self.rx_host_0 = self.rx_host - - self.rx_host_1 = self.define_neighbor_network(port=self.rx_host_0.port, - mac=self.rx_host_0.mac, - ip=self.rx_host_0.ip, - ip_prefix=self.rx_host_0.ip_prefix, - peer_port=self.rx_host_0.peer.port, - peer_mac=self.rx_host_0.peer.mac, - peer_ip=self.rx_host_0.peer.ip, - client_mac="00:03:00:00:05:16", - client_ip="192.168.2.1", - client_vni=3) - - # Overlay routing - self.vip_create(self.tx_host.peer.ip) # Appliance VIP - - # direction lookup VNI, reserved VNI assigned to the VM->Appliance - self.direction_lookup_create(self.tx_host.client.vni) - - src_vnet = self.vnet_create(vni=self.tx_host.client.vni) - dst_vnet_0 = self.vnet_create(vni=self.rx_host_0.client.vni) - dst_vnet_1 = self.vnet_create(vni=self.rx_host_1.client.vni) - - eni_id = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.tx_host.ip), - vm_vni=self.tx_host.client.vni, - vnet_id=src_vnet) - self.eni_mac_map_create(eni_id=eni_id, mac=self.tx_host.client.mac) - - # Outbound routing and CA to PA entries creation - # for use_dst_vnet_vni=True - self.outbound_routing_vnet_create(eni_id=eni_id, lpm="192.168.1.0/24", - dst_vnet_id=dst_vnet_0) - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_0, - dip=self.rx_host_0.client.ip, - underlay_dip=self.rx_host_0.ip, - overlay_dmac=self.rx_host.client.mac, - use_dst_vnet_vni=True) - - # for use_dst_vnet_vni=False - self.outbound_routing_vnet_create(eni_id=eni_id, lpm="192.168.2.0/24", - dst_vnet_id=dst_vnet_1) - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_1, - dip=self.rx_host_1.client.ip, - underlay_dip=self.rx_host_1.ip, - overlay_dmac=self.rx_host_1.client.mac, - use_dst_vnet_vni=False) - - def vnet2VnetOutboundDstVnetIdTrueTest(self, tx_equal_to_rx): - - self.verify_traffic_scenario(client=self.tx_host, server=self.rx_host_0, - connection=self.connection, fake_mac=True, tx_equal_to_rx=tx_equal_to_rx) - - print('\n', self.vnet2VnetOutboundDstVnetIdTrueTest.__name__, ' OK') - - def vnet2VnetOutboundDstVnetIdFalseTest(self, tx_equal_to_rx): - - # For use_dst_vnet_vni=False verification change rx client vni to tx client vni - self.rx_host_1.client.vni = self.tx_host.client.vni - - self.verify_traffic_scenario(client=self.tx_host, server=self.rx_host_1, - connection=self.connection, fake_mac=True, tx_equal_to_rx=tx_equal_to_rx) - - print('\n', self.vnet2VnetOutboundDstVnetIdFalseTest.__name__, ' OK') - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundDstVnetIdRouteVnetSinglePortOverlayIpv6Test(Vnet2VnetOutboundDstVnetIdRouteVnetSinglePortTest): - """ - Underlay IPv4 and Overlay IPv6 configs - Outbound Vnet to Vnet test scenario that verifies - CA to PA entry use_dst_vnet_vni attribute True and False values - when routing action is SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET - with underlay config (neighbour + next hop) but without underlay routes - """ - - def setUp(self): - super(Vnet2VnetOutboundDstVnetIdRouteVnetSinglePortOverlayIpv6Test, self).setUp(overlay_ipv6=True) - - def configureTest(self): - """ - Setup DUT in accordance with test purpose - """ - - self.rx_host_0 = self.rx_host - - self.rx_host_1 = self.define_neighbor_network(port=self.rx_host_0.port, - mac=self.rx_host_0.mac, - ip=self.rx_host_0.ip, - ip_prefix=self.rx_host_0.ip_prefix, - peer_port=self.rx_host_0.peer.port, - peer_mac=self.rx_host_0.peer.mac, - peer_ip=self.rx_host_0.peer.ip, - client_mac="00:03:00:00:05:16", - client_ip="cccc::30", - client_vni=3) - - # Overlay routing - self.vip_create(self.tx_host.peer.ip) # Appliance VIP - - # direction lookup VNI, reserved VNI assigned to the VM->Appliance - self.direction_lookup_create(self.tx_host.client.vni) - - src_vnet = self.vnet_create(vni=self.tx_host.client.vni) - dst_vnet_0 = self.vnet_create(vni=self.rx_host_0.client.vni) - dst_vnet_1 = self.vnet_create(vni=self.rx_host_1.client.vni) - - eni_id = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.tx_host.ip), - vm_vni=self.tx_host.client.vni, - vnet_id=src_vnet) - self.eni_mac_map_create(eni_id=eni_id, mac=self.tx_host.client.mac) - - # Outbound routing and CA to PA entries creation - # for use_dst_vnet_vni=True - self.outbound_routing_vnet_create(eni_id=eni_id, lpm="bbbb::0/64", - dst_vnet_id=dst_vnet_0) - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_0, - dip=self.rx_host_0.client.ip, - underlay_dip=self.rx_host_0.ip, - overlay_dmac=self.rx_host.client.mac, - use_dst_vnet_vni=True) - - # for use_dst_vnet_vni=False - self.outbound_routing_vnet_create(eni_id=eni_id, lpm="cccc::0/64", - dst_vnet_id=dst_vnet_1) - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_1, - dip=self.rx_host_1.client.ip, - underlay_dip=self.rx_host_1.ip, - overlay_dmac=self.rx_host_1.client.mac, - use_dst_vnet_vni=False) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundDstVnetIdRouteVnetTwoPortsTest(Vnet2VnetOutboundDstVnetIdRouteVnetSinglePortTest): - """ - Outbound Vnet to Vnet test scenario that verifies - CA to PA entry use_dst_vnet_vni attribute True and False values - when routing action is SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET - with full underlay config (2 neighbours, 2 next-hops, 2 routes) - """ - - def runTest(self): - self.configureTest() - self.configure_underlay(self.tx_host, self.rx_host_0) - - self.vnet2VnetOutboundDstVnetIdTrueTest(tx_equal_to_rx=False) - self.vnet2VnetOutboundDstVnetIdFalseTest(tx_equal_to_rx=False) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundDstVnetIdRouteVnetTwoPortsOverlayIpv6Test(Vnet2VnetOutboundDstVnetIdRouteVnetSinglePortOverlayIpv6Test): - """ - Underlay IPv4 and Overlay IPv6 configs - Outbound Vnet to Vnet test scenario that verifies - CA to PA entry use_dst_vnet_vni attribute True and False values - when routing action is SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET - with full underlay config (2 neighbours, 2 next-hops, 2 routes) - """ - - def runTest(self): - self.configureTest() - self.configure_underlay(self.tx_host, self.rx_host_0) - - self.vnet2VnetOutboundDstVnetIdTrueTest(tx_equal_to_rx=False) - self.vnet2VnetOutboundDstVnetIdFalseTest(tx_equal_to_rx=False) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundDstVnetIdRouteVnetDirectSinglePortTest(Vnet2VnetOutboundDstVnetIdRouteVnetSinglePortTest): - """ - Outbound Vnet to Vnet test scenario that verifies - CA to PA entry use_dst_vnet_vni attribute True and False values - when routing action is SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET_DIRECT - with underlay config (neighbour + next hop) but without underlay routes - """ - - def runTest(self): - self.update_configuration_for_tx_equal_to_rx() - self.configureTest() - self.configure_underlay(self.tx_host, add_routes=False) - - self.vnet2VnetOutboundDstVnetIdTrueTest(tx_equal_to_rx=True) - self.vnet2VnetOutboundDstVnetIdFalseTest(tx_equal_to_rx=True) - - def configureTest(self): - """ - Setup DUT in accordance with test purpose - """ - - self.rx_host_0 = self.rx_host - - self.rx_host_1 = self.define_neighbor_network(port=self.rx_host_0.port, - mac=self.rx_host_0.mac, - ip=self.rx_host_0.ip, - ip_prefix=self.rx_host_0.ip_prefix, - peer_port=self.rx_host_0.peer.port, - peer_mac=self.rx_host_0.peer.mac, - peer_ip=self.rx_host_0.peer.ip, - client_mac="00:03:00:00:05:16", - client_ip="192.168.2.1", - client_vni=3) - - # Overlay routing - self.vip_create(self.tx_host.peer.ip) # Appliance VIP - - # direction lookup VNI, reserved VNI assigned to the VM->Appliance - self.direction_lookup_create(self.tx_host.client.vni) - - src_vnet = self.vnet_create(vni=self.tx_host.client.vni) - dst_vnet_0 = self.vnet_create(vni=self.rx_host_0.client.vni) - dst_vnet_1 = self.vnet_create(vni=self.rx_host_1.client.vni) - - eni_id = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.tx_host.ip), - vm_vni=self.tx_host.client.vni, - vnet_id=src_vnet) - self.eni_mac_map_create(eni_id=eni_id, mac=self.tx_host.client.mac) - - # Outbound routing and CA to PA entries creation - # for use_dst_vnet_vni=True - self.outbound_routing_vnet_direct_create(eni_id=eni_id, lpm="192.168.1.0/24", - dst_vnet_id=dst_vnet_0, - overlay_ip="192.168.1.111") - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_0, - dip="192.168.1.111", - underlay_dip=self.rx_host_0.ip, - overlay_dmac=self.rx_host.client.mac, - use_dst_vnet_vni=True) - - # for use_dst_vnet_vni=False - self.outbound_routing_vnet_direct_create(eni_id=eni_id, lpm="192.168.2.0/24", - dst_vnet_id=dst_vnet_1, - overlay_ip="192.168.2.222") - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_1, - dip="192.168.2.222", - underlay_dip=self.rx_host_1.ip, - overlay_dmac=self.rx_host_1.client.mac, - use_dst_vnet_vni=False) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundDstVnetIdRouteVnetDirectSinglePortOverlayIpv6Test(Vnet2VnetOutboundDstVnetIdRouteVnetDirectSinglePortTest): - """ - Underlay IPv4 and Overlay IPv6 configs - Outbound Vnet to Vnet test scenario that verifies - CA to PA entry use_dst_vnet_vni attribute True and False values - when routing action is SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET_DIRECT - with underlay config (neighbour + next hop) but without underlay routes - """ - - def setUp(self): - super(Vnet2VnetOutboundDstVnetIdRouteVnetDirectSinglePortOverlayIpv6Test, self).setUp(overlay_ipv6=True) - - def configureTest(self): - """ - Setup DUT in accordance with test purpose - """ - - self.rx_host_0 = self.rx_host - - self.rx_host_1 = self.define_neighbor_network(port=self.rx_host_0.port, - mac=self.rx_host_0.mac, - ip=self.rx_host_0.ip, - ip_prefix=self.rx_host_0.ip_prefix, - peer_port=self.rx_host_0.peer.port, - peer_mac=self.rx_host_0.peer.mac, - peer_ip=self.rx_host_0.peer.ip, - client_mac="00:03:00:00:05:16", - client_ip="cccc::30", - client_vni=3) - - # Overlay routing - self.vip_create(self.tx_host.peer.ip) # Appliance VIP - - # direction lookup VNI, reserved VNI assigned to the VM->Appliance - self.direction_lookup_create(self.tx_host.client.vni) - - src_vnet = self.vnet_create(vni=self.tx_host.client.vni) - dst_vnet_0 = self.vnet_create(vni=self.rx_host_0.client.vni) - dst_vnet_1 = self.vnet_create(vni=self.rx_host_1.client.vni) - - eni_id = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.tx_host.ip), - vm_vni=self.tx_host.client.vni, - vnet_id=src_vnet) - self.eni_mac_map_create(eni_id=eni_id, mac=self.tx_host.client.mac) - - # Outbound routing and CA to PA entries creation - # for use_dst_vnet_vni=True - self.outbound_routing_vnet_direct_create(eni_id=eni_id, lpm="bbbb::0/64", - dst_vnet_id=dst_vnet_0, - overlay_ip="bbbb::bc") - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_0, - dip="bbbb::bc", - underlay_dip=self.rx_host_0.ip, - overlay_dmac=self.rx_host.client.mac, - use_dst_vnet_vni=True) - - # for use_dst_vnet_vni=False - self.outbound_routing_vnet_direct_create(eni_id=eni_id, lpm="cccc::0/64", - dst_vnet_id=dst_vnet_1, - overlay_ip="cccc::bc") - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_1, - dip="cccc::bc", - underlay_dip=self.rx_host_1.ip, - overlay_dmac=self.rx_host_1.client.mac, - use_dst_vnet_vni=False) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundDstVnetIdRouteVnetDirectTwoPortsTest(Vnet2VnetOutboundDstVnetIdRouteVnetDirectSinglePortTest): - """ - Outbound Vnet to Vnet test scenario that verifies - CA to PA entry use_dst_vnet_vni attribute True and False values - when routing action is SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET_DIRECT - with full underlay config (2 neighbours, 2 next-hops, 2 routes) - """ - - def runTest(self): - self.configureTest() - self.configure_underlay(self.tx_host, self.rx_host_0) - - self.vnet2VnetOutboundDstVnetIdTrueTest(tx_equal_to_rx=False) - self.vnet2VnetOutboundDstVnetIdFalseTest(tx_equal_to_rx=False) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundDstVnetIdRouteVnetDirectTwoPortstOverlayIpv6Test(Vnet2VnetOutboundDstVnetIdRouteVnetDirectSinglePortOverlayIpv6Test): - """ - Underlay IPv4 and Overlay IPv6 configs - Outbound Vnet to Vnet test scenario that verifies - CA to PA entry use_dst_vnet_vni attribute True and False values - when routing action is SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET_DIRECT - with full underlay config (2 neighbours, 2 next-hops, 2 routes) - """ - - def runTest(self): - self.configureTest() - self.configure_underlay(self.tx_host, self.rx_host_0) - - self.vnet2VnetOutboundDstVnetIdTrueTest(tx_equal_to_rx=False) - self.vnet2VnetOutboundDstVnetIdFalseTest(tx_equal_to_rx=False) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetInboundOutboundMultipleConfigsSinglePortTest(VnetApiEndpoints, VnetTrafficMixin): - """ - Inbound and Outbound Vnet to Vnet test scenario - Verifies overlay routing with multiple inbound/outbound configurations - with underlay config (neighbour + next hop) but without underlay routes - """ - - def runTest(self): - self.update_configuration_for_tx_equal_to_rx() - self.configureTest() - self.configure_underlay(self.host_0, self.host_2, add_routes=False) - - self.outboundHost0toHost2Test(tx_equal_to_rx=True) - self.inboundHost2toHost0Test(tx_equal_to_rx=True) - - self.outboundHost3toHost1Test(tx_equal_to_rx=True) - self.inboundHost1toHost3Test(tx_equal_to_rx=True) - - def configureTest(self): - """ - Setup DUT in accordance with test purpose - - host_0.client (vni 1) ca ip: 192.168.0.1 (eni_0) <---> host_2.client (vni 2) ca ip: 192.168.1.1 - host_1.client (vni 10) ca ip: 192.168.2.1 <---> (eni_3) host_3.client (vni 20) ca ip: 192.168.3.1 - """ - - self.host_0 = self.tx_host - - self.host_1 = self.define_neighbor_network(port=self.host_0.port, - mac=self.host_0.mac, - ip=self.host_0.ip, - ip_prefix=self.host_0.ip_prefix, - peer_port=self.host_0.peer.port, - peer_mac=self.host_0.peer.mac, - peer_ip=self.host_0.peer.ip, - client_mac="00:03:00:00:05:16", - client_ip="192.168.2.1", - client_vni=10) - self.host_2 = self.rx_host - - self.host_3 = self.define_neighbor_network(port=self.host_2.port, - mac=self.host_2.mac, - ip=self.host_2.ip, - ip_prefix=self.host_2.ip_prefix, - peer_port=self.host_2.peer.port, - peer_mac=self.host_2.peer.mac, - peer_ip=self.host_2.peer.ip, - client_mac="00:04:00:00:06:17", - client_ip="192.168.3.1", - client_vni=20) - # Overlay routing - self.vip_create(self.host_0.peer.ip) # Appliance VIP - - # direction lookup VNI, reserved VNI assigned to the VM->Appliance - self.direction_lookup_create(self.host_0.client.vni) - self.direction_lookup_create(self.host_3.client.vni) - - host_0_vnet = self.vnet_create(vni=self.host_0.client.vni) - host_1_vnet = self.vnet_create(vni=self.host_1.client.vni) - - host_2_vnet = self.vnet_create(vni=self.host_2.client.vni) - host_3_vnet = self.vnet_create(vni=self.host_3.client.vni) - - eni_id_0 = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.host_0.ip), - vm_vni=self.host_0.client.vni, - vnet_id=host_0_vnet) - self.eni_mac_map_create(eni_id_0, self.host_0.client.mac) - - eni_id_3 = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.host_3.ip), - vm_vni=self.host_3.client.vni, - vnet_id=host_3_vnet) - self.eni_mac_map_create(eni_id_3, self.host_3.client.mac) - - # ENI 0 inbound/outbound routing - self.inbound_routing_decap_validate_create(eni_id=eni_id_0, vni=self.host_2.client.vni, - sip=self.host_2.ip, sip_mask="255.255.255.0", - src_vnet_id=host_2_vnet) - self.pa_validation_create(sip=self.host_2.ip, - vnet_id=host_2_vnet) - - self.outbound_routing_vnet_create(eni_id_0, lpm="192.168.1.0/24", - dst_vnet_id=host_2_vnet) - self.outbound_ca_to_pa_create(dst_vnet_id=host_2_vnet, - dip=self.host_2.client.ip, - underlay_dip=self.host_2.ip, - overlay_dmac=self.host_2.client.mac) - - # ENI 3 inbound/outbound routing - self.inbound_routing_decap_validate_create(eni_id=eni_id_3, vni=self.host_1.client.vni, - sip=self.host_1.ip, sip_mask="255.255.255.0", - src_vnet_id=host_1_vnet) - self.pa_validation_create(sip=self.host_1.ip, - vnet_id=host_1_vnet) - - self.outbound_routing_vnet_create(eni_id_3, lpm="192.168.2.0/24", - dst_vnet_id=host_1_vnet) - self.outbound_ca_to_pa_create(dst_vnet_id=host_1_vnet, - dip=self.host_1.client.ip, - underlay_dip=self.host_1.ip, - overlay_dmac=self.host_1.client.mac) - - def outboundHost0toHost2Test(self, tx_equal_to_rx): - - self.verify_traffic_scenario(client=self.host_0, - server=self.host_2, - connection=self.connection, - fake_mac=True, - tx_equal_to_rx=tx_equal_to_rx) - - print('\n', self.outboundHost0toHost2Test.__name__, ' OK') - - def inboundHost2toHost0Test(self, tx_equal_to_rx): - - self.verify_traffic_scenario(client=self.host_2, - server=self.host_0, - connection=self.connection, - fake_mac=False, - tx_equal_to_rx=tx_equal_to_rx) - - print('\n', self.inboundHost2toHost0Test.__name__, ' OK') - - def outboundHost3toHost1Test(self, tx_equal_to_rx): - - self.verify_traffic_scenario(client=self.host_3, - server=self.host_1, - connection=self.connection, - fake_mac=True, - tx_equal_to_rx=tx_equal_to_rx) - - print('\n', self.outboundHost3toHost1Test.__name__, ' OK') - - def inboundHost1toHost3Test(self, tx_equal_to_rx): - - self.verify_traffic_scenario(client=self.host_1, - server=self.host_3, - connection=self.connection, - fake_mac=False, - tx_equal_to_rx=tx_equal_to_rx) - - print('\n', self.inboundHost1toHost3Test.__name__, ' OK') - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetInboundOutboundMultipleConfigsSinglePortOverlayIpv6Test(Vnet2VnetInboundOutboundMultipleConfigsSinglePortTest): - """ - Underlay IPv4 and Overlay IPv6 configs - Inbound and Outbound Vnet to Vnet test scenario - Verifies overlay routing with multiple inbound/outbound configurations - with underlay config (neighbour + next hop) but without underlay routes - """ - - def configureTest(self): - """ - Setup DUT in accordance with test purpose - - host_0.client (vni 1) ca ipv6: aaaa::10 (eni_0) <---> host_2.client (vni 2) ca ipv6: bbbb::20 - host_1.client (vni 10) ca ipv6: cccc::30 <---> (eni_3) host_3.client (vni 20) ca ipv6: dddd::40 - """ - - self.host_0 = self.tx_host - - self.host_1 = self.define_neighbor_network(port=self.host_0.port, - mac=self.host_0.mac, - ip=self.host_0.ip, - ip_prefix=self.host_0.ip_prefix, - peer_port=self.host_0.peer.port, - peer_mac=self.host_0.peer.mac, - peer_ip=self.host_0.peer.ip, - client_mac="00:03:00:00:05:16", - client_ip="cccc::30", - client_vni=10) - self.host_2 = self.rx_host - - self.host_3 = self.define_neighbor_network(port=self.host_2.port, - mac=self.host_2.mac, - ip=self.host_2.ip, - ip_prefix=self.host_2.ip_prefix, - peer_port=self.host_2.peer.port, - peer_mac=self.host_2.peer.mac, - peer_ip=self.host_2.peer.ip, - client_mac="00:04:00:00:06:17", - client_ip="dddd::40", - client_vni=20) - # Overlay routing - self.vip_create(self.host_0.peer.ip) # Appliance VIP - - # direction lookup VNI, reserved VNI assigned to the VM->Appliance - self.direction_lookup_create(self.host_0.client.vni) - self.direction_lookup_create(self.host_3.client.vni) - - host_0_vnet = self.vnet_create(vni=self.host_0.client.vni) - host_1_vnet = self.vnet_create(vni=self.host_1.client.vni) - - host_2_vnet = self.vnet_create(vni=self.host_2.client.vni) - host_3_vnet = self.vnet_create(vni=self.host_3.client.vni) - - eni_id_0 = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.host_0.ip), - vm_vni=self.host_0.client.vni, - vnet_id=host_0_vnet) - self.eni_mac_map_create(eni_id_0, self.host_0.client.mac) - - eni_id_3 = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.host_3.ip), - vm_vni=self.host_3.client.vni, - vnet_id=host_3_vnet) - self.eni_mac_map_create(eni_id_3, self.host_3.client.mac) - - # ENI 0 inbound/outbound routing - self.inbound_routing_decap_validate_create(eni_id=eni_id_0, vni=self.host_2.client.vni, - sip=self.host_2.ip, sip_mask="255.255.255.0", - src_vnet_id=host_2_vnet) - self.pa_validation_create(sip=self.host_2.ip, - vnet_id=host_2_vnet) - - self.outbound_routing_vnet_create(eni_id_0, lpm="bbbb::0/64", - dst_vnet_id=host_2_vnet) - self.outbound_ca_to_pa_create(dst_vnet_id=host_2_vnet, - dip=self.host_2.client.ip, - underlay_dip=self.host_2.ip, - overlay_dmac=self.host_2.client.mac) - - # ENI 3 inbound/outbound routing - self.inbound_routing_decap_validate_create(eni_id=eni_id_3, vni=self.host_1.client.vni, - sip=self.host_1.ip, sip_mask="255.255.255.0", - src_vnet_id=host_1_vnet) - self.pa_validation_create(sip=self.host_1.ip, - vnet_id=host_1_vnet) - - self.outbound_routing_vnet_create(eni_id_3, lpm="cccc::0/64", - dst_vnet_id=host_1_vnet) - self.outbound_ca_to_pa_create(dst_vnet_id=host_1_vnet, - dip=self.host_1.client.ip, - underlay_dip=self.host_1.ip, - overlay_dmac=self.host_1.client.mac) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetInboundOutboundMultipleConfigsTwoPortsTest(Vnet2VnetInboundOutboundMultipleConfigsSinglePortTest): - """ - Inbound and Outbound Vnet to Vnet test scenario - Verifies overlay routing with multiple inbound/outbound configurations - with full underlay config (2 neighbours, 2 next-hops, 2 routes) - """ - - def runTest(self): - self.configureTest() - self.configure_underlay(self.host_0, self.host_2, - add_routes=True) - - self.outboundHost0toHost2Test(tx_equal_to_rx=False) - self.inboundHost2toHost0Test(tx_equal_to_rx=False) - - self.outboundHost3toHost1Test(tx_equal_to_rx=False) - self.inboundHost1toHost3Test(tx_equal_to_rx=False) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetInboundOutboundMultipleConfigsTwoPortsOverlayIpv6Test(Vnet2VnetInboundOutboundMultipleConfigsSinglePortOverlayIpv6Test): - """ - Underlay IPv4 and Overlay IPv6 configs - Inbound and Outbound Vnet to Vnet test scenario - Verifies overlay routing with multiple inbound/outbound configurations - with full underlay config (2 neighbours, 2 next-hops, 2 routes) - """ - - def runTest(self): - self.configureTest() - self.configure_underlay(self.host_0, self.host_2, - add_routes=True) - - self.outboundHost0toHost2Test(tx_equal_to_rx=False) - self.inboundHost2toHost0Test(tx_equal_to_rx=False) - - self.outboundHost3toHost1Test(tx_equal_to_rx=False) - self.inboundHost1toHost3Test(tx_equal_to_rx=False) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundMultipleEniSameIpPrefixSinglePortTest(VnetApiEndpoints, VnetTrafficMixin): - """ - Outbound Vnet to Vnet test scenario when multiple ENI and - Outbound routing entries exist with the same CA IP prefixes - with underlay config (neighbour + next hop) but without underlay routes - """ - - def runTest(self): - self.update_configuration_for_tx_equal_to_rx() - self.configureTest() - self.configure_underlay(self.tx_host_0, add_routes=False) - - self.outboundEni0Test(tx_equal_to_rx=True) - self.outboundEni1Test(tx_equal_to_rx=True) - self.outboundEni2Test(tx_equal_to_rx=True) - - def configureTest(self): - """ - Setup DUT in accordance with test purpose - - 192.168.0.1 -> 192.168.1.1 - tx_host_0 (vni 1) -> rx_host_0 (vni 2) - tx_host_1 (vni 10) -> rx_host_1 (vni 20) - tx_host_2 (vni 100) -> rx_host_2 (vni 200) - """ - - self.tx_host_0 = self.tx_host - - self.tx_host_1 = self.define_neighbor_network(port=self.tx_host_0.port, - mac=self.tx_host_0.mac, - ip=self.tx_host_0.ip, - ip_prefix=self.tx_host_0.ip_prefix, - peer_port=self.tx_host_0.peer.port, - peer_mac=self.tx_host_0.peer.mac, - peer_ip=self.tx_host_0.peer.ip, - client_mac="00:03:00:00:05:16", - client_ip=self.tx_host_0.client.ip, - client_vni=10) - - self.tx_host_2 = self.define_neighbor_network(port=self.tx_host_0.port, - mac=self.tx_host_0.mac, - ip=self.tx_host_0.ip, - ip_prefix=self.tx_host_0.ip_prefix, - peer_port=self.tx_host_0.peer.port, - peer_mac=self.tx_host_0.peer.mac, - peer_ip=self.tx_host_0.peer.ip, - client_mac="00:04:00:00:06:17", - client_ip=self.tx_host_0.client.ip, - client_vni=100) - - self.rx_host_0 = self.rx_host - - self.rx_host_1 = self.define_neighbor_network(port=self.rx_host_0.port, - mac=self.rx_host_0.mac, - ip=self.rx_host_0.ip, - ip_prefix=self.rx_host_0.ip_prefix, - peer_port=self.rx_host_0.peer.port, - peer_mac=self.rx_host_0.peer.mac, - peer_ip=self.rx_host_0.peer.ip, - client_mac="00:05:00:00:06:17", - client_ip=self.rx_host.client.ip, - client_vni=20) - - self.rx_host_2 = self.define_neighbor_network(port=self.rx_host_0.port, - mac=self.rx_host_0.mac, - ip=self.rx_host_0.ip, - ip_prefix=self.rx_host_0.ip_prefix, - peer_port=self.rx_host_0.peer.port, - peer_mac=self.rx_host_0.peer.mac, - peer_ip=self.rx_host_0.peer.ip, - client_mac="00:06:00:00:07:18", - client_ip=self.rx_host.client.ip, - client_vni=200) - - # Overlay routing - self.vip_create(self.tx_host_0.peer.ip) # Appliance VIP - - # direction lookup VNI, reserved VNI assigned to the VM->Appliance - self.direction_lookup_create(self.tx_host_0.client.vni) - self.direction_lookup_create(self.tx_host_1.client.vni) - self.direction_lookup_create(self.tx_host_2.client.vni) - - src_vnet_0 = self.vnet_create(vni=self.tx_host_0.client.vni) - src_vnet_1 = self.vnet_create(vni=self.tx_host_1.client.vni) - src_vnet_2 = self.vnet_create(vni=self.tx_host_2.client.vni) - - dst_vnet_0 = self.vnet_create(vni=self.rx_host_0.client.vni) - dst_vnet_1 = self.vnet_create(vni=self.rx_host_1.client.vni) - dst_vnet_2 = self.vnet_create(vni=self.rx_host_2.client.vni) - - eni_id_0 = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.tx_host_0.ip), - vm_vni=self.tx_host_0.client.vni, - vnet_id=src_vnet_0) - self.eni_mac_map_create(eni_id=eni_id_0, mac=self.tx_host_0.client.mac) - - eni_id_1 = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.tx_host_1.ip), - vm_vni=self.tx_host_1.client.vni, - vnet_id=src_vnet_1) - self.eni_mac_map_create(eni_id=eni_id_1, mac=self.tx_host_1.client.mac) - - eni_id_2 = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.tx_host_2.ip), - vm_vni=self.tx_host_2.client.vni, - vnet_id=src_vnet_2) - self.eni_mac_map_create(eni_id=eni_id_2, mac=self.tx_host_2.client.mac) - - # Outbound routing and CA to PA entries creation - # for use_dst_vnet_vni=True - self.outbound_routing_vnet_create(eni_id=eni_id_0, lpm="192.168.1.0/24", - dst_vnet_id=dst_vnet_0) - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_0, - dip=self.rx_host_0.client.ip, - underlay_dip=self.rx_host_0.ip, - overlay_dmac=self.rx_host_0.client.mac, - use_dst_vnet_vni=True) - - # for use_dst_vnet_vni=False - self.outbound_routing_vnet_create(eni_id=eni_id_1, lpm="192.168.1.0/24", - dst_vnet_id=dst_vnet_1) - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_1, - dip=self.rx_host_1.client.ip, - underlay_dip=self.rx_host_1.ip, - overlay_dmac=self.rx_host_1.client.mac, - use_dst_vnet_vni=False) - - self.outbound_routing_vnet_direct_create(eni_id=eni_id_2, lpm="192.168.1.0/24", - dst_vnet_id=dst_vnet_2, - overlay_ip="192.168.1.111") - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_2, - dip="192.168.1.111", - underlay_dip=self.rx_host_2.ip, - overlay_dmac=self.rx_host_2.client.mac, - use_dst_vnet_vni=True) - - def outboundEni0Test(self, tx_equal_to_rx): - - self.verify_traffic_scenario(client=self.tx_host_0, - server=self.rx_host_0, - connection=self.connection, - fake_mac=True, - tx_equal_to_rx=tx_equal_to_rx) - - print('\n', self.outboundEni0Test.__name__, ' OK') - - def outboundEni1Test(self, tx_equal_to_rx): - - # For use_dst_vnet_vni=False verification change rx client vni to tx client vni - self.rx_host_1.client.vni = self.tx_host_1.client.vni - - self.verify_traffic_scenario(client=self.tx_host_1, - server=self.rx_host_1, - connection=self.connection, - fake_mac=True, - tx_equal_to_rx=tx_equal_to_rx) - - print('\n', self.outboundEni1Test.__name__, ' OK') - - def outboundEni2Test(self, tx_equal_to_rx): - - self.verify_traffic_scenario(client=self.tx_host_2, - server=self.rx_host_2, - connection=self.connection, - fake_mac=True, - tx_equal_to_rx=tx_equal_to_rx) - - print('\n', self.outboundEni2Test.__name__, ' OK') - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundMultipleEniSameIpPrefixSinglePortOverlayIpv6Test(Vnet2VnetOutboundMultipleEniSameIpPrefixSinglePortTest): - """ - Underlay IPv4 and Overlay IPv6 configs - Outbound Vnet to Vnet test scenario when multiple ENI and - Outbound routing entries exist with the same CA IP prefixes - with underlay config (neighbour + next hop) but without underlay routes - """ - - def setUp(self): - super(Vnet2VnetOutboundMultipleEniSameIpPrefixSinglePortOverlayIpv6Test, self).setUp(overlay_ipv6=True) - - def configureTest(self): - """ - Setup DUT in accordance with test purpose - - CA: aaaa::10 -> bbbb::20 - tx_host_0 (vni 1) -> rx_host_0 (vni 2) - tx_host_1 (vni 10) -> rx_host_1 (vni 20) - tx_host_2 (vni 100) -> rx_host_2 (vni 200) - """ - - self.tx_host_0 = self.tx_host - - self.tx_host_1 = self.define_neighbor_network(port=self.tx_host_0.port, - mac=self.tx_host_0.mac, - ip=self.tx_host_0.ip, - ip_prefix=self.tx_host_0.ip_prefix, - peer_port=self.tx_host_0.peer.port, - peer_mac=self.tx_host_0.peer.mac, - peer_ip=self.tx_host_0.peer.ip, - client_mac="00:03:00:00:05:16", - client_ip=self.tx_host_0.client.ip, - client_vni=10) - - self.tx_host_2 = self.define_neighbor_network(port=self.tx_host_0.port, - mac=self.tx_host_0.mac, - ip=self.tx_host_0.ip, - ip_prefix=self.tx_host_0.ip_prefix, - peer_port=self.tx_host_0.peer.port, - peer_mac=self.tx_host_0.peer.mac, - peer_ip=self.tx_host_0.peer.ip, - client_mac="00:04:00:00:06:17", - client_ip=self.tx_host_0.client.ip, - client_vni=100) - - self.rx_host_0 = self.rx_host - - self.rx_host_1 = self.define_neighbor_network(port=self.rx_host_0.port, - mac=self.rx_host_0.mac, - ip=self.rx_host_0.ip, - ip_prefix=self.rx_host_0.ip_prefix, - peer_port=self.rx_host_0.peer.port, - peer_mac=self.rx_host_0.peer.mac, - peer_ip=self.rx_host_0.peer.ip, - client_mac="00:05:00:00:06:17", - client_ip=self.rx_host.client.ip, - client_vni=20) - - self.rx_host_2 = self.define_neighbor_network(port=self.rx_host_0.port, - mac=self.rx_host_0.mac, - ip=self.rx_host_0.ip, - ip_prefix=self.rx_host_0.ip_prefix, - peer_port=self.rx_host_0.peer.port, - peer_mac=self.rx_host_0.peer.mac, - peer_ip=self.rx_host_0.peer.ip, - client_mac="00:06:00:00:07:18", - client_ip=self.rx_host.client.ip, - client_vni=200) - - # Overlay routing - self.vip_create(self.tx_host_0.peer.ip) # Appliance VIP - - # direction lookup VNI, reserved VNI assigned to the VM->Appliance - self.direction_lookup_create(self.tx_host_0.client.vni) - self.direction_lookup_create(self.tx_host_1.client.vni) - self.direction_lookup_create(self.tx_host_2.client.vni) - - src_vnet_0 = self.vnet_create(vni=self.tx_host_0.client.vni) - src_vnet_1 = self.vnet_create(vni=self.tx_host_1.client.vni) - src_vnet_2 = self.vnet_create(vni=self.tx_host_2.client.vni) - - dst_vnet_0 = self.vnet_create(vni=self.rx_host_0.client.vni) - dst_vnet_1 = self.vnet_create(vni=self.rx_host_1.client.vni) - dst_vnet_2 = self.vnet_create(vni=self.rx_host_2.client.vni) - - eni_id_0 = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.tx_host_0.ip), - vm_vni=self.tx_host_0.client.vni, - vnet_id=src_vnet_0) - self.eni_mac_map_create(eni_id=eni_id_0, mac=self.tx_host_0.client.mac) - - eni_id_1 = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.tx_host_1.ip), - vm_vni=self.tx_host_1.client.vni, - vnet_id=src_vnet_1) - self.eni_mac_map_create(eni_id=eni_id_1, mac=self.tx_host_1.client.mac) - - eni_id_2 = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.tx_host_2.ip), - vm_vni=self.tx_host_2.client.vni, - vnet_id=src_vnet_2) - self.eni_mac_map_create(eni_id=eni_id_2, mac=self.tx_host_2.client.mac) - - # Outbound routing and CA to PA entries creation - # for use_dst_vnet_vni=True - self.outbound_routing_vnet_create(eni_id=eni_id_0, lpm="bbbb::0/64", - dst_vnet_id=dst_vnet_0) - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_0, - dip=self.rx_host_0.client.ip, - underlay_dip=self.rx_host_0.ip, - overlay_dmac=self.rx_host_0.client.mac, - use_dst_vnet_vni=True) - - # for use_dst_vnet_vni=False - self.outbound_routing_vnet_create(eni_id=eni_id_1, lpm="bbbb::0/64", - dst_vnet_id=dst_vnet_1) - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_1, - dip=self.rx_host_1.client.ip, - underlay_dip=self.rx_host_1.ip, - overlay_dmac=self.rx_host_1.client.mac, - use_dst_vnet_vni=False) - - self.outbound_routing_vnet_direct_create(eni_id=eni_id_2, lpm="bbbb::0/64", - dst_vnet_id=dst_vnet_2, - overlay_ip="bbbb::bc") - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_2, - dip="bbbb::bc", - underlay_dip=self.rx_host_2.ip, - overlay_dmac=self.rx_host_2.client.mac, - use_dst_vnet_vni=True) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundMultipleEniSameIpPrefixTwoPortsTest(Vnet2VnetOutboundMultipleEniSameIpPrefixSinglePortTest): - """ - Outbound Vnet to Vnet test scenario when multiple ENI and - Outbound routing entries exist with the same CA IP prefixes - with full underlay config (2 neighbours, 2 next-hops, 2 routes) - """ - - def runTest(self): - self.configureTest() - self.configure_underlay(self.tx_host_0, self.rx_host_0) - - self.outboundEni0Test(tx_equal_to_rx=False) - self.outboundEni1Test(tx_equal_to_rx=False) - self.outboundEni2Test(tx_equal_to_rx=False) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundMultipleEniSameIpPrefixTwoPortsOverlayIpv6Test(Vnet2VnetOutboundMultipleEniSameIpPrefixSinglePortOverlayIpv6Test): - """ - Underlay IPv4 and Overlay IPv6 configs - Outbound Vnet to Vnet test scenario when multiple ENI and - Outbound routing entries exist with the same CA IP prefixes - with full underlay config (2 neighbours, 2 next-hops, 2 routes) - """ - - def runTest(self): - self.configureTest() - self.configure_underlay(self.tx_host_0, self.rx_host_0) - - self.outboundEni0Test(tx_equal_to_rx=False) - self.outboundEni1Test(tx_equal_to_rx=False) - self.outboundEni2Test(tx_equal_to_rx=False) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundSingleEniMultipleIpPrefixSinglePortTest(VnetApiEndpoints, VnetTrafficMixin): - """ - Outbound Vnet to Vnet test scenario with single ENI and - multiple Outbound routing entries with the overlapping CA IP prefixes - with underlay config (neighbour + next hop) but without underlay routes - """ - - def runTest(self): - self.update_configuration_for_tx_equal_to_rx() - self.configureTest() - self.configure_underlay(self.tx_host, add_routes=False) - - self.singleEniToOutboundVm1Test(tx_equal_to_rx=True) - self.singleEniToOutboundVm2Test(tx_equal_to_rx=True) - self.singleEniToOutboundVm3Test(tx_equal_to_rx=True) - - def configureTest(self): - """ - Setup DUT in accordance with test purpose - - CA: - tx_host (vni 1) 9.0.0.1 -> 10.5.4.4/8 rx_host_0 (vni 2) - tx_host (vni 1) 9.0.0.1 -> 10.0.1.2/24 rx_host_1 (vni 20) - tx_host (vni 1) 9.0.0.1 -> 10.1.1.1/32 rx_host_2 (vni 200) - """ - - # Update VIP - self.tx_host.peer.ip = "12.1.1.1" - self.rx_host.peer.ip = "12.1.1.1" - - # Update some network parameters for ip prefixes overlapping - self.tx_host.ip = "192.168.0.1" - self.tx_host.ip_prefix = "192.168.0.0/24" - self.tx_host.client.ip = "9.0.0.1" - - self.rx_host_0 = self.rx_host - self.rx_host_0.ip = "192.168.1.1" - self.rx_host_0.ip_prefix = "192.168.1.0/24" - self.rx_host_0.client.ip = "10.5.4.4" - rx_host_0_client_ip_prefix = "10.0.0.0/8" - - self.rx_host_1 = self.define_neighbor_network(port=self.rx_host_0.port, - mac=self.rx_host_0.mac, - ip=self.rx_host_0.ip, - ip_prefix=self.rx_host_0.ip_prefix, - peer_port=self.rx_host_0.peer.port, - peer_mac=self.rx_host_0.peer.mac, - peer_ip=self.rx_host_0.peer.ip, - client_mac="00:05:00:00:06:17", - client_ip="10.0.1.2", - client_vni=20) - rx_host_1_client_ip_prefix = "10.0.1.0/24" - - self.rx_host_2 = self.define_neighbor_network(port=self.rx_host_0.port, - mac=self.rx_host_0.mac, - ip=self.rx_host_0.ip, - ip_prefix=self.rx_host_0.ip_prefix, - peer_port=self.rx_host_0.peer.port, - peer_mac=self.rx_host_0.peer.mac, - peer_ip=self.rx_host_0.peer.ip, - client_mac="00:06:00:00:07:18", - client_ip="10.1.1.1", - client_vni=200) - rx_host_2_client_ip_prefix = "10.1.1.1/32" - - # Overlay routing - self.vip_create(self.tx_host.peer.ip) # Appliance VIP - - # direction lookup VNI, reserved VNI assigned to the VM->Appliance - self.direction_lookup_create(self.tx_host.client.vni) - - src_vnet = self.vnet_create(vni=self.tx_host.client.vni) - - dst_vnet_0 = self.vnet_create(vni=self.rx_host_0.client.vni) - dst_vnet_1 = self.vnet_create(vni=self.rx_host_1.client.vni) - dst_vnet_2 = self.vnet_create(vni=self.rx_host_2.client.vni) - - eni_id = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.tx_host.ip), - vm_vni=self.tx_host.client.vni, - vnet_id=src_vnet) - self.eni_mac_map_create(eni_id=eni_id, mac=self.tx_host.client.mac) - - # Outbound routing and CA to PA entries creation - # for use_dst_vnet_vni=True - self.outbound_routing_vnet_create(eni_id=eni_id, lpm=rx_host_0_client_ip_prefix, - dst_vnet_id=dst_vnet_0) - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_0, - dip=self.rx_host_0.client.ip, - underlay_dip=self.rx_host_0.ip, - overlay_dmac=self.rx_host_0.client.mac, - use_dst_vnet_vni=True) - - # for use_dst_vnet_vni=False - self.outbound_routing_vnet_create(eni_id=eni_id, lpm=rx_host_1_client_ip_prefix, - dst_vnet_id=dst_vnet_1) - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_1, - dip=self.rx_host_1.client.ip, - underlay_dip=self.rx_host_1.ip, - overlay_dmac=self.rx_host_1.client.mac, - use_dst_vnet_vni=True) - - self.outbound_routing_vnet_create(eni_id=eni_id, lpm=rx_host_2_client_ip_prefix, - dst_vnet_id=dst_vnet_2) - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_2, - dip=self.rx_host_2.client.ip, - underlay_dip=self.rx_host_2.ip, - overlay_dmac=self.rx_host_2.client.mac, - use_dst_vnet_vni=True) - - def singleEniToOutboundVm1Test(self, tx_equal_to_rx): - """ - Packet sending: - CA IP: 9.0.0.1 -> 10.5.4.4/8 - VNET: 1 -> 2 - """ - - self.verify_traffic_scenario(client=self.tx_host, - server=self.rx_host_0, - connection=self.connection, - fake_mac=True, - tx_equal_to_rx=tx_equal_to_rx) - - print('\n', self.singleEniToOutboundVm1Test.__name__, ' OK') - - def singleEniToOutboundVm2Test(self, tx_equal_to_rx): - """ - Packet sending: - CA IP: 9.0.0.1 -> 10.0.1.2/24 - VNET: 1 -> 20 - """ - - self.verify_traffic_scenario(client=self.tx_host, - server=self.rx_host_1, - connection=self.connection, - fake_mac=True, - tx_equal_to_rx=tx_equal_to_rx) - - print('\n', self.singleEniToOutboundVm2Test.__name__, ' OK') - - def singleEniToOutboundVm3Test(self, tx_equal_to_rx): - """ - Packet sending: - CA IP: 9.0.0.1 -> 10.1.1.1/32 - VNET: 1 -> 200 - """ - - self.verify_traffic_scenario(client=self.tx_host, - server=self.rx_host_2, - connection=self.connection, - fake_mac=True, - tx_equal_to_rx=tx_equal_to_rx) - - print('\n', self.singleEniToOutboundVm3Test.__name__, ' OK') - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundSingleEniMultipleIpPrefixSinglePortOverlayIpv6Test(Vnet2VnetOutboundSingleEniMultipleIpPrefixSinglePortTest): - """ - Underlay IPv4 and Overlay IPv6 configs - Outbound Vnet to Vnet test scenario with single ENI and - multiple Outbound routing entries with the overlapping CA IP prefixes - with underlay config (neighbour + next hop) but without underlay routes - """ - def setUp(self): - super(Vnet2VnetOutboundSingleEniMultipleIpPrefixSinglePortOverlayIpv6Test, self).setUp(overlay_ipv6=True) - - def configureTest(self): - """ - Setup DUT in accordance with test purpose - - CA: - tx_host (vni 1) aaaa::10 -> 2001:db8:cad::1/48 rx_host_0 (vni 2) - tx_host (vni 1) aaaa::10 -> 2001:db8:cad:800::1/53 rx_host_1 (vni 20) - tx_host (vni 1) aaaa::10 -> 2001:db8:cad:810::1/62 rx_host_2 (vni 200) - """ - - # Update some network parameters for ip prefixes overlapping - self.tx_host.ip = "192.168.0.1" - self.tx_host.ip_prefix = "192.168.0.0/24" - - self.rx_host_0 = self.rx_host - self.rx_host_0.ip = "192.168.1.1" - self.rx_host_0.ip_prefix = "192.168.1.0/24" - self.rx_host_0.client.ip = "2001:db8:cad::1" - rx_host_0_client_ip_prefix = "2001:db8:cad::0/48" - - self.rx_host_1 = self.define_neighbor_network(port=self.rx_host_0.port, - mac=self.rx_host_0.mac, - ip=self.rx_host_0.ip, - ip_prefix=self.rx_host_0.ip_prefix, - peer_port=self.rx_host_0.peer.port, - peer_mac=self.rx_host_0.peer.mac, - peer_ip=self.rx_host_0.peer.ip, - client_mac="00:05:00:00:06:17", - client_ip="2001:db8:cad:800::1", - client_vni=20) - rx_host_1_client_ip_prefix = "2001:db8:cad:800::0/53" - - self.rx_host_2 = self.define_neighbor_network(port=self.rx_host_0.port, - mac=self.rx_host_0.mac, - ip=self.rx_host_0.ip, - ip_prefix=self.rx_host_0.ip_prefix, - peer_port=self.rx_host_0.peer.port, - peer_mac=self.rx_host_0.peer.mac, - peer_ip=self.rx_host_0.peer.ip, - client_mac="00:06:00:00:07:18", - client_ip="2001:db8:cad:810::1", - client_vni=200) - rx_host_2_client_ip_prefix = "2001:db8:cad:810::0/62" - - # Overlay routing - self.vip_create(self.tx_host.peer.ip) # Appliance VIP - - # direction lookup VNI, reserved VNI assigned to the VM->Appliance - self.direction_lookup_create(self.tx_host.client.vni) - - src_vnet = self.vnet_create(vni=self.tx_host.client.vni) - - dst_vnet_0 = self.vnet_create(vni=self.rx_host_0.client.vni) - dst_vnet_1 = self.vnet_create(vni=self.rx_host_1.client.vni) - dst_vnet_2 = self.vnet_create(vni=self.rx_host_2.client.vni) - - eni_id = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.tx_host.ip), - vm_vni=self.tx_host.client.vni, - vnet_id=src_vnet) - self.eni_mac_map_create(eni_id=eni_id, mac=self.tx_host.client.mac) - - # Outbound routing and CA to PA entries creation - # for use_dst_vnet_vni=True - self.outbound_routing_vnet_create(eni_id=eni_id, lpm=rx_host_0_client_ip_prefix, - dst_vnet_id=dst_vnet_0) - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_0, - dip=self.rx_host_0.client.ip, - underlay_dip=self.rx_host_0.ip, - overlay_dmac=self.rx_host_0.client.mac, - use_dst_vnet_vni=True) - - # for use_dst_vnet_vni=False - self.outbound_routing_vnet_create(eni_id=eni_id, lpm=rx_host_1_client_ip_prefix, - dst_vnet_id=dst_vnet_1) - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_1, - dip=self.rx_host_1.client.ip, - underlay_dip=self.rx_host_1.ip, - overlay_dmac=self.rx_host_1.client.mac, - use_dst_vnet_vni=True) - - self.outbound_routing_vnet_create(eni_id=eni_id, lpm=rx_host_2_client_ip_prefix, - dst_vnet_id=dst_vnet_2) - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_2, - dip=self.rx_host_2.client.ip, - underlay_dip=self.rx_host_2.ip, - overlay_dmac=self.rx_host_2.client.mac, - use_dst_vnet_vni=True) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundSingleEniMultipleIpPrefixTwoPortsTest(Vnet2VnetOutboundSingleEniMultipleIpPrefixSinglePortTest): - """ - Outbound Vnet to Vnet test scenario with single ENI and - multiple Outbound routing entries with the overlapping CA IP prefixes - with full underlay config (2 neighbours, 2 next-hops, 2 routes) - """ - - def runTest(self): - self.configureTest() - self.configure_underlay(self.tx_host, self.rx_host_0) - - self.singleEniToOutboundVm1Test(tx_equal_to_rx=False) - self.singleEniToOutboundVm2Test(tx_equal_to_rx=False) - self.singleEniToOutboundVm3Test(tx_equal_to_rx=False) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundSingleEniMultipleIpPrefixTwoPortsOverlayIpv6Test(Vnet2VnetOutboundSingleEniMultipleIpPrefixSinglePortOverlayIpv6Test): - """ - Underlay IPv4 and Overlay IPv6 configs - Outbound Vnet to Vnet test scenario with single ENI and - multiple Outbound routing entries with the overlapping CA IP prefixes - with full underlay config (2 neighbours, 2 next-hops, 2 routes) - """ - - def runTest(self): - self.configureTest() - self.configure_underlay(self.tx_host, self.rx_host_0) - - self.singleEniToOutboundVm1Test(tx_equal_to_rx=False) - self.singleEniToOutboundVm2Test(tx_equal_to_rx=False) - self.singleEniToOutboundVm3Test(tx_equal_to_rx=False) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundSameCaPaIpPrefixesSinglePortTest(VnetApiEndpoints, VnetTrafficMixin): - """ - Outbound Vnet to Vnet test scenario with the same - CA and PA IP prefixes with underlay config (neighbour + next hop) but without underlay routes - """ - - def runTest(self): - self.update_configuration_for_tx_equal_to_rx() - self.configureTest() - self.configure_underlay(self.tx_host, add_routes=False) - - self.vnet2VnetOutboundRouteVnetTest(tx_equal_to_rx=True) - - def configureTest(self): - """ - Setup DUT in accordance with test purpose - """ - - # Update network parameters with the same provider and client ip addresses - self.tx_host.ip = self.tx_host.client.ip # 192.168.0.1 - self.tx_host.ip_prefix = "192.168.0.0/24" - - self.rx_host.ip = self.rx_host.client.ip # 192.168.1.1 - self.rx_host.ip_prefix = "192.168.1.0/24" - - # Configure overlay routing - self.vip_create(self.tx_host.peer.ip) - - # direction lookup VNI, reserved VNI assigned to the VM->Appliance - self.direction_lookup_create(self.tx_host.client.vni) - - src_vnet = self.vnet_create(vni=self.tx_host.client.vni) - dst_vnet = self.vnet_create(vni=self.rx_host.client.vni) - - eni_id = self.eni_create(admin_state=True, - vm_underlay_dip=sai_ipaddress(self.tx_host.ip), - vm_vni=self.tx_host.client.vni, - vnet_id=src_vnet) - self.eni_mac_map_create(eni_id, self.tx_host.client.mac) # ENI MAC - - self.outbound_routing_vnet_create(eni_id=eni_id, lpm="192.168.1.0/24", - dst_vnet_id=dst_vnet) - self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet, - dip=self.rx_host.client.ip, - underlay_dip=self.rx_host.ip, - overlay_dmac=self.rx_host.client.mac, - use_dst_vnet_vni=True) - - def vnet2VnetOutboundRouteVnetTest(self, tx_equal_to_rx): - """ - Packet sending: - CA IP: 192.168.0.1/24 -> 192.168.1.1/24 - PA IP: 192.168.0.1/24 -> VIP -> 192.168.1.1/24 - VNET: 1 -> 2 - """ - - self.verify_traffic_scenario(client=self.tx_host, - server=self.rx_host, - connection=self.connection, - fake_mac=True, - tx_equal_to_rx=tx_equal_to_rx) - - -@group("draft") -@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") -class Vnet2VnetOutboundSameCaPaIpPrefixesTwoPortsTest(Vnet2VnetOutboundSameCaPaIpPrefixesSinglePortTest): - """ - Outbound Vnet to Vnet test scenario with the same - CA and PA IP prefixes with full underlay config (2 neighbours, 2 next-hops, 2 routes) - """ - - def runTest(self): - self.configureTest() - self.configure_underlay(self.tx_host, self.rx_host) - - self.vnet2VnetOutboundRouteVnetTest(tx_equal_to_rx=False) +# Copyright 2022-present Intel Corporation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +""" +Thrift SAI interface VNET tests +""" + +from unittest import skipIf + +from sai_thrift.sai_headers import * +from sai_dash_utils import * + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class UnderlayRouteTest(VnetApiEndpoints, VnetTrafficMixin): + """ + L3 Underlay bidirectional routing test case + Verifies correct L3 underlay routing when overlay configuration exist + """ + + def runTest(self): + self.configureTest() + + self.verifyOverlayOutboundConfigTest() + + self.l3UnderlayHost1toHost2RoutingTest() + self.l3UnderlayHost2toHost1RoutingTest() + + def configureTest(self): + """ + Setup DUT in accordance with test purpose + """ + + # configure overlay outbound + self.vip_create(self.tx_host.peer.ip) + + # direction lookup VNI, reserved VNI assigned to the VM->Appliance + self.direction_lookup_create(self.tx_host.client.vni) + + src_vnet = self.vnet_create(vni=self.tx_host.client.vni) + dst_vnet = self.vnet_create(vni=self.rx_host.client.vni) + + eni_id = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.tx_host.ip), + vm_vni=self.tx_host.client.vni, + vnet_id=src_vnet) + self.eni_mac_map_create(eni_id, self.tx_host.client.mac) # ENI MAC + + self.outbound_routing_vnet_create(eni_id=eni_id, lpm="192.168.1.0/24", + dst_vnet_id=dst_vnet) + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet, + dip=self.rx_host.client.ip, + underlay_dip=self.rx_host.ip, + overlay_dmac=self.rx_host.client.mac, + use_dst_vnet_vni=True) + + # configure underlay + self.host_1 = self.tx_host + self.host_2 = self.rx_host + + self.configure_underlay(self.host_1, self.host_2) + + def verifyOverlayOutboundConfigTest(self): + + self.verify_traffic_scenario(client=self.tx_host, server=self.rx_host, + connection=self.connection, fake_mac=False, tx_equal_to_rx=False) + print("Overlay config OK\n") + + def l3UnderlayHost1toHost2RoutingTest(self): + + host_1_pkt = simple_udp_packet(eth_src=self.host_1.mac, + eth_dst=self.host_1.peer.mac, + ip_dst=self.host_2.ip, + ip_src=self.host_1.ip, + ip_ttl=64) + host_1_exp_pkt = simple_udp_packet(eth_src=self.host_2.peer.mac, + eth_dst=self.host_2.mac, + ip_dst=self.host_2.ip, + ip_src=self.host_1.ip, + ip_ttl=63) + + print("Sending simple UDP packet host_1 -> host_2, expecting routed packet") + send_packet(self, self.host_1.port, host_1_pkt) + verify_packet(self, host_1_exp_pkt, self.host_2.port) + print("Underlay Host 1 to Host 2 OK\n") + + def l3UnderlayHost2toHost1RoutingTest(self): + + host_2_pkt = simple_udp_packet(eth_src=self.host_2.mac, + eth_dst=self.host_2.peer.mac, + ip_dst=self.host_1.ip, + ip_src=self.host_2.ip, + ip_ttl=64) + host_2_exp_pkt = simple_udp_packet(eth_src=self.host_1.peer.mac, + eth_dst=self.host_1.mac, + ip_dst=self.host_1.ip, + ip_src=self.host_2.ip, + ip_ttl=63) + + print("Sending simple UDP packet host_2 -> host_1, expecting routed packet") + send_packet(self, self.host_2.port, host_2_pkt) + verify_packet(self, host_2_exp_pkt, self.host_1.port) + print("Underlay Host 2 to Host 1 OK\n") + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetInboundDecapPaValidateSinglePortTest(VnetApiEndpoints, VnetTrafficMixin): + """ + Inbound Vnet to Vnet scenario test case with + VXLAN_DECAP_PA_VALIDATE inbound routing entry action + with underlay config (neighbour + next hop) but without underlay routes + + Verifies positive and negative scenarios + """ + + def runTest(self): + # Reconfigure configuration for tx equal to rx + self.update_configuration_for_tx_equal_to_rx() + self.configureTest() + self.configure_underlay(self.tx_host, add_routes=False) + + self.vnet2VnetInboundRoutingTest(tx_equal_to_rx=True) + self.vnet2VnetInboundNegativeTest() + + def configureTest(self): + """ + Setup DUT in accordance with test purpose + """ + + self.vip_create(self.tx_host.peer.ip) + + # direction lookup VNI, reserved VNI assigned to the VM->Appliance + self.direction_lookup_create(self.rx_host.client.vni) + + src_vnet = self.vnet_create(vni=self.tx_host.client.vni) + dst_vnet = self.vnet_create(vni=self.rx_host.client.vni) + + eni_id = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.rx_host.ip), + vm_vni=self.rx_host.client.vni, + vnet_id=dst_vnet) + self.eni_mac_map_create(eni_id, self.rx_host.client.mac) # ENI MAC + + # Inbound routing PA Validate + self.inbound_routing_decap_validate_create(eni_id, vni=self.tx_host.client.vni, + sip=self.tx_host.ip, sip_mask="255.255.255.0", + src_vnet_id=src_vnet) + # PA validation entry with Permit action + self.pa_validation_create(self.tx_host.ip, src_vnet) + + def vnet2VnetInboundRoutingTest(self, tx_equal_to_rx): + """ + Inbound VNET to VNET test + Verifies correct packet routing + """ + + self.verify_traffic_scenario(client=self.tx_host, server=self.rx_host, + connection=self.connection, fake_mac=False, tx_equal_to_rx=tx_equal_to_rx) + + print('\n', self.vnet2VnetInboundRoutingTest.__name__, ' OK') + + def vnet2VnetInboundNegativeTest(self): + """ + Verifies negative scenarios (packet drop): + - wrong CA Dst MAC + - wrong PA Validation IP: pa validation missmatch + - wrong Physical SIP: routing missmatch + - wrong VIP + - wrong VNI + """ + + invalid_vni = 1000 + invalid_ca_dst_mac = "9e:ba:ce:98:d9:e2" + invalid_pa_sip = "10.10.5.1" # routing missmatch + invalid_vip = "10.10.10.10" + + self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, + fake_mac=False, + invalid_vni=invalid_vni, + invalid_outer_src_ip=invalid_pa_sip, + invalid_inner_dst_mac=invalid_ca_dst_mac, + invalid_vip=invalid_vip) + + invalid_pa_valid_ip = "10.10.1.25" # pa validation missmatch + self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, + fake_mac=False, + invalid_outer_src_ip=invalid_pa_valid_ip) + + print('\n', self.vnet2VnetInboundNegativeTest.__name__, ' OK') + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetInboundDecapPaValidateSinglePortOverlayIpv6Test(Vnet2VnetInboundDecapPaValidateSinglePortTest): + """ + Underlay IPv4 and Overlay IPv6 configs + Inbound Vnet to Vnet scenario test case with + VXLAN_DECAP_PA_VALIDATE inbound routing entry action + with underlay config (neighbour + next hop) but without underlay routes + + Verifies positive and negative scenarios + """ + + def setUp(self): + super(Vnet2VnetInboundDecapPaValidateSinglePortOverlayIpv6Test, self).setUp(overlay_ipv6=True) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetInboundDecapPaValidateTwoPortsTest(Vnet2VnetInboundDecapPaValidateSinglePortTest): + """ + Inbound Vnet to Vnet scenario test case with + VXLAN_DECAP_PA_VALIDATE inbound routing entry action + with full underlay config (2 neighbours, 2 next-hops, 2 routes) + + Verifies positive scenario + """ + + def runTest(self): + self.configureTest() + self.configure_underlay(self.tx_host, self.rx_host) + + self.vnet2VnetInboundRoutingTest(tx_equal_to_rx=False) + self.vnet2VnetInboundNegativeTest() + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetInboundDecapPaValidateTwoPortsOverlayIpv6Test(Vnet2VnetInboundDecapPaValidateSinglePortOverlayIpv6Test): + """ + Underlay IPv4 and Overlay IPv6 configs + Inbound Vnet to Vnet scenario test case with + VXLAN_DECAP_PA_VALIDATE inbound routing entry action + with full underlay config (2 neighbours, 2 next-hops, 2 routes) + + Verifies positive scenario + """ + + def runTest(self): + self.configureTest() + self.configure_underlay(self.tx_host, self.rx_host) + + self.vnet2VnetInboundRoutingTest(tx_equal_to_rx=False) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetInboundDecapSinglePortTest(Vnet2VnetInboundDecapPaValidateSinglePortTest): + """ + Inbound Vnet to Vnet scenario test case with + VXLAN_DECAP inbound routing entry action + with underlay config (neighbour + next hop) but without underlay routes + + Verifies positive and negative scenarios + """ + + def configureTest(self): + """ + Setup DUT overlay in accordance with test purpose + """ + + self.vip_create(self.tx_host.peer.ip) + + # direction lookup VNI, reserved VNI assigned to the VM->Appliance + self.direction_lookup_create(self.rx_host.client.vni) + + dst_vnet = self.vnet_create(vni=self.rx_host.client.vni) + + eni_id = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.rx_host.ip), + vm_vni=self.rx_host.client.vni, + vnet_id=dst_vnet) + self.eni_mac_map_create(eni_id, self.rx_host.client.mac) # ENI MAC + + # Inbound routing PA Validate + self.inbound_routing_decap_create(eni_id, vni=self.tx_host.client.vni, + sip=self.tx_host.ip, sip_mask="255.255.255.0") + + def vnet2VnetInboundNegativeTest(self): + """ + Verifies negative scenarios (packet drop): + - wrong CA Dst MAC + - wrong VIP + - wrong VNI + - wrong Physical SIP: routing missmatch + """ + + invalid_vni = 1000 + invalid_ca_dst_mac = "9e:ba:ce:98:d9:e2" + invalid_vip = "10.10.10.10" + invalid_pa_sip = "10.10.3.22" + + self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, + fake_mac=False, + invalid_vni=invalid_vni, + invalid_inner_dst_mac=invalid_ca_dst_mac, + invalid_vip=invalid_vip, + invalid_outer_src_ip=invalid_pa_sip) + + print('\n', self.vnet2VnetInboundNegativeTest.__name__, ' OK') + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetInboundDecapSinglePortOverlayIpv6Test(Vnet2VnetInboundDecapSinglePortTest): + """ + Underlay IPv4 and Overlay IPv6 configs + Inbound Vnet to Vnet scenario test case with + VXLAN_DECAP inbound routing entry action + with underlay config (neighbour + next hop) but without underlay routes + + Verifies positive and negative scenarios + """ + + def setUp(self): + super(Vnet2VnetInboundDecapSinglePortOverlayIpv6Test, self).setUp(overlay_ipv6=True) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetInboundDecapTwoPortsTest(Vnet2VnetInboundDecapSinglePortTest): + """ + Inbound Vnet to Vnet scenario test case with + VXLAN_DECAP inbound routing entry action + with full underlay config (2 neighbours, 2 next-hops, 2 routes) + + Verifies positive scenario + """ + + def runTest(self): + self.configureTest() + self.configure_underlay(self.tx_host, self.rx_host) + + self.vnet2VnetInboundRoutingTest(tx_equal_to_rx=False) + self.vnet2VnetInboundNegativeTest() + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetInboundDecapTwoPortsOverlayIpv6Test(Vnet2VnetInboundDecapSinglePortOverlayIpv6Test): + """ + Underlay IPv4 and Overlay IPv6 configs + Inbound Vnet to Vnet scenario test case with + VXLAN_DECAP inbound routing entry action + with full underlay config (2 neighbours, 2 next-hops, 2 routes) + + Verifies positive scenario + """ + + def runTest(self): + self.configureTest() + self.configure_underlay(self.tx_host, self.rx_host) + + self.vnet2VnetInboundRoutingTest(tx_equal_to_rx=False) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetInboundMultiplePaValidatesSingleEniSinglePortTest(VnetApiEndpoints, VnetTrafficMixin): + """ + Inbound Vnet to Vnet scenario test case with single eni and + multiple inbound routing entries (3 PA validate and 1 Decap) + with underlay config (neighbour + next hop) but without underlay routes + + Connections: + Positive scenarios: + tx_host_0 -> rx_host (ENI 0) with PA validation 0 + tx_host_1 -> rx_host (ENI 0) with PA validation 1 + tx_host_2 -> rx_host (ENI 0) with PA validation 2 + tx_host_3 -> rx_host (ENI 0) without PA validation + Negative scenarios: + tx_host_0 -> rx_host invalid VNI + tx_host_1 -> rx_host Invalid ENI mac + tx_host_2 -> rx_host Invalid PA IP + tx_host_3 -> rx_host invalid VIP + """ + + def runTest(self): + # Reconfigure configuration for tx equal to rx + self.update_configuration_for_tx_equal_to_rx() + self.configureTest() + self.configure_underlay(self.tx_host, add_routes=False) + + self.vnet2VnetInboundRoutingPositiveTest(tx_equal_to_rx=True) + self.vnet2VnetInboundRoutingNegativeTest() + + def configureTest(self): + """ + Setup DUT in accordance with test purpose + """ + self.tx_host_0 = self.tx_host + + self.tx_host_1 = self.define_neighbor_network(port=self.tx_host_0.port, + mac=self.tx_host_0.mac, + ip="8.0.0.1", + ip_prefix="8.0.0.0/24", + peer_port=self.tx_host_0.peer.port, + peer_mac=self.tx_host_0.peer.mac, + peer_ip=self.tx_host_0.peer.ip, + client_mac="00:03:00:00:05:16", + client_ip="192.168.2.1", + client_vni=10) + + self.tx_host_2 = self.define_neighbor_network(port=self.tx_host_0.port, + mac=self.tx_host_0.mac, + ip="9.0.0.1", + ip_prefix="9.0.0.0/24", + peer_port=self.tx_host_0.peer.port, + peer_mac=self.tx_host_0.peer.mac, + peer_ip=self.tx_host_0.peer.ip, + client_mac="00:10:00:00:AA:20", + client_ip="192.168.3.1", + client_vni=30) + + self.tx_host_3 = self.define_neighbor_network(port=self.tx_host_0.port, + mac=self.tx_host_0.mac, + ip="11.0.0.1", + ip_prefix="11.0.0.1/24", + peer_port=self.tx_host_0.peer.port, + peer_mac=self.tx_host_0.peer.mac, + peer_ip=self.tx_host_0.peer.ip, + client_mac="00:AA:00:23:CC:20", + client_ip="192.168.4.1", + client_vni=40) + + self.vip_create(self.tx_host_0.peer.ip) + + # direction lookup VNI, reserved VNI assigned to the VM->Appliance + self.direction_lookup_create(self.rx_host.client.vni) + + src_vnet_0 = self.vnet_create(vni=self.tx_host_0.client.vni) + src_vnet_1 = self.vnet_create(vni=self.tx_host_1.client.vni) + src_vnet_2 = self.vnet_create(vni=self.tx_host_2.client.vni) + + dst_vnet = self.vnet_create(vni=self.rx_host.client.vni) + + # ENI configuration + eni_id = self.eni_create(vm_underlay_dip=sai_ipaddress(self.rx_host.ip), + vm_vni=self.rx_host.client.vni, + vnet_id=dst_vnet) + self.eni_mac_map_create(eni_id, self.rx_host.client.mac) # ENI MAC + + # Inbound routing decap + self.inbound_routing_decap_create(eni_id, vni=self.tx_host_3.client.vni, + sip=self.tx_host_3.ip, sip_mask="255.255.255.0") + + # Inbound routing decap PA Validate tx_host_0 + self.inbound_routing_decap_validate_create(eni_id, vni=self.tx_host_0.client.vni, + sip=self.tx_host_0.ip, sip_mask="255.255.255.0", + src_vnet_id=src_vnet_0) + # PA validation entry with Permit action tx_host_0 + self.pa_validation_create(self.tx_host_0.ip, src_vnet_0) + + # Inbound routing decap PA Validate tx_host_1 + self.inbound_routing_decap_validate_create(eni_id, vni=self.tx_host_1.client.vni, + sip=self.tx_host_1.ip, sip_mask="255.255.255.0", + src_vnet_id=src_vnet_1) + # PA validation entry with Permit action tx_host_1 + self.pa_validation_create(self.tx_host_1.ip, src_vnet_1) + + # Inbound routing decap PA Validate tx_host_2 + self.inbound_routing_decap_validate_create(eni_id, vni=self.tx_host_2.client.vni, + sip=self.tx_host_2.ip, sip_mask="255.255.255.0", + src_vnet_id=src_vnet_2) + # PA validation entry with Permit action tx_host_2 + self.pa_validation_create(self.tx_host_2.ip, src_vnet_2) + + def vnet2VnetInboundRoutingPositiveTest(self, tx_equal_to_rx): + """ + Inbound VNET to VNET test + Verifies correct packet routing: + tx_host_0 -> rx_host (ENI 0) with PA validation 0 + tx_host_1 -> rx_host (ENI 0) with PA validation 1 + tx_host_2 -> rx_host (ENI 0) with PA validation 2 + tx_host_3 -> rx_host (ENI 0) without PA validation + """ + + print("\nVerifying Inbound pkt send tx_host_0 -> rx_host ...") + self.verify_traffic_scenario(client=self.tx_host_0, server=self.rx_host, + connection=self.connection, fake_mac=False, tx_equal_to_rx=tx_equal_to_rx) + print("OK") + + print("\nVerifying Inbound pkt send tx_host_1 -> rx_host ...") + self.verify_traffic_scenario(client=self.tx_host_1, server=self.rx_host, + connection=self.connection, fake_mac=False, tx_equal_to_rx=tx_equal_to_rx) + print("OK") + + print("\nVerifying Inbound pkt send tx_host_2 -> rx_host ...") + self.verify_traffic_scenario(client=self.tx_host_2, server=self.rx_host, + connection=self.connection, fake_mac=False, tx_equal_to_rx=tx_equal_to_rx) + print("OK") + + print("\nVerifying Inbound pkt send tx_host_3 -> rx_host ...") + self.verify_traffic_scenario(client=self.tx_host_3, server=self.rx_host, + connection=self.connection, fake_mac=False, tx_equal_to_rx=tx_equal_to_rx) + print("OK") + + print('\n', self.vnet2VnetInboundRoutingPositiveTest.__name__, ' OK') + + def vnet2VnetInboundRoutingNegativeTest(self): + """ + Verifies negative scenarios (packet drop): + tx_host_0 -> rx_host invalid VNI + tx_host_1 -> rx_host Invalid ENI mac + tx_host_2 -> rx_host Invalid PA IP + tx_host_3 -> rx_host invalid VIP + """ + + invalid_vni = 200 + invalid_ca_dst_mac = "9e:ba:ce:98:d9:e2" + invalid_pa_sip = "10.10.5.1" # routing missmatch + invalid_vip = "10.10.10.10" + + print("\nVerifying Inbound pkt drop with invalid VNI tx_host_0 -> rx_host ...") + self.verify_negative_traffic_scenario(client=self.tx_host_0, server=self.rx_host, + fake_mac=False, + invalid_vni=invalid_vni) + print("OK") + + print("\nVerifying Inbound pkt drop with invalid ENI mac tx_host_1 -> rx_host ...") + self.verify_negative_traffic_scenario(client=self.tx_host_1, server=self.rx_host, + fake_mac=False, + invalid_inner_dst_mac=invalid_ca_dst_mac) + print("OK") + + print("\nVerifying Inbound pkt drop with invalid PA IP tx_host_2 -> rx_host ...") + self.verify_negative_traffic_scenario(client=self.tx_host_2, server=self.rx_host, + fake_mac=False, + invalid_outer_src_ip=invalid_pa_sip) + print("OK") + + print("\nVerifying Inbound pkt drop with invalid VIP tx_host_3 -> rx_host ...") + self.verify_negative_traffic_scenario(client=self.tx_host_3, server=self.rx_host, + fake_mac=False, + invalid_vip=invalid_vip) + print("OK") + + print('\n', self.vnet2VnetInboundRoutingNegativeTest.__name__, ' OK') + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetInboundMultiplePaValidatesSingleEniSinglePortOverlayIpv6Test(Vnet2VnetInboundMultiplePaValidatesSingleEniSinglePortTest): + """ + Underlay IPv4 and Overlay IPv6 configs + Inbound Vnet to Vnet scenario test case with single eni and + multiple inbound routing entries (3 PA validate and 1 Decap) + with underlay config (neighbour + next hop) but without underlay routes + + Connections: + Positive scenarios: + tx_host_0 -> rx_host (ENI 0) with PA validation 0 + tx_host_1 -> rx_host (ENI 0) with PA validation 1 + tx_host_2 -> rx_host (ENI 0) with PA validation 2 + tx_host_3 -> rx_host (ENI 0) without PA validation + """ + + def setUp(self): + super(Vnet2VnetInboundMultiplePaValidatesSingleEniSinglePortOverlayIpv6Test, self).setUp(overlay_ipv6=True) + + def runTest(self): + # Reconfigure configuration for tx equal to rx + self.update_configuration_for_tx_equal_to_rx() + self.configureTest() + self.configure_underlay(self.tx_host, add_routes=False) + + self.vnet2VnetInboundRoutingPositiveTest(tx_equal_to_rx=True) + + def configureTest(self): + """ + Setup DUT in accordance with test purpose + """ + self.tx_host_0 = self.tx_host + + self.tx_host_1 = self.define_neighbor_network(port=self.tx_host_0.port, + mac=self.tx_host_0.mac, + ip="8.0.0.1", + ip_prefix="8.0.0.0/24", + peer_port=self.tx_host_0.peer.port, + peer_mac=self.tx_host_0.peer.mac, + peer_ip=self.tx_host_0.peer.ip, + client_mac="00:03:00:00:05:16", + client_ip="cccc::60", + client_vni=10) + + self.tx_host_2 = self.define_neighbor_network(port=self.tx_host_0.port, + mac=self.tx_host_0.mac, + ip="9.0.0.1", + ip_prefix="9.0.0.0/24", + peer_port=self.tx_host_0.peer.port, + peer_mac=self.tx_host_0.peer.mac, + peer_ip=self.tx_host_0.peer.ip, + client_mac="00:10:00:00:AA:20", + client_ip="dddd::14", + client_vni=30) + + self.tx_host_2 = self.define_neighbor_network(port=self.tx_host_0.port, + mac=self.tx_host_0.mac, + ip="11.0.0.1", + ip_prefix="11.0.0.1/24", + peer_port=self.tx_host_0.peer.port, + peer_mac=self.tx_host_0.peer.mac, + peer_ip=self.tx_host_0.peer.ip, + client_mac="00:AA:00:23:CC:20", + client_ip="eeee::80", + client_vni=40) + + self.vip_create(self.tx_host_0.peer.ip) + + # direction lookup VNI, reserved VNI assigned to the VM->Appliance + self.direction_lookup_create(self.rx_host.client.vni) + + src_vnet_0 = self.vnet_create(vni=self.tx_host_0.client.vni) + src_vnet_1 = self.vnet_create(vni=self.tx_host_1.client.vni) + src_vnet_2 = self.vnet_create(vni=self.tx_host_2.client.vni) + + dst_vnet = self.vnet_create(vni=self.rx_host.client.vni) + + # ENI configuration + eni_id = self.eni_create(vm_underlay_dip=sai_ipaddress(self.rx_host.ip), + vm_vni=self.rx_host.client.vni, + vnet_id=dst_vnet) + self.eni_mac_map_create(eni_id, self.rx_host.client.mac) # ENI MAC + + # Inbound routing decap + self.inbound_routing_decap_create(eni_id, vni=self.tx_host_3.client.vni, + sip=self.tx_host_3.ip, sip_mask="255.255.255.0") + + # Inbound routing decap PA Validate tx_host_0 + self.inbound_routing_decap_validate_create(eni_id, vni=self.tx_host_0.client.vni, + sip=self.tx_host_0.ip, sip_mask="255.255.255.0", + src_vnet_id=src_vnet_0) + # PA validation entry with Permit action tx_host_0 + self.pa_validation_create(self.tx_host_0.ip, src_vnet_0) + + # Inbound routing decap PA Validate tx_host_1 + self.inbound_routing_decap_validate_create(eni_id, vni=self.tx_host_1.client.vni, + sip=self.tx_host_1.ip, sip_mask="255.255.255.0", + src_vnet_id=src_vnet_1) + # PA validation entry with Permit action tx_host_1 + self.pa_validation_create(self.tx_host_1.ip, src_vnet_1) + + # Inbound routing decap PA Validate tx_host_2 + self.inbound_routing_decap_validate_create(eni_id, vni=self.tx_host_2.client.vni, + sip=self.tx_host_2.ip, sip_mask="255.255.255.0", + src_vnet_id=src_vnet_2) + # PA validation entry with Permit action tx_host_2 + self.pa_validation_create(self.tx_host_2.ip, src_vnet_2) + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetInboundMultiplePaValidatesSingleEniTwoPortsTest(Vnet2VnetInboundMultiplePaValidatesSingleEniSinglePortTest): + """ + Inbound Vnet to Vnet scenario test case with single eni and + multiple inbound routing entries (3 PA validate and 1 Decap) + with underlay config (2 neighbours, 2 next-hops, 5 routes) + + Connections: + Positive scenarios: + tx_host_0 -> rx_host (ENI 0) with PA validation 0 + tx_host_1 -> rx_host (ENI 0) with PA validation 1 + tx_host_2 -> rx_host (ENI 0) with PA validation 2 + tx_host_3 -> rx_host (ENI 0) without PA validation + """ + + def runTest(self): + self.configureTest() + self.configure_underlay() + + self.vnet2VnetInboundRoutingPositiveTest(tx_equal_to_rx=False) + + def configure_underlay(self): + + rif_0 = self.router_interface_create(self.tx_host_0.peer.port, + src_mac=self.tx_host_0.peer.mac) + nhop_0 = self.nexthop_create(rif_0, self.tx_host_0.ip) + self.neighbor_create(rif_0, self.tx_host_0.ip, self.tx_host_0.mac) + + self.route_create(self.tx_host_0.ip_prefix, nhop_0) + self.route_create(self.tx_host_1.ip_prefix, nhop_0) + self.route_create(self.tx_host_2.ip_prefix, nhop_0) + self.route_create(self.tx_host_3.ip_prefix, nhop_0) + + rif_1 = self.router_interface_create(self.rx_host.peer.port, + src_mac=self.rx_host.peer.mac) + nhop_1 = self.nexthop_create(rif_1, self.rx_host.ip) + self.neighbor_create(rif_1, self.rx_host.ip, self.rx_host.mac) + self.route_create(self.rx_host.ip_prefix, nhop_1) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetInboundMultiplePaValidatesSingleEniTwoPortsOverlayIpv6Test(Vnet2VnetInboundMultiplePaValidatesSingleEniSinglePortOverlayIpv6Test): + """ + Underlay IPv4 and Overlay IPv6 configs + Inbound Vnet to Vnet scenario test case with single eni and + multiple inbound routing entries (3 PA validate and 1 Decap) + with underlay config (2 neighbours, 2 next-hops, 5 routes) + + Connections: + Positive scenarios: + tx_host_0 -> rx_host (ENI 0) with PA validation 0 + tx_host_1 -> rx_host (ENI 0) with PA validation 1 + tx_host_2 -> rx_host (ENI 0) with PA validation 2 + tx_host_3 -> rx_host (ENI 0) without PA validation + """ + + def runTest(self): + self.configureTest() + self.configure_underlay() + + self.vnet2VnetInboundRoutingPositiveTest(tx_equal_to_rx=False) + + def configure_underlay(self): + + rif_0 = self.router_interface_create(self.tx_host_0.peer.port, + src_mac=self.tx_host_0.peer.mac) + nhop_0 = self.nexthop_create(rif_0, self.tx_host_0.ip) + self.neighbor_create(rif_0, self.tx_host_0.ip, self.tx_host_0.mac) + + self.route_create(self.tx_host_0.ip_prefix, nhop_0) + self.route_create(self.tx_host_1.ip_prefix, nhop_0) + self.route_create(self.tx_host_2.ip_prefix, nhop_0) + self.route_create(self.tx_host_3.ip_prefix, nhop_0) + + rif_1 = self.router_interface_create(self.rx_host_0.peer.port, + src_mac=self.rx_host_0.peer.mac) + nhop_1 = self.nexthop_create(rif_1, self.rx_host_0.ip) + self.neighbor_create(rif_1, self.rx_host_0.ip, self.rx_host_0.mac) + self.route_create(self.rx_host_1.ip_prefix, nhop_1) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetInboundMultiplePaValidatesMultipleEniSinglePortTest(VnetApiEndpoints, VnetTrafficMixin): + """ + Inbound Vnet to Vnet scenario test case with + multiple inbound routing entries (2 PA validate and 1 Decap) + with underlay config (neighbour + next hop) but without underlay routes + + Connections: + Positive scenarios: + tx_host_0 -> rx_host_0 (ENI 0) with PA validation + tx_host_1 -> rx_host_1 (ENI 1) with PA validation + tx_host_2 -> rx_host_0 (ENI 0) without PA validation + Negative scenarios: + tx_host_0 -> rx_host_1 + tx_host_1 -> rx_host_0 + tx_host_2 -> rx_host_1 + """ + + def runTest(self): + # Reconfigure configuration for tx equal to rx + self.update_configuration_for_tx_equal_to_rx() + self.configureTest() + self.configure_underlay(self.tx_host, add_routes=False) + + self.vnet2VnetInboundRoutingPositiveTest(tx_equal_to_rx=True) + self.vnet2VnetInboundRoutingNegativeTest() + + def configureTest(self): + """ + Setup DUT in accordance with test purpose + """ + self.tx_host_0 = self.tx_host + + self.tx_host_1 = self.define_neighbor_network(port=self.tx_host_0.port, + mac=self.tx_host_0.mac, + ip=self.tx_host_0.ip, + ip_prefix=self.tx_host_0.ip_prefix, + peer_port=self.tx_host_0.peer.port, + peer_mac=self.tx_host_0.peer.mac, + peer_ip=self.tx_host_0.peer.ip, + client_mac="00:03:00:00:05:16", + client_ip="192.168.2.1", + client_vni=10) + + self.tx_host_2 = self.define_neighbor_network(port=self.tx_host_0.port, + mac=self.tx_host_0.mac, + ip="9.0.0.1", + ip_prefix="9.0.0.0/24", + peer_port=self.tx_host_0.peer.port, + peer_mac=self.tx_host_0.peer.mac, + peer_ip=self.tx_host_0.peer.ip, + client_mac="00:10:00:00:AA:20", + client_ip="192.168.3.1", + client_vni=30) + + self.rx_host_0 = self.rx_host + + self.rx_host_1 = self.define_neighbor_network(port=self.rx_host_0.port, + mac=self.rx_host_0.mac, + ip=self.rx_host_0.ip, + ip_prefix=self.rx_host_0.ip_prefix, + peer_port=self.rx_host_0.peer.port, + peer_mac=self.rx_host_0.peer.mac, + peer_ip=self.rx_host_0.peer.ip, + client_mac="00:05:00:00:06:17", + client_ip="192.168.4.1", + client_vni=20) + + self.vip_create(self.tx_host_0.peer.ip) + + # direction lookup VNI, reserved VNI assigned to the VM->Appliance + self.direction_lookup_create(self.rx_host_0.client.vni) + self.direction_lookup_create(self.rx_host_1.client.vni) + + src_vnet_0 = self.vnet_create(vni=self.tx_host_0.client.vni) + src_vnet_1 = self.vnet_create(vni=self.tx_host_1.client.vni) + + dst_vnet_0 = self.vnet_create(vni=self.rx_host_0.client.vni) + dst_vnet_1 = self.vnet_create(vni=self.rx_host_1.client.vni) + + # ENI 0 configuration + eni_id_0 = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.rx_host_0.ip), + vm_vni=self.rx_host_0.client.vni, + vnet_id=dst_vnet_0) + self.eni_mac_map_create(eni_id_0, self.rx_host_0.client.mac) # ENI MAC + + # Inbound routing decap + self.inbound_routing_decap_create(eni_id_0, vni=self.tx_host_2.client.vni, + sip=self.tx_host_2.ip, sip_mask="255.255.255.0") + + # Inbound routing decap PA Validate + self.inbound_routing_decap_validate_create(eni_id_0, vni=self.tx_host_0.client.vni, + sip=self.tx_host_0.ip, sip_mask="255.255.255.0", + src_vnet_id=src_vnet_0) + # PA validation entry with Permit action + self.pa_validation_create(self.tx_host_0.ip, src_vnet_0) + + # ENI 1 configuration + eni_id_1 = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.rx_host_1.ip), + vm_vni=self.rx_host_1.client.vni, + vnet_id=dst_vnet_1) + self.eni_mac_map_create(eni_id_1, self.rx_host_1.client.mac) # ENI MAC + + # Inbound routing PA Validate + self.inbound_routing_decap_validate_create(eni_id_1, vni=self.tx_host_1.client.vni, + sip=self.tx_host_1.ip, sip_mask="255.255.255.0", + src_vnet_id=src_vnet_1) + # PA validation entry with Permit action + self.pa_validation_create(self.tx_host_1.ip, src_vnet_1) + + def vnet2VnetInboundRoutingPositiveTest(self, tx_equal_to_rx): + """ + Inbound VNET to VNET test + Verifies correct packet routing: + tx_host_0 -> rx_host_0 (ENI 0) with PA validation + tx_host_1 -> rx_host_1 (ENI 1) with PA validation + tx_host_2 -> rx_host_0 (ENI 0) without PA validation + """ + + print("\nVerifying Inbound pkt send tx_host_0 -> rx_host_0 ...") + self.verify_traffic_scenario(client=self.tx_host_0, server=self.rx_host_0, + connection=self.connection, fake_mac=False, tx_equal_to_rx=tx_equal_to_rx) + print("OK") + + print("\nVerifying Inbound pkt send tx_host_1 -> rx_host_1 ...") + self.verify_traffic_scenario(client=self.tx_host_1, server=self.rx_host_1, + connection=self.connection, fake_mac=False, tx_equal_to_rx=tx_equal_to_rx) + print("OK") + + print("\nVerifying Inbound pkt send tx_host_2 -> rx_host_0 ...") + self.verify_traffic_scenario(client=self.tx_host_2, server=self.rx_host_0, + connection=self.connection, fake_mac=False, tx_equal_to_rx=tx_equal_to_rx) + print("OK") + + + print('\n', self.vnet2VnetInboundRoutingPositiveTest.__name__, ' OK') + + def vnet2VnetInboundRoutingNegativeTest(self): + """ + Verifies negative scenarios (packet drop): + tx_host_0 -> rx_host_1 + tx_host_1 -> rx_host_0 + tx_host_2 -> rx_host_1 + """ + + print("\nVerifying Inbound pkt drop tx_host_0 -> rx_host_1 ...") + self.verify_negative_traffic_scenario(client=self.tx_host_0, server=self.rx_host_1, + fake_mac=False, valid_pkt_drop=True) + print("OK") + + print("\nVerifying Inbound pkt drop tx_host_1 -> rx_host_0 ...") + self.verify_negative_traffic_scenario(client=self.tx_host_1, server=self.rx_host_0, + fake_mac=False, valid_pkt_drop=True) + print("OK") + + print("\nVerifying Inbound pkt drop tx_host_2 -> rx_host_1 ...") + self.verify_negative_traffic_scenario(client=self.tx_host_2, server=self.rx_host_1, + fake_mac=False, valid_pkt_drop=True) + print("OK") + + print('\n', self.vnet2VnetInboundRoutingNegativeTest.__name__, ' OK') + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetInboundMultiplePaValidatesMultipleEniSinglePortOverlayIpv6Test(Vnet2VnetInboundMultiplePaValidatesMultipleEniSinglePortTest): + """ + Underlay IPv4 and Overlay IPv6 configs + Inbound Vnet to Vnet scenario test case with + multiple inbound routing entries (2 PA validate and 1 Decap) + with underlay config (neighbour + next hop) but without underlay routes + + Connections: + Positive scenarios: + tx_host_0 -> rx_host_0 (ENI 0) with PA validation + tx_host_1 -> rx_host_1 (ENI 1) with PA validation + tx_host_2 -> rx_host_0 (ENI 0) without PA validation + Negative scenarios: + tx_host_0 -> rx_host_1 + tx_host_1 -> rx_host_0 + tx_host_2 -> rx_host_1 + """ + + def setUp(self): + super(Vnet2VnetInboundMultiplePaValidatesMultipleEniSinglePortOverlayIpv6Test, self).setUp(overlay_ipv6=True) + + def runTest(self): + # Reconfigure configuration for tx equal to rx + self.update_configuration_for_tx_equal_to_rx() + self.configureTest() + self.configure_underlay(self.tx_host, add_routes=False) + + self.vnet2VnetInboundRoutingPositiveTest(tx_equal_to_rx=True) + + def configureTest(self): + """ + Setup DUT in accordance with test purpose + """ + self.tx_host_0 = self.tx_host + + self.tx_host_1 = self.define_neighbor_network(port=self.tx_host_0.port, + mac=self.tx_host_0.mac, + ip=self.tx_host_0.ip, + ip_prefix=self.tx_host_0.ip_prefix, + peer_port=self.tx_host_0.peer.port, + peer_mac=self.tx_host_0.peer.mac, + peer_ip=self.tx_host_0.peer.ip, + client_mac="00:03:00:00:05:16", + client_ip="cccc::30", + client_vni=10) + + self.tx_host_2 = self.define_neighbor_network(port=self.tx_host_0.port, + mac=self.tx_host_0.mac, + ip="9.0.0.1", + ip_prefix="9.0.0.0/24", + peer_port=self.tx_host_0.peer.port, + peer_mac=self.tx_host_0.peer.mac, + peer_ip=self.tx_host_0.peer.ip, + client_mac="00:10:00:00:AA:20", + client_ip="dddd::40", + client_vni=30) + + self.rx_host_0 = self.rx_host + + self.rx_host_1 = self.define_neighbor_network(port=self.rx_host_0.port, + mac=self.rx_host_0.mac, + ip=self.rx_host_0.ip, + ip_prefix=self.rx_host_0.ip_prefix, + peer_port=self.rx_host_0.peer.port, + peer_mac=self.rx_host_0.peer.mac, + peer_ip=self.rx_host_0.peer.ip, + client_mac="00:05:00:00:06:17", + client_ip="eeee::50", + client_vni=20) + + self.vip_create(self.tx_host_0.peer.ip) + + # direction lookup VNI, reserved VNI assigned to the VM->Appliance + self.direction_lookup_create(self.rx_host_0.client.vni) + self.direction_lookup_create(self.rx_host_1.client.vni) + + src_vnet_0 = self.vnet_create(vni=self.tx_host_0.client.vni) + src_vnet_1 = self.vnet_create(vni=self.tx_host_1.client.vni) + + dst_vnet_0 = self.vnet_create(vni=self.rx_host_0.client.vni) + dst_vnet_1 = self.vnet_create(vni=self.rx_host_1.client.vni) + + # ENI 0 configuration + eni_id_0 = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.rx_host_0.ip), + vm_vni=self.rx_host_0.client.vni, + vnet_id=dst_vnet_0) + self.eni_mac_map_create(eni_id_0, self.rx_host_0.client.mac) # ENI MAC + + # Inbound routing decap + self.inbound_routing_decap_create(eni_id_0, vni=self.tx_host_2.client.vni, + sip=self.tx_host_2.ip, sip_mask="255.255.255.0") + + # Inbound routing decap PA Validate + self.inbound_routing_decap_validate_create(eni_id_0, vni=self.tx_host_0.client.vni, + sip=self.tx_host_0.ip, sip_mask="255.255.255.0", + src_vnet_id=src_vnet_0) + # PA validation entry with Permit action + self.pa_validation_create(self.tx_host_0.ip, src_vnet_0) + + # ENI 1 configuration + eni_id_1 = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.rx_host_1.ip), + vm_vni=self.rx_host_1.client.vni, + vnet_id=dst_vnet_1) + self.eni_mac_map_create(eni_id_1, self.rx_host_1.client.mac) # ENI MAC + + # Inbound routing PA Validate + self.inbound_routing_decap_validate_create(eni_id_1, vni=self.tx_host_1.client.vni, + sip=self.tx_host_1.ip, sip_mask="255.255.255.0", + src_vnet_id=src_vnet_1) + # PA validation entry with Permit action + self.pa_validation_create(self.tx_host_1.ip, src_vnet_1) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetInboundMultiplePaValidatesMultipleEniTwoPortsTest(Vnet2VnetInboundMultiplePaValidatesMultipleEniSinglePortTest): + """ + Inbound Vnet to Vnet scenario test case with + multiple inbound routing entries (2 PA validate and 1 Decap) + with underlay config (2 neighbours, 2 next-hops, 3 routes) + + Connections: + Positive scenarios: + tx_host_0 -> rx_host_0 (ENI 0) with PA validation + tx_host_1 -> rx_host_1 (ENI 1) with PA validation + tx_host_2 -> rx_host_0 (ENI 0) without PA validation + """ + + def runTest(self): + self.configureTest() + self.configure_underlay() + + self.vnet2VnetInboundRoutingPositiveTest(tx_equal_to_rx=False) + + def configure_underlay(self): + rif_0 = self.router_interface_create(self.tx_host_0.peer.port, + src_mac=self.tx_host_0.peer.mac) + nhop_0 = self.nexthop_create(rif_0, self.tx_host_0.ip) + self.neighbor_create(rif_0, self.tx_host_0.ip, self.tx_host_0.mac) + self.route_create(self.tx_host_0.ip_prefix, nhop_0) + self.route_create(self.tx_host_2.ip_prefix, nhop_0) + + rif_1 = self.router_interface_create(self.rx_host_0.peer.port, + src_mac=self.rx_host_0.peer.mac) + nhop_1 = self.nexthop_create(rif_1, self.rx_host_0.ip) + self.neighbor_create(rif_1, self.rx_host_0.ip, self.rx_host_0.mac) + self.route_create(self.rx_host_1.ip_prefix, nhop_1) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetInboundMultiplePaValidatesMultipleEniTwoPortsOverlayIpv6Test(Vnet2VnetInboundMultiplePaValidatesMultipleEniSinglePortOverlayIpv6Test): + """ + Underlay IPv4 and Overlay IPv6 configs + Inbound Vnet to Vnet scenario test case with + multiple inbound routing entries (2 PA validate and 1 Decap) + with underlay config (2 neighbours, 2 next-hops, 3 routes) + + Connections: + Positive scenarios: + tx_host_0 -> rx_host_0 (ENI 0) with PA validation + tx_host_1 -> rx_host_1 (ENI 1) with PA validation + tx_host_2 -> rx_host_0 (ENI 0) without PA validation + """ + + def runTest(self): + self.configureTest() + self.configure_underlay() + + self.vnet2VnetInboundRoutingPositiveTest(tx_equal_to_rx=False) + + def configure_underlay(self): + rif_0 = self.router_interface_create(self.tx_host_0.peer.port, + src_mac=self.tx_host_0.peer.mac) + nhop_0 = self.nexthop_create(rif_0, self.tx_host_0.ip) + self.neighbor_create(rif_0, self.tx_host_0.ip, self.tx_host_0.mac) + self.route_create(self.tx_host_0.ip_prefix, nhop_0) + self.route_create(self.tx_host_2.ip_prefix, nhop_0) + + rif_1 = self.router_interface_create(self.rx_host_0.peer.port, + src_mac=self.rx_host_0.peer.mac) + nhop_1 = self.nexthop_create(rif_1, self.rx_host_0.ip) + self.neighbor_create(rif_1, self.rx_host_0.ip, self.rx_host_0.mac) + self.route_create(self.rx_host_1.ip_prefix, nhop_1) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetSingleInboundRouteMultiplePaValidateSinglePortTest(VnetApiEndpoints, VnetTrafficMixin): + """ + Inbound Vnet to Vnet scenario test case with + VXLAN_DECAP_PA_VALIDATE inbound routing entry action with multiple PA validate entries + with underlay config (neighbour + next hop) but without underlay routes + + Verifies positive and negative scenarios + """ + + def runTest(self): + # Reconfigure configuration for tx equal to rx + self.update_configuration_for_tx_equal_to_rx() + self.configureTest() + self.configure_underlay(self.tx_host_0, add_routes=False) + + self.vnet2VnetInboundRoutingTest(tx_equal_to_rx=True) + + def configureTest(self): + """ + Setup DUT in accordance with test purpose + """ + self.tx_host_0 = self.tx_host + + self.tx_host_1 = self.define_neighbor_network(port=self.tx_host_0.port, + mac=self.tx_host_0.mac, + ip="10.10.1.20", + ip_prefix=self.tx_host_0.ip_prefix, + peer_port=self.tx_host_0.peer.port, + peer_mac=self.tx_host_0.peer.mac, + peer_ip=self.tx_host_0.peer.ip, + client_mac="00:03:00:00:05:16", + client_ip="192.168.2.1", + client_vni=self.tx_host_0.client.vni) + + self.tx_host_2 = self.define_neighbor_network(port=self.tx_host_0.port, + mac=self.tx_host_0.mac, + ip="10.10.1.189", + ip_prefix=self.tx_host_0.ip_prefix, + peer_port=self.tx_host_0.peer.port, + peer_mac=self.tx_host_0.peer.mac, + peer_ip=self.tx_host_0.peer.ip, + client_mac="00:10:00:00:AA:20", + client_ip="192.168.3.1", + client_vni=self.tx_host_0.client.vni) + + self.tx_host_3 = self.define_neighbor_network(port=self.tx_host_0.port, + mac=self.tx_host_0.mac, + ip="10.10.1.200", # for PA validate missmatch + ip_prefix=self.tx_host_0.ip_prefix, + peer_port=self.tx_host_0.peer.port, + peer_mac=self.tx_host_0.peer.mac, + peer_ip=self.tx_host_0.peer.ip, + client_mac="00:AA:00:23:CC:20", + client_ip="192.168.4.1", + client_vni=self.tx_host_0.client.vni) + + self.tx_host_4 = self.define_neighbor_network(port=self.tx_host_0.port, + mac=self.tx_host_0.mac, + ip="10.10.2.20", # for Inbound route missmatch + ip_prefix=self.tx_host_0.ip_prefix, + peer_port=self.tx_host_0.peer.port, + peer_mac=self.tx_host_0.peer.mac, + peer_ip=self.tx_host_0.peer.ip, + client_mac="00:BB:00:00:AC:A0", + client_ip="192.168.4.1", + client_vni=self.tx_host_0.client.vni) + + self.vip_create(self.tx_host_0.peer.ip) + + # direction lookup VNI, reserved VNI assigned to the VM->Appliance + self.direction_lookup_create(self.rx_host.client.vni) + + src_vnet = self.vnet_create(vni=self.tx_host_0.client.vni) + dst_vnet = self.vnet_create(vni=self.rx_host.client.vni) + + eni_id = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.rx_host.ip), + vm_vni=self.rx_host.client.vni, + vnet_id=dst_vnet) + self.eni_mac_map_create(eni_id, self.rx_host.client.mac) # ENI MAC + + # Inbound routing PA Validate + self.inbound_routing_decap_validate_create(eni_id, vni=self.tx_host_0.client.vni, + sip=self.tx_host_0.ip, sip_mask="255.255.255.0", + src_vnet_id=src_vnet) + # PA validation entries with Permit action + self.pa_validation_create(self.tx_host_0.ip, src_vnet) + self.pa_validation_create(self.tx_host_1.ip, src_vnet) + self.pa_validation_create(self.tx_host_2.ip, src_vnet) + + def vnet2VnetInboundRoutingTest(self, tx_equal_to_rx): + """ + Inbound VNET to VNET test + Verifies correct packet routing + """ + + print(f"\nPA validate {self.tx_host_0.ip} verification, expect pass") + self.verify_traffic_scenario(client=self.tx_host_0, server=self.rx_host, + connection=self.connection, fake_mac=False, tx_equal_to_rx=tx_equal_to_rx) + + print(f"\nPA validate {self.tx_host_1.ip} verification, expect pass") + self.verify_traffic_scenario(client=self.tx_host_1, server=self.rx_host, + connection=self.connection, fake_mac=False, tx_equal_to_rx=tx_equal_to_rx) + + print(f"\nPA validate {self.tx_host_2.ip} verification, expect pass") + self.verify_traffic_scenario(client=self.tx_host_2, server=self.rx_host, + connection=self.connection, fake_mac=False, tx_equal_to_rx=tx_equal_to_rx) + + print(f"\nPA validate {self.tx_host_3.ip} verification, expect drop - PA validation missmatch") + self.verify_negative_traffic_scenario(client=self.tx_host_3, server=self.rx_host, + fake_mac=False, valid_pkt_drop=True) + + print(f"\nPA validate {self.tx_host_4.ip} verification, expect drop - Inbound route missmatch") + self.verify_negative_traffic_scenario(client=self.tx_host_4, server=self.rx_host, + fake_mac=False, valid_pkt_drop=True) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetSingleInboundRouteMultiplePaValidateSinglePortIpv6Test(Vnet2VnetSingleInboundRouteMultiplePaValidateSinglePortTest): + """ + Underlay IPv4 and Overlay IPv6 configs + Inbound Vnet to Vnet scenario test case with + VXLAN_DECAP_PA_VALIDATE inbound routing entry action with multiple PA validate entries + with underlay config (neighbour + next hop) but without underlay routes + + Verifies positive and negative scenarios + """ + + def setUp(self): + super(Vnet2VnetSingleInboundRouteMultiplePaValidateSinglePortIpv6Test, self).setUp(overlay_ipv6=True) + + def runTest(self): + # Reconfigure configuration for tx equal to rx + self.update_configuration_for_tx_equal_to_rx() + self.configureTest() + self.configure_underlay(self.tx_host_0, add_routes=False) + + self.vnet2VnetInboundRoutingTest(tx_equal_to_rx=True) + + def configureTest(self): + """ + Setup DUT in accordance with test purpose + """ + self.tx_host_0 = self.tx_host + + self.tx_host_1 = self.define_neighbor_network(port=self.tx_host_0.port, + mac=self.tx_host_0.mac, + ip="10.10.1.15", + ip_prefix=self.tx_host_0.ip_prefix, + peer_port=self.tx_host_0.peer.port, + peer_mac=self.tx_host_0.peer.mac, + peer_ip=self.tx_host_0.peer.ip, + client_mac="00:03:00:00:05:16", + client_ip="cccc::40", + client_vni=self.tx_host_0.client.vni) + + self.tx_host_2 = self.define_neighbor_network(port=self.tx_host_0.port, + mac=self.tx_host_0.mac, + ip="10.10.1.100", + ip_prefix=self.tx_host_0.ip_prefix, + peer_port=self.tx_host_0.peer.port, + peer_mac=self.tx_host_0.peer.mac, + peer_ip=self.tx_host_0.peer.ip, + client_mac="00:10:00:00:AA:20", + client_ip="dddd::50", + client_vni=self.tx_host_0.client.vni) + + self.tx_host_3 = self.define_neighbor_network(port=self.tx_host_0.port, + mac=self.tx_host_0.mac, + ip="10.10.1.3", # for PA validate missmatch + ip_prefix=self.tx_host_0.ip_prefix, + peer_port=self.tx_host_0.peer.port, + peer_mac=self.tx_host_0.peer.mac, + peer_ip=self.tx_host_0.peer.ip, + client_mac="00:AA:00:23:CC:20", + client_ip="eeee::60", + client_vni=self.tx_host_0.client.vni) + + self.tx_host_4 = self.define_neighbor_network(port=self.tx_host_0.port, + mac=self.tx_host_0.mac, + ip="10.10.12.20", # for Inbound route missmatch + ip_prefix=self.tx_host_0.ip_prefix, + peer_port=self.tx_host_0.peer.port, + peer_mac=self.tx_host_0.peer.mac, + peer_ip=self.tx_host_0.peer.ip, + client_mac="00:BB:00:00:AC:A0", + client_ip="2603::10", + client_vni=self.tx_host_0.client.vni) + + self.vip_create(self.tx_host_0.peer.ip) + + # direction lookup VNI, reserved VNI assigned to the VM->Appliance + self.direction_lookup_create(self.rx_host.client.vni) + + src_vnet = self.vnet_create(vni=self.tx_host_0.client.vni) + dst_vnet = self.vnet_create(vni=self.rx_host.client.vni) + + eni_id = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.rx_host.ip), + vm_vni=self.rx_host.client.vni, + vnet_id=dst_vnet) + self.eni_mac_map_create(eni_id, self.rx_host.client.mac) # ENI MAC + + # Inbound routing PA Validate + self.inbound_routing_decap_validate_create(eni_id, vni=self.tx_host_0.client.vni, + sip=self.tx_host_0.ip, sip_mask="255.255.255.0", + src_vnet_id=src_vnet) + # PA validation entries with Permit action + self.pa_validation_create(self.tx_host_0.ip, src_vnet) + self.pa_validation_create(self.tx_host_1.ip, src_vnet) + self.pa_validation_create(self.tx_host_2.ip, src_vnet) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetSingleInboundRouteMultiplePaValidateTwoPortsTest(Vnet2VnetSingleInboundRouteMultiplePaValidateSinglePortTest): + """ + Inbound Vnet to Vnet scenario test case with + VXLAN_DECAP_PA_VALIDATE inbound routing entry action with multiple PA validate entries + with full underlay config (2 neighbours + 2 next hops + 2 routes) + + Verifies positive and negative scenarios + """ + + def runTest(self): + self.configureTest() + self.configure_underlay(self.tx_host_0, self.rx_host) + + self.vnet2VnetInboundRoutingTest(tx_equal_to_rx=False) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetSingleInboundRouteMultiplePaValidateTwoPortsIpv6Test(Vnet2VnetSingleInboundRouteMultiplePaValidateSinglePortIpv6Test): + """ + Underlay IPv4 and Overlay IPv6 configs + Inbound Vnet to Vnet scenario test case with + VXLAN_DECAP_PA_VALIDATE inbound routing entry action with multiple PA validate entries + with underlay config (2 neighbours + 2 next hops + 2 routes) + + Verifies positive and negative scenarios + """ + + def runTest(self): + self.configureTest() + self.configure_underlay(self.tx_host_0, self.rx_host) + + self.vnet2VnetInboundRoutingTest(tx_equal_to_rx=False) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetInboundEniSetUpDownSinglePortTest(VnetApiEndpoints, VnetTrafficMixin): + """ + Inbound Vnet to Vnet test scenario + Verifies packets forwarding/drop in accordance with ENI admin state + """ + + def runTest(self): + # Reconfigure configuration for tx equal to rx + self.update_configuration_for_tx_equal_to_rx() + self.configureTest() + self.configure_underlay(self.tx_host, add_routes=False) + + self.vnet2VnetEniUpTrafficTest(tx_equal_to_rx=True) + self.eni_set_admin_state(self.eni_id, "down") + self.vnet2VnetEniDownTrafficTest() + self.eni_set_admin_state(self.eni_id, "up") + self.vnet2VnetEniUpTrafficTest(tx_equal_to_rx=True) + + def configureTest(self): + """ + Setup DUT overlay in accordance with test purpose + """ + + self.vip_create(self.tx_host.peer.ip) + + # direction lookup VNI, reserved VNI assigned to the VM->Appliance + self.direction_lookup_create(self.rx_host.client.vni) + + dst_vnet = self.vnet_create(vni=self.rx_host.client.vni) + + self.eni_id = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.rx_host.ip), + vm_vni=self.rx_host.client.vni, + vnet_id=dst_vnet) + self.eni_mac_map_create(self.eni_id, self.rx_host.client.mac) # ENI MAC + + # Inbound routing PA Validate + self.inbound_routing_decap_create(self.eni_id, vni=self.tx_host.client.vni, + sip=self.tx_host.ip, sip_mask="255.255.255.0") + + def vnet2VnetEniUpTrafficTest(self, tx_equal_to_rx): + """ + Verifies inbound packet routing when ENI admin state is UP + """ + + self.verify_traffic_scenario(client=self.tx_host, server=self.rx_host, + connection=self.connection, fake_mac=False, tx_equal_to_rx=tx_equal_to_rx) + + print('\n', self.vnet2VnetEniUpTrafficTest.__name__, ' OK') + + def vnet2VnetEniDownTrafficTest(self): + """ + Verifies inbound packet drop when ENI admin state is DOWN + """ + + self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, + fake_mac=False, valid_pkt_drop=True) + + print('\n', self.vnet2VnetEniDownTrafficTest.__name__, ' OK') + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetInboundEniSetUpDownTwoPortsTest(Vnet2VnetInboundEniSetUpDownSinglePortTest): + """ + Inbound Vnet to Vnet test scenario + Verifies packets forwarding/drop in accordance with ENI admin state + """ + + def runTest(self): + self.configureTest() + self.configure_underlay(self.tx_host, self.rx_host) + + self.vnet2VnetEniUpTrafficTest(tx_equal_to_rx=True) + self.eni_set_admin_state(self.eni_id, "down") + self.vnet2VnetEniDownTrafficTest() + self.eni_set_admin_state(self.eni_id, "up") + self.vnet2VnetEniUpTrafficTest(tx_equal_to_rx=True) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundRouteVnetDirectSinglePortTest(VnetApiEndpoints, VnetTrafficMixin): + """ + Outbound Vnet to Vnet test scenario with Outbound routing entry + SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET_DIRECT action + with underlay config (neighbour + next hop) but without underlay routes + """ + + def runTest(self): + # Reconfigure configuration for tx equal to rx + self.update_configuration_for_tx_equal_to_rx() + self.configureTest() + self.configure_underlay(self.tx_host, add_routes=False) + + self.vnet2VnetOutboundRoutingTest(tx_equal_to_rx=True) + self.vnet2VnetOutboundNegativeTest() + + def configureTest(self): + """ + Setup DUT in accordance with test purpose + """ + + self.vip_create(self.tx_host.peer.ip) + + # direction lookup VNI, reserved VNI assigned to the VM->Appliance + self.direction_lookup_create(self.tx_host.client.vni) + + src_vnet = self.vnet_create(vni=self.tx_host.client.vni) + dst_vnet = self.vnet_create(vni=self.rx_host.client.vni) + + eni_id = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.tx_host.ip), + vm_vni=self.tx_host.client.vni, + vnet_id=src_vnet) + self.eni_mac_map_create(eni_id, self.tx_host.client.mac) # ENI MAC + # outbound routing + self.outbound_routing_vnet_direct_create(eni_id, "192.168.1.0/24", dst_vnet, + overlay_ip="192.168.1.10") + self.outbound_ca_to_pa_create(dst_vnet, # DST vnet id + "192.168.1.10", # DST IP addr + self.rx_host.ip, # Underlay DIP + overlay_dmac=self.rx_host.client.mac) + + def vnet2VnetOutboundRoutingTest(self, tx_equal_to_rx): + """ + Outbound VNET to VNET test + Verifies correct packet routing + """ + + self.verify_traffic_scenario(client=self.tx_host, server=self.rx_host, + connection=self.connection, fake_mac=True, tx_equal_to_rx=tx_equal_to_rx) + + print('\n', self.vnet2VnetOutboundRoutingTest.__name__, ' OK') + + def vnet2VnetOutboundNegativeTest(self): + """ + Verifies negative scenarios (packet drop): + - wrong VIP + - routing drop (CA Dst IP does not match any routing entry) + - wrong CA Src MAC (does not match any ENI) + """ + + invalid_vip = "10.10.10.10" + wrong_inner_dst_ip = "192.168.200.200" + wrong_inner_src_ca_mac = "00:aa:00:aa:00:aa" + + self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, + fake_mac=True, invalid_vip=invalid_vip, + invalid_inner_dst_ip=wrong_inner_dst_ip, + invalid_inner_src_mac=wrong_inner_src_ca_mac) + + print('\n', self.vnet2VnetOutboundNegativeTest.__name__, ' OK') + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundRouteVnetDirectSinglePortOverlayIpv6Test(Vnet2VnetOutboundRouteVnetDirectSinglePortTest): + """ + Underlay IPv4 and Overlay IPv6 configs + Outbound Vnet to Vnet test scenario with Outbound routing entry + SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET_DIRECT action + with underlay config (neighbour + next hop) but without underlay routes + """ + + def setUp(self): + super(Vnet2VnetOutboundRouteVnetDirectSinglePortOverlayIpv6Test, self).setUp(overlay_ipv6=True) + + def configureTest(self): + """ + Setup DUT in accordance with test purpose + """ + + self.vip_create(self.tx_host.peer.ip) + + # direction lookup VNI, reserved VNI assigned to the VM->Appliance + self.direction_lookup_create(self.tx_host.client.vni) + + src_vnet = self.vnet_create(vni=self.tx_host.client.vni) + dst_vnet = self.vnet_create(vni=self.rx_host.client.vni) + + eni_id = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.tx_host.ip), + vm_vni=self.tx_host.client.vni, + vnet_id=src_vnet) + self.eni_mac_map_create(eni_id, self.tx_host.client.mac) # ENI MAC + # outbound routing + self.outbound_routing_vnet_direct_create(eni_id, "bbbb::0/64", dst_vnet, + overlay_ip="bbbb::bc") + self.outbound_ca_to_pa_create(dst_vnet, # DST vnet id + "bbbb::bc", # DST IP addr + self.rx_host.ip, # Underlay DIP + overlay_dmac=self.rx_host.client.mac) + + def vnet2VnetOutboundNegativeTest(self): + """ + Verifies negative scenarios (packet drop): + - wrong VIP + - routing drop (CA Dst IP does not match any routing entry) + - wrong CA Src MAC (does not match any ENI) + """ + + invalid_vip = "10.10.10.10" + wrong_inner_dst_ip = "dddd::dc" + wrong_inner_src_ca_mac = "00:aa:00:aa:00:aa" + + self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, + fake_mac=True, invalid_vip=invalid_vip, + invalid_inner_dst_ip=wrong_inner_dst_ip, + invalid_inner_src_mac=wrong_inner_src_ca_mac) + + print('\n', self.vnet2VnetOutboundNegativeTest.__name__, ' OK') + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundRouteVnetDirectTwoPortsTest(Vnet2VnetOutboundRouteVnetDirectSinglePortTest): + """ + Outbound Vnet to Vnet test scenario with Outbound routing entry + SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET_DIRECT action + with full underlay config (2 neighbours, 2 next-hops, 2 routes) + """ + + def runTest(self): + self.configureTest() + self.configure_underlay(self.tx_host, self.rx_host) + + self.vnet2VnetOutboundRoutingTest(tx_equal_to_rx=False) + self.vnet2VnetOutboundNegativeTest() + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundRouteVnetDirectTwoPortsOverlayIpv6Test(Vnet2VnetOutboundRouteVnetDirectSinglePortOverlayIpv6Test): + """ + Underlay IPv4 and Overlay IPv6 configs + Outbound Vnet to Vnet test scenario with Outbound routing entry + SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET_DIRECT action + with full underlay config (2 neighbours, 2 next-hops, 2 routes) + """ + + def runTest(self): + self.configureTest() + self.configure_underlay(self.tx_host, self.rx_host) + + self.vnet2VnetOutboundRoutingTest(tx_equal_to_rx=False) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundRouteVnetSinglePortTest(VnetApiEndpoints, VnetTrafficMixin): + """ + Outbound Vnet to Vnet test scenario with outbound routing entry + SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET action + with underlay config (neighbour + next hop) but without underlay routes + """ + + def runTest(self): + # Reconfigure configuration for tx equal to rx + self.update_configuration_for_tx_equal_to_rx() + self.configureTest() + self.configure_underlay(self.tx_host, add_routes=False) + + self.vnet2VnetOutboundRoutingTest(tx_equal_to_rx=True) + self.vnet2VnetOutboundNegativeTest() + + def configureTest(self): + """ + Setup DUT in accordance with test purpose + """ + + self.vip_create(self.tx_host.peer.ip) + + # direction lookup VNI, reserved VNI assigned to the VM->Appliance + self.direction_lookup_create(self.tx_host.client.vni) + + src_vnet = self.vnet_create(vni=self.tx_host.client.vni) + dst_vnet = self.vnet_create(vni=self.rx_host.client.vni) + + eni_id = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.tx_host.ip), + vm_vni=self.tx_host.client.vni, + vnet_id=src_vnet) + self.eni_mac_map_create(eni_id, self.tx_host.client.mac) # ENI MAC + + self.outbound_routing_vnet_create(eni_id=eni_id, lpm="192.168.1.0/24", + dst_vnet_id=dst_vnet) + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet, + dip=self.rx_host.client.ip, + underlay_dip=self.rx_host.ip, + overlay_dmac=self.rx_host.client.mac, + use_dst_vnet_vni=True) + + def vnet2VnetOutboundRoutingTest(self, tx_equal_to_rx): + """ + Outbound VNET to VNET test + Verifies correct packet routing + """ + + self.verify_traffic_scenario(client=self.tx_host, server=self.rx_host, + connection=self.connection, fake_mac=True, tx_equal_to_rx=tx_equal_to_rx) + + print('\n', self.vnet2VnetOutboundRoutingTest.__name__, ' OK') + + + def vnet2VnetOutboundNegativeTest(self): + """ + Verifies negative scenarios (packet drop): + - wrong VIP + - routing drop (CA Dst IP does not match any routing entry) + - wrong CA Src MAC (does not match any ENI) + - mapping drop (CA Dst IP matches routing entry prefix but drops by ca_to_pa) + """ + + invalid_vip = "10.10.10.10" + wrong_inner_dst_ip = "192.168.200.200" + wrong_inner_src_ca_mac = "00:aa:00:aa:00:aa" + + self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, + fake_mac=True, invalid_vip=invalid_vip, + invalid_inner_dst_ip=wrong_inner_dst_ip, + invalid_inner_src_mac=wrong_inner_src_ca_mac) + + wrong_inner_dst_ip = "192.168.1.200" + self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, + fake_mac=True, invalid_inner_dst_ip=wrong_inner_dst_ip) + + print('\n', self.vnet2VnetOutboundNegativeTest.__name__, ' OK') + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundRouteVnetSinglePortOverlayIpv6Test(Vnet2VnetOutboundRouteVnetSinglePortTest): + """ + Underlay IPv4 and Overlay IPv6 configs + Outbound Vnet to Vnet test scenario with outbound routing entry + SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET action + with underlay config (neighbour + next hop) but without underlay routes + """ + def setUp(self): + super(Vnet2VnetOutboundRouteVnetSinglePortOverlayIpv6Test, self).setUp(overlay_ipv6=True) + + def configureTest(self): + """ + Setup DUT in accordance with test purpose + """ + + self.vip_create(self.tx_host.peer.ip) + + # direction lookup VNI, reserved VNI assigned to the VM->Appliance + self.direction_lookup_create(self.tx_host.client.vni) + + src_vnet = self.vnet_create(vni=self.tx_host.client.vni) + dst_vnet = self.vnet_create(vni=self.rx_host.client.vni) + + eni_id = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.tx_host.ip), + vm_vni=self.tx_host.client.vni, + vnet_id=src_vnet) + self.eni_mac_map_create(eni_id, self.tx_host.client.mac) # ENI MAC + + self.outbound_routing_vnet_create(eni_id=eni_id, lpm="bbbb::0/64", + dst_vnet_id=dst_vnet) + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet, + dip=self.rx_host.client.ip, + underlay_dip=self.rx_host.ip, + overlay_dmac=self.rx_host.client.mac, + use_dst_vnet_vni=True) + + def vnet2VnetOutboundNegativeTest(self): + """ + Verifies negative scenarios (packet drop): + - wrong VIP + - routing drop (CA Dst IP does not match any routing entry) + - wrong CA Src MAC (does not match any ENI) + - mapping drop (CA Dst IP matches routing entry prefix but drops by ca_to_pa) + """ + + invalid_vip = "10.10.10.10" + wrong_inner_dst_ip = "dddd::dc" + wrong_inner_src_ca_mac = "00:aa:00:aa:00:aa" + + self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, + fake_mac=True, invalid_vip=invalid_vip, + invalid_inner_dst_ip=wrong_inner_dst_ip, + invalid_inner_src_mac=wrong_inner_src_ca_mac) + + wrong_inner_dst_ip = "bbbb::dc" + self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, + fake_mac=True, + invalid_inner_dst_ip=wrong_inner_dst_ip) + + print('\n', self.vnet2VnetOutboundNegativeTest.__name__, ' OK') + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundRouteVnetTwoPortsTest(Vnet2VnetOutboundRouteVnetSinglePortTest): + """ + Outbound Vnet to Vnet test scenario with outbound routing entry + SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET action + with full underlay config (2 neighbours, 2 next-hops, 2 routes) + """ + + def runTest(self): + self.configureTest() + self.configure_underlay(self.tx_host, self.rx_host) + + self.vnet2VnetOutboundRoutingTest(tx_equal_to_rx=False) + self.vnet2VnetOutboundNegativeTest() + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundRouteVnetTwoPortsOverlayIpv6Test(Vnet2VnetOutboundRouteVnetSinglePortOverlayIpv6Test): + """ + Underlay IPv4 and Overlay IPv6 configs + Outbound Vnet to Vnet test scenario with outbound routing entry + SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET action + with full underlay config (2 neighbours, 2 next-hops, 2 routes) + """ + + def runTest(self): + self.configureTest() + self.configure_underlay(self.tx_host, self.rx_host) + + self.vnet2VnetOutboundRoutingTest(tx_equal_to_rx=False) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundEniSetUpDownSinglePortTest(VnetApiEndpoints, VnetTrafficMixin): + """ + Outbound Vnet to Vnet test scenario + Verifies packets forwarding/drop in accordance with ENI admin state + """ + + def runTest(self): + # Reconfigure configuration for tx equal to rx + self.update_configuration_for_tx_equal_to_rx() + self.configureTest() + self.configure_underlay(self.tx_host, add_routes=False) + + self.vnet2VnetEniUpTrafficTest(tx_equal_to_rx=True) + self.eni_set_admin_state(self.eni_id, "down") + self.vnet2VnetEniDownTrafficTest() + self.eni_set_admin_state(self.eni_id, "up") + self.vnet2VnetEniUpTrafficTest(tx_equal_to_rx=True) + + def configureTest(self): + """ + Setup DUT in accordance with test purpose + """ + + self.vip_create(self.tx_host.peer.ip) + + # direction lookup VNI, reserved VNI assigned to the VM->Appliance + self.direction_lookup_create(self.tx_host.client.vni) + + src_vnet = self.vnet_create(vni=self.tx_host.client.vni) + dst_vnet = self.vnet_create(vni=self.rx_host.client.vni) + + self.eni_id = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.tx_host.ip), + vm_vni=self.tx_host.client.vni, + vnet_id=src_vnet) + self.eni_mac_map_create(self.eni_id, self.tx_host.client.mac) # ENI MAC + + self.outbound_routing_vnet_create(eni_id=self.eni_id, lpm="192.168.1.0/24", + dst_vnet_id=dst_vnet) + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet, + dip=self.rx_host.client.ip, + underlay_dip=self.rx_host.ip, + overlay_dmac=self.rx_host.client.mac, + use_dst_vnet_vni=True) + + def vnet2VnetEniUpTrafficTest(self, tx_equal_to_rx): + """ + Verifies correct outbound packet routing when ENI admin state is UP + """ + + self.verify_traffic_scenario(client=self.tx_host, server=self.rx_host, + connection=self.connection, fake_mac=True, tx_equal_to_rx=tx_equal_to_rx) + + print('\n', self.vnet2VnetEniUpTrafficTest.__name__, ' OK') + + def vnet2VnetEniDownTrafficTest(self): + """ + Verifies outbound packet drop when ENI admin state is DOWN + """ + + self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, + fake_mac=True, valid_pkt_drop=True) + + print('\n', self.vnet2VnetEniDownTrafficTest.__name__, ' OK') + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundEniSetUpDownTwoPortsTest(Vnet2VnetOutboundEniSetUpDownSinglePortTest): + """ + Outbound Vnet to Vnet test scenario + Verifies packets forwarding/drop in accordance with ENI admin state + """ + + def runTest(self): + self.configureTest() + self.configure_underlay(self.tx_host, self.rx_host) + + self.vnet2VnetEniUpTrafficTest(tx_equal_to_rx=True) + self.eni_set_admin_state(self.eni_id, "down") + self.vnet2VnetEniDownTrafficTest() + self.eni_set_admin_state(self.eni_id, "up") + self.vnet2VnetEniUpTrafficTest(tx_equal_to_rx=True) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundRouteDirectSinglePortTest(VnetApiEndpoints, VnetTrafficMixin): + """ + Outbound Vnet to Vnet test scenario with Outbound routing entry + SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_DIRECT action + with underlay config (neighbour + next hop) but without underlay routes + """ + + def runTest(self): + self.update_configuration_for_tx_equal_to_rx() + self.configureTest() + self.configure_underlay(self.tx_host, add_routes=False) + + self.outboundRouteDirectTest(tx_equal_to_rx=True) + self.outboundRouteDirectNegativeTest() + + def configureTest(self): + """ + Setup DUT in accordance with test purpose + """ + + self.vip_create(self.tx_host.client.ip) # Appliance VIP + + # direction lookup VNI, reserved VNI assigned to the VM->Appliance + self.direction_lookup_create(self.tx_host.client.vni) + + src_vnet = self.vnet_create(vni=self.tx_host.client.vni) + + eni_id = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.tx_host.ip), + vm_vni=self.tx_host.client.vni, + vnet_id=src_vnet) + + self.eni_mac_map_create(eni_id, self.tx_host.client.mac) + + # outbound routing + self.outbound_routing_direct_create(eni_id, "192.168.1.0/24") + + def outboundRouteDirectTest(self, tx_equal_to_rx): + + self.verify_traffic_scenario(client=self.tx_host, server=self.rx_host, + connection=self.connection, fake_mac=True, + tx_equal_to_rx=tx_equal_to_rx, + route_direct=True) + + def outboundRouteDirectNegativeTest(self): + """ + Verifies negative scenarios (packet drop): + - wrong VIP + - routing drop (CA Dst IP does not match any routing entry) + - wrong CA Src MAC (does not match any ENI) + - mapping drop (CA Dst IP matches routing entry prefix but drops by ca_to_pa) + """ + + invalid_vip = "10.10.10.10" + wrong_inner_dst_ip = "192.168.200.200" + wrong_inner_src_ca_mac = "00:aa:00:aa:00:aa" + + self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, + fake_mac=True, invalid_vip=invalid_vip, + invalid_inner_dst_ip=wrong_inner_dst_ip, + invalid_inner_src_mac=wrong_inner_src_ca_mac) + + wrong_inner_dst_ip = "192.168.1.200" + self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, + fake_mac=True, + invalid_inner_dst_ip=wrong_inner_dst_ip) + + print('\n', self.outboundRouteDirectNegativeTest.__name__, ' OK') + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundRouteDirectSinglePortOverlayIpv6Test(Vnet2VnetOutboundRouteDirectSinglePortTest): + """ + Underlay IPv4 and Overlay IPv6 configs + Outbound Vnet to Vnet test scenario with Outbound routing entry + SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_DIRECT action + with underlay config (neighbour + next hop) but without underlay routes + """ + + def setUp(self): + super(Vnet2VnetOutboundRouteDirectSinglePortOverlayIpv6Test, self).setUp(overlay_ipv6=True) + + def configureTest(self): + """ + Setup DUT in accordance with test purpose + """ + + self.vip_create(self.tx_host.client.ip) # Appliance VIP + + # direction lookup VNI, reserved VNI assigned to the VM->Appliance + self.direction_lookup_create(self.tx_host.client.vni) + + src_vnet = self.vnet_create(vni=self.tx_host.client.vni) + + eni_id = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.tx_host.ip), + vm_vni=self.tx_host.client.vni, + vnet_id=src_vnet) + + self.eni_mac_map_create(eni_id, self.tx_host.client.mac) + + # outbound routing + self.outbound_routing_direct_create(eni_id, "bbbb::0/64") + + def outboundRouteDirectNegativeTest(self): + """ + Verifies negative scenarios (packet drop): + - wrong VIP + - routing drop (CA Dst IP does not match any routing entry) + - wrong CA Src MAC (does not match any ENI) + - mapping drop (CA Dst IP matches routing entry prefix but drops by ca_to_pa) + """ + + invalid_vip = "10.10.10.10" + wrong_inner_dst_ip = "dddd::dc" + wrong_inner_src_ca_mac = "00:aa:00:aa:00:aa" + + self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, + fake_mac=True, invalid_vip=invalid_vip, + invalid_inner_dst_ip=wrong_inner_dst_ip, + invalid_inner_src_mac=wrong_inner_src_ca_mac) + + wrong_inner_dst_ip = "bbbb::dc" + self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, + fake_mac=True, + invalid_inner_dst_ip=wrong_inner_dst_ip) + + print('\n', self.outboundRouteDirectNegativeTest.__name__, ' OK') + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundRouteDirectTwoPortsTest(Vnet2VnetOutboundRouteDirectSinglePortTest): + """ + Outbound Vnet to Vnet test scenario with Outbound routing entry + SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_DIRECT action + with full underlay config (2 neighbours, 2 next-hops, 2 routes) + """ + + def runTest(self): + self.configureTest() + self.configure_underlay(self.tx_host, self.rx_host) + + self.outboundRouteDirectTest(tx_equal_to_rx=False) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundRouteDirectTwoPortsOverlayIpv6Test(Vnet2VnetOutboundRouteDirectSinglePortOverlayIpv6Test): + """ + Underlay IPv4 and Overlay IPv6 configs + Outbound Vnet to Vnet test scenario with Outbound routing entry + SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_DIRECT action + with full underlay config (2 neighbours, 2 next-hops, 2 routes) + """ + + def runTest(self): + self.configureTest() + self.configure_underlay(self.tx_host, self.rx_host) + + self.outboundRouteDirectTest(tx_equal_to_rx=False) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetSingleOutboundRouteMultipleCa2PaSinglePortTest(VnetApiEndpoints, VnetTrafficMixin): + """ + Outbound Vnet to Vnet test scenario with outbound routing entry + SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET action and multiple CA2PA entries + with underlay config (neighbour + next hop) but without underlay routes + """ + + def runTest(self): + # Reconfigure configuration for tx equal to rx + self.update_configuration_for_tx_equal_to_rx() + self.configureTest() + self.configure_underlay(self.tx_host, add_routes=False) + + self.vnet2VnetOutboundRoutingTest(tx_equal_to_rx=True) + self.vnet2VnetOutboundNegativeTest() + + def configureTest(self): + """ + Setup DUT in accordance with test purpose + """ + + self.rx_host_0 = self.rx_host + + self.rx_host_1 = self.define_neighbor_network(port=self.rx_host_0.port, + mac=self.rx_host_0.mac, + ip=self.rx_host_0.ip, + ip_prefix=self.rx_host_0.ip_prefix, + peer_port=self.rx_host_0.peer.port, + peer_mac=self.rx_host_0.peer.mac, + peer_ip=self.rx_host_0.peer.ip, + client_mac="00:03:00:00:05:16", + client_ip="192.168.1.17", + client_vni=self.rx_host_0.client.vni) + + self.rx_host_2 = self.define_neighbor_network(port=self.rx_host_0.port, + mac=self.rx_host_0.mac, + ip=self.rx_host_0.ip, + ip_prefix=self.rx_host_0.ip_prefix, + peer_port=self.rx_host_0.peer.port, + peer_mac=self.rx_host_0.peer.mac, + peer_ip=self.rx_host_0.peer.ip, + client_mac="00:05:00:00:08:18", + client_ip="192.168.1.199", + client_vni=self.rx_host_0.client.vni) + + self.rx_host_3 = self.define_neighbor_network(port=self.rx_host_0.port, + mac=self.rx_host_0.mac, + ip=self.rx_host_0.ip, + ip_prefix=self.rx_host_0.ip_prefix, + peer_port=self.rx_host_0.peer.port, + peer_mac=self.rx_host_0.peer.mac, + peer_ip=self.rx_host_0.peer.ip, + client_mac="00:10:00:00:AA:E1", + client_ip="192.168.1.77", + client_vni=self.rx_host_0.client.vni) + + self.vip_create(self.tx_host.peer.ip) + + self.direction_lookup_create(self.tx_host.client.vni) + + src_vnet = self.vnet_create(vni=self.tx_host.client.vni) + dst_vnet = self.vnet_create(vni=self.rx_host_0.client.vni) + + eni_id = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.tx_host.ip), + vm_vni=self.tx_host.client.vni, + vnet_id=src_vnet) + self.eni_mac_map_create(eni_id, self.tx_host.client.mac) # ENI MAC + + self.outbound_routing_vnet_create(eni_id=eni_id, lpm="192.168.1.0/24", + dst_vnet_id=dst_vnet) + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet, + dip=self.rx_host_0.client.ip, + underlay_dip=self.rx_host_0.ip, + overlay_dmac=self.rx_host_0.client.mac, + use_dst_vnet_vni=True) + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet, + dip=self.rx_host_1.client.ip, + underlay_dip=self.rx_host_1.ip, + overlay_dmac=self.rx_host_1.client.mac, + use_dst_vnet_vni=True) + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet, + dip=self.rx_host_2.client.ip, + underlay_dip=self.rx_host_2.ip, + overlay_dmac=self.rx_host_2.client.mac, + use_dst_vnet_vni=True) + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet, + dip=self.rx_host_3.client.ip, + underlay_dip=self.rx_host_3.ip, + overlay_dmac=self.rx_host_3.client.mac, + use_dst_vnet_vni=False) + + def vnet2VnetOutboundRoutingTest(self, tx_equal_to_rx): + """ + Outbound VNET to VNET test + Verifies correct packet routing + """ + + print(f"\nVerify outbound route to CA {self.rx_host_0.client.ip}, expect pass") + self.verify_traffic_scenario(client=self.tx_host, server=self.rx_host_0, + connection=self.connection, fake_mac=True, tx_equal_to_rx=tx_equal_to_rx) + + print(f"\nVerify outbound route to CA {self.rx_host_1.client.ip}, expect pass") + self.verify_traffic_scenario(client=self.tx_host, server=self.rx_host_1, + connection=self.connection, fake_mac=True, tx_equal_to_rx=tx_equal_to_rx) + + print(f"\nVerify outbound route to CA {self.rx_host_2.client.ip}, expect pass") + self.verify_traffic_scenario(client=self.tx_host, server=self.rx_host_2, + connection=self.connection, fake_mac=True, tx_equal_to_rx=tx_equal_to_rx) + + print(f"\nVerify outbound route to CA {self.rx_host_3.client.ip} and use_dst_vnet=False, expect pass") + self.rx_host_3.client.vni = self.tx_host.client.vni + self.verify_traffic_scenario(client=self.tx_host, server=self.rx_host_3, + connection=self.connection, fake_mac=True, tx_equal_to_rx=tx_equal_to_rx) + + print('\n', self.vnet2VnetOutboundRoutingTest.__name__, ' OK') + + def vnet2VnetOutboundNegativeTest(self): + """ + Verifies negative scenarios (packet drop): + - wrong VIP + - routing drop (CA Dst IP does not match any routing entry) + - wrong CA Src MAC (does not match any ENI) + - mapping drop (CA Dst IP matches routing entry prefix but drops by ca_to_pa) + """ + + invalid_vip = "10.10.10.10" + wrong_inner_dst_ip = "192.168.200.200" + wrong_inner_src_ca_mac = "00:aa:00:aa:00:aa" + + self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, + fake_mac=True, invalid_vip=invalid_vip, + invalid_inner_dst_ip=wrong_inner_dst_ip, + invalid_inner_src_mac=wrong_inner_src_ca_mac) + + wrong_inner_dst_ip = "192.168.1.200" + self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, + fake_mac=True, invalid_inner_dst_ip=wrong_inner_dst_ip) + + print('\n', self.vnet2VnetOutboundNegativeTest.__name__, ' OK') + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetSingleOutboundRouteMultipleCa2PaSinglePortIpv6Test(Vnet2VnetSingleOutboundRouteMultipleCa2PaSinglePortTest): + """ + Underlay IPv4 and Overlay IPv6 + Outbound Vnet to Vnet test scenario with outbound routing entry + SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET action and multiple CA2PA entries + with underlay config (neighbour + next hop) but without underlay routes + """ + + def setUp(self): + super(Vnet2VnetSingleOutboundRouteMultipleCa2PaSinglePortIpv6Test, self).setUp(overlay_ipv6=True) + + def configureTest(self): + """ + Setup DUT in accordance with test purpose + """ + + self.rx_host_0 = self.rx_host + + self.rx_host_1 = self.define_neighbor_network(port=self.rx_host_0.port, + mac=self.rx_host_0.mac, + ip=self.rx_host_0.ip, + ip_prefix=self.rx_host_0.ip_prefix, + peer_port=self.rx_host_0.peer.port, + peer_mac=self.rx_host_0.peer.mac, + peer_ip=self.rx_host_0.peer.ip, + client_mac="00:03:00:00:05:16", + client_ip="bbbb:0000:0000:0000:1234::00", + client_vni=self.rx_host_0.client.vni) + + self.rx_host_2 = self.define_neighbor_network(port=self.rx_host_0.port, + mac=self.rx_host_0.mac, + ip=self.rx_host_0.ip, + ip_prefix=self.rx_host_0.ip_prefix, + peer_port=self.rx_host_0.peer.port, + peer_mac=self.rx_host_0.peer.mac, + peer_ip=self.rx_host_0.peer.ip, + client_mac="00:05:00:00:08:18", + client_ip="bbbb:0000:0000:0000:0000:ab12::00", + client_vni=self.rx_host_0.client.vni) + + self.rx_host_3 = self.define_neighbor_network(port=self.rx_host_0.port, + mac=self.rx_host_0.mac, + ip=self.rx_host_0.ip, + ip_prefix=self.rx_host_0.ip_prefix, + peer_port=self.rx_host_0.peer.port, + peer_mac=self.rx_host_0.peer.mac, + peer_ip=self.rx_host_0.peer.ip, + client_mac="00:10:00:00:AA:E1", + client_ip="bbbb::40", + client_vni=self.rx_host_0.client.vni) + + self.vip_create(self.tx_host.peer.ip) + + self.direction_lookup_create(self.tx_host.client.vni) + + src_vnet = self.vnet_create(vni=self.tx_host.client.vni) + dst_vnet = self.vnet_create(vni=self.rx_host_0.client.vni) + + eni_id = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.tx_host.ip), + vm_vni=self.tx_host.client.vni, + vnet_id=src_vnet) + self.eni_mac_map_create(eni_id, self.tx_host.client.mac) # ENI MAC + + self.outbound_routing_vnet_create(eni_id=eni_id, lpm="bbbb::0/64", + dst_vnet_id=dst_vnet) + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet, + dip=self.rx_host_0.client.ip, + underlay_dip=self.rx_host_0.ip, + overlay_dmac=self.rx_host_0.client.mac, + use_dst_vnet_vni=True) + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet, + dip=self.rx_host_1.client.ip, + underlay_dip=self.rx_host_1.ip, + overlay_dmac=self.rx_host_1.client.mac, + use_dst_vnet_vni=True) + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet, + dip=self.rx_host_2.client.ip, + underlay_dip=self.rx_host_2.ip, + overlay_dmac=self.rx_host_2.client.mac, + use_dst_vnet_vni=True) + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet, + dip=self.rx_host_3.client.ip, + underlay_dip=self.rx_host_3.ip, + overlay_dmac=self.rx_host_3.client.mac, + use_dst_vnet_vni=False) + + def vnet2VnetOutboundNegativeTest(self): + """ + Verifies negative scenarios (packet drop): + - wrong VIP + - routing drop (CA Dst IP does not match any routing entry) + - wrong CA Src MAC (does not match any ENI) + - mapping drop (CA Dst IP matches routing entry prefix but drops by ca_to_pa) + """ + + invalid_vip = "10.10.10.10" + wrong_inner_dst_ip = "bbbb:0000:0000:1111::00" + wrong_inner_src_ca_mac = "00:aa:00:aa:00:aa" + + self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, + fake_mac=True, invalid_vip=invalid_vip, + invalid_inner_dst_ip=wrong_inner_dst_ip, + invalid_inner_src_mac=wrong_inner_src_ca_mac) + + wrong_inner_dst_ip = "bbbb::33" + self.verify_negative_traffic_scenario(client=self.tx_host, server=self.rx_host, + fake_mac=True, invalid_inner_dst_ip=wrong_inner_dst_ip) + + print('\n', self.vnet2VnetOutboundNegativeTest.__name__, ' OK') + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetSingleOutboundRouteMultipleCa2PaTwoPortsTest(Vnet2VnetSingleOutboundRouteMultipleCa2PaSinglePortTest): + """ + Outbound Vnet to Vnet test scenario with outbound routing entry + SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET action and multiple CA2PA entries + with full underlay config (2 neighbours + 2 next hops + 2 routes) + """ + + def runTest(self): + self.configureTest() + self.configure_underlay(self.tx_host, self.rx_host_0) + + self.vnet2VnetOutboundRoutingTest(tx_equal_to_rx=False) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetSingleOutboundRouteMultipleCa2PaTwoPortsIpv6Test(Vnet2VnetSingleOutboundRouteMultipleCa2PaSinglePortIpv6Test): + """ + Underlay IPv4 and Overlay IPv6 + Outbound Vnet to Vnet test scenario with outbound routing entry + SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET action and multiple CA2PA entries + with underlay config (neighbour + next hop) but without underlay routes + """ + + def runTest(self): + self.configureTest() + self.configure_underlay(self.tx_host, self.rx_host_0) + + self.vnet2VnetOutboundRoutingTest(tx_equal_to_rx=False) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundDstVnetIdRouteVnetSinglePortTest(VnetApiEndpoints, VnetTrafficMixin): + """ + Outbound Vnet to Vnet test scenario that verifies + CA to PA entry use_dst_vnet_vni attribute True and False values + when routing action is SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET + with underlay config (neighbour + next hop) but without underlay routes + """ + + def runTest(self): + self.update_configuration_for_tx_equal_to_rx() + self.configureTest() + self.configure_underlay(self.tx_host, add_routes=False) + + self.vnet2VnetOutboundDstVnetIdTrueTest(tx_equal_to_rx=True) + self.vnet2VnetOutboundDstVnetIdFalseTest(tx_equal_to_rx=True) + + def configureTest(self): + """ + Setup DUT in accordance with test purpose + """ + + self.rx_host_0 = self.rx_host + + self.rx_host_1 = self.define_neighbor_network(port=self.rx_host_0.port, + mac=self.rx_host_0.mac, + ip=self.rx_host_0.ip, + ip_prefix=self.rx_host_0.ip_prefix, + peer_port=self.rx_host_0.peer.port, + peer_mac=self.rx_host_0.peer.mac, + peer_ip=self.rx_host_0.peer.ip, + client_mac="00:03:00:00:05:16", + client_ip="192.168.2.1", + client_vni=3) + + # Overlay routing + self.vip_create(self.tx_host.peer.ip) # Appliance VIP + + # direction lookup VNI, reserved VNI assigned to the VM->Appliance + self.direction_lookup_create(self.tx_host.client.vni) + + src_vnet = self.vnet_create(vni=self.tx_host.client.vni) + dst_vnet_0 = self.vnet_create(vni=self.rx_host_0.client.vni) + dst_vnet_1 = self.vnet_create(vni=self.rx_host_1.client.vni) + + eni_id = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.tx_host.ip), + vm_vni=self.tx_host.client.vni, + vnet_id=src_vnet) + self.eni_mac_map_create(eni_id=eni_id, mac=self.tx_host.client.mac) + + # Outbound routing and CA to PA entries creation + # for use_dst_vnet_vni=True + self.outbound_routing_vnet_create(eni_id=eni_id, lpm="192.168.1.0/24", + dst_vnet_id=dst_vnet_0) + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_0, + dip=self.rx_host_0.client.ip, + underlay_dip=self.rx_host_0.ip, + overlay_dmac=self.rx_host.client.mac, + use_dst_vnet_vni=True) + + # for use_dst_vnet_vni=False + self.outbound_routing_vnet_create(eni_id=eni_id, lpm="192.168.2.0/24", + dst_vnet_id=dst_vnet_1) + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_1, + dip=self.rx_host_1.client.ip, + underlay_dip=self.rx_host_1.ip, + overlay_dmac=self.rx_host_1.client.mac, + use_dst_vnet_vni=False) + + def vnet2VnetOutboundDstVnetIdTrueTest(self, tx_equal_to_rx): + + self.verify_traffic_scenario(client=self.tx_host, server=self.rx_host_0, + connection=self.connection, fake_mac=True, tx_equal_to_rx=tx_equal_to_rx) + + print('\n', self.vnet2VnetOutboundDstVnetIdTrueTest.__name__, ' OK') + + def vnet2VnetOutboundDstVnetIdFalseTest(self, tx_equal_to_rx): + + # For use_dst_vnet_vni=False verification change rx client vni to tx client vni + self.rx_host_1.client.vni = self.tx_host.client.vni + + self.verify_traffic_scenario(client=self.tx_host, server=self.rx_host_1, + connection=self.connection, fake_mac=True, tx_equal_to_rx=tx_equal_to_rx) + + print('\n', self.vnet2VnetOutboundDstVnetIdFalseTest.__name__, ' OK') + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundDstVnetIdRouteVnetSinglePortOverlayIpv6Test(Vnet2VnetOutboundDstVnetIdRouteVnetSinglePortTest): + """ + Underlay IPv4 and Overlay IPv6 configs + Outbound Vnet to Vnet test scenario that verifies + CA to PA entry use_dst_vnet_vni attribute True and False values + when routing action is SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET + with underlay config (neighbour + next hop) but without underlay routes + """ + + def setUp(self): + super(Vnet2VnetOutboundDstVnetIdRouteVnetSinglePortOverlayIpv6Test, self).setUp(overlay_ipv6=True) + + def configureTest(self): + """ + Setup DUT in accordance with test purpose + """ + + self.rx_host_0 = self.rx_host + + self.rx_host_1 = self.define_neighbor_network(port=self.rx_host_0.port, + mac=self.rx_host_0.mac, + ip=self.rx_host_0.ip, + ip_prefix=self.rx_host_0.ip_prefix, + peer_port=self.rx_host_0.peer.port, + peer_mac=self.rx_host_0.peer.mac, + peer_ip=self.rx_host_0.peer.ip, + client_mac="00:03:00:00:05:16", + client_ip="cccc::30", + client_vni=3) + + # Overlay routing + self.vip_create(self.tx_host.peer.ip) # Appliance VIP + + # direction lookup VNI, reserved VNI assigned to the VM->Appliance + self.direction_lookup_create(self.tx_host.client.vni) + + src_vnet = self.vnet_create(vni=self.tx_host.client.vni) + dst_vnet_0 = self.vnet_create(vni=self.rx_host_0.client.vni) + dst_vnet_1 = self.vnet_create(vni=self.rx_host_1.client.vni) + + eni_id = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.tx_host.ip), + vm_vni=self.tx_host.client.vni, + vnet_id=src_vnet) + self.eni_mac_map_create(eni_id=eni_id, mac=self.tx_host.client.mac) + + # Outbound routing and CA to PA entries creation + # for use_dst_vnet_vni=True + self.outbound_routing_vnet_create(eni_id=eni_id, lpm="bbbb::0/64", + dst_vnet_id=dst_vnet_0) + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_0, + dip=self.rx_host_0.client.ip, + underlay_dip=self.rx_host_0.ip, + overlay_dmac=self.rx_host.client.mac, + use_dst_vnet_vni=True) + + # for use_dst_vnet_vni=False + self.outbound_routing_vnet_create(eni_id=eni_id, lpm="cccc::0/64", + dst_vnet_id=dst_vnet_1) + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_1, + dip=self.rx_host_1.client.ip, + underlay_dip=self.rx_host_1.ip, + overlay_dmac=self.rx_host_1.client.mac, + use_dst_vnet_vni=False) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundDstVnetIdRouteVnetTwoPortsTest(Vnet2VnetOutboundDstVnetIdRouteVnetSinglePortTest): + """ + Outbound Vnet to Vnet test scenario that verifies + CA to PA entry use_dst_vnet_vni attribute True and False values + when routing action is SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET + with full underlay config (2 neighbours, 2 next-hops, 2 routes) + """ + + def runTest(self): + self.configureTest() + self.configure_underlay(self.tx_host, self.rx_host_0) + + self.vnet2VnetOutboundDstVnetIdTrueTest(tx_equal_to_rx=False) + self.vnet2VnetOutboundDstVnetIdFalseTest(tx_equal_to_rx=False) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundDstVnetIdRouteVnetTwoPortsOverlayIpv6Test(Vnet2VnetOutboundDstVnetIdRouteVnetSinglePortOverlayIpv6Test): + """ + Underlay IPv4 and Overlay IPv6 configs + Outbound Vnet to Vnet test scenario that verifies + CA to PA entry use_dst_vnet_vni attribute True and False values + when routing action is SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET + with full underlay config (2 neighbours, 2 next-hops, 2 routes) + """ + + def runTest(self): + self.configureTest() + self.configure_underlay(self.tx_host, self.rx_host_0) + + self.vnet2VnetOutboundDstVnetIdTrueTest(tx_equal_to_rx=False) + self.vnet2VnetOutboundDstVnetIdFalseTest(tx_equal_to_rx=False) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundDstVnetIdRouteVnetDirectSinglePortTest(Vnet2VnetOutboundDstVnetIdRouteVnetSinglePortTest): + """ + Outbound Vnet to Vnet test scenario that verifies + CA to PA entry use_dst_vnet_vni attribute True and False values + when routing action is SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET_DIRECT + with underlay config (neighbour + next hop) but without underlay routes + """ + + def runTest(self): + self.update_configuration_for_tx_equal_to_rx() + self.configureTest() + self.configure_underlay(self.tx_host, add_routes=False) + + self.vnet2VnetOutboundDstVnetIdTrueTest(tx_equal_to_rx=True) + self.vnet2VnetOutboundDstVnetIdFalseTest(tx_equal_to_rx=True) + + def configureTest(self): + """ + Setup DUT in accordance with test purpose + """ + + self.rx_host_0 = self.rx_host + + self.rx_host_1 = self.define_neighbor_network(port=self.rx_host_0.port, + mac=self.rx_host_0.mac, + ip=self.rx_host_0.ip, + ip_prefix=self.rx_host_0.ip_prefix, + peer_port=self.rx_host_0.peer.port, + peer_mac=self.rx_host_0.peer.mac, + peer_ip=self.rx_host_0.peer.ip, + client_mac="00:03:00:00:05:16", + client_ip="192.168.2.1", + client_vni=3) + + # Overlay routing + self.vip_create(self.tx_host.peer.ip) # Appliance VIP + + # direction lookup VNI, reserved VNI assigned to the VM->Appliance + self.direction_lookup_create(self.tx_host.client.vni) + + src_vnet = self.vnet_create(vni=self.tx_host.client.vni) + dst_vnet_0 = self.vnet_create(vni=self.rx_host_0.client.vni) + dst_vnet_1 = self.vnet_create(vni=self.rx_host_1.client.vni) + + eni_id = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.tx_host.ip), + vm_vni=self.tx_host.client.vni, + vnet_id=src_vnet) + self.eni_mac_map_create(eni_id=eni_id, mac=self.tx_host.client.mac) + + # Outbound routing and CA to PA entries creation + # for use_dst_vnet_vni=True + self.outbound_routing_vnet_direct_create(eni_id=eni_id, lpm="192.168.1.0/24", + dst_vnet_id=dst_vnet_0, + overlay_ip="192.168.1.111") + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_0, + dip="192.168.1.111", + underlay_dip=self.rx_host_0.ip, + overlay_dmac=self.rx_host.client.mac, + use_dst_vnet_vni=True) + + # for use_dst_vnet_vni=False + self.outbound_routing_vnet_direct_create(eni_id=eni_id, lpm="192.168.2.0/24", + dst_vnet_id=dst_vnet_1, + overlay_ip="192.168.2.222") + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_1, + dip="192.168.2.222", + underlay_dip=self.rx_host_1.ip, + overlay_dmac=self.rx_host_1.client.mac, + use_dst_vnet_vni=False) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundDstVnetIdRouteVnetDirectSinglePortOverlayIpv6Test(Vnet2VnetOutboundDstVnetIdRouteVnetDirectSinglePortTest): + """ + Underlay IPv4 and Overlay IPv6 configs + Outbound Vnet to Vnet test scenario that verifies + CA to PA entry use_dst_vnet_vni attribute True and False values + when routing action is SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET_DIRECT + with underlay config (neighbour + next hop) but without underlay routes + """ + + def setUp(self): + super(Vnet2VnetOutboundDstVnetIdRouteVnetDirectSinglePortOverlayIpv6Test, self).setUp(overlay_ipv6=True) + + def configureTest(self): + """ + Setup DUT in accordance with test purpose + """ + + self.rx_host_0 = self.rx_host + + self.rx_host_1 = self.define_neighbor_network(port=self.rx_host_0.port, + mac=self.rx_host_0.mac, + ip=self.rx_host_0.ip, + ip_prefix=self.rx_host_0.ip_prefix, + peer_port=self.rx_host_0.peer.port, + peer_mac=self.rx_host_0.peer.mac, + peer_ip=self.rx_host_0.peer.ip, + client_mac="00:03:00:00:05:16", + client_ip="cccc::30", + client_vni=3) + + # Overlay routing + self.vip_create(self.tx_host.peer.ip) # Appliance VIP + + # direction lookup VNI, reserved VNI assigned to the VM->Appliance + self.direction_lookup_create(self.tx_host.client.vni) + + src_vnet = self.vnet_create(vni=self.tx_host.client.vni) + dst_vnet_0 = self.vnet_create(vni=self.rx_host_0.client.vni) + dst_vnet_1 = self.vnet_create(vni=self.rx_host_1.client.vni) + + eni_id = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.tx_host.ip), + vm_vni=self.tx_host.client.vni, + vnet_id=src_vnet) + self.eni_mac_map_create(eni_id=eni_id, mac=self.tx_host.client.mac) + + # Outbound routing and CA to PA entries creation + # for use_dst_vnet_vni=True + self.outbound_routing_vnet_direct_create(eni_id=eni_id, lpm="bbbb::0/64", + dst_vnet_id=dst_vnet_0, + overlay_ip="bbbb::bc") + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_0, + dip="bbbb::bc", + underlay_dip=self.rx_host_0.ip, + overlay_dmac=self.rx_host.client.mac, + use_dst_vnet_vni=True) + + # for use_dst_vnet_vni=False + self.outbound_routing_vnet_direct_create(eni_id=eni_id, lpm="cccc::0/64", + dst_vnet_id=dst_vnet_1, + overlay_ip="cccc::bc") + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_1, + dip="cccc::bc", + underlay_dip=self.rx_host_1.ip, + overlay_dmac=self.rx_host_1.client.mac, + use_dst_vnet_vni=False) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundDstVnetIdRouteVnetDirectTwoPortsTest(Vnet2VnetOutboundDstVnetIdRouteVnetDirectSinglePortTest): + """ + Outbound Vnet to Vnet test scenario that verifies + CA to PA entry use_dst_vnet_vni attribute True and False values + when routing action is SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET_DIRECT + with full underlay config (2 neighbours, 2 next-hops, 2 routes) + """ + + def runTest(self): + self.configureTest() + self.configure_underlay(self.tx_host, self.rx_host_0) + + self.vnet2VnetOutboundDstVnetIdTrueTest(tx_equal_to_rx=False) + self.vnet2VnetOutboundDstVnetIdFalseTest(tx_equal_to_rx=False) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundDstVnetIdRouteVnetDirectTwoPortstOverlayIpv6Test(Vnet2VnetOutboundDstVnetIdRouteVnetDirectSinglePortOverlayIpv6Test): + """ + Underlay IPv4 and Overlay IPv6 configs + Outbound Vnet to Vnet test scenario that verifies + CA to PA entry use_dst_vnet_vni attribute True and False values + when routing action is SAI_OUTBOUND_ROUTING_ENTRY_ACTION_ROUTE_VNET_DIRECT + with full underlay config (2 neighbours, 2 next-hops, 2 routes) + """ + + def runTest(self): + self.configureTest() + self.configure_underlay(self.tx_host, self.rx_host_0) + + self.vnet2VnetOutboundDstVnetIdTrueTest(tx_equal_to_rx=False) + self.vnet2VnetOutboundDstVnetIdFalseTest(tx_equal_to_rx=False) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetInboundOutboundMultipleConfigsSinglePortTest(VnetApiEndpoints, VnetTrafficMixin): + """ + Inbound and Outbound Vnet to Vnet test scenario + Verifies overlay routing with multiple inbound/outbound configurations + with underlay config (neighbour + next hop) but without underlay routes + """ + + def runTest(self): + self.update_configuration_for_tx_equal_to_rx() + self.configureTest() + self.configure_underlay(self.host_0, self.host_2, add_routes=False) + + self.outboundHost0toHost2Test(tx_equal_to_rx=True) + self.inboundHost2toHost0Test(tx_equal_to_rx=True) + + self.outboundHost3toHost1Test(tx_equal_to_rx=True) + self.inboundHost1toHost3Test(tx_equal_to_rx=True) + + def configureTest(self): + """ + Setup DUT in accordance with test purpose + + host_0.client (vni 1) ca ip: 192.168.0.1 (eni_0) <---> host_2.client (vni 2) ca ip: 192.168.1.1 + host_1.client (vni 10) ca ip: 192.168.2.1 <---> (eni_3) host_3.client (vni 20) ca ip: 192.168.3.1 + """ + + self.host_0 = self.tx_host + + self.host_1 = self.define_neighbor_network(port=self.host_0.port, + mac=self.host_0.mac, + ip=self.host_0.ip, + ip_prefix=self.host_0.ip_prefix, + peer_port=self.host_0.peer.port, + peer_mac=self.host_0.peer.mac, + peer_ip=self.host_0.peer.ip, + client_mac="00:03:00:00:05:16", + client_ip="192.168.2.1", + client_vni=10) + self.host_2 = self.rx_host + + self.host_3 = self.define_neighbor_network(port=self.host_2.port, + mac=self.host_2.mac, + ip=self.host_2.ip, + ip_prefix=self.host_2.ip_prefix, + peer_port=self.host_2.peer.port, + peer_mac=self.host_2.peer.mac, + peer_ip=self.host_2.peer.ip, + client_mac="00:04:00:00:06:17", + client_ip="192.168.3.1", + client_vni=20) + # Overlay routing + self.vip_create(self.host_0.peer.ip) # Appliance VIP + + # direction lookup VNI, reserved VNI assigned to the VM->Appliance + self.direction_lookup_create(self.host_0.client.vni) + self.direction_lookup_create(self.host_3.client.vni) + + host_0_vnet = self.vnet_create(vni=self.host_0.client.vni) + host_1_vnet = self.vnet_create(vni=self.host_1.client.vni) + + host_2_vnet = self.vnet_create(vni=self.host_2.client.vni) + host_3_vnet = self.vnet_create(vni=self.host_3.client.vni) + + eni_id_0 = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.host_0.ip), + vm_vni=self.host_0.client.vni, + vnet_id=host_0_vnet) + self.eni_mac_map_create(eni_id_0, self.host_0.client.mac) + + eni_id_3 = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.host_3.ip), + vm_vni=self.host_3.client.vni, + vnet_id=host_3_vnet) + self.eni_mac_map_create(eni_id_3, self.host_3.client.mac) + + # ENI 0 inbound/outbound routing + self.inbound_routing_decap_validate_create(eni_id=eni_id_0, vni=self.host_2.client.vni, + sip=self.host_2.ip, sip_mask="255.255.255.0", + src_vnet_id=host_2_vnet) + self.pa_validation_create(sip=self.host_2.ip, + vnet_id=host_2_vnet) + + self.outbound_routing_vnet_create(eni_id_0, lpm="192.168.1.0/24", + dst_vnet_id=host_2_vnet) + self.outbound_ca_to_pa_create(dst_vnet_id=host_2_vnet, + dip=self.host_2.client.ip, + underlay_dip=self.host_2.ip, + overlay_dmac=self.host_2.client.mac) + + # ENI 3 inbound/outbound routing + self.inbound_routing_decap_validate_create(eni_id=eni_id_3, vni=self.host_1.client.vni, + sip=self.host_1.ip, sip_mask="255.255.255.0", + src_vnet_id=host_1_vnet) + self.pa_validation_create(sip=self.host_1.ip, + vnet_id=host_1_vnet) + + self.outbound_routing_vnet_create(eni_id_3, lpm="192.168.2.0/24", + dst_vnet_id=host_1_vnet) + self.outbound_ca_to_pa_create(dst_vnet_id=host_1_vnet, + dip=self.host_1.client.ip, + underlay_dip=self.host_1.ip, + overlay_dmac=self.host_1.client.mac) + + def outboundHost0toHost2Test(self, tx_equal_to_rx): + + self.verify_traffic_scenario(client=self.host_0, + server=self.host_2, + connection=self.connection, + fake_mac=True, + tx_equal_to_rx=tx_equal_to_rx) + + print('\n', self.outboundHost0toHost2Test.__name__, ' OK') + + def inboundHost2toHost0Test(self, tx_equal_to_rx): + + self.verify_traffic_scenario(client=self.host_2, + server=self.host_0, + connection=self.connection, + fake_mac=False, + tx_equal_to_rx=tx_equal_to_rx) + + print('\n', self.inboundHost2toHost0Test.__name__, ' OK') + + def outboundHost3toHost1Test(self, tx_equal_to_rx): + + self.verify_traffic_scenario(client=self.host_3, + server=self.host_1, + connection=self.connection, + fake_mac=True, + tx_equal_to_rx=tx_equal_to_rx) + + print('\n', self.outboundHost3toHost1Test.__name__, ' OK') + + def inboundHost1toHost3Test(self, tx_equal_to_rx): + + self.verify_traffic_scenario(client=self.host_1, + server=self.host_3, + connection=self.connection, + fake_mac=False, + tx_equal_to_rx=tx_equal_to_rx) + + print('\n', self.inboundHost1toHost3Test.__name__, ' OK') + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetInboundOutboundMultipleConfigsSinglePortOverlayIpv6Test(Vnet2VnetInboundOutboundMultipleConfigsSinglePortTest): + """ + Underlay IPv4 and Overlay IPv6 configs + Inbound and Outbound Vnet to Vnet test scenario + Verifies overlay routing with multiple inbound/outbound configurations + with underlay config (neighbour + next hop) but without underlay routes + """ + + def configureTest(self): + """ + Setup DUT in accordance with test purpose + + host_0.client (vni 1) ca ipv6: aaaa::10 (eni_0) <---> host_2.client (vni 2) ca ipv6: bbbb::20 + host_1.client (vni 10) ca ipv6: cccc::30 <---> (eni_3) host_3.client (vni 20) ca ipv6: dddd::40 + """ + + self.host_0 = self.tx_host + + self.host_1 = self.define_neighbor_network(port=self.host_0.port, + mac=self.host_0.mac, + ip=self.host_0.ip, + ip_prefix=self.host_0.ip_prefix, + peer_port=self.host_0.peer.port, + peer_mac=self.host_0.peer.mac, + peer_ip=self.host_0.peer.ip, + client_mac="00:03:00:00:05:16", + client_ip="cccc::30", + client_vni=10) + self.host_2 = self.rx_host + + self.host_3 = self.define_neighbor_network(port=self.host_2.port, + mac=self.host_2.mac, + ip=self.host_2.ip, + ip_prefix=self.host_2.ip_prefix, + peer_port=self.host_2.peer.port, + peer_mac=self.host_2.peer.mac, + peer_ip=self.host_2.peer.ip, + client_mac="00:04:00:00:06:17", + client_ip="dddd::40", + client_vni=20) + # Overlay routing + self.vip_create(self.host_0.peer.ip) # Appliance VIP + + # direction lookup VNI, reserved VNI assigned to the VM->Appliance + self.direction_lookup_create(self.host_0.client.vni) + self.direction_lookup_create(self.host_3.client.vni) + + host_0_vnet = self.vnet_create(vni=self.host_0.client.vni) + host_1_vnet = self.vnet_create(vni=self.host_1.client.vni) + + host_2_vnet = self.vnet_create(vni=self.host_2.client.vni) + host_3_vnet = self.vnet_create(vni=self.host_3.client.vni) + + eni_id_0 = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.host_0.ip), + vm_vni=self.host_0.client.vni, + vnet_id=host_0_vnet) + self.eni_mac_map_create(eni_id_0, self.host_0.client.mac) + + eni_id_3 = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.host_3.ip), + vm_vni=self.host_3.client.vni, + vnet_id=host_3_vnet) + self.eni_mac_map_create(eni_id_3, self.host_3.client.mac) + + # ENI 0 inbound/outbound routing + self.inbound_routing_decap_validate_create(eni_id=eni_id_0, vni=self.host_2.client.vni, + sip=self.host_2.ip, sip_mask="255.255.255.0", + src_vnet_id=host_2_vnet) + self.pa_validation_create(sip=self.host_2.ip, + vnet_id=host_2_vnet) + + self.outbound_routing_vnet_create(eni_id_0, lpm="bbbb::0/64", + dst_vnet_id=host_2_vnet) + self.outbound_ca_to_pa_create(dst_vnet_id=host_2_vnet, + dip=self.host_2.client.ip, + underlay_dip=self.host_2.ip, + overlay_dmac=self.host_2.client.mac) + + # ENI 3 inbound/outbound routing + self.inbound_routing_decap_validate_create(eni_id=eni_id_3, vni=self.host_1.client.vni, + sip=self.host_1.ip, sip_mask="255.255.255.0", + src_vnet_id=host_1_vnet) + self.pa_validation_create(sip=self.host_1.ip, + vnet_id=host_1_vnet) + + self.outbound_routing_vnet_create(eni_id_3, lpm="cccc::0/64", + dst_vnet_id=host_1_vnet) + self.outbound_ca_to_pa_create(dst_vnet_id=host_1_vnet, + dip=self.host_1.client.ip, + underlay_dip=self.host_1.ip, + overlay_dmac=self.host_1.client.mac) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetInboundOutboundMultipleConfigsTwoPortsTest(Vnet2VnetInboundOutboundMultipleConfigsSinglePortTest): + """ + Inbound and Outbound Vnet to Vnet test scenario + Verifies overlay routing with multiple inbound/outbound configurations + with full underlay config (2 neighbours, 2 next-hops, 2 routes) + """ + + def runTest(self): + self.configureTest() + self.configure_underlay(self.host_0, self.host_2, + add_routes=True) + + self.outboundHost0toHost2Test(tx_equal_to_rx=False) + self.inboundHost2toHost0Test(tx_equal_to_rx=False) + + self.outboundHost3toHost1Test(tx_equal_to_rx=False) + self.inboundHost1toHost3Test(tx_equal_to_rx=False) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetInboundOutboundMultipleConfigsTwoPortsOverlayIpv6Test(Vnet2VnetInboundOutboundMultipleConfigsSinglePortOverlayIpv6Test): + """ + Underlay IPv4 and Overlay IPv6 configs + Inbound and Outbound Vnet to Vnet test scenario + Verifies overlay routing with multiple inbound/outbound configurations + with full underlay config (2 neighbours, 2 next-hops, 2 routes) + """ + + def runTest(self): + self.configureTest() + self.configure_underlay(self.host_0, self.host_2, + add_routes=True) + + self.outboundHost0toHost2Test(tx_equal_to_rx=False) + self.inboundHost2toHost0Test(tx_equal_to_rx=False) + + self.outboundHost3toHost1Test(tx_equal_to_rx=False) + self.inboundHost1toHost3Test(tx_equal_to_rx=False) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundMultipleEniSameIpPrefixSinglePortTest(VnetApiEndpoints, VnetTrafficMixin): + """ + Outbound Vnet to Vnet test scenario when multiple ENI and + Outbound routing entries exist with the same CA IP prefixes + with underlay config (neighbour + next hop) but without underlay routes + """ + + def runTest(self): + self.update_configuration_for_tx_equal_to_rx() + self.configureTest() + self.configure_underlay(self.tx_host_0, add_routes=False) + + self.outboundEni0Test(tx_equal_to_rx=True) + self.outboundEni1Test(tx_equal_to_rx=True) + self.outboundEni2Test(tx_equal_to_rx=True) + + def configureTest(self): + """ + Setup DUT in accordance with test purpose + + 192.168.0.1 -> 192.168.1.1 + tx_host_0 (vni 1) -> rx_host_0 (vni 2) + tx_host_1 (vni 10) -> rx_host_1 (vni 20) + tx_host_2 (vni 100) -> rx_host_2 (vni 200) + """ + + self.tx_host_0 = self.tx_host + + self.tx_host_1 = self.define_neighbor_network(port=self.tx_host_0.port, + mac=self.tx_host_0.mac, + ip=self.tx_host_0.ip, + ip_prefix=self.tx_host_0.ip_prefix, + peer_port=self.tx_host_0.peer.port, + peer_mac=self.tx_host_0.peer.mac, + peer_ip=self.tx_host_0.peer.ip, + client_mac="00:03:00:00:05:16", + client_ip=self.tx_host_0.client.ip, + client_vni=10) + + self.tx_host_2 = self.define_neighbor_network(port=self.tx_host_0.port, + mac=self.tx_host_0.mac, + ip=self.tx_host_0.ip, + ip_prefix=self.tx_host_0.ip_prefix, + peer_port=self.tx_host_0.peer.port, + peer_mac=self.tx_host_0.peer.mac, + peer_ip=self.tx_host_0.peer.ip, + client_mac="00:04:00:00:06:17", + client_ip=self.tx_host_0.client.ip, + client_vni=100) + + self.rx_host_0 = self.rx_host + + self.rx_host_1 = self.define_neighbor_network(port=self.rx_host_0.port, + mac=self.rx_host_0.mac, + ip=self.rx_host_0.ip, + ip_prefix=self.rx_host_0.ip_prefix, + peer_port=self.rx_host_0.peer.port, + peer_mac=self.rx_host_0.peer.mac, + peer_ip=self.rx_host_0.peer.ip, + client_mac="00:05:00:00:06:17", + client_ip=self.rx_host.client.ip, + client_vni=20) + + self.rx_host_2 = self.define_neighbor_network(port=self.rx_host_0.port, + mac=self.rx_host_0.mac, + ip=self.rx_host_0.ip, + ip_prefix=self.rx_host_0.ip_prefix, + peer_port=self.rx_host_0.peer.port, + peer_mac=self.rx_host_0.peer.mac, + peer_ip=self.rx_host_0.peer.ip, + client_mac="00:06:00:00:07:18", + client_ip=self.rx_host.client.ip, + client_vni=200) + + # Overlay routing + self.vip_create(self.tx_host_0.peer.ip) # Appliance VIP + + # direction lookup VNI, reserved VNI assigned to the VM->Appliance + self.direction_lookup_create(self.tx_host_0.client.vni) + self.direction_lookup_create(self.tx_host_1.client.vni) + self.direction_lookup_create(self.tx_host_2.client.vni) + + src_vnet_0 = self.vnet_create(vni=self.tx_host_0.client.vni) + src_vnet_1 = self.vnet_create(vni=self.tx_host_1.client.vni) + src_vnet_2 = self.vnet_create(vni=self.tx_host_2.client.vni) + + dst_vnet_0 = self.vnet_create(vni=self.rx_host_0.client.vni) + dst_vnet_1 = self.vnet_create(vni=self.rx_host_1.client.vni) + dst_vnet_2 = self.vnet_create(vni=self.rx_host_2.client.vni) + + eni_id_0 = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.tx_host_0.ip), + vm_vni=self.tx_host_0.client.vni, + vnet_id=src_vnet_0) + self.eni_mac_map_create(eni_id=eni_id_0, mac=self.tx_host_0.client.mac) + + eni_id_1 = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.tx_host_1.ip), + vm_vni=self.tx_host_1.client.vni, + vnet_id=src_vnet_1) + self.eni_mac_map_create(eni_id=eni_id_1, mac=self.tx_host_1.client.mac) + + eni_id_2 = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.tx_host_2.ip), + vm_vni=self.tx_host_2.client.vni, + vnet_id=src_vnet_2) + self.eni_mac_map_create(eni_id=eni_id_2, mac=self.tx_host_2.client.mac) + + # Outbound routing and CA to PA entries creation + # for use_dst_vnet_vni=True + self.outbound_routing_vnet_create(eni_id=eni_id_0, lpm="192.168.1.0/24", + dst_vnet_id=dst_vnet_0) + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_0, + dip=self.rx_host_0.client.ip, + underlay_dip=self.rx_host_0.ip, + overlay_dmac=self.rx_host_0.client.mac, + use_dst_vnet_vni=True) + + # for use_dst_vnet_vni=False + self.outbound_routing_vnet_create(eni_id=eni_id_1, lpm="192.168.1.0/24", + dst_vnet_id=dst_vnet_1) + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_1, + dip=self.rx_host_1.client.ip, + underlay_dip=self.rx_host_1.ip, + overlay_dmac=self.rx_host_1.client.mac, + use_dst_vnet_vni=False) + + self.outbound_routing_vnet_direct_create(eni_id=eni_id_2, lpm="192.168.1.0/24", + dst_vnet_id=dst_vnet_2, + overlay_ip="192.168.1.111") + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_2, + dip="192.168.1.111", + underlay_dip=self.rx_host_2.ip, + overlay_dmac=self.rx_host_2.client.mac, + use_dst_vnet_vni=True) + + def outboundEni0Test(self, tx_equal_to_rx): + + self.verify_traffic_scenario(client=self.tx_host_0, + server=self.rx_host_0, + connection=self.connection, + fake_mac=True, + tx_equal_to_rx=tx_equal_to_rx) + + print('\n', self.outboundEni0Test.__name__, ' OK') + + def outboundEni1Test(self, tx_equal_to_rx): + + # For use_dst_vnet_vni=False verification change rx client vni to tx client vni + self.rx_host_1.client.vni = self.tx_host_1.client.vni + + self.verify_traffic_scenario(client=self.tx_host_1, + server=self.rx_host_1, + connection=self.connection, + fake_mac=True, + tx_equal_to_rx=tx_equal_to_rx) + + print('\n', self.outboundEni1Test.__name__, ' OK') + + def outboundEni2Test(self, tx_equal_to_rx): + + self.verify_traffic_scenario(client=self.tx_host_2, + server=self.rx_host_2, + connection=self.connection, + fake_mac=True, + tx_equal_to_rx=tx_equal_to_rx) + + print('\n', self.outboundEni2Test.__name__, ' OK') + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundMultipleEniSameIpPrefixSinglePortOverlayIpv6Test(Vnet2VnetOutboundMultipleEniSameIpPrefixSinglePortTest): + """ + Underlay IPv4 and Overlay IPv6 configs + Outbound Vnet to Vnet test scenario when multiple ENI and + Outbound routing entries exist with the same CA IP prefixes + with underlay config (neighbour + next hop) but without underlay routes + """ + + def setUp(self): + super(Vnet2VnetOutboundMultipleEniSameIpPrefixSinglePortOverlayIpv6Test, self).setUp(overlay_ipv6=True) + + def configureTest(self): + """ + Setup DUT in accordance with test purpose + + CA: aaaa::10 -> bbbb::20 + tx_host_0 (vni 1) -> rx_host_0 (vni 2) + tx_host_1 (vni 10) -> rx_host_1 (vni 20) + tx_host_2 (vni 100) -> rx_host_2 (vni 200) + """ + + self.tx_host_0 = self.tx_host + + self.tx_host_1 = self.define_neighbor_network(port=self.tx_host_0.port, + mac=self.tx_host_0.mac, + ip=self.tx_host_0.ip, + ip_prefix=self.tx_host_0.ip_prefix, + peer_port=self.tx_host_0.peer.port, + peer_mac=self.tx_host_0.peer.mac, + peer_ip=self.tx_host_0.peer.ip, + client_mac="00:03:00:00:05:16", + client_ip=self.tx_host_0.client.ip, + client_vni=10) + + self.tx_host_2 = self.define_neighbor_network(port=self.tx_host_0.port, + mac=self.tx_host_0.mac, + ip=self.tx_host_0.ip, + ip_prefix=self.tx_host_0.ip_prefix, + peer_port=self.tx_host_0.peer.port, + peer_mac=self.tx_host_0.peer.mac, + peer_ip=self.tx_host_0.peer.ip, + client_mac="00:04:00:00:06:17", + client_ip=self.tx_host_0.client.ip, + client_vni=100) + + self.rx_host_0 = self.rx_host + + self.rx_host_1 = self.define_neighbor_network(port=self.rx_host_0.port, + mac=self.rx_host_0.mac, + ip=self.rx_host_0.ip, + ip_prefix=self.rx_host_0.ip_prefix, + peer_port=self.rx_host_0.peer.port, + peer_mac=self.rx_host_0.peer.mac, + peer_ip=self.rx_host_0.peer.ip, + client_mac="00:05:00:00:06:17", + client_ip=self.rx_host.client.ip, + client_vni=20) + + self.rx_host_2 = self.define_neighbor_network(port=self.rx_host_0.port, + mac=self.rx_host_0.mac, + ip=self.rx_host_0.ip, + ip_prefix=self.rx_host_0.ip_prefix, + peer_port=self.rx_host_0.peer.port, + peer_mac=self.rx_host_0.peer.mac, + peer_ip=self.rx_host_0.peer.ip, + client_mac="00:06:00:00:07:18", + client_ip=self.rx_host.client.ip, + client_vni=200) + + # Overlay routing + self.vip_create(self.tx_host_0.peer.ip) # Appliance VIP + + # direction lookup VNI, reserved VNI assigned to the VM->Appliance + self.direction_lookup_create(self.tx_host_0.client.vni) + self.direction_lookup_create(self.tx_host_1.client.vni) + self.direction_lookup_create(self.tx_host_2.client.vni) + + src_vnet_0 = self.vnet_create(vni=self.tx_host_0.client.vni) + src_vnet_1 = self.vnet_create(vni=self.tx_host_1.client.vni) + src_vnet_2 = self.vnet_create(vni=self.tx_host_2.client.vni) + + dst_vnet_0 = self.vnet_create(vni=self.rx_host_0.client.vni) + dst_vnet_1 = self.vnet_create(vni=self.rx_host_1.client.vni) + dst_vnet_2 = self.vnet_create(vni=self.rx_host_2.client.vni) + + eni_id_0 = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.tx_host_0.ip), + vm_vni=self.tx_host_0.client.vni, + vnet_id=src_vnet_0) + self.eni_mac_map_create(eni_id=eni_id_0, mac=self.tx_host_0.client.mac) + + eni_id_1 = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.tx_host_1.ip), + vm_vni=self.tx_host_1.client.vni, + vnet_id=src_vnet_1) + self.eni_mac_map_create(eni_id=eni_id_1, mac=self.tx_host_1.client.mac) + + eni_id_2 = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.tx_host_2.ip), + vm_vni=self.tx_host_2.client.vni, + vnet_id=src_vnet_2) + self.eni_mac_map_create(eni_id=eni_id_2, mac=self.tx_host_2.client.mac) + + # Outbound routing and CA to PA entries creation + # for use_dst_vnet_vni=True + self.outbound_routing_vnet_create(eni_id=eni_id_0, lpm="bbbb::0/64", + dst_vnet_id=dst_vnet_0) + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_0, + dip=self.rx_host_0.client.ip, + underlay_dip=self.rx_host_0.ip, + overlay_dmac=self.rx_host_0.client.mac, + use_dst_vnet_vni=True) + + # for use_dst_vnet_vni=False + self.outbound_routing_vnet_create(eni_id=eni_id_1, lpm="bbbb::0/64", + dst_vnet_id=dst_vnet_1) + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_1, + dip=self.rx_host_1.client.ip, + underlay_dip=self.rx_host_1.ip, + overlay_dmac=self.rx_host_1.client.mac, + use_dst_vnet_vni=False) + + self.outbound_routing_vnet_direct_create(eni_id=eni_id_2, lpm="bbbb::0/64", + dst_vnet_id=dst_vnet_2, + overlay_ip="bbbb::bc") + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_2, + dip="bbbb::bc", + underlay_dip=self.rx_host_2.ip, + overlay_dmac=self.rx_host_2.client.mac, + use_dst_vnet_vni=True) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundMultipleEniSameIpPrefixTwoPortsTest(Vnet2VnetOutboundMultipleEniSameIpPrefixSinglePortTest): + """ + Outbound Vnet to Vnet test scenario when multiple ENI and + Outbound routing entries exist with the same CA IP prefixes + with full underlay config (2 neighbours, 2 next-hops, 2 routes) + """ + + def runTest(self): + self.configureTest() + self.configure_underlay(self.tx_host_0, self.rx_host_0) + + self.outboundEni0Test(tx_equal_to_rx=False) + self.outboundEni1Test(tx_equal_to_rx=False) + self.outboundEni2Test(tx_equal_to_rx=False) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundMultipleEniSameIpPrefixTwoPortsOverlayIpv6Test(Vnet2VnetOutboundMultipleEniSameIpPrefixSinglePortOverlayIpv6Test): + """ + Underlay IPv4 and Overlay IPv6 configs + Outbound Vnet to Vnet test scenario when multiple ENI and + Outbound routing entries exist with the same CA IP prefixes + with full underlay config (2 neighbours, 2 next-hops, 2 routes) + """ + + def runTest(self): + self.configureTest() + self.configure_underlay(self.tx_host_0, self.rx_host_0) + + self.outboundEni0Test(tx_equal_to_rx=False) + self.outboundEni1Test(tx_equal_to_rx=False) + self.outboundEni2Test(tx_equal_to_rx=False) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundSingleEniMultipleIpPrefixSinglePortTest(VnetApiEndpoints, VnetTrafficMixin): + """ + Outbound Vnet to Vnet test scenario with single ENI and + multiple Outbound routing entries with the overlapping CA IP prefixes + with underlay config (neighbour + next hop) but without underlay routes + """ + + def runTest(self): + self.update_configuration_for_tx_equal_to_rx() + self.configureTest() + self.configure_underlay(self.tx_host, add_routes=False) + + self.singleEniToOutboundVm1Test(tx_equal_to_rx=True) + self.singleEniToOutboundVm2Test(tx_equal_to_rx=True) + self.singleEniToOutboundVm3Test(tx_equal_to_rx=True) + + def configureTest(self): + """ + Setup DUT in accordance with test purpose + + CA: + tx_host (vni 1) 9.0.0.1 -> 10.5.4.4/8 rx_host_0 (vni 2) + tx_host (vni 1) 9.0.0.1 -> 10.0.1.2/24 rx_host_1 (vni 20) + tx_host (vni 1) 9.0.0.1 -> 10.1.1.1/32 rx_host_2 (vni 200) + """ + + # Update VIP + self.tx_host.peer.ip = "12.1.1.1" + self.rx_host.peer.ip = "12.1.1.1" + + # Update some network parameters for ip prefixes overlapping + self.tx_host.ip = "192.168.0.1" + self.tx_host.ip_prefix = "192.168.0.0/24" + self.tx_host.client.ip = "9.0.0.1" + + self.rx_host_0 = self.rx_host + self.rx_host_0.ip = "192.168.1.1" + self.rx_host_0.ip_prefix = "192.168.1.0/24" + self.rx_host_0.client.ip = "10.5.4.4" + rx_host_0_client_ip_prefix = "10.0.0.0/8" + + self.rx_host_1 = self.define_neighbor_network(port=self.rx_host_0.port, + mac=self.rx_host_0.mac, + ip=self.rx_host_0.ip, + ip_prefix=self.rx_host_0.ip_prefix, + peer_port=self.rx_host_0.peer.port, + peer_mac=self.rx_host_0.peer.mac, + peer_ip=self.rx_host_0.peer.ip, + client_mac="00:05:00:00:06:17", + client_ip="10.0.1.2", + client_vni=20) + rx_host_1_client_ip_prefix = "10.0.1.0/24" + + self.rx_host_2 = self.define_neighbor_network(port=self.rx_host_0.port, + mac=self.rx_host_0.mac, + ip=self.rx_host_0.ip, + ip_prefix=self.rx_host_0.ip_prefix, + peer_port=self.rx_host_0.peer.port, + peer_mac=self.rx_host_0.peer.mac, + peer_ip=self.rx_host_0.peer.ip, + client_mac="00:06:00:00:07:18", + client_ip="10.1.1.1", + client_vni=200) + rx_host_2_client_ip_prefix = "10.1.1.1/32" + + # Overlay routing + self.vip_create(self.tx_host.peer.ip) # Appliance VIP + + # direction lookup VNI, reserved VNI assigned to the VM->Appliance + self.direction_lookup_create(self.tx_host.client.vni) + + src_vnet = self.vnet_create(vni=self.tx_host.client.vni) + + dst_vnet_0 = self.vnet_create(vni=self.rx_host_0.client.vni) + dst_vnet_1 = self.vnet_create(vni=self.rx_host_1.client.vni) + dst_vnet_2 = self.vnet_create(vni=self.rx_host_2.client.vni) + + eni_id = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.tx_host.ip), + vm_vni=self.tx_host.client.vni, + vnet_id=src_vnet) + self.eni_mac_map_create(eni_id=eni_id, mac=self.tx_host.client.mac) + + # Outbound routing and CA to PA entries creation + # for use_dst_vnet_vni=True + self.outbound_routing_vnet_create(eni_id=eni_id, lpm=rx_host_0_client_ip_prefix, + dst_vnet_id=dst_vnet_0) + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_0, + dip=self.rx_host_0.client.ip, + underlay_dip=self.rx_host_0.ip, + overlay_dmac=self.rx_host_0.client.mac, + use_dst_vnet_vni=True) + + # for use_dst_vnet_vni=False + self.outbound_routing_vnet_create(eni_id=eni_id, lpm=rx_host_1_client_ip_prefix, + dst_vnet_id=dst_vnet_1) + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_1, + dip=self.rx_host_1.client.ip, + underlay_dip=self.rx_host_1.ip, + overlay_dmac=self.rx_host_1.client.mac, + use_dst_vnet_vni=True) + + self.outbound_routing_vnet_create(eni_id=eni_id, lpm=rx_host_2_client_ip_prefix, + dst_vnet_id=dst_vnet_2) + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_2, + dip=self.rx_host_2.client.ip, + underlay_dip=self.rx_host_2.ip, + overlay_dmac=self.rx_host_2.client.mac, + use_dst_vnet_vni=True) + + def singleEniToOutboundVm1Test(self, tx_equal_to_rx): + """ + Packet sending: + CA IP: 9.0.0.1 -> 10.5.4.4/8 + VNET: 1 -> 2 + """ + + self.verify_traffic_scenario(client=self.tx_host, + server=self.rx_host_0, + connection=self.connection, + fake_mac=True, + tx_equal_to_rx=tx_equal_to_rx) + + print('\n', self.singleEniToOutboundVm1Test.__name__, ' OK') + + def singleEniToOutboundVm2Test(self, tx_equal_to_rx): + """ + Packet sending: + CA IP: 9.0.0.1 -> 10.0.1.2/24 + VNET: 1 -> 20 + """ + + self.verify_traffic_scenario(client=self.tx_host, + server=self.rx_host_1, + connection=self.connection, + fake_mac=True, + tx_equal_to_rx=tx_equal_to_rx) + + print('\n', self.singleEniToOutboundVm2Test.__name__, ' OK') + + def singleEniToOutboundVm3Test(self, tx_equal_to_rx): + """ + Packet sending: + CA IP: 9.0.0.1 -> 10.1.1.1/32 + VNET: 1 -> 200 + """ + + self.verify_traffic_scenario(client=self.tx_host, + server=self.rx_host_2, + connection=self.connection, + fake_mac=True, + tx_equal_to_rx=tx_equal_to_rx) + + print('\n', self.singleEniToOutboundVm3Test.__name__, ' OK') + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundSingleEniMultipleIpPrefixSinglePortOverlayIpv6Test(Vnet2VnetOutboundSingleEniMultipleIpPrefixSinglePortTest): + """ + Underlay IPv4 and Overlay IPv6 configs + Outbound Vnet to Vnet test scenario with single ENI and + multiple Outbound routing entries with the overlapping CA IP prefixes + with underlay config (neighbour + next hop) but without underlay routes + """ + def setUp(self): + super(Vnet2VnetOutboundSingleEniMultipleIpPrefixSinglePortOverlayIpv6Test, self).setUp(overlay_ipv6=True) + + def configureTest(self): + """ + Setup DUT in accordance with test purpose + + CA: + tx_host (vni 1) aaaa::10 -> 2001:db8:cad::1/48 rx_host_0 (vni 2) + tx_host (vni 1) aaaa::10 -> 2001:db8:cad:800::1/53 rx_host_1 (vni 20) + tx_host (vni 1) aaaa::10 -> 2001:db8:cad:810::1/62 rx_host_2 (vni 200) + """ + + # Update some network parameters for ip prefixes overlapping + self.tx_host.ip = "192.168.0.1" + self.tx_host.ip_prefix = "192.168.0.0/24" + + self.rx_host_0 = self.rx_host + self.rx_host_0.ip = "192.168.1.1" + self.rx_host_0.ip_prefix = "192.168.1.0/24" + self.rx_host_0.client.ip = "2001:db8:cad::1" + rx_host_0_client_ip_prefix = "2001:db8:cad::0/48" + + self.rx_host_1 = self.define_neighbor_network(port=self.rx_host_0.port, + mac=self.rx_host_0.mac, + ip=self.rx_host_0.ip, + ip_prefix=self.rx_host_0.ip_prefix, + peer_port=self.rx_host_0.peer.port, + peer_mac=self.rx_host_0.peer.mac, + peer_ip=self.rx_host_0.peer.ip, + client_mac="00:05:00:00:06:17", + client_ip="2001:db8:cad:800::1", + client_vni=20) + rx_host_1_client_ip_prefix = "2001:db8:cad:800::0/53" + + self.rx_host_2 = self.define_neighbor_network(port=self.rx_host_0.port, + mac=self.rx_host_0.mac, + ip=self.rx_host_0.ip, + ip_prefix=self.rx_host_0.ip_prefix, + peer_port=self.rx_host_0.peer.port, + peer_mac=self.rx_host_0.peer.mac, + peer_ip=self.rx_host_0.peer.ip, + client_mac="00:06:00:00:07:18", + client_ip="2001:db8:cad:810::1", + client_vni=200) + rx_host_2_client_ip_prefix = "2001:db8:cad:810::0/62" + + # Overlay routing + self.vip_create(self.tx_host.peer.ip) # Appliance VIP + + # direction lookup VNI, reserved VNI assigned to the VM->Appliance + self.direction_lookup_create(self.tx_host.client.vni) + + src_vnet = self.vnet_create(vni=self.tx_host.client.vni) + + dst_vnet_0 = self.vnet_create(vni=self.rx_host_0.client.vni) + dst_vnet_1 = self.vnet_create(vni=self.rx_host_1.client.vni) + dst_vnet_2 = self.vnet_create(vni=self.rx_host_2.client.vni) + + eni_id = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.tx_host.ip), + vm_vni=self.tx_host.client.vni, + vnet_id=src_vnet) + self.eni_mac_map_create(eni_id=eni_id, mac=self.tx_host.client.mac) + + # Outbound routing and CA to PA entries creation + # for use_dst_vnet_vni=True + self.outbound_routing_vnet_create(eni_id=eni_id, lpm=rx_host_0_client_ip_prefix, + dst_vnet_id=dst_vnet_0) + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_0, + dip=self.rx_host_0.client.ip, + underlay_dip=self.rx_host_0.ip, + overlay_dmac=self.rx_host_0.client.mac, + use_dst_vnet_vni=True) + + # for use_dst_vnet_vni=False + self.outbound_routing_vnet_create(eni_id=eni_id, lpm=rx_host_1_client_ip_prefix, + dst_vnet_id=dst_vnet_1) + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_1, + dip=self.rx_host_1.client.ip, + underlay_dip=self.rx_host_1.ip, + overlay_dmac=self.rx_host_1.client.mac, + use_dst_vnet_vni=True) + + self.outbound_routing_vnet_create(eni_id=eni_id, lpm=rx_host_2_client_ip_prefix, + dst_vnet_id=dst_vnet_2) + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet_2, + dip=self.rx_host_2.client.ip, + underlay_dip=self.rx_host_2.ip, + overlay_dmac=self.rx_host_2.client.mac, + use_dst_vnet_vni=True) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundSingleEniMultipleIpPrefixTwoPortsTest(Vnet2VnetOutboundSingleEniMultipleIpPrefixSinglePortTest): + """ + Outbound Vnet to Vnet test scenario with single ENI and + multiple Outbound routing entries with the overlapping CA IP prefixes + with full underlay config (2 neighbours, 2 next-hops, 2 routes) + """ + + def runTest(self): + self.configureTest() + self.configure_underlay(self.tx_host, self.rx_host_0) + + self.singleEniToOutboundVm1Test(tx_equal_to_rx=False) + self.singleEniToOutboundVm2Test(tx_equal_to_rx=False) + self.singleEniToOutboundVm3Test(tx_equal_to_rx=False) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundSingleEniMultipleIpPrefixTwoPortsOverlayIpv6Test(Vnet2VnetOutboundSingleEniMultipleIpPrefixSinglePortOverlayIpv6Test): + """ + Underlay IPv4 and Overlay IPv6 configs + Outbound Vnet to Vnet test scenario with single ENI and + multiple Outbound routing entries with the overlapping CA IP prefixes + with full underlay config (2 neighbours, 2 next-hops, 2 routes) + """ + + def runTest(self): + self.configureTest() + self.configure_underlay(self.tx_host, self.rx_host_0) + + self.singleEniToOutboundVm1Test(tx_equal_to_rx=False) + self.singleEniToOutboundVm2Test(tx_equal_to_rx=False) + self.singleEniToOutboundVm3Test(tx_equal_to_rx=False) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundSameCaPaIpPrefixesSinglePortTest(VnetApiEndpoints, VnetTrafficMixin): + """ + Outbound Vnet to Vnet test scenario with the same + CA and PA IP prefixes with underlay config (neighbour + next hop) but without underlay routes + """ + + def runTest(self): + self.update_configuration_for_tx_equal_to_rx() + self.configureTest() + self.configure_underlay(self.tx_host, add_routes=False) + + self.vnet2VnetOutboundRouteVnetTest(tx_equal_to_rx=True) + + def configureTest(self): + """ + Setup DUT in accordance with test purpose + """ + + # Update network parameters with the same provider and client ip addresses + self.tx_host.ip = self.tx_host.client.ip # 192.168.0.1 + self.tx_host.ip_prefix = "192.168.0.0/24" + + self.rx_host.ip = self.rx_host.client.ip # 192.168.1.1 + self.rx_host.ip_prefix = "192.168.1.0/24" + + # Configure overlay routing + self.vip_create(self.tx_host.peer.ip) + + # direction lookup VNI, reserved VNI assigned to the VM->Appliance + self.direction_lookup_create(self.tx_host.client.vni) + + src_vnet = self.vnet_create(vni=self.tx_host.client.vni) + dst_vnet = self.vnet_create(vni=self.rx_host.client.vni) + + eni_id = self.eni_create(admin_state=True, + vm_underlay_dip=sai_ipaddress(self.tx_host.ip), + vm_vni=self.tx_host.client.vni, + vnet_id=src_vnet) + self.eni_mac_map_create(eni_id, self.tx_host.client.mac) # ENI MAC + + self.outbound_routing_vnet_create(eni_id=eni_id, lpm="192.168.1.0/24", + dst_vnet_id=dst_vnet) + self.outbound_ca_to_pa_create(dst_vnet_id=dst_vnet, + dip=self.rx_host.client.ip, + underlay_dip=self.rx_host.ip, + overlay_dmac=self.rx_host.client.mac, + use_dst_vnet_vni=True) + + def vnet2VnetOutboundRouteVnetTest(self, tx_equal_to_rx): + """ + Packet sending: + CA IP: 192.168.0.1/24 -> 192.168.1.1/24 + PA IP: 192.168.0.1/24 -> VIP -> 192.168.1.1/24 + VNET: 1 -> 2 + """ + + self.verify_traffic_scenario(client=self.tx_host, + server=self.rx_host, + connection=self.connection, + fake_mac=True, + tx_equal_to_rx=tx_equal_to_rx) + + +@group("draft") +@skipIf(test_param_get('target') == 'bmv2', "Blocked on BMv2 by Issue #236") +class Vnet2VnetOutboundSameCaPaIpPrefixesTwoPortsTest(Vnet2VnetOutboundSameCaPaIpPrefixesSinglePortTest): + """ + Outbound Vnet to Vnet test scenario with the same + CA and PA IP prefixes with full underlay config (2 neighbours, 2 next-hops, 2 routes) + """ + + def runTest(self): + self.configureTest() + self.configure_underlay(self.tx_host, self.rx_host) + + self.vnet2VnetOutboundRouteVnetTest(tx_equal_to_rx=False) diff --git a/test/test-cases/functional/saic/empty_test.py b/test/test-cases/functional/saic/empty_test.py index 2e6150a6c..df6bc603f 100644 --- a/test/test-cases/functional/saic/empty_test.py +++ b/test/test-cases/functional/saic/empty_test.py @@ -4,4 +4,4 @@ def test_placeholder(): print('test_placeholder') - pass \ No newline at end of file + pass diff --git a/test/test-cases/functional/saic/pytest.ini b/test/test-cases/functional/saic/pytest.ini index f9eb33c53..68918ea63 100644 --- a/test/test-cases/functional/saic/pytest.ini +++ b/test/test-cases/functional/saic/pytest.ini @@ -1,4 +1,4 @@ [pytest] markers = ptf: traffic tests supported by PTF. snappi should work as well. - snappi: traffic tests that requires snappi only. \ No newline at end of file + snappi: traffic tests that requires snappi only. diff --git a/test/test-cases/functional/saic/tutorial/images/dut-config-custom-gen-files.svg b/test/test-cases/functional/saic/tutorial/images/dut-config-custom-gen-files.svg index d3ade40aa..be3c160a5 100644 --- a/test/test-cases/functional/saic/tutorial/images/dut-config-custom-gen-files.svg +++ b/test/test-cases/functional/saic/tutorial/images/dut-config-custom-gen-files.svg @@ -1,4 +1,4 @@ -
API wrapper
API wrapper
saithrift driver
saithrift d...
DUT API
DUT API
SAI Challenger Framework
SAI Challenger Framework
DUT (Device under test)
HW  or SW (bmv2, etc.)
DUT (Device under test...
Record Parser
Record Parser
?
?
X
X
{...}
{...}
Test Logic
Test Log...
sai-thrift
sai-redis
etc.
sai-thrift...
Test Fixture setup files
Test Fixture se...
PyTest test-case
PyTest test-case
PyTest test-case
PyTest test-case
custom config generator
custom config g...
file
file
stored SAI records
stored SAI...
stdout
stdout
process_commands()
process_comm...
Execute in command-line mode to emit JSON records
Execute in command-line mod...
Text is not SVG - cannot display
\ No newline at end of file +
API wrapper
API wrapper
saithrift driver
saithrift d...
DUT API
DUT API
SAI Challenger Framework
SAI Challenger Framework
DUT (Device under test)
HW  or SW (bmv2, etc.)
DUT (Device under test...
Record Parser
Record Parser
?
?
X
X
{...}
{...}
Test Logic
Test Log...
sai-thrift
sai-redis
etc.
sai-thrift...
Test Fixture setup files
Test Fixture se...
PyTest test-case
PyTest test-case
PyTest test-case
PyTest test-case
custom config generator
custom config g...
file
file
stored SAI records
stored SAI...
stdout
stdout
process_commands()
process_comm...
Execute in command-line mode to emit JSON records
Execute in command-line mod...
Text is not SVG - cannot display
diff --git a/test/test-cases/functional/saic/tutorial/images/dut-config-custom-gen.svg b/test/test-cases/functional/saic/tutorial/images/dut-config-custom-gen.svg index fa9a25f4f..2e98fa8db 100644 --- a/test/test-cases/functional/saic/tutorial/images/dut-config-custom-gen.svg +++ b/test/test-cases/functional/saic/tutorial/images/dut-config-custom-gen.svg @@ -1,4 +1,4 @@ -
API wrapper
API wrapper
process-commands()
process-co...
saithrift driver
saithrift d...
DUT API
DUT API
SAI Challenger Framework
SAI Challenger Framework
DUT (Device under test)
HW  or SW (bmv2, etc.)
DUT (Device under test...
Record Parser
Record Parser
?
?
X
X
{...}
{...}
Test Logic
Test Log...
sai-thrift
sai-redis
etc.
sai-thrift...
Test Fixture setup files
Test Fixture se...
PyTest test-case
PyTest test-case
custom config generator
custom config g...
Text is not SVG - cannot display
\ No newline at end of file +
API wrapper
API wrapper
process-commands()
process-co...
saithrift driver
saithrift d...
DUT API
DUT API
SAI Challenger Framework
SAI Challenger Framework
DUT (Device under test)
HW  or SW (bmv2, etc.)
DUT (Device under test...
Record Parser
Record Parser
?
?
X
X
{...}
{...}
Test Logic
Test Log...
sai-thrift
sai-redis
etc.
sai-thrift...
Test Fixture setup files
Test Fixture se...
PyTest test-case
PyTest test-case
custom config generator
custom config g...
Text is not SVG - cannot display
diff --git a/test/test-cases/functional/saic/tutorial/images/dut-config-dpugen-files.svg b/test/test-cases/functional/saic/tutorial/images/dut-config-dpugen-files.svg index 0bc766b1f..605b8a426 100644 --- a/test/test-cases/functional/saic/tutorial/images/dut-config-dpugen-files.svg +++ b/test/test-cases/functional/saic/tutorial/images/dut-config-dpugen-files.svg @@ -1,4 +1,4 @@ -
API wrapper
API wrapper
file
file
stored SAI records
stored SAI...
process_commands()
process_co...
saithrift driver
saithrift d...
DUT API
DUT API
input params
input params
dpugen
dpugen
generator
generator
SAI Challenger Framework
SAI Challenger Framework
DUT (Device under test)
HW  or SW (bmv2, etc.)
DUT (Device under test...
Record Parser
Record Parser
?
?
X
X
{...}
{...}
Test Logic
Test Log...
sai-thrift
sai-redis
etc.
sai-thrift...
Test Fixture setup files
Test Fixture se...
PyTest test-case
PyTest test-case
Execute in command-line mode to emit JSON records
Execute in command-line mod...
PyTest test-case
PyTest test-case
import
import
stdout
stdout
Text is not SVG - cannot display
\ No newline at end of file +
API wrapper
API wrapper
file
file
stored SAI records
stored SAI...
process_commands()
process_co...
saithrift driver
saithrift d...
DUT API
DUT API
input params
input params
dpugen
dpugen
generator
generator
SAI Challenger Framework
SAI Challenger Framework
DUT (Device under test)
HW  or SW (bmv2, etc.)
DUT (Device under test...
Record Parser
Record Parser
?
?
X
X
{...}
{...}
Test Logic
Test Log...
sai-thrift
sai-redis
etc.
sai-thrift...
Test Fixture setup files
Test Fixture se...
PyTest test-case
PyTest test-case
Execute in command-line mode to emit JSON records
Execute in command-line mod...
PyTest test-case
PyTest test-case
import
import
stdout
stdout
Text is not SVG - cannot display
diff --git a/test/test-cases/functional/saic/tutorial/images/dut-config-dpugen.svg b/test/test-cases/functional/saic/tutorial/images/dut-config-dpugen.svg index 80c712f8a..cd384c795 100644 --- a/test/test-cases/functional/saic/tutorial/images/dut-config-dpugen.svg +++ b/test/test-cases/functional/saic/tutorial/images/dut-config-dpugen.svg @@ -1,4 +1,4 @@ -
API wrapper
API wrapper
saithrift driver
saithrift d...
DUT API
DUT API
streaming SAI records
streaming...
input params
input params
dpugen
dpugen
generator
generator
generate
generate
SAI Challenger Framework
SAI Challenger Framework
module import
module import
DUT (Device under test)
HW  or SW (bmv2, etc.)
DUT (Device under test...
Record Parser
Record Parser
?
?
X
X
{...}
{...}
Test Logic
Test Log...
sai-thrift
sai-redis
etc.
sai-thrift...
Test Fixture setup files
Test Fixture se...
PyTest test-case
PyTest test-case
Text is not SVG - cannot display
\ No newline at end of file +
API wrapper
API wrapper
saithrift driver
saithrift d...
DUT API
DUT API
streaming SAI records
streaming...
input params
input params
dpugen
dpugen
generator
generator
generate
generate
SAI Challenger Framework
SAI Challenger Framework
module import
module import
DUT (Device under test)
HW  or SW (bmv2, etc.)
DUT (Device under test...
Record Parser
Record Parser
?
?
X
X
{...}
{...}
Test Logic
Test Log...
sai-thrift
sai-redis
etc.
sai-thrift...
Test Fixture setup files
Test Fixture se...
PyTest test-case
PyTest test-case
Text is not SVG - cannot display
diff --git a/test/test-cases/functional/saic/tutorial/images/dut-config-list-comprehension-files.svg b/test/test-cases/functional/saic/tutorial/images/dut-config-list-comprehension-files.svg index e613fd9c3..630157664 100644 --- a/test/test-cases/functional/saic/tutorial/images/dut-config-list-comprehension-files.svg +++ b/test/test-cases/functional/saic/tutorial/images/dut-config-list-comprehension-files.svg @@ -1,4 +1,4 @@ -
API wrapper
API wrapper
saithrift driver
saithrift d...
DUT API
DUT API
SAI Challenger Framework
SAI Challenger Framework
DUT (Device under test)
HW  or SW (bmv2, etc.)
DUT (Device under test...
Record Parser
Record Parser
?
?
X
X
{...}
{...}
Test Logic
Test Log...
sai-thrift
sai-redis
etc.
sai-thrift...
Test Fixture setup files
Test Fixture se...
PyTest test-case
PyTest test-case
literal SAI records in the test-case code
literal SAI rec...
PyTest test-case
PyTest test-case
embedded list-comprehension expression
embedded list-c...
file
file
stored SAI records
stored SAI...
stdout
stdout
process_commands()
process_comm...
Execute in command-line mode to emit JSON records
Execute in command-line mod...
Text is not SVG - cannot display
\ No newline at end of file +
API wrapper
API wrapper
saithrift driver
saithrift d...
DUT API
DUT API
SAI Challenger Framework
SAI Challenger Framework
DUT (Device under test)
HW  or SW (bmv2, etc.)
DUT (Device under test...
Record Parser
Record Parser
?
?
X
X
{...}
{...}
Test Logic
Test Log...
sai-thrift
sai-redis
etc.
sai-thrift...
Test Fixture setup files
Test Fixture se...
PyTest test-case
PyTest test-case
literal SAI records in the test-case code
literal SAI rec...
PyTest test-case
PyTest test-case
embedded list-comprehension expression
embedded list-c...
file
file
stored SAI records
stored SAI...
stdout
stdout
process_commands()
process_comm...
Execute in command-line mode to emit JSON records
Execute in command-line mod...
Text is not SVG - cannot display
diff --git a/test/test-cases/functional/saic/tutorial/images/dut-config-list-comprehension.svg b/test/test-cases/functional/saic/tutorial/images/dut-config-list-comprehension.svg index 86c8540ec..99c528ccf 100644 --- a/test/test-cases/functional/saic/tutorial/images/dut-config-list-comprehension.svg +++ b/test/test-cases/functional/saic/tutorial/images/dut-config-list-comprehension.svg @@ -1,4 +1,4 @@ -
API wrapper
API wrapper
literal SAI records in the test-case code
literal SAI rec...
process-commands()
process-co...
saithrift driver
saithrift d...
DUT API
DUT API
SAI Challenger Framework
SAI Challenger Framework
DUT (Device under test)
HW  or SW (bmv2, etc.)
DUT (Device under test...
Record Parser
Record Parser
?
?
X
X
{...}
{...}
Test Logic
Test Log...
sai-thrift
sai-redis
etc.
sai-thrift...
Test Fixture setup files
Test Fixture se...
PyTest test-case
PyTest test-case
embedded list-comprehension expression
embedded list-c...
Text is not SVG - cannot display
\ No newline at end of file +
API wrapper
API wrapper
literal SAI records in the test-case code
literal SAI rec...
process-commands()
process-co...
saithrift driver
saithrift d...
DUT API
DUT API
SAI Challenger Framework
SAI Challenger Framework
DUT (Device under test)
HW  or SW (bmv2, etc.)
DUT (Device under test...
Record Parser
Record Parser
?
?
X
X
{...}
{...}
Test Logic
Test Log...
sai-thrift
sai-redis
etc.
sai-thrift...
Test Fixture setup files
Test Fixture se...
PyTest test-case
PyTest test-case
embedded list-comprehension expression
embedded list-c...
Text is not SVG - cannot display
diff --git a/test/test-cases/functional/saic/tutorial/images/dut-config-literal.svg b/test/test-cases/functional/saic/tutorial/images/dut-config-literal.svg index cd76ab367..e01b6a589 100644 --- a/test/test-cases/functional/saic/tutorial/images/dut-config-literal.svg +++ b/test/test-cases/functional/saic/tutorial/images/dut-config-literal.svg @@ -1,4 +1,4 @@ -
API wrapper
API wrapper
literal SAI records in the test-case code
literal SAI rec...
process_commands()
process_co...
saithrift driver
saithrift d...
DUT API
DUT API
SAI Challenger Framework
SAI Challenger Framework
DUT (Device under test)
HW  or SW (bmv2, etc.)
DUT (Device under test...
Record Parser
Record Parser
?
?
X
X
{...}
{...}
Test Logic
Test Log...
sai-thrift
sai-redis
etc.
sai-thrift...
Test Fixture setup files
Test Fixture se...
PyTest test-case
PyTest test-case
Text is not SVG - cannot display
\ No newline at end of file +
API wrapper
API wrapper
literal SAI records in the test-case code
literal SAI rec...
process_commands()
process_co...
saithrift driver
saithrift d...
DUT API
DUT API
SAI Challenger Framework
SAI Challenger Framework
DUT (Device under test)
HW  or SW (bmv2, etc.)
DUT (Device under test...
Record Parser
Record Parser
?
?
X
X
{...}
{...}
Test Logic
Test Log...
sai-thrift
sai-redis
etc.
sai-thrift...
Test Fixture setup files
Test Fixture se...
PyTest test-case
PyTest test-case
Text is not SVG - cannot display
diff --git a/test/test-cases/scale/saic/pytest.ini b/test/test-cases/scale/saic/pytest.ini index f9eb33c53..68918ea63 100644 --- a/test/test-cases/scale/saic/pytest.ini +++ b/test/test-cases/scale/saic/pytest.ini @@ -1,4 +1,4 @@ [pytest] markers = ptf: traffic tests supported by PTF. snappi should work as well. - snappi: traffic tests that requires snappi only. \ No newline at end of file + snappi: traffic tests that requires snappi only. diff --git a/test/test-cases/scale/vnet2vnet/48K-ips/README.md b/test/test-cases/scale/vnet2vnet/48K-ips/README.md index 71f7ee843..63e140f76 100644 --- a/test/test-cases/scale/vnet2vnet/48K-ips/README.md +++ b/test/test-cases/scale/vnet2vnet/48K-ips/README.md @@ -17,4 +17,4 @@ The intention of the 48K-IPs test is to evaluate a DPUs performance with an obje |------+----------------+------------------------+---------------+-----------------+-----------------| | 1 | 100000 | 0 | 10 | 0 | 0 | +------+----------------+------------------------+---------------+-----------------+-----------------+ -``` \ No newline at end of file +``` diff --git a/test/test-cases/scale/vnet2vnet/48K-ips/test_vxlan_8vpc_48K-ips.py b/test/test-cases/scale/vnet2vnet/48K-ips/test_vxlan_8vpc_48K-ips.py index 9a7373cf8..1bfa7bf3c 100644 --- a/test/test-cases/scale/vnet2vnet/48K-ips/test_vxlan_8vpc_48K-ips.py +++ b/test/test-cases/scale/vnet2vnet/48K-ips/test_vxlan_8vpc_48K-ips.py @@ -1,1442 +1,1442 @@ -import inspect -import json -import sys -import time -from copy import deepcopy - -import ipaddress -import macaddress -import pytest -import requests -from ixload import IxLoadUtils as IxLoadUtils -from ixnetwork_restpy import SessionAssistant -from ixnetwork_restpy.assistants.statistics.statviewassistant import StatViewAssistant -from tabulate import tabulate -from testdata_baby_hero import testdata,ip_type -from datetime import datetime -from future.utils import iteritems - -data = [] -final_result_data=[] -setup_information=None -ixnetwork=None -config_elements_sets=[] -val_map={} -tiNo = 16 -captions = ["Test","PPS", "Tx Frames", "Rx Frames", "Frames Delta", "Loss %","PossibleBoundary"] - - -@pytest.fixture(scope="class") -def setup(smartnics, tbinfo,utils): - """Gather all required test information from DUT and tbinfo. - A Dictionary with required test information. - """ - print ("*"*50+"SETUP"+"*"*50) - setup_information = {"nics": smartnics, "tbinfo": tbinfo, } - smartnics.configure_target(testdata) - yield setup_information - -def find_boundary(utils): - global data, final_result_data - hls = ixnetwork.Traffic.TrafficItem.find()[0].HighLevelStream.find() - - def boundary_check(test_boundary_val): - for hl in hls: - hl.FrameRate.update(Type='framesPerSecond', Rate=test_boundary_val) - - utils.start_traffic(ixnetwork) - utils.ss("\t\t\tLet Traffic run for ", 10) - utils.ss("\t\t\tPrint Stats Before issuing Clear Stats ", 2) - utils.printStats(ixnetwork, "Traffic Item Statistics", {"Traffic Item Statistics": {'transpose': False, 'toprint': ["Traffic Item", "Tx Frames", "Rx Frames", "Frames Delta", "Loss %"]}}) - utils.ss("\t\t\tLet Clear Stats ", 2) - ixnetwork.ClearStats() - utils.ss("\t\t\tLet Traffic run for another ", 90) - utils.stop_traffic(ixnetwork) - utils.ss("\t\t\tLets wait for stats to settle down for ", 10) - #print("\tVerify Traffic stats") - ti = StatViewAssistant(ixnetwork, 'Traffic Item Statistics') - if float(ti.Rows[0]['Frames Delta']) == float(0): - ixnetwork.ClearStats() - return False - else: - ixnetwork.ClearStats() - return True - - poss_val, step, tolerance, pass_val, fail_val = int(20000000 / tiNo), int(20000000 / tiNo), 100000, None, None - #poss_val, step, tolerance, pass_val, fail_val = int(20000000 / tiNo), int(20000000 / tiNo), 50000, None, None - - while True: - print("="*50) - print(f"Test running for {utils.human_format(poss_val * tiNo)} framesPerSecond") - print(" POSSPASS|FAIL|PASS=", poss_val, fail_val, pass_val) - print("="*50) - result = boundary_check(poss_val) - row = utils.printStats(ixnetwork, "Traffic Item Statistics", {"Traffic Item Statistics": {'transpose': False, 'toprint': ["Traffic Item", "Tx Frames", "Rx Frames", "Frames Delta", "Loss %"]}}) - utils.printStats(ixnetwork, "Flow Statistics", {"Flow Statistics": {'transpose': False, 'toprint': ["Traffic Item", "Source/Dest Endpoint Pair", "Tx Frames", "Rx Frames", "Frames Delta", "Loss %"]}}) - data.append([sys._getframe().f_back.f_code.co_name,utils.human_format(poss_val * tiNo)]+row[1:]) - - if result: - fail_val = poss_val - if pass_val: - poss_val = int((pass_val+fail_val)/2) - else: - poss_val = int(poss_val/2) - else: # we need to continue - pass_val = poss_val - if not fail_val: - poss_val = pass_val+step - else: - poss_val = int((pass_val+fail_val)/2) - if fail_val: - if abs(fail_val-poss_val) <= tolerance: - if pass_val==None: - print ("Not able to find Boundary Tolerance (%d) is Less than last fail value (%d)" % (tolerance,fail_val)) - pass_val="NA" - else: - pass_val = utils.human_format(pass_val * tiNo) - print("Final Possible Boundary is ", pass_val) - print(" X POSSPASS|FAIL|PASS=", poss_val, fail_val, pass_val) - break - data.append([sys._getframe().f_back.f_code.co_name]+["***"]*5+[pass_val]) - print(tabulate(data, headers=captions, tablefmt="psql")) - - final_result_data.append([sys._getframe().f_back.f_code.co_name,pass_val]) - - - -@pytest.fixture(scope="class") -def pps_config(setup,tbinfo,utils): - """ - Description: Verify ip address can be configured in SVI. - Topo: DUT02 ============ DUT01 - Dev. status: DONE - """ - global ixnetwork,config_elements_sets,val_map - testbed = setup["tbinfo"] - snic = setup["nics"] - def createTI(name, endpoints): - trafficItem = ixnetwork.Traffic.TrafficItem.find(Name="^%s$" % name) - if len(trafficItem) == 0: - trafficItem = ixnetwork.Traffic.TrafficItem.add(Name=name, TrafficType='ipv4', BiDirectional=False) # BiDirectional=True - for indx,srcdst in enumerate(endpoints): - print ("ENP UP",indx+1) - src,dst = srcdst - endpoint_set_up = trafficItem.EndpointSet.add(Name="%s-ENI_UP-%s" % (name,str(indx+1)),ScalableSources=src, ScalableDestinations=dst) - ce = trafficItem.ConfigElement.find()[-1] - ce.FrameRate.update(Type='framesPerSecond', Rate=50000) - ce.TransmissionControl.Type = 'continuous' - ce.FrameRateDistribution.PortDistribution = 'applyRateToAll' - ce.FrameSize.FixedSize = 128 - udp_srcport = ce.Stack.find(StackTypeId="udp").Field.find(FieldTypeId="udp.header.srcPort") - udp_srcport.Auto = False - udp_srcport.SingleValue = 50687 - udp_len = ce.Stack.find(StackTypeId="udp").Field.find(FieldTypeId="udp.header.length") - udp_len.Auto = False - udp_len.SingleValue = 80 - - udp_template = ixnetwork.Traffic.ProtocolTemplate.find(StackTypeId='^udp$') - ipv4_template = ce.Stack.find(TemplateName="ipv4-template.xml")[-1] - inner_udp = ce.Stack.read(ipv4_template.AppendProtocol(udp_template)) - trafficItem.Tracking.find()[0].TrackBy = ['trackingenabled0', 'sourceDestEndpointPair0'] - inn_sp = inner_udp.Field.find(DisplayName='^UDP-Source-Port') - inn_dp = inner_udp.Field.find(DisplayName='^UDP-Dest-Port') - inn_sp.Auto = False - inn_dp.Auto = False - inn_sp.SingleValue = 10000 - inn_dp.SingleValue = 10000 - ce_up = ce - print ("ENP Down",indx+1) - #DOWN - endpoint_set_down = trafficItem.EndpointSet.add(Name="%s-ENI_DOWN-%s" % (name,str(indx+1)),ScalableSources=dst, ScalableDestinations=src) - ce = trafficItem.ConfigElement.find()[-1] - ce.FrameRate.update(Type='framesPerSecond', Rate=50000) - ce.TransmissionControl.Type = 'continuous' - ce.FrameRateDistribution.PortDistribution = 'applyRateToAll' - ce.FrameSize.FixedSize = 128 - udp_srcport = ce.Stack.find(StackTypeId="udp").Field.find(FieldTypeId="udp.header.srcPort") - udp_srcport.Auto = False - udp_srcport.SingleValue = 50687 - udp_len = ce.Stack.find(StackTypeId="udp").Field.find(FieldTypeId="udp.header.length") - udp_len.Auto = False - udp_len.SingleValue = 80 - - udp_template = ixnetwork.Traffic.ProtocolTemplate.find(StackTypeId='^udp$') - ipv4_template = ce.Stack.find(TemplateName="ipv4-template.xml")[-1] - inner_udp = ce.Stack.read(ipv4_template.AppendProtocol(udp_template)) - trafficItem.Tracking.find()[0].TrackBy = ['trackingenabled0', 'sourceDestEndpointPair0'] - inn_sp = inner_udp.Field.find(DisplayName='^UDP-Source-Port') - inn_dp = inner_udp.Field.find(DisplayName='^UDP-Dest-Port') - inn_sp.Auto = False - inn_dp.Auto = False - inn_sp.SingleValue = 10000 - inn_dp.SingleValue = 10000 - ce_down=ce - - if name=="Allow": - config_elements_sets.append((ce_up,ce_down)) - - print ("Done") - #trafficItem.Generate() - print (datetime.now(),"*"*80) - return trafficItem - - - obj_map = {} - for k in testdata["val_map"].keys(): - obj_map[k] = deepcopy({}) - val_map = testdata["val_map"] - - print('connect to a test tool platform') - tb=testbed['stateless'][0] - - session_assistant = SessionAssistant( - IpAddress=tb['server'][0]['addr'], - RestPort=tb['server'][0]['rest'], - UserName=testbed["CR"][tb['server'][0]['addr']]['user'], - Password=testbed["CR"][tb['server'][0]['addr']]['password'], - SessionName="MIRTest", - ClearConfig=True - ) - - ixnetwork = session_assistant.Ixnetwork - - - portList = [{'xpath': '/vport[%s]' % str(indx+1), 'name': 'VTEP_0%d' % (indx+1), 'location': p['location']} for indx, p in enumerate(tb['tgen'][0]['interfaces'])] - ixnetwork.ResourceManager.ImportConfig(json.dumps(portList), False) - - vports = list(ixnetwork.Vport.find()) - l1data = tb['tgen'][0]['interfaces'] - tmp = [{'xpath': '/vport[%d]/l1Config/%s' % (vp.InternalId, vp.Type), "ieeeL1Defaults": l1data[indx]['ieee'] } for indx, vp in enumerate(vports)] - ixnetwork.ResourceManager.ImportConfig(json.dumps(tmp), False) - tmp = [{'xpath': '/vport[%d]/l1Config/%s' % (vp.InternalId, vp.Type), "enableAutoNegotiation": l1data[indx]['an']} for indx, vp in enumerate(vports)] - ixnetwork.ResourceManager.ImportConfig(json.dumps(tmp), False) - - tmp = [{'xpath': '/vport[%d]/l1Config/%s' % (vp.InternalId, vp.Type), "enableRsFec": l1data[indx]['fec'], "autoInstrumentation": "floating"} for indx, vp in enumerate(vports)] - ixnetwork.ResourceManager.ImportConfig(json.dumps(tmp), False) - for ed in [1, 2]: - # OUTER DG - obj_map[ed]["oeth"] = ixnetwork.Topology.add(Ports=vports[ed-1], Name="TG_%d" % ed).DeviceGroup.add(Name="O_DG_%d" % ed, Multiplier=1).Ethernet.add(Name='ETH_%d' % ed) - if ip_type=="v4": - obj_map[ed]["oipv4"] = obj_map[ed]["oeth"].Ipv4.add(Name="IPv4%d" % ed) - elif ip_type=="v6": - obj_map[ed]["oipv4"] = obj_map[ed]["oeth"].Ipv6.add(Name="IPv6%d" % ed) - - if val_map[ed]['underlay_routing']=="BGP": - if ip_type=="v4": - obj_map[ed]["obgp"] = obj_map[ed]["oipv4"].BgpIpv4Peer.add(Name="BGP_%d" % ed) - elif ip_type=="v6": - obj_map[ed]["obgp"] = obj_map[ed]["oipv4"].BgpIpv6Peer.add(Name="BGP_%d" % ed) - - # OUTER NG - ng = ixnetwork.Topology.find().DeviceGroup.find(Name="O_DG_%d" % ed).NetworkGroup.add(Name="NG_%d" % ed, Multiplier=val_map[ed]["oipv4pool"]["multiplier"]) - if ip_type=="v4": - obj_map[ed]["oipv4pool"] = ng.Ipv4PrefixPools.add(NumberOfAddresses='1') - elif ip_type=="v6": - obj_map[ed]["oipv4pool"] = ng.Ipv6PrefixPools.add(NumberOfAddresses='1') - - # DG Behing Outer NG - obj_map[ed]["dg_b_ong"] = ng.DeviceGroup.add(Name="DG_B_ONG_%d" % ed, Multiplier=1) - obj_map[ed]["dg_b_ong_eth"] = obj_map[ed]["dg_b_ong"].Ethernet.add(Name='ETH_%d' % ed) - if ip_type=="v4": - obj_map[ed]["dg_b_ong_ipv4"] = obj_map[ed]["dg_b_ong_eth"].Ipv4.add(Name='IPv4_%d' % ed) - obj_map[ed]["vxlan"] = obj_map[ed]["dg_b_ong_ipv4"].Vxlan.add(Name="VXLAN_%d" % ed) - elif ip_type=="v6": - obj_map[ed]["dg_b_ong_ipv4"] = obj_map[ed]["dg_b_ong_eth"].Ipv6.add(Name='IPv6_%d' % ed) - obj_map[ed]["vxlan"] = obj_map[ed]["dg_b_ong_ipv4"].Vxlanv6.add(Name="VXLAN_%d" % ed) - - - - # ALLOW & DENY - if ed==1: - if ip_type=="v4": - obj_map[ed]["iipv4_local"] = obj_map[ed]["dg_b_ong"].DeviceGroup.add(Name='Local',Multiplier=1).Ethernet.add().Ipv4.add() - elif ip_type=="v6": - obj_map[ed]["iipv4_local"] = obj_map[ed]["dg_b_ong"].DeviceGroup.add(Name='Local',Multiplier=1).Ethernet.add().Ipv6.add() - - obj_map[ed]["ieth_local"] = obj_map[ed]["iipv4_local"].parent - else: - if ip_type=="v4": - obj_map[ed]["iipv4_allow"] = obj_map[ed]["dg_b_ong"].DeviceGroup.add(Name='Allow',Multiplier=val_map[ed]["iipv4_allow"]["multiplier"]).Ethernet.add().Ipv4.add() - elif ip_type=="v6": - obj_map[ed]["iipv4_allow"] = obj_map[ed]["dg_b_ong"].DeviceGroup.add(Name='Allow',Multiplier=val_map[ed]["iipv4_allow"]["multiplier"]).Ethernet.add().Ipv6.add() - - obj_map[ed]["ieth_allow"] = obj_map[ed]["iipv4_allow"].parent - - if ip_type=="v4": - obj_map[ed]["iipv4_deny"] = obj_map[ed]["dg_b_ong"].DeviceGroup.add(Name='Deny',Multiplier=val_map[ed]["iipv4_deny"]["multiplier"]).Ethernet.add().Ipv4.add() - elif ip_type=="v6": - obj_map[ed]["iipv4_deny"] = obj_map[ed]["dg_b_ong"].DeviceGroup.add(Name='Deny',Multiplier=val_map[ed]["iipv4_deny"]["multiplier"]).Ethernet.add().Ipv6.add() - obj_map[ed]["ieth_deny"] = obj_map[ed]["iipv4_deny"].parent - - - for ed in [1, 2]: - # OUTER DG - obj_map[ed]["oeth"].Mac.Increment(start_value=val_map[ed]["oeth"]["mac"], step_value='00:00:00:00:00:01') - obj_map[ed]["oipv4"].Address.Increment(start_value=val_map[ed]["oipv4"]["ip"], step_value=val_map[ed]["oipv4"]["ip_step"]) - obj_map[ed]["oipv4"].GatewayIp.Increment(start_value=val_map[ed]["oipv4"]["gip"], step_value=val_map[ed]["oipv4"]["gip_step"]) - - - resolve_gateway = False - if val_map[ed]['underlay_routing']=="STATIC": - resolve_gateway = True - - obj_map[ed]["oipv4"].ResolveGateway.Single(resolve_gateway) - obj_map[ed]["oipv4"].ManualGatewayMac.Single(val_map[ed]["oipv4"]["mac"]) - - # BGP - if val_map[ed]['underlay_routing']=="BGP": - obj_map[ed]["obgp"].DutIp.Single(val_map[ed]["obgp"]["dip"]) - obj_map[ed]["obgp"].LocalAs2Bytes.Single(val_map[ed]["obgp"]["las"]) - if ip_type=="v4": - obj_map[ed]["obgp"].EnableBgpIdSameasRouterId.Single(True) - obj_map[ed]["obgp"].FilterIpV4Unicast.Single(True) - elif ip_type=="v6": - #obj_map[ed]["obgp"].EnableBgpIdSameasRouterId.Single(True)----------------------------> This gives an error - obj_map[ed]["obgp"].FilterIpV6Unicast.Single(True) - - obj_map[ed]["obgp"].FilterEvpn.Single(True) - - #obj_map[ed]["bgp"].IpVrfToIpVrfType = 'interfacefullWithUnnumberedCorefacingIRB' - #obj_map[ed]["bgp"].EthernetSegmentsCountV4 = 128 - - obj_map[ed]["obgp"].BgpId.Single(val_map[ed]["obgp"]["bid"]) - obj_map[ed]["obgp"].Type.Single('external') - - # OUTER NG - obj_map[ed]["oipv4pool"].NetworkAddress.Increment(start_value=val_map[ed]["oipv4pool"]["ip"], step_value=val_map[ed]["oipv4pool"]["ip_step"]) - obj_map[ed]["oipv4pool"].PrefixLength.Single(32) - ipv4_behindvxlan = obj_map[ed]["vxlan"].parent - ipv4_behindvxlan.Address.Increment(start_value=val_map[ed]["oipv4pool"]["ip"], step_value=val_map[ed]["oipv4pool"]["ip_step"]) - ipv4_behindvxlan.ResolveGateway.Single(False) - - # DG Behing Outer NG - # DG Behind Outer NG Ethernet - eth = obj_map[ed]["dg_b_ong_ipv4"].parent - eth.Mac.Increment(start_value=val_map[ed]["dg_b_ong_eth"]["mac"], step_value='00:00:00:00:00:01') - - # DG Behind Outer NG IPv4 - for s in obj_map[ed]["dg_b_ong_ipv4"].Address.Steps: - s.Enabled = False - obj_map[ed]["dg_b_ong_ipv4"].Address.Increment(start_value=val_map[ed]["dg_b_ong_ipv4"]["ip"], step_value=val_map[ed]["dg_b_ong_ipv4"]["ip_step"]) - obj_map[ed]["dg_b_ong_ipv4"].GatewayIp.Increment(start_value=val_map[ed]["dg_b_ong_ipv4"]["gip"], step_value=val_map[ed]["dg_b_ong_ipv4"]["gip_step"]) - obj_map[ed]["dg_b_ong_ipv4"].Prefix.Single(32) - - # VXLAN - obj_map[ed]["vxlan"].EnableStaticInfo = True - - if ip_type=="v4": - vxlan_sinfo=obj_map[ed]["vxlan"].VxlanStaticInfo - vxlan_sinfo.MacStaticConfig.Single(True) - remote_vtep_ip_obj = vxlan_sinfo.RemoteVtepIpv4 - remote_vm_mac = vxlan_sinfo.RemoteVmStaticMac - elif ip_type=="v6": - vxlan_sinfo=obj_map[ed]["vxlan"].VxlanIPv6StaticInfo - vxlan_sinfo.EnableManualRemoteVMMac.Single(True) - remote_vtep_ip_obj = vxlan_sinfo.RemoteVtepUnicastIpv6 - remote_vm_mac = vxlan_sinfo.RemoteVMMacAddress - - - - remote_vtep_ip_obj.Single(val_map[ed]["vxlan"]["RemoteVtepIpv4"]) - obj_map[ed]["vxlan"].Vni.Increment(start_value=val_map[ed]["vxlan"]["Vni"], step_value=1) - vxlan_sinfo.SuppressArp.Single(True) - obj_map[ed]["vxlan"].StaticInfoCount = val_map[ed]["vxlan"]["StaticInfoCount"] - - - # LOCAL | ALLOW & DENY - if ed==1: - - remote_vm_mac.Custom( - start_value=val_map[ed]["vxlan"]["RemoteVmStaticMac"]["start_value"], - step_value=val_map[ed]["vxlan"]["RemoteVmStaticMac"]["step_value"], - increments=val_map[ed]["vxlan"]["RemoteVmStaticMac"]["increments"] - ) - remote_vm_mac.Steps[0].Enabled = True - remote_vm_mac.Steps[0].Step = val_map[ed]["vxlan"]["RemoteVmStaticMac"]["ng_step"] - - vxlan_sinfo.RemoteVmStaticIpv4.Custom( - start_value=val_map[ed]["vxlan"]["RemoteVmStaticIpv4"]["start_value"], - step_value=val_map[ed]["vxlan"]["RemoteVmStaticIpv4"]["step_value"], - increments=val_map[ed]["vxlan"]["RemoteVmStaticIpv4"]["increments"] - ) - vxlan_sinfo.RemoteVmStaticIpv4.Steps[0].Enabled = True - vxlan_sinfo.RemoteVmStaticIpv4.Steps[0].Step = val_map[ed]["vxlan"]["RemoteVmStaticIpv4"]["ng_step"] - - - obj_map[ed]["ieth_local"].Mac.Increment(start_value=val_map[ed]["ieth_local"]["mac"], step_value=val_map[ed]["ieth_local"]["step"],) - obj_map[ed]["ieth_local"].Mac.Steps[1].Enabled=True - obj_map[ed]["ieth_local"].Mac.Steps[1].Step = '00:00:00:08:00:00' - - obj_map[ed]["iipv4_local"].Prefix.Single(8) - - obj_map[ed]["iipv4_local"].Address.Increment( start_value=val_map[ed]["iipv4_local"]["ip"], step_value=val_map[ed]["iipv4_local"]["ip_step"]) - obj_map[ed]["iipv4_local"].Address.Steps[1].Enabled=True - obj_map[ed]["iipv4_local"].Address.Steps[1].Step = val_map[ed]["iipv4_local"]["ip_ng1_step"] - - obj_map[ed]["iipv4_local"].GatewayIp.Increment(start_value=val_map[ed]["iipv4_local"]["gip"], step_value=val_map[ed]["iipv4_local"]["gip_step"]) - obj_map[ed]["iipv4_local"].GatewayIp.Steps[1].Enabled=True - obj_map[ed]["iipv4_local"].GatewayIp.Steps[1].Step = val_map[ed]["iipv4_local"]["gip_ng1_step"] - - - else: - - remote_vm_mac.Increment(start_value=val_map[ed]["vxlan"]["RemoteVmStaticMac"],step_value='00:00:00:00:00:01') - remote_vm_mac.Steps[0].Enabled =True - remote_vm_mac.Steps[0].Step = '00:00:00:08:00:00' - - #vxlan_sinfo.RemoteVmStaticIpv4.Increment(start_value=val_map[ed]["vxlan"]["RemoteVmStaticIpv4"],step_value='0.0.0.1') - vxlan_sinfo.RemoteVmStaticIpv4.Custom( - start_value=val_map[ed]["vxlan"]["RemoteVmStaticIpv4"]["start_value"], - step_value=val_map[ed]["vxlan"]["RemoteVmStaticIpv4"]["step_value"], - ) - - vxlan_sinfo.RemoteVmStaticIpv4.Steps[0].Enabled =True - vxlan_sinfo.RemoteVmStaticIpv4.Steps[0].Step = val_map[ed]["vxlan"]["RemoteVmStaticIpv4"]["ng_step"] - - eth_allow = obj_map[ed]["ieth_allow"] - ip_allow = obj_map[ed]["iipv4_allow"] - eth_deny = obj_map[ed]["ieth_deny"] - ip_deny = obj_map[ed]["iipv4_deny"] - - - eth_allow.Mac.Custom( - start_value=val_map[ed]["ieth_allow"]["mac"]["start_value"], - step_value =val_map[ed]["ieth_allow"]["mac"]["step_value"], - increments =val_map[ed]["ieth_allow"]["mac"]["increments"] - ) - - eth_allow.Mac.Steps[1].Enabled = True - eth_allow.Mac.Steps[1].Step = val_map[ed]["ieth_allow"]["mac"]["ng_step"] - - ip_allow.Address.Custom( - start_value=val_map[ed]["iipv4_allow"]["ip"]["start_value"], - step_value =val_map[ed]["iipv4_allow"]["ip"]["step_value"], - increments =val_map[ed]["iipv4_allow"]["ip"]["increments"] - ) - ip_allow.Address.Steps[1].Enabled = True - ip_allow.Address.Steps[1].Step = val_map[ed]["iipv4_allow"]["ip"]["ng_step"] - - ip_allow.Prefix.Single(8) - - ip_allow.GatewayIp.Increment(start_value=val_map[ed]["iipv4_allow"]["gip"], step_value=val_map[ed]["iipv4_allow"]["gip_step"]) #Fix Increments - ip_allow.GatewayIp.Steps[1].Enabled=True - ip_allow.GatewayIp.Steps[1].Step = val_map[ed]["iipv4_allow"]["gip_ng_step"] - - - eth_deny.Mac.Custom( - start_value=val_map[ed]["ieth_deny"]["mac"]["start_value"], - step_value =val_map[ed]["ieth_deny"]["mac"]["step_value"], - increments =val_map[ed]["ieth_deny"]["mac"]["increments"] - ) - eth_deny.Mac.Steps[1].Enabled = True - eth_deny.Mac.Steps[1].Step = val_map[ed]["ieth_deny"]["mac"]["ng_step"] - - ip_deny.Address.Custom( - start_value=val_map[ed]["iipv4_deny"]["ip"]["start_value"], - step_value =val_map[ed]["iipv4_deny"]["ip"]["step_value"], - increments =val_map[ed]["iipv4_deny"]["ip"]["increments"] - ) - - ip_deny.Address.Steps[1].Enabled = True - ip_deny.Address.Steps[1].Step = val_map[ed]["iipv4_deny"]["ip"]["ng_step"] - - ip_deny.Prefix.Single(8) - - - ip_deny.GatewayIp.Increment(start_value=val_map[ed]["iipv4_deny"]["gip"], step_value=val_map[ed]["iipv4_deny"]["gip_step"]) #Fix Increments - ip_deny.GatewayIp.Steps[1].Enabled=True - ip_deny.GatewayIp.Steps[1].Step = val_map[ed]["iipv4_deny"]["gip_ng_step"] - - print("Create Traffic OneIPOneVPC") - if ip_type=="v4": - ipv4_local = ixnetwork.Topology.find().DeviceGroup.find().NetworkGroup.find().DeviceGroup.find().DeviceGroup.find(Name="Local").Ethernet.find().Ipv4.find() - ipv4_allow = ixnetwork.Topology.find().DeviceGroup.find().NetworkGroup.find().DeviceGroup.find().DeviceGroup.find(Name="Allow").Ethernet.find().Ipv4.find() - ipv4_deny = ixnetwork.Topology.find().DeviceGroup.find().NetworkGroup.find().DeviceGroup.find().DeviceGroup.find(Name="Deny").Ethernet.find().Ipv4.find() - elif ip_type=="v6": - ipv4_local = ixnetwork.Topology.find().DeviceGroup.find().NetworkGroup.find().DeviceGroup.find().DeviceGroup.find(Name="Local").Ethernet.find().Ipv6.find() - ipv4_allow = ixnetwork.Topology.find().DeviceGroup.find().NetworkGroup.find().DeviceGroup.find().DeviceGroup.find(Name="Allow").Ethernet.find().Ipv6.find() - ipv4_deny = ixnetwork.Topology.find().DeviceGroup.find().NetworkGroup.find().DeviceGroup.find().DeviceGroup.find(Name="Deny").Ethernet.find().Ipv6.find() - print("Create Traffic OneIPOneVPC") - - vpcs, ips = val_map[1]["oipv4pool"]["multiplier"], int(val_map[1]["vxlan"]["StaticInfoCount"]/2) - endpoints_allow,endpoints_deny=[], [] - - for vpc in range(vpcs): - endpoints_allow.append( - ( - deepcopy([{"arg1": ipv4_local.href,"arg2": 1,"arg3": 1,"arg4": vpc+1,"arg5": 1 }]), - deepcopy([{"arg1": ipv4_allow.href,"arg2": 1,"arg3": 1,"arg4": vpc*ips+1,"arg5": ips }]) - ) - ) - endpoints_deny.append( - ( - deepcopy([{"arg1": ipv4_local.href,"arg2": 1, "arg3": 1, "arg4": vpc+1, "arg5": 1 }]), - deepcopy([{"arg1": ipv4_deny.href ,"arg2": 1, "arg3": 1, "arg4": vpc*ips+1, "arg5": ips }]) - ) - ) - - ti_allow = createTI("Allow", endpoints_allow) - ti_deny = createTI("Deny", endpoints_deny) - - -#@pytest.mark.usefixtures("pps_config") -class Test_Dpu: - - def teardown_method(self, method): - print("Clean up configuration") - - def test_pps_001(self, setup, utils): - print('Start All Protocols test_pps_001') - ixnetwork.StartAllProtocols(Arg1='sync') - - try: - print('Verify protocol sessions') - protocolsSummary = StatViewAssistant(ixnetwork, 'Protocols Summary') - protocolsSummary.CheckCondition('Sessions Not Started', StatViewAssistant.EQUAL, 0) - protocolsSummary.CheckCondition('Sessions Down', StatViewAssistant.EQUAL, 0) - except Exception as e: - raise Exception(str(e)) - time.sleep(90) - - ti_allow = ixnetwork.Traffic.TrafficItem.find(Name="Allow") - ti_deny = ixnetwork.Traffic.TrafficItem.find(Name="Deny") - ti_allow.Generate() - ti_deny.Generate() - ixnetwork.Traffic.Apply() - utils.start_traffic(ixnetwork) - time.sleep(30) - utils.stop_traffic(ixnetwork) - - find_boundary(utils) - print(tabulate(final_result_data, headers=["Test","Max Possible PPS"], tablefmt="psql")) - - def test_pps_increment_udp(self, setup, utils): - - print('Start All Protocols test_pps_random_udp_src_dst') - ixnetwork.StartAllProtocols(Arg1='sync') - try: - print('Verify protocol sessions') - protocolsSummary = StatViewAssistant(ixnetwork, 'Protocols Summary') - protocolsSummary.CheckCondition('Sessions Not Started', StatViewAssistant.EQUAL, 0) - protocolsSummary.CheckCondition('Sessions Down', StatViewAssistant.EQUAL, 0) - except Exception as e: - raise Exception(str(e)) - - trafficItem = ixnetwork.Traffic.TrafficItem.find(Name="Deny") - if len(trafficItem)==1: - trafficItem.Enabled=False - ti_allow = ixnetwork.Traffic.TrafficItem.find(Name="Allow") - vm_start_value=9000 - host_start_value=10000 - host_step = 5000 - endpoint_sets = ti_allow.EndpointSet.find() - #for ep_up,ep_down in endpoint_sets: - for ce_up,ce_down in config_elements_sets: - print (ce_up,ce_down) - inner_udp = ce_up.Stack.find(TemplateName="udp-template.xml")[-1] - inn_sp = inner_udp.Field.find(DisplayName='^UDP-Source-Port') - inn_dp = inner_udp.Field.find(DisplayName='^UDP-Dest-Port') - inn_sp.ValueType = "singleValue" - inn_dp.ValueType = "increment" - inn_sp.SingleValue = vm_start_value - inn_dp.StartValue = host_start_value - inn_dp.StepValue = 1 - inn_dp.CountValue = int(val_map[1]["vxlan"]["StaticInfoCount"]/2) - - - inner_udp = ce_down.Stack.find(TemplateName="udp-template.xml")[-1] - inn_sp = inner_udp.Field.find(DisplayName='^UDP-Source-Port') - inn_dp = inner_udp.Field.find(DisplayName='^UDP-Dest-Port') - inn_sp.ValueType = "increment" - inn_dp.ValueType = "singleValue" - inn_dp.SingleValue = vm_start_value - inn_sp.StartValue = host_start_value - inn_sp.StepValue = 1 - inn_sp.CountValue = int(val_map[1]["vxlan"]["StaticInfoCount"]/2) - - - - vm_start_value+=1 - host_start_value=host_start_value+host_step - - ti_allow.Generate() - ixnetwork.Traffic.Apply() - utils.start_traffic(ixnetwork) - time.sleep(30) - utils.stop_traffic(ixnetwork) - - find_boundary(utils) - print(tabulate(final_result_data, headers=["Test","Max Possible PPS"], tablefmt="psql")) - - def test_cps_001(self, setup, create_ixload_session_url): - """ - Description: Verify ip address can be configured in SVI. - Topo: DUT02 ============ DUT01 - Dev. status: DONE - """ - def _patch_test_setting(url_patch_dict, setting): - - url = url_patch_dict['base_url'] + url_patch_dict[setting]['url'] - - return requests.patch(url, json=url_patch_dict[setting]['json']) - - def _get_timeline_link(timelines, timeline_key): - - link = "" - link_test = "" - - for elem in timelines: - if elem['name'] in timeline_key: - link_init = elem['links'][0]['href'] - link_init_list = link_init.split("/") - link_init_list.pop(len(link_init_list) - 1) - link_test = '/'.join(link_init_list) - - shaved = link_test.split("/") - for i in range(5): - shaved.pop(0) - shaved.insert(0, "") - link = "/".join(shaved) - - return link - - def _set_timeline_settings(test_settings, rampDownTime, sustainTime): - - timeline_url = 'http://' + test_settings.gatewayServer + ":{}".format( - test_settings.gatewayPort) + '/api/v1/' + session_url + '/ixload/test/activeTest/timelineList' - response = requests.get(timeline_url, headers=headers) - timelines = response.json() - - timeline1_url = 'http://' + test_settings.gatewayServer + ":{}".format( - test_settings.gatewayPort) + '/api/v1/' + session_url + \ - _get_timeline_link(timelines, "Timeline1") - timeline1_settings = {"rampDownTime": rampDownTime, "sustainTime": sustainTime} - requests.patch(timeline1_url, json=timeline1_settings) - - timeline2_url = 'http://' + test_settings.gatewayServer + ":{}".format( - test_settings.gatewayPort) + '/api/v1/' + session_url + \ - _get_timeline_link(timelines, "Timeline2") - timeline2_settings = {"rampDownTime": rampDownTime, "sustainTime": sustainTime} - requests.patch(timeline2_url, json=timeline2_settings) - - timeline_matchLongest_url = 'http://' + test_settings.gatewayServer + ":{}".format( - test_settings.gatewayPort) + '/api/v1/' + session_url + \ - _get_timeline_link(timelines, "") - matchLongest_settings = {"sustainTime": sustainTime} - requests.patch(timeline_matchLongest_url, json=matchLongest_settings) - - return - - def _getTestCurrentState(connection, sessionUrl): - - activeTestUrl = "%s/ixload/test/activeTest" % (sessionUrl) - testObj = connection.httpGet(activeTestUrl) - - return testObj.currentState - - def _print_final_table(test_run_results): - stat_table = [] - stat_columns = ["It", "Obtained CPS", "HTTP Requests Failed", "TCP Retries", - "TCP Resets TX", "TCP Resets RX"] - for iter in test_run_results: - stat_table.append(iter) - print("\n%s" % tabulate(stat_table, headers=stat_columns, tablefmt='psql', floatfmt=".2f")) - - def _poll_stats(connection, sessionUrl, watchedStatsDict, pollingInterval=4): - - statSourceList = list(watchedStatsDict) - - # retrieve stats for a given stat dict - # all the stats will be saved in the dictionary below - - # statsDict format: - # { - # statSourceName: { - # timestamp: { - # statCaption : value - # } - # } - # } - stats_dict = {} - - # remember the timstamps that were already collected - will be ignored in future - collectedTimestamps = {} # format { statSource : [2000, 4000, ...] } - testIsRunning = True - - # check stat sources - for statSource in statSourceList[:]: - statSourceUrl = "%s/ixload/stats/%s/values" % (sessionUrl, statSource) - statSourceReply = connection.httpRequest("GET", statSourceUrl) - if statSourceReply.status_code != 200: - statSourceList.remove(statSource) - - # check the test state, and poll stats while the test is still running - while testIsRunning: - - # the polling interval is configurable. by default, it's set to 4 seconds - time.sleep(pollingInterval) - - for statSource in statSourceList: - valuesUrl = "%s/ixload/stats/%s/values" % (sessionUrl, statSource) - - valuesObj = connection.httpGet(valuesUrl) - valuesDict = valuesObj.getOptions() - - # get just the new timestamps - that were not previously retrieved in another stats polling iteration - newTimestamps = [int(timestamp) for timestamp in list(valuesDict) if - timestamp not in collectedTimestamps.get(statSource, [])] - newTimestamps.sort() - - for timestamp in newTimestamps: - timeStampStr = str(timestamp) - - collectedTimestamps.setdefault(statSource, []).append(timeStampStr) - - timestampDict = stats_dict.setdefault(statSource, {}).setdefault(timestamp, {}) - - # save the values for the current timestamp, and later print them - for caption, value in iteritems(valuesDict[timeStampStr].getOptions()): - if caption in watchedStatsDict[statSource]: - timestampDict[caption] = value - stat_table_row = [] - for table_row in timestampDict.keys(): - stat_table_row.append(table_row) - table = [] - columns = ['Stat Source', 'Time Stamp', 'Stat Name', 'Value'] - for i, stat in enumerate(stat_table_row): - table.append([statSource, timeStampStr, stat, timestampDict[stat]]) - # print("\n%s" % tabulate(table, headers=columns, tablefmt='psql')) - - testIsRunning = _getTestCurrentState(connection, sessionUrl) == "Running" - - print("Stopped receiving stats.") - return stats_dict - - def _get_stats_global(stats_dict): - stats_global = [] - - for key in stats_dict['HTTPClient'].keys(): - if key in stats_dict['HTTPClient'] and key in stats_dict['HTTPServer']: - stats_global.append([key, stats_dict['HTTPClient'][key]['HTTP Simulated Users'], - stats_dict['HTTPClient'][key]['HTTP Concurrent Connections'], - stats_dict['HTTPClient'][key]['TCP CPS'], - stats_dict['HTTPClient'][key]['HTTP Connect Time (us)'], - stats_dict['HTTPServer'][key]['HTTP Requests Failed'], - stats_dict['HTTPServer'][key]['TCP Retries'], - stats_dict['HTTPServer'][key]['TCP Resets Sent'], - stats_dict['HTTPServer'][key]['TCP Resets Received']]) - - return stats_global - - def _check_for_error_stats(test_stats, error_type): - - error_dict = { - error_type: { - "first_time": 0, - "last_time": 0, - "num_of_seq_timestamps": 0 - } - } - - timestamps_l = [i[0] for i in test_stats] - errors_l = [i[1] for i in test_stats] - seen = set() - dupes = {} - - first_time = 0 - for i, x in enumerate(errors_l): - if x in seen: - dupes.setdefault(x, []).append(i) - else: - seen.add(x) - - # insert timestamp index location at beginning of list - for key in dupes.keys(): - dupes[key].insert(0, dupes[key][0] - 1) - - # make list of lens of each duplicates, then remove and remove rest of error entries from dupes dict - errors_l = [len(dupes[x]) for x in dupes.keys()] - max_index = errors_l.index(max(errors_l)) - errors_l.pop(max_index) - - # keep only the highest number of stable - for i, key in enumerate(list(dupes)): - if i != max_index: - dupes.pop(key, None) - - for key in dupes.keys(): - error_dict[error_type]["first_time"] = dupes[key][0] - error_dict[error_type]["last_time"] = dupes[key][-1] - - if list(dupes.keys())[0] != 0: - error_dict[error_type]["num_of_seq_timestamps"] = len(dupes[key]) - else: - error_dict[error_type]["num_of_seq_timestamps"] = 0 - - return error_dict - - def _get_max_cps(test_stats, cps_stats): - - cps_list = [] - for cps in cps_stats: - cps_list.append(cps[1]) - - stats = deepcopy(cps_list) - for i, elem in enumerate(stats): - if elem == '""': - stats[i] = 0 - - stats.sort() - max_cps = stats[-1] - cps_max_w_ts = cps_stats[cps_list.index(max_cps)] - - return cps_max_w_ts - - def _get_effective_cps(cps_stats, http_requests_dict, tcp_retries_dict, tcp_resets_tx_dict, tcp_resets_rx_dict): - - error_list = [http_requests_dict, tcp_retries_dict, tcp_resets_tx_dict, tcp_resets_rx_dict] - num_of_timestamps = len(cps_stats) - - seq_l = [list(x.values())[0]["num_of_seq_timestamps"] for x in error_list] - error_list[seq_l.index(max(seq_l))] - key = list(error_list[seq_l.index(max(seq_l))].keys())[0] - first_time = error_list[seq_l.index(max(seq_l))][key]["first_time"] - last_time = error_list[seq_l.index(max(seq_l))][key]["last_time"] - - effective_cps_ts = { - "first_time": cps_stats[first_time][0], - "last_time": cps_stats[last_time][0] - } - - if max(seq_l) != 0: - avg = 0 - effective_cps_l = [] - for i, cps in enumerate(cps_stats): - if i >= first_time and i <= last_time: - effective_cps_l.append(cps) - avg += cps[1] - effective_cps = avg / error_list[seq_l.index(max(seq_l))][key]["num_of_seq_timestamps"] - else: - effective_cps = 0 - effective_cps_ts = {"first_time": 0, "last_time": cps_stats[last_time][0]} - - return effective_cps, effective_cps_ts - - def _get_latency_ranges(test_stats): - - latency_stats = { - "latency_min": 0, - "latency_max": 0, - "latency_avg": 0 - } - - only_lat_stats = [] - for lat_stat in test_stats: - if lat_stat[4] == '""': - lat_stat[4] = 0 - only_lat_stats.append(lat_stat[4]) - - latency_stats["latency_min"] = min(only_lat_stats) - latency_stats["latency_max"] = max(only_lat_stats) - - lat_addr = 0 - for elem in only_lat_stats: - lat_addr += elem - - latency_stats["latency_avg"] = lat_addr / len(only_lat_stats) - - return latency_stats - - def _get_testrun_results(stats_dict, url_patch_dict): - - stats_global = _get_stats_global(stats_dict) - - failures_dict = {"http_requests_failed": 0, "tcp_retries": 0, "tcp_resets_tx": 0, - "tcp_resets_rx": 0, "total": 0} - - # get and compare stats - http_requests_failed_l = [[x[0], x[5]] for x in stats_global] - http_requests_failed = max([x[1] for x in http_requests_failed_l]) - failures_dict["http_requests_failed"] = http_requests_failed - #http_requests_dict = _check_for_error_stats(http_requests_failed_l, "http_requests_failed") - - tcp_retries_l = [[x[0], x[6]] for x in stats_global] - tcp_retries = max([x[1] for x in tcp_retries_l]) - failures_dict["tcp_retries"] = tcp_retries - #tcp_retries_dict = _check_for_error_stats(tcp_retries_l, "tcp_retries") - - tcp_resets_tx_l = [[x[0], x[7]] for x in stats_global] - tcp_resets_tx = max([x[1] for x in tcp_resets_tx_l]) - failures_dict["tcp_resets_tx"] = tcp_resets_tx - #tcp_resets_tx_dict = _check_for_error_stats(tcp_resets_tx_l, "tcp_resets_tx") - - tcp_resets_rx_l = [[x[0], x[8]] for x in stats_global] - tcp_resets_rx = max([x[1] for x in tcp_resets_rx_l]) - failures_dict["tcp_resets_rx"] = tcp_resets_rx - #tcp_resets_rx_dict = _check_for_error_stats(tcp_resets_rx_l, "tcp_resets_rx") - - failures = http_requests_failed + tcp_retries + tcp_resets_tx + tcp_resets_rx - failures_dict["total"] = failures - - steady_time_start = url_patch_dict['timeline_settings']['advancedIteration']['d0'] * 1000 - cps_stats = [[x[0], x[3]] for x in stats_global if x[0] >= steady_time_start] - cps_max_w_ts = _get_max_cps(stats_global, cps_stats) - cps_max = cps_max_w_ts[1] - #effective_cps, effective_cps_ts = _get_effective_cps(cps_stats, http_requests_dict, tcp_retries_dict, - # tcp_resets_tx_dict, tcp_resets_rx_dict) - - latency_ranges = _get_latency_ranges(stats_global) - - return failures_dict, cps_max, cps_max_w_ts, latency_ranges - - def _print_stat_table(cps_max_w_ts, failures_dict, latency_ranges): - - stat_table = [] - stat_columns = ["Timestamp (s)", "TCP Max CPS", "Total Failures"] - stat_table.append([int(cps_max_w_ts[0]) / 1000, int(cps_max_w_ts[1]), failures_dict["total"]]) - - stat_f_table = [] - stat_f_columns = ["HTTP Requests Failed", "TCP Retries", "TCP Resets TX", "TCP Resets RX"] - stat_f_table.append([failures_dict["http_requests_failed"], failures_dict["tcp_retries"], - failures_dict["tcp_resets_tx"], failures_dict["tcp_resets_rx"]]) - - lat_table = [] - lat_table.append( - [latency_ranges["latency_min"], latency_ranges["latency_max"], latency_ranges["latency_avg"]] - ) - lat_stat_columns = ["Connect Time min (us)", "Connect Time max (us)", "Connect Time avg (us)"] - - print("\n%s" % tabulate(stat_table, headers=stat_columns, tablefmt='psql')) - print("\n%s" % tabulate(stat_f_table, headers=stat_f_columns, tablefmt='psql')) - print("\n%s" % tabulate(lat_table, headers=lat_stat_columns, tablefmt='psql')) - - def _run_cc_test(connection, session_url, url_patch_dict, MAX_CPS, MIN_CPS, - threshold, target_failures, test_settings, start_value=0): - - test_run_results = [] - test_value = start_value - test_iteration = 1 - - test_result = "" - IxLoadUtils.log( - "----Test Iteration %d------------------------------------------------------------------" - % test_iteration) - old_value = test_value - IxLoadUtils.log("Testing CC Objective = %d" % test_value) - kActivityOptionsToChange = { - # format: { activityName : { option : value } } - "HTTPClient1": { - "userIpMapping": "1:ALL", - "enableConstraint": False, - "userObjectiveType": "concurrentConnections", - "userObjectiveValue": int(test_value), - } - } - IxLoadUtils.log("Updating CPS objective value settings...") - IxLoadUtils.changeActivityOptions(connection, session_url, kActivityOptionsToChange) - IxLoadUtils.changeActivityOptions(connection, session_url, kActivityOptionsToChange) - IxLoadUtils.log("CPS objective value updated.") - - IxLoadUtils.log("Saving rxf") - IxLoadUtils.saveRxf(connection, session_url, "C:\\automation\\24k_8VPC_CC_{}.rxf".format(test_iteration)) - - IxLoadUtils.log("Applying config...") - IxLoadUtils.applyConfiguration(connection, session_url) - - IxLoadUtils.log("Starting the test...") - IxLoadUtils.runTest(connection, session_url) - IxLoadUtils.log("Test started.") - - IxLoadUtils.log("Test running and extracting stats...") - stats_dict = _poll_stats(connection, session_url, stats_test_settings) - IxLoadUtils.log("Test finished.") - - failures_dict, cps_max, cps_max_w_ts, latency_ranges = _get_testrun_results(stats_dict, url_patch_dict) - - _print_stat_table(cps_max_w_ts, failures_dict, latency_ranges) - - test_run_results.append( - [test_iteration, cps_max, failures_dict["http_requests_failed"], - failures_dict["tcp_retries"], failures_dict["tcp_resets_tx"], - failures_dict["tcp_resets_rx"]] - ) - - return cps_max_w_ts, failures_dict, test_run_results, latency_ranges - - def _create_ip_ranges(connection, session_url, traffic_network, plugin_name): - - IxLoadUtils.HttpUtils.addIpRange(connection, session_url, traffic_network, - plugin_name, {"ipType": "IPv4"}) - - def _get_ip_range_names(connection, session_url, traffic_network, plugin_names, url_patch_dict): - - ip_range_names = [] - range_string = IxLoadUtils.HttpUtils.getRangeListUrl(connection, session_url, traffic_network, plugin_names, - "rangeList") - string_split = range_string.split("/") - range_url = "/" + "/".join(string_split[2:]) - url = url_patch_dict["base_url"] + range_url - - response = requests.get(url, params=None) - range_list_info = response.json() - - for elem in range_list_info: - ip_range_names.append(elem['name']) - - return ip_range_names, range_list_info - - def _create_traffic_map(connection, url_patch_dict, nsgs, enis, ip_ranges_per_vpc): - # Make Traffic Map Settings - - portMapPolicy_json = {'portMapPolicy': 'customMesh'} - destinations_url = url_patch_dict['base_url'] + url_patch_dict['traffic_maps']['destinations_url'] - response = requests.patch(destinations_url, json=portMapPolicy_json) - - # meshType - submapsIPv4_url = url_patch_dict['base_url'] + url_patch_dict['traffic_maps']['subMapsIPv4_url'] - meshType_json = url_patch_dict['traffic_maps']['meshType_setting'] - response = requests.patch(submapsIPv4_url, json=meshType_json) - - # map source-to-destination - sourceRanges_url = submapsIPv4_url + "/sourceRanges/%s" - destId = 1 - if url_patch_dict['traffic_maps']['meshType_setting']['meshType'] == 'ipRangePairs': - ip_count = 0 - for i in range(nsgs): - destinationId_json = {'destinationId': destId} - url = sourceRanges_url % (i) - response = requests.patch(url, json=destinationId_json) - ip_count += 1 - if ip_count == ip_ranges_per_vpc: - destId += 1 - ip_count = 0 - else: - # vlanRangePairs meshType - for i in range(enis): - destinationId_json = {'destinationId': destId} - url = sourceRanges_url % (i) - response = requests.patch(url, json=destinationId_json) - destId += 1 - - # destinationRanges - destRanges_json = {'enable': False} - destinationRanges_url = url_patch_dict['base_url'] + "/destinationRanges/%s" - for i in range(enis): - url = destinationRanges_url % (i) - if i == 0: - response = requests.patch(url, json=destRanges_json) - - return - - def _build_node_ips(count, vpc, nodetype="client"): - IP_STEP1 = int(ipaddress.ip_address(u'0.0.0.1')) - IP_STEP2 = int(ipaddress.ip_address(u'0.0.1.0')) - IP_STEP3 = int(ipaddress.ip_address(u'0.1.0.0')) - IP_STEP4 = int(ipaddress.ip_address(u'1.0.0.0')) - IP_STEPE = int(ipaddress.ip_address(u'0.0.0.2')) - IP_C_START = ipaddress.ip_address(u'1.128.0.1') - IP_S_START = ipaddress.ip_address(u'1.1.0.1') - - if nodetype in "client": - ip = ipaddress.ip_address(int(IP_C_START) + (IP_STEP3 * count * 4) + (IP_STEP4 * (vpc - 1))) - - if nodetype in "server": - ip = ipaddress.ip_address(int(IP_S_START) + (IP_STEP4 * (vpc - 1))) - - return ip - - def _set_ip_range_options(ip_count, eni_index, nodetype): - - if nodetype in "client": - host_count = 500 - incrementBy = "0.0.2.0" - else: - host_count = 1 - incrementBy = "0.0.0.2" - - ip = str(_build_node_ips(ip_count, eni_index, nodetype)) - - IpOptionsToChange = {'count': host_count, 'ipAddress': ip, 'prefix': 8, 'incrementBy': incrementBy, - 'gatewayAddress': "0.0.0.0", 'gatewayIncrement': '0.0.0.0'} - - - return IpOptionsToChange - - def _build_node_macs(count, vpc, nodetype="client"): - ENI_MAC_STEP = '00:00:00:08:00:00' - mac_start_client = macaddress.MAC('00:1B:6E:80:00:01') - mac_start_server = macaddress.MAC('00:1B:6E:00:00:01') - mac_incr1 = macaddress.MAC('00:00:00:01:00:00') - mac_incr3 = macaddress.MAC('00:00:00:03:00:00') - - if nodetype in "client": - m = macaddress.MAC(int(mac_start_client) + int(macaddress.MAC(ENI_MAC_STEP)) * (vpc - 1) + (int(mac_incr1) * count)) - - if nodetype in "server": - m = macaddress.MAC(int(mac_start_server) + int(macaddress.MAC(ENI_MAC_STEP)) * (vpc - 1)) - - return m - - def _set_mac_range_options(ip_count=0, eni_index=0, nodetype="client"): - - if nodetype in "client": - mac_increment = "00:00:00:00:00:80" - else: - mac_increment = "00:00:00:00:00:02" - - mac_address = str(_build_node_macs(ip_count, eni_index, nodetype)) - mac_address = mac_address.replace("-", ":") - - macOptionsToChange = {"mac": mac_address, "incrementBy": mac_increment} - - return macOptionsToChange - - def _set_vlan_range_options(url_patch_dict, index, nodetype="client"): - - if nodetype == 'client': - firstId = url_patch_dict['client_vlan_settings']['json']['firstId'] + index - uniqueCount = url_patch_dict['client_vlan_settings']['json']['uniqueCount'] - else: - firstId = url_patch_dict['server_vlan_settings']['json']['firstId'] + index - uniqueCount = url_patch_dict['server_vlan_settings']['json']['uniqueCount'] - - vlan_settings = {'firstId': firstId, 'uniqueCount': uniqueCount} - - return vlan_settings - - def _get_url_ip(nodetype, node_ip_range_names, index): - - if nodetype == "client": - range_url = url_patch_dict['client_range_setting']['url'] - else: - range_url = url_patch_dict['server_range_setting']['url'] - - r_index = node_ip_range_names[index].split("-")[1][1:] - url_ip = url_patch_dict['base_url'] + range_url % (r_index) - - return url_ip - - # MAIN - kCommunities = [ - # format: {option1: value1, option2: value2} - {}, # default community with no options - {"tcpAccelerationAllowedFlag": True}, # community with tcpAccelerationAllowedFlag set to True - ] - - kActivities = { - 'Traffic1@Network1': ['HTTP Client'], - 'Traffic2@Network2': ['HTTP Server'] - } - - kNewCommands = { - # format: { agent name : [ { field : value } ] } - "HTTPClient1": [ - { - "commandType": "GET", - "destination": "Traffic2_HTTPServer1:80", - "pageObject": "/1b.html", - }, - ], - } - - stats_test_settings = { - 'HTTPClient': ['HTTP Simulated Users', - 'HTTP Concurrent Connections', - 'TCP CPS', - 'HTTP Connect Time (us)', - ], - 'HTTPServer': ['HTTP Requests Failed', - 'TCP Retries', - 'TCP Resets Sent', - 'TCP Resets Received', - ], - } - - stats_dict = {} - location = inspect.getfile(inspect.currentframe()) - - session = create_ixload_session_url - connection = session['connection'] - test_settings = session['test_settings'] - - headers = {'Accept': 'application/json'} - session_url = IxLoadUtils.createNewSession(connection, test_settings.ixLoadVersion) - base_url = 'http://' + test_settings.gatewayServer + ":{}".format(test_settings.gatewayPort) + \ - '/api/v1/' + session_url - - url_patch_dict = { - 'base_url': base_url, - 'traffic_maps': { - 'meshType_setting': {'meshType': "vlanRangePairs"}, - #'meshType_setting': {'meshType': "ipRangePairs"}, - 'subMapsIPv4_url': "/ixload/test/activeTest/communityList/0/activityList/0/destinations/0/customPortMap/submapsIPv4/0", - 'destinations_url': "/ixload/test/activeTest/communityList/0/activityList/0/destinations/0" - }, - 'allow_routes': { - 'json': {"allowRouteConflicts": True}, - 'url': "/ixload/preferences" - }, - 'auto_mac_setting': { - "autoMacGeneration": False - }, - 'timeline_settings': { - 'timelineType': 1, - 'url': "/ixload/test/activetest/communitylist/0/activitylist/0/timeline", - 'advanced': { - 'rampUpValue': 1000000, - 'sustainTime': 240, - }, - 'advancedIteration': { - 'd0': 120, - 'd1': 150, - 'd2': 10, - 'd3': 10, - } - }, - 'client_range_setting': { - 'json': {}, - 'url': "/ixload/test/activeTest/communityList/0/network/stack/childrenList/2/childrenList/3/rangeList/%s" - }, - 'server_range_setting': { - 'json': {}, - 'url': "/ixload/test/activeTest/communityList/1/network/stack/childrenList/5/childrenList/6/rangeList/%s" - }, - 'client_vlan_settings': { - 'json': {"firstId": 101, "uniqueCount": 1}, - 'url': "/ixload/test/activeTest/communityList/0/network/stack/childrenList/2/childrenList/3/rangeList/%s/vlanRange" - }, - 'server_vlan_settings': { - 'json': {"firstId": 1, "uniqueCount": 1}, - 'url': "/ixload/test/activeTest/communityList/1/network/stack/childrenList/5/childrenList/6/rangeList/%s/vlanRange" - }, - 'http_version': { - 'json': {"httpVersion": 1}, - 'url': "/ixload/test/activeTest/communityList/0/activityList/0/agent" - }, - 'http_tcp_conns_per_user': { - 'json': {"maxSessions": 48}, - 'url': "/ixload/test/activeTest/communityList/0/activityList/0/agent" - }, - 'client_disable_tcp_tw_recycle': { - 'json': {"tcp_tw_recycle": False}, - 'url': "/ixload/test/activeTest/communityList/0/network/globalPlugins/2" - }, - 'server_disable_tcp_tw_recycle': { - 'json': {"tcp_tw_recycle": False}, - 'url': "/ixload/test/activeTest/communityList/1/network/globalPlugins/5" - }, - 'stats_configured': { - 'url': '/ixload/stats/HTTPClient/configuredStats' - }, - 'cps_aggregation_type': { - 'json': {"aggregationType": "kRate"}, - 'url': "" - }, - 'cps_stat_caption': { - 'json': {"caption": "TCP CPS"}, - 'url': "" - } - } - - enis = 8 - ip_ranges_per_vpc = 6 - num_ranges = enis - nsgs = enis * ip_ranges_per_vpc - - IxLoadUtils.log('Creating communities...') - IxLoadUtils.addCommunities(connection, session_url, kCommunities) - IxLoadUtils.log('Communities created.') - - IxLoadUtils.log('Creating activities..') - IxLoadUtils.addActivities(connection, session_url, kActivities) - IxLoadUtils.log('Activities created..') - - IxLoadUtils.log("Enabling Forceful Ownership of Ports") - IxLoadUtils.enableForcefullyTakeOwnershipAndResetPorts(connection, session_url) - IxLoadUtils.log("Forceful Ownership Complete") - - response = _patch_test_setting(url_patch_dict, 'allow_routes') - - IxLoadUtils.log("Clearing commands %s..." % (list(kNewCommands))) - IxLoadUtils.clearAgentsCommandList(connection, session_url, list(kNewCommands)) - IxLoadUtils.log("Command lists cleared.") - - IxLoadUtils.log("Adding IPv4 ranges ...") - # Create Client and Server IP Ranges - for _ in range(nsgs): - _create_ip_ranges(connection, session_url, "Traffic1@Network1", "IP-1") - - for _ in range(enis): - _create_ip_ranges(connection, session_url, "Traffic2@Network2", "IP-2") - - # Get Client/Server IP range info - client_ip_range_names, client_range_list_info = _get_ip_range_names(connection, session_url, - "Traffic1@Network1", "IP-1", url_patch_dict) - server_ip_range_names, server_range_list_info = _get_ip_range_names(connection, session_url, - "Traffic2@Network2", "IP-2", url_patch_dict) - - IxLoadUtils.log("Disabling autoMacGeneration ...") - for i in range(nsgs): - url_ip = _get_url_ip("client", client_ip_range_names, i) - response = requests.patch(url_ip, json=url_patch_dict['auto_mac_setting']) - #response = self.make_request('PATCH', url_ip, url_patch_dict['auto_mac_setting']) - - for i in range(enis): - url_ip = _get_url_ip("server", server_ip_range_names, i) - response = requests.patch(url_ip, json=url_patch_dict['auto_mac_setting']) - #response = self.make_request('PATCH', url_ip, url_patch_dict['auto_mac_setting']) - - vlan_enabled = {"enabled": True} - - IxLoadUtils.log("Creating Client IPs, MACs, and VLANIDs") - client_ip_range_settings = [] - client_mac_range_settings = [] - client_vlan_range_settings = [] - eni_index = 1 - ip_count = 0 - nodetype = "client" - # Build Client IPs and MACs - for i in range(nsgs + 1 + ip_ranges_per_vpc): - if ip_count < ip_ranges_per_vpc and eni_index <= enis: - # --- ixNet objects need to be added in the list before they are configured. - client_ip_range_settings.append(_set_ip_range_options(ip_count, eni_index, nodetype)) - client_mac_range_settings.append(_set_mac_range_options(ip_count, eni_index, nodetype)) - client_vlan_range_settings.append(_set_vlan_range_options(url_patch_dict, eni_index-1, nodetype)) - ip_count += 1 - else: - eni_index += 1 - ip_count = 0 - - IxLoadUtils.log("Setting Client Ranges: IPs, MACs, VLANs") - for i in range(nsgs): - # Enable VLAN settings - range_url = url_patch_dict['client_range_setting']['url'] - r_index = client_ip_range_names[i].split("-")[1][1:] - - url_ip = url_patch_dict['base_url'] + range_url % (r_index) - url_mac = url_patch_dict['base_url'] + range_url % (r_index) + "/macRange" - url_vlan = url_patch_dict['base_url'] + range_url % (r_index) + "/vlanRange" - - response = requests.patch(url_ip, json=client_ip_range_settings[i]) - response = requests.patch(url_mac, json=client_mac_range_settings[i]) - response = requests.patch(url_vlan, json=vlan_enabled) - response = requests.patch(url_vlan, json=client_vlan_range_settings[i]) - - IxLoadUtils.log("Creating Server IPs, MACs, and VLANIDs") - nodetype = "server" - server_ip_range_settings = [] - server_mac_range_settings = [] - server_vlan_range_settings = [] - # Build Server IPs and MACs - for i in range(enis): - server_ip_range_settings.append(_set_ip_range_options(0, i + 1, nodetype)) - server_mac_range_settings.append(_set_mac_range_options(0, i+1, nodetype)) - server_vlan_range_settings.append(_set_vlan_range_options(url_patch_dict, i, nodetype)) - - IxLoadUtils.log("Setting Server Ranges: IPs, MACs, VLANs") - for i in range(enis): - range_url = url_patch_dict['server_range_setting']['url'] - r_index = server_ip_range_names[i].split("-")[1][1:] - - url_ip = url_patch_dict['base_url'] + range_url % (r_index) - url_mac = url_patch_dict['base_url'] + range_url % (r_index) + "/macRange" - url_vlan = url_patch_dict['base_url'] + range_url % (r_index) + "/vlanRange" - - response = requests.patch(url_ip, json=server_ip_range_settings[i]) - response = requests.patch(url_mac, json=server_mac_range_settings[i]) - response = requests.patch(url_vlan, json=vlan_enabled) - response = requests.patch(url_vlan, json=server_vlan_range_settings[i]) - - IxLoadUtils.log("Disabling Unused IP ranges ...") - kIpOptionsToChange = { - # format : { IP Range name : { optionName : optionValue } } - client_ip_range_names[-1]: { - 'count': 1, - 'enabled': False, - }, - server_ip_range_names[-1]: { - 'count': 1, - 'enabled': False, - } - } - IxLoadUtils.changeIpRangesParams(connection, session_url, kIpOptionsToChange) - - # Turn off TCP settings - IxLoadUtils.log("Adjusting Test Settings, TCP, HTTP ...") - response = _patch_test_setting(url_patch_dict, 'http_version') - response = _patch_test_setting(url_patch_dict, 'http_tcp_conns_per_user') - - response = _patch_test_setting(url_patch_dict, 'client_disable_tcp_tw_recycle') - response = _patch_test_setting(url_patch_dict, 'server_disable_tcp_tw_recycle') - - IxLoadUtils.log("Adjusting Test Timeline settings ...") - if url_patch_dict['timeline_settings']['timelineType'] == 0: - rampDownTime = 10 - sustainTime = 180 - _set_timeline_settings(test_settings, rampDownTime, sustainTime) - else: - url_timeline = url_patch_dict['base_url'] + url_patch_dict['timeline_settings']['url'] - timelineType_json = {'timelineType': url_patch_dict['timeline_settings']['timelineType']} - response = requests.patch(url_timeline, json=timelineType_json) - - timeline_json = url_patch_dict['timeline_settings']['advanced'] - response = requests.patch(url_timeline, json=timeline_json) - - advanced_url = url_timeline + "/advancedIteration/segmentList/%s" - for i in range(4): - url = advanced_url % (i) - d_json = {'duration': url_patch_dict['timeline_settings']['advancedIteration']['d{}'.format(i)]} - response = requests.patch(url, json=d_json) - - # Change TCP Connections Established to CPS caption name and to use kRate aggregationType - stats_configured_url = url_patch_dict['base_url'] + url_patch_dict['stats_configured']['url'] - response = requests.get(stats_configured_url, params=None) - stat_url_list = response.json() - for stat in stat_url_list: - if stat['caption'] == 'TCP Connections Established': - objectID = stat['objectID'] - - cps_url = url_patch_dict['stats_configured']['url'] + '/' + str(objectID) - url_patch_dict['cps_aggregation_type']['url'] = cps_url - url_patch_dict['cps_stat_caption']['url'] = cps_url - - response = _patch_test_setting(url_patch_dict, 'cps_aggregation_type') - response = _patch_test_setting(url_patch_dict, 'cps_stat_caption') - - IxLoadUtils.log("Adding new commands %s..." % (list(kNewCommands))) - IxLoadUtils.addCommands(connection, session_url, kNewCommands) - IxLoadUtils.log("Commands added.") - - IxLoadUtils.log("Creating custom traffic maps") - _create_traffic_map(connection, url_patch_dict, nsgs, enis, ip_ranges_per_vpc) - IxLoadUtils.log("Traffic Maps completed") - - IxLoadUtils.log("Clearing chassis list...") - IxLoadUtils.clearChassisList(connection, session_url) - IxLoadUtils.log("Chassis list cleared.") - - IxLoadUtils.log("Adding chassis %s..." % (test_settings.chassisList)) - IxLoadUtils.addChassisList(connection, session_url, test_settings.chassisList) - IxLoadUtils.log("Chassis added.") - - IxLoadUtils.log("Assigning new ports...") - IxLoadUtils.assignPorts(connection, session_url, test_settings.portListPerCommunity) - IxLoadUtils.log("Ports assigned.") - - initial_objective = 6000000 - threshold = 100000 - target_failures = 1000 - MAX_CPS = 9000000 - MIN_CPS = 0 - cps_max_w_ts, failures_dict, test_run_results, latency_ranges = _run_cc_test(connection, session_url, - url_patch_dict, - MAX_CPS, - MIN_CPS, threshold, - target_failures, test_settings, - initial_objective) - - IxLoadUtils.log("Test Complete Final Values") - _print_final_table(test_run_results) - - IxLoadUtils.deleteAllSessions(connection) - +import inspect +import json +import sys +import time +from copy import deepcopy + +import ipaddress +import macaddress +import pytest +import requests +from ixload import IxLoadUtils as IxLoadUtils +from ixnetwork_restpy import SessionAssistant +from ixnetwork_restpy.assistants.statistics.statviewassistant import StatViewAssistant +from tabulate import tabulate +from testdata_baby_hero import testdata,ip_type +from datetime import datetime +from future.utils import iteritems + +data = [] +final_result_data=[] +setup_information=None +ixnetwork=None +config_elements_sets=[] +val_map={} +tiNo = 16 +captions = ["Test","PPS", "Tx Frames", "Rx Frames", "Frames Delta", "Loss %","PossibleBoundary"] + + +@pytest.fixture(scope="class") +def setup(smartnics, tbinfo,utils): + """Gather all required test information from DUT and tbinfo. + A Dictionary with required test information. + """ + print ("*"*50+"SETUP"+"*"*50) + setup_information = {"nics": smartnics, "tbinfo": tbinfo, } + smartnics.configure_target(testdata) + yield setup_information + +def find_boundary(utils): + global data, final_result_data + hls = ixnetwork.Traffic.TrafficItem.find()[0].HighLevelStream.find() + + def boundary_check(test_boundary_val): + for hl in hls: + hl.FrameRate.update(Type='framesPerSecond', Rate=test_boundary_val) + + utils.start_traffic(ixnetwork) + utils.ss("\t\t\tLet Traffic run for ", 10) + utils.ss("\t\t\tPrint Stats Before issuing Clear Stats ", 2) + utils.printStats(ixnetwork, "Traffic Item Statistics", {"Traffic Item Statistics": {'transpose': False, 'toprint': ["Traffic Item", "Tx Frames", "Rx Frames", "Frames Delta", "Loss %"]}}) + utils.ss("\t\t\tLet Clear Stats ", 2) + ixnetwork.ClearStats() + utils.ss("\t\t\tLet Traffic run for another ", 90) + utils.stop_traffic(ixnetwork) + utils.ss("\t\t\tLets wait for stats to settle down for ", 10) + #print("\tVerify Traffic stats") + ti = StatViewAssistant(ixnetwork, 'Traffic Item Statistics') + if float(ti.Rows[0]['Frames Delta']) == float(0): + ixnetwork.ClearStats() + return False + else: + ixnetwork.ClearStats() + return True + + poss_val, step, tolerance, pass_val, fail_val = int(20000000 / tiNo), int(20000000 / tiNo), 100000, None, None + #poss_val, step, tolerance, pass_val, fail_val = int(20000000 / tiNo), int(20000000 / tiNo), 50000, None, None + + while True: + print("="*50) + print(f"Test running for {utils.human_format(poss_val * tiNo)} framesPerSecond") + print(" POSSPASS|FAIL|PASS=", poss_val, fail_val, pass_val) + print("="*50) + result = boundary_check(poss_val) + row = utils.printStats(ixnetwork, "Traffic Item Statistics", {"Traffic Item Statistics": {'transpose': False, 'toprint': ["Traffic Item", "Tx Frames", "Rx Frames", "Frames Delta", "Loss %"]}}) + utils.printStats(ixnetwork, "Flow Statistics", {"Flow Statistics": {'transpose': False, 'toprint': ["Traffic Item", "Source/Dest Endpoint Pair", "Tx Frames", "Rx Frames", "Frames Delta", "Loss %"]}}) + data.append([sys._getframe().f_back.f_code.co_name,utils.human_format(poss_val * tiNo)]+row[1:]) + + if result: + fail_val = poss_val + if pass_val: + poss_val = int((pass_val+fail_val)/2) + else: + poss_val = int(poss_val/2) + else: # we need to continue + pass_val = poss_val + if not fail_val: + poss_val = pass_val+step + else: + poss_val = int((pass_val+fail_val)/2) + if fail_val: + if abs(fail_val-poss_val) <= tolerance: + if pass_val==None: + print ("Not able to find Boundary Tolerance (%d) is Less than last fail value (%d)" % (tolerance,fail_val)) + pass_val="NA" + else: + pass_val = utils.human_format(pass_val * tiNo) + print("Final Possible Boundary is ", pass_val) + print(" X POSSPASS|FAIL|PASS=", poss_val, fail_val, pass_val) + break + data.append([sys._getframe().f_back.f_code.co_name]+["***"]*5+[pass_val]) + print(tabulate(data, headers=captions, tablefmt="psql")) + + final_result_data.append([sys._getframe().f_back.f_code.co_name,pass_val]) + + + +@pytest.fixture(scope="class") +def pps_config(setup,tbinfo,utils): + """ + Description: Verify ip address can be configured in SVI. + Topo: DUT02 ============ DUT01 + Dev. status: DONE + """ + global ixnetwork,config_elements_sets,val_map + testbed = setup["tbinfo"] + snic = setup["nics"] + def createTI(name, endpoints): + trafficItem = ixnetwork.Traffic.TrafficItem.find(Name="^%s$" % name) + if len(trafficItem) == 0: + trafficItem = ixnetwork.Traffic.TrafficItem.add(Name=name, TrafficType='ipv4', BiDirectional=False) # BiDirectional=True + for indx,srcdst in enumerate(endpoints): + print ("ENP UP",indx+1) + src,dst = srcdst + endpoint_set_up = trafficItem.EndpointSet.add(Name="%s-ENI_UP-%s" % (name,str(indx+1)),ScalableSources=src, ScalableDestinations=dst) + ce = trafficItem.ConfigElement.find()[-1] + ce.FrameRate.update(Type='framesPerSecond', Rate=50000) + ce.TransmissionControl.Type = 'continuous' + ce.FrameRateDistribution.PortDistribution = 'applyRateToAll' + ce.FrameSize.FixedSize = 128 + udp_srcport = ce.Stack.find(StackTypeId="udp").Field.find(FieldTypeId="udp.header.srcPort") + udp_srcport.Auto = False + udp_srcport.SingleValue = 50687 + udp_len = ce.Stack.find(StackTypeId="udp").Field.find(FieldTypeId="udp.header.length") + udp_len.Auto = False + udp_len.SingleValue = 80 + + udp_template = ixnetwork.Traffic.ProtocolTemplate.find(StackTypeId='^udp$') + ipv4_template = ce.Stack.find(TemplateName="ipv4-template.xml")[-1] + inner_udp = ce.Stack.read(ipv4_template.AppendProtocol(udp_template)) + trafficItem.Tracking.find()[0].TrackBy = ['trackingenabled0', 'sourceDestEndpointPair0'] + inn_sp = inner_udp.Field.find(DisplayName='^UDP-Source-Port') + inn_dp = inner_udp.Field.find(DisplayName='^UDP-Dest-Port') + inn_sp.Auto = False + inn_dp.Auto = False + inn_sp.SingleValue = 10000 + inn_dp.SingleValue = 10000 + ce_up = ce + print ("ENP Down",indx+1) + #DOWN + endpoint_set_down = trafficItem.EndpointSet.add(Name="%s-ENI_DOWN-%s" % (name,str(indx+1)),ScalableSources=dst, ScalableDestinations=src) + ce = trafficItem.ConfigElement.find()[-1] + ce.FrameRate.update(Type='framesPerSecond', Rate=50000) + ce.TransmissionControl.Type = 'continuous' + ce.FrameRateDistribution.PortDistribution = 'applyRateToAll' + ce.FrameSize.FixedSize = 128 + udp_srcport = ce.Stack.find(StackTypeId="udp").Field.find(FieldTypeId="udp.header.srcPort") + udp_srcport.Auto = False + udp_srcport.SingleValue = 50687 + udp_len = ce.Stack.find(StackTypeId="udp").Field.find(FieldTypeId="udp.header.length") + udp_len.Auto = False + udp_len.SingleValue = 80 + + udp_template = ixnetwork.Traffic.ProtocolTemplate.find(StackTypeId='^udp$') + ipv4_template = ce.Stack.find(TemplateName="ipv4-template.xml")[-1] + inner_udp = ce.Stack.read(ipv4_template.AppendProtocol(udp_template)) + trafficItem.Tracking.find()[0].TrackBy = ['trackingenabled0', 'sourceDestEndpointPair0'] + inn_sp = inner_udp.Field.find(DisplayName='^UDP-Source-Port') + inn_dp = inner_udp.Field.find(DisplayName='^UDP-Dest-Port') + inn_sp.Auto = False + inn_dp.Auto = False + inn_sp.SingleValue = 10000 + inn_dp.SingleValue = 10000 + ce_down=ce + + if name=="Allow": + config_elements_sets.append((ce_up,ce_down)) + + print ("Done") + #trafficItem.Generate() + print (datetime.now(),"*"*80) + return trafficItem + + + obj_map = {} + for k in testdata["val_map"].keys(): + obj_map[k] = deepcopy({}) + val_map = testdata["val_map"] + + print('connect to a test tool platform') + tb=testbed['stateless'][0] + + session_assistant = SessionAssistant( + IpAddress=tb['server'][0]['addr'], + RestPort=tb['server'][0]['rest'], + UserName=testbed["CR"][tb['server'][0]['addr']]['user'], + Password=testbed["CR"][tb['server'][0]['addr']]['password'], + SessionName="MIRTest", + ClearConfig=True + ) + + ixnetwork = session_assistant.Ixnetwork + + + portList = [{'xpath': '/vport[%s]' % str(indx+1), 'name': 'VTEP_0%d' % (indx+1), 'location': p['location']} for indx, p in enumerate(tb['tgen'][0]['interfaces'])] + ixnetwork.ResourceManager.ImportConfig(json.dumps(portList), False) + + vports = list(ixnetwork.Vport.find()) + l1data = tb['tgen'][0]['interfaces'] + tmp = [{'xpath': '/vport[%d]/l1Config/%s' % (vp.InternalId, vp.Type), "ieeeL1Defaults": l1data[indx]['ieee'] } for indx, vp in enumerate(vports)] + ixnetwork.ResourceManager.ImportConfig(json.dumps(tmp), False) + tmp = [{'xpath': '/vport[%d]/l1Config/%s' % (vp.InternalId, vp.Type), "enableAutoNegotiation": l1data[indx]['an']} for indx, vp in enumerate(vports)] + ixnetwork.ResourceManager.ImportConfig(json.dumps(tmp), False) + + tmp = [{'xpath': '/vport[%d]/l1Config/%s' % (vp.InternalId, vp.Type), "enableRsFec": l1data[indx]['fec'], "autoInstrumentation": "floating"} for indx, vp in enumerate(vports)] + ixnetwork.ResourceManager.ImportConfig(json.dumps(tmp), False) + for ed in [1, 2]: + # OUTER DG + obj_map[ed]["oeth"] = ixnetwork.Topology.add(Ports=vports[ed-1], Name="TG_%d" % ed).DeviceGroup.add(Name="O_DG_%d" % ed, Multiplier=1).Ethernet.add(Name='ETH_%d' % ed) + if ip_type=="v4": + obj_map[ed]["oipv4"] = obj_map[ed]["oeth"].Ipv4.add(Name="IPv4%d" % ed) + elif ip_type=="v6": + obj_map[ed]["oipv4"] = obj_map[ed]["oeth"].Ipv6.add(Name="IPv6%d" % ed) + + if val_map[ed]['underlay_routing']=="BGP": + if ip_type=="v4": + obj_map[ed]["obgp"] = obj_map[ed]["oipv4"].BgpIpv4Peer.add(Name="BGP_%d" % ed) + elif ip_type=="v6": + obj_map[ed]["obgp"] = obj_map[ed]["oipv4"].BgpIpv6Peer.add(Name="BGP_%d" % ed) + + # OUTER NG + ng = ixnetwork.Topology.find().DeviceGroup.find(Name="O_DG_%d" % ed).NetworkGroup.add(Name="NG_%d" % ed, Multiplier=val_map[ed]["oipv4pool"]["multiplier"]) + if ip_type=="v4": + obj_map[ed]["oipv4pool"] = ng.Ipv4PrefixPools.add(NumberOfAddresses='1') + elif ip_type=="v6": + obj_map[ed]["oipv4pool"] = ng.Ipv6PrefixPools.add(NumberOfAddresses='1') + + # DG Behing Outer NG + obj_map[ed]["dg_b_ong"] = ng.DeviceGroup.add(Name="DG_B_ONG_%d" % ed, Multiplier=1) + obj_map[ed]["dg_b_ong_eth"] = obj_map[ed]["dg_b_ong"].Ethernet.add(Name='ETH_%d' % ed) + if ip_type=="v4": + obj_map[ed]["dg_b_ong_ipv4"] = obj_map[ed]["dg_b_ong_eth"].Ipv4.add(Name='IPv4_%d' % ed) + obj_map[ed]["vxlan"] = obj_map[ed]["dg_b_ong_ipv4"].Vxlan.add(Name="VXLAN_%d" % ed) + elif ip_type=="v6": + obj_map[ed]["dg_b_ong_ipv4"] = obj_map[ed]["dg_b_ong_eth"].Ipv6.add(Name='IPv6_%d' % ed) + obj_map[ed]["vxlan"] = obj_map[ed]["dg_b_ong_ipv4"].Vxlanv6.add(Name="VXLAN_%d" % ed) + + + + # ALLOW & DENY + if ed==1: + if ip_type=="v4": + obj_map[ed]["iipv4_local"] = obj_map[ed]["dg_b_ong"].DeviceGroup.add(Name='Local',Multiplier=1).Ethernet.add().Ipv4.add() + elif ip_type=="v6": + obj_map[ed]["iipv4_local"] = obj_map[ed]["dg_b_ong"].DeviceGroup.add(Name='Local',Multiplier=1).Ethernet.add().Ipv6.add() + + obj_map[ed]["ieth_local"] = obj_map[ed]["iipv4_local"].parent + else: + if ip_type=="v4": + obj_map[ed]["iipv4_allow"] = obj_map[ed]["dg_b_ong"].DeviceGroup.add(Name='Allow',Multiplier=val_map[ed]["iipv4_allow"]["multiplier"]).Ethernet.add().Ipv4.add() + elif ip_type=="v6": + obj_map[ed]["iipv4_allow"] = obj_map[ed]["dg_b_ong"].DeviceGroup.add(Name='Allow',Multiplier=val_map[ed]["iipv4_allow"]["multiplier"]).Ethernet.add().Ipv6.add() + + obj_map[ed]["ieth_allow"] = obj_map[ed]["iipv4_allow"].parent + + if ip_type=="v4": + obj_map[ed]["iipv4_deny"] = obj_map[ed]["dg_b_ong"].DeviceGroup.add(Name='Deny',Multiplier=val_map[ed]["iipv4_deny"]["multiplier"]).Ethernet.add().Ipv4.add() + elif ip_type=="v6": + obj_map[ed]["iipv4_deny"] = obj_map[ed]["dg_b_ong"].DeviceGroup.add(Name='Deny',Multiplier=val_map[ed]["iipv4_deny"]["multiplier"]).Ethernet.add().Ipv6.add() + obj_map[ed]["ieth_deny"] = obj_map[ed]["iipv4_deny"].parent + + + for ed in [1, 2]: + # OUTER DG + obj_map[ed]["oeth"].Mac.Increment(start_value=val_map[ed]["oeth"]["mac"], step_value='00:00:00:00:00:01') + obj_map[ed]["oipv4"].Address.Increment(start_value=val_map[ed]["oipv4"]["ip"], step_value=val_map[ed]["oipv4"]["ip_step"]) + obj_map[ed]["oipv4"].GatewayIp.Increment(start_value=val_map[ed]["oipv4"]["gip"], step_value=val_map[ed]["oipv4"]["gip_step"]) + + + resolve_gateway = False + if val_map[ed]['underlay_routing']=="STATIC": + resolve_gateway = True + + obj_map[ed]["oipv4"].ResolveGateway.Single(resolve_gateway) + obj_map[ed]["oipv4"].ManualGatewayMac.Single(val_map[ed]["oipv4"]["mac"]) + + # BGP + if val_map[ed]['underlay_routing']=="BGP": + obj_map[ed]["obgp"].DutIp.Single(val_map[ed]["obgp"]["dip"]) + obj_map[ed]["obgp"].LocalAs2Bytes.Single(val_map[ed]["obgp"]["las"]) + if ip_type=="v4": + obj_map[ed]["obgp"].EnableBgpIdSameasRouterId.Single(True) + obj_map[ed]["obgp"].FilterIpV4Unicast.Single(True) + elif ip_type=="v6": + #obj_map[ed]["obgp"].EnableBgpIdSameasRouterId.Single(True)----------------------------> This gives an error + obj_map[ed]["obgp"].FilterIpV6Unicast.Single(True) + + obj_map[ed]["obgp"].FilterEvpn.Single(True) + + #obj_map[ed]["bgp"].IpVrfToIpVrfType = 'interfacefullWithUnnumberedCorefacingIRB' + #obj_map[ed]["bgp"].EthernetSegmentsCountV4 = 128 + + obj_map[ed]["obgp"].BgpId.Single(val_map[ed]["obgp"]["bid"]) + obj_map[ed]["obgp"].Type.Single('external') + + # OUTER NG + obj_map[ed]["oipv4pool"].NetworkAddress.Increment(start_value=val_map[ed]["oipv4pool"]["ip"], step_value=val_map[ed]["oipv4pool"]["ip_step"]) + obj_map[ed]["oipv4pool"].PrefixLength.Single(32) + ipv4_behindvxlan = obj_map[ed]["vxlan"].parent + ipv4_behindvxlan.Address.Increment(start_value=val_map[ed]["oipv4pool"]["ip"], step_value=val_map[ed]["oipv4pool"]["ip_step"]) + ipv4_behindvxlan.ResolveGateway.Single(False) + + # DG Behing Outer NG + # DG Behind Outer NG Ethernet + eth = obj_map[ed]["dg_b_ong_ipv4"].parent + eth.Mac.Increment(start_value=val_map[ed]["dg_b_ong_eth"]["mac"], step_value='00:00:00:00:00:01') + + # DG Behind Outer NG IPv4 + for s in obj_map[ed]["dg_b_ong_ipv4"].Address.Steps: + s.Enabled = False + obj_map[ed]["dg_b_ong_ipv4"].Address.Increment(start_value=val_map[ed]["dg_b_ong_ipv4"]["ip"], step_value=val_map[ed]["dg_b_ong_ipv4"]["ip_step"]) + obj_map[ed]["dg_b_ong_ipv4"].GatewayIp.Increment(start_value=val_map[ed]["dg_b_ong_ipv4"]["gip"], step_value=val_map[ed]["dg_b_ong_ipv4"]["gip_step"]) + obj_map[ed]["dg_b_ong_ipv4"].Prefix.Single(32) + + # VXLAN + obj_map[ed]["vxlan"].EnableStaticInfo = True + + if ip_type=="v4": + vxlan_sinfo=obj_map[ed]["vxlan"].VxlanStaticInfo + vxlan_sinfo.MacStaticConfig.Single(True) + remote_vtep_ip_obj = vxlan_sinfo.RemoteVtepIpv4 + remote_vm_mac = vxlan_sinfo.RemoteVmStaticMac + elif ip_type=="v6": + vxlan_sinfo=obj_map[ed]["vxlan"].VxlanIPv6StaticInfo + vxlan_sinfo.EnableManualRemoteVMMac.Single(True) + remote_vtep_ip_obj = vxlan_sinfo.RemoteVtepUnicastIpv6 + remote_vm_mac = vxlan_sinfo.RemoteVMMacAddress + + + + remote_vtep_ip_obj.Single(val_map[ed]["vxlan"]["RemoteVtepIpv4"]) + obj_map[ed]["vxlan"].Vni.Increment(start_value=val_map[ed]["vxlan"]["Vni"], step_value=1) + vxlan_sinfo.SuppressArp.Single(True) + obj_map[ed]["vxlan"].StaticInfoCount = val_map[ed]["vxlan"]["StaticInfoCount"] + + + # LOCAL | ALLOW & DENY + if ed==1: + + remote_vm_mac.Custom( + start_value=val_map[ed]["vxlan"]["RemoteVmStaticMac"]["start_value"], + step_value=val_map[ed]["vxlan"]["RemoteVmStaticMac"]["step_value"], + increments=val_map[ed]["vxlan"]["RemoteVmStaticMac"]["increments"] + ) + remote_vm_mac.Steps[0].Enabled = True + remote_vm_mac.Steps[0].Step = val_map[ed]["vxlan"]["RemoteVmStaticMac"]["ng_step"] + + vxlan_sinfo.RemoteVmStaticIpv4.Custom( + start_value=val_map[ed]["vxlan"]["RemoteVmStaticIpv4"]["start_value"], + step_value=val_map[ed]["vxlan"]["RemoteVmStaticIpv4"]["step_value"], + increments=val_map[ed]["vxlan"]["RemoteVmStaticIpv4"]["increments"] + ) + vxlan_sinfo.RemoteVmStaticIpv4.Steps[0].Enabled = True + vxlan_sinfo.RemoteVmStaticIpv4.Steps[0].Step = val_map[ed]["vxlan"]["RemoteVmStaticIpv4"]["ng_step"] + + + obj_map[ed]["ieth_local"].Mac.Increment(start_value=val_map[ed]["ieth_local"]["mac"], step_value=val_map[ed]["ieth_local"]["step"],) + obj_map[ed]["ieth_local"].Mac.Steps[1].Enabled=True + obj_map[ed]["ieth_local"].Mac.Steps[1].Step = '00:00:00:08:00:00' + + obj_map[ed]["iipv4_local"].Prefix.Single(8) + + obj_map[ed]["iipv4_local"].Address.Increment( start_value=val_map[ed]["iipv4_local"]["ip"], step_value=val_map[ed]["iipv4_local"]["ip_step"]) + obj_map[ed]["iipv4_local"].Address.Steps[1].Enabled=True + obj_map[ed]["iipv4_local"].Address.Steps[1].Step = val_map[ed]["iipv4_local"]["ip_ng1_step"] + + obj_map[ed]["iipv4_local"].GatewayIp.Increment(start_value=val_map[ed]["iipv4_local"]["gip"], step_value=val_map[ed]["iipv4_local"]["gip_step"]) + obj_map[ed]["iipv4_local"].GatewayIp.Steps[1].Enabled=True + obj_map[ed]["iipv4_local"].GatewayIp.Steps[1].Step = val_map[ed]["iipv4_local"]["gip_ng1_step"] + + + else: + + remote_vm_mac.Increment(start_value=val_map[ed]["vxlan"]["RemoteVmStaticMac"],step_value='00:00:00:00:00:01') + remote_vm_mac.Steps[0].Enabled =True + remote_vm_mac.Steps[0].Step = '00:00:00:08:00:00' + + #vxlan_sinfo.RemoteVmStaticIpv4.Increment(start_value=val_map[ed]["vxlan"]["RemoteVmStaticIpv4"],step_value='0.0.0.1') + vxlan_sinfo.RemoteVmStaticIpv4.Custom( + start_value=val_map[ed]["vxlan"]["RemoteVmStaticIpv4"]["start_value"], + step_value=val_map[ed]["vxlan"]["RemoteVmStaticIpv4"]["step_value"], + ) + + vxlan_sinfo.RemoteVmStaticIpv4.Steps[0].Enabled =True + vxlan_sinfo.RemoteVmStaticIpv4.Steps[0].Step = val_map[ed]["vxlan"]["RemoteVmStaticIpv4"]["ng_step"] + + eth_allow = obj_map[ed]["ieth_allow"] + ip_allow = obj_map[ed]["iipv4_allow"] + eth_deny = obj_map[ed]["ieth_deny"] + ip_deny = obj_map[ed]["iipv4_deny"] + + + eth_allow.Mac.Custom( + start_value=val_map[ed]["ieth_allow"]["mac"]["start_value"], + step_value =val_map[ed]["ieth_allow"]["mac"]["step_value"], + increments =val_map[ed]["ieth_allow"]["mac"]["increments"] + ) + + eth_allow.Mac.Steps[1].Enabled = True + eth_allow.Mac.Steps[1].Step = val_map[ed]["ieth_allow"]["mac"]["ng_step"] + + ip_allow.Address.Custom( + start_value=val_map[ed]["iipv4_allow"]["ip"]["start_value"], + step_value =val_map[ed]["iipv4_allow"]["ip"]["step_value"], + increments =val_map[ed]["iipv4_allow"]["ip"]["increments"] + ) + ip_allow.Address.Steps[1].Enabled = True + ip_allow.Address.Steps[1].Step = val_map[ed]["iipv4_allow"]["ip"]["ng_step"] + + ip_allow.Prefix.Single(8) + + ip_allow.GatewayIp.Increment(start_value=val_map[ed]["iipv4_allow"]["gip"], step_value=val_map[ed]["iipv4_allow"]["gip_step"]) #Fix Increments + ip_allow.GatewayIp.Steps[1].Enabled=True + ip_allow.GatewayIp.Steps[1].Step = val_map[ed]["iipv4_allow"]["gip_ng_step"] + + + eth_deny.Mac.Custom( + start_value=val_map[ed]["ieth_deny"]["mac"]["start_value"], + step_value =val_map[ed]["ieth_deny"]["mac"]["step_value"], + increments =val_map[ed]["ieth_deny"]["mac"]["increments"] + ) + eth_deny.Mac.Steps[1].Enabled = True + eth_deny.Mac.Steps[1].Step = val_map[ed]["ieth_deny"]["mac"]["ng_step"] + + ip_deny.Address.Custom( + start_value=val_map[ed]["iipv4_deny"]["ip"]["start_value"], + step_value =val_map[ed]["iipv4_deny"]["ip"]["step_value"], + increments =val_map[ed]["iipv4_deny"]["ip"]["increments"] + ) + + ip_deny.Address.Steps[1].Enabled = True + ip_deny.Address.Steps[1].Step = val_map[ed]["iipv4_deny"]["ip"]["ng_step"] + + ip_deny.Prefix.Single(8) + + + ip_deny.GatewayIp.Increment(start_value=val_map[ed]["iipv4_deny"]["gip"], step_value=val_map[ed]["iipv4_deny"]["gip_step"]) #Fix Increments + ip_deny.GatewayIp.Steps[1].Enabled=True + ip_deny.GatewayIp.Steps[1].Step = val_map[ed]["iipv4_deny"]["gip_ng_step"] + + print("Create Traffic OneIPOneVPC") + if ip_type=="v4": + ipv4_local = ixnetwork.Topology.find().DeviceGroup.find().NetworkGroup.find().DeviceGroup.find().DeviceGroup.find(Name="Local").Ethernet.find().Ipv4.find() + ipv4_allow = ixnetwork.Topology.find().DeviceGroup.find().NetworkGroup.find().DeviceGroup.find().DeviceGroup.find(Name="Allow").Ethernet.find().Ipv4.find() + ipv4_deny = ixnetwork.Topology.find().DeviceGroup.find().NetworkGroup.find().DeviceGroup.find().DeviceGroup.find(Name="Deny").Ethernet.find().Ipv4.find() + elif ip_type=="v6": + ipv4_local = ixnetwork.Topology.find().DeviceGroup.find().NetworkGroup.find().DeviceGroup.find().DeviceGroup.find(Name="Local").Ethernet.find().Ipv6.find() + ipv4_allow = ixnetwork.Topology.find().DeviceGroup.find().NetworkGroup.find().DeviceGroup.find().DeviceGroup.find(Name="Allow").Ethernet.find().Ipv6.find() + ipv4_deny = ixnetwork.Topology.find().DeviceGroup.find().NetworkGroup.find().DeviceGroup.find().DeviceGroup.find(Name="Deny").Ethernet.find().Ipv6.find() + print("Create Traffic OneIPOneVPC") + + vpcs, ips = val_map[1]["oipv4pool"]["multiplier"], int(val_map[1]["vxlan"]["StaticInfoCount"]/2) + endpoints_allow,endpoints_deny=[], [] + + for vpc in range(vpcs): + endpoints_allow.append( + ( + deepcopy([{"arg1": ipv4_local.href,"arg2": 1,"arg3": 1,"arg4": vpc+1,"arg5": 1 }]), + deepcopy([{"arg1": ipv4_allow.href,"arg2": 1,"arg3": 1,"arg4": vpc*ips+1,"arg5": ips }]) + ) + ) + endpoints_deny.append( + ( + deepcopy([{"arg1": ipv4_local.href,"arg2": 1, "arg3": 1, "arg4": vpc+1, "arg5": 1 }]), + deepcopy([{"arg1": ipv4_deny.href ,"arg2": 1, "arg3": 1, "arg4": vpc*ips+1, "arg5": ips }]) + ) + ) + + ti_allow = createTI("Allow", endpoints_allow) + ti_deny = createTI("Deny", endpoints_deny) + + +#@pytest.mark.usefixtures("pps_config") +class Test_Dpu: + + def teardown_method(self, method): + print("Clean up configuration") + + def test_pps_001(self, setup, utils): + print('Start All Protocols test_pps_001') + ixnetwork.StartAllProtocols(Arg1='sync') + + try: + print('Verify protocol sessions') + protocolsSummary = StatViewAssistant(ixnetwork, 'Protocols Summary') + protocolsSummary.CheckCondition('Sessions Not Started', StatViewAssistant.EQUAL, 0) + protocolsSummary.CheckCondition('Sessions Down', StatViewAssistant.EQUAL, 0) + except Exception as e: + raise Exception(str(e)) + time.sleep(90) + + ti_allow = ixnetwork.Traffic.TrafficItem.find(Name="Allow") + ti_deny = ixnetwork.Traffic.TrafficItem.find(Name="Deny") + ti_allow.Generate() + ti_deny.Generate() + ixnetwork.Traffic.Apply() + utils.start_traffic(ixnetwork) + time.sleep(30) + utils.stop_traffic(ixnetwork) + + find_boundary(utils) + print(tabulate(final_result_data, headers=["Test","Max Possible PPS"], tablefmt="psql")) + + def test_pps_increment_udp(self, setup, utils): + + print('Start All Protocols test_pps_random_udp_src_dst') + ixnetwork.StartAllProtocols(Arg1='sync') + try: + print('Verify protocol sessions') + protocolsSummary = StatViewAssistant(ixnetwork, 'Protocols Summary') + protocolsSummary.CheckCondition('Sessions Not Started', StatViewAssistant.EQUAL, 0) + protocolsSummary.CheckCondition('Sessions Down', StatViewAssistant.EQUAL, 0) + except Exception as e: + raise Exception(str(e)) + + trafficItem = ixnetwork.Traffic.TrafficItem.find(Name="Deny") + if len(trafficItem)==1: + trafficItem.Enabled=False + ti_allow = ixnetwork.Traffic.TrafficItem.find(Name="Allow") + vm_start_value=9000 + host_start_value=10000 + host_step = 5000 + endpoint_sets = ti_allow.EndpointSet.find() + #for ep_up,ep_down in endpoint_sets: + for ce_up,ce_down in config_elements_sets: + print (ce_up,ce_down) + inner_udp = ce_up.Stack.find(TemplateName="udp-template.xml")[-1] + inn_sp = inner_udp.Field.find(DisplayName='^UDP-Source-Port') + inn_dp = inner_udp.Field.find(DisplayName='^UDP-Dest-Port') + inn_sp.ValueType = "singleValue" + inn_dp.ValueType = "increment" + inn_sp.SingleValue = vm_start_value + inn_dp.StartValue = host_start_value + inn_dp.StepValue = 1 + inn_dp.CountValue = int(val_map[1]["vxlan"]["StaticInfoCount"]/2) + + + inner_udp = ce_down.Stack.find(TemplateName="udp-template.xml")[-1] + inn_sp = inner_udp.Field.find(DisplayName='^UDP-Source-Port') + inn_dp = inner_udp.Field.find(DisplayName='^UDP-Dest-Port') + inn_sp.ValueType = "increment" + inn_dp.ValueType = "singleValue" + inn_dp.SingleValue = vm_start_value + inn_sp.StartValue = host_start_value + inn_sp.StepValue = 1 + inn_sp.CountValue = int(val_map[1]["vxlan"]["StaticInfoCount"]/2) + + + + vm_start_value+=1 + host_start_value=host_start_value+host_step + + ti_allow.Generate() + ixnetwork.Traffic.Apply() + utils.start_traffic(ixnetwork) + time.sleep(30) + utils.stop_traffic(ixnetwork) + + find_boundary(utils) + print(tabulate(final_result_data, headers=["Test","Max Possible PPS"], tablefmt="psql")) + + def test_cps_001(self, setup, create_ixload_session_url): + """ + Description: Verify ip address can be configured in SVI. + Topo: DUT02 ============ DUT01 + Dev. status: DONE + """ + def _patch_test_setting(url_patch_dict, setting): + + url = url_patch_dict['base_url'] + url_patch_dict[setting]['url'] + + return requests.patch(url, json=url_patch_dict[setting]['json']) + + def _get_timeline_link(timelines, timeline_key): + + link = "" + link_test = "" + + for elem in timelines: + if elem['name'] in timeline_key: + link_init = elem['links'][0]['href'] + link_init_list = link_init.split("/") + link_init_list.pop(len(link_init_list) - 1) + link_test = '/'.join(link_init_list) + + shaved = link_test.split("/") + for i in range(5): + shaved.pop(0) + shaved.insert(0, "") + link = "/".join(shaved) + + return link + + def _set_timeline_settings(test_settings, rampDownTime, sustainTime): + + timeline_url = 'http://' + test_settings.gatewayServer + ":{}".format( + test_settings.gatewayPort) + '/api/v1/' + session_url + '/ixload/test/activeTest/timelineList' + response = requests.get(timeline_url, headers=headers) + timelines = response.json() + + timeline1_url = 'http://' + test_settings.gatewayServer + ":{}".format( + test_settings.gatewayPort) + '/api/v1/' + session_url + \ + _get_timeline_link(timelines, "Timeline1") + timeline1_settings = {"rampDownTime": rampDownTime, "sustainTime": sustainTime} + requests.patch(timeline1_url, json=timeline1_settings) + + timeline2_url = 'http://' + test_settings.gatewayServer + ":{}".format( + test_settings.gatewayPort) + '/api/v1/' + session_url + \ + _get_timeline_link(timelines, "Timeline2") + timeline2_settings = {"rampDownTime": rampDownTime, "sustainTime": sustainTime} + requests.patch(timeline2_url, json=timeline2_settings) + + timeline_matchLongest_url = 'http://' + test_settings.gatewayServer + ":{}".format( + test_settings.gatewayPort) + '/api/v1/' + session_url + \ + _get_timeline_link(timelines, "") + matchLongest_settings = {"sustainTime": sustainTime} + requests.patch(timeline_matchLongest_url, json=matchLongest_settings) + + return + + def _getTestCurrentState(connection, sessionUrl): + + activeTestUrl = "%s/ixload/test/activeTest" % (sessionUrl) + testObj = connection.httpGet(activeTestUrl) + + return testObj.currentState + + def _print_final_table(test_run_results): + stat_table = [] + stat_columns = ["It", "Obtained CPS", "HTTP Requests Failed", "TCP Retries", + "TCP Resets TX", "TCP Resets RX"] + for iter in test_run_results: + stat_table.append(iter) + print("\n%s" % tabulate(stat_table, headers=stat_columns, tablefmt='psql', floatfmt=".2f")) + + def _poll_stats(connection, sessionUrl, watchedStatsDict, pollingInterval=4): + + statSourceList = list(watchedStatsDict) + + # retrieve stats for a given stat dict + # all the stats will be saved in the dictionary below + + # statsDict format: + # { + # statSourceName: { + # timestamp: { + # statCaption : value + # } + # } + # } + stats_dict = {} + + # remember the timstamps that were already collected - will be ignored in future + collectedTimestamps = {} # format { statSource : [2000, 4000, ...] } + testIsRunning = True + + # check stat sources + for statSource in statSourceList[:]: + statSourceUrl = "%s/ixload/stats/%s/values" % (sessionUrl, statSource) + statSourceReply = connection.httpRequest("GET", statSourceUrl) + if statSourceReply.status_code != 200: + statSourceList.remove(statSource) + + # check the test state, and poll stats while the test is still running + while testIsRunning: + + # the polling interval is configurable. by default, it's set to 4 seconds + time.sleep(pollingInterval) + + for statSource in statSourceList: + valuesUrl = "%s/ixload/stats/%s/values" % (sessionUrl, statSource) + + valuesObj = connection.httpGet(valuesUrl) + valuesDict = valuesObj.getOptions() + + # get just the new timestamps - that were not previously retrieved in another stats polling iteration + newTimestamps = [int(timestamp) for timestamp in list(valuesDict) if + timestamp not in collectedTimestamps.get(statSource, [])] + newTimestamps.sort() + + for timestamp in newTimestamps: + timeStampStr = str(timestamp) + + collectedTimestamps.setdefault(statSource, []).append(timeStampStr) + + timestampDict = stats_dict.setdefault(statSource, {}).setdefault(timestamp, {}) + + # save the values for the current timestamp, and later print them + for caption, value in iteritems(valuesDict[timeStampStr].getOptions()): + if caption in watchedStatsDict[statSource]: + timestampDict[caption] = value + stat_table_row = [] + for table_row in timestampDict.keys(): + stat_table_row.append(table_row) + table = [] + columns = ['Stat Source', 'Time Stamp', 'Stat Name', 'Value'] + for i, stat in enumerate(stat_table_row): + table.append([statSource, timeStampStr, stat, timestampDict[stat]]) + # print("\n%s" % tabulate(table, headers=columns, tablefmt='psql')) + + testIsRunning = _getTestCurrentState(connection, sessionUrl) == "Running" + + print("Stopped receiving stats.") + return stats_dict + + def _get_stats_global(stats_dict): + stats_global = [] + + for key in stats_dict['HTTPClient'].keys(): + if key in stats_dict['HTTPClient'] and key in stats_dict['HTTPServer']: + stats_global.append([key, stats_dict['HTTPClient'][key]['HTTP Simulated Users'], + stats_dict['HTTPClient'][key]['HTTP Concurrent Connections'], + stats_dict['HTTPClient'][key]['TCP CPS'], + stats_dict['HTTPClient'][key]['HTTP Connect Time (us)'], + stats_dict['HTTPServer'][key]['HTTP Requests Failed'], + stats_dict['HTTPServer'][key]['TCP Retries'], + stats_dict['HTTPServer'][key]['TCP Resets Sent'], + stats_dict['HTTPServer'][key]['TCP Resets Received']]) + + return stats_global + + def _check_for_error_stats(test_stats, error_type): + + error_dict = { + error_type: { + "first_time": 0, + "last_time": 0, + "num_of_seq_timestamps": 0 + } + } + + timestamps_l = [i[0] for i in test_stats] + errors_l = [i[1] for i in test_stats] + seen = set() + dupes = {} + + first_time = 0 + for i, x in enumerate(errors_l): + if x in seen: + dupes.setdefault(x, []).append(i) + else: + seen.add(x) + + # insert timestamp index location at beginning of list + for key in dupes.keys(): + dupes[key].insert(0, dupes[key][0] - 1) + + # make list of lens of each duplicates, then remove and remove rest of error entries from dupes dict + errors_l = [len(dupes[x]) for x in dupes.keys()] + max_index = errors_l.index(max(errors_l)) + errors_l.pop(max_index) + + # keep only the highest number of stable + for i, key in enumerate(list(dupes)): + if i != max_index: + dupes.pop(key, None) + + for key in dupes.keys(): + error_dict[error_type]["first_time"] = dupes[key][0] + error_dict[error_type]["last_time"] = dupes[key][-1] + + if list(dupes.keys())[0] != 0: + error_dict[error_type]["num_of_seq_timestamps"] = len(dupes[key]) + else: + error_dict[error_type]["num_of_seq_timestamps"] = 0 + + return error_dict + + def _get_max_cps(test_stats, cps_stats): + + cps_list = [] + for cps in cps_stats: + cps_list.append(cps[1]) + + stats = deepcopy(cps_list) + for i, elem in enumerate(stats): + if elem == '""': + stats[i] = 0 + + stats.sort() + max_cps = stats[-1] + cps_max_w_ts = cps_stats[cps_list.index(max_cps)] + + return cps_max_w_ts + + def _get_effective_cps(cps_stats, http_requests_dict, tcp_retries_dict, tcp_resets_tx_dict, tcp_resets_rx_dict): + + error_list = [http_requests_dict, tcp_retries_dict, tcp_resets_tx_dict, tcp_resets_rx_dict] + num_of_timestamps = len(cps_stats) + + seq_l = [list(x.values())[0]["num_of_seq_timestamps"] for x in error_list] + error_list[seq_l.index(max(seq_l))] + key = list(error_list[seq_l.index(max(seq_l))].keys())[0] + first_time = error_list[seq_l.index(max(seq_l))][key]["first_time"] + last_time = error_list[seq_l.index(max(seq_l))][key]["last_time"] + + effective_cps_ts = { + "first_time": cps_stats[first_time][0], + "last_time": cps_stats[last_time][0] + } + + if max(seq_l) != 0: + avg = 0 + effective_cps_l = [] + for i, cps in enumerate(cps_stats): + if i >= first_time and i <= last_time: + effective_cps_l.append(cps) + avg += cps[1] + effective_cps = avg / error_list[seq_l.index(max(seq_l))][key]["num_of_seq_timestamps"] + else: + effective_cps = 0 + effective_cps_ts = {"first_time": 0, "last_time": cps_stats[last_time][0]} + + return effective_cps, effective_cps_ts + + def _get_latency_ranges(test_stats): + + latency_stats = { + "latency_min": 0, + "latency_max": 0, + "latency_avg": 0 + } + + only_lat_stats = [] + for lat_stat in test_stats: + if lat_stat[4] == '""': + lat_stat[4] = 0 + only_lat_stats.append(lat_stat[4]) + + latency_stats["latency_min"] = min(only_lat_stats) + latency_stats["latency_max"] = max(only_lat_stats) + + lat_addr = 0 + for elem in only_lat_stats: + lat_addr += elem + + latency_stats["latency_avg"] = lat_addr / len(only_lat_stats) + + return latency_stats + + def _get_testrun_results(stats_dict, url_patch_dict): + + stats_global = _get_stats_global(stats_dict) + + failures_dict = {"http_requests_failed": 0, "tcp_retries": 0, "tcp_resets_tx": 0, + "tcp_resets_rx": 0, "total": 0} + + # get and compare stats + http_requests_failed_l = [[x[0], x[5]] for x in stats_global] + http_requests_failed = max([x[1] for x in http_requests_failed_l]) + failures_dict["http_requests_failed"] = http_requests_failed + #http_requests_dict = _check_for_error_stats(http_requests_failed_l, "http_requests_failed") + + tcp_retries_l = [[x[0], x[6]] for x in stats_global] + tcp_retries = max([x[1] for x in tcp_retries_l]) + failures_dict["tcp_retries"] = tcp_retries + #tcp_retries_dict = _check_for_error_stats(tcp_retries_l, "tcp_retries") + + tcp_resets_tx_l = [[x[0], x[7]] for x in stats_global] + tcp_resets_tx = max([x[1] for x in tcp_resets_tx_l]) + failures_dict["tcp_resets_tx"] = tcp_resets_tx + #tcp_resets_tx_dict = _check_for_error_stats(tcp_resets_tx_l, "tcp_resets_tx") + + tcp_resets_rx_l = [[x[0], x[8]] for x in stats_global] + tcp_resets_rx = max([x[1] for x in tcp_resets_rx_l]) + failures_dict["tcp_resets_rx"] = tcp_resets_rx + #tcp_resets_rx_dict = _check_for_error_stats(tcp_resets_rx_l, "tcp_resets_rx") + + failures = http_requests_failed + tcp_retries + tcp_resets_tx + tcp_resets_rx + failures_dict["total"] = failures + + steady_time_start = url_patch_dict['timeline_settings']['advancedIteration']['d0'] * 1000 + cps_stats = [[x[0], x[3]] for x in stats_global if x[0] >= steady_time_start] + cps_max_w_ts = _get_max_cps(stats_global, cps_stats) + cps_max = cps_max_w_ts[1] + #effective_cps, effective_cps_ts = _get_effective_cps(cps_stats, http_requests_dict, tcp_retries_dict, + # tcp_resets_tx_dict, tcp_resets_rx_dict) + + latency_ranges = _get_latency_ranges(stats_global) + + return failures_dict, cps_max, cps_max_w_ts, latency_ranges + + def _print_stat_table(cps_max_w_ts, failures_dict, latency_ranges): + + stat_table = [] + stat_columns = ["Timestamp (s)", "TCP Max CPS", "Total Failures"] + stat_table.append([int(cps_max_w_ts[0]) / 1000, int(cps_max_w_ts[1]), failures_dict["total"]]) + + stat_f_table = [] + stat_f_columns = ["HTTP Requests Failed", "TCP Retries", "TCP Resets TX", "TCP Resets RX"] + stat_f_table.append([failures_dict["http_requests_failed"], failures_dict["tcp_retries"], + failures_dict["tcp_resets_tx"], failures_dict["tcp_resets_rx"]]) + + lat_table = [] + lat_table.append( + [latency_ranges["latency_min"], latency_ranges["latency_max"], latency_ranges["latency_avg"]] + ) + lat_stat_columns = ["Connect Time min (us)", "Connect Time max (us)", "Connect Time avg (us)"] + + print("\n%s" % tabulate(stat_table, headers=stat_columns, tablefmt='psql')) + print("\n%s" % tabulate(stat_f_table, headers=stat_f_columns, tablefmt='psql')) + print("\n%s" % tabulate(lat_table, headers=lat_stat_columns, tablefmt='psql')) + + def _run_cc_test(connection, session_url, url_patch_dict, MAX_CPS, MIN_CPS, + threshold, target_failures, test_settings, start_value=0): + + test_run_results = [] + test_value = start_value + test_iteration = 1 + + test_result = "" + IxLoadUtils.log( + "----Test Iteration %d------------------------------------------------------------------" + % test_iteration) + old_value = test_value + IxLoadUtils.log("Testing CC Objective = %d" % test_value) + kActivityOptionsToChange = { + # format: { activityName : { option : value } } + "HTTPClient1": { + "userIpMapping": "1:ALL", + "enableConstraint": False, + "userObjectiveType": "concurrentConnections", + "userObjectiveValue": int(test_value), + } + } + IxLoadUtils.log("Updating CPS objective value settings...") + IxLoadUtils.changeActivityOptions(connection, session_url, kActivityOptionsToChange) + IxLoadUtils.changeActivityOptions(connection, session_url, kActivityOptionsToChange) + IxLoadUtils.log("CPS objective value updated.") + + IxLoadUtils.log("Saving rxf") + IxLoadUtils.saveRxf(connection, session_url, "C:\\automation\\24k_8VPC_CC_{}.rxf".format(test_iteration)) + + IxLoadUtils.log("Applying config...") + IxLoadUtils.applyConfiguration(connection, session_url) + + IxLoadUtils.log("Starting the test...") + IxLoadUtils.runTest(connection, session_url) + IxLoadUtils.log("Test started.") + + IxLoadUtils.log("Test running and extracting stats...") + stats_dict = _poll_stats(connection, session_url, stats_test_settings) + IxLoadUtils.log("Test finished.") + + failures_dict, cps_max, cps_max_w_ts, latency_ranges = _get_testrun_results(stats_dict, url_patch_dict) + + _print_stat_table(cps_max_w_ts, failures_dict, latency_ranges) + + test_run_results.append( + [test_iteration, cps_max, failures_dict["http_requests_failed"], + failures_dict["tcp_retries"], failures_dict["tcp_resets_tx"], + failures_dict["tcp_resets_rx"]] + ) + + return cps_max_w_ts, failures_dict, test_run_results, latency_ranges + + def _create_ip_ranges(connection, session_url, traffic_network, plugin_name): + + IxLoadUtils.HttpUtils.addIpRange(connection, session_url, traffic_network, + plugin_name, {"ipType": "IPv4"}) + + def _get_ip_range_names(connection, session_url, traffic_network, plugin_names, url_patch_dict): + + ip_range_names = [] + range_string = IxLoadUtils.HttpUtils.getRangeListUrl(connection, session_url, traffic_network, plugin_names, + "rangeList") + string_split = range_string.split("/") + range_url = "/" + "/".join(string_split[2:]) + url = url_patch_dict["base_url"] + range_url + + response = requests.get(url, params=None) + range_list_info = response.json() + + for elem in range_list_info: + ip_range_names.append(elem['name']) + + return ip_range_names, range_list_info + + def _create_traffic_map(connection, url_patch_dict, nsgs, enis, ip_ranges_per_vpc): + # Make Traffic Map Settings + + portMapPolicy_json = {'portMapPolicy': 'customMesh'} + destinations_url = url_patch_dict['base_url'] + url_patch_dict['traffic_maps']['destinations_url'] + response = requests.patch(destinations_url, json=portMapPolicy_json) + + # meshType + submapsIPv4_url = url_patch_dict['base_url'] + url_patch_dict['traffic_maps']['subMapsIPv4_url'] + meshType_json = url_patch_dict['traffic_maps']['meshType_setting'] + response = requests.patch(submapsIPv4_url, json=meshType_json) + + # map source-to-destination + sourceRanges_url = submapsIPv4_url + "/sourceRanges/%s" + destId = 1 + if url_patch_dict['traffic_maps']['meshType_setting']['meshType'] == 'ipRangePairs': + ip_count = 0 + for i in range(nsgs): + destinationId_json = {'destinationId': destId} + url = sourceRanges_url % (i) + response = requests.patch(url, json=destinationId_json) + ip_count += 1 + if ip_count == ip_ranges_per_vpc: + destId += 1 + ip_count = 0 + else: + # vlanRangePairs meshType + for i in range(enis): + destinationId_json = {'destinationId': destId} + url = sourceRanges_url % (i) + response = requests.patch(url, json=destinationId_json) + destId += 1 + + # destinationRanges + destRanges_json = {'enable': False} + destinationRanges_url = url_patch_dict['base_url'] + "/destinationRanges/%s" + for i in range(enis): + url = destinationRanges_url % (i) + if i == 0: + response = requests.patch(url, json=destRanges_json) + + return + + def _build_node_ips(count, vpc, nodetype="client"): + IP_STEP1 = int(ipaddress.ip_address(u'0.0.0.1')) + IP_STEP2 = int(ipaddress.ip_address(u'0.0.1.0')) + IP_STEP3 = int(ipaddress.ip_address(u'0.1.0.0')) + IP_STEP4 = int(ipaddress.ip_address(u'1.0.0.0')) + IP_STEPE = int(ipaddress.ip_address(u'0.0.0.2')) + IP_C_START = ipaddress.ip_address(u'1.128.0.1') + IP_S_START = ipaddress.ip_address(u'1.1.0.1') + + if nodetype in "client": + ip = ipaddress.ip_address(int(IP_C_START) + (IP_STEP3 * count * 4) + (IP_STEP4 * (vpc - 1))) + + if nodetype in "server": + ip = ipaddress.ip_address(int(IP_S_START) + (IP_STEP4 * (vpc - 1))) + + return ip + + def _set_ip_range_options(ip_count, eni_index, nodetype): + + if nodetype in "client": + host_count = 500 + incrementBy = "0.0.2.0" + else: + host_count = 1 + incrementBy = "0.0.0.2" + + ip = str(_build_node_ips(ip_count, eni_index, nodetype)) + + IpOptionsToChange = {'count': host_count, 'ipAddress': ip, 'prefix': 8, 'incrementBy': incrementBy, + 'gatewayAddress': "0.0.0.0", 'gatewayIncrement': '0.0.0.0'} + + + return IpOptionsToChange + + def _build_node_macs(count, vpc, nodetype="client"): + ENI_MAC_STEP = '00:00:00:08:00:00' + mac_start_client = macaddress.MAC('00:1B:6E:80:00:01') + mac_start_server = macaddress.MAC('00:1B:6E:00:00:01') + mac_incr1 = macaddress.MAC('00:00:00:01:00:00') + mac_incr3 = macaddress.MAC('00:00:00:03:00:00') + + if nodetype in "client": + m = macaddress.MAC(int(mac_start_client) + int(macaddress.MAC(ENI_MAC_STEP)) * (vpc - 1) + (int(mac_incr1) * count)) + + if nodetype in "server": + m = macaddress.MAC(int(mac_start_server) + int(macaddress.MAC(ENI_MAC_STEP)) * (vpc - 1)) + + return m + + def _set_mac_range_options(ip_count=0, eni_index=0, nodetype="client"): + + if nodetype in "client": + mac_increment = "00:00:00:00:00:80" + else: + mac_increment = "00:00:00:00:00:02" + + mac_address = str(_build_node_macs(ip_count, eni_index, nodetype)) + mac_address = mac_address.replace("-", ":") + + macOptionsToChange = {"mac": mac_address, "incrementBy": mac_increment} + + return macOptionsToChange + + def _set_vlan_range_options(url_patch_dict, index, nodetype="client"): + + if nodetype == 'client': + firstId = url_patch_dict['client_vlan_settings']['json']['firstId'] + index + uniqueCount = url_patch_dict['client_vlan_settings']['json']['uniqueCount'] + else: + firstId = url_patch_dict['server_vlan_settings']['json']['firstId'] + index + uniqueCount = url_patch_dict['server_vlan_settings']['json']['uniqueCount'] + + vlan_settings = {'firstId': firstId, 'uniqueCount': uniqueCount} + + return vlan_settings + + def _get_url_ip(nodetype, node_ip_range_names, index): + + if nodetype == "client": + range_url = url_patch_dict['client_range_setting']['url'] + else: + range_url = url_patch_dict['server_range_setting']['url'] + + r_index = node_ip_range_names[index].split("-")[1][1:] + url_ip = url_patch_dict['base_url'] + range_url % (r_index) + + return url_ip + + # MAIN + kCommunities = [ + # format: {option1: value1, option2: value2} + {}, # default community with no options + {"tcpAccelerationAllowedFlag": True}, # community with tcpAccelerationAllowedFlag set to True + ] + + kActivities = { + 'Traffic1@Network1': ['HTTP Client'], + 'Traffic2@Network2': ['HTTP Server'] + } + + kNewCommands = { + # format: { agent name : [ { field : value } ] } + "HTTPClient1": [ + { + "commandType": "GET", + "destination": "Traffic2_HTTPServer1:80", + "pageObject": "/1b.html", + }, + ], + } + + stats_test_settings = { + 'HTTPClient': ['HTTP Simulated Users', + 'HTTP Concurrent Connections', + 'TCP CPS', + 'HTTP Connect Time (us)', + ], + 'HTTPServer': ['HTTP Requests Failed', + 'TCP Retries', + 'TCP Resets Sent', + 'TCP Resets Received', + ], + } + + stats_dict = {} + location = inspect.getfile(inspect.currentframe()) + + session = create_ixload_session_url + connection = session['connection'] + test_settings = session['test_settings'] + + headers = {'Accept': 'application/json'} + session_url = IxLoadUtils.createNewSession(connection, test_settings.ixLoadVersion) + base_url = 'http://' + test_settings.gatewayServer + ":{}".format(test_settings.gatewayPort) + \ + '/api/v1/' + session_url + + url_patch_dict = { + 'base_url': base_url, + 'traffic_maps': { + 'meshType_setting': {'meshType': "vlanRangePairs"}, + #'meshType_setting': {'meshType': "ipRangePairs"}, + 'subMapsIPv4_url': "/ixload/test/activeTest/communityList/0/activityList/0/destinations/0/customPortMap/submapsIPv4/0", + 'destinations_url': "/ixload/test/activeTest/communityList/0/activityList/0/destinations/0" + }, + 'allow_routes': { + 'json': {"allowRouteConflicts": True}, + 'url': "/ixload/preferences" + }, + 'auto_mac_setting': { + "autoMacGeneration": False + }, + 'timeline_settings': { + 'timelineType': 1, + 'url': "/ixload/test/activetest/communitylist/0/activitylist/0/timeline", + 'advanced': { + 'rampUpValue': 1000000, + 'sustainTime': 240, + }, + 'advancedIteration': { + 'd0': 120, + 'd1': 150, + 'd2': 10, + 'd3': 10, + } + }, + 'client_range_setting': { + 'json': {}, + 'url': "/ixload/test/activeTest/communityList/0/network/stack/childrenList/2/childrenList/3/rangeList/%s" + }, + 'server_range_setting': { + 'json': {}, + 'url': "/ixload/test/activeTest/communityList/1/network/stack/childrenList/5/childrenList/6/rangeList/%s" + }, + 'client_vlan_settings': { + 'json': {"firstId": 101, "uniqueCount": 1}, + 'url': "/ixload/test/activeTest/communityList/0/network/stack/childrenList/2/childrenList/3/rangeList/%s/vlanRange" + }, + 'server_vlan_settings': { + 'json': {"firstId": 1, "uniqueCount": 1}, + 'url': "/ixload/test/activeTest/communityList/1/network/stack/childrenList/5/childrenList/6/rangeList/%s/vlanRange" + }, + 'http_version': { + 'json': {"httpVersion": 1}, + 'url': "/ixload/test/activeTest/communityList/0/activityList/0/agent" + }, + 'http_tcp_conns_per_user': { + 'json': {"maxSessions": 48}, + 'url': "/ixload/test/activeTest/communityList/0/activityList/0/agent" + }, + 'client_disable_tcp_tw_recycle': { + 'json': {"tcp_tw_recycle": False}, + 'url': "/ixload/test/activeTest/communityList/0/network/globalPlugins/2" + }, + 'server_disable_tcp_tw_recycle': { + 'json': {"tcp_tw_recycle": False}, + 'url': "/ixload/test/activeTest/communityList/1/network/globalPlugins/5" + }, + 'stats_configured': { + 'url': '/ixload/stats/HTTPClient/configuredStats' + }, + 'cps_aggregation_type': { + 'json': {"aggregationType": "kRate"}, + 'url': "" + }, + 'cps_stat_caption': { + 'json': {"caption": "TCP CPS"}, + 'url': "" + } + } + + enis = 8 + ip_ranges_per_vpc = 6 + num_ranges = enis + nsgs = enis * ip_ranges_per_vpc + + IxLoadUtils.log('Creating communities...') + IxLoadUtils.addCommunities(connection, session_url, kCommunities) + IxLoadUtils.log('Communities created.') + + IxLoadUtils.log('Creating activities..') + IxLoadUtils.addActivities(connection, session_url, kActivities) + IxLoadUtils.log('Activities created..') + + IxLoadUtils.log("Enabling Forceful Ownership of Ports") + IxLoadUtils.enableForcefullyTakeOwnershipAndResetPorts(connection, session_url) + IxLoadUtils.log("Forceful Ownership Complete") + + response = _patch_test_setting(url_patch_dict, 'allow_routes') + + IxLoadUtils.log("Clearing commands %s..." % (list(kNewCommands))) + IxLoadUtils.clearAgentsCommandList(connection, session_url, list(kNewCommands)) + IxLoadUtils.log("Command lists cleared.") + + IxLoadUtils.log("Adding IPv4 ranges ...") + # Create Client and Server IP Ranges + for _ in range(nsgs): + _create_ip_ranges(connection, session_url, "Traffic1@Network1", "IP-1") + + for _ in range(enis): + _create_ip_ranges(connection, session_url, "Traffic2@Network2", "IP-2") + + # Get Client/Server IP range info + client_ip_range_names, client_range_list_info = _get_ip_range_names(connection, session_url, + "Traffic1@Network1", "IP-1", url_patch_dict) + server_ip_range_names, server_range_list_info = _get_ip_range_names(connection, session_url, + "Traffic2@Network2", "IP-2", url_patch_dict) + + IxLoadUtils.log("Disabling autoMacGeneration ...") + for i in range(nsgs): + url_ip = _get_url_ip("client", client_ip_range_names, i) + response = requests.patch(url_ip, json=url_patch_dict['auto_mac_setting']) + #response = self.make_request('PATCH', url_ip, url_patch_dict['auto_mac_setting']) + + for i in range(enis): + url_ip = _get_url_ip("server", server_ip_range_names, i) + response = requests.patch(url_ip, json=url_patch_dict['auto_mac_setting']) + #response = self.make_request('PATCH', url_ip, url_patch_dict['auto_mac_setting']) + + vlan_enabled = {"enabled": True} + + IxLoadUtils.log("Creating Client IPs, MACs, and VLANIDs") + client_ip_range_settings = [] + client_mac_range_settings = [] + client_vlan_range_settings = [] + eni_index = 1 + ip_count = 0 + nodetype = "client" + # Build Client IPs and MACs + for i in range(nsgs + 1 + ip_ranges_per_vpc): + if ip_count < ip_ranges_per_vpc and eni_index <= enis: + # --- ixNet objects need to be added in the list before they are configured. + client_ip_range_settings.append(_set_ip_range_options(ip_count, eni_index, nodetype)) + client_mac_range_settings.append(_set_mac_range_options(ip_count, eni_index, nodetype)) + client_vlan_range_settings.append(_set_vlan_range_options(url_patch_dict, eni_index-1, nodetype)) + ip_count += 1 + else: + eni_index += 1 + ip_count = 0 + + IxLoadUtils.log("Setting Client Ranges: IPs, MACs, VLANs") + for i in range(nsgs): + # Enable VLAN settings + range_url = url_patch_dict['client_range_setting']['url'] + r_index = client_ip_range_names[i].split("-")[1][1:] + + url_ip = url_patch_dict['base_url'] + range_url % (r_index) + url_mac = url_patch_dict['base_url'] + range_url % (r_index) + "/macRange" + url_vlan = url_patch_dict['base_url'] + range_url % (r_index) + "/vlanRange" + + response = requests.patch(url_ip, json=client_ip_range_settings[i]) + response = requests.patch(url_mac, json=client_mac_range_settings[i]) + response = requests.patch(url_vlan, json=vlan_enabled) + response = requests.patch(url_vlan, json=client_vlan_range_settings[i]) + + IxLoadUtils.log("Creating Server IPs, MACs, and VLANIDs") + nodetype = "server" + server_ip_range_settings = [] + server_mac_range_settings = [] + server_vlan_range_settings = [] + # Build Server IPs and MACs + for i in range(enis): + server_ip_range_settings.append(_set_ip_range_options(0, i + 1, nodetype)) + server_mac_range_settings.append(_set_mac_range_options(0, i+1, nodetype)) + server_vlan_range_settings.append(_set_vlan_range_options(url_patch_dict, i, nodetype)) + + IxLoadUtils.log("Setting Server Ranges: IPs, MACs, VLANs") + for i in range(enis): + range_url = url_patch_dict['server_range_setting']['url'] + r_index = server_ip_range_names[i].split("-")[1][1:] + + url_ip = url_patch_dict['base_url'] + range_url % (r_index) + url_mac = url_patch_dict['base_url'] + range_url % (r_index) + "/macRange" + url_vlan = url_patch_dict['base_url'] + range_url % (r_index) + "/vlanRange" + + response = requests.patch(url_ip, json=server_ip_range_settings[i]) + response = requests.patch(url_mac, json=server_mac_range_settings[i]) + response = requests.patch(url_vlan, json=vlan_enabled) + response = requests.patch(url_vlan, json=server_vlan_range_settings[i]) + + IxLoadUtils.log("Disabling Unused IP ranges ...") + kIpOptionsToChange = { + # format : { IP Range name : { optionName : optionValue } } + client_ip_range_names[-1]: { + 'count': 1, + 'enabled': False, + }, + server_ip_range_names[-1]: { + 'count': 1, + 'enabled': False, + } + } + IxLoadUtils.changeIpRangesParams(connection, session_url, kIpOptionsToChange) + + # Turn off TCP settings + IxLoadUtils.log("Adjusting Test Settings, TCP, HTTP ...") + response = _patch_test_setting(url_patch_dict, 'http_version') + response = _patch_test_setting(url_patch_dict, 'http_tcp_conns_per_user') + + response = _patch_test_setting(url_patch_dict, 'client_disable_tcp_tw_recycle') + response = _patch_test_setting(url_patch_dict, 'server_disable_tcp_tw_recycle') + + IxLoadUtils.log("Adjusting Test Timeline settings ...") + if url_patch_dict['timeline_settings']['timelineType'] == 0: + rampDownTime = 10 + sustainTime = 180 + _set_timeline_settings(test_settings, rampDownTime, sustainTime) + else: + url_timeline = url_patch_dict['base_url'] + url_patch_dict['timeline_settings']['url'] + timelineType_json = {'timelineType': url_patch_dict['timeline_settings']['timelineType']} + response = requests.patch(url_timeline, json=timelineType_json) + + timeline_json = url_patch_dict['timeline_settings']['advanced'] + response = requests.patch(url_timeline, json=timeline_json) + + advanced_url = url_timeline + "/advancedIteration/segmentList/%s" + for i in range(4): + url = advanced_url % (i) + d_json = {'duration': url_patch_dict['timeline_settings']['advancedIteration']['d{}'.format(i)]} + response = requests.patch(url, json=d_json) + + # Change TCP Connections Established to CPS caption name and to use kRate aggregationType + stats_configured_url = url_patch_dict['base_url'] + url_patch_dict['stats_configured']['url'] + response = requests.get(stats_configured_url, params=None) + stat_url_list = response.json() + for stat in stat_url_list: + if stat['caption'] == 'TCP Connections Established': + objectID = stat['objectID'] + + cps_url = url_patch_dict['stats_configured']['url'] + '/' + str(objectID) + url_patch_dict['cps_aggregation_type']['url'] = cps_url + url_patch_dict['cps_stat_caption']['url'] = cps_url + + response = _patch_test_setting(url_patch_dict, 'cps_aggregation_type') + response = _patch_test_setting(url_patch_dict, 'cps_stat_caption') + + IxLoadUtils.log("Adding new commands %s..." % (list(kNewCommands))) + IxLoadUtils.addCommands(connection, session_url, kNewCommands) + IxLoadUtils.log("Commands added.") + + IxLoadUtils.log("Creating custom traffic maps") + _create_traffic_map(connection, url_patch_dict, nsgs, enis, ip_ranges_per_vpc) + IxLoadUtils.log("Traffic Maps completed") + + IxLoadUtils.log("Clearing chassis list...") + IxLoadUtils.clearChassisList(connection, session_url) + IxLoadUtils.log("Chassis list cleared.") + + IxLoadUtils.log("Adding chassis %s..." % (test_settings.chassisList)) + IxLoadUtils.addChassisList(connection, session_url, test_settings.chassisList) + IxLoadUtils.log("Chassis added.") + + IxLoadUtils.log("Assigning new ports...") + IxLoadUtils.assignPorts(connection, session_url, test_settings.portListPerCommunity) + IxLoadUtils.log("Ports assigned.") + + initial_objective = 6000000 + threshold = 100000 + target_failures = 1000 + MAX_CPS = 9000000 + MIN_CPS = 0 + cps_max_w_ts, failures_dict, test_run_results, latency_ranges = _run_cc_test(connection, session_url, + url_patch_dict, + MAX_CPS, + MIN_CPS, threshold, + target_failures, test_settings, + initial_objective) + + IxLoadUtils.log("Test Complete Final Values") + _print_final_table(test_run_results) + + IxLoadUtils.deleteAllSessions(connection) + diff --git a/test/test-cases/scale/vnet2vnet/48K-ips/testdata_vxlan_8vpc_48K-ips.py b/test/test-cases/scale/vnet2vnet/48K-ips/testdata_vxlan_8vpc_48K-ips.py index 58c973a42..1094135ef 100644 --- a/test/test-cases/scale/vnet2vnet/48K-ips/testdata_vxlan_8vpc_48K-ips.py +++ b/test/test-cases/scale/vnet2vnet/48K-ips/testdata_vxlan_8vpc_48K-ips.py @@ -1,137 +1,137 @@ -import pandas as pd -import os - - -ip_type = "v6" - -testdata = { - "val_map": { - 1: { - "underlay_routing":"BGP",#"BGP" - "oeth": {"mac": "80:09:02:01:00:01", }, - "oipv4": { - "ip": "220.0.1.2", - "ip_step":"0.0.0.1", - "gip": "220.0.1.1", - "gip_step":"0.0.0.1", - "mac": "00:ae:cd:10:7e:c6", - }, - "obgp": {"ip": "220.0.1.2", "dip": "220.0.1.1", "bid": "194.0.0.1", "type": "External", "las": 200, }, - "oipv4pool": {"ip": "221.0.1.1", "ip_step":"0.0.0.1","multiplier": 8}, - "dg_b_ong_eth": {"mac": '00:12:01:00:00:01', }, - "dg_b_ong_ipv4": { - "ip": "221.0.1.1", - "ip_step":"0.0.0.1", - "gip": "101.1.0.1", - "gip_step":"0.0.0.1", - }, - "vxlan": { - "RemoteVmStaticMac": { - "start_value":'00:1b:6e:80:00:01', - "step_value":"00:00:00:01:00:00", - "increments":[("00:00:00:00:00:40", 1000,[])], - "ng_step":'00:00:00:08:00:00' - }, - "RemoteVtepIpv4": '221.0.0.2', - "StaticInfoCount": 6000, - "Vni": 1, - "RemoteVmStaticIpv4": { - "start_value":"1.128.0.1", - "step_value":"0.4.0.0", - "increments":[("0.0.1.0", 1000,[])],"ng_step":"1.0.0.0" - } - }, - - "ieth_local": {"mac": "00:1b:6e:00:00:01",'step':'00:00:00:00:00:01'}, - "iipv4_local": {"ip": "1.1.0.1", "gip": "1.128.0.1","prefix":9,'ip_step':'0.0.0.1','ip_ng1_step':'1.0.0.0','gip_step':'0.0.0.0','gip_ng1_step':'1.0.0.0'}, - }, - 2: { - "underlay_routing":"BGP",#"BGP" - "oeth": {"mac": "80:09:02:02:00:01", }, - "oipv4": { - "ip": "220.0.2.2", - "ip_step":"0.0.0.1", - "gip": "220.0.2.1", - "gip_step":"0.0.0.1", - "mac": "00:ae:cd:10:7e:c6", - }, - "obgp": {"ip": "220.0.2.2", "dip": "220.0.2.1", "bid": "194.0.0.1", "type": "External", "las": 200, }, - "oipv4pool": {"ip": "221.0.2.101","ip_step":"0.0.0.1", "multiplier": 8}, - "dg_b_ong_eth": {"mac": '00:15:01:00:00:01', }, - "dg_b_ong_ipv4": { - "ip": "221.0.2.101", - "ip_step":"0.0.0.1", - "gip": "104.1.0.1", - "gip_step":"0.0.0.1", - - }, - "vxlan": { - "RemoteVmStaticMac": '00:1b:6e:00:00:01', - "RemoteVtepIpv4": '221.0.0.2', - "StaticInfoCount": 1, - "Vni": 101, - "RemoteVmStaticIpv4": "1.1.0.1", - "RemoteVmStaticIpv4": { - "start_value":"1.1.0.1", - "step_value":"0.0.0.1", - "increments":[],"ng_step":"1.0.0.0" - } - }, - "ieth_allow": { - "mac": { - "start_value":'00:1b:6e:80:00:01', - "step_value":"00:00:00:01:00:00", - "increments":[("00:00:00:00:00:80", 500,[])], - "ng_step":'00:00:00:08:00:00' - }, - - }, - "iipv4_allow": { - "ip": { - "start_value":'1.128.0.1', - "step_value":"0.4.0.0", - "increments":[("0.0.2.0", 500,[])], - "ng_step":"1.0.0.0" - }, - "gip": "1.1.0.1", - "gip_step": "0.0.0.0", - "gip_ng_step": "1.0.0.0", - "prefix":9, - "multiplier": 3000 - }, - "ieth_deny": { - "mac": { - "start_value":'00:1b:6e:80:00:01', - "step_value":"00:00:00:01:00:00", - "increments":[("00:00:00:00:00:40", 500,[])], - "ng_step":'00:00:00:08:00:00' - }, - - }, - "iipv4_deny": { - "ip": { - "start_value":'1.128.1.1', - "step_value":"0.4.0.0", - "increments":[("0.0.2.0", 500,[])], - "ng_step":"1.0.0.0" - }, - "gip": "1.1.0.1", - "gip_step": "0.0.0.0", - "gip_ng_step": "1.0.0.0", - "prefix":9, - "multiplier": 3000 - }, - - } - }, - "acl_policies": [ - { - 'src_ip': ['222.0.0.2/32', '222.0.0.2/32'], - 'dst_ip':['222.0.0.1/32', '222.0.0.1/32'], - 'priority':0, - 'action':'allow', - }, - ] -} -#VNI need increment - +import pandas as pd +import os + + +ip_type = "v6" + +testdata = { + "val_map": { + 1: { + "underlay_routing":"BGP",#"BGP" + "oeth": {"mac": "80:09:02:01:00:01", }, + "oipv4": { + "ip": "220.0.1.2", + "ip_step":"0.0.0.1", + "gip": "220.0.1.1", + "gip_step":"0.0.0.1", + "mac": "00:ae:cd:10:7e:c6", + }, + "obgp": {"ip": "220.0.1.2", "dip": "220.0.1.1", "bid": "194.0.0.1", "type": "External", "las": 200, }, + "oipv4pool": {"ip": "221.0.1.1", "ip_step":"0.0.0.1","multiplier": 8}, + "dg_b_ong_eth": {"mac": '00:12:01:00:00:01', }, + "dg_b_ong_ipv4": { + "ip": "221.0.1.1", + "ip_step":"0.0.0.1", + "gip": "101.1.0.1", + "gip_step":"0.0.0.1", + }, + "vxlan": { + "RemoteVmStaticMac": { + "start_value":'00:1b:6e:80:00:01', + "step_value":"00:00:00:01:00:00", + "increments":[("00:00:00:00:00:40", 1000,[])], + "ng_step":'00:00:00:08:00:00' + }, + "RemoteVtepIpv4": '221.0.0.2', + "StaticInfoCount": 6000, + "Vni": 1, + "RemoteVmStaticIpv4": { + "start_value":"1.128.0.1", + "step_value":"0.4.0.0", + "increments":[("0.0.1.0", 1000,[])],"ng_step":"1.0.0.0" + } + }, + + "ieth_local": {"mac": "00:1b:6e:00:00:01",'step':'00:00:00:00:00:01'}, + "iipv4_local": {"ip": "1.1.0.1", "gip": "1.128.0.1","prefix":9,'ip_step':'0.0.0.1','ip_ng1_step':'1.0.0.0','gip_step':'0.0.0.0','gip_ng1_step':'1.0.0.0'}, + }, + 2: { + "underlay_routing":"BGP",#"BGP" + "oeth": {"mac": "80:09:02:02:00:01", }, + "oipv4": { + "ip": "220.0.2.2", + "ip_step":"0.0.0.1", + "gip": "220.0.2.1", + "gip_step":"0.0.0.1", + "mac": "00:ae:cd:10:7e:c6", + }, + "obgp": {"ip": "220.0.2.2", "dip": "220.0.2.1", "bid": "194.0.0.1", "type": "External", "las": 200, }, + "oipv4pool": {"ip": "221.0.2.101","ip_step":"0.0.0.1", "multiplier": 8}, + "dg_b_ong_eth": {"mac": '00:15:01:00:00:01', }, + "dg_b_ong_ipv4": { + "ip": "221.0.2.101", + "ip_step":"0.0.0.1", + "gip": "104.1.0.1", + "gip_step":"0.0.0.1", + + }, + "vxlan": { + "RemoteVmStaticMac": '00:1b:6e:00:00:01', + "RemoteVtepIpv4": '221.0.0.2', + "StaticInfoCount": 1, + "Vni": 101, + "RemoteVmStaticIpv4": "1.1.0.1", + "RemoteVmStaticIpv4": { + "start_value":"1.1.0.1", + "step_value":"0.0.0.1", + "increments":[],"ng_step":"1.0.0.0" + } + }, + "ieth_allow": { + "mac": { + "start_value":'00:1b:6e:80:00:01', + "step_value":"00:00:00:01:00:00", + "increments":[("00:00:00:00:00:80", 500,[])], + "ng_step":'00:00:00:08:00:00' + }, + + }, + "iipv4_allow": { + "ip": { + "start_value":'1.128.0.1', + "step_value":"0.4.0.0", + "increments":[("0.0.2.0", 500,[])], + "ng_step":"1.0.0.0" + }, + "gip": "1.1.0.1", + "gip_step": "0.0.0.0", + "gip_ng_step": "1.0.0.0", + "prefix":9, + "multiplier": 3000 + }, + "ieth_deny": { + "mac": { + "start_value":'00:1b:6e:80:00:01', + "step_value":"00:00:00:01:00:00", + "increments":[("00:00:00:00:00:40", 500,[])], + "ng_step":'00:00:00:08:00:00' + }, + + }, + "iipv4_deny": { + "ip": { + "start_value":'1.128.1.1', + "step_value":"0.4.0.0", + "increments":[("0.0.2.0", 500,[])], + "ng_step":"1.0.0.0" + }, + "gip": "1.1.0.1", + "gip_step": "0.0.0.0", + "gip_ng_step": "1.0.0.0", + "prefix":9, + "multiplier": 3000 + }, + + } + }, + "acl_policies": [ + { + 'src_ip': ['222.0.0.2/32', '222.0.0.2/32'], + 'dst_ip':['222.0.0.1/32', '222.0.0.1/32'], + 'priority':0, + 'action':'allow', + }, + ] +} +#VNI need increment + diff --git a/test/test-cases/scale/vnet2vnet/README.md b/test/test-cases/scale/vnet2vnet/README.md index 89896c1ef..261b09629 100644 --- a/test/test-cases/scale/vnet2vnet/README.md +++ b/test/test-cases/scale/vnet2vnet/README.md @@ -1,101 +1,101 @@ -# VNET to VNET - -The SONiC-DASH testbed provides a common test platform to examine an extensive collection of test cases and allow ease of duplication and modification. The directory structure is arranged for configuring a variety of test SKUs and to reduce testing design time. - -The files found within this directory serve the following purpose: -1. Define a guide for expanding DASH test scenarios. -2. Generate `packets per second` and `connections per second` benchmarks all driven from PyTest. - - -# test cases - -| Test case | Description | -| ---------------------------------------------- | --------------------------------------------------------- | -| [vxlan_1eni_1ip](one-ip) | minimum possible config | -| [vxlan_8eni_48k_IPs](48K-ips) | medium sized config | - - - -# minimum possible config -1 src ip , 1dst ip, 1 UDP port, 1 eni ...... 1-2 flow(s) - -Intent here is to create the smallest, most basic config that will get UDP traffic to pass through in both directions. - -This will prove the basic functionality is there. - -Based on the design of the implementation this test will usually be able to give us also the best or the worst performance numbers. - -obtain PPS and latency numbers - -# minimum possible config, add few UDP ports -This builds on top of the previous test. - -Intent here is to get closer to reality where we will have more than 1 flow at a time. - -For highly parallel implementations have 1 flow per processing unit and it should provide the best performance numbers. - -obtain PPS and latency numbers - -# minimum possible config, with random src and dest UDP ports -builds on top of minimum possible config, but since we have 65K possible source and 65K possible destination ports, we can generate 4 billion unique flows. - -this test can be ran in 2 ways. - -keep the flow expiration timer at 1 sec and see what is the device flow install rate. - -keep the flow expiration timer at `big number` and see how many flows can be installed before device starts misbehaving. - - - is performance slowly degrading ? - - is performance all of a sudden degrading drastically? - - will the device crash? - - will the device recover and return to good performance/functionality once the flows expire and flow tables are not full anymore? - -# minimum possible config, cps test -This test will find the highest CPS by counting the aggregate number of connections established. -- Test uses a binary search algorithm to step up or down the CPS objective - - - -# 48K IPs "baby hero", UDP test -this has full hero test config with 8 ENIs, 6 NSGs per ENI, 1000 ACL policies per NSG, with the only exception that it has only 1 prefix per ACL policy instead of ~200 - -half of ACLs are allow half are deny with alternating IPs - -24K flows will be created over allowed IPs and 24K flows will be sent over the deny IPs - -this test will verify that: - - configuration can scale - - see the scale impact on performance from the minimum config - - see that allow/deny ACLs are respected - -# 48K IPs "baby hero", tcp test -traffic will be sent over the 24K allowed IPs - -test will have full 5M+1M tcp sessions by making use of tcp ports - -connection rate value will be observed while maintaining 6M concurrent sessions - -# few others upcoming tests - - mix of tcp and UDP in same test - - full hero test - - IPv6 version of the tests - - IPv4 with IPv6 mix, 25% IPv4, 25% IPv6, 25% IPv4 over IPv6, 25% IPv6 over IPv4 - - ... -# VNET to VNET - -The SONiC-DASH testbed provides a common test platform to examine an extensive collection of test cases and allow ease of duplication and modification. The directory structure is arranged for configuring a variety of test SKUs and to reduce testing design time. - -The files found within this directory serve the following purpose: -1. Define a guide for expanding DASH test scenarios. -2. Generate two test outcomes using separate traffic generation tools and collecting results using one testing framework: PyTest. -3. Demonstrate testbed setup requires minimum configuration as the test platform provides tools and configuration out of the box. -4. Test one seeks to find the maximum capability of the device under test to measure the raw bandwidth by identifying the Packets Per Second. -5. Test two's goal is to discover the maximum number of functioning connections that can be established per second. - - -# test cases - -| Test case | Description | -| ---------------------------------------------- | -------------------------------------------------------------- | -| [vxlan_1vpc_1ip](one-ip/README.md) | performance numbers for best case scenario | -| [vxlan_8vpc_48K-ips](48K-ips/README.md) | performance with an objective of maintaining 6M parallel flows | +# VNET to VNET + +The SONiC-DASH testbed provides a common test platform to examine an extensive collection of test cases and allow ease of duplication and modification. The directory structure is arranged for configuring a variety of test SKUs and to reduce testing design time. + +The files found within this directory serve the following purpose: +1. Define a guide for expanding DASH test scenarios. +2. Generate `packets per second` and `connections per second` benchmarks all driven from PyTest. + + +# test cases + +| Test case | Description | +| ---------------------------------------------- | --------------------------------------------------------- | +| [vxlan_1eni_1ip](one-ip) | minimum possible config | +| [vxlan_8eni_48k_IPs](48K-ips) | medium sized config | + + + +# minimum possible config +1 src ip , 1dst ip, 1 UDP port, 1 eni ...... 1-2 flow(s) + +Intent here is to create the smallest, most basic config that will get UDP traffic to pass through in both directions. + +This will prove the basic functionality is there. + +Based on the design of the implementation this test will usually be able to give us also the best or the worst performance numbers. + +obtain PPS and latency numbers + +# minimum possible config, add few UDP ports +This builds on top of the previous test. + +Intent here is to get closer to reality where we will have more than 1 flow at a time. + +For highly parallel implementations have 1 flow per processing unit and it should provide the best performance numbers. + +obtain PPS and latency numbers + +# minimum possible config, with random src and dest UDP ports +builds on top of minimum possible config, but since we have 65K possible source and 65K possible destination ports, we can generate 4 billion unique flows. + +this test can be ran in 2 ways. + +keep the flow expiration timer at 1 sec and see what is the device flow install rate. + +keep the flow expiration timer at `big number` and see how many flows can be installed before device starts misbehaving. + + - is performance slowly degrading ? + - is performance all of a sudden degrading drastically? + - will the device crash? + - will the device recover and return to good performance/functionality once the flows expire and flow tables are not full anymore? + +# minimum possible config, cps test +This test will find the highest CPS by counting the aggregate number of connections established. +- Test uses a binary search algorithm to step up or down the CPS objective + + + +# 48K IPs "baby hero", UDP test +this has full hero test config with 8 ENIs, 6 NSGs per ENI, 1000 ACL policies per NSG, with the only exception that it has only 1 prefix per ACL policy instead of ~200 + +half of ACLs are allow half are deny with alternating IPs + +24K flows will be created over allowed IPs and 24K flows will be sent over the deny IPs + +this test will verify that: + - configuration can scale + - see the scale impact on performance from the minimum config + - see that allow/deny ACLs are respected + +# 48K IPs "baby hero", tcp test +traffic will be sent over the 24K allowed IPs + +test will have full 5M+1M tcp sessions by making use of tcp ports + +connection rate value will be observed while maintaining 6M concurrent sessions + +# few others upcoming tests + - mix of tcp and UDP in same test + - full hero test + - IPv6 version of the tests + - IPv4 with IPv6 mix, 25% IPv4, 25% IPv6, 25% IPv4 over IPv6, 25% IPv6 over IPv4 + - ... +# VNET to VNET + +The SONiC-DASH testbed provides a common test platform to examine an extensive collection of test cases and allow ease of duplication and modification. The directory structure is arranged for configuring a variety of test SKUs and to reduce testing design time. + +The files found within this directory serve the following purpose: +1. Define a guide for expanding DASH test scenarios. +2. Generate two test outcomes using separate traffic generation tools and collecting results using one testing framework: PyTest. +3. Demonstrate testbed setup requires minimum configuration as the test platform provides tools and configuration out of the box. +4. Test one seeks to find the maximum capability of the device under test to measure the raw bandwidth by identifying the Packets Per Second. +5. Test two's goal is to discover the maximum number of functioning connections that can be established per second. + + +# test cases + +| Test case | Description | +| ---------------------------------------------- | -------------------------------------------------------------- | +| [vxlan_1vpc_1ip](one-ip/README.md) | performance numbers for best case scenario | +| [vxlan_8vpc_48K-ips](48K-ips/README.md) | performance with an objective of maintaining 6M parallel flows | diff --git a/test/test-cases/scale/vnet2vnet/one-ip/dash_1vpc_1ip_peer.json b/test/test-cases/scale/vnet2vnet/one-ip/dash_1vpc_1ip_peer.json index 32f2a2c31..2ff56e485 100644 --- a/test/test-cases/scale/vnet2vnet/one-ip/dash_1vpc_1ip_peer.json +++ b/test/test-cases/scale/vnet2vnet/one-ip/dash_1vpc_1ip_peer.json @@ -172,4 +172,4 @@ } ] -} \ No newline at end of file +} diff --git a/test/test-cases/utils/README.md b/test/test-cases/utils/README.md index 9788f9918..fcbe819b3 100644 --- a/test/test-cases/utils/README.md +++ b/test/test-cases/utils/README.md @@ -1,2 +1,2 @@ # utils -This directory contains miscellaneous utilities used in tests. \ No newline at end of file +This directory contains miscellaneous utilities used in tests. diff --git a/test/third-party/traffic_gen/README.md b/test/third-party/traffic_gen/README.md index f38cc54df..6555db894 100644 --- a/test/third-party/traffic_gen/README.md +++ b/test/third-party/traffic_gen/README.md @@ -9,4 +9,4 @@ Ixia-c supports client APIs in various languages, most prevalent being [snappi]( * Vendor-neutral [Open Traffic Generator](https://github.com/open-traffic-generator) model and API * [Ixia-c](https://github.com/open-traffic-generator/ixia-c), a powerful traffic generator based on Open Traffic Generator API * [Ixia-c Slack support channel](https://github.com/open-traffic-generator/ixia-c/blob/main/docs/support.md) -* [Keysight Elastic Network Generator](https://www.keysight.com/us/en/products/network-test/protocol-load-test/keysight-elastic-network-generator.html), a commercial version of Ixia-c with L3 protocol engine, no restrictions on performance and scalability, priority technical support. \ No newline at end of file +* [Keysight Elastic Network Generator](https://www.keysight.com/us/en/products/network-test/protocol-load-test/keysight-elastic-network-generator.html), a commercial version of Ixia-c with L3 protocol engine, no restrictions on performance and scalability, priority technical support. diff --git a/test/third-party/traffic_gen/deployment/README.md b/test/third-party/traffic_gen/deployment/README.md index b85803d20..b781b6a95 100644 --- a/test/third-party/traffic_gen/deployment/README.md +++ b/test/third-party/traffic_gen/deployment/README.md @@ -6,4 +6,4 @@ Deployment is done using `docker-compose` and configuration file [ixia-c-deployment.yml](ixia-c-deployment.yml) and by setting up veth pairs (assumed already in-place by the test environment before docker-compose is called). Future considerations - - [Containerlab](https://containerlab.dev/), a CLI for orchestrating and managing container-based networking labs. \ No newline at end of file + - [Containerlab](https://containerlab.dev/), a CLI for orchestrating and managing container-based networking labs. diff --git a/test/third-party/traffic_gen/deployment/ixia-c.drawio.svg b/test/third-party/traffic_gen/deployment/ixia-c.drawio.svg index 006e60b95..abd16fc39 100644 --- a/test/third-party/traffic_gen/deployment/ixia-c.drawio.svg +++ b/test/third-party/traffic_gen/deployment/ixia-c.drawio.svg @@ -1,4 +1,4 @@ -
veth1
veth1
bmv2
bmv2
ixia-c-controller

:443
ixia-c-controller...
snappi
Client
snappi...
Ixia-C Deployment for Bidrectional Traffic
Ixia-C Deployment for Bidrectional Traffic
ixia-c-traffic-engine

:5555
ixia-c-traffic-engine...
ixia-c-traffic-engine

:5556
ixia-c-traffic-engine...
veth3
veth3
Open Traffic Generator API
Open Traffic Ge...
veth0
veth0
veth2
veth2
veth1
veth1
veth3
veth3
Text is not SVG - cannot display
\ No newline at end of file +
veth1
veth1
bmv2
bmv2
ixia-c-controller

:443
ixia-c-controller...
snappi
Client
snappi...
Ixia-C Deployment for Bidrectional Traffic
Ixia-C Deployment for Bidrectional Traffic
ixia-c-traffic-engine

:5555
ixia-c-traffic-engine...
ixia-c-traffic-engine

:5556
ixia-c-traffic-engine...
veth3
veth3
Open Traffic Generator API
Open Traffic Ge...
veth0
veth0
veth2
veth2
veth1
veth1
veth3
veth3
Text is not SVG - cannot display