GithubHelp home page GithubHelp logo

voldien / snt Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 452 KB

Simple Network Tool - Network Benchmark Measurement Tool

License: GNU General Public License v3.0

Makefile 1.15% C 77.02% Roff 2.22% Lua 9.13% Shell 0.89% CMake 9.59%
network-tools command-line-tool server-client wireshark compression encryption network-benchmark network-analyzer network-measurement

snt's Introduction

SNT - Simple Network Tool

Actions Build Status License: GPL v3 GitHub release

snt - simple-network-tool is a network tool for performing network performance tests. The program supports multiple benchmark modes for testing various aspect of the network. The benchmark can use compression and encryption optionally in order to check how encryption and compression will change the network performance.

The snt program uses the server/client connection model. Where the server and client is executed on the same executable binary.

Benchmark modes

  • Performance - Send as much data as possible by specified payload size.
  • Integrity - Sends a number sequence or time stamp to compare the arrival in order to check if they arrived in a consecutive order or not.
  • File-Transfer - Send a file, used for repeatable benchmark testing when using encryption and compression.

Motivation

This project was created for educational purposes. It was created in order learn about creating a secure connection with asymmetric and symmetric ciphers.

Installation

The program is installed with the following commands.

mkdir build
cd build
cmake ..
make

Wireshark

The wireshark dissector for decoding snt packets with the wireshark program can be installed with the following command:

make install_wireshark

This will install a lua script in the $(USER)/.wireshark directory.

Service

The service script can be installed to run the snt program as a deamon service. This can be done with the following command:

make insall_service 
make install_systemd_service

The service can be started as followed:

service sntd start

Certificates

The snt program support loading certificate and PEM files at startup. The snt default settings is to load a certifcate and a PEM file from the filesystem. The following command will generate the certificate, private key and diffie hellman parameter. This may take a long time because diffie hellman is set to 2048 bit. This can overriden by appending the argument DHPARAM=1024, this would change the diffie hellman from its default 2048 bit to 1024 bit.

make cert
make install_cert

Examples

This section cover some examples of how to use the snt program. See snt(1) for what command line options are available for usage.

Client

Running in client mode requires at least the -h option with the hostname or IP address argument of the server that it shall connect to. The snt program is by default set to run as a client.

snt -h localhost --secure --compression -b performance --verbose

Using the file benchmark mode.

snt -h localhost --secure --compression -b file --file='valid path' --verbose

Specifying a compression algorithm. Valid options are: lz4, gzip, and bzip2.

snt -h localhost --secure --compression=lz4

Specifying a symmetric cipher algorithm. Valid options are: aesecb128, aesecb192, aesecb256, blowfish, des, 3des, aescbc128, aescbc192, aescbc256, aescfb128, aescfb192, aescfb256, aesofb128, aesofb192, aesofb256, 3descbc, bfcbc, bfcfb, rc4, cast, castcbc and castcfb.

snt -h localhost --secure --cipher=aescbc128

Server

The server mode requires at least that the --server option is specified in order for the snt program to run in server mode.

snt --server --secure --compression=all --verbose

Set the affinity mapping that has the following format: CPU, core index, number of adjacent cores.

snt --server affinity=0,1,2

Contributing

Please read the CONTRIBUTING.md for more details of how you can contriubute.

Dependencies

In order to compile the program, the following Debian packages is required.

apt-get install libzip-dev liblz4-dev libssl1.0-dev libbz2-dev

In order to use the system v service, the following Debian package is required.

apt-get install daemon

License

This project is licensed under the GPL+3 License - see the LICENSE file for details.

snt's People

Contributors

voldien avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

snt's Issues

SSL API issue

Several of the SSL API that the program uses are SSL low-level API. It seems to have been removed in the newer version of libssl and thus the program might not compile properly anymore unless there are some macro flags that can be used that expose those low-level API.

Invalid client argument

When the server receives a invalid client option such as using a secure connection and the server is not set to support SSL. The server crashes as a result of bad file descriptor.

High transfer rate.

When running the snt program with the --quite argument and with high transfer rate will cause the benchmark to fail and and terminate.

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.