First Commit

- Empty lab settings
- Default hosts configuration
- Readme + DrawIO Schema
This commit is contained in:
Damien A
2023-12-31 19:04:27 +01:00
commit fd0f2a3dbd
8 changed files with 197 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
{
"name": "ContainerLab",
"dockerComposeFile": "docker-compose.yml",
"service": "containerlab",
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [50080],
// Mount worspace on container
"workspaceFolder": "/workspace",
// Import ceos images
"postCreateCommand": "docker import images/ceos-lab-4.30.3M.tar.xz ceos:4.30.3M",
// Configure properties specific to VS Code.
"customizations": {
"vscode": {
"extensions": [
"ms-vscode-remote.vscode-remote-extensionpack",
"ms-azuretools.vscode-docker",
"ms-python.python"
]
}
}
}

View File

@@ -0,0 +1,17 @@
version: '3.8'
services:
containerlab:
image: ghcr.io/srl-labs/clab
platform: linux/amd64
command: tail -f /dev/null
privileged: true
network_mode: host
pid: host
ports:
- "50080:50080"
volumes:
- ..:/workspace
- /var/run/docker.sock:/var/run/docker.sock
- /var/run/netns:/var/run/netns
- /etc/hosts:/etc/hosts
- /var/lib/docker/containers:/var/lib/docker/containers

10
.gitignore vendored Normal file
View File

