Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Share your gnu/Nix network ninja wizardry fellows.

Here you can discuss every aspect of Debian. Note: not for support requests!
Message
Author
Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Share your gnu/Nix network ninja wizardry fellows.

#1 Post by Deb-fan »

Here's the deal ... finally bit the bullet and installed the Buster netinstall iso (only base + standard system tools). Being a compulsive tweaker, resource miser ( errrr I like to think of it more as trying to become a competent efficiency expert. :D ) and like all of us, have my preferences in how I want things config'ed. Part of this all out customization/tweakage rampage was of course getting my wireless chipset working. Long preferred Ceni, it's simple, light ... works great but looks like it's on it's way out. Couldn't get it working with Debian 10. So by that point having been at the process for a longgggg time finally just took the easy way and installed wicd-gtk. Actually liking the thing so far.

After playing with it's counterparts, wicd-curses (buggy and annoying), wicd-cli (sparsely documented, thus also annoying.) May very well just end up with continued use of wicd-gtk though would like to hear anything people may have as an alternative suggestion too. Of course have perused others, networkd and plenty of other approaches but Ceni had me spoiled and hadn't the need to explore options too much.

So discussion of effective, easy ... light tools and techniques for gnu/Nix networking anyone would like to share ? I can't stand gnome network manager and while I do like wicd, every time I pop open a terminal and run ps_mem, see the memory overhead it uses, I get a tick in my face and my teeth begin to itch. :D Wicd-gtk really isn't bad in terms of depends, resource overhead but wouldn't mind hearing some alternatives. Ok gals/guys, thanks in advance ...
Most powerful FREE tech-support tool on the planet * HERE. *

reinob
Posts: 1195
Joined: 2014-06-30 11:42
Has thanked: 99 times
Been thanked: 47 times

Re: Share your gnu/Nix network ninja wizardry fellows.

#2 Post by reinob »

I find that systemd-networkd combined with wpa_supplicant works fine and doesn't get in your way.
It's (IMHO) the optimal solution if you need wireless, and if you always connect to the same (set of) access points.

If you roam around then it's not so convenient, but you still have wpagui which allows you to add new access points to your config. It's not shiny and GUI-ish, but it does the job.

As to:
* network-manager: I know it from the days of Ubuntu 12.04 and even connecting to the AP next to you was hit and miss, and despite the extremely verbose logging you couldn't know why it (sometimes) failed.

* wicd: I briefly used (after NM) and while it mostly worked, if you do look under the hood is a scripty and hacky mess, with python (which is already messy and hacky enough) plus various utilities it spawns and tries to parse the output of. At least it was like that some years ago.

Other than that, if you dislike systemd you can use wpa_supplicant/wpagui and some DHCP client of your liking, but then it's a bit more manual...

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: Share your gnu/Nix network ninja wizardry fellows.

#3 Post by Deb-fan »

Hey appreciate it and thanks for the mention of wpagui. Was just looking over a how to on using systemd-networkd for this purpose. Wpagui makes finding AP's while roaming relatively straightforward ? Although don't see roaming around too much with this old laptop. Am busy brushing up on the cli (commands and utils)related to this subject. Played with wicd-gtk a few times in the past ... just cause and so far liking it well enough but the resource miser in me is winning out and insisting there has got to be a better way. :D

Definitely leaning towards networkd, more I dork with systemd and all it can do, more impressed I've gotten with it. Might not like all aspects of it, 1 Redhat pid to rule them all but nothings perfect anyway, shrugs. Besides my precioussss (RAM) could be saved here ! :) Will just disable wicd and keep it around in case. Which btw, even this old dinosaur of a lappy has 4gbs of memory, really need to lighten up a bit I guess. Arghhhh!!!
Most powerful FREE tech-support tool on the planet * HERE. *

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: Share your gnu/Nix network ninja wizardry fellows.

#4 Post by Deb-fan »

Well so far, no joy and one failed attempt. :)

As a sideline, time to gripe, am always telling noobz (well pretty much everyone to RTFM and docs), some of the authors of these docs need to friggin remember that this stuff relates to a technical subject, thus concise instructions with some clear examples is necessary, typo's matter, leaving things under-clarified matters !!!! DIE people who put up hazy tutes, how-to's and docs, simply DIEEEEE !!! :D

