Successfully connected Pi to Wi-Fi but it still cannot connect to the internet

ifconfig:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 169.254.145.254  netmask 255.255.0.0  broadcast 169.254.255.255
        inet6 fe80::e8ff:3d2d:9477:1dc4  prefixlen 64  scopeid 0x20<link>
        ether e4:5f:01:d6:36:89  txqueuelen 1000  (Ethernet)
        RX packets 312  bytes 29153 (28.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 85  bytes 15113 (14.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

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 1000  (Local Loopback)
        RX packets 129  bytes 12790 (12.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 129  bytes 12790 (12.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.52  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::2d08:4e44:792e:3259  prefixlen 64  scopeid 0x20<link>
        ether e4:5f:01:d6:36:8a  txqueuelen 1000  (Ethernet)
        RX packets 12  bytes 816 (816.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 170  bytes 18496 (18.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

route:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.1.1     0.0.0.0         UG    303    0        0 wlan0
link-local      0.0.0.0         255.255.0.0     U     202    0        0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U     303    0        0 wlan0

cat /etc/resolv.conf:

# Generated by resolvconf
nameserver 8.8.8.8
nameserver 8.8.4.4

traceroute 1.1.1.1:

traceroute to 1.1.1.1 (1.1.1.1), 30 hops max, 60 byte packets
 1  192.168.1.52 (192.168.1.52)  3139.068 ms !H  3138.898 ms !H  3138.828 ms !H

Everything looks good except the traceroute 1.1.1.1. The first hop should be to 192.168.1.1.

In the ifconfig output, your eth0 interface has a 169.254.x.x address which means it attempted to contact a DHCP server and it failed. Your route output contains a link-local line that mine doesn't have.

Try sudo ifconfig eth0 down and then traceroute 1.1.1.1 and see if that makes any difference. Also, please post the contents of your /etc/dhcpcd.conf.

traceroute 1.1.1.1 after sudo ifconfig eth0 down

traceroute to 1.1.1.1 (1.1.1.1), 30 hops max, 60 byte packets
 1  192.168.1.52 (192.168.1.52)  1230.882 ms !H  1230.781 ms !H  1230.715 ms !H

dhcpcd.conf:

# 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
# Respect the network MTU. This is applied to DHCP routes.
option interface_mtu

# Most distributions have NTP support.
#option ntp_servers

# A ServerID is required by RFC2131.
require dhcp_server_identifier

# Generate SLAAC address using the Hardware Address of the interface
#slaac hwaddr
# OR generate Stable Private IPv6 Addresses based from the DUID
slaac private

# static IP configuration:
interface wlan0
static ip_address=192.168.1.52
static routers=192.168.1.1
static domain_name_servers=8.8.8.8 8.8.4.4

# 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

I'm running out of things to try... Last ditch attempt: https://www.howtoraspberry.com/2020/04/disable-ipv6-on-raspberry-pi/

Nothing. :confused:
Thanks for the effort though.

Are you using a private or a company network?

I have a stupid question... How are you capturing output from this RPi? I guess there is one more thing to try... remove the static IP address from dhcpcd.conf.

You said early on that things work with an ethernet connection so it might be useful to connect that way and do the ifconfig, route, cat /etc/resolv.conf, traceroute 1.1.1.1 so we can compare "working" output with the "non-working" output.

The next tool that might give us more information would be tcpdump. I don't think that is part of the base install. If not try the distructions in this link or google "raspberry pi tcpdump". We'll have to figure out what tcpdump commands to use.

I believe we know what the problem is (traceroute shows we are not communicating with the gateway) but the solution escapes us. There may be better places to ask for help.

private network.

Originally, I had been using my TV hooked up to the Micro-HDMI, but I got tired of plugging in my keyboard to the Pi itself and opted to disconnect the ethernet cable from my PC to my router and subsequently connected it from the Pi to my PC. Then, I just chose to use Wi-Fi on my PC.

ifconfig:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.175  netmask 255.255.255.0  broadcast 192.168.1.255
        ether e4:5f:01:d6:36:89  txqueuelen 1000  (Ethernet)
        RX packets 2424  bytes 578761 (565.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 901  bytes 274547 (268.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 469  bytes 625594 (610.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 469  bytes 625594 (610.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.200.5  netmask 255.255.255.0  broadcast 192.168.200.255
        ether e4:5f:01:d6:36:8a  txqueuelen 1000  (Ethernet)
        RX packets 12  bytes 1008 (1008.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 34  bytes 9299 (9.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

route:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         CR1000A.mynetwo 0.0.0.0         UG    202    0        0 eth0
default         192.168.200.1   0.0.0.0         UG    303    0        0 wlan0
192.168.1.0     0.0.0.0         255.255.255.0   U     202    0        0 eth0
192.168.200.0   0.0.0.0         255.255.255.0   U     303    0        0 wlan0

cat /etc/resolv.conf:

# Generated by resolvconf
domain mynetworksettings.com
nameserver 192.168.1.1
nameserver 192.168.200.1

traceroute 1.1.1.1:

traceroute to 1.1.1.1 (1.1.1.1), 30 hops max, 60 byte packets
 1  CR1000A.mynetworksettings.com (192.168.1.1)  1.270 ms  1.023 ms  1.058 ms
 2  lo0-100.WASHDC-VFTTP-377.verizon-gni.net (100.36.56.1)  3.116 ms  3.032 ms2.846 ms
 3  B3377.WASHDC-LCR-22.verizon-gni.net (100.41.205.130)  10.428 ms B3377.WASH-LCR-21.verizon-gni.net (100.41.203.76)  8.556 ms  8.487 ms
 4  * * *
 5  * * *
 6  173.245.63.243 (173.245.63.243)  3.675 ms 172.71.188.2 (172.71.188.2)  4.1 ms 172.70.172.2 (172.70.172.2)  3.942 ms
 7  one.one.one.one (1.1.1.1)  6.632 ms  5.189 ms  4.741 ms

OK I think I see the problem... You appear to have two DHCP servers so I'm guessing you have a modem/router from your ISP and a separate WiFi router that is connected to that, probably with an ethernet cable. The RPi's ethernet cable is connected to the ISP modem/router.

So effectively, you have two local area networks and they don't talk to each other. Once you have verified the configuration, I can help you reconfigure so you only have one.

Yes, so I have the Verizon router CR1000A that is my ISP router and then hooked up to that is a Synology router via an Ethernet cord connecting the two.

Then I have my computer hooked up to a LAN cable, connecting it to the Synology router. And the Pi hooked up directly to to the Verizon router. However when plugged into Ethernet, the wifi now comes from the Synology and that when it works. The 200.5 is address is assigned from my Synology router and the 1.52 assigned from the Verizon router.

Quick drawing to make it more clear:

Verizon β€”> Synology β€”> PC
Verizon (wireless) β€”> Pi (200.5)
Verizon β€”> Synology β€”> Pi (1.52)

If it does say β€œ(wireless)”, it’s wired.

It’s kinda weird that it is assigned a different address when wireless, even when I assigned the MAC address on the Verizon router, but it takes the assigned IP when wired through the Synology.

When I looked in the Synology settings, the router was set as a wired repeater.

Thanks again.

What is the model number of the Synology router? All the information I can find appears to show that they all have WiFi in them. Why aren't you connecting the Pi to that wireless?

If you want the PC and the Pi to talk to each other, they need to both be in the same netblock (192.168.1.0-192.168.1.255) which appears to be obtainable only with wires.

Both the Verizon router and the Synology router should have web pages. I'd like to see the WAN, LAN, and WiFi pages for both.

My configuration is similar in that I have an XFinity Router (with WiFi that is disabled) and a TP-Link Wireless router. I have, however, configured my TP-Link to be an access point instead of a router and the ethernet wire between it and the XFinity router is plugged into one of the TP-Link LAN ports (the WAN port is not used and the DHCP server in the TP-Link is disabled).

With this configuration, the XFinity router provides the (only) DHCP server and all of the computers, tablets, phones, smart switches, etc. are all in the same netblock and can talk to each other. I have an Ethernet switch connected to one of the XFinity router's LAN ports as well.

By going through two routers you are double-NATing (google that) and you don't need to. I think if you configure the Synology as an access point it may fix the problem.

The Synology Router is an RT2600ac. I try to connect to it wirelessly on the Synology router but it still assigns it the 192.168.200.5 address. Unless I connect to it wired, I do not get the 192.168.1.52 address. I attempted to assign 192.168.1.52 in the dhcpcd.conf file, but it wouldn't connect, despite portraying on the Pi that it had maintained that IP. I tried it using wireless on my computer as well.

Not entirely sure where the LAN and WAN pages are on the Synology or Verizon. I attached what I could find.


First question, why do you have the Synology router? Since the Verizon router has WiFi and Ethernet ports, you should be able to connect everything through it. Since I have a good reason for having my TP-Link WiFi router, I'm sure you have a good reason as well.

Do you have unique SSID (names) for each of your WiFi networks? This includes unique names for each band (i.e. Foo-2.4 and Foo-5.0 and Baz-2.4 and Baz-5.0).
Do you have a guest WiFi enabled on either router? Hopefully, they have SSID names that are also unique.

For your wired connections, please detail which ports on each router are connected to what port on which devices?

Both routers currently have DHCP servers enabled. One providing 192.168.1.x addresses and one providing 192.168.200.x addresses. Addresses assigned by each should be in the same netblock when attached with an Ethernet wire as when attached wirelessly. Please make sure you don't have any static IP address assignments in any device. We should be able to make this work with DHCP assigned addresses.

Looking at the manuals for both products (I assume Synology Router Manager 1.3). I would like you to reconfigure this router as an Access Point, Chapter 3.2. For my TP-Link, I had to move the ethernet cable from the WAN port to one of the LAN ports. The Synology manual doesn't say you need to do that.

The goal of this reconfiguration is to get all of your devices including the PC and the Pi on the same netblock. This will allow them to talk to each other. There should only be one DHCP server active and it should provide a gateway IP address and DNS server address(es) so that everyone can connect to the internet.

Other links I found:
https://global.synologydownload.com/download/Document/Hardware/HIG/Router/17-year/RT2600ac/enu/Syno_HIG_RouterRT2600ac_enu.pdf

https://scache.vzw.com/dam/support/pdf/user_guide/cr1000a-verizon-router-user-guide.pdf