fieldpoc/docs/network.md

1.6 KiB

Configure networking

The hardware should have two network interfaces, so we can use one interface to connect the telephony server to the internet and access for management. The other network interface is used to connect to the DECT antenna.

Management and internet interface

You can configure the interface for management and internet access how you like it. Usually leaving it with doing DHCP is totally find.

Interface for DECT antenna

The telephony server is acting as a router for the DECT antenna.

The network interface used in this example is called enp3s0. Replace it with the name of your own interface.

Assign a static IP address to the interface:

networking.interfaces.enp3s0.ipv4.addresses = [ { address = "10.42.132.1"; prefixLength = 24; } ];

Phoning over the internet involves weird protocols. Because configuring firewalls for that use-case is hard, we disable the NixOS firewall on that interface. We can do that safely, as only the DECT antenna is connected to it and we have to trust it anyway.

networking.firewall.trustedInterfaces = [ "enp3s0" ];

Configure DHCP server

FieldPOC ships with some configuration wrapper that helps setting up the DHCP server required for the DECT antennas.

services.fieldpoc = {
  dhcp = {
    enable = true;
    interface = "enp3s0";
    subnet = "10.42.132.0/24";
    pool = "10.42.132.200 - 10.42.132.250";
    router = "10.42.132.1";
    dnsServers = "10.42.10.8";
    omm = "10.42.132.2";
    reservations = [
      {
        name = "omm";
        macAddress = "00:30:42:1b:8c:7c";
        ipAddress = "10.42.132.2";
      }
    ];
  };
};