Replies: 5 comments 5 replies
-
You could use "unprovisioned" group for those devices (that's exactly why we created it), but then you'll have to figure out what to do with the default route, which containerlab sets to point to the management network. See also https://netsim-tools.readthedocs.io/en/latest/example/external.html#unprovisioned-devices If you have any better idea, I'm all ears ;) |
Beta Was this translation helpful? Give feedback.
-
What makes you believe that a container you're interested in would have ip command or even bash? Maybe the one you're looking at today does, but what about the next one? Also, even if we solve your use case and somehow magically assign IP addresses to interfaces, that container still won't be able to reach anything beyond the directly-connected subnet. It all comes down to "that's not how containers are supposed to be used" -- any (regular) container orchestration tool would set up IP addresses and routing before starting the first process in the container. As there are no hooks in containerlab (yet) that would allow you to specify IP addresses on links, or default routing, there's not much we can do. |
Beta Was this translation helpful? Give feedback.
-
@hellt (assuming mentions in discussions work this way ;) Do you think it would be possible to add capability for custom default routes to containerlab? For example, a "host" container (routing daemon, NMS,...) could have a default route pointing to the an in-network interface and specified next hop instead of management network. Ideally, one could specify the whole routing table (prefix/next hop) for each container ;)) Worst case, we could do the same thing in post-startup hooks in netlab, but it would be nicer to have it built into containerlab. |
Beta Was this translation helpful? Give feedback.
-
Worst case: we could execute ip route add commands in container namespace after the container has been started https://stackoverflow.com/questions/36882945/change-default-route-in-docker-container |
Beta Was this translation helpful? Give feedback.
-
There are lots of Linux container images out there representing network devices or functionality. They have their own config files, but what they commonly need is a configured IP address
We could either generalize the 'linux' device, or introduce a new device type that only supports Linux-style IP address configuration, and the bgp module (with dummy config template)
Case in point is the OpenBGPd image: https://github.com/openbgpd-portable/openbgpd-container
It does not contain Python binaries, so the regular linux provisioning scripts fail
Beta Was this translation helpful? Give feedback.
All reactions