srl-labs / containerlab

container-based networking labs
https://containerlab.dev
BSD 3-Clause "New" or "Revised" License
1.47k stars 250 forks source link

Not able to define a link with interfaces prefixed with swp #1222

Closed bjorntimmer closed 1 year ago

bjorntimmer commented 1 year ago

I'm trying to create a topology with a CVX node (from the lab example), however when I try to start the topology I got the message: "Error: "sw1" interface name "swp12" doesn't match the required pattern. It should be named as ethX, where X is >0"

The topology file I'm using is:

name: cvx02

topology:
  nodes:
    sw1:
      kind: cvx
      image: networkop/cx:5.3.0
      runtime: docker
      binds:
        - /lib/modules:/lib/modules:ro # for kernel modules like ebtables
        - sw1/interfaces:/etc/network/interfaces
    h1:
      kind: linux
      image: networkop/host:ifreload
      binds:
        - h1/interfaces:/etc/network/interfaces
      cmd: 2 # wait for 2 interfaces to be connected: eth0 + eth1

  links:
    - endpoints: ["sw1:swp12", "h1:eth1"]
hellt commented 1 year ago

Hey @bjorntimmer yes, sorry, we have to fix that for sure.

@bjorntimmer @networkop do you guys know what interface name patterns should cumulus vx conform to? Is it always swp\d+ or can it also be something else?

bjorntimmer commented 1 year ago

As far as I know CL uses swp\d+ for dataplane interfaces and eth\d+ for management interfaces.

networkop commented 1 year ago

Is this a clab error message? I don't remember seeing it. @bjorntimmer you can try using an older version as a workaround

hellt commented 1 year ago

@networkop It is, we implemented interface name check, because too many people used ethX for systems which required their own naming, but we skipped cvx it seems. So if cvx uses swp\d+ and nothing else, I am happy to fix that

networkop commented 1 year ago

@hellt yes, eth0 and swp\d+