Device can be pinged only from some devices on network

Hello, I have set up a new openwrt router (22.03) on a TP Link Archer A7. I have several devices connected via lan over BT powerline adapters. For internet connection wan is connected to a BT Smarthub 2 as a DHCP client.

The strange behaviour is that I have one device (a reolink IP camera) that appears to connect successfully to the network (as in it is assigned an IP address) however the device can only be accessed from other devices that are connected via the powerline adapters.

Some examples:

  • From my PC (connected via powerline) I can ping the camera
  • From the openwrt router I can't ping the camera
  • From a wifi connected device (so not powerline) I can't ping the camera
  • The camera itself does not seem able to access the internet (tricky to test but ntp time syncs seem to fail).

Everything worked correctly when using the Smarthub on its own.

Config

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fdcc:0c3a:ffeb::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth0.1'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ipaddr '192.168.0.1'

config device
        option name 'eth0.2'
        option macaddr '3c:84:6a:3b:d7:5a'

config interface 'wan'
        option device 'eth0.2'
        option multicast '1'
        option proto 'dhcp'

config interface 'wan6'
        option proto 'dhcpv6'
        option reqaddress 'try'
        option reqprefix 'auto'
        option device 'eth0.2'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0t 2 3 4 5'
        option vid '1'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '0t 1'
        option vid '2'

The only logs related to the IP address are the following:

Sun Jun  4 14:46:57 2023 daemon.info dnsmasq-dhcp[1]: DHCPDISCOVER(br-lan) 172.16.25.27 ec:71:db:4e:60:18
Sun Jun  4 14:46:57 2023 daemon.info dnsmasq-dhcp[1]: DHCPOFFER(br-lan) 192.168.0.132 ec:71:db:4e:60:18
Sun Jun  4 14:47:00 2023 daemon.info dnsmasq-dhcp[1]: DHCPREQUEST(br-lan) 192.168.0.132 ec:71:db:4e:60:18
Sun Jun  4 14:47:00 2023 daemon.info dnsmasq-dhcp[1]: DHCPACK(br-lan) 192.168.0.132 ec:71:db:4e:60:18 Garage
Sun Jun  4 14:47:30 2023 daemon.info dnsmasq-dhcp[1]: DHCPDISCOVER(br-lan) 172.16.25.254 ec:71:db:4e:60:18
Sun Jun  4 14:47:30 2023 daemon.info dnsmasq-dhcp[1]: DHCPOFFER(br-lan) 192.168.0.132 ec:71:db:4e:60:18
Sun Jun  4 14:47:33 2023 daemon.info dnsmasq-dhcp[1]: DHCPDISCOVER(br-lan) 172.16.25.254 ec:71:db:4e:60:18
Sun Jun  4 14:47:33 2023 daemon.info dnsmasq-dhcp[1]: DHCPOFFER(br-lan) 192.168.0.132 ec:71:db:4e:60:18
Sun Jun  4 14:47:33 2023 daemon.info dnsmasq-dhcp[1]: DHCPREQUEST(br-lan) 192.168.0.132 ec:71:db:4e:60:18
Sun Jun  4 14:47:33 2023 daemon.info dnsmasq-dhcp[1]: DHCPACK(br-lan) 192.168.0.132 ec:71:db:4e:60:18 Garage

Which repeat occasionally.

In addition to pinging things like the web interface of the camera are also only accessible from devices directly connected to the powerlines.

Would appreciate any advice on how to debug this?

Thanks!

Can you draw a diagram of your network topology? A photo of a sketch on paper is sufficient.

Here's an attempt:

Let me know if there's any detail that I've missed that would be useful!

I'm confused about why you're seeing two entirely different subnets here, but it brings up a question...

Did you recently add the A7 to the equation? I'm guessing that you did, and that all of the devices on your network previously had an address in the 172.16.25.0/24 subnet. They will continue to hold those addresses until they are forced to renew their DHCP leases (assuming they are DHCP clients). Depending on the length of the previous leases, it may be a while before this is organically resolved. As long as some devices are holding addresses in a different network, those devices will be unable to access the internet and will not be able to be reached by devices with addresses in the 192.168.0.0/24 network.

If my theory is correct, you can force-resolve the issue by power cycling all of devices. Hopefully they should all have an address on the correct network after they come back up. Further, you should verify that none of your devices are setup with static IP addresses (i.e. manually assigned static IPs) -- if so, they will persist with an incorrect network configuration.

1 Like

The previous network was on 192.168.1.* and I have done a few rounds of power cycling. I can't explain the 172address though. Is that the mac address following it suggesting that its the same device for both of those log entries?

Is there another DHCP server active on the network somewhere? Are the powerline devices purely bridge devices, or do they have some additional functionality?

One way you can test is to unplug the A7 and force a computer to renew its DHCP lease.

DHCP response received from the neighbours over the powerline?

As far as I know the BT Powerlink adapters are purely bridge devices. I can see in the web UI of the camera the IP address it has (192.168.0.132) and I can see in the OpenWRT ui the ip address that the router thinks it has (the same) so it suggests that that part of the communication worked at least.

I will still try renewing another device with the A7 off shortly to see what happens.

There is no need to switch A7 off, just disconnect your top powerline adapter from the router.

I did as AndrewZ suggested and the DHCP renewal failed on my Windows PC:

An error occurred while renewing interface Ethernet : unable to contact your DHCP server. Request has timed out.

Where was the computer connected? And have you verified that the server running a DHCP server (since this is on port 2 of your A7, disconnecting port 1 would isolate it from the rest of the network).

I unplugged the ethernet cable from port 1 of the A7, isolating the entire powerline network, and then attempted to renew dhcp on the pc (only connected to powerline).

Ok... so can you connect your server to the powerline network and repeat the experiment?

1 Like

Connected server to powerline and disconnected openwrt router from powerline and the windows pc again failed to renew.

Now that the server is connected via powerline I tried pinging the camera from the server, but it still fails even with them both on the powerline network.

Well, assuming that the camera and the server both have addresses on the same network, the problem can be clearly demonstrated to be unrelated to OpenWrt. It is either your camera or the powerline system that is causing the issue.

1 Like

Yep! I just went around turning things on and off and it I think it is actually a smart plug in the same room thats causing interference on the power line. When its off the camera is pingable.

Thank you for helping me narrow it down, and sorry if it should have been more obviously a hardware issue. I think it was just an unfortunate coincidence that I turned the smart plug on not very long before adding the router.

Glad you found it!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.