Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TwoQS: A Two-Color Queuing Scheme for Green Traffic QoS Protection in IP Networks

TwoQS is a deterministic queue management mechanism for IP routers that guarantees the delivery of in-profile (green) traffic while providing bounded queuing delay. Excess (yellow) traffic is allowed to opportunistically utilize unused network resources and is deterministically discarded only when necessary to preserve the guarantees offered to conformant traffic.

For a complete description of the architecture, algorithms, and performance evaluation, please refer to the accompanying paper:

TwoQS: A Two-Color Queuing Scheme for Green Traffic QoS Protection in IP Networks


Repository Structure

.
├── cqs_files/              # Linux kernel queueing disciplines
│   └── iproute2_files/           # Traffic Control (tc) userspace extensions
├── VNX_scenario/           # Virtual testbed and experiment scenarios
│   ├── ExperimentA/
│   └── ExperimentB/
└── README.md

Requirements

TwoQS has been developed and tested on Linux (Ubuntu is recommended).

System Dependencies

Install the required system packages:

sudo apt update

sudo apt install \
    build-essential \
    linux-headers-$(uname -r) \
    make \
    gcc \
    python3 \
    python3-pip \
    iproute2 \
    tcpreplay \
    tcpdump

Python Dependencies

Install the required Python libraries:

pip3 install \
    scapy==2.6.1 \
    matplotlib==3.10.3 \
    numpy==2.2.6 \
    tikzplotlib==0.10.1

VNX

The experimental scenarios require VNX (Virtual Networks over Linux).

Installation instructions are available at:

https://web.dit.upm.es/vnxwiki/index.php/Main_Page


Installation

1. Build the Linux Queueing Disciplines

The kernel modules are located in:

cqs_files/

Compile the modules:

cd cqs_files

make -C /lib/modules/$(uname -r)/build M=$PWD clean
make -C /lib/modules/$(uname -r)/build M=$PWD modules

Load the generated kernel modules:

sudo insmod sch_bfifo_cc.ko
sudo insmod sch_cdrr.ko

2. Build the tc Userspace Extensions

TwoQS includes custom Traffic Control (tc) extensions that allow configuring the new queueing disciplines from userspace.

Clone the official iproute2 repository:

git clone https://git.kernel.org/pub/scm/network/iproute2/iproute2.git

Copy the TwoQS source files into the iproute2 source tree:

cp iproute2_files/*.c iproute2/tc/

Load header files to the corresponding include/uapi/linux/ directory:

cp iproute2_files/tc_bfifo_cc.h iproute2/include/uapi/linux/

Modify iproute2/tc/Makefile and add the new queueing discipline objects to the TCOBJ variable: q_bfifo_cc.o q_cdrr.o

Then build iproute2:

cd iproute2

./configure
make

The newly built binary can be executed directly as:

./tc/tc

To replace the system-wide tc binary:

sudo cp ./tc/tc /usr/bin/tc

After installation, the new queueing disciplines will be available through the standard tc command.


Running the Experimental Scenario

The complete experimental testbed is located in:

VNX_scenario/

Deploy the virtual topology:

cd VNX_scenario

sudo vnx -f scenario.xml -t

Configure the routers and marker element:

sudo vnx -f scenario.xml -x config_routers

After these commands, the experimental environment is ready.


Running the Experiments

Two experimental scenarios are included with the repository.

Experiment A

cd VNX_scenario/ExperimentA

python3 traffic_gen.py
./run_experiments.sh

Experiment B

cd VNX_scenario/ExperimentB

python3 traffic_gen.py
./run_experiments.sh

Citation

If you use TwoQS in your research, please cite:

TwoQS: A Two-Color Queuing Scheme for Green Traffic QoS Protection in IP Networks


License

License

This repository contains modifications and derivative works based on Linux kernel code licensed under the GNU General Public License v2.0 or later (GPL-2.0-or-later).

Accordingly, the source code in this repository is distributed under the terms of the GPL-2.0-or-later license.

See the LICENSE file for the complete license text.

Copyright (c) 2026 Aitor Encinas Alonso

About

Queuing Schemes to ensure per-flow traffic guarantees and bounded latencies.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages