Home
Raspberry PI not connecting to network on boot
Raspberry Pi (Config) Wednesday, 05 August 2020 by paul

Recently saw an issue with a Rasperry Pi not connecting to the network on boot or reboot. Needed a hard reset to get it to connect to the network.

Running command: dmesg | grep "Link is Up"

Returned: [   13.353678] bcmgenet fd580000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx

This shows the Pi has connect to the network using it's ethernet port, speed 1Gb and flow control on. It is actually connected to a 100Mb switch so has not negotiated the correct speed for the port. This results in the Pi being unable to access the network.

It is possible to disable auto negotiation and set the correct speed manually using the command below:

ethtool -s eth0 autoneg off speed 100 duplex full

Now the Pi can access the network fine. It is possible to add this to the Pi startup using the process below:

    1. Enter command: sudo nano /etc/init.d/autoneg

    2. Enter script text:

#!/bin/bash
/sbin/ethtool -s eth0 autoneg off speed 100 duplex full
exit

    3. Save and exit Nano (ctrl+x)

    4. Enter command: sudo chmod a+x /etc/init.d/autoneg

Then the script will be automatically executed whenever the Pi is started.


Add Comment
No Comments.