Didn't take much to fix it and put it back to where I was but frustrating !!! Also couldn't help but be struck by the irony (read: hypocrisy) I'm always generally harping on people to take precautions and backup, prior to embarking on unfamiliar gnu/nix fiddling and of course I didn't bother and honestly know I'm not going to before try #2 either, so if ya's don't hear from me again, ya know what happened. 8)

Currently gathering more info on the topic of systemd-networkd etc etc. Preparing to try, try again. Wicd-gtk ... although you're actually fairly good, YOUR DAYS ARE NUMBERED !!!!
PS, afterthought ... also where is Head_on ?!??! Seventy-five thousand posts, he's probably got 14 good tutes on this up somewhere already !!!! :)
Most powerful FREE tech-support tool on the planet * HERE. *

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Share your gnu/Nix network ninja wizardry fellows.

#5 Post by Head_on_a_Stick »

Deb-fan wrote:some of the authors of these docs need to friggin remember that this stuff relates to a technical subject, thus concise instructions with some clear examples is necessary
How about the EXAMPLES section in systemd.network(5)?

https://manpages.debian.org/buster/syst ... l#EXAMPLES

And if in doubt always check the ArchWiki: https://wiki.archlinux.org/index.php/Systemd-networkd

I'm using it myself and I particularly like the hardening parameters in the unit file and the command line interface:

Code: Select all

empty@E485:~ $ networkctl --no-pager
IDX LINK             TYPE               OPERATIONAL SETUP
  1 lo               loopback           carrier     unmanaged
  2 enp2s0           ether              off         unmanaged
  3 iwl0             wlan               routable    configured

3 links listed.
empty@E485:~ $ networkctl --no-pager status
●        State: routable
       Address: 192.168.1.50 on iwl0
                fe80::342e:a6ff:fe9e:c9c5 on iwl0
       Gateway: 192.168.1.254 (Technicolor) on iwl0
           DNS: 9.9.9.9
empty@E485:~ $
It does have some overhead though, even with static addresses, so ifupdown might be your best option:

https://wiki.debian.org/WiFi/HowToUse#W ... d_WPA2-PSK
Deb-fan wrote:where is Head_on ?!??!
If you look in the mirror and say my name five times I will appear :mrgreen:
deadbang

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: Share your gnu/Nix network ninja wizardry fellows.

#6 Post by Deb-fan »

Thanks Hoas, you know I've already downloaded the Archwiki on a bunch of the pertinent junk involved and some threads from their forum too. Expecting to not have it go smoothly and want my reference materials onhand so I don't have to switch to another OS/install. Blahblahblah. Appreciate the help though, can be confident in anything you put up fellow nixer. :)
Most powerful FREE tech-support tool on the planet * HERE. *

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: Share your gnu/Nix network ninja wizardry fellows.

#7 Post by Deb-fan »

Have messed with such before, editing /etc/network/interfaces and fiddling with resolv.conf. Worked but interface was slow to come up and sometimes paused with a stop job at reboot/shutdown. Was only poking and playing around with it for the sake of it. This time however it's the real deal and needs to work well. Went ahead and applied chattr +i and killed off the resolvconf.service again, after manually edited resolv.conf to include google public dns.

Getting better speeds than those provided by the ISP. Am riding a neighbors wifi(yes with permission. :D ) so atm stuck on a crappy lossy wireless network. Which makes this networking project just that much more fun. Only have 2 more things to sort and this baby is road worthy.