@@ -0,0 +1,10 @@
# Data
.DS_Store
.log
# ContainerLab File
clab-vxlan-evpn-l2
.lab_vxlan.yml.bak
# Network images
images/*

38
README.md Normal file
View File

@@ -0,0 +1,38 @@
# VXLAN-EVPN Lab with ContainerLab
## Overview
This project provides a hands-on lab environment for understanding and experimenting with VXLAN-EVPN (Ethernet VPN) technology. Using ContainerLab, the lab sets up a VXLAN topology featuring 1 spine and 2 leaves nodes. The lab can be deployed directly on a PC with ContainerLab installed or through a DevContainer environment.
## Project Structure
The project directory is structured as follows:
- `.devcontainer/devcontainer.json`: Configuration for the DevContainer environment.
- `hosts`: Directory containing host configuration files for the lab.
- `images/ceos-lab-4.30.3M.tar.xz`: Container image used for the lab nodes.
- `lab_vxlan.yml`: YAML file describing the VXLAN lab topology.
## Prerequisites
- Docker and Docker Compose (for DevContainer setup).
- ContainerLab installed either on the host or within the DevContainer.
- Basic understanding of networking and VXLAN-EVPN concepts.
## Setup and Deployment
1. **DevContainer Setup (Optional):**
If using DevContainer, ensure Docker and Docker Compose are installed on your machine. Open the project in a compatible IDE (like Visual Studio Code) and start the DevContainer environment.
2. **ContainerLab Setup:**
- Direct Installation: Install ContainerLab on your host machine.
- Via DevContainer: Use the provided `devcontainer.json` to set up a ContainerLab environment.
3. **Start the Lab:**
- Navigate to the project directory.
- Run `containerlab deploy -t lab_vxlan.yml` to deploy the lab topology.
## Usage
- Once the lab is deployed, you can access the individual nodes (spines and leaves) via CLI or SSH to configure and test VXLAN-EVPN functionalities.
- Use the `hosts` directory to modify or apply specific configurations.

View File

@@ -0,0 +1,61 @@
<mxfile host="Electron" modified="2023-12-19T17:09:04.132Z" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/22.1.2 Chrome/114.0.5735.289 Electron/25.9.4 Safari/537.36" etag="rQl3XyCt-LwD422VX2VM" version="22.1.2" type="device">
<diagram name="Page-1" id="O6sBWOfz2bUCuo58S4gg">
<mxGraphModel dx="694" dy="484" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="aTlmoTqcXMnjitFqs7Kw-1" value="" style="sketch=0;points=[[0.015,0.015,0],[0.985,0.015,0],[0.985,0.985,0],[0.015,0.985,0],[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];verticalLabelPosition=bottom;html=1;verticalAlign=top;aspect=fixed;align=center;pointerEvents=1;shape=mxgraph.cisco19.rect;prIcon=l2_switch;fillColor=#FAFAFA;strokeColor=#5c5c5c;" parent="1" vertex="1">
<mxGeometry x="344.75" y="250" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="aTlmoTqcXMnjitFqs7Kw-6" value="" style="sketch=0;points=[[0.015,0.015,0],[0.985,0.015,0],[0.985,0.985,0],[0.015,0.985,0],[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];verticalLabelPosition=bottom;html=1;verticalAlign=top;aspect=fixed;align=center;pointerEvents=1;shape=mxgraph.cisco19.rect;prIcon=l2_switch;fillColor=#FAFAFA;strokeColor=#5c5c5c;" parent="1" vertex="1">
<mxGeometry x="444.75" y="479" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="aTlmoTqcXMnjitFqs7Kw-7" value="" style="sketch=0;points=[[0.015,0.015,0],[0.985,0.015,0],[0.985,0.985,0],[0.015,0.985,0],[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];verticalLabelPosition=bottom;html=1;verticalAlign=top;aspect=fixed;align=center;pointerEvents=1;shape=mxgraph.cisco19.rect;prIcon=l2_switch;fillColor=#FAFAFA;strokeColor=#5c5c5c;" parent="1" vertex="1">
<mxGeometry x="245" y="479" width="80" height="80" as="geometry" />
</mxCell>
<mxCell id="aTlmoTqcXMnjitFqs7Kw-42" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;endArrow=none;endFill=0;strokeColor=#5c5c5c;flowAnimation=1;" parent="1" source="aTlmoTqcXMnjitFqs7Kw-8" target="aTlmoTqcXMnjitFqs7Kw-27" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="aTlmoTqcXMnjitFqs7Kw-8" value="&lt;b style=&quot;&quot;&gt;&lt;font color=&quot;#5c5c5c&quot;&gt;Arista cEOS&lt;/font&gt;&lt;/b&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" parent="1" vertex="1">
<mxGeometry x="225" y="559" width="120" height="30" as="geometry" />
</mxCell>
<mxCell id="aTlmoTqcXMnjitFqs7Kw-41" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;endArrow=none;endFill=0;strokeColor=#5c5c5c;flowAnimation=1;" parent="1" source="aTlmoTqcXMnjitFqs7Kw-12" target="aTlmoTqcXMnjitFqs7Kw-36" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="aTlmoTqcXMnjitFqs7Kw-12" value="&lt;b&gt;&lt;font color=&quot;#5c5c5c&quot;&gt;Arista cEOS&lt;/font&gt;&lt;/b&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1">
<mxGeometry x="425" y="559" width="120" height="30" as="geometry" />
</mxCell>
<mxCell id="aTlmoTqcXMnjitFqs7Kw-19" style="rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;entryPerimeter=0;endArrow=none;endFill=0;strokeColor=#5c5c5c;flowAnimation=1;" parent="1" source="aTlmoTqcXMnjitFqs7Kw-14" target="aTlmoTqcXMnjitFqs7Kw-7" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="aTlmoTqcXMnjitFqs7Kw-20" style="rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;entryPerimeter=0;endArrow=none;endFill=0;strokeColor=#5c5c5c;flowAnimation=1;" parent="1" source="aTlmoTqcXMnjitFqs7Kw-14" target="aTlmoTqcXMnjitFqs7Kw-6" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="aTlmoTqcXMnjitFqs7Kw-14" value="&lt;b style=&quot;&quot;&gt;&lt;font color=&quot;#5c5c5c&quot;&gt;Arista cEOS&lt;/font&gt;&lt;/b&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" parent="1" vertex="1">
<mxGeometry x="324.75" y="330" width="120" height="30" as="geometry" />
</mxCell>
<mxCell id="aTlmoTqcXMnjitFqs7Kw-27" value="" style="shadow=0;dashed=0;html=1;strokeColor=none;fillColor=#4495D1;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;align=center;outlineConnect=0;shape=mxgraph.veeam.2d.virtual_machine;" parent="1" vertex="1">
<mxGeometry x="265" y="620" width="40" height="40" as="geometry" />
</mxCell>
<mxCell id="aTlmoTqcXMnjitFqs7Kw-30" value="&lt;div style=&quot;&quot;&gt;&lt;b style=&quot;color: rgb(92, 92, 92); font-family: Tahoma; background-color: initial;&quot;&gt;Spine 1&lt;/b&gt;&lt;/div&gt;&lt;font color=&quot;#5c5c5c&quot; face=&quot;Tahoma&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;background-color: initial;&quot;&gt;192.168.101.1&lt;/span&gt;&lt;/div&gt;&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="259.75" y="270" width="85" height="40" as="geometry" />
</mxCell>
<mxCell id="aTlmoTqcXMnjitFqs7Kw-32" value="&lt;div style=&quot;&quot;&gt;&lt;b style=&quot;color: rgb(92, 92, 92); font-family: Tahoma; background-color: initial;&quot;&gt;Leaf 1&lt;/b&gt;&lt;/div&gt;&lt;font color=&quot;#5c5c5c&quot; face=&quot;Tahoma&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;background-color: initial;&quot;&gt;192.168.100.1&lt;/span&gt;&lt;/div&gt;&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="160" y="499" width="85" height="40" as="geometry" />
</mxCell>
<mxCell id="aTlmoTqcXMnjitFqs7Kw-33" value="&lt;div style=&quot;&quot;&gt;&lt;b style=&quot;color: rgb(92, 92, 92); font-family: Tahoma; background-color: initial;&quot;&gt;Leaf 2&lt;/b&gt;&lt;/div&gt;&lt;font color=&quot;#5c5c5c&quot; face=&quot;Tahoma&quot;&gt;&lt;div style=&quot;&quot;&gt;&lt;span style=&quot;background-color: initial;&quot;&gt;192.168.100.2&lt;/span&gt;&lt;/div&gt;&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="360" y="499" width="85" height="40" as="geometry" />
</mxCell>
<mxCell id="aTlmoTqcXMnjitFqs7Kw-36" value="" style="shadow=0;dashed=0;html=1;strokeColor=none;fillColor=#4495D1;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;align=center;outlineConnect=0;shape=mxgraph.veeam.2d.virtual_machine;" parent="1" vertex="1">
<mxGeometry x="465" y="620" width="40" height="40" as="geometry" />
</mxCell>
<mxCell id="aTlmoTqcXMnjitFqs7Kw-43" value="&lt;div style=&quot;&quot;&gt;&lt;font face=&quot;Tahoma&quot; color=&quot;#5c5c5c&quot;&gt;&lt;b&gt;Host 1&amp;nbsp;&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;&quot;&gt;&lt;font face=&quot;Tahoma&quot; color=&quot;#5c5c5c&quot;&gt;10.100.100.1/24&lt;/font&gt;&lt;/div&gt;" style="rounded=1;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="236" y="660" width="97.5" height="40" as="geometry" />
</mxCell>
<mxCell id="aTlmoTqcXMnjitFqs7Kw-44" value="&lt;div style=&quot;&quot;&gt;&lt;font face=&quot;Tahoma&quot; color=&quot;#5c5c5c&quot;&gt;&lt;b&gt;Host 2&amp;nbsp;&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style=&quot;&quot;&gt;&lt;font face=&quot;Tahoma&quot; color=&quot;#5c5c5c&quot;&gt;10.100.100.2/24&lt;/font&gt;&lt;/div&gt;" style="rounded=1;whiteSpace=wrap;html=1;align=center;" parent="1" vertex="1">
<mxGeometry x="436" y="660" width="97.5" height="40" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

7
hosts/h1_interfaces Normal file
View File

@@ -0,0 +1,7 @@
auto lo
iface lo inet loopback
auto eth1
iface eth1 inet static
address 10.100.100.1
netmask 255.255.255.0

7
hosts/h2_interfaces Normal file
View File

@@ -0,0 +1,7 @@
auto lo
iface lo inet loopback
auto eth1
iface eth1 inet static
address 10.100.100.2
netmask 255.255.255.0

32
lab_vxlan.yml Normal file
View File

@@ -0,0 +1,32 @@
name: vxlan-evpn-l2
topology:
nodes:
spine1:
kind: ceos
image: ceos:4.30.3M
mgmt-ipv4: 172.20.20.101
leaf1:
kind: ceos
image: ceos:4.30.3M
mgmt-ipv4: 172.20.20.11
leaf2:
kind: ceos
image: ceos:4.30.3M
mgmt-ipv4: 172.20.20.12
host1:
kind: linux
image: alpine:latest
binds:
- hosts/h1_interfaces:/etc/network/interfaces
mgmt-ipv4: 172.20.20.21
host2:
kind: linux
image: alpine:latest
binds:
- hosts/h2_interfaces:/etc/network/interfaces
mgmt-ipv4: 172.20.20.22
links:
- endpoints: ["spine1:eth1", "leaf1:eth1"]
- endpoints: ["spine1:eth2", "leaf1:eth2"]
- endpoints: ["leaf1:eth3", "host1:eth1"]
- endpoints: ["leaf2:eth3", "host2:eth1"]