Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ERROR: interface eth0 does not exist [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
catchpole
Tux's lil' helper
Tux's lil' helper


Joined: 03 Sep 2014
Posts: 103
Location: Leeds UK

PostPosted: Tue Dec 23, 2014 3:34 pm    Post subject: ERROR: interface eth0 does not exist [SOLVED] Reply with quote

I don't know if I should post here or in the Networking section. I chose here because I'm still installing and haven't got to the Desktop installation yet.

There seems to be a battle going on in my computer for control of the internet interface.
I have triple boot with Lubuntu, Mint 13 xfce already installed and the Gentoo that I am installing.

When working my way through the Gentoo handbook I was under the impression that the network would be through "eth0". (as the other systems)
Any changes I made with reference to networking would have included "eth0". I can't remember what I changed or added.
However when I had problems and did "ifconfig" I found that the interface was "enp0s18"

Quote:
ifconfig
enp0s18: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.8 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::216:17ff:fe76:4e1e prefixlen 64 scopeid 0x20<link>
inet6 fe80::d53:810d:747a:e70c prefixlen 64 scopeid 0x20<link>
ether 00:16:17:76:4e:1e txqueuelen 1000 (Ethernet)
RX packets 185 bytes 31776 (31.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 25 bytes 2196 (2.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
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 0 (Local Loopback)
RX packets 48 bytes 3312 (3.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 48 bytes 3312 (3.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0


I keep getting errors referring to eth0.
If I do "rc | wgetpaste" on the command line I get:

Quote:
rc | wgetpaste
[1m[32m*[0m Bringing up interface eth0[K
[1m[31m*[0m ERROR: interface eth0 does not exist[K
[1m[31m*[0m Ensure that you have loaded the correct kernel module for your hardware[K
[1m[31m*[0m ERROR: net.eth0 failed to start[K
[1m[31m*[0m ERROR: cannot start netmount as net.eth0 would not start[K[
Your paste can be seen here: https://bpaste.net/show/41ec28269316


The result was sent to:
https://bpaste.net/show/41ec28269316
Ping -c 3 www.gentoo.org also works without errors.
So the network is working OK.

If I comment out the [routes_eth0="default via 192.168.0.1"] in the [/etc/init.d/../conf.d/net] file I still get errors but different than with it uncommented.
Perhaps I should try:
routes_enp0s18="default via 192.168.0.1

I would like to tidy things up and get rid of the loose ends (References to eth0) before I move on but I don't know the sequence of things leading up to a working network.


What do I need to do to sort it out?
_________________
Noob
With experience of Mint and trying to learn more by intalling Gentoo
Motherboard = MS-7211- MICRO-STAR INTERNATIONAL CO., LTD
CPU = Intel(R) Celeron(R) CPU 2.80GHz version: 15.4.9
Memory = 2GB


Last edited by catchpole on Sun Dec 28, 2014 6:43 pm; edited 3 times in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7127
Location: almost Mile High in the USA

PostPosted: Tue Dec 23, 2014 4:13 pm    Post subject: Reply with quote

Yes, the recent version of udev with default config will make your particular Ethernet show up as enpXsY which should appear the same way in that machine no matter how many ethernet cards you insert, whereas you can't tell what the machine will do in the old system (will your original eth0 become eth1 when you install a new Ethernet card, or will the new card become eth1?)

So everywhere that you would use 'eth0' you need to use enpXsY, including making that link in /etc/init.d/ for that device (net.enpXsY) as well as /etc/conf.d/net .

OR, You can revert back to the old eth0 behavior by telling udev to do so, by creating an empty (or something with a #comment) file at /etc/udev/rules.d/80-net-setup-link.rules (or 80-net-name-slot.rules for older versions of udev) See http://wiki.gentoo.org/wiki/Udev/upgrade for more details.

If you can stomach the enpXsY it's better for making sure your ports don't suddenly change definitions if you have more than one Ethernet card, but if you only have one and never intend to use more than one (router, etc.) then yes I'd agree the old system may be better. (Or you can use NetworkManager and it will configure the ports automatically.)
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
catchpole
Tux's lil' helper
Tux's lil' helper


Joined: 03 Sep 2014
Posts: 103
Location: Leeds UK

PostPosted: Wed Dec 24, 2014 8:28 am    Post subject: Reply with quote

Hi eccerr0r,

I've changed the references that I can find but when I do "rc" from the command line it is still shows "Bringing up interface eth0" on the first line.

Quote:
[1m[32m*[0m Bringing up interface eth0[K
[1m[31m*[0m ERROR: interface eth0 does not exist[K
[1m[31m*[0m Ensure that you have loaded the correct kernel module for your hardware[K
[1m[31m*[0m ERROR: net.eth0 failed to start[K
[1m[31m*[0m ERROR: cannot start netmount as net.eth0 would not start[K[


How can I find where the words "Bringing up interface eth0" in a file?
Or does anyone know where its coming from?
_________________
Noob
With experience of Mint and trying to learn more by intalling Gentoo
Motherboard = MS-7211- MICRO-STAR INTERNATIONAL CO., LTD
CPU = Intel(R) Celeron(R) CPU 2.80GHz version: 15.4.9
Memory = 2GB
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2613

PostPosted: Wed Dec 24, 2014 9:04 am    Post subject: Reply with quote

catchpole wrote:
How can I find where the words "Bringing up interface eth0" in a file?
Or does anyone know where its coming from?

Looks like you were still having net.eth0 in some runlevel. Check
Quote:
$ rc-config list
Back to top
View user's profile Send private message
catchpole
Tux's lil' helper
Tux's lil' helper


Joined: 03 Sep 2014
Posts: 103
Location: Leeds UK

PostPosted: Wed Dec 24, 2014 10:09 am    Post subject: Reply with quote

After reading through the handbook again I found this under the heading "Configuring the system", sub heading "Networking information".

Quote:
If after booting the system we find out that the assumption about the network interface name (which is currently documented as eth0) was wrong, then execute the following steps to rectify this:

Update the /etc/conf.d/net file with the correct interface name (like enp3s0 instead of eth0)
Create new symbolic link (like /etc/init.d/net.enp3s0)
Remove the old symbolic link (rm /etc/init.d/net.eth0)
Add the new one to the default runlevel
Remove the old one using rc-update del net.eth0 default


Problem solved !!

Thanks to all concerned.
_________________
Noob
With experience of Mint and trying to learn more by intalling Gentoo
Motherboard = MS-7211- MICRO-STAR INTERNATIONAL CO., LTD
CPU = Intel(R) Celeron(R) CPU 2.80GHz version: 15.4.9
Memory = 2GB
Back to top
View user's profile Send private message
fredbear5150
Tux's lil' helper
Tux's lil' helper


Joined: 11 Oct 2003
Posts: 76

PostPosted: Wed Dec 24, 2014 7:20 pm    Post subject: Reply with quote

I know you have already solved this but you may not be aware that it is very easy to keep traditional interface names like "eth0" in new installations of Gentoo.

All you need to do is:

touch /etc/udev/rules.d/80-net-setup-link.rules

then reboot. You should have your "traditional" interface names back.
Back to top
View user's profile Send private message
catchpole
Tux's lil' helper
Tux's lil' helper


Joined: 03 Sep 2014
Posts: 103
Location: Leeds UK

PostPosted: Wed Dec 24, 2014 7:53 pm    Post subject: Reply with quote

Hi fredbear5150,

Thanks for that.
I think I'll do it just in case I need it later.
_________________
Noob
With experience of Mint and trying to learn more by intalling Gentoo
Motherboard = MS-7211- MICRO-STAR INTERNATIONAL CO., LTD
CPU = Intel(R) Celeron(R) CPU 2.80GHz version: 15.4.9
Memory = 2GB
Back to top
View user's profile Send private message
catchpole
Tux's lil' helper
Tux's lil' helper


Joined: 03 Sep 2014
Posts: 103
Location: Leeds UK

PostPosted: Sat Dec 27, 2014 2:42 pm    Post subject: Reply with quote

UPDATE:

After I "fixed" the problem in this thread I tried to emerge something and got an error code:
Quote:
Network unreachable


Ifconfig looks normal in the first half with no errors reported but the second half looks suspicious. (RX packets) [This was typed in manually]
Quote:
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 0 (Local Loopback)
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

I can't use wgetpaste - no internet connection!

Ping -c 3 www.gentoo.org gives an error:
Quote:
connect: Network is unreachable


Can anyone help?
_________________
Noob
With experience of Mint and trying to learn more by intalling Gentoo
Motherboard = MS-7211- MICRO-STAR INTERNATIONAL CO., LTD
CPU = Intel(R) Celeron(R) CPU 2.80GHz version: 15.4.9
Memory = 2GB
Back to top
View user's profile Send private message
lotuskip
n00b
n00b


Joined: 24 Aug 2014
Posts: 14

PostPosted: Sat Dec 27, 2014 4:05 pm    Post subject: Reply with quote

You need to do either what you already did to fix things or what fredbear5150 suggested. Now it sounds like you've done both. Either revert the changes you did on your own or delete the udev rule file.
Back to top
View user's profile Send private message
catchpole
Tux's lil' helper
Tux's lil' helper


Joined: 03 Sep 2014
Posts: 103
Location: Leeds UK

PostPosted: Sun Dec 28, 2014 7:20 am    Post subject: Reply with quote

Hi lotuskip,

When I tried the "emerge", I hadn't applied the retro fix suggested by fredbear5150:
Quote:
touch /etc/udev/rules.d/80-net-setup-link.rules

But I got the emerge error:
Quote:
connect: Network is unreachable

I tried fredbear5150's retro fix after but that didn't work and so I deleted the rule as you suggested.

So I still have the problem.
When I ping, I get:
Quote:
connect: Network is unreachable


I checked what I'd done before and can't find anything.
_________________
Noob
With experience of Mint and trying to learn more by intalling Gentoo
Motherboard = MS-7211- MICRO-STAR INTERNATIONAL CO., LTD
CPU = Intel(R) Celeron(R) CPU 2.80GHz version: 15.4.9
Memory = 2GB
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7127
Location: almost Mile High in the USA

PostPosted: Sun Dec 28, 2014 8:30 am    Post subject: Reply with quote

So what do you have in /etc/init.d/net.* ?

If you have /etc/init.d/net.enp0s18, for example, what does

Code:
# /etc/init.d/net.enp0s18 status

return?

And if you

Code:
# /etc/init.d/net.enp0s18 start

?

Also what have you set

Code:
$ /sbin/rc-update show|grep net
              net.br0 |      default                 
               net.lo | boot                         
             netmount |      default     

You should see net.lo and net.enp0s18 (mine's a bit weird, so it doesn't look the same...)


But before all of these, were you using DHCP to configure your interface? You'd only need an empty config to use DHCP.?
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
catchpole
Tux's lil' helper
Tux's lil' helper


Joined: 03 Sep 2014
Posts: 103
Location: Leeds UK

PostPosted: Sun Dec 28, 2014 10:37 am    Post subject: Reply with quote

Hi eccerr0r,

For the first part:
Quote:
# /etc/init.d/net.enp0s18 status
* status: started



For the second part:
Quote:
# /etc/init.d/net.enp0s18 start
* WARNING: net.enp0s18 has already been started



For the third part:
Quote:
$ /sbin/rc-update show|grep net
net.enp0s18 | default
netmount | default[



It appears that the "net.lo | boot" is missing.
Am I correct?

If so, how do I put it back in?
_________________
Noob
With experience of Mint and trying to learn more by intalling Gentoo
Motherboard = MS-7211- MICRO-STAR INTERNATIONAL CO., LTD
CPU = Intel(R) Celeron(R) CPU 2.80GHz version: 15.4.9
Memory = 2GB
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7127
Location: almost Mile High in the USA

PostPosted: Sun Dec 28, 2014 3:34 pm    Post subject: Reply with quote

This points to that the openrc is setup correctly or at least appears to be, and your config file is now suspect.

What do you have in your /etc/conf.d/net ?

If you are using DHCP you shouldn't need much at all (empty file is fine), else for static IP you need something like

config_enp0s18="10.0.0.2/24"
routes_enp0s18="default via 10.0.0.1"

If you run "ifconfig" you should see your enp0s18 in the list set to the IP address you specified, and the "route" command should show your default route. If you don't have any default route destination it will easily give you "unreachable" destinations.

If you change your config file, run "/etc/init.d/net.enp0s18 restart" to make it take effect.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
catchpole
Tux's lil' helper
Tux's lil' helper


Joined: 03 Sep 2014
Posts: 103
Location: Leeds UK

PostPosted: Sun Dec 28, 2014 4:53 pm    Post subject: Reply with quote

Hi eccer0r,

The contents of my /etc/conf.d/net:
Quote:
config_enp0s18="192.169.0.8 netmask 255.255.255.0 brd 192.168.0.255"
routes_enp0s18="default via192.168.0.1"
#shcp commented out because the computer has a fixed address in the router (192.168.0.8)
#config_eth0="dhcp"

The route command gives:
Quote:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
loopback localhost 255.0.0.0 UG 0 0 0 lo
192.168.0.0 * 255.255.255.0 U 0 0 0 enp0s18


[I don't know how the smiley got there but I can't get rid of it!]
_________________
Noob
With experience of Mint and trying to learn more by intalling Gentoo
Motherboard = MS-7211- MICRO-STAR INTERNATIONAL CO., LTD
CPU = Intel(R) Celeron(R) CPU 2.80GHz version: 15.4.9
Memory = 2GB


Last edited by catchpole on Sun Dec 28, 2014 6:42 pm; edited 1 time in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7127
Location: almost Mile High in the USA

PostPosted: Sun Dec 28, 2014 6:14 pm    Post subject: Reply with quote

[quote="catchpole"]
Quote:
routes_enp0s18="default via192.168.0.1"

Did you miss a space between "via" and "192.168.0.1"

This may explain why you didn't get a default route assigned?

You can click "Disable Smilies in this post" underneath the text edit window to nuke the happyness :D
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
catchpole
Tux's lil' helper
Tux's lil' helper


Joined: 03 Sep 2014
Posts: 103
Location: Leeds UK

PostPosted: Sun Dec 28, 2014 6:41 pm    Post subject: Reply with quote

Hi eccer0r,

Yes that seems to have been the problem.
Now when I ping, I get a result.

Thanks soooooo much to you and everyone else who helped.
_________________
Noob
With experience of Mint and trying to learn more by intalling Gentoo
Motherboard = MS-7211- MICRO-STAR INTERNATIONAL CO., LTD
CPU = Intel(R) Celeron(R) CPU 2.80GHz version: 15.4.9
Memory = 2GB
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum