# Run a docker Debian10-based container in interactive mode
docker pull debian:buster
docker run -it --detach --entrypoint /bin/bash --name multione_docker debian:buster

# Copy project from host
docker cp cernbox/gitlab_workspace/multione/02_multione_sim multione_docker:/

# Attach to the container
docker attach --detach-keys "ctrl-p" multione_docker

# Install libraries and packets
apt-get update &&\
apt-get install git -y &&\
apt-get install wget -y &&\
apt-get install tmux -y &&\
apt-get install nano -y &&\
apt-get install telnet -y &&\
apt-get install iperf3 -y &&\
apt-get install default-jre-headless --no-install-recommends -y &&\
apt-get install net-tools

# Download freeRtr
wget freertr.net/rtr.jar

# Load topology
cd multione/
chmod +x start-topology.sh
./start-topology.sh

# Kill tmux
tmux kill-server

# Access the router R11
telnet 127.0.0.1 2525

# Ping between loopbacks
# Both clients belong to the same experiment
[PING R11 (CMS) -> R44 (CMS)]   R11# ping fd01:40::44 vrf VRF_EXT source loopback100             ---- It should go through VLAN 30 because there is no flow label
[PING R11 (CMS) -> R44 (CMS)]   R11# ping fd01:40::44 vrf VRF_EXT source loopback100 flow 65540  ---- It should go through VLAN 20 because it matches the CMS flow label
[PING R11 (CMS) -> R44 (CMS)]   R11# ping fd01:40::44 vrf VRF_EXT source loopback100 flow 65539  ---- It should go through VLAN 30 because it does not matches the CMS flow label
# The clients belong to a different experiments
[PING R11 (CMS) -> R33 (ATLAS)] R11# ping fd01:30::33 vrf VRF_EXT source loopback100             ---- It should go through VLAN 30 because there is no flow label
[PING R11 (CMS) -> R33 (ATLAS)] R11# ping fd01:30::33 vrf VRF_EXT source loopback100 flow 65540  ---- It should not be a ping because R11 tries to use VRF_CMS but R33 belong to VRF_ATLAS
[PING R11 (CMS) -> R33 (ATLAS)] R11# ping fd01:30::33 vrf VRF_EXT source loopback100 flow 65539  ---- It should go through VLAN 30 because it does not matches the CMS/ATLAS flow label 
[PING R11 (CMS) -> R33 (ATLAS)] R11# ping fd01:30::33 vrf VRF_EXT source loopback100 flow 131072 ---- It should not be a ping because R11 tries to use VRF_ATLAS but it does not belong to ATLAS experiment

R1: AMS
R2: POZ
R3: BUD
R4: FRA