Re: How to Restart Networking in stretch
- Date: Wed, 13 Feb 2019 09:10:05 -0500
- From: Greg Wooledge <wooledg@xxxxxxxxxxx>
- Subject: Re: How to Restart Networking in stretch
On Tue, Feb 12, 2019 at 10:49:13PM -0600, Kent West wrote:
> "The Debian Administrator's Handbook" is for version 8, and talks
> about deprecated tools like ifup/down, which aren't even installed by
> default on stretch.
The ifupdown package has priority "important" and, as far as I know, it
is installed by default.
You might be confusing it with "ifconfig", which is in the net-tools
package, which is *not* installed by default in stretch (a departure from
> But in trying to convert to a static address (by editing
> /etc/network/interfaces), and then try to restart the network ("ip link set
> dev enp0s3 down", then "...up")
OK, let's back up a second.
What was in the /etc/network/interfaces file *before* you edited it? Was
it configured for DHCP? If so, you should bring the interface down *before*
you edit the file, so that ifdown knows there is a DHCP client daemon
running associated with this interface, that it should kill.
If you're currently configured for DHCP, and you edit the file before
bringing down the interface, the DHCP client daemon will continue running
(ifdown doesn't know about it, because you changed the file that would
have told it). Which means you would have to kill the DHCP client daemon
yourself, either manually, or by rebooting.
So, the proper sequence is:
1) ifdown interfacename
2) edit /etc/network/interfaces
3) ifup interfacename
> subsequent networking results in name
> resolution complaints or "network not available" complaints. Nor do any of
> the other methods I've tried work - "service network restart", "systemctl
> restart networking", "systemctl restart systemd-networkd",
> "/etc/init.d/networkng stop" then "...start".
> I try a reboot. Still no go.
What's in the /etc/network/interfaces file now?
What do "ip link" and "ip addr" tell you?
Are there any relevant errors in dmesg?
What output (if any) do you get from "ifup interfacename"?
Are there any useful messages in "systemctl status networking.service"
or in "journalctl -u networking.service"?