Sample Header Ad - 728x90

ifdown: interface enp0s3 not configured. RTNETLINK answers: File exists. ifup: failed to bring up enp0s3

0 votes
1 answer
6084 views
I have a virtual box (6.1) with ubuntu minimal. in the settings of the virtual machine in the network section, "Bridged Adapter" is selected. root@ubuntu:/home/mista# dmesg -T|head -1 [Sun Oct 24 10:56:10 2021] Linux version 5.4.0-89-generic (buildd@lgw01-amd64-044) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #100-Ubuntu SMP Fri Sep 24 14:50:10 UTC 2021 (Ubuntu 5.4.0-89.100-generic 5.4.143) root@ubuntu:/home/mista# ip a 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: enp0s3: mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether 08:00:27:1e:5b:6d brd ff:ff:ff:ff:ff:ff inet 192.168.88.236/24 brd 192.168.88.255 scope global dynamic enp0s3 valid_lft 473sec preferred_lft 473sec inet6 fe80::a00:27ff:fe1e:5b6d/64 scope link valid_lft forever preferred_lft forever root@ubuntu:/home/mista# cat /etc/network/interfaces # interfaces(5) file used by ifup(8) and ifdown(8) # Include files from /etc/network/interfaces.d: source-directory /etc/network/interfaces.d auto lo iface lo inet loopback auto enp0s3 iface enp0s3 inet static address 192.168.88.236 netmask 255.255.255.0 gateway 192.168.88.1 root@ubuntu:/home/mista# ifdown enp0s3 ifdown: interface enp0s3 not configured root@ubuntu:/home/mista# ifup enp0s3 RTNETLINK answers: File exists ifup: failed to bring up enp0s3 root@ubuntu:/home/mista# systemctl status networking ● networking.service - Raise network interfaces Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Sun 2021-10-24 11:24:35 MSK; 1min 39s ago Docs: man:interfaces(5) Process: 826 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE) Main PID: 826 (code=exited, status=1/FAILURE) Oct 24 11:24:35 ubuntu systemd: Starting Raise network interfaces... Oct 24 11:24:35 ubuntu ifup: RTNETLINK answers: File exists Oct 24 11:24:35 ubuntu ifup: ifup: failed to bring up enp0s3 Oct 24 11:24:35 ubuntu systemd: networking.service: Main process exited, code=exited, status=1/FAILURE Oct 24 11:24:35 ubuntu systemd: networking.service: Failed with result 'exit-code'. Oct 24 11:24:35 ubuntu systemd: Failed to start Raise network interfaces. root@ubuntu:/home/mista# cat /run/network/ifstate lo=lo I tried to add the string "enp0s3=enp0s3" to /run/network/ifstate but it doesn't work. But /run - it's a virtual file system and the string with enp0s3 will be delete after reload daemons or reboot the server. Some people say that all configured interfaces should be displayed in /run/network/ifstate. But why, then, the enp0s3 interface is not displayed in the /run/network/ifstate if it is registered in the config ? And may be I have some mistake in config file? after reboot, the address 192.168.88.236/24 rises, but these commands do not work: ifup enp0s3 ifdown enp0s3 I don't understand why errors are coming out: root@ubuntu:/home/mista# ifdown enp0s3 ifdown: interface enp0s3 not configured root@ubuntu:/home/mista# ifup enp0s3 RTNETLINK answers: File exists ifup: failed to bring up enp0s3 Where ifup and ifdown can get the config to work with the interface except for the file /etc/network/interfaces? The file /etc/networks is empty.
Asked by Mexanizm456 (41 rep)
Oct 24, 2021, 09:23 AM
Last activity: Oct 24, 2021, 01:31 PM