Nixos dhcp client, edge case config

Hi,
Problem: How do I get dhcp client to receive option classless-static-routes 24,10,0,0,192,168,0,1; from my dhcp server?

Background:

  • Workstation: Nixos on framework 13
  • User (me): Win/mac/linux user on and off for years, have test lab, am house admin, not a professional.
  • Project: Working through ‘Linux Networking Cookbook’ (outdated - chatbots handy here) to learn networking.
  • Setup: Inside my home production LAN, I have a 3 NIC box running Ubuntu, which I am practicing router building. One card to the ISP router, one to the NixOS laptop, and one to a FreeBSD box. NixOS is in a subnet, and FreeBSD is in another subnet.
  • What works: I am testing routing between subnets. Without DHCP server/client, static routes on FreeBSD and NixOS, and routing=1 (on) on the Ubuntu ‘router’, the subnets can ping each other. They can ping out to the internet.
  • Problem: Chapter2: config DHCP. I can’t keep static routes to other subnets configged on NixOS if I use DHCP client. I can get the DHCP server to attempt share this info by classless-static-routes option, but can’t get the DHCP client on NixOS to pick it up.
  • Question: What am I mis-understandng? iptables are fine since the router can ping both subnets, and the subnets can ping out.

Answer:

Don’t do this, Very difficult to configure, especially across ubuntu /nixos /freebsd. Someone’s dhclient doesn’t really engage with someone else’s dhcpd. nixos seemed to pick up the dhcp signal ok.

If you have 2 subnets and you want them both to use one DHCP server, that is ok. just make sure they use the same default gateway and route it al through… …the ‘router’.

if you really have 2 gateways, one for internet and one for something else… …well please post about how you made it work. And why one might do such a thing.