# NO NET -- eth0 or enp4s0?

## psycophobia

So i booted up and everything seems fine apart from

```
ERROR: interface eth0 does not exist

net.eth0 failed to start

ERROR: can not start netmount as net.etho failed
```

I did install dhcpcd and i did compile the kernel with the RTL8111/8168/8411 PCI Exspress Gigabit Ethernet controller as it reports using that.

Allso after looking at ifconfig again on the live cd it was using enp4s0 not eth0

Everything else seems fine i am hoping i just boot the system and solve this as root with no live cd.Last edited by psycophobia on Fri Oct 23, 2020 5:08 pm; edited 1 time in total

----------

## NeddySeagoon

psycophobia,

Thats udevs 'persistent device naming' for you.

If you boot your gentoo and 

```
ifconfig -a
```

shows your interface, change eth0 everywhere to whatever your interface in called and you are good.

----------

## psycophobia

 *NeddySeagoon wrote:*   

> psycophobia,
> 
> Thats udevs 'persistent device naming' for you.
> 
> If you boot your gentoo and 
> ...

 

Will give that a go thanks Neddy

----------

## mike155

... or boot the Linux kernel with 'net.ifnames=0' to get back the old naming scheme (eth0, eth1, ...)

----------

## iandoug

I don't know if this is the same problem or not...

Setting up new box (still).

Network was set to work on  net.enp4s0

However, on every second boot, it decides the net is actually on eth0.

So I either have to manually add a connection on eth0, or just reboot and then it's back on  net.enp4s0 again.

Why is that?

The MoBo has Intel's new 2.5TB chip, if that makes a difference... only one LAN port.

Thanks, Ian

----------

## iandoug

Yuck. Now seems to want eth0 every time, But right after I changed it to eth0 last time, it wanted enp4s0 on the next boot ...

What causes this? Something in the BIOS?

Thanks, Ian

----------

## mike155

iandoug: I can't answer your question. But... if you want predictable interface names: just add  'net.ifnames=0' to your kernel command-line parameters. That will make sure that the interface name is always "eth0".

----------

## figueroa

Or, set it permanently via udev:

```
cd /etc/udev/rules.d

ln -s /dev/null 80-net-name-slot.rules

ln -s /dev/null 80-net-setup-link.rules
```

If either or both files already exists, delete it/them first, or move them elsewhere for safe-keeping.

----------

## NeddySeagoon

iandoug,

If the names keep switching, it sounds like udev crashes around the time that it should be doing interface renaming.

When eth0 is created by the kernel, udev, if its working, renames it to  enp4s0.

Using the old name will make networking reliable but udev still won't be running, if that's the problem.

----------

## iandoug

Hi guys

Thanks for the inputs, it seems stable on eth0 for now. Did not add any new configs, but looks like it may have been confusion caused by having both net.* set in rc-update.

I thought I had deleted one of them.

Cheers, Ian

----------

