Skip to content

Commit

Permalink
Reapply "ixp-as11201: pass peering lan pci device"
Browse files Browse the repository at this point in the history
This reverts commit 34f9b7e.
  • Loading branch information
MarcelCoding committed Dec 10, 2024
1 parent 28195d9 commit 28ddf52
Showing 1 changed file with 17 additions and 31 deletions.
48 changes: 17 additions & 31 deletions hosts/ixp-as11201/configuration.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
{ lib, pkgs, ... }:

let
macPeering = "12:6d:81:f8:61:de";
in
{
dd-ix = {
useFpx = true;
Expand All @@ -17,20 +12,11 @@ in
};
};

microvm = {
# TODO: change to macvtap
# this is the interface connected to the peering lan
# the mac is configured in ixp manager
interfaces = [{
type = "tap";
id = "vm-ixp-as11201p";
mac = macPeering;
}];

binScripts.tap-up = lib.mkAfter ''
${lib.getExe' pkgs.iproute2 "ip"} link set dev 'vm-ixp-as11201p' master 'ixp-peering'
'';
};
# device in peering vlan
microvm.devices = [{
bus = "pci";
path = "0000:06:00.0";
}];

networking.ifstate.settings.namespaces.ixp-peering = {
options.sysctl =
Expand Down Expand Up @@ -83,18 +69,18 @@ in
"2001:4:112::1/48" # blackhole.as112.arpa (anycast)
];
}
{
name = "ixp-peering";
link = {
state = "up";
kind = "physical";
permaddr = macPeering;
};
addresses = [
"2001:7f8:79::70:1/64"
"193.201.151.70/26"
];
}
# {
# name = "ixp-peering";
# link = {
# state = "up";
# kind = "physical";
# permaddr = macPeering;
# };
# addresses = [
# "2001:7f8:79::70:1/64"
# "193.201.151.70/26"
# ];
# }
];
};

Expand Down

0 comments on commit 28ddf52

Please sign in to comment.