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

 

 

 

Unable to restart Network interface with systmectl

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
ltoso
Posts: 9
Joined: 2010-03-24 04:39

Unable to restart Network interface with systmectl

#1 Post by ltoso »

Hi,
I have debian 10
i changed the IP address in

Code: Select all

/etc/network/interfaces
the gave the following command

Code: Select all

systemctl restart networking.service
the ip address didn't change but the older ip address stopped working
then i gave the command

Code: Select all

ifup enp1s0
the ip address got changed and started working
now i thought that means that it is not dependent on the networking service
so i ran an experiment i removed the file
/etc/ini.d/networking and also did

Code: Select all

systemctl disable networking.service
and then restarted the system, now i see is that the system is working and new ip address is assigned and working ie. pingable from the network and if i run

Code: Select all

systemctl status networking.service
the service is not running
now my question is who is running the networking

ltoso
Posts: 9
Joined: 2010-03-24 04:39

Re: Unable to restart Network interface with systmectl

#2 Post by ltoso »

i found solution we have to use the command

systemctl restart ifup@enp1s0

this works well

Bulkley
Posts: 6383
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

Re: Unable to restart Network interface with systmectl

#3 Post by Bulkley »

Thank you for posting your solution. Could you add SOLVED to your opening title?

User avatar
ksu
Posts: 76
Joined: 2014-01-13 14:59
Has thanked: 3 times
Been thanked: 1 time

Re: Unable to restart Network interface with systmectl

#4 Post by ksu »

is running

Code: Select all

systemctl restart ifup@<interface>
really a solution to this problem?

I am have the same/similar issue as OP's - that's why decided not to open a new thread...
'systemctl restart networking' brings the interface(s) down but not up

despite:

Code: Select all

route1 ~ # systemctl status networking
● networking.service - Raise network interfaces
     Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
     Active: active (exited) since Sat 2022-01-22 18:37:11 EST; 27min ago
       Docs: man:interfaces(5)
    Process: 2292 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=0/SUCCESS)
   Main PID: 2292 (code=exited, status=0/SUCCESS)
      Tasks: 0 (limit: 9454)
     Memory: 0B
        CPU: 43ms
     CGroup: /system.slice/networking.service

Jan 22 18:37:11 route1 systemd[1]: Starting Raise network interfaces...
Jan 22 18:37:11 route1 systemd[1]: Finished Raise network interfaces.
'systemctl start/restart ifup@<interface>' is required for the NIC(s) to come back to life - from the console :o(
restarting the system brings all up as expected

EDIT: after systemctl restart networking it's just 'lo'
shouldn't 'systemctl restart networking' bring the IFs up as it does during the system boot?

- not using NetworkManager
- not using udev rules

on:
bookworm/sid
Linux route1 5.15.0-2-amd64 #1 SMP Debian 5.15.5-2 (2021-12-18) x86_64 GNU/Linux

thanks a lot!
"They did not know it was impossible so they did it” - Mark Twain

User avatar
ksu
Posts: 76
Joined: 2014-01-13 14:59
Has thanked: 3 times
Been thanked: 1 time

Re: Unable to restart Network interface with systmectl

#5 Post by ksu »

PEBCAK :oops:
# cat /etc/network/interfaces.d/lan0.conf:

Code: Select all

auto lan0
allow-hotplug lan0
iface lan0 inet static
   address 10.11.11.101/24
overlooked the first line: "auto <interface>" when moving the config from my old box...
"systemctl restart networking" restarts the interfaces properly now...
"They did not know it was impossible so they did it” - Mark Twain

Post Reply