Using bridges under NixOS

From NixOS Wiki
Revision as of 22:21, 27 October 2024 by SigmaSquadron (talk | contribs) (Refactor page and propose deletion.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

In order to use macvtap bridges in KVM, LXC, Xen or another hypervisor on NixOS, you have to configure your DHCP server to not assign an IP address to that interface.

By default, the DHCP server on NixOS configures every interface with an IP.

Configuration

If you are running dhcpcd, then you have to define a denyInterfaces parameter:

configuration.nix
{
  networking.dhcpcd.denyInterfaces = [ "macvtap0@*" ];
}


Issue #67966 is relevant for DHCP and bridging.