networkop / docker-topo

Docker topology builder for network simulations
BSD 3-Clause "New" or "Revised" License
138 stars 41 forks source link

Option to add notconnected interfaces #41

Closed jorisc90 closed 4 years ago

jorisc90 commented 4 years ago

It would be nice if docker-topo had an option to create not connected interfaces to a container.

I'd think this could be implemented e.g. using a driver_opt = notconnected or driver = notconnected.

Reason for this feature is to simulate non-complete networks, while still being able to do complete configuration simulation. I've seen configurations of mpoint networks using veth as driver, resulting in a lot of veth connections that could result in unexpected data-plane behavior.

For now the workaround is to use the macvlan driver and connect to an not-connected interface - I guess this is okay but not really the "nice" way.

networkop commented 4 years ago

can you elaborate the use case, because I don't think I understand it.

jorisc90 commented 4 years ago

Sure,

User wants to run a simulation to test if their configuration provisioning tools work correctly. This provisioning tooling typically deploys to production, where they have configuration set on ports e1-48.

The simulated network might be smaller and not have all 48 ports connected. Say, user just likes to simulate devices on peer endports 1-8, and not having resources to spin up all 48 peer devices - yet they still would like to validate whether their production configuration is validated by the CLI parser correctly.

To do so, it would be helpful if they can spin up a container with et1-48 "active" from a ceos-lab perspective, while only having ports 1-8 connected to other devices.

networkop commented 4 years ago

I think you should be able to attach all of those interfaces to a single bridge and then bring the bridge down from the hostOS.

jorisc90 commented 4 years ago

That sounds reasonable enough; I think we can close this for now.