:: Re: [DNG] Network configuration (wa…
Góra strony
Delete this message
Reply to this message
Autor: Steve Litt
Data:  
Dla: dng
Temat: Re: [DNG] Network configuration (was Re: Danger: Debian POSIX hostility)
On Fri, 18 Sep 2020 14:51:58 +0200
Didier Kryn <kryn@???> wrote:

> Le 18/09/2020 à 12:58, Olaf Meeuwissen a écrit :
> > You are aware of ifplugd (and libdaemon0 on which it depends)
> > originate, right?
>
>     Yep. But this one just works. There might be exceptions (~:


Just for completion, the following is my upnet.sh script, which sets my
wired ethernet port to a specific address with a specific route/gateway:

===========================================
#!/bin/bash
ip link set dev enp3s0 down
ip addr add 192.168.0.2/24 dev enp3s0
ip addr add 192.168.0.102/24 dev enp3s0
ip link set dev enp3s0 up
ip route add default via 192.168.0.1
===========================================

The preceding works on any Linux distro: No need to jump through each
distro's patented hoops. In the preceding, my NIC is called enp3s0, I'm
setting the computer's address to 192.168.0.2, with alias address
192.168.0.102 for use of my unbound DNS server, getting Internet
through a router at 192.168.0.1.

This script throws errors if used more than once, but still sets the
network correctly in spite of the errors. Any time my network gets
discombubolated, my first step is to rerun upnet.sh.

SteveT

Steve Litt
Autumn 2020 featured book: Thriving in Tough Times
http://www.troubleshooters.com/thrive