User Tools

Site Tools


networking:containerlab

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
networking:containerlab [2025/12/03 12:49] – [SETUP] v1ctornetworking:containerlab [2025/12/03 13:53] (current) – [SETUP] v1ctor
Line 3: Line 3:
 ==== SETUP ==== ==== SETUP ====
  
-On the Linux machine, download the Docker image and then import it:+On the Linux machine, download the Docker image and then import it. Some useful Docker commands:
 <code bash> <code bash>
 docker import cEOS-lab-4.34.3.1M.tar.xz ceos:4.34.3.1M docker import cEOS-lab-4.34.3.1M.tar.xz ceos:4.34.3.1M
 docker images # should be visible here docker images # should be visible here
 +
 +docker ps     # show all running containers
 +docker ps -a  # show all containers, including stopped ones. Docker keeps its filesystem, metadata and
 +              # reference to the image until you explicitly remove it
 +
 +docker rm <container_id>  # removes the container
 +docker rmi <image_id>     # removes the image 
 +</code>
 +
 +Create a //topology.clab.yaml// file:
 +<code>
 +name: clos
 +prefix: ""
 +topology:
 +  kinds:
 +    ceos:
 +      image: ceos:4.34.3.1M
 +      env:
 +        CLAB_MGMT_VRF: MGMT
 +  nodes:
 +    leaf1:
 +      kind: ceos
 +    leaf2:
 +      kind: ceos
 +
 +    spine1:
 +      kind: ceos
 +    spine2:
 +      kind: ceos
 +
 +    client1:
 +      kind: linux
 +      image: alpine:latest
 +    client2:
 +      kind: linux
 +      image: alpine:latest
 +
 +  links:
 +    # leaf to spine links POD1
 +    - endpoints: ["leaf1:eth1", "spine1:eth1"]
 +    - endpoints: ["leaf1:eth2", "spine2:eth1"]
 +    - endpoints: ["leaf2:eth1", "spine1:eth2"]
 +    - endpoints: ["leaf2:eth2", "spine2:eth2"]
 +
 +    # client connection links
 +    - endpoints: ["client1:eth1", "leaf1:eth3"]
 +    - endpoints: ["client2:eth1", "leaf2:eth3"]
 +</code>
 +
 +Deploy the lab:
 +<code bash>
 +clab deploy
 </code> </code>
networking/containerlab.1764766175.txt.gz · Last modified: by v1ctor