Skip to content
This repository has been archived by the owner on Sep 14, 2022. It is now read-only.

add Xena functionality #153

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions README-Valkyrie2544.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Valkyrie2544


## Installation / Setup

1. Download the trafficgen git repository
```
git clone https://github.com/atheurer/trafficgen
```

2. For Linux, install Mono (https://www.mono-project.com/):
* instructions are for CentOS/RHEL/Fedora, other distros please refer to https://www.mono-project.com/download/stable/#download-lin
* commands should be run in a root shell
* Add Mono repo to system
```bash
rpmkeys --import "http://pool.sks-keyservers.net/pks/lookup?op=get&search=0x3fa7e0328081bff6a14da29aa6a19b38d3d831ef"
su -c 'curl https://download.mono-project.com/repo/centos8-stable.repo | tee /etc/yum.repos.d/mono-centos8-stable.repo'
```
* Install Mono
```bash
yum install mono-complete
```
3. Download the latest copy of Valkyrie2544.exe and the x2544 config file from the control box

4. Make sure both Valkyrie2544.exe and config file are present in the local trafficgen repo folder

## Running
Arguments:
* `--traffic-profile <path_to_config_file>` : saved from Valkyrie2544.exe GUI with your config.

* `--valkyrie2544-smart_search` : enable smart search, if verify fails will resume the search at the half way point between the last verify attempt and the minimum search value. Otherwise the search will resume at the last verify attempt value, minus the value threshhold.

* `--validation-runtime` : sets the length of verification in seconds
> Default : 600 (10 minutes)

* `--max-retries` : Maximum number of verify attempts before giving up
> Default : 1

* `--valkyrie2544-pdf_output` : Output PDF file. By default output of PDF report is disabled. Will cause a crash on linux usually as a pdf renderer is not installed.

* `--valkyrie2544-windows_mode` : Enable windows mode. By default the mono package will be used to run the .exe file. If running on windows this is not necessary.

* `--search-runtime` : Modify original config to use the duration specified.

* `--valkyrie2544-packet_sizes` : Customize packet sizes for throughput testing

* `--max-loss-pct` : Specify number of packages which can be lost as a percentage ([0 - 100])

* `--valkyrie2544-save_file_name` : Save config file which was created with the new arguments passed to this command.
> Default : `./2bUsed.x2544`

* `--valkyrie2544-initial_tput` : Specify initial rate for throughput test

* `--rate` : Specify maximum rate for throughput test

* `--min-rate` : Specify minimum rate for throughput test

* `--valkyrie2544-resolution_tput` : Specify resolution for throughput testing

* `--src-macs`: MAC address that becomes source of first active entity and destination for second (if two exist).

* `--dst-macs` : If specified, becomes destination of first active entity and source for second

* `--src-ips` : IP address that becomes source of first active entity and destination for second (if two exist).

* `--dst-ips` : If specified, becomes destination of first active entity (src-ips) and source for second

* `--use-src-ip-flows` / `--use-dst-ip-flows` : Apply flows to both MAC and IP addresses (if enabled overrides MAC flows option). Invoking either src-ip or dst-ip, or both, yields the same result
> Default : 1

* `--use-src-mac-flows` / `--use-dst-mac-flows` : Apply flows to MAC addresses only (overridden if IP flows are enabled). Invoking either src-mac or dst-mac, or both, yields the same result
> Default: 1

* `--xena_module` : Specify int corresponding to the Xena chassis module number.

114 changes: 114 additions & 0 deletions README-XenaVerify.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Xena2544ThroughputVerify
## Setup:

1. For linux Install Mono ->

```bash
rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"
```

```bash
yum-config-manager --add-repo http://download.mono-project.com/repo/centos/
```

```bash
yum -y install mono-complete-5.8.0.127-0.xamarin.3.epel7.x86_64
```

2. If python 3 not installed, install python 3. For RHEL instructions are below->

```
cat <<'EOT' >> /etc/yum.repos.d/python34.repo

[centos-sclo-rh]

name=CentOS-7 - SCLo rh

baseurl=http://mirror.centos.org/centos/7/sclo/$basearch/rh/

gpgcheck=0

enabled=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo

EOT
```

# install python34 scl package

```bash
yum -y install rh-python34 rh-python34-python-tkinter
```

# cleanup python 34 repo file

```bash
rm -f /etc/yum.repos.d/python34.repo
```

3. Enable python34 -> `scl enable rh-python34 bash`

4. Make sure Valkyrie2544.exe is present in the current folder (formerly Xena2544.exe)

5. Copy your x2544 config file to the script folder

## Arguments to run this script:

* `-f <path_to_config_file>` : saved from Valkyrie2544.exe GUI with your config.

* `[-s]` : enable smart search, if verify fails will resume the search at the half way point between the last verify attempt and the minimum search value. Otherwise it will just resume at the last verify attempt value minus the value threshhold.

* `[-l <verify_length_in_seconds>]` :
> Default : 7200 (2 hours)

* `[-r <retry_attempts>]` : Maximum number of verify attempts for giving up
> Default : 10

* `[-d]` : Enable debug mode

* `[-p]` : Output PDF file. By default output of PDF report is disabled. Will cause a crash on linux usually as a pdf renderer is not installed.

* `[-w]` : Enable windows mode. By default it will use the mono package to run the exe file. If running on windows this is not necessary.

* `[-t <search_trial_duration_in_seconds>]` : Modify original config to use the duration specified.
> Default : 0

* `[-k <packet_size>+]` : Customize packet sizes for throughput testing

* `[-a <acceptable_loss>]` : Specify number of packages which can be lost as a percentage ([0 - 100])

* `[-v <save_file_name>]` : Save config file which was created with the new arguments passed to this command.
> Default : `./2bUsed.x2544`

* `[-i <initial_tput>]` : Specify initial rate for throughput test

* `[-M <max_tput>]` : Specify maximum rate for throughput test

* `[-m <min_tput>]` : Specify minimum rate for throughput test

* `[-o <resolution_tput>]` : Specify resolution for throughput testing

* `[-n <mac_address> [<mac_address>]]` : First MAC address becomes source of first active entity and destination for second (if two exist). Vice versa for the optional second argument.

* `[-c <connection_ip> [<connection_ip>]]` : First IP address becomes source of first active entity and destination for second (if two exist). Vice versa for the optional second argument.

* `[-u {1|1k|4k|10k|100k|1M}]` : Specify hardware modifier flows. Default behavior is to apply this to source and destination IP addresses
* `[-b]` : Apply flows to both MAC and IP addresses (overrides `[-e]`)
* `[-e]` : Apply flows to MAC addresses only

* `--module` : Specify int corresponding to the Xena chassis module number.

## Sample execution:

> Runs a 60 second trial with a 600 second verify using the myconfig.x2544 configuration file.

```bash
python XenaVerify.py -f myconfig.x2544 -s -l 600 -t 60
```

#### Improvements to be done

* Add debug logging

* Add more customized options for modifying the running config
Loading