Vanfanel
Posts: 428
Joined: Sat Aug 18, 2012 5:58 pm

No connection until I do a PING, with Pi3+ (doesn't happen in Pi3)

Wed Jul 11, 2018 11:46 pm

Hi there,

I have been using my Pi3 happily for years now. Then I recently decided to update some projects to Pi3b+ boards in search of that small CPU power advantage, but I am finding a very annoying problem regarding ethernet connection. I am using the same sd card on both the Pi3 and the Pi3b+.

I have already updated the Raspbian system to the latest stable versions of the firmware and kernel before coming here to ask for help, by doing:

Code: Select all

sudo apt update && sudo apt full-upgrade -y

So, the problem is as follows.
The network connection on my Pi systems is NOT managed by systemd, instead it's manually configured by me with this simple sequence of commands in a bash script I run whenever I need to access the board via ssh, etc. No X server or networking services are active. Just simple manual configuration like this:

Code: Select all

# Up with the ethernet and ssh!
sudo ifconfig eth0 up
sudo ip addr add 192.168.5.8/24 dev eth0
sudo ip route add default via 192.168.5.7
sudo /etc/init.d/dropbear start > /dev/null 2>&1
It works perfectly well on the Pi3, and apparently it works too on the Pi3b+, but the problem is that I can't access the Pi3b+ via ssh after this. In fact, I can't even ping to it's IP address! Of course, I can ping and access the Pi3 after running the same exact sequence with no problems whatsoever. Only the Pi3b+ is giving me this problem.

And now for the funny part: If I ping the PC from the Pi3b+, then I can ping the Pi3+ from the PC back!!!
That's crazy, I know. Never encountered anything like this before. It's as if pinging from the Pi3b+ would be activating something that does not need to be activated on a plain Pi3...
Any idea on what's going on here?

NOTE: I am using the vc4 plan kms overlay. I don't think it's related, but.. just in case.
Last edited by Vanfanel on Thu Jul 12, 2018 6:22 pm, edited 1 time in total.

User avatar
DougieLawson
Posts: 33637
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Strange ethernet problem with Pi3+ (doesn't happen in Pi3)

Thu Jul 12, 2018 7:33 am

Are you assigning the same IP address to both machines? That WILL cause an addressing conflict and neither machine will work.

Why not use static address reservation in your router? Most modern routers have that as an option in their advanced network setup pages. You assign an IP address to a specific MAC address.

Or do the static stuff in /etc/dhcpcd.conf like everyone else does. Theres a simple example in there.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

Vanfanel
Posts: 428
Joined: Sat Aug 18, 2012 5:58 pm

Re: Strange ethernet problem with Pi3+ (doesn't happen in Pi3)

Thu Jul 12, 2018 9:18 am

@DougieLawson: Assigning the same IP on both machines? No, of course not. They have been 192.168.5.7 (Laptop PC running Lubuntu GNU/Linux) and 192.168.5.8 (Raspberry Pi) for years.

Also, there's no router involved here. I am talking about direct PC<->Pi ethernet cable connection. It has been working for years. In fact, it DOES work, except that I have to ping the PC from the Pi3b+ to "wake up" the connection, which is VERY strange and I need to fix.

About /etc/dhcpcd.conf, I don't want or need a DHCP server working: never needed it. What I am doing is very simple, and in fact whatever other solution is doing the same under the hood.

pcmanbob
Posts: 4270
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Strange ethernet problem with Pi3+ (doesn't happen in Pi3)

Thu Jul 12, 2018 11:23 am

DHCP and dhcpcd.conf are 2 different things, note the extra "cd " in the second one.

dhcpcd.cong is were the static IP in now set up on a pi.

example of contents dhcpcd.conf

Code: Select all


# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.

# Allow users of this group to interact with dhcpcd via the control socket.
#controlgroup wheel

# Inform the DHCP server of our hostname for DDNS.
hostname

# Use the hardware address of the interface for the Client ID.
clientid
# or
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
# Some non-RFC compliant DHCP servers do not reply with this set.
# In this case, comment out duid and enable clientid above.
#duid

# Persist interface configuration when dhcpcd exits.
persistent

# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit

# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Most distributions have NTP support.
option ntp_servers
# Respect the network MTU. This is applied to DHCP routes.
option interface_mtu

# A ServerID is required by RFC2131.
require dhcp_server_identifier

# Generate Stable Private IPv6 Addresses instead of hardware based ones
slaac private

# Example static IP configuration:
interface eth0
static ip_address=192.168.1.17/24
#static ip6_address=fd51:42f8:caae:d92e::ff/64
static routers=192.168.1.1
static domain_name_servers=192.168.1.251

# It is possible to fall back to a static IP if DHCP fails:
# define static profile
#profile static_eth0
#static ip_address=192.168.1.23/24
#static routers=192.168.1.1
#static domain_name_servers=192.168.1.1

# fallback to static profile on eth0
#interface eth0
#fallback static_eth0
Remember we want information.......................no information no help
The use of crystal balls & mind reading is not supported

Vanfanel
Posts: 428
Joined: Sat Aug 18, 2012 5:58 pm

Re: Strange ethernet problem with Pi3+ (doesn't happen in Pi3)

Thu Jul 12, 2018 1:01 pm

pcmanbob wrote:
Thu Jul 12, 2018 11:23 am
DHCP and dhcpcd.conf are 2 different things, note the extra "cd " in the second one.

dhcpcd.conf is were the static IP in now set up on a pi.
Dhcpcd is a dhcp client. I don't need it to have a static IP on my GNU/Linux systems. I believe you are trying to help, and I thank you for that, but pointing me to a service that is not going to run on my system to do something I can do manually using my own, basic scripts, does not help.

In fact, the way I do it, it's supposed to work on ANY GNU/Linux system. And it does. That's not the problem.

Return to “Troubleshooting”

Who is online

Users browsing this forum: No registered users and 28 guests