freifunk: configure ipv6
This commit is contained in:
parent
09ff8fc7cd
commit
89cad8060a
|
@ -85,10 +85,30 @@ in {
|
|||
"20-core" = {
|
||||
enable = true;
|
||||
matchConfig = { Name = "core"; };
|
||||
networkConfig = {
|
||||
Address = "${coreAddress}/${toString corePrefixlen}";
|
||||
Gateway = "172.20.72.7";
|
||||
};
|
||||
addresses = [ {
|
||||
addressConfig = {
|
||||
Address = "${coreAddress}/${toString corePrefixlen}";
|
||||
};
|
||||
} {
|
||||
addressConfig = {
|
||||
Address = "2a02:8106:208:5281:8000::1/64";
|
||||
};
|
||||
} {
|
||||
addressConfig = {
|
||||
Address = "fd23:42:c3d2:581:8000::1/64";
|
||||
};
|
||||
} ];
|
||||
routes = [ {
|
||||
routeConfig = {
|
||||
# upstream1
|
||||
Gateway = "2a02:8106:208:5281::b:0";
|
||||
};
|
||||
} {
|
||||
routeConfig = {
|
||||
# anon1
|
||||
Gateway = "172.20.72.7";
|
||||
};
|
||||
} ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -131,17 +151,21 @@ in {
|
|||
services.bird2 = {
|
||||
enable = true;
|
||||
config = ''
|
||||
protocol kernel {
|
||||
protocol kernel K4 {
|
||||
ipv4 {
|
||||
export all;
|
||||
};
|
||||
}
|
||||
protocol kernel K6 {
|
||||
ipv6 {
|
||||
export all;
|
||||
};
|
||||
}
|
||||
protocol device {
|
||||
scan time 10;
|
||||
}
|
||||
|
||||
protocol ospf ZW4 {
|
||||
ipv4;
|
||||
protocol ospf v2 ZW4 {
|
||||
area 0 {
|
||||
networks {
|
||||
172.20.72.0/21;
|
||||
|
@ -154,6 +178,20 @@ in {
|
|||
};
|
||||
}
|
||||
|
||||
protocol ospf v3 ZW6 {
|
||||
area 0 {
|
||||
networks {
|
||||
fd23:42:c3d2:500::/56;
|
||||
2a02:8106:208:5200::/56;
|
||||
2a02:8106:211:e900::/56;
|
||||
};
|
||||
interface "core" {
|
||||
#authentication cryptographic;
|
||||
#password "${import <secrets/shared/ospf/message-digest-key.nix>}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
router id ${coreAddress};
|
||||
'';
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue