Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Strange dhcpcd behaviour
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
naga jolokia
n00b
n00b


Joined: 28 Dec 2013
Posts: 10
Location: Berlin

PostPosted: Sat Dec 28, 2013 6:37 pm    Post subject: [Solved] Strange dhcpcd behaviour Reply with quote

Hi,
I'm trying to install Gentoo on a new machine. The board is an Intel DH87RL with an I217-V NIC onboard. The kernel module supporting this NIC is e1000e.
Starting the install-amd64-minimal-20131226.iso I couldn't get the network running: the Interface didn't receive a dhcp lease. e1000e was loaded, lspci showed the device.
As Sabayon-linux is based on Gentoo I booted Sabayon_Linux_14.01_amd64_Xfce.iso It established a network connection automaticaly. To test if I'm using the right module, I rmmod'ed e1000e which resulted in a stopping network connection, while inserting it again restarted the connection.
The gentoo install disk (even if it's 2 days old) uses an 3.10.17 kernel. Sabayon runs 3.12.6, my first guess was a too old module version. So I tried an alternative Install using the Sabayon iso mostly following the Instructions in the Handbook. When it came to compiling the kernel I set in /etc/portage/package.accept_keywords the version to =sys-kernel/gentoo-sources-3.12.6 After reboot on the new system I got the following surprising results:
Code:

gentux2 ~ # ifconfig
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  (Lokale Schleife)
        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

gentux2 ~ # dhcpcd
dhcpcd[3221]: version 5.6.4 starting
dhcpcd[3221]: no interfaces have a carrier
dhcpcd[3221]: forked to background, child pid 3241

gentux2 ~ # ifconfig
enp0s25: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::222:4dff:fea9:f249  prefixlen 64  scopeid 0x20<link>
        ether 00:22:4d:a9:f2:49  txqueuelen 1000  (Ethernet)
        RX packets 7  bytes 4158 (4.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 76  bytes 8182 (7.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 20  memory 0xf7c00000-f7c20000

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  (Lokale Schleife)
        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

sit0: flags=193<UP,RUNNING,NOARP>  mtu 1480
        inet6 ::127.0.0.1  prefixlen 96  scopeid 0x90<compat,host>
        sit  txqueuelen 0  (IPv6-nach-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 4  dropped 0 overruns 4  carrier 0  collisions 0

gentux2 ~ # killall dhcpcd

gentux2 ~ # dhcpcd
dhcpcd[3903]: version 5.6.4 starting
dhcpcd[3903]: enp0s25: sending IPv6 Router Solicitation
dhcpcd[3903]: enp0s25: rebinding lease of 192.168.1.101
dhcpcd[3903]: enp0s25: acknowledged 192.168.1.101 from 192.168.1.1 `■'
dhcpcd[3903]: enp0s25: checking for 192.168.1.101
dhcpcd[3903]: enp0s25: sending IPv6 Router Solicitation
dhcpcd[3903]: enp0s25: leased 192.168.1.101 for 7200 seconds
dhcpcd[3921]: enp0s25: enp0s25: MTU set to 576
dhcpcd[3903]: forked to background, child pid 3940

gentux2 ~ # ifconfig
enp0s25: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::222:4dff:fea9:f249  prefixlen 64  scopeid 0x20<link>
        ether 00:22:4d:a9:f2:49  txqueuelen 1000  (Ethernet)
        RX packets 18  bytes 10692 (10.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 190  bytes 20504 (20.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 20  memory 0xf7c00000-f7c20000

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  (Lokale Schleife)
        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

sit0: flags=193<UP,RUNNING,NOARP>  mtu 1480
        inet6 ::127.0.0.1  prefixlen 96  scopeid 0x90<compat,host>
        sit  txqueuelen 0  (IPv6-nach-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 5  dropped 0 overruns 5  carrier 0  collisions 0

gentux2 ~ # lspci -kvm
...
Device:   00:16.0
Class:   Communication controller
Vendor:   Intel Corporation
Device:   8 Series/C220 Series Chipset Family MEI Controller #1
SVendor:   Intel Corporation
SDevice:   Device 204a
Rev:   04

Device:   00:19.0
Class:   Ethernet controller
Vendor:   Intel Corporation
Device:   Ethernet Connection I217-V
SVendor:   Intel Corporation
SDevice:   Device 204a
Rev:   04
Driver:   e1000e
Module:   e1000e

...

Seems that I received a dhcp lease with 192.168.1.101, but ifconfig doesn't show the adress and
Code:

gentux2 ~ # ping 192.168.1.101
connect: Network is unreachable

After reboot dmesg looks like
Code:

gentux2 ~ # grep -e e1000e -e eth0 /media/raina/c494f7d7-8332-4043-9b84-2f75487dab45/dmesg.txt
[   14.397352] e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k
[   14.397354] e1000e: Copyright(c) 1999 - 2013 Intel Corporation.
[   14.397443] e1000e 0000:00:19.0: setting latency timer to 64
[   14.397489] e1000e 0000:00:19.0: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode
[   14.397507] e1000e 0000:00:19.0: irq 44 for MSI/MSI-X
[   14.565207] e1000e 0000:00:19.0 eth0: registered PHC clock
[   14.565210] e1000e 0000:00:19.0 eth0: (PCI Express:2.5GT/s:Width x1) 00:22:4d:a9:f2:49
[   14.565211] e1000e 0000:00:19.0 eth0: Intel(R) PRO/1000 Network Connection
[   14.565258] e1000e 0000:00:19.0 eth0: MAC: 11, PHY: 12, PBA No: FFFFFF-0FF
[   14.630293] systemd-udevd[2556]: renamed network interface eth0 to enp0s25

when dhcpcd was run twice:
Code:
 grep -n -e e1000e -e eth0 /media/raina/c494f7d7-8332-4043-9b84-2f75487dab45/dmesg.txt3
826:[   14.397352] e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k
827:[   14.397354] e1000e: Copyright(c) 1999 - 2013 Intel Corporation.
828:[   14.397443] e1000e 0000:00:19.0: setting latency timer to 64
829:[   14.397489] e1000e 0000:00:19.0: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode
830:[   14.397507] e1000e 0000:00:19.0: irq 44 for MSI/MSI-X
831:[   14.565207] e1000e 0000:00:19.0 eth0: registered PHC clock
832:[   14.565210] e1000e 0000:00:19.0 eth0: (PCI Express:2.5GT/s:Width x1) 00:22:4d:a9:f2:49
833:[   14.565211] e1000e 0000:00:19.0 eth0: Intel(R) PRO/1000 Network Connection
834:[   14.565258] e1000e 0000:00:19.0 eth0: MAC: 11, PHY: 12, PBA No: FFFFFF-0FF
835:[   14.630293] systemd-udevd[2556]: renamed network interface eth0 to enp0s25
1269:[  768.561969] e1000e 0000:00:19.0: irq 44 for MSI/MSI-X
1270:[  768.662458] e1000e 0000:00:19.0: irq 44 for MSI/MSI-X
1272:[  770.179351] e1000e: enp0s25 NIC Link is Up 100 Mbps Full Duplex, Flow Control: Rx/Tx
1273:[  770.179354] e1000e 0000:00:19.0 enp0s25: 10/100 speed: disabling TSO
1275:[  775.935067] e1000e 0000:00:19.0 enp0s25: changing MTU from 1500 to 576
1276:[  776.090309] e1000e 0000:00:19.0 enp0s25: changing MTU from 576 to 1500
1277:[  777.836529] e1000e: enp0s25 NIC Link is Up 100 Mbps Full Duplex, Flow Control: Rx/Tx
1278:[  777.836532] e1000e 0000:00:19.0 enp0s25: 10/100 speed: disabling TSO
1280:[  782.223137] e1000e 0000:00:19.0 enp0s25: changing MTU from 1500 to 576
1281:[  782.370363] e1000e 0000:00:19.0 enp0s25: changing MTU from 576 to 1500
1282:[  784.242719] e1000e: enp0s25 NIC Link is Up 100 Mbps Full Duplex, Flow Control: Rx/Tx
1283:[  784.242722] e1000e 0000:00:19.0 enp0s25: 10/100 speed: disabling TSO
1285:[  788.909511] e1000e 0000:00:19.0 enp0s25: changing MTU from 1500 to 576
1286:[  789.057724] e1000e 0000:00:19.0 enp0s25: changing MTU from 576 to 1500
1287:[  790.876078] e1000e: enp0s25 NIC Link is Up 100 Mbps Full Duplex, Flow Control: Rx/Tx
1288:[  790.876080] e1000e 0000:00:19.0 enp0s25: 10/100 speed: disabling TSO
1290:[  795.522848] e1000e 0000:00:19.0 enp0s25: changing MTU from 1500 to 576
1291:[  795.668088] e1000e 0000:00:19.0 enp0s25: changing MTU from 576 to 1500
1292:[  797.452345] e1000e: enp0s25 NIC Link is Up 100 Mbps Full Duplex, Flow Control: Rx/Tx
1293:[  797.452348] e1000e 0000:00:19.0 enp0s25: 10/100 speed: disabling TSO
1295:[  802.892821] e1000e 0000:00:19.0 enp0s25: changing MTU from 1500 to 576
1302:[  803.031988] e1000e 0000:00:19.0 enp0s25: changing MTU from 576 to 1500
1323:[  804.786296] e1000e: enp0s25 NIC Link is Up 100 Mbps Full Duplex, Flow Control: Rx/Tx
1324:[  804.786298] e1000e 0000:00:19.0 enp0s25: 10/100 speed: disabling TSO
1326:[  810.591022] e1000e 0000:00:19.0 enp0s25: changing MTU from 1500 to 576
1327:[  810.738250] e1000e 0000:00:19.0 enp0s25: changing MTU from 576 to 1500
1328:[  812.491511] e1000e: enp0s25 NIC Link is Up 100 Mbps Full Duplex, Flow Control: Rx/Tx
1329:[  812.491514] e1000e 0000:00:19.0 enp0s25: 10/100 speed: disabling TSO
1331:[  817.827820] e1000e 0000:00:19.0 enp0s25: changing MTU from 1500 to 576
1332:[  817.975092] e1000e 0000:00:19.0 enp0s25: changing MTU from 576 to 1500
1333:[  819.829427] e1000e: enp0s25 NIC Link is Up 100 Mbps Full Duplex, Flow Control: Rx/Tx
1334:[  819.829430] e1000e 0000:00:19.0 enp0s25: 10/100 speed: disabling TSO
1336:[  825.301869] e1000e 0000:00:19.0 enp0s25: changing MTU from 1500 to 576
1337:[  825.446051] e1000e 0000:00:19.0 enp0s25: changing MTU from 576 to 1500
1338:[  827.300459] e1000e: enp0s25 NIC Link is Up 100 Mbps Full Duplex, Flow Control: Rx/Tx
1339:[  827.300462] e1000e 0000:00:19.0 enp0s25: 10/100 speed: disabling TSO
1341:[  832.540711] e1000e 0000:00:19.0 enp0s25: changing MTU from 1500 to 576
1342:[  832.689962] e1000e 0000:00:19.0 enp0s25: changing MTU from 576 to 1500
1343:[  834.533300] e1000e: enp0s25 NIC Link is Up 100 Mbps Full Duplex, Flow Control: Rx/Tx
1344:[  834.533303] e1000e 0000:00:19.0 enp0s25: 10/100 speed: disabling TSO
1346:[  839.374229] e1000e 0000:00:19.0 enp0s25: changing MTU from 1500 to 576
1347:[  839.521453] e1000e 0000:00:19.0 enp0s25: changing MTU from 576 to 1500
1348:[  841.303719] e1000e: enp0s25 NIC Link is Up 100 Mbps Full Duplex, Flow Control: Rx/Tx
1349:[  841.303722] e1000e 0000:00:19.0 enp0s25: 10/100 speed: disabling TSO
1351:[  846.177707] e1000e 0000:00:19.0 enp0s25: changing MTU from 1500 to 576
1352:[  846.330929] e1000e 0000:00:19.0 enp0s25: changing MTU from 576 to 1500
1353:[  848.077186] e1000e: enp0s25 NIC Link is Up 100 Mbps Full Duplex, Flow Control: Rx/Tx
1354:[  848.077189] e1000e 0000:00:19.0 enp0s25: 10/100 speed: disabling TSO
1356:[  856.540037] e1000e 0000:00:19.0 enp0s25: changing MTU from 1500 to 576
1357:[  856.684272] e1000e 0000:00:19.0 enp0s25: changing MTU from 576 to 1500
1358:[  858.430543] e1000e: enp0s25 NIC Link is Up 100 Mbps Full Duplex, Flow Control: Rx/Tx
1359:[  858.430546] e1000e 0000:00:19.0 enp0s25: 10/100 speed: disabling TSO
1361:[  864.099159] e1000e 0000:00:19.0 enp0s25: changing MTU from 1500 to 576
1362:[  864.243408] e1000e 0000:00:19.0 enp0s25: changing MTU from 576 to 1500
1372:[  865.989550] e1000e: enp0s25 NIC Link is Up 100 Mbps Full Duplex, Flow Control: Rx/Tx
1373:[  865.989551] e1000e 0000:00:19.0 enp0s25: 10/100 speed: disabling TSO

BTW: e1000e is loaded at boot.
Any ideas?

Edit: Changed subject and corrected typo


Last edited by naga jolokia on Mon Dec 30, 2013 7:34 pm; edited 4 times in total
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10157
Location: Somewhere over Atlanta, Georgia

PostPosted: Sat Dec 28, 2013 6:49 pm    Post subject: Reply with quote

Do you have a net.enp0s25 symlink in /etc/init.d/?

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
naga jolokia
n00b
n00b


Joined: 28 Dec 2013
Posts: 10
Location: Berlin

PostPosted: Sat Dec 28, 2013 7:11 pm    Post subject: Reply with quote

John R. Graham wrote:
Do you have a net.enp0s25 symlink in /etc/init.d/?

- John

I had one for net.eth0. Just added one for net.enp0s25 which didn't change anything. After removing the link for net.eth0 (keeping the net.enp0s25) the device appeared in ifconfig immediately at first time dhcpcd was executed and received an IP adress. No killing dhcpcd nessecary. But the IP didn't appear in ifconfig and the network remains unreachable when pinging my own NIC.
Back to top
View user's profile Send private message
naga jolokia
n00b
n00b


Joined: 28 Dec 2013
Posts: 10
Location: Berlin

PostPosted: Sun Dec 29, 2013 7:23 pm    Post subject: Reply with quote

I configured an IP adress manually in /etc/conf.d/net
Code:
config_enp0s25="192.168.1.100 netmask 255.255.255.0"
routes_enp0s25="default via 192.168.1.1"
and after /etc/init.d/net.enp0s25 restart I could use the network and the adress is shown in ifconfig output. So the NIC and e1000e module work fine. Something is wrong with dhcpcd.
Behaves like in start post. When started it fetches a dhcp lease with adress 192.168.1.101 but in ifconfig's output it stays on 192.168.1.100, the manualy configured one.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6737
Location: Blighty

PostPosted: Sun Dec 29, 2013 8:16 pm    Post subject: Reply with quote

naga jolokia wrote:
Something is wrong with dhcpcd.


No, something is wrong with your kernel driver.
dhcpcd gets a DHCP lease time, but with an MTU to use from the DHPC server.
When dhcpcd sets the requested MTU your kernel driver resets the PHY which causes the carrier to drop and dhcpcd starts over again.

You have a few solutions
1) Get a different NIC
2) Fix the kernel driver
3) Stop requesting an MTU in dhcpcd.conf - however there equally must have been a good reason why the DHCP server wants to assign you that MTU
4) Accept that the kernel driver will reset the PHY on MTU change and instruct dhcpcd to ignore all carrier events for your interface.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
BobWya
Apprentice
Apprentice


Joined: 12 Aug 2012
Posts: 227
Location: Cambridge,UK

PostPosted: Mon Dec 30, 2013 3:27 am    Post subject: Re: Strange dhcpcd behaviour Reply with quote

naga jolokia wrote:

Code:

gentux2 ~ # grep -e e1000e -e eth0 /media/raina/c494f7d7-8332-4043-9b84-2f75487dab45/dmesg.txt
[   14.397352] e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k
[   14.397354] e1000e: Copyright(c) 1999 - 2013 Intel Corporation.
[   14.397443] e1000e 0000:00:19.0: setting latency timer to 64
[   14.397489] e1000e 0000:00:19.0: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode
[   14.397507] e1000e 0000:00:19.0: irq 44 for MSI/MSI-X
[   14.565207] e1000e 0000:00:19.0 eth0: registered PHC clock
[   14.565210] e1000e 0000:00:19.0 eth0: (PCI Express:2.5GT/s:Width x1) 00:22:4d:a9:f2:49
[   14.565211] e1000e 0000:00:19.0 eth0: Intel(R) PRO/1000 Network Connection
[   14.565258] e1000e 0000:00:19.0 eth0: MAC: 11, PHY: 12, PBA No: FFFFFF-0FF
[   14.630293] systemd-udevd[2556]: renamed network interface eth0 to enp0s25

BTW: e1000e is loaded at boot.
Any ideas?


Not to sure I can offer any sage advice... But I use systemd as an init system on all my Gentoo installs (and have done for sometime now)... Couldn't be a clash of init systems going on there?? Especially if you are chroot'd in from a Sabayon iso (which now uses systemd by default). There must be some kind of systemd shim to interface with that version of udev you are working with... Have you got multiple network service running together at once perhaps? It's a bit suspect that your interface got named from a "user friendly" name back to the kernel auto-generated name...

Just a thought anyway! 8O

Bob
Back to top
View user's profile Send private message
naga jolokia
n00b
n00b


Joined: 28 Dec 2013
Posts: 10
Location: Berlin

PostPosted: Mon Dec 30, 2013 12:00 pm    Post subject: Reply with quote

I copied the sabayon kernel, modules and initrd to the hard disk and booted Gentoo with them. Same result. Doesn't seem that the e1000e module is broken as this one runs without any problems on Sabayon.

On the Sabayon live system the device is named eth0. Killing and restarting dhcpcd on Sabayon works fine without any MTU issues. So the router shouldn't be responsible for the problem.

As far as I understand udev should be responsible for the renaming of eth0 to enp0s25. I'm not very used to udev rules, so I tried copying Sabayon's whole /lib64/udev directory to the gentoo installation. Same result. Also tried with the /sbin/dhcpcd binary if this one is broken. Nope. Nothing changed. Running Sabayon's dhcpcd binary the device is still renamed to enp0s25, gets its IP adress but ifconfig doesn't know about it and the network remains unreachable.

I don't get the point why the way the system is started should be responsible for this behaviour, because when I kill dhcpcd from the running system and start it again it's the binary /sbin/dhcpcd which is executed. So why should it be an init.d vs. systemd problem?

What else can I try?
Back to top
View user's profile Send private message
ulenrich
Veteran
Veteran


Joined: 10 Oct 2010
Posts: 1371

PostPosted: Mon Dec 30, 2013 4:04 pm    Post subject: Reply with quote

Look at the second parameter on my grub kernel cmdline:
Code:
# cat /proc/cmdline
init=/sbin/systemd net.ifnames=0 root=/dev/sda7


Alternatively put an empty file:
Code:
# cat /etc/udev/rules.d/80-net-name-slot.rules
# none

_________________
fun2gen2
Back to top
View user's profile Send private message
naga jolokia
n00b
n00b


Joined: 28 Dec 2013
Posts: 10
Location: Berlin

PostPosted: Mon Dec 30, 2013 7:33 pm    Post subject: Reply with quote

ulenrich wrote:
Code:
... net.ifnames=0 ...

That's the solution! Thank you very much. Works with the Sabayon and the 3.12.6 Gentoo kernel.
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