commit fb0a5f0813dfa08a46a49dec33f5ea37b0c87a37
parent b62d1e25ddb531412568155c732b971583e5ba75
Author: MTRNord <mtrnord1@gmail.com>
Date: Sat, 27 Jan 2024 21:01:45 +0100
Switch to gobgpd
Diffstat:
2 files changed, 102 insertions(+), 0 deletions(-)
diff --git a/nixos/worker-1/configuration.nix b/nixos/worker-1/configuration.nix
@@ -502,6 +502,37 @@ in {
router-id = "10.0.2.1";
};
};
+ defined-sets = {
+ prefix-sets = {
+ prefix-set-name = "ps1";
+ prefix-list = {
+ ip-prefix = "10.0.2.25/32";
+ };
+ };
+ neighbor-sets = {
+ neighbor-set-name = "ns1";
+ neighbor-info-list = ["10.0.1.2" "10.0.2.2"];
+ };
+ };
+ policy-definitions = {
+ name = "pd1";
+ statements = {
+ name = "statement1";
+ coditions = {
+ match-prefix-set = {
+ prefix-set = "ps1";
+ match-set-options = "any";
+ };
+ match-neighbor-set = {
+ prefix-set = "ns1";
+ match-set-options = "any";
+ };
+ actions = {
+ route-disposition = "accept-route";
+ };
+ };
+ };
+ };
neighbors = [
{
config = {
@@ -514,6 +545,16 @@ in {
multihop-ttl = 3;
};
};
+ apply-policy = {
+ config = {
+ import-policy-list = ["pd1"];
+ };
+ };
+ route-server = {
+ config = {
+ route-server-client = true;
+ };
+ };
}
{
config = {
@@ -526,6 +567,16 @@ in {
multihop-ttl = 3;
};
};
+ apply-policy = {
+ config = {
+ import-policy-list = ["pd1"];
+ };
+ };
+ route-server = {
+ config = {
+ route-server-client = true;
+ };
+ };
}
];
};
diff --git a/nixos/worker-2/configuration.nix b/nixos/worker-2/configuration.nix
@@ -550,6 +550,37 @@ in {
router-id = "10.0.2.2";
};
};
+ defined-sets = {
+ prefix-sets = {
+ prefix-set-name = "ps1";
+ prefix-list = {
+ ip-prefix = "10.0.2.25/32";
+ };
+ };
+ neighbor-sets = {
+ neighbor-set-name = "ns1";
+ neighbor-info-list = ["10.0.1.2" "10.0.2.1"];
+ };
+ };
+ policy-definitions = {
+ name = "pd1";
+ statements = {
+ name = "statement1";
+ coditions = {
+ match-prefix-set = {
+ prefix-set = "ps1";
+ match-set-options = "any";
+ };
+ match-neighbor-set = {
+ prefix-set = "ns1";
+ match-set-options = "any";
+ };
+ actions = {
+ route-disposition = "accept-route";
+ };
+ };
+ };
+ };
neighbors = [
{
config = {
@@ -562,6 +593,16 @@ in {
multihop-ttl = 3;
};
};
+ apply-policy = {
+ config = {
+ import-policy-list = ["pd1"];
+ };
+ };
+ route-server = {
+ config = {
+ route-server-client = true;
+ };
+ };
}
{
config = {
@@ -574,6 +615,16 @@ in {
multihop-ttl = 3;
};
};
+ apply-policy = {
+ config = {
+ import-policy-list = ["pd1"];
+ };
+ };
+ route-server = {
+ config = {
+ route-server-client = true;
+ };
+ };
}
];
};