!tCyGickeVqkHsYjWnh:nixos.org

NixOS Networking

899 Members
on your Router! Declaratively manage your switching, routing, wireless, tunneling and more.265 Servers

Load older messages


SenderMessageTime
2 Jun 2025
@elvishjerricco:matrix.orgElvishJerriccoI forget if it's the first or last when sorting the network files by name that applies08:43:13
@elvishjerricco:matrix.orgElvishJerricco the way to have separate files apply to the same interface is to use drop-ins for the same foo.network name 08:43:44
@elvishjerricco:matrix.orgElvishJerriccocourse that's not super relevant for nixos08:44:03
@emilazy:matrix.orgemily for a router that needs to do PPPoE to get a WAN link, which is likely to be less painful, systemd-networkd and orchestrating pppd as a separate service, or just using NetworkManager which supports it natively? 11:29:15
@k900:0upti.meK900I don't know how well it works with networkd11:29:49
@k900:0upti.meK900But I know pppd standalone is CURSED11:29:53
@hexa:lossy.networkhexa
      "60-ppp0" = {
        matchConfig.Type = "ppp";
        networkConfig = {
          IPv6AcceptRA = true;
          DHCP = "ipv6";
          KeepConfiguration = true;
        };
        dhcpV6Config = {
          WithoutRA = "solicit";
          PrefixDelegationHint = "::/56";
        };
        ipv6SendRAConfig = {
          Managed = true;
        };
        linkConfig.RequiredForOnline = "routable";
11:32:43
@hexa:lossy.networkhexa *
      "60-ppp0" = {
        matchConfig.Type = "ppp";
        networkConfig = {
          IPv6AcceptRA = true;
          DHCP = "ipv6";
          KeepConfiguration = true;
        };
        dhcpV6Config = {
          WithoutRA = "solicit";
          PrefixDelegationHint = "::/56";
        };
        ipv6SendRAConfig = {
          Managed = true;
        };
        linkConfig.RequiredForOnline = "routable";
      };

11:32:55
@emilazy:matrix.orgemilywait systemd-networkd supports it natively? everything I saw implied no11:33:21
@hexa:lossy.networkhexa I think the important bit is KeepConfiguration, since the PPP tunnel configures IPv4 by itself 11:33:22
@emilazy:matrix.orgemily or is this just separate to the glue to make pppd run at the right time? 11:33:28
@hexa:lossy.networkhexano, it just adds config on top of the ppp interface that pppd creates11:33:36
@emilazy:matrix.orgemilyright11:33:45
@hexa:lossy.networkhexanetworkd reacts to interface creation11:33:49
@emilazy:matrix.orgemily I guess you just need that + making the pppd service run whenever the underlying link comes up 11:34:06
@emilazy:matrix.orgemilywas just wondering if NM might be better-integrated somehow11:34:16
@hexa:lossy.networkhexa *
      "60-ppp0" = {
        matchConfig.Type = "ppp";
        networkConfig = {
          IPv6AcceptRA = true;
          DHCP = "ipv6";
          KeepConfiguration = true;
        };
        dhcpV6Config = {
          WithoutRA = "solicit";
          PrefixDelegationHint = "::/56";
        };
        ipv6SendRAConfig = {
          Managed = true;
        };
        linkConfig.RequiredForOnline = "routable";
      };
11:34:20
@hexa:lossy.networkhexacertainly not11:34:24
@emilazy:matrix.orgemily also yeah I've been reading pppd config files and experiencing true suffering 11:34:52
@hexa:lossy.networkhexaI don't remember it integrating with pppd11:34:57
@emilazy:matrix.orgemilyI assume NM's PPPoE support just wraps it anyway though11:34:58
@hexa:lossy.networkhexa
  age.secrets."ppp-credentials".file = ../../agenix/ppp-credentials.age;

  services.pppd = {
    enable = true;
    peers."1und1" = {
      config = ''
        debug
        plugin pppoe.so
        nic-enp1s0
        file ${config.age.secrets."ppp-credentials".path}
        mtu 1500
        mru 1500
        maxfail 0
        novj
        +ipv6
        noauth
        defaultroute
        persist
        noaccomp
        default-asyncmap
        lcp-echo-interval 30
        lcp-echo-failure 4
        #lcp-echo-adaptive
        lcp-max-configure 10
      '';
    };
  };
11:35:19
@emilazy:matrix.orgemilyhttps://networkmanager.dev/docs/api/latest/settings-pppoe.html implies it does11:35:59
@emilazy:matrix.orgemily(but doesn't look very rich)11:36:14
@emilazy:matrix.orgemilyty :)11:36:19
@hexa:lossy.networkhexaoh, it's called DSL/PPPoE in the list11:36:41
@hexa:lossy.networkhexaand yeah, the config looks too simple11:37:17
@emilazy:matrix.orgemilyyes. it sure would make sense if you only used PPPoE on DSL, and didn't also carry it over to FTTP. wouldn't it11:37:18
@emilazy:matrix.orgemilythat would be a great world we could live in :P11:37:27
@emilazy:matrix.orgemily

I discovered this gem:

root@OpenWrt:~# cat /etc/ppp/filter
#
# Expression: outbound and not icmp[0] != 8 and not tcp[13] & 4 != 0
#
19
48 0 0 0
21 0 16 1
40 0 0 2
21 0 13 33
48 0 0 13
21 0 5 1
40 0 0 10
69 9 0 8191
177 0 0 4
80 0 0 4
21 6 7 8
21 0 5 6
40 0 0 10
69 3 0 8191
177 0 0 4
80 0 0 17
69 1 0 4
6 0 0 4
6 0 0 0
11:38:10

Show newer messages


Back to Room ListRoom Version: 6