[SOLVED]Strange proglem with eth port names

[SOLVED]Strange proglem with eth port names

Postby mackowiakp » Jul 18th, '16, 19:58

I have one laptop with wired Ethernet socket physically broken. Because of that, I bought USB to Ethernet adapter (Belkin). WiFi port is turn off by physical switch. It works properly. Below output form ifconfig:

Code: Select all
enp0s29f7u1u2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.6  netmask 255.255.255.0  broadcast 192.168.0.255
        ether 00:0a:cd:2a:b1:52  txqueuelen 1000  (Ethernet)
        RX packets 1269239  bytes 94326445 (89.9 MiB)
        RX errors 0  dropped 1  overruns 0  frame 0
        TX packets 236626  bytes 3573328551 (3.3 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 00:1e:ec:08:8d:fe  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 19 

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 1  (Local Loopback)
        RX packets 204  bytes 22989 (22.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 204  bytes 22989 (22.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


port eth0 is existing Ethernet port but physically broken. USB to Ethernet adapter has static IP config not DHCP.
There is problem when I unplug USB adapter and use laptop outside office (using WiFi). Next when I back in office, I turn on laptop, wait for system boot and then connect USB adapter. I know it is wrong order but it happens from time to time. At this moment ifconfig shows me existence of two wired interfaces (named eth0 and eth1). Interface eth1 has proper setup parameters (as ifconfig stands) but does not work. Than I unplug and plug USB adapter again. At this moment new not configured interface with new random name is created. So I have to setup this interface again.
It is not possible to turn off broken Ethernet port on hardware setup level (BIOS).
Is any possibility to fix Ethernet port name even when sometimes is connected and sometimes not?
Last edited by mackowiakp on Jul 19th, '16, 08:27, edited 1 time in total.
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 569
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland

Re: Strange proglem with eth port names

Postby mackowiakp » Jul 19th, '16, 08:26

SOLVED ! The solution is ASAP (As Simple As Possible). I just created file /usr/lib/udev/rules.d/10-network.rules with such content:

Code: Select all
# Broken build-in Ethernet port
UBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:1e:ec:08:8d:fe", NAME="eth0"
# USB to Ethernet adapter
UBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:0a:cd:2a:b1:52", NAME="net1"


Thats all...
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 569
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland


Return to Networking

Who is online

Users browsing this forum: No registered users and 1 guest

cron