diff options
author | Kjetil Orbekk <kj@orbekk.com> | 2023-02-25 17:58:02 -0500 |
---|---|---|
committer | Kjetil Orbekk <kj@orbekk.com> | 2023-02-25 17:59:19 -0500 |
commit | 503ebd23911f8ac984671518f5f7497cbab9fa9b (patch) | |
tree | 1949aad1a89e626529dd544497cb0ac3a6ba4707 /modules | |
parent | dc29c72c1a1da0e4373257ee5d059abd2031dbb5 (diff) |
Update router
Diffstat (limited to 'modules')
-rw-r--r-- | modules/router.nix | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/modules/router.nix b/modules/router.nix index 8d712e9..adada7b 100644 --- a/modules/router.nix +++ b/modules/router.nix @@ -34,13 +34,18 @@ let interfaces.dragon-vport = { vlan = 100; }; extraOvsctlCmds = '' - add bond kjlan bond0 eno1 eno2 lacp=active miimon=5000 + add-bond kjlan bond0 eno1 eno2 lacp=active set interface wan-vport mac=\"3c:97:0e:19:7e:5c\" ''; }; + networking.interfaces.eno1 = {}; + networking.interfaces.eno2 = {}; + networking.interfaces.wan-vport = { + useDHCP = true; + }; networking.interfaces.lan-vport = { - ipv4.addresses = [{address = "172.20.100.1"; prefixLength = 23;}]; + ipv4.addresses = [{address = "172.20.100.1"; prefixLength = 24;}]; }; networking.interfaces.admin-vport = { ipv4.addresses = [{address = "10.10.255.18"; prefixLength = 24;}]; @@ -56,19 +61,24 @@ let no-resolv no-hosts + dhcp-authoritative + enable-ra + address=/localhost/::1 address=/localhost/127.0.0.1 - dhcp-range=lan-vport,172.20.100.1,172.20.101.254,5m + dhcp-range=lan,172.20.100.10,172.20.100.254,5m dhcp-option=net:lan,option:router,172.20.100.1 dhcp-option=net:lan,option:dns-server,172.20.100.1 ''; }; networking.dhcpcd = { + enable = true; extraConfig = '' noipv6rs - nohook resolv.conf + noipv6 + nohook resolv.conf interface wan-vport dhcp ''; @@ -144,6 +154,7 @@ in { systemd.services."container@router" = { after = ["router-netns.service"]; + requires = ["router-netns.service"]; wantedBy = ["network.target"]; }; |