from Hacker News

Simple Networking in Linux

by gravitate on 8/7/23, 2:48 PM with 16 comments

  • by ramrunner0xff on 8/7/23, 8:40 PM

    I'm sorry but i fail to see how this is _simple_ networking. It shows the state of Linux these days. Compare that with OpenBSD's interface to do the same thing.

    wired: ifconfig [if] autoconf up

    wireless: ifconfig [if] join [ssid] wpakey [pass] autoconf up

    Consistent documentation existing in man ifconfig. The sad thing is that Linux used to be designed not evolved.

  • by blueflow on 8/7/23, 5:23 PM

    I wanna see this person debug their networking when it goes wrong. Stepping through udev and dbus must be fun.
  • by KaiserPro on 8/7/23, 9:12 PM

    I mean its one way of setting up your networking. But I'm not sure I would call it simple.

    I have been burned by systemd-resolved. It seems like a black box that does silent automagical stuff in a non transparent way. I am keen to hear what the advantages are though. (barring stats and DNSSEC.)

    _personally_ I am still a fan of /etc/network/interfaces and or whatever redhat style machines do.

    I have also used network manager, which is sorta ok, but when stuff starts failing it seems to suck donkeyballs. (it also crashes when you start doing auth)

  • by zamadatix on 8/7/23, 5:28 PM

    On the wired I'm a fan of doing the extra work to [Match] against MACAddress= then rename it to something friendly. Makes things clearer in logs and shows. It's worth noting you probably want to stick to [a-zA-z]{2,8} even though other things and longer/shorter names are allowed.
  • by astrobe_ on 8/7/23, 4:59 PM

    s/Linux/systemd (not how to avoid the Socket BSD API as I was hoping for)
  • by jmholla on 8/8/23, 4:58 AM

    > For modern domain name resolution, you can use systemd-resolved, which provides statistics, automated caching of DNS requests, DNSSEC validation and much more.

    I was gonna ask how to check this stuff out, but then I found it: `resolvectl`. I think it may have previously been the command `systemd-resolve`.

    `resolvectl statistics` will spit out those statistics and `resolvectl flush-caches` could help with some DNS issues by making resolved forget everything. There's plenty of other commands in there too.