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:
- 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). - 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. 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.