2023-07-26 · Full Changelog
@steiler added support for MACVLAN interfaces in #1402. This is a great addition for those who want to run containerlab and have the nodes to be directly connected to the physical network. Here is an example of a topology that uses MACVLAN interfaces:
This results in
l1 node having a macvlan interface named
eth1 that uses a parent interface of
enp0s3. The parent interface is the one that is connected to the physical network. The
enp0s3 interface is created on the host machine and is not visible to the container. The
eth1 interface is created inside the container and is visible to the container only. The
eth1 interface is assigned an IP address from the same subnet as the
enp0s3 interface. This allows the container to be directly connected to the physical network.
Check out the documentation for more details.
Here is an example of embedding a mermaid graph diagram for the 5-tier Clos topology from the lab example. It was generated with the following command:
--- title: clos02 --- graph BT spine3---superspine1 spine4---superspine2 spine1---superspine1 leaf3---spine4 leaf2---spine1 leaf4---spine3 client2---leaf2 client3---leaf3 client4---leaf4 leaf1---spine1 leaf1---spine2 leaf3---spine3 leaf4---spine4 client1---leaf1 leaf2---spine2 spine2---superspine2
Compare it with the hand-drawn topology and you can see that it is pretty close to the real thing.
Overwriting bind mounts#
With #1446 users can now overwrite bind mounts that are defined on a more granular levels of a topology. A good example for such case is where a user defines some bind mounts for a certain kind, but then wants to overwrite some of these binds on a per-node basis. Here is an example:
linux1 node will have
source2.json mounted to
/dst.json instead of
source1.json that is defined on the kind level.
Execute on host#
With #1481 users can now execute commands on the host machine defined in the topology file. Typically this is used to prepare host environment for the lab in question.
Now by specifying the
host node in the topology you can add
exec section to it and this will tell containerlab to execute commands on the host machine.