1. This networkd ordeal to replace my dearest Ceni. :(
2. I don't want to use rc.local anymore, so have to either setup a systemd unit file or an @reboot crontab to echo some tweaks to the files to fiddle with the ondemand governor. Now if I could just stop dorking around in gnu/Nix forums !!! At this rate I'll be putting the finishing touches on this Buster install about the time Debian announces the next stable release is out. :D
PS, and overhead-wise, not much worried this old thing has enough muscle. Besides wicd-gtk and it's applet are somewhere in the 50mbs-ram neighborhood, generally like to keep my OS's down in the sub-100mb at idle club. FIFTY MEGA-BYTES !?!!?? Just for networking ?! :(
Most powerful FREE tech-support tool on the planet * HERE. *

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: Share your gnu/Nix network ninja wizardry fellows.

#8 Post by Deb-fan »

Second try, success ... Although I did go and rsync a backup of the install just in case. Spent too much time to risk borking it, to save 20mins in taking a backup. Ok so networkd is running the show, wireless is working fine, purged wicd-gtk after downloading it and it's depends to a directory in case I ever feel like reinstalling the thing. Am much closer to my preferences, not quite but close enough to call it good. Have to figure out how to set chosen dns servers up for systemd-resolved but shouldn't take much effort.

Last thing on the 2do list is implementing an"approved" alternative to rc.local (rc-local.service) stuff. Already saved some quality docs on the subject so should be able to wrap things up and take a dork break from fiddling with this new install. Oops #3 also have to format a much liked Stretch OS on sda2 and then rsync this OS to the front of drive to replace it as daily driver. Then am done for awhile. YAY !!!! :)
Most powerful FREE tech-support tool on the planet * HERE. *

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: Share your gnu/Nix network ninja wizardry fellows.

#9 Post by Deb-fan »

SEE Head_on's POST BELOW, DO NOT USE THIS !!!

Cuz sharing is caring, here's the how-to I used. Though let me clarify a few things about it. Good idea to go ahead and make a backup just in case. Keep a copy of any system files you alter, copy/paste-etc the suckers somewhere and give them a name like the-files-name.bak.

Also you'll want to put the name of your wireless interface where he keeps putting his (wlan0) ie: Mine is named wlp12s0 of course use yours (whatever is returned by "sudo iwconfig") Finally and this got me, is a prime example of what I meant by people needing to keep things clear. This part ... The file.
Create a unit for wpa_supplicant. Filename: /lib/systemd/system/wpa_supplicant@.service


[Unit]
Description=WPA Unit
Before=network.target
Wants=network.target
Requires=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device dbus.service

[Service]
Type=simple
ExecStart=/sbin/wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant-%i.conf -i %i

[Install]
Alias=multi-user.target.wants/wpa_supplicant@%i.service
That's literally what I put in the file, WRONG, so I got a nice 90sec start job. Until I figured out where I went wrong. You put the name of your wireless interface in every place it says %i in that file. Again mine is wlp12s0, so the above line looks like this, not with the %i nonsense.

Code: Select all

Alias=multi-user.target.wants/wpa_supplicant@wlp12s0.service
He'd been using wlan0 as an example throughout the thing, why the hades he decided to get lazy and put %i instead dunno but that's how people get borked up following an unclear tute. Other than this works like a charm and credit to the guy for sharing. :)
Last edited by Deb-fan on 2019-10-31 06:15, edited 1 time in total.
Most powerful FREE tech-support tool on the planet * HERE. *

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Share your gnu/Nix network ninja wizardry fellows.

#10 Post by Head_on_a_Stick »

Deb-fan wrote:here's the how-to I used
That guide is outdated and advises storing the file in /lib/systemd/system, which is reserved for unit files supplied by packages — /etc/systemd/system is the correct location for local unit files.

A wpa_supplicant@.service unit file is already supplied by the wpa_supplicant package in Debian buster so you don't need that hacky version you have posted.
Deb-fan wrote:That's literally what I put in the file, WRONG, so I got a nice 90sec start job. Until I figured out where I went wrong. You put the name of your wireless interface in every place it says %i in that file. Again mine is wlp12s0, so the above line looks like this, not with the %i nonsense.
^ This is all wrong.

The %i & %I statements indicate that the unit file is an instance and the statements will be replaced by whatever is given after the @ sign when enabling the .service.

So for my system I would use:

Code: Select all

# systemctl enable wpa_supplicant@iwl0.service
And then every instance of %i (or %I) would be replaced with iwl0 (which is the name of my wireless interface):

Code: Select all

empty@E485:~ $ ls -l /etc/systemd/system/multi-user.target.wants/wpa*                    
lrwxrwxrwx 1 root root 43 Oct  7 10:12 /etc/systemd/system/multi-user.target.wants/wpa_supplicant@iwl0.service -> /lib/systemd/system/wpa_supplicant@.service
empty@E485:~ $
For more on this see https://fedoramagazine.org/systemd-template-unit-files/
deadbang

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: Share your gnu/Nix network ninja wizardry fellows.

#11 Post by Deb-fan »

^ Knew about the wpa_supp thing being supplied(thus the stupe part about copy n .bak any files edited thing), though the rest of it nopers, thanks Hoas for the info. However it's friggin odd, as wifi is working great here ?!?!?! Will still have to review the info you provided, as working fine or not, guess it's better to address any issues here and now, rather than wait. Though think I'm going to watch a dang movie or summin. Am truly burnt out on fiddling with this thing !

Ahhhh the sweet smell of success and then it's yanked away !!! So close to getting this thing where I overall want it. No worries have the backup stashed, so can poke and prod the OS, until it's how I want it. Thanks again ... Hoasinator ! :)

