!tCyGickeVqkHsYjWnh:nixos.org

NixOS Networking

914 Members
Declaratively manage your switching, routing, wireless, tunneling and more.265 Servers

Load older messages


SenderMessageTime
15 Jul 2021
@amanda:camnet.siteAmanda (she/her)( He doesn't seem to understand how it works either, I tried asking )17:03:26
@linus.heckemann:matrix.mayflower.deLinux Hackerman Amanda (she/her): yep, if you create a bridge and put both your physical interface and one side of a veth pair on that bridge, the containers will be on the network as if they were additional physical machines attached via a switch. 17:08:43
@amanda:camnet.siteAmanda (she/her)Huh, It's just putting it on the bridge? For some reason I thought bridges were what was used for the host-local stuff17:09:37
@linus.heckemann:matrix.mayflower.deLinux HackermanNot sure how to do that with lxd, but you can use systemd-nspawn's `--network-bridge` to put an nspawn container on it17:10:02
@linus.heckemann:matrix.mayflower.deLinux HackermanThe trick is to bridge the physical interface as well.17:10:13
@amanda:camnet.siteAmanda (she/her) So I assume I'd want something like networking.bridges.<bridge>.interfaces = ["eth0"] 17:10:58
@linus.heckemann:matrix.mayflower.deLinux HackermanBridge = switch, pretty much. You can have a bridge where only the containers are — that way the containers can only talk to each other and the host, and the host needs to do forwarding for them to reach any further17:11:19
@linus.heckemann:matrix.mayflower.deLinux HackermanBy adding the physical interface, their traffic can go straight to your router17:11:37
@linus.heckemann:matrix.mayflower.deLinux Hackerman
In reply to @amanda:camnet.site
So I assume I'd want something like networking.bridges.<bridge>.interfaces = ["eth0"]
Yep
17:11:39
@amanda:camnet.siteAmanda (she/her)That's not going to kick off other devices off the bridge on a apply is it?17:12:15
@linus.heckemann:matrix.mayflower.deLinux Hackerman
In reply to @amanda:camnet.site
That's not going to kick off other devices off the bridge on a apply is it?
Aahhh that definitely is a problem I've had. I'm not sure if it still exists. I think it's fine if you're using networkd and not scripted networking (which I'd recommend regardless)
17:14:14
@amanda:camnet.siteAmanda (she/her)I'm actually not even sure what I am using, to be honest, lemme dig and see what networking stuff I have enabled.17:14:46
@linus.heckemann:matrix.mayflower.deLinux Hackerman
In reply to @amanda:camnet.site
So I assume I'd want something like networking.bridges.<bridge>.interfaces = ["eth0"]
You also then need to set the host's network config on the bridge instead of the physical interface
17:14:58
@amanda:camnet.siteAmanda (she/her) Hrm, seems I'm not doing anything special for networking? Whatever nixos defaults to, I only set networking.{hostName,fiewall.*,nameservers} 17:16:47
@amanda:camnet.siteAmanda (she/her)ah, I guess I'm using scripted then, networking.useNetworkd is still defaulting to false17:18:56
@linus.heckemann:matrix.mayflower.deLinux Hackermanyep17:20:55
@linus.heckemann:matrix.mayflower.deLinux Hackermanit's likely to be a trivial switch though, I'd suggest giving it a shot if you're in a position to roll back (i.e. not from 100km away or something ;) )17:21:25
@linus.heckemann:matrix.mayflower.deLinux Hackermanand I've had a lot less pain with networkd than with scripted networking.17:22:01
@amanda:camnet.siteAmanda (she/her)nah, hardest part would be finding a usb keyboard to plug in to it. :P17:22:14
@linus.heckemann:matrix.mayflower.deLinux Hackerman😱17:22:29
@amanda:camnet.siteAmanda (she/her)

So I'd want something like this:

  networking.interfaces.lxdbr0.useDHCP = true;
  networking.bridges.lxdbr0.interfaces = [ "eth0" ];
17:24:02
@linus.heckemann:matrix.mayflower.deLinux Hackerman yes, though I'd probably call it something like lan since it's not lxd-specific, but also providing the host's internet access :) 17:26:11
@amanda:camnet.siteAmanda (she/her)fair17:27:00
18 Jul 2021
@Kitlith:matrix.orgKitlith joined the room.03:16:50
@aanderse:nixos.devaanderse joined the room.15:56:25
@aanderse:nixos.devaanderse changed their display name from Aaron Andersen to aanderse.15:58:49
@disrupt_the_flow:matrix.orgdisrupt_the_flow joined the room.20:21:55
23 Jul 2021
@schnecfk:ruhr-uni-bochum.deCRTified joined the room.08:36:50
Room Avatar Renderer.23:24:07
26 Jul 2021
@czen:honk.liCzen joined the room.18:42:51

Show newer messages


Back to Room ListRoom Version: 6