Skip to content

Commit

Permalink
fix(network): fix vlan-tag network
Browse files Browse the repository at this point in the history
libvirtに渡すbridge-networkにおいて、untagは受けず特定のvlan-tagのみを受ける
bridge-networkを構築
  • Loading branch information
misumisumi committed May 12, 2024
1 parent 04a2ea7 commit 45b99e0
Showing 1 changed file with 52 additions and 57 deletions.
109 changes: 52 additions & 57 deletions machines/mother/network.nix
Original file line number Diff line number Diff line change
Expand Up @@ -51,114 +51,109 @@
netdevConfig = {
Kind = "bridge";
Name = "br0";
MACAddress = "56:47:6a:94:2d:34";
};
extraConfig = ''
[Bridge]
VLANFiltering=1
DefaultPVID=1
'';
};
"br1" = {
netdevConfig = {
Kind = "bridge";
Name = "br1";
};
extraConfig = ''
[Bridge]
VLANFiltering=1
DefaultPVID=100
'';
};
home = {
netdevConfig = {
Kind = "vlan";
Name = "home";
MACAddress = "56:47:6a:94:2d:34";
};
vlanConfig = {
Id = 1;
bridgeConfig = {
VLANFiltering = true;
DefaultPVID = 101;
};
};
dev-server-host = {
devnode = {
netdevConfig = {
Kind = "vlan";
Name = "dev-server-host";
MACAddress = "7f:11:b1:60:a4:74";
Name = "devnode";
MACAddress = "6d:ff:2e:62:27:31";
};
vlanConfig = {
Id = 100;
Id = 101;
};
};
dev-k8s = {
devk8s = {
netdevConfig = {
Kind = "vlan";
Name = "dev-server-host";
MACAddress = "7f:11:b1:60:a4:84";
Name = "devk8s";
MACAddress = "ef:e2:93:7e:94:e5";
};
vlanConfig = {
Id = 101;
Id = 102;
};
};
dev-nfs = {
devnfs = {
netdevConfig = {
Kind = "vlan";
Name = "dev-server-host";
MACAddress = "7f:11:b1:60:a4:94";
Name = "devnfs";
MACAddress = "23:ad:d6:5b:f1:5a";
};
vlanConfig = {
Id = 102;
Id = 103;
};
};
};
networks = {
"10-wired" = {
name = "enp5s0";
vlan = [ "devnode" "devk8s" "devnfs" ];
bridge = [ "br0" ];
};
"20-br0" = {
name = "br0";
vlan = [ "home" "dev" ];
DHCP = "yes";
};
"20-devnode" = {
name = "devnode";
bridge = [ "br1" ];
bridgeVLANs = [
{
bridgeVLANConfig = {
VLAN = "1";
PVID = 101;
EgressUntagged = 101;
};
}
];
};
"20-devk8s" = {
name = "devk8s";
bond = [ "br1" ];
bridgeVLANs = [
{
bridgeVLANConfig = {
VLAN = "100-102";
PVID = 102;
EgressUntagged = 102;
};
}
];
};
"30-home" = {
name = "home";
DHCP = "yes";
};
"40-dev-server-host" = {
name = "dev-server-host";
bridge = [ "br1" ];
DHCP = "no";
};
"40-dev-k8s" = {
name = "dev-k8s";
bridge = [ "br1" ];
DHCP = "no";
};
"40-dev-nfs" = {
name = "dev-nfs";
bridge = [ "br1" ];
DHCP = "no";
"20-devnfs" = {
name = "devnfs";
bond = [ "devbr1" ];
bridgeVLANs = [
{
bridgeVLANConfig = {
PVID = 103;
EgressUntagged = 103;
};
}
];
};
"50-br1" = {
"30-br1" = {
name = "br1";
DHCP = "no";
networkConfig = {
LinkLocalAddressing = "no";
LLDP = "no";
EmitLLDP = "no";
IPv6AcceptRA = "no";
IPv6SendRA = "no";
};
bridgeVLANs = [
{
bridgeVLANConfig = {
VLAN = "100-102";
PVID = 100;
EgressUntagged = 100;
VLAN = "101-103";
};
}
];
Expand Down

0 comments on commit 45b99e0

Please sign in to comment.