Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Network Adapters swap around after a reboot.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
D0zer
n00b
n00b


Joined: 28 Jul 2013
Posts: 46
Location: South Africa

PostPosted: Fri Jan 16, 2015 11:40 am    Post subject: Network Adapters swap around after a reboot. Reply with quote

Hi All

I am having a networking issue after a reboot on a Gentoo box. The machine has 3 NIC, but only 2 are currently used.

Code:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet x.x.x.x  netmask 255.255.255.248  broadcast x.x.x.x
        inet6 fe80::21b:21ff:fe14:b346  prefixlen 64  scopeid 0x20<link>
        ether 00:1b:21:14:b3:46  txqueuelen 1000  (Ethernet)
        RX packets 10640035  bytes 10237088942 (9.5 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 9030419  bytes 1814659462 (1.6 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.15.254  netmask 255.255.255.0  broadcast 192.168.15.255
        inet6 fe80::92e2:baff:fe1a:d60  prefixlen 64  scopeid 0x20<link>
        ether 90:e2:ba:1a:0d:60  txqueuelen 1000  (Ethernet)
        RX packets 9522791  bytes 1761964059 (1.6 GiB)
        RX errors 8  dropped 18  overruns 0  frame 4
        TX packets 13206014  bytes 18539798930 (17.2 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0



After a reboot, the network adapters change around. To resolve I unplug the LAN and WAN Cables from the Gentoo box. Start a ping to the router and plug the wan cable back in and swap ports till I get a reply and then do the same with the LAN part of the network.

There are 3 files under /etc/udev/rules.d
70-my-persistent-net.rules
70-persistent-cd.rules
70-persistent-net.rules

Thanks in Advance.
_________________
Gentoo Newbie
Back to top
View user's profile Send private message
szczerb
Veteran
Veteran


Joined: 24 Feb 2007
Posts: 1706
Location: Poland => Lodz

PostPosted: Fri Jan 16, 2015 11:45 am    Post subject: Reply with quote

What's in '70-my-persistent-net.rules' and '70-persistent-net.rules'? Why do you have two?
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2714

PostPosted: Fri Jan 16, 2015 12:04 pm    Post subject: Re: Network Adapters swap around after a reboot. Reply with quote

D0zer wrote:
After a reboot, the network adapters change around. To resolve I unplug the LAN and WAN Cables from the Gentoo box. Start a ping to the router and plug the wan cable back in and swap ports till I get a reply and then do the same with the LAN part of the network.

Migrating from netifrc to using dhcpcd ans your network manager should help avoiding such problems, see https://wiki.gentoo.org/wiki/Network_management_using_DHCPCD.

D0zer wrote:
There are 3 files under /etc/udev/rules.d
70-my-persistent-net.rules
70-persistent-cd.rules
70-persistent-net.rules
Could you check your output of dmesg?
Quote:
$ dmesg | grep 'network interface'

(you should get something like:)
[ 8.132263] systemd-udevd[268]: renamed network interface wlan0 to wlp8s0
[ 8.160220] systemd-udevd[264]: renamed network interface eth0 to enp2s14

Also, how do the network adapters show in lspci -k?
Back to top
View user's profile Send private message
D0zer
n00b
n00b


Joined: 28 Jul 2013
Posts: 46
Location: South Africa

PostPosted: Fri Jan 16, 2015 1:15 pm    Post subject: Reply with quote

szczerb -
Quote:
What's in '70-my-persistent-net.rules' and '70-persistent-net.rules'? Why do you have two?
I don't know where there is 2 files there

"70-my-persistent-net.rules"
Code:
# PCI device 0x8086:0x107c (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="90:e2:ba:1a:0d:60", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:0x1503 (e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="38:60:77:7c:76:03", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# PCI device 0x8086:0x107c (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1b:21:14:b3:46", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"


"70-persistent-net.rules"
Code:
# PCI device 0x8086:0x107c (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="90:e2:ba:1a:0d:60", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:0x1503 (e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="38:60:77:7c:76:03", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# PCI device 0x8086:0x107c (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1b:21:14:b3:46", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"


They look identical to me.
_________________
Gentoo Newbie
Back to top
View user's profile Send private message
D0zer
n00b
n00b


Joined: 28 Jul 2013
Posts: 46
Location: South Africa

PostPosted: Fri Jan 16, 2015 1:21 pm    Post subject: Reply with quote

charles17 -
Code:
dmesg | grep 'network interface'
didn't produce and output.

Quote:
Also, how do the network adapters show in lspci -k?


Code:
02:01.0 Ethernet controller: Intel Corporation 82541PI Gigabit Ethernet Controller (rev 05)
        Subsystem: Intel Corporation PRO/1000 GT Desktop Adapter
        Kernel driver in use: e1000
        Kernel modules: e1000
02:02.0 Ethernet controller: Intel Corporation 82541PI Gigabit Ethernet Controller (rev 05)
        Subsystem: Intel Corporation PRO/1000 GT Desktop Adapter
        Kernel driver in use: e1000
        Kernel modules: e1000
00:19.0 Ethernet controller: Intel Corporation 82579V Gigabit Network Connection (rev 05)
        Subsystem: Intel Corporation Device 201c
        Kernel driver in use: e1000e
        Kernel modules: e1000e


2 of the NICS are PCIE cards and the one is the onboard.

I don't think udev has been updated to the latest version yet.
_________________
Gentoo Newbie
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2714

PostPosted: Fri Jan 16, 2015 1:32 pm    Post subject: Reply with quote

D0zer wrote:
Code:
02:01.0 Ethernet controller: Intel Corporation 82541PI Gigabit Ethernet Controller (rev 05)
        Subsystem: Intel Corporation PRO/1000 GT Desktop Adapter
        Kernel driver in use: e1000
        Kernel modules: e1000
02:02.0 Ethernet controller: Intel Corporation 82541PI Gigabit Ethernet Controller (rev 05)
        Subsystem: Intel Corporation PRO/1000 GT Desktop Adapter
        Kernel driver in use: e1000
        Kernel modules: e1000
00:19.0 Ethernet controller: Intel Corporation 82579V Gigabit Network Connection (rev 05)
        Subsystem: Intel Corporation Device 201c
        Kernel driver in use: e1000e
        Kernel modules: e1000e

What about
Quote:
# dmesg | '02:01.0\|02:02.0\|00:19.0'


Last edited by charles17 on Fri Jan 16, 2015 3:22 pm; edited 1 time in total
Back to top
View user's profile Send private message
digifuzzy
n00b
n00b


Joined: 31 Oct 2014
Posts: 24

PostPosted: Fri Jan 16, 2015 2:54 pm    Post subject: Reply with quote

I've run into something similar with motherboard LAN and add-in cards.

If you don't use the lan on the MB (I'm assuming this
Quote:
00:19.0 Ethernet controller: Intel Corporation 82579V Gigabit Network Connection (rev 05)
is built into the MB)
- disable it in BIOS.
Back to top
View user's profile Send private message
digifuzzy
n00b
n00b


Joined: 31 Oct 2014
Posts: 24

PostPosted: Fri Jan 16, 2015 2:59 pm    Post subject: Reply with quote

Quote:

"70-my-persistent-net.rules"
Code:
# PCI device 0x8086:0x107c (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="90:e2:ba:1a:0d:60", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:0x1503 (e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="38:60:77:7c:76:03", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# PCI device 0x8086:0x107c (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1b:21:14:b3:46", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"


"70-persistent-net.rules"
Code:
# PCI device 0x8086:0x107c (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="90:e2:ba:1a:0d:60", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:0x1503 (e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="38:60:77:7c:76:03", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# PCI device 0x8086:0x107c (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1b:21:14:b3:46", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"



This seems messy.
You have references to device 0x107c four times in two files with two different MAC addresses.
Clean up time? I would double check these MAC values.
Back to top
View user's profile Send private message
D0zer
n00b
n00b


Joined: 28 Jul 2013
Posts: 46
Location: South Africa

PostPosted: Tue Jan 27, 2015 1:49 pm    Post subject: Reply with quote

Thanks for help so far charles17 and digifuzzy

charles17
Code:
 # dmesg | '02:01.0\|02:02.0\|00:19.0'

Does not produce an output.
_________________
Gentoo Newbie
Back to top
View user's profile Send private message
D0zer
n00b
n00b


Joined: 28 Jul 2013
Posts: 46
Location: South Africa

PostPosted: Tue Jan 27, 2015 2:00 pm    Post subject: Reply with quote

digifuzzy

I will go through both files and clean them up. I think the hardrive has been swapped into a different box previsouly which could be part of the mess.

I was thinking of teaming the 2 add-in Nics for the LAN, and use the Onboard NIC for the WAN. When I look at the network stats on the switch, on the port the gentoo box is connected to it shows :
Code:

Transmitted Pause Frames : 48655
Received Pause Frames : 824


Would teaming the 2 nics on the Lan side improve Network performance ?

Thanks again.
_________________
Gentoo Newbie
Back to top
View user's profile Send private message
digifuzzy
n00b
n00b


Joined: 31 Oct 2014
Posts: 24

PostPosted: Tue Jan 27, 2015 2:13 pm    Post subject: Reply with quote

D0zer wrote:
digifuzzy
Would teaming the 2 nics on the Lan side improve Network performance ?


YMMV. But it could be messy in the routing if you're not careful.
I use shorewall (iptables front end/firewall) to help with managing that kind of stuff.
Back to top
View user's profile Send private message
D0zer
n00b
n00b


Joined: 28 Jul 2013
Posts: 46
Location: South Africa

PostPosted: Fri Feb 06, 2015 9:20 am    Post subject: (Solved) Reply with quote

I decided to remove one of the PCI Network cards that was not being used.

I deleted the net.eth2 from /etc/init.d/

I used ifconfig to get the MAC addresses of the 2 NICs that are being used. I checked in /etc/udev/rules.d/70-my-persistent-net.rules, I commented out eth2 which was a mac address no longer being used.

After a couple of reboots the system was stable and I did not have to change network cables between the router and LAN around.
_________________
Gentoo Newbie
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security 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