Using bridges under NixOS: Difference between revisions

From NixOS Wiki
imported>Samueldr
Samueldr moved page Using bridges under NixOS to Template:Issue: Puts the page back to the proper location to keep history proper
 
Refactor page and propose deletion.
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
#REDIRECT [[Template:Issue]]
{{Delete|The related bug has been fixed and the contents of this page no longer apply to a modern NixOS, which uses systemd-networkd.}}
 
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 <code>dhcpcd</code>, then you have to define a <code>denyInterfaces</code> parameter:
{{file|configuration.nix|nix|
<nowiki>
{
  networking.dhcpcd.denyInterfaces = [ "macvtap0@*" ];
}
</nowiki>
}}
{{Evaluate}}
 
 
Issue {{issue|67966}} is relevant for DHCP and bridging.
 
[[Category:Virtualization]]

Latest revision as of 22:21, 27 October 2024

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.