'RTNETLINK answers: Invalid argument' after ifup ethX
1
vote
1
answer
4052
views
On a device with Debian 10, I want to make a permanent change to the IP via modifying ***/etc/network/interfaces*** . Hence, I modify it as follows :
auto lo
iface lo inet loopback
auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.109.11
netmask 255.255.255.0
gateway 192.168.109.254
and after that I perform the following :
ifdown eth0 && ifup eth0
but at this point it returns the following error :
root@var-som-mx6:~# ifdown eth0 && ifup eth0 --verbose
ifdown: interface eth0 not configured
ifup: configuring interface eth0=eth0 (inet)
/bin/run-parts --exit-on-error --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/hostapd
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
/sbin/ip addr add 192.168.109.12/255.255.255.0 broadcast 192.168.109.255 dev eth0 label eth0
/sbin/ip link set dev eth0 up
/sbin/ip route add default via 192.168.109.254 dev eth0 onlink
RTNETLINK answers: Invalid argument
ifup: failed to bring up eth0
***ifconfig*** tells me the following :
root@var-som-mx6:~# ifconfig
eth0: flags=4163 mtu 1500
inet 192.168.109.11 netmask 255.255.255.0 broadcast 192.168.109.255
inet6 fe80::fadc:7aff:fe3e:8dbb prefixlen 64 scopeid 0x20
ether f8:dc:7a:3e:8d:bb txqueuelen 1000 (Ethernet)
RX packets 35999 bytes 8217478 (7.8 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 5137 bytes 1559379 (1.4 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73 mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1 (Local Loopback)
RX packets 2837 bytes 258173 (252.1 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2837 bytes 258173 (252.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
What am I doing wrong?
Asked by M.Liscio
(230 rep)
Jul 22, 2022, 07:36 PM
Last activity: Jun 27, 2024, 04:41 PM
Last activity: Jun 27, 2024, 04:41 PM