Using bridges under NixOS: Difference between revisions
Appearance
Refactor page and propose deletion. |
|||
Line 1: | Line 1: | ||
{{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]] | [[Category:Virtualization]] |
Latest revision as of 22:21, 27 October 2024
✖︎︎
This article is a deletion candidate. Further information may be found on the related discussion page.
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@*" ];
}
🟆︎
Tip: In order to affect your NixOS system by your nix-language-specific changes you must first evaluate it:
$ nixos-rebuild switch --sudo
Issue 🚩︎#67966 is relevant for DHCP and bridging.