Skip to content

Commit

Permalink
bonding via systemd-networkd
Browse files Browse the repository at this point in the history
  • Loading branch information
ifd3f committed Apr 9, 2024
1 parent afdb4c5 commit 60460ce
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kubeconfig
.env
matrix.json
result
result-*
.direnv
*.iso
*.tar
Expand Down
46 changes: 46 additions & 0 deletions machines/boop/net.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,50 @@ let constants = import ./constants.nix;
in {
networking.useDHCP = false;
networking.interfaces.${constants.mgmt_if}.useDHCP = true;

systemd.network = {
enable = true;

netdevs."10-prod-vlan-100" = {
netdevConfig = {
Name = "prod-vlan";
Kind = "vlan";
Description = "Public prod traffic VLAN";
};
vlanConfig.Id = 100;
};
networks."10-bond-enos" = {
name = "eno2 eno3 eno4";
matchConfig.Type = "ether";
networkConfig.Description = "Primary ethernet devices";
bond = [ "bond007" ];
};
netdevs."20-bond007" = {
netdevConfig = {
Name = "bond007";
Kind = "bond";
Description = "Bond of primary ethernet devices";
};
bondConfig = {
Mode = "802.3ad";
LACPTransmitRate = "fast";
};
};
networks."20-bond007" = {
name = "bond007";
matchConfig.Type = "bond";
networkConfig = {
Description = "Bond of primary ethernet devices";
VLAN = [ "prod-vlan" ];
LinkLocalAddressing = "no";
LLDP = "no";
IPv6AcceptRA = "no";
};
};
networks."20-bond-prod-vlan" = {
name = "prod-vlan";
matchConfig.Type = "vlan";
networkConfig.Description = "VLAN of prod traffic over the bond";
};
};
}

0 comments on commit 60460ce

Please sign in to comment.