Containerlab configs for Hackathon
You need to setup your env a bit first. ideal would be to have poetry
working from the parent repo.
If you dont have poetry at all, then try this:
curl -sSL https://install.python-poetry.org | python3 -
If you do, you can prefix all the python
commands below with poetry run
.
If somehow, you dont (there is a weird thing with poetry 1.4.2 at time of writing), then you can use the requirements.txt in this repo as follows:
# start in the root of the repo
# make a venv
python3 -m venv .venv
# activate it
source .venv/bin/activate
# move into the hackathon folder
cd hackathon
# install the python env
pip3 install -r requirements.txt
Now you have a working env (or poetry working) here is the basics (all from within the hackathon
folder):
Option1: simply make deploy-hackathon
(we assume you have jq
installed btw. who doesnt?)
Option2:
sudo containerlab deploy -c --topo hackathon-topo.yml
cp clab-hackathon/ansible-inventory.yml hackathon-inventory.yml
python3 baseline_acl_test_topo.py
./add-saved-objects.sh
- Check the docker hosts have the correct static MAC Addrs and IPs:
docker exec clab-hackathon-srv1 /sbin/ip -- addr show dev eth1
docker exec clab-hackathon-srv2 /sbin/ip -- addr show dev eth1
- If the IPs are not correct, you can fix them with these commands:
docker exec clab-hackathon-srv1 /sbin/ip -- link set address 00:c1:ab:00:00:01 dev eth1 2>/dev/null
docker exec clab-hackathon-srv1 /sbin/ip -- addr add 192.168.0.1/24 dev eth1 2>/dev/null
docker exec clab-hackathon-srv2 /sbin/ip -- link set address 00:c1:ab:00:00:02 dev eth1 2>/dev/null
docker exec clab-hackathon-srv2 /sbin/ip -- addr add 192.168.0.2/24 dev eth1 2>/dev/null
To access the Servers:
docker exec -it clab-hackathon-srv1 bash
docker exec -it clab-hackathon-srv2 bash
To access the leaves:
docker exec -it clab-hackathon-leaf1 sr_cli
docker exec -it clab-hackathon-leaf2 sr_cli
Kibana is here
- In the dashboard section there is "Example Fabric Dashboard"
- In the discover section there is the index "fabric-logs-*" which is where the syslogs land
- Make sure the servers can reach the anycast GW:
- Both:
ping 192.168.0.254
- Both:
- Make sure the servers can reach each other:
- SRV1:
ping 192.168.0.2
- SRV2:
ping 192.168.0.1
- SRV1:
- Test TCP ports:
- SRV1:
nc -l 80
- SRV2:
nc -vw2 192.168.0.1 80
- SRV1: