# eth0 does not exist even if module r8168 is loaded

## wobbol

Hi just joined the Gentoo fight 3 days ago and im having some network troubles.

I have kernel version 3.8.13 

without any built-in support for realtek

and did this

```
ACCEPT_KEYWORDS="~x86" emerge r8168
```

and it let me emerge net-misc/r8168-8.035.00-r1 with no errors.

(i did this because  net-misc/r8168-8.028.00 failed to compile in ebuild)

to emerge the package i booted to the gentoo install to keep any stray env varibles and drivers at bay.

the module is loaded automatically and lspci -k tells me its using it.

```

07:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller (rev 06)

   Subsystem: ASUSTeK Computer Inc. P8P67 and other motherboards

   Kernel driver in use: r8168

   Kernel modules: r8168

```

(I don't have a P8P67 mother board i have a P8Z68 but they are probably compatible) 

```

# ethtool eth0

Cannot get device settings: No such device

Cannot get wake-on-lan settings: No such device

Cannot get message level: No such device

Cannot get link status: No such device

#

```

there is a init.d script for net.eth0 but it also fails.

i am currently in chroot from my debian.

i don't know where to go anymore.

----------

## Hu

What is the output of ifconfig -a, as run right after ethtool fails?

----------

## wobbol

```

patty ~ # cat ifconfig-a 

enp7s0: flags=4098<BROADCAST,MULTICAST>  mtu 1500

        ether f4:6d:04:64:39:c4  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 51  base 0x4000  

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 4  bytes 240 (240.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 4  bytes 240 (240.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

sit0: flags=128<NOARP>  mtu 1480

        sit  txqueuelen 0  (IPv6-in-IPv4)

        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

```

 :Very Happy:  thats the command i was looking for

(i still have no idea what to  do with that)

----------

## wobbol

thanks for bringing me out of my mental block just did a

```

# ln -s /etc/init.d/net.lo /etc/init.d/enp7s0

# /etc/init.d/enp7s0 start

```

and it works  :Very Happy: 

now to fix my xorg.conf witch i somehow broke in trying to fix the network issue.

----------

## Hu

Your solution works, but the other option would have been to reconfigure udev so that it does not mangle your interface name.  You appear to have only one interface, so the renaming does not help you.

----------

## wobbol

how do i reconfigure udev?

im so used to dpkg-reconfigure  :Razz: 

[edit]:

the only config file for udev in /etc/udev/ is hwdb.bin should i just delete it?

will it create another one?

is this what im looking for?

[edit2]:

found what i needed here http://www.reactivated.net/writing_udev_rules.html

thanks guys!

----------

## mike155

 *Quote:*   

> found what i needed here http://www.reactivated.net/writing_udev_rules.html

 

Really? As far as I can see, the proper solution to prevent udev from mangling names is:

```
ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules
```

See here http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/, section: 'I don't like this, how do I disable this?'

----------

## wobbol

if you read a little bit theres a reason you don't want to use the kernel assigned device names. the page i supplied tells of the udev way of keeping interface names sane and consistent not how to circumvent it.

----------

## Hu

We have read that page.  The justifications it gives only apply if you have, or reasonably expect you will someday have, more than one network interface of the same type.  As I said, you appear to have only one Ethernet interface, so the rules are worthless for you.  The authors of that page seem to be under the mistaken impression that almost everyone falls into the category of having more than one interface, and based on that bad assumption decided to mangle the interface names on all machines.

----------

## broken_chaos

 *wobbol wrote:*   

> if you read a little bit theres a reason you don't want to use the kernel assigned device names.

 

They're fine to use if you only have a single ethernet adapter. eth0 will always be eth0 as long as there's only one.

----------

## wobbol

sorry I've just had problems in other distros with interface naming a few years ago and am very sour about it.

also just to draw some parallels remember before grub 2 when sda would just be the first non pata disk detected?

anyway I'm done with this discussion of personal preference.

Peace.

----------

