-
Topology definition file as follow: name: test
topology:
nodes:
node1:
kind: linux
image: ubuntu
node2:
kind: linux
image: ubuntu
node3:
kind: linux
image: ubuntu
links:
- endpoints: ["node1:ens1", "node2:ens1"]
- endpoints: ["node1:ens2", "node3:ens1"] After the host machine rebooted, the links between nodes disappeared. root@node1:/# cat proc/net/dev
Inter-| Receive | Transmit
face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed
lo: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
eth0: 3600 36 0 0 0 0 0 0 946 11 0 0 0 0 0 0 Is there any way to recover the links without damaging the containers? Or any way to keep the links even after the host machine has been rebooted? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Interfaces will disapear when the container stops. You will need to do another containerlab deploy to re-orchestrate the links. |
Beta Was this translation helpful? Give feedback.
-
@binw666 in a case you use linux containers you have an option to re-add links using https://containerlab.dev/cmd/tools/veth/create/ |
Beta Was this translation helpful? Give feedback.
Interfaces will disapear when the container stops. You will need to do another containerlab deploy to re-orchestrate the links.
To me it anyways seems liek you want to run simple linux containers.
What you can do in this case is to even use docker-compose or whatever mechanism you like to deploy and start the containers.
Then for the wiring, instead of using kind linux, you use "ext-container", which is just a reference to an already existing container to containerlab. Then we will just inject the links defined in the links section.
Take a look at the doc, here: https://containerlab.dev/manual/kinds/ext-container/