Ah crap ... no movie for me, won't be able to relax until things are set right. DAMMIT ! So to update the score-board, attempt #2, also failed ,,, networkd = 2, Deb-fan = 0 and da crowd goes wild. :D
Most powerful FREE tech-support tool on the planet * HERE. *

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Share your gnu/Nix network ninja wizardry fellows.

#12 Post by Head_on_a_Stick »

Deb-fan wrote:However it's friggin odd, as wifi is working great here ?!?!?!
Replacing %i & %I with the actual interface name won't break the unit file, it just reduces the flexibility.

And don't bother with systemd-resolved, it's slow and does weird things with the nameserver list.
deadbang

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: Share your gnu/Nix network ninja wizardry fellows.

#13 Post by Deb-fan »

Thanks and definitely thanks for the heads up on resolved. Yeah figured the reason it works is like you said since %i etc is just replaced by the interface name, doing so directly works anyway. Still need to follow what you've advised on best practice. Also yep, when someone see's interfaces named wlan0 or eth0 probably dealing with somewhat dated info. Haven't seen that in anything gnu/Nix in a long time.

Not to say that some very dated info doesn't still have value though. Found junk from the darkages of gnu/Nix that's still totally valid today. At least the concept. Atm have actually fallen back to wicd-gtk, until such time as I work up the energy to set things up correctly. Glad Debian continues forward and making progress but glad this only happens every couple/few years too. It's a real pita getting everything working and config'ed !!! :)
Most powerful FREE tech-support tool on the planet * HERE. *

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: Share your gnu/Nix network ninja wizardry fellows.

#14 Post by Deb-fan »

Actually kind of nice after all this time having a gui'ey type network applet, it'll eventually get on my nerves to the point of having to find something else and set it up (correctly hopefully next time.) Thing was down to around 120mb-ram @ bootup idle with wicd-gtk gone. It's still great for a full featured OS in 2019-almost 2020, this puppy would run well enough on a system with 1gb-memory and blaze along happily on one with 2gb or more. Ala in the tradition of the finest of #! (Crunchbang gnu/Linux, minimal Debian kickbuttness) style. :)
Present memory stats, even with the resource hogging network applet thingy = 145-150mbs/ram @boot idle. Again for a 64bit OS (late 2019), not too dang shabby imo. Patz* self on back. :P Made possible by the magic that is Debian, errrr and a tad bit of mad nix skillz of someone who shall remain nameless. :D
Most powerful FREE tech-support tool on the planet * HERE. *

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: Share your gnu/Nix network ninja wizardry fellows.

#15 Post by Deb-fan »

Just a cool network infobit I found dorking. Have been exploring the command-line and cli tools for networking in gnu/Linux and came across the dig command ie: "dig http://www.google.com", cool thing is it shows you the IP of which dns server your system used. In my case 8.8.8.8 for google's public dns's ipv4. Dig is part of the dnsutils package in Debian 9, not even sure when I installed in on Buster but it's there too. :) As yet haven't worked up the energy to complete this minimal networking approach project. Actually liking the resource sucking pig-dog of a set up with wicd-gtk. Thing works fairly well and 40 or so megabytes of added RAM isn't going to break me. Arghhhh.

Still dorking around and stashing info on the alternatives and whatever cool cli tools/utils and commands related to it in gnu/Linux there are. :) Also set the Veno congestion control algo to being the one used vs Cubic ( the normal one used in majority of gnu/Nix.) It's supposed to be designed for lossy wireless networks specifically. In my case a neighbors wifi, so giving it a try. Set it with a line in /etc/sysctl.conf. Can't really tell, when his/her network isn't congested, system blazes along fine. Anyone here ever played with this topic ? Something they'd like to share ?
Most powerful FREE tech-support tool on the planet * HERE. *

