eyJhb changed the topic of #nixos-on-your-router to: NixOS on your Router || https://logs.nix.samueldr.com/nixos-on-your-router
Dezgeg has quit [Ping timeout: 272 seconds]
Dezgeg has joined #nixos-on-your-router
fooker has quit [Ping timeout: 272 seconds]
fooker has joined #nixos-on-your-router
nullheroes has quit [Quit: WeeChat 2.9]
nullheroes has joined #nixos-on-your-router
<andi-> betawaffle: you could try to change the source address selection algorithm via [IPv6AddressLabel]
<betawaffle> hmm, how does that work?
<andi-> https://systemd.network/systemd.network.html#%5BIPv6AddressLabel%5D%20Section%20Options
<andi-> what confuses me a bit is that "Precedence is managed by userspace"
<andi-> if networkd isn't userspace what is it?
<andi-> https://www.man7.org/linux/man-pages/man8/ip-addrlabel.8.html this would be the imperative command to manage them
<betawaffle> there's still a lot i don't know about ipv6 and linux networking in general
<andi-> you never stop learning :)
<betawaffle> what does a label do? nothing by itself?
<betawaffle> is the idea that i'd label this prefix with a number that means "this shit isn't routable, don't use it"
<betawaffle> and then set up something to tell the kernel that my number means don't use it?
<andi-> The way I read it you should be able to apply a label the entire range that ATT uses for their CPE management.
<andi-> And with a lower precedence
<betawaffle> how do i set the precedence?
<andi-> No idea :D
<andi-> I just stumbled upon that while looking for something else
<betawaffle> so, ipv6 is working from all my non-router hosts now, it seems
<andi-> nice, you still have the duplicate route entries?
<betawaffle> the only thing left is to fix it on the router
<betawaffle> i think so, yeah. let me check
<betawaffle> yep
<betawaffle> i mean, it's technically not hurting anything, but it doesn't make sense
<andi-> that might be a side-effect of Assign=1
<andi-> The route with a ttl is what networkd usually installs (even without having an address from that subnet on the interface as that isn't required)
<andi-> the route without rrl is likely due to the prefix on the interface
<andi-> s/rrl/ttl/
<betawaffle> ok, let me try it without Assign=true
<andi-> While `ip -6 route` shows them differently they should be equivalent BECAUSE the address on the interface should have the ttl
<andi-> and as soon as the address is invalid the route is gone.
<betawaffle> andi-: are you going to submit a patch to networkd to allow disabling IA_NA?
<betawaffle> it'd be nice to avoid whatever hack i'm going to make *eventually*
<betawaffle> hmm, assign commented out, and it's still there. let me try removing it by hand, and see if it comes back
<betawaffle> lol, nope, they came back
<andi-> betawaffle: I am not sure if disablig IA_NA is even compliant..
<andi-> I would like to read up on that first
<andi-> Regardless of that outcome we might create a patch
<betawaffle> well, dhclient seems to be able to do it just fine
<betawaffle> anyway, i think i may know where the dups are coming from\
<andi-> being able to do something and implementing the standard everyone agreed on are two things ;)
<betawaffle> well at&t are breaking all sorts of standards. we live in the real world here
<betawaffle> though i can imagine lennart not liking the idea
<andi-> I mean that is why we should inspect the standard.
<andi-> If it says you can do that we have a much easier way
<andi-> if it doesn't we'll have to come up with an detailed explanation why it is still a good idea.
<andi-> (and we roughly have that already)
<andi-> betawaffle: we can pair on such a patch if you want. I usually do not just hack on random topics unless it solves any of my problems.
<betawaffle> i'll let you know when i next have time for that
<betawaffle> so, the other interesting thing is that the route without the proto has metric 1024, which is networkd's default. the kernel one has metric 256. is it possible the kernel impl of accept_ra got enabled somehow?
<betawaffle> networkd docs say that can't happen
<betawaffle> but i don't know how the kernel would know which subnet id i want...
<betawaffle> andi-: how well does the networkd dhcp server work?
<betawaffle> should i replace dhcpd?
<andi-> I did and I am happy
<andi-> It does not yet support static leases
<andi-> but there is an open PR
<betawaffle> ahh, well i'm not using static leases now, but i want to
<betawaffle> my only problem with dhcpd is i haven't figured out how to get systemd to start it late enough, it always crashloops about 4 times
<andi-> Then just use networkd for that for now
<andi-> at some point you can switch to: https://github.com/systemd/systemd/pull/15556
<{^_^}> systemd/systemd#15556 (by borna-blazevic, 31 weeks ago, open): Dhcpv4 static leases
<betawaffle> tbh, i'm thinking of maybe writing my own dhcp server eventually (or rather, something that combines a bunch of stuff, like dhcp, dns, http, https, etc). sort of a home network hub
<andi-> If you have no pressure / can get that implemented in time: go for it :)
<andi-> I am more than happy that I got rid of the legacy tech stack for network setup
<betawaffle> yeah
<andi-> it does mean that some machines do not have stable IPs right now but they rarely change (not once so far)
<betawaffle> i'm kind of a crazy person i think, i'm using nixos, networkd, and nftables on my router
<betawaffle> just slightly too bleeding edge
<andi-> how is that crazy? Everything is released software :)
<andi-> I did run the first version of SubnetId with severe bugs for months
<andi-> until the kernel did run out of space for more network addresses... turned out there was a limit :D
<andi-> Each interface with IIRC 256 addresses and at some point the kernel just wouldn't add/renew them anymore
<betawaffle> heh
<betawaffle> it's a bit crazy because i don't exactly have enough time to properly maintain this stuff
<andi-> That is why you are using NixOS
<andi-> it will not suddenly break and if it does anyhow you just roll back and go on with your life
<betawaffle> yeah, i had to use rollback yesterday
eyJhb has quit [Quit: Clever message]
eyJhb has joined #nixos-on-your-router
eyJhb has joined #nixos-on-your-router
eyJhb has quit [Changing host]
maljub01 has quit [Read error: Connection reset by peer]
maljub01 has joined #nixos-on-your-router
lopsided98 has quit [Ping timeout: 260 seconds]
lopsided98 has joined #nixos-on-your-router
eyJhb has quit [Quit: Clever message]
eyJhb has joined #nixos-on-your-router
<betawaffle> andi-: so, networkd has a DenyList option in IPv6AcceptRA, but the docs seem to indicate it only applies to prefixes given by router adverts
<betawaffle> why isn't there such an option for DHCPv6? (they have one for DHCPv4)
<andi-> Nobody implemented it?
<betawaffle> andi-: ok, so can you tell me what the vrf idea you had would look like with iproute2 commands?
<andi-> this isn't exactly that but I wrote a blog post about how to configure VRFs a few years ago
<betawaffle> what
<betawaffle> what's supposed to make the dhcp stuff go into the vrf?
<andi-> systemd networkd
<andi-> just set the VRF or TabelId
<betawaffle> and how will this interact with my vlan? should i use my "wan" vlan as the "physical" interface in your example?
<andi-> yeah
<andi-> tbh in your case I'd probably just write a hacky patch that disables IA-NA for now
<betawaffle> is there a way i can use the ip rule stuff to fix this without a vrf?
<andi-> probably
<andi-> try applying this to systemd: https://termbin.com/rs6d
<andi-> and setting systemd.package = …
<andi-> if everything works after that we can continue investigate a proper patch
<betawaffle> hmm, i haven't done patches with nix before, how do i apply that?
<andi-> { systemd.package = pkgs.systemd.overrideAttrs ({ patches ? [], ... }: { patches = patches ++ [ ./my-new-amazing.patch ]; }); }
<andi-> my-new-amazing.patch is what I pasted
<betawaffle> cool, thanks. i'll let you know if it works
<betawaffle> ok actually i'm definitely gonna need to set up my router to use my workstation for builds
<betawaffle> where are the docs for that?
<andi-> $ nixos-option nix.buildMachines
<andi-> $ nixos-option nix.distributedBuilds
<betawaffle> hmm, guess nixos-option coredumps for me :P
<betawaffle> i'll use the website
<andi-> betawaffle: did it work?
<betawaffle> still setting up the remote build thing, sec
<betawaffle> huh, it didn't use my other machine. do i need to set maxJobs to 0? or something else?
<andi-> yeah
<betawaffle> i think i know what i did wrong
<betawaffle> ok, so the 2001:* address is still there
<betawaffle> do you think i need to flush it out somehow?
<betawaffle> or would systemd have removed it
<betawaffle> Nov 28 15:02:32 router systemd-networkd[22339]: wan: DHCPv6 address 2001:506:7298:df9::1/128 timeout preferred 3600 valid 3600
<andi-> mhhm
<andi-> I guess we'll have to do better digging at the code then just tha tdirty hack :D
<betawaffle> hmmmm, this article may be helpful: http://biplane.com.au/blog/?p=30
<betawaffle> WOOOOOO
<betawaffle> andi-: figured out a workaround
<betawaffle> i added a static "home" address on my wan interface
<betawaffle> and home addresses are preferred over others
<andi-> is your prefix static?
<betawaffle> yeah, in practice. att doesn't actually have much ability to change your addresses (v4 or v6) because of how they structure their network
<andi-> *now* you say that? :P
<betawaffle> the prefix i get today is the same one i got like 2+ years ago when i was first trying this stuff
<andi-> Why bother with the whole dynamic dhcp stuff then?
<betawaffle> because, if you don't use dhcp, they cut off your route!
<betawaffle> the second you do a dhcp decline (or whatever it is to release), they pull your route
<betawaffle> which... is pretty smart, from a network perspective, i think
<betawaffle> but there's nothing you can really do to get a "new" prefix
<andi-> probably coupled to your CPE device (that you are faking) then?
<betawaffle> yeah, it's associated with the registered mac address of the router they give you
<betawaffle> but the prefix is a sub-prefix of a range they give to the fiber head-end, or whatever
<betawaffle> if you call them for support and ask for a new prefix, they can't do anything
<betawaffle> so yeah, it's dynamic in theory, but static in practice
<betawaffle> but they still make you do dhcp
<betawaffle> i'm getting so many "Failed to find catalog entry" errors in my journal
v0|d has joined #nixos-on-your-router
mvnetbiz_99 has quit [Quit: Bye!]