Closed vanrein closed 4 years ago
When constructing networking scripts, avoid the name conflict risk of the local name creation,
... &&
ip link add kip0if0 type veth peer name kip0eth0 &&
ip link set kip0eth0 netns kip0ns &&
...
instead create the name directly in the target netns,
... &&
ip link add kip0if0 type veth peer name kip0eth0 netns kip0ns &&
...
Currently using deprecated prestart
hook. Move to new ones and hope to create the netns for the KIP Service.
The prestart
hook is the only option that seems to work, createContainer
is not invoked at all.
This is how far we can get now. Cannot create bridges (duh) or network namespace (pitty) because prestart
is the only hook, and it won't accept such statements. So, no cleanup either.
News alert! It is possible to set the netns
on both interfaces when creating a pair,
ip link add test0 netns test type veth peer name test1 netns kip0ns
This is still missing functionality, so go for it!
Finally resolved, with the bridges appearing in their own netns
, using the trick above, in 023e2c13e347ea5e9b6429659f270f5e992d28aa in branch master
. We now have a really flexible engine.
In
internetwide/CMakeLists.txt
, declare a number of bridge names. They are optional until one of the underlying scripts requires their name (because they want to inject interfaces into it, of course).Presumed useful levels are (with
iwo0
as a default scope, more could be imagined on the same machine if so desired).iwo0pub
as a public interfaceiwo0dmz
as a demilitarised zoneiwo0bck
for backend connectivityiwo0plg
for plugin servicesiwo0ngb
for crossover to neighbouring nodes (same realm)iwo0sit
for remote sites (same realm)iwo0ctl
for automated control connectionsiwo0adm
for administrative connectionsThere is no reason why all these interfaces have to be different bridges, but the ability to declare them separately is useful. Bridges are cheap! It makes sense to split these into separate network name spaces too, except that this makes them difficult to review by network administrators.
Each interface is described with