This repository contains the SCHC testing and learning Docker-based environment.
The Docker image, based on Ubuntu 22.04, includes the CORE emulation project, which allows for easy setup and configuration of network environments for learning and experimentation.
Additionally, the provided XML file outlines the typical architecture for a SCHC solution. Paired with openschc, this architecture includes all the necessary components and configurations needed to implement SCHC in a network environment.
By utilizing this docker-based learning environment and the provided XML file, you can easily set up and explore SCHC solutions in a controlled and hands-on manner. This repository is a valuable resource for those looking to deepen their understanding of network protocols and compression techniques.
- Make sure Docker is installed on your system (try running
docker info). Follow the installation procedure according to your platform, as well as the post-installation steps to manage docker as a non-root user.
- Example for Ubuntu:
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
# Install the Docker packages:
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# Manage Docker as a non-root user:
sudo groupadd docker
sudo usermod -aG docker $USER
echo "Log out and log back in so that your group membership is re-evaluated."- Clone openschc and switch to the
MOOCbranch.
cd ~
git clone https://github.com/ltn22/openschc.git
cd openschc && git checkout MOOC- Clone this repository and use the
schc-dlab.shscript, a command manager for the SCHC Docker Lab container.
cd ~
git clone https://github.com/openschc/schc-dlab.git
cd schc-dlab && ./schc-dlab.sh -hThe available commands are:
| Command | Description |
|---|---|
| install | Build and run the schc-dlab docker container |
| start | Start the schc-dlab container |
| core | Open the CORE program |
| wireshark | Open Wireshark |
| bash | Open a bash session within the container |
| stop | Stop the schc-dlab container |
| remove | Remove the schc-dlab container and image |
- Specify the location of your
openschc/directory andinstallthe schc-dlab container. This step might take a while.
export OPENSCHC_DIR=/home/coder/openschc # <-- location of your openschc directory.
./schc-dlab.sh installNote: Your existing openschc repository will be mounted onto the schc-dlab container, so any changes remain persistent on your local drive and in the container. This means you can edit the openschc files locally using your favorite text editor.
- With the Docker container up and running (check with
docker ps), run thecore-daemonandcore-guischc-dlab commands. The CORE program will open.
./schc-dlab.sh core-daemon
./schc-dlab.sh core-gui-
Click on
File > Open...and choose theschc-ping.xmlfile. Run the simulation using the greenStart Sessionbutton. Double-click on each computer icon to access thedevice,core, orAppsystem terminals. From here, you can follow the tutorials on The Book Of SCHC or test your own SCHC applications. -
When done, you can use the
stopschc-dlab command to stop the docker container. Next time you want to use it, just run thestartcommand. If you want to "uninstall" schc-dlab, use theremovecommand.