diff --git a/dataplane-in-a-box/README.md b/dataplane-in-a-box/README.md index 4dd22dec374bcf88bd71093a9e7b3a3d318a0474..c6da22be0a6222e5492c7a31020b325f390c4e45 100644 --- a/dataplane-in-a-box/README.md +++ b/dataplane-in-a-box/README.md @@ -16,7 +16,7 @@ source dataplane-in-a-box/deploy_specs.sh ## Download and install ContainerLab ```bash -sudo bash -c "$(curl -sL https://get.containerlab.dev)" -- -v 0.48.4 +sudo bash -c "$(curl -sL https://get.containerlab.dev)" -- -v 0.48.6 ``` ## Download Arista cEOS image and create Docker image @@ -46,13 +46,13 @@ sudo rm -rf clab-arista/ .arista.clab.yml.bak ## Access cEOS Bash ```bash -docker exec -it clab-arista-wan1 bash +docker exec -it clab-arista-r1 bash ``` ## Access cEOS CLI ```bash -docker exec -it clab-arista-wan1 Cli -docker exec -it clab-arista-wan2 Cli +docker exec -it clab-arista-r1 Cli +docker exec -it clab-arista-r2 Cli ``` ## Configure ContainerLab clients diff --git a/dataplane-in-a-box/arista.clab.yml b/dataplane-in-a-box/arista.clab.yml index fa4957f190f95cbdaa125ca1263838670684be01..a7766e326ba197ad2ace6d50394c4b8c4de2f535 100644 --- a/dataplane-in-a-box/arista.clab.yml +++ b/dataplane-in-a-box/arista.clab.yml @@ -31,37 +31,31 @@ topology: image: ghcr.io/hellt/network-multitool:latest nodes: - wan1: + r1: kind: arista_ceos mgmt-ipv4: 172.20.20.101 - ports: [6001:6030] - wan2: + r2: kind: arista_ceos mgmt-ipv4: 172.20.20.102 - ports: [6002:6030] dc1: kind: linux - mgmt-ipv4: 172.20.20.201 - ports: [2201:22] + mgmt-ipv4: 172.20.20.211 exec: - - ip link set address 00:c1:ab:00:00:01 dev eth1 + - ip link set address 00:c1:ab:00:01:01 dev eth1 - ip address add 192.168.1.10/24 dev eth1 - ip route add 192.168.2.0/24 via 192.168.1.1 dc2: kind: linux - mgmt-ipv4: 172.20.20.202 - ports: [2202:22] + mgmt-ipv4: 172.20.20.221 exec: - - ip link set address 00:c1:ab:00:00:02 dev eth1 + - ip link set address 00:c1:ab:00:02:01 dev eth1 - ip address add 192.168.2.10/24 dev eth1 - ip route add 192.168.1.0/24 via 192.168.2.1 links: - - endpoints: ["wan1:eth1", "wan2:eth1"] - - endpoints: ["wan1:eth2", "wan2:eth2"] - - endpoints: ["wan1:eth3", "wan2:eth3"] - - endpoints: ["wan1:eth10", "dc1:eth1"] - - endpoints: ["wan2:eth10", "dc2:eth1"] + - endpoints: ["r1:eth1", "r2:eth1"] + - endpoints: ["r1:eth10", "dc1:eth1"] + - endpoints: ["r2:eth10", "dc2:eth1"] diff --git a/dataplane-in-a-box/clab-cli-r1.sh b/dataplane-in-a-box/clab-cli-r1.sh new file mode 100755 index 0000000000000000000000000000000000000000..a4799c6ce5f37177cf8abe9f232788c8aaad8d8a --- /dev/null +++ b/dataplane-in-a-box/clab-cli-r1.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker exec -it clab-arista-r1 Cli diff --git a/dataplane-in-a-box/clab-cli-r2.sh b/dataplane-in-a-box/clab-cli-r2.sh new file mode 100755 index 0000000000000000000000000000000000000000..39dce39384fc5ff0539465533c907d2a0bbf86c7 --- /dev/null +++ b/dataplane-in-a-box/clab-cli-r2.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +docker exec -it clab-arista-r2 Cli diff --git a/dataplane-in-a-box/clab-cli-wan1.sh b/dataplane-in-a-box/clab-cli-wan1.sh deleted file mode 100755 index 4ae21bcb5572f2f8db1fecb7ee1978fdd4f1b614..0000000000000000000000000000000000000000 --- a/dataplane-in-a-box/clab-cli-wan1.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -docker exec -it clab-arista-wan1 Cli diff --git a/dataplane-in-a-box/clab-cli-wan2.sh b/dataplane-in-a-box/clab-cli-wan2.sh deleted file mode 100755 index c931ac940ead7ef3ed08f4cb60297fe73dec5da3..0000000000000000000000000000000000000000 --- a/dataplane-in-a-box/clab-cli-wan2.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -docker exec -it clab-arista-wan2 Cli diff --git a/dataplane-in-a-box/tfs-01-topo-nodes.json b/dataplane-in-a-box/tfs-01-topo-nodes.json index d0fafbfe8f862ea0d002739d7e66cf7aa90a3ea4..7331664a1a37368a578566f6c3fe1b65eb35b420 100644 --- a/dataplane-in-a-box/tfs-01-topo-nodes.json +++ b/dataplane-in-a-box/tfs-01-topo-nodes.json @@ -27,7 +27,7 @@ ]} }, { - "device_id": {"device_uuid": {"uuid": "wan1"}}, "device_type": "packet-router", "device_drivers": [8], + "device_id": {"device_uuid": {"uuid": "r1"}}, "device_type": "packet-router", "device_drivers": [8], "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.20.20.101"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "6030"}}, @@ -37,7 +37,7 @@ ]} }, { - "device_id": {"device_uuid": {"uuid": "wan2"}}, "device_type": "packet-router", "device_drivers": [8], + "device_id": {"device_uuid": {"uuid": "r2"}}, "device_type": "packet-router", "device_drivers": [8], "device_config": {"config_rules": [ {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.20.20.102"}}, {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "6030"}}, diff --git a/dataplane-in-a-box/tfs-02-topo-links.json b/dataplane-in-a-box/tfs-02-topo-links.json index 78765a7d5f9c9a53b38e1867cb47f449489202c2..3e65f5b28ad73825f7d0cc1627314aa035502106 100644 --- a/dataplane-in-a-box/tfs-02-topo-links.json +++ b/dataplane-in-a-box/tfs-02-topo-links.json @@ -1,39 +1,47 @@ { "links": [ { - "link_id": {"link_uuid": {"uuid": "wan1/ethernet-1/1==wan2/ethernet-1/1"}}, + "link_id": {"link_uuid": {"uuid": "r1/Ethernet1==r2/Ethernet1"}}, "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"}} + {"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet1"}}, + {"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet1"}} ] }, { - "link_id": {"link_uuid": {"uuid": "wan1/ethernet-1/2==wan2/ethernet-1/2"}}, + "link_id": {"link_uuid": {"uuid": "r2/Ethernet1==r1/Ethernet1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "wan1"}}, "endpoint_uuid": {"uuid": "ethernet-1/2"}}, - {"device_id": {"device_uuid": {"uuid": "wan2"}}, "endpoint_uuid": {"uuid": "ethernet-1/2"}} + {"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet1"}}, + {"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet1"}} ] }, + { - "link_id": {"link_uuid": {"uuid": "wan1/ethernet-1/3==wan2/ethernet-1/3"}}, + "link_id": {"link_uuid": {"uuid": "r1/Ethernet10==dc1/eth1"}}, "link_endpoint_ids": [ - {"device_id": {"device_uuid": {"uuid": "wan1"}}, "endpoint_uuid": {"uuid": "ethernet-1/3"}}, - {"device_id": {"device_uuid": {"uuid": "wan2"}}, "endpoint_uuid": {"uuid": "ethernet-1/3"}} + {"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet10"}}, + {"device_id": {"device_uuid": {"uuid": "dc1"}}, "endpoint_uuid": {"uuid": "eth1"}} ] }, - { - "link_id": {"link_uuid": {"uuid": "dc1/eth1==wan1/ethernet-1/10"}}, + "link_id": {"link_uuid": {"uuid": "dc1/eth1==r1/Ethernet10"}}, "link_endpoint_ids": [ {"device_id": {"device_uuid": {"uuid": "dc1"}}, "endpoint_uuid": {"uuid": "eth1"}}, - {"device_id": {"device_uuid": {"uuid": "wan1"}}, "endpoint_uuid": {"uuid": "ethernet-1/10"}} + {"device_id": {"device_uuid": {"uuid": "r1"}}, "endpoint_uuid": {"uuid": "Ethernet10"}} + ] + }, + + { + "link_id": {"link_uuid": {"uuid": "r2/Ethernet10==dc2/eth1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet10"}}, + {"device_id": {"device_uuid": {"uuid": "dc2"}}, "endpoint_uuid": {"uuid": "eth1"}} ] }, { - "link_id": {"link_uuid": {"uuid": "dc2/eth1==wan2/ethernet-1/10"}}, + "link_id": {"link_uuid": {"uuid": "dc2/eth1==r2/Ethernet10"}}, "link_endpoint_ids": [ {"device_id": {"device_uuid": {"uuid": "dc2"}}, "endpoint_uuid": {"uuid": "eth1"}}, - {"device_id": {"device_uuid": {"uuid": "wan2"}}, "endpoint_uuid": {"uuid": "ethernet-1/10"}} + {"device_id": {"device_uuid": {"uuid": "r2"}}, "endpoint_uuid": {"uuid": "Ethernet10"}} ] } ] diff --git a/dataplane-in-a-box/tfs-03-dc1-2-dc2-l3svc.json b/dataplane-in-a-box/tfs-03-dc1-2-dc2-l3svc.json new file mode 100644 index 0000000000000000000000000000000000000000..0e2dc5c6709edfb041242184a898a72b30841af8 --- /dev/null +++ b/dataplane-in-a-box/tfs-03-dc1-2-dc2-l3svc.json @@ -0,0 +1,24 @@ +{ + "services": [ + { + "service_id": { + "context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "dc1-2-dc2-l3svc"} + }, + "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[dc1]/endpoint[eth1]/settings", "resource_value": { + "ipv4_address": "192.168.1.10", "ipv4_prefix": 24, "sub_interface_index": 0 + }}}, + {"action": 1, "custom": {"resource_key": "/device[dc2]/endpoint[eth1]/settings", "resource_value": { + "ipv4_address": "192.168.2.10", "ipv4_prefix": 24, "sub_interface_index": 0 + }}} + ]} + } + ] +} diff --git a/dataplane-in-a-box/tfs-03-dc2dc-l2svc.json b/dataplane-in-a-box/tfs-03-dc2dc-l2svc.json deleted file mode 100644 index 8d10e5f4bc0b96464b251165f71fc23bfeb5bf60..0000000000000000000000000000000000000000 --- a/dataplane-in-a-box/tfs-03-dc2dc-l2svc.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "services": [ - { - "service_id": { - "context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "dc2dc-l2svc"} - }, - "service_type": 2, - "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": []} - } - ] -} diff --git a/dataplane-in-a-box/tfs-04-dc2dc-l3svc.json b/dataplane-in-a-box/tfs-04-dc2dc-l3svc.json deleted file mode 100644 index b21cba0daa59d5458165c14a6678798212ed9720..0000000000000000000000000000000000000000 --- a/dataplane-in-a-box/tfs-04-dc2dc-l3svc.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "services": [ - { - "service_id": { - "context_id": {"context_uuid": {"uuid": "admin"}}, "service_uuid": {"uuid": "dc2dc-l3svc"} - }, - "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[wan1]/settings", "resource_value": { - "static_routes": [{"prefix": "172.16.2.0/24", "next_hop": "172.0.0.2"}] - }}}, - {"action": 1, "custom": {"resource_key": "/device[wan1]/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[wan1]/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[wan3]/settings", "resource_value": { - "static_routes": [{"prefix": "172.16.1.0/24", "next_hop": "172.0.0.1"}] - }}}, - {"action": 1, "custom": {"resource_key": "/device[wan3]/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[wan3]/endpoint[ethernet-1/2]/settings", "resource_value": { - "ipv4_address": "172.16.2.1", "ipv4_prefix": 24, "sub_interface_index": 0 - }}} - ]} - } - ] -}