# Something has renamed eth0 to some random sequence!

## kbzium

Hello,

my internet connection works but the thing is I'd like to have ip assigned, not run dhcp all over again (it gives me same address every time anyways... and it takes up to 15 seconds on boot!) output of ifconfig -a

```
kboom-wst kboom # ifconfig -a

dummy0: flags=195<UP,BROADCAST,RUNNING,NOARP>  mtu 1500

        inet6 fe80::4491:d9ff:fe18:d182  prefixlen 64  scopeid 0x20<link>

        ether 46:91:d9:18:d1:82  txqueuelen 0  (Ethernet)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 33  bytes 11370 (11.1 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp5s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.1.167  netmask 255.255.255.0  broadcast 192.168.1.255

        inet6 fe80::be5f:f4ff:fe37:f472  prefixlen 64  scopeid 0x20<link>

        ether bc:5f:f4:37:f4:72  txqueuelen 1000  (Ethernet)

        RX packets 19195  bytes 17232743 (16.4 MiB)

        RX errors 0  dropped 1  overruns 0  frame 0

        TX packets 14646  bytes 2397829 (2.2 MiB)

        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 1674  bytes 121039 (118.2 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 1674  bytes 121039 (118.2 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

```

Do you happen to know what did this with my eth0? I suppose it would suffice to put

```
# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /usr/share/doc/openrc*/net.example* and save your configuration

# in /etc/conf.d/net (this file :]!).

config_eth0 = "192.168.1.167 netmask 255.255.255.0 brd 192.168.1.254"

#routes_eth0="default via 192.168.0.1"

#config_eth0="dhcp"

dns_domain_lo="WORKGROUP"

```

into /etc/init.d/net then. But first, there must be eth0 interface...

----------

## ulenrich

ln -s /dev/null /etc/udev/rules.d/90-network.rules

... read the news!

----------

## NeddySeagoon

kbzium,

Welcome to udev-200

You are suffering from 'permanent' interface naming.  You missed the warning from the udev update and the news item from the Gentoo devs. 

Your enp5s0 interface is based on the PCI slot and function number.  If the interface is on the motherboard, it won't change again ... at least, not until udev changes again.

If the interface is a plug in card, it will change if you move the card to a different slot.

----------

## kbzium

I see. But how to make this:

```
config_enp5s0 = "192.168.1.167 netmask 255.255.255.0 brd 192.168.1.254"

```

work? It doesn't recognize this interface.

----------

## mv

 *kbzium wrote:*   

> It doesn't recognize this interface.

 

I bet you forgot to rename the /etc/init.d/net.eth0 symlink.

----------

## albright

 *Quote:*   

> it won't change again ... at least, not until udev changes again. 

 

 :Laughing: 

----------

## kbzium

 *mv wrote:*   

>  *kbzium wrote:*   It doesn't recognize this interface. 
> 
> I bet you forgot to rename the /etc/init.d/net.eth0 symlink.

 

You're right   :Laughing:  . Sorry   :Embarassed: 

----------

## krinn

 *Quote:*   

> it won't change again ... at least, not until udev changes again. 

 

 :Laughing: 

----------

## direwolf

 *krinn wrote:*   

>  *Quote:*   it won't change again ... at least, not until udev changes again.  
> 
> 

 

Right.  From http://blog.flameeyes.eu/2013/03/predictable-persistently-non-mnemonic-names :

 *Quote:*   

> 
> 
> Speaking about which, one of the things that appears obvious even from Lennart’s comment to the previous post, is that there is no real assurance that the names are set in stone — he says that an udev upgrade won’t change them, but I guess most people would be sceptic, remembering the track record that udev and systemd has had over the past few months alone. In this situation my personal, informed opinion is that all this work on “predictable” names is a huge waste of time for almost everybody.
> 
> ...
> ...

 

----------

