←back to thread

148 points meysamazad | 2 comments | | HN request time: 0.595s | source
Show context
marginalia_nu ◴[] No.45959577[source]
This is extremely tangential, but I was working on setting up some manual network namespaces recently, basically manually reproducing what docker does to fix some of its faulty assumptions regarding containers having multiple IPs and a single name causing all sort of jank, and had to freshen up on a lot of Linux virtual networking concepts (namespaces, veths, bridge networks, macvlans and various other interfaces), made a ton of fairly informal notes to make myself sufficiently familiar with the thing to set it up.

Would anyone be interested if I polished it up and maybe added a refresher on the relevant layer 2 networking needed to reason about it? It's a fair bit of work and it's a niche topic, so I'm trying to poll a bit to see if the juice is worth the squeeze.

replies(11): >>45959749 #>>45959968 #>>45960118 #>>45960266 #>>45960554 #>>45960755 #>>45961911 #>>45961983 #>>45962002 #>>45962168 #>>45967111 #
HumanOstrich ◴[] No.45960266[source]
I was actually going down rabbitholes today trying to figure out how to do a sane Docker setup where all the containers couldn't connect to each other. Your notes would be valuable at most any level of polish.
replies(2): >>45961588 #>>45966377 #
esseph ◴[] No.45961588[source]
If you create each container in its own network namespace, they won't be able to.
replies(1): >>45961736 #
HumanOstrich ◴[] No.45961736[source]
It's a little more complex than that for any non-trivial layout where some containers do need to talk to other containers, but most don't.
replies(2): >>45961964 #>>45968890 #
brirec ◴[] No.45961964[source]
You could also create a network for each pair of containers that need to communicate with one another.
replies(2): >>45962220 #>>45964993 #
HumanOstrich ◴[] No.45962220{4}[source]
That would create an excessive amount of bridges in my case. Also this is another trivial suggestion that anyone can find with a quick search or asking an LLM. Not helpful.

I'm not sure why people are replying to my comment with solutioning and trivial suggestions. All I did was encourage the thread OP to publish their notes. FWIW I've already been through a lot of options for solving my issue, and I've settled on one for now.

replies(1): >>45962711 #
1. kortilla ◴[] No.45962711[source]
> I'm not sure why people are replying to my comment with solutioning and trivial suggestions

Because your comment didn’t say you solved it and you asked for notes without any polish as if that would help.

replies(1): >>45966206 #
2. HumanOstrich ◴[] No.45966206[source]
I didn't say I settled on a solution for all time. I said "for now". I'm still interested in alternatives.