Skip to content

Network packet simulator for emulating various network types in order to test the behavior of the UT2, TCP, QUIC, QUICHE protocols

Notifications You must be signed in to change notification settings

dronnikovigor/NetPackets-Simulator

Repository files navigation

This is network packet simulator for emulating various network types in order to test the behavior of the UT2, TCP, QUIC, QUICHE protocols.

Functionality

This network packet simulator supports such features as:

  • RTT
  • Bandwidth limiting
  • Separate rates for upload/download channels
  • Setting amount of file sizes
  • Setting amount of requests
  • Ability to test different combinations of loss
  • Congestion control window
  • Multi-client routing support
  • Dumping and collecting sent statistic

How to start

Requirements

Strong
  • Linux
  • JDK 8 or higher (note to set $JAVA_HOME to PATH)
Optionally
  • valgrid - for checking memory leaks

  • tshark - for dumping packets (NB: https://gist.github.com/MinaMikhailcom/0825906230cbbe478faf4d08abe9d11a)

  • built QUIC from Chromium sources for QUIC tests (check for it: https://www.chromium.org/quic/playing-with-quic). Before starting QUIC tests it's needed to generate certificates and add them to CA store.

    1. Run:
      ${PATH_TO_CHROMIUM}/src/net/tools/quic/generate-certs.sh
      
    2. Run:
      sudo apt install libnss3-tools
      
    3. Run
      sudo bash add-certs-to-stores.sh ${PATH_TO_CHROMIUM}/src/net/tools/quic/certs/out/2048-sha256-root.pem "QUIC Server Root CA"
      

    Next times it could be set up using script (remember to configure paths in the script):

    ./set_up_quic.sh
    
  • built QUICHE from sources for QUICHE tests (check for it: https://github.com/cloudflare/quiche)

How to run

  1. Build project with dependencies:
    ./gradlew build -x test 
  2. Set up TUN/TAP environment:
    ./set_up.sh
    
  3. Run all tests:
    ./gradlew cleanTest test --tests "one.transport.ut2.testing.stand.TestStand" --info
    
    To run certain tests use this commands:
    • TCP:
    ./gradlew cleanTest test --tests "one.transport.ut2.testing.stand.TestStand.PureTcpDataTransferTest" --info
    
    • UT2:
    ./gradlew cleanTest test --tests "one.transport.ut2.testing.stand.TestStand.Ut2UdpDataTransferTest" --info
    
    • QUIC:
    ./gradlew cleanTest test --tests "one.transport.ut2.testing.stand.TestStand.QuicDataTransferTest" --info
    
    • QUIC->QUICHE:
    ./gradlew cleanTest test --tests "one.transport.ut2.testing.stand.TestStand.QuicQuicheDataTransferTest" --info
    
    • QUICHE:
    ./gradlew cleanTest test --tests "one.transport.ut2.testing.stand.TestStand.QuicheDataTransferTest" --info
    
  4. Set down environment:
    ./set_down.sh
    

Configuration

There are two files for configuring tests:

  • application.properties
    This file contains variables for environment. It's needed to change variables related to QUIC/QUICHE before running QUIC/QUICHE tests.
  • configuration.json
    This file contains parameters for setting up test cases.

Additional

About TUN/TAP

https://www.kernel.org/doc/Documentation/networking/tuntap.txt

About

Network packet simulator for emulating various network types in order to test the behavior of the UT2, TCP, QUIC, QUICHE protocols

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published