reinob
Posts: 1195
Joined: 2014-06-30 11:42
Has thanked: 99 times
Been thanked: 47 times

Re: Share your gnu/Nix network ninja wizardry fellows.

#16 Post by reinob »

Deb-fan wrote:Just a cool network infobit I found dorking. Have been exploring the command-line and cli tools for networking in gnu/Linux and came across the dig command ie: "dig http://www.google.com", cool thing is it shows you the IP of which dns server your system used.
Note that dig resolves DNS names, i.e. "dig www.google.com", and not URLs like "https://www.google.com".
You can also test "drill", which is simpler and focussed on DNSSEC.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Share your gnu/Nix network ninja wizardry fellows.

#17 Post by Head_on_a_Stick »

Code: Select all

networkctl status
^ That should show the configured nameservers under systemd-networkd.

And systemd-resolved can be used without it interferring with /etc/resolv.conf:

Code: Select all

empty@E485:~ $ sudo systemctl start systemd-resolved
empty@E485:~ $ resolvectl | grep 'DNS Servers'                                           
         DNS Servers: 9.9.9.9
         DNS Servers: 9.9.9.9
empty@E485:~ $
deadbang

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: Share your gnu/Nix network ninja wizardry fellows.

#18 Post by Deb-fan »

^^Thanks and thanks Head_on too. :)

Still being lazy about getting this minimal networking solution figured out for the time being. Mainly cuz I'm well, errr ... lazy and spending a bunch of time trolling various gnu/Linux forums for the heel of it. :D

@Hoas, you mentioned resolved is buggy and quirky, that it's not required for someone to still use networkd. What would you recommend as an alternative ? Directly editing resolv.conf ? This resolvconf.service systemd thingy ? Still not really up on or overly good with all this systemd type stuff. Trying but going to take awhile to grok all this junk !!!

It's a crap shoot ! Ie: I have both wicd-gtk AND systemd-networkd.service(s) running on Buster, thought someone was supposed to disable them or they'd conflict etc blahblah. Funny thing is, that Buster install blazes (ping -c 3 http://www.google on it, gives 5ms. Whereas on a very similar 32b/Stretch, it comes back as like 2003ms !?!?) However apparent speed is fairly well close on both. Depending upon network conditions. So I've disabled this, enabled that, poked at this or that file and oopsy, something stopped working until putting it back the way it was !!! Arghhhhhh !!!!!!!!

Aka: I'm in over my head, atm still just using the wicd-gtk thingy. Am hitting one of my many, tired of screwing with gnu/Linux and poking and prodding things burn-out phases.
Most powerful FREE tech-support tool on the planet * HERE. *

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: Share your gnu/Nix network ninja wizardry fellows.

#19 Post by Deb-fan »

All these oddball upstream changes are really starting to grate on my nerves. Systemd, Wayland, this god forsaken polkit (policy file) pkexec and admin:/// junk. Have accepted systemd, even like the thing somewhat. Also don't want to even bother with finding hacks and work-arounds to evade the thing, Wayland = go crap in your hat. Will continue using Xorg for a longgggg time to come and polkit-etc blahblahblah. I WILL DESTROY YOU if ye continue aggravating me. The IBM/Redhat folks can kiss my <censored.>
Was just having a convo about running EOL/end of life releases over @ LM forums with various folks. Mentioned some of the how's and why's someone might do so. Tell the truth, things keep going as they are, screw it. Will just keep using EOL Debian releases and be more than happy for 10yrs or more just as things are.
Most powerful FREE tech-support tool on the planet * HERE. *

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: Share your gnu/Nix network ninja wizardry fellows.

#20 Post by Head_on_a_Stick »

^ https://xkcd.com/2224/
Deb-fan wrote:@Hoas, you mentioned resolved is buggy and quirky, that it's not required for someone to still use networkd. What would you recommend as an alternative ? Directly editing resolv.conf ?
Yes, I maintain a static resolv.conf file. At the moment it has Quad9's nameservers listed 'cos I like IBM.
deadbang

Post Reply