Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #202713 > unrolled thread
| Started by | Luciano Andress Martini <analistaunix@gmail.com> |
|---|---|
| First post | 2018-11-23 13:40 +0100 |
| Last post | 2018-11-23 16:10 +0100 |
| Articles | 20 — 8 participants |
Back to article view | Back to linux.debian.user
Still unable to restart networking on Debian 9 text mode only Luciano Andress Martini <analistaunix@gmail.com> - 2018-11-23 13:40 +0100
Re: Still unable to restart networking on Debian 9 text mode only Reco <recoverym4n@enotuniq.net> - 2018-11-23 13:50 +0100
Re: Still unable to restart networking on Debian 9 text mode only Reco <recoverym4n@enotuniq.net> - 2018-11-23 14:50 +0100
Re: Still unable to restart networking on Debian 9 text mode only Luciano Andress Martini <analistaunix@gmail.com> - 2018-11-23 14:10 +0100
Re: Still unable to restart networking on Debian 9 text mode only Luciano Andress Martini <analistaunix@gmail.com> - 2018-11-23 14:20 +0100
Re: Still unable to restart networking on Debian 9 text mode only Luciano Andress Martini <analistaunix@gmail.com> - 2018-11-23 14:30 +0100
Re: Still unable to restart networking on Debian 9 text mode only Gary Dale <garyndp@gmail.com> - 2018-11-24 18:30 +0100
Worked example, was Re: Still unable to restart networking on Debian 9 text mode only David Wright <deblis@lionunicorn.co.uk> - 2018-11-25 03:10 +0100
Re: Worked example, was Re: Still unable to restart networking on Debian 9 text mode only Gary Dale <garyndp@gmail.com> - 2018-11-25 03:40 +0100
Re: Worked example, was Re: Still unable to restart networking on Debian 9 text mode only David Wright <deblis@lionunicorn.co.uk> - 2018-11-25 16:20 +0100
Re: Worked example, was Re: Still unable to restart networking on Debian 9 text mode only Gary Dale <garyndp@gmail.com> - 2018-11-27 00:20 +0100
Re: Worked example, was Re: Still unable to restart networking on Debian 9 text mode only David Wright <deblis@lionunicorn.co.uk> - 2018-11-27 22:00 +0100
Re: Worked example, was Re: Still unable to restart networking on Debian 9 text mode only john doe <johndoe65534@mail.com> - 2018-11-25 07:40 +0100
Re: Worked example, was Re: Still unable to restart networking on Debian 9 text mode only David Wright <deblis@lionunicorn.co.uk> - 2018-11-25 17:00 +0100
Re: Still unable to restart networking on Debian 9 text mode only Rob van der Putten <rob@sput.nl> - 2018-11-25 17:30 +0100
Re: Still unable to restart networking on Debian 9 text mode only Luciano Andress Martini <analistaunix@gmail.com> - 2018-11-26 14:00 +0100
Re: Still unable to restart networking on Debian 9 text mode only Gary Dale <garyndp@gmail.com> - 2018-11-27 00:40 +0100
Re: Still unable to restart networking on Debian 9 text mode only David Wright <deblis@lionunicorn.co.uk> - 2018-11-27 22:10 +0100
Re: Still unable to restart networking on Debian 9 text mode only Greg Wooledge <wooledg@eeg.ccf.org> - 2018-11-23 14:10 +0100
Re: Still unable to restart networking on Debian 9 text mode only "Alexander V. Makartsev" <avbetev@gmail.com> - 2018-11-23 16:10 +0100
| From | Luciano Andress Martini <analistaunix@gmail.com> |
|---|---|
| Date | 2018-11-23 13:40 +0100 |
| Subject | Still unable to restart networking on Debian 9 text mode only |
| Message-ID | <wXiUz-Nd-47@gated-at.bofh.it> |
Good morning, IMPORTANT: Network Manager was not being installed automatically by the Debian DVD when I do not mark the graphical interface. I tried a fresh Debian install without graphical interface but using the graphical installator I am running Debian 9.6. Then I edited /etc/network/interfaces and restart the system, to see if the ip was changed. And yes, it worked. So this file is still being used in some way - humm that seems to be the correct place to configure my interface isn't? Well, I edited it again, now to try change the ip but without restarting the system - like in all servers real situation, you don't want to go after the server. First of all I tried all this solutions: #systemctl daemon-reload (nothing happens ip didnt change) #systemctl networking restart (the ip did not change and the connection breaks you need to go phisicial and ip address shows the same ip configured) #nmcli connection reload nmcli connection reload The program 'nmcli' is currently not installed. You can install it by typing: apt install network-manager nmcli: command not found. (my comment: well it seems NetworkManager was not installed is that right?) # nmtui The program 'nmtui' is currently not installed. You can install it by typing: apt install network-manager nmtui: command not found The solution that i found is this (but i think that is not a real solution): ip address delete theoldip/mask dev enp0s3 ifdown enp0s3 ifup enp0s3 But if for example i do it partially, it does not work... for example: ip address delete theoldip/mask dev enp0s3 ifup enp0s3 The interface is already... blabla ifdown enp0s3 ifup enp0s3 (a new ip is added to the interface, but now two ips are configured and the network is broken again) Is that a bug? -- Luciano Andress Martini - Analista UNIX
[toc] | [next] | [standalone]
| From | Reco <recoverym4n@enotuniq.net> |
|---|---|
| Date | 2018-11-23 13:50 +0100 |
| Message-ID | <wXj4d-R5-19@gated-at.bofh.it> |
| In reply to | #202713 |
Hi. On Fri, Nov 23, 2018 at 10:31:28AM -0200, Luciano Andress Martini wrote: > Good morning, > > IMPORTANT: Network Manager was not being installed automatically by > the Debian DVD when I do not mark the graphical interface. An excellent news. Let's hope that Debian continues to behave this way. > Then I edited /etc/network/interfaces and restart the system, to see > if the ip was changed. And yes, it worked. So this file is still being > used in some way - humm that seems to be the correct place to > configure my interface isn't? So, in plain English, you have ifupdown installed. > Well, I edited it again, now to try change the ip but without > restarting the system - like in all servers real situation, you don't > want to go after the server. First of all I tried all this solutions: > > #systemctl daemon-reload > (nothing happens ip didnt change) And it should not. ifupdown provides networking service, and "daemon-reload" forces systemd to re-read own config only, not to restart services. > #systemctl networking restart > (the ip did not change and the connection breaks you need to go > phisicial and ip address shows the same ip configured) "networking restart" invokes "ifdown" first, and "ifup" next. And systemd restarts most of the network services by dependency. The problem is - once they invoke ifdown, there's no network connection to invoke "ifup", hence you have no network-listening services. Do it from BMC/ILOM/HMC (it's not a server if it does not have one), or install screen/tmux and do it from there. > #nmcli connection reload > # nmtui Please leave these Finely Designed Executables™ to a desktop installation. > The solution that i found is this (but i think that is not a real solution): > > ip address delete theoldip/mask dev enp0s3 > ifdown enp0s3 > ifup enp0s3 ifdown/ifup combo should be sufficient. Just don't do it via plain ssh connection. > But if for example i do it partially, it does not work... for example: > > ip address delete theoldip/mask dev enp0s3 > ifup enp0s3 > The interface is already... blabla ifup/ifdown have their own special way to track which interface was touched by them. ifup will rightfully refuse to bring network interface UP if it considers that it's UP already. > > ifdown enp0s3 > ifup enp0s3 > (a new ip is added to the interface, but now two ips are configured > and the network is broken again) You mean, two new IPv6 ips? Can you provide a 'correct' and a 'broken' example via 'ip a l' please? And, while we're at it, the contents of /etc/network/interfaces? > Is that a bug? Short of the last part everything else can be classified as an operator's error, or a lack of knowledge. Reco
[toc] | [prev] | [next] | [standalone]
| From | Reco <recoverym4n@enotuniq.net> |
|---|---|
| Date | 2018-11-23 14:50 +0100 |
| Message-ID | <wXk0i-1s1-11@gated-at.bofh.it> |
| In reply to | #202715 |
Here we try to post our e-mails to the list, so the whole community would benefit from the answers. Sending a email directly to the list subscriber is fine if you want to discuss something in private, which is clearly not the case here. And please do not top post. Now, to the problem at hand. On Fri, Nov 23, 2018 at 11:05:51AM -0200, Luciano Andress Martini wrote: > You say that ifdown and ifup is just enough, Yup. > So lets try it: > #editor /etc/network/interfaces > Changed the ip. > #ifdown enp0s3 > RTNETLINK answers: Cannot assign requested address And that's where you're doing it wrong. ifdown tries to remove the IP listed at /etc/network/interfaces first, and to bring the interface down next. Basically you've just asked ifdown to remove a non-configured address, but do nothing for the configured one. > #ifup enp0s3 A correct sequence to do this is: ifdown <foo> edit /etc/network/interfaces ifup <foo> > Alternatively, > #service networking restart > Does not make the ip to change and brokes the network. Please do not do this unless you have BMC/ILOM/ASMI/direct console access to the server. Reco
[toc] | [prev] | [next] | [standalone]
| From | Luciano Andress Martini <analistaunix@gmail.com> |
|---|---|
| Date | 2018-11-23 14:10 +0100 |
| Message-ID | <wXjnA-1dU-25@gated-at.bofh.it> |
| In reply to | #202713 |
Thank you Greg i would not like to use NetworkManager, i just tried it because all the other ways that i tried did not worked in new Debian Versions, after a fresh install so i am searching for a correct way of doing things.. (i read documentation, but maybe i am missing something) ifdown and ifup work partially instead of changing the ip, and it is adding a new ip to the interface. service networking restart - just brokes the network connection. Em sex, 23 de nov de 2018 às 11:02, Greg Wooledge <wooledg@eeg.ccf.org> escreveu: > > On Fri, Nov 23, 2018 at 10:31:28AM -0200, Luciano Andress Martini wrote: > > Then I edited /etc/network/interfaces and restart the system, to see > > if the ip was changed. And yes, it worked. So this file is still being > > used in some way - humm that seems to be the correct place to > > configure my interface isn't? > > /etc/network/interfaces is the primary, supported means of configuring > network interfaces in Debian. It's the best choice for standard server > and workstation setups. > > Network-Manager may also be installed (it's optional). As you've already > seen, it is installed when choosing a "desktop environment" during the > Debian installation, and skipped if no DE is chosen. N-M is apparently > the tool of choice for configuring wireless interfaces on laptops. > > Interfaces that are configured in /e/n/i are skipped by N-M. Thus, > you could think of it as "/e/n/i has priority, and N-M gets whatever > /e/n/i didn't get". > > Then there's some bizarre systemd network interface thing. It's not > used by default in Debian. I can't imagine anyone ever using it. > You can simply ignore it. > -- Luciano Andress Martini - Analista UNIX
[toc] | [prev] | [next] | [standalone]
| From | Luciano Andress Martini <analistaunix@gmail.com> |
|---|---|
| Date | 2018-11-23 14:20 +0100 |
| Message-ID | <wXjxg-1hf-13@gated-at.bofh.it> |
| In reply to | #202718 |
If i am phisically logged the behavior are like to be the same. Em sex, 23 de nov de 2018 às 11:09, Luciano Andress Martini <analistaunix@gmail.com> escreveu: > > Thank you Greg i would not like to use NetworkManager, i just tried it > because all the other ways that i tried did not worked in new Debian > Versions, after a fresh install so i am searching for a correct way of > doing things.. (i read documentation, but maybe i am missing > something) > > ifdown and ifup work partially instead of changing the ip, and it is > adding a new ip to the interface. > > service networking restart - just brokes the network connection. > Em sex, 23 de nov de 2018 às 11:02, Greg Wooledge > <wooledg@eeg.ccf.org> escreveu: > > > > On Fri, Nov 23, 2018 at 10:31:28AM -0200, Luciano Andress Martini wrote: > > > Then I edited /etc/network/interfaces and restart the system, to see > > > if the ip was changed. And yes, it worked. So this file is still being > > > used in some way - humm that seems to be the correct place to > > > configure my interface isn't? > > > > /etc/network/interfaces is the primary, supported means of configuring > > network interfaces in Debian. It's the best choice for standard server > > and workstation setups. > > > > Network-Manager may also be installed (it's optional). As you've already > > seen, it is installed when choosing a "desktop environment" during the > > Debian installation, and skipped if no DE is chosen. N-M is apparently > > the tool of choice for configuring wireless interfaces on laptops. > > > > Interfaces that are configured in /e/n/i are skipped by N-M. Thus, > > you could think of it as "/e/n/i has priority, and N-M gets whatever > > /e/n/i didn't get". > > > > Then there's some bizarre systemd network interface thing. It's not > > used by default in Debian. I can't imagine anyone ever using it. > > You can simply ignore it. > > > > > -- > Luciano Andress Martini - Analista UNIX -- Luciano Andress Martini - Analista UNIX
[toc] | [prev] | [next] | [standalone]
| From | Luciano Andress Martini <analistaunix@gmail.com> |
|---|---|
| Date | 2018-11-23 14:30 +0100 |
| Message-ID | <wXjGW-1kM-5@gated-at.bofh.it> |
| In reply to | #202720 |
Additional information - Again Debian 9.6 Fresh Install without
graphical interface:
cat /etc/network/interfaces:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug enp0s3
iface enp0s3 inet static
address 10.5.0.2/24
gateway 10.5.0.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 8.8.8.8
dns-search neoconsig.local
Just changed 10.5.0.2 to 10.5.0.3
#ifdown enp0s3
#ifup enp0s3
Results in two ips configured instead of changing it:
#ip a
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP group default qlen 1000
link/ether 08:00:27:7a:16:16 brd ff:ff:ff:ff:ff:ff
inet 10.5.0.2/24 brd 10.5.0.255 scope global enp0s3
valid_lft forever preferred_lft forever
inet 10.5.0.3/24 brd 10.5.0.255 scope global secondary enp0s3
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:fe7a:1616/64 scope link
valid_lft forever preferred_lft forever
Now lets restart the system and try it again but now using systemctl
restart networking:
After the full reboot the ip changed to 10.5.0.3, respecting
/etc/network/interfaces.
So, Lets try to change it again from 10.5.0.3 to 10.5.0.2
#systemctl restart networking
(connection just disconnected instead of changing the ip)
#ping 8.8.8.8
(eternally waiting...)
#ip address
Still shows the correct information (the ip did not change)
Em sex, 23 de nov de 2018 às 11:10, Luciano Andress Martini
<analistaunix@gmail.com> escreveu:
>
> If i am phisically logged the behavior are like to be the same.
> Em sex, 23 de nov de 2018 às 11:09, Luciano Andress Martini
> <analistaunix@gmail.com> escreveu:
> >
> > Thank you Greg i would not like to use NetworkManager, i just tried it
> > because all the other ways that i tried did not worked in new Debian
> > Versions, after a fresh install so i am searching for a correct way of
> > doing things.. (i read documentation, but maybe i am missing
> > something)
> >
> > ifdown and ifup work partially instead of changing the ip, and it is
> > adding a new ip to the interface.
> >
> > service networking restart - just brokes the network connection.
> > Em sex, 23 de nov de 2018 às 11:02, Greg Wooledge
> > <wooledg@eeg.ccf.org> escreveu:
> > >
> > > On Fri, Nov 23, 2018 at 10:31:28AM -0200, Luciano Andress Martini wrote:
> > > > Then I edited /etc/network/interfaces and restart the system, to see
> > > > if the ip was changed. And yes, it worked. So this file is still being
> > > > used in some way - humm that seems to be the correct place to
> > > > configure my interface isn't?
> > >
> > > /etc/network/interfaces is the primary, supported means of configuring
> > > network interfaces in Debian. It's the best choice for standard server
> > > and workstation setups.
> > >
> > > Network-Manager may also be installed (it's optional). As you've already
> > > seen, it is installed when choosing a "desktop environment" during the
> > > Debian installation, and skipped if no DE is chosen. N-M is apparently
> > > the tool of choice for configuring wireless interfaces on laptops.
> > >
> > > Interfaces that are configured in /e/n/i are skipped by N-M. Thus,
> > > you could think of it as "/e/n/i has priority, and N-M gets whatever
> > > /e/n/i didn't get".
> > >
> > > Then there's some bizarre systemd network interface thing. It's not
> > > used by default in Debian. I can't imagine anyone ever using it.
> > > You can simply ignore it.
> > >
> >
> >
> > --
> > Luciano Andress Martini - Analista UNIX
>
>
>
> --
> Luciano Andress Martini - Analista UNIX
--
Luciano Andress Martini - Analista UNIX
[toc] | [prev] | [next] | [standalone]
| From | Gary Dale <garyndp@gmail.com> |
|---|---|
| Date | 2018-11-24 18:30 +0100 |
| Message-ID | <wXJUK-164-9@gated-at.bofh.it> |
| In reply to | #202721 |
On 2018-11-23 8:25 a.m., Luciano Andress Martini wrote: > Additional information - Again Debian 9.6 Fresh Install without > graphical interface: > > cat /etc/network/interfaces: > > # This file describes the network interfaces available on your system > # and how to activate them. For more information, see interfaces(5). > > source /etc/network/interfaces.d/* > > # The loopback network interface > auto lo > iface lo inet loopback > > # The primary network interface > allow-hotplug enp0s3 > iface enp0s3 inet static > address 10.5.0.2/24 > gateway 10.5.0.1 > # dns-* options are implemented by the resolvconf package, if installed > dns-nameservers 8.8.8.8 > dns-search neoconsig.local > > Just changed 10.5.0.2 to 10.5.0.3 > > #ifdown enp0s3 > #ifup enp0s3 Reco has already explained why this approach is incorrect. My own two cents on the problem is that Interfaces is meant to define how the network is brought up, not to change a running network. If you want to change a running network, use ifconfig or ip to change the address. e.g. ifconfig enp-s3 10.5.0.3 should work since all you are changing is the ip address.
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2018-11-25 03:10 +0100 |
| Subject | Worked example, was Re: Still unable to restart networking on Debian 9 text mode only |
| Message-ID | <wXS1X-6e3-1@gated-at.bofh.it> |
| In reply to | #202753 |
On Sat 24 Nov 2018 at 12:25:20 (-0500), Gary Dale wrote: > On 2018-11-23 8:25 a.m., Luciano Andress Martini wrote: > > Additional information - Again Debian 9.6 Fresh Install without > > graphical interface: > > > > cat /etc/network/interfaces: > > > > # This file describes the network interfaces available on your system > > # and how to activate them. For more information, see interfaces(5). > > > > source /etc/network/interfaces.d/* > > > > # The loopback network interface > > auto lo > > iface lo inet loopback > > > > # The primary network interface > > allow-hotplug enp0s3 > > iface enp0s3 inet static > > address 10.5.0.2/24 > > gateway 10.5.0.1 > > # dns-* options are implemented by the resolvconf package, if installed > > dns-nameservers 8.8.8.8 > > dns-search neoconsig.local > > > > Just changed 10.5.0.2 to 10.5.0.3 > > > > #ifdown enp0s3 > > #ifup enp0s3 > > Reco has already explained why this approach is incorrect. The OP seems to prefer imagining a bug rather than taking much notice of the replies. > My own two cents on the problem is that Interfaces is meant to define > how the network is brought up, not to change a running network. Yes, but it also appears that interfaces also defines how the network is brought down again, which is what the OP doesn't understand. > If you > want to change a running network, use ifconfig or ip to change the > address. e.g. ifconfig enp-s3 10.5.0.3 should work since all you are > changing is the ip address. I can't see any advantage in this as you have to do all the grunt work yourself instead of letting ifdown/ifup do it for you. For example: Here's my normal /e/n/i: $ cat /etc/network/interfaces # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface auto lo iface lo inet loopback # The primary network interface allow-hotplug enp0s14 iface enp0s14 inet dhcp $ I set up two static alternatives, one using the same address (13) as I get from the router, and one wacky one (213) in the "intruder" range: allow-hotplug enp0s14 iface enp0s14 inet static address 192.168.1.13 netmask 255.255.255.0 gateway 192.168.1.1 dns-nameservers 192.168.1.1 and allow-hotplug enp0s14 iface enp0s14 inet static address 192.168.1.213 netmask 255.255.255.0 gateway 192.168.1.1 dns-nameservers 192.168.1.1 (the rest of each file is unchanged from the normal one). Running a script like: #!/bin/bash ifdown enp0s14 cp /etc/network/interfaces-static-213 /etc/network/interfaces ifup enp0s14 releases the lease, downs the avahi-daemon, changes the network address, restarts the ssh server, reconfigures ntpd, and ups the avahi-daemon. My ssh session also goes dead (as I was logged in that way). Logging in on 192.168.1.213 instead (and avoiding polluting my known_hosts file) I can now run a similar script to the above, that has the line cp /etc/network/interfaces-static-13 /etc/network/interfaces or cp /etc/network/interfaces-normal-dhcp /etc/network/interfaces in it, and my old ssh session comes alive again (the new session going dead of course). The logs show all the other changes being reversed back to normal, with a new lease etc. So you can see the extra work (worth more than two cents) that the higher level commands do for you automatically, thanks to /etc/network/if-*.d/* Cheers, David.
[toc] | [prev] | [next] | [standalone]
| From | Gary Dale <garyndp@gmail.com> |
|---|---|
| Date | 2018-11-25 03:40 +0100 |
| Subject | Re: Worked example, was Re: Still unable to restart networking on Debian 9 text mode only |
| Message-ID | <wXSuZ-6nO-1@gated-at.bofh.it> |
| In reply to | #202755 |
On 2018-11-24 9:05 p.m., David Wright wrote: > On Sat 24 Nov 2018 at 12:25:20 (-0500), Gary Dale wrote: >> On 2018-11-23 8:25 a.m., Luciano Andress Martini wrote: >>> Additional information - Again Debian 9.6 Fresh Install without >>> graphical interface: >>> >>> cat /etc/network/interfaces: >>> >>> # This file describes the network interfaces available on your system >>> # and how to activate them. For more information, see interfaces(5). >>> >>> source /etc/network/interfaces.d/* >>> >>> # The loopback network interface >>> auto lo >>> iface lo inet loopback >>> >>> # The primary network interface >>> allow-hotplug enp0s3 >>> iface enp0s3 inet static >>> address 10.5.0.2/24 >>> gateway 10.5.0.1 >>> # dns-* options are implemented by the resolvconf package, if installed >>> dns-nameservers 8.8.8.8 >>> dns-search neoconsig.local >>> >>> Just changed 10.5.0.2 to 10.5.0.3 >>> >>> #ifdown enp0s3 >>> #ifup enp0s3 >> Reco has already explained why this approach is incorrect. > The OP seems to prefer imagining a bug rather than taking much notice > of the replies. > >> My own two cents on the problem is that Interfaces is meant to define >> how the network is brought up, not to change a running network. > Yes, but it also appears that interfaces also defines how the network > is brought down again, which is what the OP doesn't understand. > >> If you >> want to change a running network, use ifconfig or ip to change the >> address. e.g. ifconfig enp-s3 10.5.0.3 should work since all you are >> changing is the ip address. > I can't see any advantage in this as you have to do all the grunt work > yourself instead of letting ifdown/ifup do it for you. For example: > > Here's my normal /e/n/i: > > $ cat /etc/network/interfaces > # This file describes the network interfaces available on your system > # and how to activate them. For more information, see interfaces(5). > > source /etc/network/interfaces.d/* > > # The loopback network interface > auto lo > iface lo inet loopback > > # The primary network interface > allow-hotplug enp0s14 > iface enp0s14 inet dhcp > $ > > I set up two static alternatives, one using the same address (13) as I > get from the router, and one wacky one (213) in the "intruder" range: > > allow-hotplug enp0s14 > iface enp0s14 inet static > address 192.168.1.13 > netmask 255.255.255.0 > gateway 192.168.1.1 > dns-nameservers 192.168.1.1 > > and > > allow-hotplug enp0s14 > iface enp0s14 inet static > address 192.168.1.213 > netmask 255.255.255.0 > gateway 192.168.1.1 > dns-nameservers 192.168.1.1 > > (the rest of each file is unchanged from the normal one). > > Running a script like: > > #!/bin/bash > ifdown enp0s14 > cp /etc/network/interfaces-static-213 /etc/network/interfaces > ifup enp0s14 > > releases the lease, downs the avahi-daemon, changes the network > address, restarts the ssh server, reconfigures ntpd, and ups the > avahi-daemon. My ssh session also goes dead (as I was logged in > that way). > > Logging in on 192.168.1.213 instead (and avoiding polluting my > known_hosts file) I can now run a similar script to the above, > that has the line > cp /etc/network/interfaces-static-13 /etc/network/interfaces > or > cp /etc/network/interfaces-normal-dhcp /etc/network/interfaces > in it, and my old ssh session comes alive again (the new session > going dead of course). The logs show all the other changes being > reversed back to normal, with a new lease etc. > > So you can see the extra work (worth more than two cents) that > the higher level commands do for you automatically, thanks to > /etc/network/if-*.d/* > > Cheers, > David. That, of course, assumes that ifup and ifdown work on your system. They don't work on two of my systems that uses systemd-networkd to control the network. However ifconfig works on one and ip works on the other (although they are both running Stretch, one is a new server-type install while the other has been upgraded over the years from earlier versions). The lower-level tools tend to be more flexible and are more agnostic regarding how your network is set up. In the case of the OP, he needs to change his interfaces file no matter how he changes the network. However the order of commands isn't important when he uses ifconfig or ip to update the ip address - he can do it before or after editing interfaces. Moreover, it takes one fewer command. And it's worth learning how to use these tools if you are working with networks.
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2018-11-25 16:20 +0100 |
| Subject | Re: Worked example, was Re: Still unable to restart networking on Debian 9 text mode only |
| Message-ID | <wY4mt-5uD-7@gated-at.bofh.it> |
| In reply to | #202756 |
On Sat 24 Nov 2018 at 21:33:18 (-0500), Gary Dale wrote: > On 2018-11-24 9:05 p.m., David Wright wrote: > > So you can see the extra work (worth more than two cents) that > > the higher level commands do for you automatically, thanks to > > /etc/network/if-*.d/* > > That, of course, assumes that ifup and ifdown work on your system. > They don't work on two of my systems that uses systemd-networkd to > control the network. I don't understand why you would *want* to use ifup/ifdown on a system where you've chosen to control the interface with systemd-networkd. The only reason I bothered to actually perform the worked example was because I have one host that's still using what the installer left as its default. > However ifconfig works on one and ip works on the > other (although they are both running Stretch, one is a new > server-type install while the other has been upgraded over the years > from earlier versions). Perhaps it would be useful to discover why, and then post any helpful hints on what to do or avoid if other shave such a problem. > The lower-level tools tend to be more flexible and are more agnostic > regarding how your network is set up. Yes, one might suppose that the high-level tools use the low-level ones in a pre-arranged (hence less flexible) manner to do the actual work. > In the case of the OP, he needs to change his interfaces file no > matter how he changes the network. However the order of commands isn't > important when he uses ifconfig or ip to update the ip address - he > can do it before or after editing interfaces. Moreover, it takes one > fewer command. And it's worth learning how to use these tools if you > are working with networks. I don't understand why you'd recommend using a particular method when you've just explained that you can't get it to run consistently on your own systems. Nor do I understand why the number of commands required is of such importance: isn't that what scripts are for. One reply suggested installing network manager just to reduce the command count to two. That's a 15 package installation on my system. Cheers, David.
[toc] | [prev] | [next] | [standalone]
| From | Gary Dale <garyndp@gmail.com> |
|---|---|
| Date | 2018-11-27 00:20 +0100 |
| Subject | Re: Worked example, was Re: Still unable to restart networking on Debian 9 text mode only |
| Message-ID | <wYyky-7Dk-9@gated-at.bofh.it> |
| In reply to | #202761 |
On 2018-11-25 10:14 a.m., David Wright wrote: > On Sat 24 Nov 2018 at 21:33:18 (-0500), Gary Dale wrote: >> On 2018-11-24 9:05 p.m., David Wright wrote: >>> So you can see the extra work (worth more than two cents) that >>> the higher level commands do for you automatically, thanks to >>> /etc/network/if-*.d/* >> That, of course, assumes that ifup and ifdown work on your system. >> They don't work on two of my systems that uses systemd-networkd to >> control the network. > I don't understand why you would *want* to use ifup/ifdown on a system > where you've chosen to control the interface with systemd-networkd. > The only reason I bothered to actually perform the worked example was > because I have one host that's still using what the installer left > as its default. I don't but the OP seems to and your assistance used it. You defended the use of "high level tools" even when they make things more complicated. > >> However ifconfig works on one and ip works on the >> other (although they are both running Stretch, one is a new >> server-type install while the other has been upgraded over the years >> from earlier versions). > Perhaps it would be useful to discover why, and then post any helpful > hints on what to do or avoid if other shave such a problem. It's not a problem. It's how the two systems developed. Ifconfig no longer is installed by default on Debian systems. Ip is used instead. > >> The lower-level tools tend to be more flexible and are more agnostic >> regarding how your network is set up. > Yes, one might suppose that the high-level tools use the low-level ones > in a pre-arranged (hence less flexible) manner to do the actual work. > >> In the case of the OP, he needs to change his interfaces file no >> matter how he changes the network. However the order of commands isn't >> important when he uses ifconfig or ip to update the ip address - he >> can do it before or after editing interfaces. Moreover, it takes one >> fewer command. And it's worth learning how to use these tools if you >> are working with networks. > I don't understand why you'd recommend using a particular method when > you've just explained that you can't get it to run consistently on > your own systems. Nor do I understand why the number of commands > required is of such importance: isn't that what scripts are for. > One reply suggested installing network manager just to reduce the > command count to two. That's a 15 package installation on my system. Again, its a matter of using what you have. If you have ifconfig, it's straightforward to change the ip address of a running network. Ip is only slightly more complicated and should be used since ifconfig seems to be losing favour. Ip works on systems that don't use /etc/network/interfaces, such as ones that use systemd-networkd to control their network, while ifup/down only work with the interfaces file. Learn how to use it and your knowledge will be worth something for a longer time. You don't need network manager to reduce the command count. Just use the tools you already have.
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2018-11-27 22:00 +0100 |
| Subject | Re: Worked example, was Re: Still unable to restart networking on Debian 9 text mode only |
| Message-ID | <wYSCC-3z6-7@gated-at.bofh.it> |
| In reply to | #202793 |
On Mon 26 Nov 2018 at 18:17:08 (-0500), Gary Dale wrote: > On 2018-11-25 10:14 a.m., David Wright wrote: > > On Sat 24 Nov 2018 at 21:33:18 (-0500), Gary Dale wrote: > > > On 2018-11-24 9:05 p.m., David Wright wrote: > > > > So you can see the extra work (worth more than two cents) that > > > > the higher level commands do for you automatically, thanks to > > > > /etc/network/if-*.d/* > > > That, of course, assumes that ifup and ifdown work on your system. > > > They don't work on two of my systems that uses systemd-networkd to > > > control the network. > > I don't understand why you would *want* to use ifup/ifdown on a system > > where you've chosen to control the interface with systemd-networkd. > > The only reason I bothered to actually perform the worked example was > > because I have one host that's still using what the installer left > > as its default. > > I don't Then don't. I don't know why you wrote "That, of course, assumes that ifup and ifdown work on your system." If you've set up your system to use ifupdown they'll work. If you haven't, they might not. Pretty obvious. > but the OP seems to and your assistance used it. You defended > the use of "high level tools" even when they make things more > complicated. They don't. The OP just couldn't put the commands in the right order. > > > However ifconfig works on one and ip works on the > > > other (although they are both running Stretch, one is a new > > > server-type install while the other has been upgraded over the years > > > from earlier versions). > > Perhaps it would be useful to discover why, and then post any helpful > > hints on what to do or avoid if other shave such a problem. > > It's not a problem. It's how the two systems developed. Ifconfig no > longer is installed by default on Debian systems. Ip is used instead. You seem to use "work" unidiomatically. When someone says they have two objects A and B, and that tool T works with A and tool U works with B, that usually means there's some problem with U and A and/or with T and B. Otherwise, they would say that they *use* T with A and U with B. It's still odd, to me, that you don't either install ifconfig on the non-upgraded system or use ip on both, but there we are. > > > The lower-level tools tend to be more flexible and are more agnostic > > > regarding how your network is set up. > > Yes, one might suppose that the high-level tools use the low-level ones > > in a pre-arranged (hence less flexible) manner to do the actual work. > > > > > In the case of the OP, he needs to change his interfaces file no > > > matter how he changes the network. However the order of commands isn't > > > important when he uses ifconfig or ip to update the ip address - he > > > can do it before or after editing interfaces. Moreover, it takes one > > > fewer command. And it's worth learning how to use these tools if you > > > are working with networks. > > I don't understand why you'd recommend using a particular method when > > you've just explained that you can't get it to run consistently on > > your own systems. Nor do I understand why the number of commands > > required is of such importance: isn't that what scripts are for. > > One reply suggested installing network manager just to reduce the > > command count to two. That's a 15 package installation on my system. > > Again, its a matter of using what you have. If you have ifconfig, it's > straightforward to change the ip address of a running network. Ip is > only slightly more complicated and should be used since ifconfig seems > to be losing favour. > > Ip works on systems that don't use /etc/network/interfaces, such as > ones that use systemd-networkd to control their network, while > ifup/down only work with the interfaces file. Learn how to use it and > your knowledge will be worth something for a longer time. > > You don't need network manager to reduce the command count. Just use > the tools you already have. That's just what the OP was trying to do. Cheers, David.
[toc] | [prev] | [next] | [standalone]
| From | john doe <johndoe65534@mail.com> |
|---|---|
| Date | 2018-11-25 07:40 +0100 |
| Subject | Re: Worked example, was Re: Still unable to restart networking on Debian 9 text mode only |
| Message-ID | <wXWff-mH-1@gated-at.bofh.it> |
| In reply to | #202755 |
On 11/25/2018 3:05 AM, David Wright wrote: > On Sat 24 Nov 2018 at 12:25:20 (-0500), Gary Dale wrote: >> On 2018-11-23 8:25 a.m., Luciano Andress Martini wrote: >>> Additional information - Again Debian 9.6 Fresh Install without >>> graphical interface: >>> >>> cat /etc/network/interfaces: >>> >>> # This file describes the network interfaces available on your system >>> # and how to activate them. For more information, see interfaces(5). >>> >>> source /etc/network/interfaces.d/* >>> >>> # The loopback network interface >>> auto lo >>> iface lo inet loopback >>> >>> # The primary network interface >>> allow-hotplug enp0s3 >>> iface enp0s3 inet static >>> address 10.5.0.2/24 >>> gateway 10.5.0.1 >>> # dns-* options are implemented by the resolvconf package, if installed >>> dns-nameservers 8.8.8.8 >>> dns-search neoconsig.local >>> >>> Just changed 10.5.0.2 to 10.5.0.3 >>> >>> #ifdown enp0s3 >>> #ifup enp0s3 >> >> Reco has already explained why this approach is incorrect. > > The OP seems to prefer imagining a bug rather than taking much notice > of the replies. > >> My own two cents on the problem is that Interfaces is meant to define >> how the network is brought up, not to change a running network. > > Yes, but it also appears that interfaces also defines how the network > is brought down again, which is what the OP doesn't understand. > >> If you >> want to change a running network, use ifconfig or ip to change the >> address. e.g. ifconfig enp-s3 10.5.0.3 should work since all you are >> changing is the ip address. > > I can't see any advantage in this as you have to do all the grunt work > yourself instead of letting ifdown/ifup do it for you. For example: > > Here's my normal /e/n/i: > > $ cat /etc/network/interfaces > # This file describes the network interfaces available on your system > # and how to activate them. For more information, see interfaces(5). > > source /etc/network/interfaces.d/* > > # The loopback network interface > auto lo > iface lo inet loopback > > # The primary network interface > allow-hotplug enp0s14 > iface enp0s14 inet dhcp > $ > > I set up two static alternatives, one using the same address (13) as I > get from the router, and one wacky one (213) in the "intruder" range: > > allow-hotplug enp0s14 > iface enp0s14 inet static > address 192.168.1.13 > netmask 255.255.255.0 > gateway 192.168.1.1 > dns-nameservers 192.168.1.1 > > and > > allow-hotplug enp0s14 > iface enp0s14 inet static > address 192.168.1.213 > netmask 255.255.255.0 > gateway 192.168.1.1 > dns-nameservers 192.168.1.1 > > (the rest of each file is unchanged from the normal one). > > Running a script like: > > #!/bin/bash > ifdown enp0s14 > cp /etc/network/interfaces-static-213 /etc/network/interfaces > ifup enp0s14 > > releases the lease, downs the avahi-daemon, changes the network > address, restarts the ssh server, reconfigures ntpd, and ups the > avahi-daemon. My ssh session also goes dead (as I was logged in > that way). > > Logging in on 192.168.1.213 instead (and avoiding polluting my > known_hosts file) I can now run a similar script to the above, > that has the line > cp /etc/network/interfaces-static-13 /etc/network/interfaces > or > cp /etc/network/interfaces-normal-dhcp /etc/network/interfaces > in it, and my old ssh session comes alive again (the new session > going dead of course). The logs show all the other changes being > reversed back to normal, with a new lease etc. > TL-DR. Instead of using the cp command, one could use mapping stanza: http://manpages.ubuntu.com/manpages/bionic/man5/interfaces.5.html#mappings -- John Doe
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2018-11-25 17:00 +0100 |
| Subject | Re: Worked example, was Re: Still unable to restart networking on Debian 9 text mode only |
| Message-ID | <wY4Zb-5Im-5@gated-at.bofh.it> |
| In reply to | #202758 |
On Sun 25 Nov 2018 at 07:34:04 (+0100), john doe wrote: > On 11/25/2018 3:05 AM, David Wright wrote: > > On Sat 24 Nov 2018 at 12:25:20 (-0500), Gary Dale wrote: > >> On 2018-11-23 8:25 a.m., Luciano Andress Martini wrote: […] > >>> Just changed 10.5.0.2 to 10.5.0.3 > >>> > >>> #ifdown enp0s3 > >>> #ifup enp0s3 […] > >> My own two cents on the problem is that Interfaces is meant to define > >> how the network is brought up, not to change a running network. If you > >> want to change a running network, use ifconfig or ip to change the > >> address. e.g. ifconfig enp-s3 10.5.0.3 should work since all you are > >> changing is the ip address. > > > > I can't see any advantage in this as you have to do all the grunt work > > yourself instead of letting ifdown/ifup do it for you. For example: […] > > I set up two static alternatives, one using the same address (13) as I > > get from the router, and one wacky one (213) in the "intruder" range: […] > > (the rest of each file is unchanged from the normal one). > > > > Running a script like: > > > > #!/bin/bash > > ifdown enp0s14 > > cp /etc/network/interfaces-static-213 /etc/network/interfaces > > ifup enp0s14 […] > > TL-DR. > > Instead of using the cp command, one could use mapping stanza: > > http://manpages.ubuntu.com/manpages/bionic/man5/interfaces.5.html#mappings You might, I suppose, if you were setting this up as a permanent solution. As a worked example of (a) the correct order for the operations and (b) the extra leverage obtained by using the appropriate higher level commands, I would have had to edit the /e/n/i file itself, adding an unnecessary layer of extra complication. As it is, by typing: # rm -i /etc/network/interfaces-*¹ /root/to-*² all my experiment's files have been removed, leaving just the trace evidence in my logs. But by all means post a working example here. Following the documentation in man interfaces is obviously difficult for many people, judging by the examples that sometimes get posted. ¹ the two nonce files and a copy of the original /e/n/i. ² the change-overscripts; typing the commands themselves won't work when you get disconnected halfway through the process. Cheers, David.
[toc] | [prev] | [next] | [standalone]
| From | Rob van der Putten <rob@sput.nl> |
|---|---|
| Date | 2018-11-25 17:30 +0100 |
| Message-ID | <wY5se-692-25@gated-at.bofh.it> |
| In reply to | #202753 |
Hi there On 24/11/2018 18:25, Gary Dale wrote: > Reco has already explained why this approach is incorrect. > > My own two cents on the problem is that Interfaces is meant to define > how the network is brought up, not to change a running network. If you > want to change a running network, use ifconfig or ip to change the > address. e.g. ifconfig enp-s3 10.5.0.3 should work since all you are > changing is the ip address. I found this out the 'hard' way; Edit '/etc/network/interfaces', '( ifdown eth0 ; sleep 1 ; ifup eth0 ) &' used to work, even over SSH. But with Stretch this no longer works. With Stretch, I even had to write a script to bring up the WAN (VLAN + PPPoE); http://www.sput.nl/internet/xs4all/config.html This doesn't bother me, but it does show that high level out of the box doesn't necessarily behave the way you might expect. In which case low level plus scripts works just fine. Regards, Rob
[toc] | [prev] | [next] | [standalone]
| From | Luciano Andress Martini <analistaunix@gmail.com> |
|---|---|
| Date | 2018-11-26 14:00 +0100 |
| Message-ID | <wYoEx-1ip-9@gated-at.bofh.it> |
| In reply to | #202763 |
Good morning Rob, Your message is what i am expecting to receive... Please don't judge me if you are a dedicated developer of Debian. I love and I am using it since the first versions, but I never come to this list because I am not welcome in groups in my life, and will be no different here. And i promisse I you get out from here the faster as I can, I just can't believe what you are doing to Debian... In older Debian versions, I am able to just do this: #vi /etc/network/interfaces #at 20:00 >ifdown eth0 >sleep 10 >ifup eth0 CTRL+D Debian must have a option during the installation a option like "Legacy mode" that install sysvinit, net-tools, and etc this will make everyone here happy. Best regards and thank you for freely supporting me. Now, im just gone. Em dom, 25 de nov de 2018 às 14:26, Rob van der Putten <rob@sput.nl> escreveu: > > Hi there > > > On 24/11/2018 18:25, Gary Dale wrote: > > > Reco has already explained why this approach is incorrect. > > > > My own two cents on the problem is that Interfaces is meant to define > > how the network is brought up, not to change a running network. If you > > want to change a running network, use ifconfig or ip to change the > > address. e.g. ifconfig enp-s3 10.5.0.3 should work since all you are > > changing is the ip address. > > I found this out the 'hard' way; > Edit '/etc/network/interfaces', '( ifdown eth0 ; sleep 1 ; ifup eth0 ) > &' used to work, even over SSH. But with Stretch this no longer works. > With Stretch, I even had to write a script to bring up the WAN (VLAN + > PPPoE); > http://www.sput.nl/internet/xs4all/config.html > > This doesn't bother me, but it does show that high level out of the box > doesn't necessarily behave the way you might expect. In which case low > level plus scripts works just fine. > > > Regards, > Rob > > -- Luciano Andress Martini - Analista UNIX
[toc] | [prev] | [next] | [standalone]
| From | Gary Dale <garyndp@gmail.com> |
|---|---|
| Date | 2018-11-27 00:40 +0100 |
| Message-ID | <wYyDT-7K7-1@gated-at.bofh.it> |
| In reply to | #202769 |
On 2018-11-26 7:57 a.m., Luciano Andress Martini wrote: > Good morning Rob, > Your message is what i am expecting to receive... > > Please don't judge me if you are a dedicated developer of Debian. I > love and I am using it since the first versions, but I never come to > this list because I am not welcome in groups in my life, and will be > no different here. And i promisse I you get out from here the faster > as I can, I just can't believe what you are doing to Debian... > > In older Debian versions, I am able to just do this: > #vi /etc/network/interfaces > #at 20:00 >> ifdown eth0 >> sleep 10 >> ifup eth0 > CTRL+D > > Debian must have a option during the installation a option like > "Legacy mode" that install sysvinit, net-tools, and etc this will > make everyone here happy. > > Best regards and thank you for freely supporting me. > Now, im just gone. > sysvinit is going the way of the dodo. I have nothing against it personally but some things deserve a dignified retirement. Being able to configure things with a few declarative files and standard commands is simply a better way to run an operating system. Your example suggests that you want to change the ip address "after hours". You can still do the same thing pretty much the same way. If you are using the interfaces file, I don't see why your example won't work as is. In my case, I can simply change the ip address in /etc/systemd/network/Management.network then instead of all the commands you want to run, just do systemctl restart systemd-networkd. Again, you can put that into an ad hoc script to run with "at" if you want.
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2018-11-27 22:10 +0100 |
| Message-ID | <wYSMi-3S5-15@gated-at.bofh.it> |
| In reply to | #202794 |
On Mon 26 Nov 2018 at 18:32:47 (-0500), Gary Dale wrote: > On 2018-11-26 7:57 a.m., Luciano Andress Martini wrote: > > Good morning Rob, > > Your message is what i am expecting to receive... > > > > Please don't judge me if you are a dedicated developer of Debian. I > > love and I am using it since the first versions, but I never come to > > this list because I am not welcome in groups in my life, and will be > > no different here. And i promisse I you get out from here the faster > > as I can, I just can't believe what you are doing to Debian... > > > > In older Debian versions, I am able to just do this: > > #vi /etc/network/interfaces > > #at 20:00 > > > ifdown eth0 > > > sleep 10 > > > ifup eth0 > > CTRL+D > > > > Debian must have a option during the installation a option like > > "Legacy mode" that install sysvinit, net-tools, and etc this will > > make everyone here happy. I don't see the connection between this and the OP problem. > sysvinit is going the way of the dodo. I have nothing against it > personally but some things deserve a dignified retirement. Being able > to configure things with a few declarative files and standard commands > is simply a better way to run an operating system. > > Your example suggests that you want to change the ip address "after > hours". You can still do the same thing pretty much the same way. If > you are using the interfaces file, I don't see why your example won't > work as is. That's already dealt with in the thread. > In my case, I can simply change the ip address in > /etc/systemd/network/Management.network then instead of all the > commands you want to run, just do systemctl restart systemd-networkd. > Again, you can put that into an ad hoc script to run with "at" if you > want. That would seem to be most unhelpful to someone who, if they're running systemd at all, appears to be doing so reluctantly. Cheers, David.
[toc] | [prev] | [next] | [standalone]
| From | Greg Wooledge <wooledg@eeg.ccf.org> |
|---|---|
| Date | 2018-11-23 14:10 +0100 |
| Message-ID | <wXjnA-1dU-27@gated-at.bofh.it> |
| In reply to | #202713 |
On Fri, Nov 23, 2018 at 10:31:28AM -0200, Luciano Andress Martini wrote: > Then I edited /etc/network/interfaces and restart the system, to see > if the ip was changed. And yes, it worked. So this file is still being > used in some way - humm that seems to be the correct place to > configure my interface isn't? /etc/network/interfaces is the primary, supported means of configuring network interfaces in Debian. It's the best choice for standard server and workstation setups. Network-Manager may also be installed (it's optional). As you've already seen, it is installed when choosing a "desktop environment" during the Debian installation, and skipped if no DE is chosen. N-M is apparently the tool of choice for configuring wireless interfaces on laptops. Interfaces that are configured in /e/n/i are skipped by N-M. Thus, you could think of it as "/e/n/i has priority, and N-M gets whatever /e/n/i didn't get". Then there's some bizarre systemd network interface thing. It's not used by default in Debian. I can't imagine anyone ever using it. You can simply ignore it.
[toc] | [prev] | [next] | [standalone]
| From | "Alexander V. Makartsev" <avbetev@gmail.com> |
|---|---|
| Date | 2018-11-23 16:10 +0100 |
| Message-ID | <wXlfH-2pe-7@gated-at.bofh.it> |
| In reply to | #202713 |
[Multipart message — attachments visible in raw view] — view raw
On 23.11.2018 17:31, Luciano Andress Martini wrote: > Good morning, > > IMPORTANT: Network Manager was not being installed automatically by > the Debian DVD when I do not mark the graphical interface. > > I tried a fresh Debian install without graphical interface but using > the graphical installator I am running Debian 9.6. > > Then I edited /etc/network/interfaces and restart the system, to see > if the ip was changed. And yes, it worked. So this file is still being > used in some way - humm that seems to be the correct place to > configure my interface isn't? > > Well, I edited it again, now to try change the ip but without > restarting the system - like in all servers real situation, you don't > want to go after the server. If you have NetworkManager installed and connection was already setup and working, this task is accomplished by only 2 commands: # nmcli con mod "MyConnectionName" ipv4.addresses "10.0.0.5/24" # nmcli con up "MyConnectionName" That's it. After that your ip address will be set to "10.0.0.5". No need to take your interface down, restart networking or reboot system. And of course this method works over ssh connection. Any information about connection names, available configurable properties, etc could be done via nmcli with bash auto-complete being a convenient helper. NM is great. I really don't understand why people think it's only for systems with GUI and hate it, while having trouble with editing /e/n/i for anything more complex than changing ip address. -- With kindest regards, Alexander. ⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system ⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org ⠈⠳⣄⠀⠀⠀⠀
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web