This repository contains Python implementations for the components of a PSAMP (RFC 5476: Packet Sampling based Packet Selection Architecture. The purpose of this architecture is to provide an innovative application for the PSAMP architecture for packet filtering to support various kinds of network functions.
This repository contains implementations of two PSAMP Devices:
-
psamp_device.py: This component acts as an Observation Point that listens to a network interface, Metering Process and Exporting Process. It is responsible for exporting PSAMP protocol messages and connects to the PSAMP_Collector.py.
-
psamp_collector.py: This component incorporates a Collecting Process and a network function. It is responsible for collecting PSAMP protocol messages and is connected to the PSAMP_Device.py.
Both components are configured to be executed on the same host. For further insights on the implementation read the implementation chapter of the accompanying thesis thesis_packet-selection_tristan-doering.pdf
.
The PSAMP Python implementation has been tested under Debian Bullseye, but should work under most Linux distributions. Follow these steps to install it on a local machine:
- Clone this repository to your local machine.
- Install the required Python modules (scapy, matplotlib).
- Configuration of the devices via the config.json files in
code/configs
, configuration is standardized adhering to the Configuration Model in RFC6728. - Execute both PSAMP_Collector.py and PSAMP_Device.py located in
code
.
In order to provide reproducible tests, POS-Scripts (Plain Orchestrating Service) were used for the execution of all tests. There are two different variants of the script provided in this repository at code/experiments/experiment_setup
:
- Vermont + Python implementation
- Python implementation components only
The script consists of two parts that are executed on two test nodes directly connected via Ethernet. Follow these steps to execute the script:
- Configure the global parameters for the POS script.
- Execute the script with two connected test nodes.
- The test results are now available at the first test node where the Python implementation was executed.
If you have any questions or issues with the PSAMP Packet Selection Architecture, please contact Tristan Döring. Every feedback or contribution to this project is welcome.