1

I'm running Debian 11 and using the CLI, when bringing down and up a working interface with ip command (doing no changes at all on it's parameters) it stops working.

Steps that I follow:

  1. Boot the machine and login run ip a to check everything is correct (state UP, inet has 10.0.0.2/24) ping to 8.8.8.8 (I receive a response).
  2. Run sudo ip link set enp0s3 down, do a ping again (no response, this is expected), ip a shows state DOWN and it still has the same IP and prefix.
  3. Run sudo ip link set enp0s3 up, do a ping again and network is unreachable message pops in, ip a shows state UP and it still has the same IP and prefix.

This is my interface configuration file (/etc/network/interfaces):

source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
auto enp0s3
iface enp0s3 inet dhcp

The only way so far to fix this is either rebooting, restarting networking service with sudo systemctl restart networking.service or using ifup and ifdown commands.

2 Answers 2

0

Could be conflicting networking services. See what you have running

systemctl list-units

sample output:

networking.service
NetworkManager-wait-online.service
NetworkManager.service ...

Figure out which one you can disable/stop to fix issue. Might have to reboot to verify service is disable and 'ip link set enp0s3 up' is working correctly.

Let us know if this helped.

0
0

When you bring an interface down, all routes to that interface are automatically deleted from the system routing table. (When I first discovered this, it was a surprise. But upon reflection, it now makes sense to me.)

An interface with no routes will not respond to pings.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .