Skip to content
Snippets Groups Projects
Commit a3457956 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

DataPlane in a box:

- Added management scripts
- Added ContainerLab scenario descriptor
- Added README.md
- Added example TFS descriptors
- Added links.txt
parent 3e1df037
No related branches found
No related tags found
2 merge requests!294Release TeraFlowSDN 4.0,!172Resolve "(CTTC) Extend gNMI-OpenConfig SBI driver"
clab-arista/
.arista.clab.yml.bak
# DataPlane-in-a-Box - Control an Emulated DataPlane through TeraFlowSDN
## Emulated DataPlane Deployment
- ContainerLab
- Scenario
- Descriptor
## TeraFlowSDN Deployment
```bash
cd ~/tfs-ctrl
source dataplane-in-a-box/deploy_specs.sh
./deploy/all.sh
```
# ContainerLab - Arista cEOS - Commands
## Download and install ContainerLab
```bash
sudo bash -c "$(curl -sL https://get.containerlab.dev)" -- -v 0.48.4
```
## Deploy scenario
```bash
cd ~/tfs-ctrl/dataplane-in-a-box
sudo containerlab deploy --topo arista.clab.yml
```
## Inspect scenario
```bash
cd ~/tfs-ctrl/dataplane-in-a-box
sudo containerlab inspect --topo arista.clab.yml
```
## Destroy scenario
```bash
cd ~/tfs-ctrl/dataplane-in-a-box
sudo containerlab destroy --topo arista.clab.yml
sudo rm -rf clab-arista/ .arista.clab.yml.bak
```
## Access cEOS Bash
```bash
docker exec -it clab-arista-wan1 bash
```
## Access cEOS CLI
```bash
docker exec -it clab-arista-wan1 Cli
```
## Configure ContainerLab clients
```bash
docker exec -it clab-arista-client1 bash
ip address add 192.168.1.10/24 dev eth1
ip route add 192.168.2.0/24 via 192.168.1.1
ip route add 192.168.3.0/24 via 192.168.1.1
ping 192.168.2.10
ping 192.168.3.10
docker exec -it clab-arista-client2 bash
ip address add 192.168.2.10/24 dev eth1
ip route add 192.168.1.0/24 via 192.168.2.1
ip route add 192.168.3.0/24 via 192.168.2.1
ping 192.168.1.10
ping 192.168.3.10
docker exec -it clab-arista-client3 bash
ip address add 192.168.3.10/24 dev eth1
ip route add 192.168.2.0/24 via 192.168.3.1
ip route add 192.168.3.0/24 via 192.168.3.1
ping 192.168.2.10
ping 192.168.3.10
```
## Install gNMIc
```bash
sudo bash -c "$(curl -sL https://get-gnmic.kmrd.dev)"
```
## gNMI Capabilities request
```bash
gnmic --address clab-arista-wan1 --port 6030 --username admin --password admin --insecure capabilities
```
## gNMI Get request
```bash
gnmic --address clab-arista-wan1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path / > wan1.json
gnmic --address clab-arista-wan1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path /interfaces/interface > wan1-ifaces.json
```
## gNMI Set request
```bash
#gnmic --address clab-arista-wan1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --update-path /system/config/hostname --update-value srl11
#gnmic --address clab-arista-wan1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path /system/config/hostname
```
## Subscribe request
```bash
gnmic --address clab-arista-wan1 --port 6030 --username admin --password admin --insecure --encoding json_ietf subscribe --path /interfaces/interface[name=Management0]/state/
# In another terminal, you can generate traffic opening SSH connection
ssh admin@clab-arista-wan1
```
# Check configurations done:
```bash
gnmic --address clab-arista-wan1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path '/network-instances' > wan1-nis.json
gnmic --address clab-arista-wan1 --port 6030 --username admin --password admin --insecure --encoding json_ietf get --path '/interfaces' > wan1-ifs.json
```
# Delete elements:
```bash
--address clab-arista-wan1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --delete '/network-instances/network-instance[name=b19229e8]'
--address clab-arista-wan1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --delete '/interfaces/interface[name=ethernet-1/1]/subinterfaces/subinterface[index=0]'
--address clab-arista-wan1 --port 6030 --username admin --password admin --insecure --encoding json_ietf set --delete '/interfaces/interface[name=ethernet-1/2]/subinterfaces/subinterface[index=0]'
```
# Run gNMI Driver in standalone mode (advanced)
```bash
PYTHONPATH=./src python -m src.device.tests.test_gnmi
```
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# TFS - Arista devices + Linux clients
name: arista
mgmt:
network: mgmt-net
ipv4-subnet: 172.20.20.0/24
topology:
kinds:
arista_ceos:
kind: arista_ceos
image: ceos:4.30.4M
linux:
kind: linux
image: ghcr.io/hellt/network-multitool:latest
nodes:
wan1:
kind: arista_ceos
mgmt-ipv4: 172.20.20.101
ports: [6001:6030]
wan2:
kind: arista_ceos
mgmt-ipv4: 172.20.20.102
ports: [6002:6030]
client1:
kind: linux
mgmt-ipv4: 172.20.20.201
ports: [2201:22]
client2:
kind: linux
mgmt-ipv4: 172.20.20.202
ports: [2202:22]
links:
- endpoints: ["wan1:eth1", "wan2:eth1"]
- endpoints: ["client1:eth1", "wan1:eth10"]
- endpoints: ["client2:eth1", "wan2:eth10"]
#!/bin/bash
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
cd /home/tfs/tfs-ctrl/dataplane-in-a-box
sudo containerlab deploy --topo arista.clab.yml
#!/bin/bash
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
cd /home/tfs/tfs-ctrl/dataplane-in-a-box
sudo containerlab destroy --topo arista.clab.yml
sudo rm -rf clab-arista/ .arista.clab.yml.bak
#!/bin/bash
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
cd /home/tfs/tfs-ctrl/dataplane-in-a-box
sudo containerlab inspect --topo arista.clab.yml
#!/bin/bash
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Download image from Arista account > software downloads
cd /home/tfs/tfs-ctrl/dataplane-in-a-box
docker import cEOS64-lab-4.30.4M.tar ceos:4.30.4M
#!/bin/bash
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
docker pull ghcr.io/hellt/network-multitool:latest
#docker pull ghcr.io/nokia/srlinux:23.7.2
#docker pull netreplica/docker-sonic-vs:20220111
{
"services": [
{
"service_id": {
"context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "dc-2-dc-l3-svc"}
},
"service_type": 1,
"service_status": {"service_status": 1},
"service_endpoint_ids": [
{"device_id":{"device_uuid":{"uuid":"DC1"}},"endpoint_uuid":{"uuid":"int"}},
{"device_id":{"device_uuid":{"uuid":"DC2"}},"endpoint_uuid":{"uuid":"int"}}
],
"service_constraints": [],
"service_config": {"config_rules": [
{"action": 1, "custom": {"resource_key": "/device[SRL1]/settings", "resource_value": {
"static_routes": [{"prefix": "172.16.2.0/24", "next_hop": "172.0.0.2"}]
}}},
{"action": 1, "custom": {"resource_key": "/device[SRL1]/endpoint[ethernet-1/1]/settings", "resource_value": {
"ipv4_address": "172.0.0.1", "ipv4_prefix": 30, "sub_interface_index": 0
}}},
{"action": 1, "custom": {"resource_key": "/device[SRL1]/endpoint[ethernet-1/2]/settings", "resource_value": {
"ipv4_address": "172.16.1.1", "ipv4_prefix": 24, "sub_interface_index": 0
}}},
{"action": 1, "custom": {"resource_key": "/device[SRL2]/settings", "resource_value": {
"static_routes": [{"prefix": "172.16.1.0/24", "next_hop": "172.0.0.1"}]
}}},
{"action": 1, "custom": {"resource_key": "/device[SRL2]/endpoint[ethernet-1/1]/settings", "resource_value": {
"ipv4_address": "172.0.0.2", "ipv4_prefix": 30, "sub_interface_index": 0
}}},
{"action": 1, "custom": {"resource_key": "/device[SRL2]/endpoint[ethernet-1/2]/settings", "resource_value": {
"ipv4_address": "172.16.2.1", "ipv4_prefix": 24, "sub_interface_index": 0
}}}
]}
}
]
}
#!/bin/bash
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ----- TeraFlowSDN ------------------------------------------------------------
# Set the URL of the internal MicroK8s Docker registry where the images will be uploaded to.
export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/"
# Set the list of components, separated by spaces, you want to build images for, and deploy.
#export TFS_COMPONENTS="context device pathcomp service slice nbi webui load_generator"
export TFS_COMPONENTS="context device pathcomp service slice nbi webui"
# Uncomment to activate Monitoring
export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring"
# Uncomment to activate ZTP
#export TFS_COMPONENTS="${TFS_COMPONENTS} ztp"
# Uncomment to activate Policy Manager
#export TFS_COMPONENTS="${TFS_COMPONENTS} policy"
# Uncomment to activate Optical CyberSecurity
#export TFS_COMPONENTS="${TFS_COMPONENTS} dbscanserving opticalattackmitigator opticalattackdetector opticalattackmanager"
# Uncomment to activate L3 CyberSecurity
#export TFS_COMPONENTS="${TFS_COMPONENTS} l3_attackmitigator l3_centralizedattackdetector"
# Uncomment to activate TE
#export TFS_COMPONENTS="${TFS_COMPONENTS} te"
# Uncomment to activate Forecaster
#export TFS_COMPONENTS="${TFS_COMPONENTS} forecaster"
# Set the tag you want to use for your images.
export TFS_IMAGE_TAG="dev"
# Set the name of the Kubernetes namespace to deploy TFS to.
export TFS_K8S_NAMESPACE="tfs"
# Set additional manifest files to be applied after the deployment
export TFS_EXTRA_MANIFESTS="manifests/nginx_ingress_http.yaml"
# Uncomment to monitor performance of components
export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/servicemonitors.yaml"
# Uncomment when deploying Optical CyberSecurity
#export TFS_EXTRA_MANIFESTS="${TFS_EXTRA_MANIFESTS} manifests/cachingservice.yaml"
# Set the new Grafana admin password
export TFS_GRAFANA_PASSWORD="admin123+"
# Disable skip-build flag to rebuild the Docker images.
export TFS_SKIP_BUILD=""
# ----- CockroachDB ------------------------------------------------------------
# Set the namespace where CockroackDB will be deployed.
export CRDB_NAMESPACE="crdb"
# Set the external port CockroackDB Postgre SQL interface will be exposed to.
export CRDB_EXT_PORT_SQL="26257"
# Set the external port CockroackDB HTTP Mgmt GUI interface will be exposed to.
export CRDB_EXT_PORT_HTTP="8081"
# Set the database username to be used by Context.
export CRDB_USERNAME="tfs"
# Set the database user's password to be used by Context.
export CRDB_PASSWORD="tfs123"
# Set the database name to be used by Context.
export CRDB_DATABASE="tfs"
# Set CockroachDB installation mode to 'single'. This option is convenient for development and testing.
# See ./deploy/all.sh or ./deploy/crdb.sh for additional details
export CRDB_DEPLOY_MODE="single"
# Disable flag for dropping database, if it exists.
export CRDB_DROP_DATABASE_IF_EXISTS="YES"
# Disable flag for re-deploying CockroachDB from scratch.
export CRDB_REDEPLOY=""
# ----- NATS -------------------------------------------------------------------
# Set the namespace where NATS will be deployed.
export NATS_NAMESPACE="nats"
# Set the external port NATS Client interface will be exposed to.
export NATS_EXT_PORT_CLIENT="4222"
# Set the external port NATS HTTP Mgmt GUI interface will be exposed to.
export NATS_EXT_PORT_HTTP="8222"
# Disable flag for re-deploying NATS from scratch.
export NATS_REDEPLOY=""
# ----- QuestDB ----------------------------------------------------------------
# Set the namespace where QuestDB will be deployed.
export QDB_NAMESPACE="qdb"
# Set the external port QuestDB Postgre SQL interface will be exposed to.
export QDB_EXT_PORT_SQL="8812"
# Set the external port QuestDB Influx Line Protocol interface will be exposed to.
export QDB_EXT_PORT_ILP="9009"
# Set the external port QuestDB HTTP Mgmt GUI interface will be exposed to.
export QDB_EXT_PORT_HTTP="9000"
# Set the database username to be used for QuestDB.
export QDB_USERNAME="admin"
# Set the database user's password to be used for QuestDB.
export QDB_PASSWORD="quest"
# Set the table name to be used by Monitoring for KPIs.
export QDB_TABLE_MONITORING_KPIS="tfs_monitoring_kpis"
# Set the table name to be used by Slice for plotting groups.
export QDB_TABLE_SLICE_GROUPS="tfs_slice_groups"
# Disable flag for dropping tables if they exist.
export QDB_DROP_TABLES_IF_EXIST="YES"
# Disable flag for re-deploying QuestDB from scratch.
export QDB_REDEPLOY=""
# ----- K8s Observability ------------------------------------------------------
# Set the external port Prometheus Mgmt HTTP GUI interface will be exposed to.
export PROM_EXT_PORT_HTTP="9090"
# Set the external port Grafana HTTP Dashboards will be exposed to.
export GRAF_EXT_PORT_HTTP="3000"
{
"contexts": [
{"context_id": {"context_uuid": {"uuid": "admin"}}}
],
"topologies": [
{"topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}
],
"devices": [
{
"device_id": {"device_uuid": {"uuid": "DC1"}}, "device_type": "emu-datacenter", "device_drivers": [0],
"device_config": {"config_rules": [
{"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}},
{"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}},
{"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [
{"uuid": "eth1", "type": "copper"}, {"uuid": "eth2", "type": "copper"}, {"uuid": "int", "type": "copper"}
]}}}
]}
},
{
"device_id": {"device_uuid": {"uuid": "DC2"}}, "device_type": "emu-datacenter", "device_drivers": [0],
"device_config": {"config_rules": [
{"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}},
{"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}},
{"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [
{"uuid": "eth1", "type": "copper"}, {"uuid": "eth2", "type": "copper"}, {"uuid": "int", "type": "copper"}
]}}}
]}
},
{
"device_id": {"device_uuid": {"uuid": "DC3"}}, "device_type": "emu-datacenter", "device_drivers": [0],
"device_config": {"config_rules": [
{"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}},
{"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}},
{"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [
{"uuid": "eth1", "type": "copper"}, {"uuid": "eth2", "type": "copper"}, {"uuid": "int", "type": "copper"}
]}}}
]}
},
{
"device_id": {"device_uuid": {"uuid": "DC4"}}, "device_type": "emu-datacenter", "device_drivers": [0],
"device_config": {"config_rules": [
{"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}},
{"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}},
{"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [
{"uuid": "eth1", "type": "copper"}, {"uuid": "eth2", "type": "copper"}, {"uuid": "int", "type": "copper"}
]}}}
]}
},
{
"device_id": {"device_uuid": {"uuid": "WAN1"}}, "device_type": "packet-router", "device_drivers": [8],
"device_config": {"config_rules": [
{"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.1.7.200"}},
{"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "6001"}},
{"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {
"username": "admin", "password": "admin", "use_tls": true
}}}
]}
},
{
"device_id": {"device_uuid": {"uuid": "WAN2"}}, "device_type": "packet-router", "device_drivers": [8],
"device_config": {"config_rules": [
{"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.1.7.200"}},
{"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "6002"}},
{"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {
"username": "admin", "password": "admin", "use_tls": true
}}}
]}
},
{
"device_id": {"device_uuid": {"uuid": "WAN1"}}, "device_type": "packet-router", "device_drivers": [8],
"device_config": {"config_rules": [
{"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.1.7.200"}},
{"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "6003"}},
{"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {
"username": "admin", "password": "admin", "use_tls": true
}}}
]}
},
{
"device_id": {"device_uuid": {"uuid": "WAN2"}}, "device_type": "packet-router", "device_drivers": [8],
"device_config": {"config_rules": [
{"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.1.7.200"}},
{"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "6004"}},
{"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {
"username": "admin", "password": "admin", "use_tls": true
}}}
]}
}
],
"links": [
{
"link_id": {"link_uuid": {"uuid": "DC1/eth1==WAN1/ethernet-1/2"}},
"link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "DC1"}}, "endpoint_uuid": {"uuid": "eth1"}},
{"device_id": {"device_uuid": {"uuid": "WAN1"}}, "endpoint_uuid": {"uuid": "ethernet-1/2"}}
]
},
{
"link_id": {"link_uuid": {"uuid": "WAN1/ethernet-1/2==DC1/eth1"}},
"link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "WAN1"}}, "endpoint_uuid": {"uuid": "ethernet-1/2"}},
{"device_id": {"device_uuid": {"uuid": "DC1"}}, "endpoint_uuid": {"uuid": "eth1"}}
]
},
{
"link_id": {"link_uuid": {"uuid": "WAN1/ethernet-1/1==WAN2/ethernet-1/1"}},
"link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "WAN1"}}, "endpoint_uuid": {"uuid": "ethernet-1/1"}},
{"device_id": {"device_uuid": {"uuid": "WAN2"}}, "endpoint_uuid": {"uuid": "ethernet-1/1"}}
]
},
{
"link_id": {"link_uuid": {"uuid": "WAN2/ethernet-1/1==WAN1/ethernet-1/1"}},
"link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "WAN2"}}, "endpoint_uuid": {"uuid": "ethernet-1/1"}},
{"device_id": {"device_uuid": {"uuid": "WAN1"}}, "endpoint_uuid": {"uuid": "ethernet-1/1"}}
]
},
{
"link_id": {"link_uuid": {"uuid": "DC2/eth1==WAN2/ethernet-1/2"}},
"link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "DC2"}}, "endpoint_uuid": {"uuid": "eth1"}},
{"device_id": {"device_uuid": {"uuid": "WAN2"}}, "endpoint_uuid": {"uuid": "ethernet-1/2"}}
]
},
{
"link_id": {"link_uuid": {"uuid": "WAN2/ethernet-1/2==DC2/eth1"}},
"link_endpoint_ids": [
{"device_id": {"device_uuid": {"uuid": "WAN2"}}, "endpoint_uuid": {"uuid": "ethernet-1/2"}},
{"device_id": {"device_uuid": {"uuid": "DC2"}}, "endpoint_uuid": {"uuid": "eth1"}}
]
}
]
}
https://containerlab.dev/manual/multi-node/#exposing-services
https://containerlab.dev/manual/multi-node/#bridging
https://containerlab.dev/manual/kinds/bridge/
https://containerlab.dev/lab-examples/ext-bridge/
https://containerlab.dev/manual/kinds/ceos/
https://containerlab.dev/lab-examples/srl-ceos/#__tabbed_2_2
https://github.com/srl-labs/containerlab/blob/main/lab-examples/srlceos01/srlceos01.clab.yml
{
"contexts": [
{"context_id": {"context_uuid": {"uuid": "admin"}}}
],
"topologies": [
{"topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}}
],
"devices": [
{
"device_id": {"device_uuid": {"uuid": "DC1"}}, "device_type": "emu-datacenter", "device_drivers": [0],
"device_config": {"config_rules": [
{"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}},
{"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}},
{"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [
{"uuid": "eth1", "type": "copper"}, {"uuid": "eth2", "type": "copper"}, {"uuid": "int", "type": "copper"}
]}}}
]}
},
{
"device_id": {"device_uuid": {"uuid": "DC2"}}, "device_type": "emu-datacenter", "device_drivers": [0],
"device_config": {"config_rules": [
{"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}},
{"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}},
{"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [
{"uuid": "eth1", "type": "copper"}, {"uuid": "eth2", "type": "copper"}, {"uuid": "int", "type": "copper"}
]}}}
]}
},
{
"device_id": {"device_uuid": {"uuid": "DC3"}}, "device_type": "emu-datacenter", "device_drivers": [0],
"device_config": {"config_rules": [
{"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}},
{"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}},
{"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [
{"uuid": "eth1", "type": "copper"}, {"uuid": "eth2", "type": "copper"}, {"uuid": "int", "type": "copper"}
]}}}
]}
},
{
"device_id": {"device_uuid": {"uuid": "DC4"}}, "device_type": "emu-datacenter", "device_drivers": [0],
"device_config": {"config_rules": [
{"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}},
{"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}},
{"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [
{"uuid": "eth1", "type": "copper"}, {"uuid": "eth2", "type": "copper"}, {"uuid": "int", "type": "copper"}
]}}}
]}
},
{
"device_id": {"device_uuid": {"uuid": "WAN1"}}, "device_type": "packet-router", "device_drivers": [8],
"device_config": {"config_rules": [
{"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.1.7.200"}},
{"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "6001"}},
{"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {
"username": "admin", "password": "admin", "use_tls": false
}}}
]}
},
{
"device_id": {"device_uuid": {"uuid": "WAN2"}}, "device_type": "packet-router", "device_drivers": [8],
"device_config": {"config_rules": [
{"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.1.7.200"}},
{"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "6002"}},
{"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {
"username": "admin", "password": "admin", "use_tls": false
}}}
]}
},
{
"device_id": {"device_uuid": {"uuid": "WAN1"}}, "device_type": "packet-router", "device_drivers": [8],
"device_config": {"config_rules": [
{"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.1.7.200"}},
{"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "6003"}},
{"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {
"username": "admin", "password": "admin", "use_tls": false
}}}
]}
},
{
"device_id": {"device_uuid": {"uuid": "WAN2"}}, "device_type": "packet-router", "device_drivers": [8],
"device_config": {"config_rules": [
{"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.1.7.200"}},
{"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "6004"}},
{"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {
"username": "admin", "password": "admin", "use_tls": false
}}}
]}
}
],
"links": []
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment