Interface eth0 not configured
13,946
Yes. Just replace eth0
with one of the other interfaces.
For example:
auto eno1
iface eno1 inet static
address 192.168.1.88
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 127.0.1.1
Comments
-
Soubriquet almost 2 years
I'm trying to setup a static ip address. Here's my /etc/network/interfaces:
# interfaces(5) file used by ifup(8) and ifdown(8) auto lo iface lo inet loopback # primary network interfaces auto eth0 iface eth0 inet static address 192.168.1.88 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1 dns-nameservers 127.0.1.1
Apparently, my machine does not have eth0 at all. I've looked around and everyone says to configure the above file with eth0. Are there any other ways to set a static ip address using these devices?
$ ifconfig -a eno1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether 1c:1b:0d:0a:86:00 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device interrupt 20 memory 0xdf400000-df420000 enp82s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.7 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe80::9b71:b459:c8d8:4bc5 prefixlen 64 scopeid 0x20<link> ether 1c:1b:0d:0a:85:fe txqueuelen 1000 (Ethernet) RX packets 3712 bytes 2691239 (2.6 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 1501 bytes 157372 (157.3 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device memory 0xdf200000-df21ffff lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1 (Local Loopback) RX packets 25268 bytes 1537593 (1.5 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 25268 bytes 1537593 (1.5 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wlp83s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 ether e4:b3:18:8c:05:87 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
-
Soubriquet over 7 yearsCould I use lo? According to netstat -i, lo's MTU is higher.
-
Russell Sim over 7 yearsNo you cannot.
lo
is your loopback interface. -
Soubriquet over 7 yearsOk. Does it matter which one I choose? I don't know the difference between these interfaces.
-
Soubriquet over 7 yearsJust tried switching to eno1 instead off eth0. When I try sudo ifdown eno1, I get: ifdown: interface eno1 not configured.
-
Russell Sim over 7 yearsAll of these interfaces represent separate physical network interfaces on your machine. Are you are trying to change the IP address of
enp82s0
, which currently has an IP address of192.168.1.7
to192.168.1.88
? If so, please pickenp82s0
-
Soubriquet over 7 yearsI just tried enp82s0 and that didn't work. ifconfig still shows 192.168.1.7.
-
Russell Sim over 7 years
ifdown enp82s0 && ifup enp82s0
-
Soubriquet over 7 yearsThat gives me: if down: failed to open lockfile /run/network/if state.enp82s0: Permission denied
-
Soubriquet over 7 yearsAdding sudo with that gives me: ifdown: interface enp82s0 not configured
-
Russell Sim over 7 yearsunix.stackexchange.com/questions/50602/… for your issue with ifdown
-
Soubriquet over 7 yearsmy /run/network/ifstate already contains lo=lo and enp82s0=enp82s0, but I still get the aforementioned issues.
-
Soubriquet over 7 yearsTurns out I just needed to reboot my system. Thanks for the help.