Skip to content

Commit

Permalink
nixos/scion: init scion ip gateway config in test
Browse files Browse the repository at this point in the history
create a scion-ip-gateway between scion04 and scion05
  • Loading branch information
sarcasticadmin authored and fricklerhandwerk committed Sep 25, 2024
1 parent 6c527bf commit 57b9f12
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
42 changes: 42 additions & 0 deletions nixos/tests/scion/freestanding-deployment/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,47 @@ in
};
scion04 = { ... }: {
imports = (imports 4);
networking.interfaces."lo".ipv4.addresses = [{ address = "172.16.1.1"; prefixLength = 32; }];
services.scion.scion-ip-gateway = {
enable = true;
config = {
tunnel = {
src_ipv4 = "172.16.1.1";
};
};
trafficConfig = {
ASes = {
"42-ffaa:1:5" = {
Nets = [
"172.16.100.0/24"
];
};
};
ConfigVersion = 9001;
};
};
};
scion05 = { ... }: {
imports = (imports 5);
networking.interfaces."lo".ipv4.addresses = [{ address = "172.16.100.1"; prefixLength = 32; }];
services.scion.scion-ip-gateway = {
enable = true;
config = {
tunnel = {
src_ipv4 = "172.16.100.1";
};
};
trafficConfig = {
ASes = {
"42-ffaa:1:4" = {
Nets = [
"172.16.1.0/24"
];
};
};
ConfigVersion = 9001;
};
};
};
};
testScript = let
Expand Down Expand Up @@ -126,6 +164,10 @@ in
# Execute pingAll command on all instances
succeed("${pingAll} >&2")
# Execute ICMP pings across scion-ip-gateway
scion04.succeed("ping -c 3 172.16.100.1 >&2")
scion05.succeed("ping -c 3 172.16.1.1 >&2")
# Restart all scion services and ping again to test robustness
succeed("systemctl restart scion-* >&2")
succeed("${pingAll} >&2")
Expand Down
6 changes: 6 additions & 0 deletions nixos/tests/scion/freestanding-deployment/topology4.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,11 @@
}
}
}
},
"sigs": {
"sig-1": {
"ctrl_addr": "127.0.0.1:30256",
"data_addr": "127.0.0.1:30056"
}
}
}
6 changes: 6 additions & 0 deletions nixos/tests/scion/freestanding-deployment/topology5.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,11 @@
}
}
}
},
"sigs": {
"sig-1": {
"ctrl_addr": "127.0.0.1:30256",
"data_addr": "127.0.0.1:30056"
}
}
}

0 comments on commit 57b9f12

Please sign in to comment.