---
# System prepended metadata

title: SPIRS CCIPS DEMO

---

# SPIRS CCIPS DEMO
![](https://hackmd.io/_uploads/r1huJBjH3.png)

# VMS:
* CCIPS1: agent1 with enarx
* CCIPS2: agent2
* CCIPSC: Controller
* Router: Intermediate machine between CCIPS1 and CCIPS2 (acting as the 5G infra)

# Commands initilization:

* CCIPS1:
```bash
# In the terminal run
cd /shared/ccips-agent/trusted_app
./run_enarx.sh
# In the other terminal
docker run -it --rm --name ccips_agent --network host --cap-add ALL ccips_agent_enarx
```

* CCIPS2:
```bash
# In the terminal run
docker run -it --rm --name ccips_agent --network host --cap-add ALL ccips_agent
```

* Controller:
```bash
docker run -it --rm --name ccips_controller -p 5000:5000 ccips_controller
```

* Router:
It already has ip forwarding set, so we only need to run the tcpdump:
```bash
sudo tcpdump -i any -n esp or icmp
```

# Establishing the IP Tunnel
```bahs
# In the controller execute the followin
curl -X 'POST' \
  'http://localhost:5000/ccips' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "nodes": [
      {
        "ipData": "10.10.10.100",
        "ipControl": "192.10.10.101"
      },
    {
      "ipData": "10.10.20.200",
      "ipControl": "192.10.10.102"
    }
  ],
  "encAlg": [
    "3-des-cbc"
  ],
  "intAlg": [
    "sha1"
  ],
  "softLifetime": {
    "nTime": 25
  },
  "hardLifetime": {
    "nTime": 50
  }
}'
```

