From b6e7ee46f1310c19e5f61d9dabf3d425937f6309 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Ara=C3=BAjo?= <davidaraujo@av.it.pt>
Date: Tue, 9 Jul 2024 15:06:43 +0100
Subject: [PATCH] Corrected

Limit the static configuration of devices

README added

SRL cli configs
---
 hackfest/containerlab/README.md             | 35 +++++++++++++++++++++
 hackfest/containerlab/srl.cli               |  2 ++
 hackfest/containerlab/srl1.cli              | 16 ----------
 hackfest/containerlab/srl2.cli              | 16 ----------
 hackfest/containerlab/tfs-scenario.clab.yml |  4 +--
 5 files changed, 39 insertions(+), 34 deletions(-)
 create mode 100644 hackfest/containerlab/README.md
 create mode 100644 hackfest/containerlab/srl.cli
 delete mode 100644 hackfest/containerlab/srl1.cli
 delete mode 100644 hackfest/containerlab/srl2.cli

diff --git a/hackfest/containerlab/README.md b/hackfest/containerlab/README.md
new file mode 100644
index 000000000..e08e944e9
--- /dev/null
+++ b/hackfest/containerlab/README.md
@@ -0,0 +1,35 @@
+# ContainerLab
+
+The setup consists of a management network for configuring and managing nodes.
+srl1 and srl2 are interconnected.
+client1 is connected to srl1 and client2 to srl2.
+Routing between client1 and client2 is set up via the Nokia SR Linux nodes.
+
+## Management Network
+Name: mgmt-net
+Subnet: 172.100.100.0/24
+
+## Node Kinds
+Nokia SR Linux: Image ghcr.io/nokia/srlinux:23.10.3
+Linux: Image ghcr.io/hellt/network-multitool
+
+## Nodes
+
+### Nokia SR Linux
+- Type: ixr6
+- CPU: 0.5
+- Memory: 2GB
+- Management IP: 172.100.100.101
+
+The provided SR Linux CLI commands in the _srl.cli_ enables system management and configures the GNMI server with OpenConfig models.
+
+### Linux
+
+Assigns IP 172.16.1.10/24 to eth1 and adds route to 172.16.2.0/24 via 172.16.1.1
+
+In this topology file, the clients are pre-configured with the respectivly IP addresses in their interfaces and routes in their IP tables.
+
+### Links
+- Connect srl1:e1-1 to srl2:e1-1
+- Connect client1:eth1 to srl1:e1-2
+- Connect client2:eth1 to srl2:e1-2
\ No newline at end of file
diff --git a/hackfest/containerlab/srl.cli b/hackfest/containerlab/srl.cli
new file mode 100644
index 000000000..ec368cce9
--- /dev/null
+++ b/hackfest/containerlab/srl.cli
@@ -0,0 +1,2 @@
+set / system management openconfig admin-state enable
+set / system gnmi-server network-instance mgmt yang-models openconfig
\ No newline at end of file
diff --git a/hackfest/containerlab/srl1.cli b/hackfest/containerlab/srl1.cli
deleted file mode 100644
index 0496e9c41..000000000
--- a/hackfest/containerlab/srl1.cli
+++ /dev/null
@@ -1,16 +0,0 @@
-set / interface ethernet-1/2 admin-state enable
-set / interface ethernet-1/2 subinterface 0 ipv4 admin-state enable
-set / interface ethernet-1/2 subinterface 0 ipv4 address 172.16.1.1/24
-
-set / interface ethernet-1/1 admin-state enable
-set / interface ethernet-1/1 subinterface 0 ipv4 admin-state enable
-set / interface ethernet-1/1 subinterface 0 ipv4 address 172.0.0.1/30
-
-set / network-instance default interface ethernet-1/1.0
-set / network-instance default interface ethernet-1/2.0
-
-set / network-instance default next-hop-groups group group1 nexthop 1 ip-address 172.0.0.2 admin-state enable
-set / network-instance default static-routes route 172.16.2.0/24 next-hop-group group1 admin-state enable
-
-set / system management openconfig admin-state enable
-set / system gnmi-server network-instance mgmt yang-models openconfig
diff --git a/hackfest/containerlab/srl2.cli b/hackfest/containerlab/srl2.cli
deleted file mode 100644
index c932ca01a..000000000
--- a/hackfest/containerlab/srl2.cli
+++ /dev/null
@@ -1,16 +0,0 @@
-set / interface ethernet-1/2 admin-state enable
-set / interface ethernet-1/2 subinterface 0 ipv4 admin-state enable
-set / interface ethernet-1/2 subinterface 0 ipv4 address 172.16.2.1/24
-
-set / interface ethernet-1/1 admin-state enable
-set / interface ethernet-1/1 subinterface 0 ipv4 admin-state enable
-set / interface ethernet-1/1 subinterface 0 ipv4 address 172.0.0.2/30
-
-set / network-instance default interface ethernet-1/1.0
-set / network-instance default interface ethernet-1/2.0
-
-set / network-instance default next-hop-groups group group1 nexthop 1 ip-address 172.0.0.1 admin-state enable
-set / network-instance default static-routes route 172.16.1.0/24 next-hop-group group1 admin-state enable
-
-set / system management openconfig admin-state enable
-set / system gnmi-server network-instance mgmt yang-models openconfig
diff --git a/hackfest/containerlab/tfs-scenario.clab.yml b/hackfest/containerlab/tfs-scenario.clab.yml
index 8b0ca6130..7efc8cd10 100644
--- a/hackfest/containerlab/tfs-scenario.clab.yml
+++ b/hackfest/containerlab/tfs-scenario.clab.yml
@@ -33,14 +33,14 @@ topology:
       cpu: 0.5
       memory: 2GB
       mgmt-ipv4: 172.100.100.101
-      startup-config: srl1.cli
+      startup-config: srl.cli
     srl2:
       kind: nokia_srlinux
       type: ixr6
       cpu: 0.5
       memory: 2GB
       mgmt-ipv4: 172.100.100.102
-      startup-config: srl2.cli
+      startup-config: srl.cli
     client1:
       kind: linux
       cpu: 0.1
-- 
GitLab