Connectivty issues RPi4

Hi,

My current setup is:
Fiber Box -> RPI4 USB Dongle -> RPI4 -> Switch

Which has worked flawlessly. I was running out of room on the RPI4 this morning so I made a fresh install and never had an issue before, but I have tried to troubleshoot it for eight hours now, I still can't get connected to the internet.

If I take the ethernet cable from the Fiber box and plug it in to the switch I get connected.

I see that the WAN on RPI gets IP from my ISP in LuCi.

I have no idea what I should try, I've been fiddling around with DNS but can't seem to pinpoint the problem.

Let me know what you need to see and I will post it.

Appreciate the help!

Let’s see your config.

Please copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall
cat /etc/config/network
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 'fd66:2ea1:10df::/48'

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

config interface 'lan'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ipaddr '192.168.90.1'
        option device 'eth0'

config interface 'wan'
        option proto 'dhcp'
        option device 'eth1'

I am not using the wireless interface, but I will include it.

cat /etc/config/wireless
config wifi-device 'radio0'
        option type 'mac80211'
        option path 'platform/soc/fe300000.mmcnr/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
        option channel '36'
        option band '5g'
        option htmode 'VHT80'
        option disabled '1'
cat /etc/config/dhcp
config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option nonwildcard '1'
        option localservice '1'
        option ednspacket_max '1232'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'
        option ra 'server'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'

cat /etc/config/firewall
config defaults
        option syn_flood        1
        option input            ACCEPT
        option output           ACCEPT
        option forward          REJECT
# Uncomment this line to disable ipv6 rules
#       option disable_ipv6     1

config zone
        option name             lan
        list   network          'lan'
        option input            ACCEPT
        option output           ACCEPT
        option forward          ACCEPT

config zone
        option name             wan
        list   network          'wan'
        list   network          'wan6'
        option input            REJECT
        option output           ACCEPT
        option forward          REJECT
        option masq             1
        option mtu_fix          1

config forwarding
        option src              lan
        option dest             wan

# We need to accept udp packets on port 68,
# see https://dev.openwrt.org/ticket/4108
config rule
        option name             Allow-DHCP-Renew
        option src              wan
        option proto            udp
        option dest_port        68
        option target           ACCEPT
        option family           ipv4

# Allow IPv4 ping
config rule
        option name             Allow-Ping
        option src              wan
        option proto            icmp
        option icmp_type        echo-request
        option family           ipv4
        option target           ACCEPT

config rule
        option name             Allow-IGMP
        option src              wan
        option proto            igmp
        option family           ipv4
        option target           ACCEPT

# Allow DHCPv6 replies
# see https://github.com/openwrt/openwrt/issues/5066
config rule
        option name             Allow-DHCPv6
        option src              wan
        option proto            udp
        option dest_port        546
        option family           ipv6
        option target           ACCEPT

config rule
        option name             Allow-MLD
        option src              wan
        option proto            icmp
        option src_ip           fe80::/10
        list icmp_type          '130/0'
        list icmp_type          '131/0'
        list icmp_type          '132/0'
        list icmp_type          '143/0'
        option family           ipv6
        option target           ACCEPT

# Allow essential incoming IPv6 ICMP traffic
config rule
        option name             Allow-ICMPv6-Input
        option src              wan
        option proto    icmp
        list icmp_type          echo-request
        list icmp_type          echo-reply
        list icmp_type          destination-unreachable
        list icmp_type          packet-too-big
        list icmp_type          time-exceeded
        list icmp_type          bad-header
        list icmp_type          unknown-header-type
        list icmp_type          router-solicitation
        list icmp_type          neighbour-solicitation
        list icmp_type          router-advertisement
        list icmp_type          neighbour-advertisement
        option limit            1000/sec
        option family           ipv6
        option target           ACCEPT

# Allow essential forwarded IPv6 ICMP traffic
config rule
        option name             Allow-ICMPv6-Forward
        option src              wan
        option dest             *
        option proto            icmp
        list icmp_type          echo-request
        list icmp_type          echo-reply
        list icmp_type          destination-unreachable
        list icmp_type          packet-too-big
        list icmp_type          time-exceeded
        list icmp_type          bad-header
        list icmp_type          unknown-header-type
        option limit            1000/sec
        option family           ipv6
        option target           ACCEPT

config rule
        option name             Allow-IPSec-ESP
        option src              wan
        option dest             lan
        option proto            esp
        option target           ACCEPT

config rule
        option name             Allow-ISAKMP
        option src              wan
        option dest             lan
        option dest_port        500
        option proto            udp
        option target           ACCEPT


### EXAMPLE CONFIG SECTIONS
# do not allow a specific ip to access wan
#config rule
#       option src              lan
#       option src_ip   192.168.45.2
#       option dest             wan
#       option proto    tcp
#       option target   REJECT

# block a specific mac on wan
#config rule
#       option dest             wan
#       option src_mac  00:11:22:33:44:66
#       option target   REJECT

# block incoming ICMP traffic on a zone
#config rule
#       option src              lan
#       option proto    ICMP
#       option target   DROP

# port redirect port coming in on wan to lan
#config redirect
#       option src                      wan
#       option src_dport        80
#       option dest                     lan
#       option dest_ip          192.168.16.235
#       option dest_port        80
#       option proto            tcp

# port redirect of remapped ssh port (22001) on wan
#config redirect
#       option src              wan
#       option src_dport        22001
#       option dest             lan
#       option dest_port        22
#       option proto            tcp

### FULL CONFIG SECTIONS
#config rule
#       option src              lan
#       option src_ip   192.168.45.2
#       option src_mac  00:11:22:33:44:55
#       option src_port 80
#       option dest             wan
#       option dest_ip  194.25.2.129
#       option dest_port        120
#       option proto    tcp
#       option target   REJECT

#config redirect
#       option src              lan
#       option src_ip   192.168.45.2
#       option src_mac  00:11:22:33:44:55
#       option src_port         1024
#       option src_dport        80
#       option dest_ip  194.25.2.129
#       option dest_port        120
#       option proto    tcp

Everything looks fine here.

Have you you tried restarting the other components in the network (fiber box, APs/switches, computers) in addition to the pi?

Yeah, while troubleshooting I only have one device connected. Disconnected everything else.

Worth noting is I can not ping anything from the router. Google.com gives bad address for example.

Are you getting a valid IP address on the WAN?

what happens if you ping 8.8.8.8?

eth1 will not work without re-installing the driver for the adapter. Does ip link show show that you have an eth1, and it is linked?

2 Likes

I have a valid IP on WAN, yes. Called my ISP just to confirm it was from them too.

ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
^C
--- 8.8.8.8 ping statistics ---
208 packets transmitted, 0 packets received, 100% packet loss

Force quit it after two minutes.

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether e4:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
    link/ether e4:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff
5: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP qlen  1000
    link/ether 28:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff

Looking through the system log I find this, don't know if it's relevant.

Sat Sep  3 08:12:29 2022 daemon.notice netifd: wan (5649): udhcpc: sending renew to server XX.XX.XX.33
Sat Sep  3 08:12:29 2022 daemon.notice netifd: wan (5649): udhcpc: lease of XX.XX.XX.62 obtained from XX.XX.XX.33, lease time 900
Sat Sep  3 08:12:38 2022 daemon.err odhcpd[1074]: Failed to send to ff02::1%lan@eth0 (Network unreachable)
Sat Sep  3 08:12:54 2022 daemon.err odhcpd[1074]: Failed to send to ff02::1%lan@eth0 (Network unreachable)
Sat Sep  3 08:13:10 2022 daemon.err odhcpd[1074]: Failed to send to ff02::1%lan@eth0 (Network unreachable)
Sat Sep  3 08:13:26 2022 daemon.err odhcpd[1074]: Failed to send to ff02::1%lan@eth0 (Network unreachable)
Sat Sep  3 08:13:42 2022 daemon.err odhcpd[1074]: Failed to send to ff02::1%lan@eth0 (Network unreachable)
Sat Sep  3 08:13:58 2022 daemon.err odhcpd[1074]: Failed to send to ff02::1%lan@eth0 (Network unreachable)
Sat Sep  3 08:14:14 2022 daemon.err odhcpd[1074]: Failed to send to ff02::1%lan@eth0 (Network unreachable)
Sat Sep  3 08:14:30 2022 daemon.err odhcpd[1074]: Failed to send to ff02::1%lan@eth0 (Network unreachable)
Sat Sep  3 08:14:46 2022 daemon.err odhcpd[1074]: Failed to send to ff02::1%lan@eth0 (Network unreachable)
Sat Sep  3 08:15:02 2022 daemon.err odhcpd[1074]: Failed to send to ff02::1%lan@eth0 (Network unreachable)
Sat Sep  3 08:15:18 2022 daemon.err odhcpd[1074]: Failed to send to ff02::1%lan@eth0 (Network unreachable)
Sat Sep  3 08:15:34 2022 daemon.err odhcpd[1074]: Failed to send to ff02::1%lan@eth0 (Network unreachable)
Sat Sep  3 08:15:50 2022 daemon.err odhcpd[1074]: Failed to send to ff02::1%lan@eth0 (Network unreachable)
Sat Sep  3 08:16:06 2022 daemon.err odhcpd[1074]: Failed to send to ff02::1%lan@eth0 (Network unreachable)
Sat Sep  3 08:16:22 2022 daemon.err odhcpd[1074]: Failed to send to ff02::1%lan@eth0 (Network unreachable)
Sat Sep  3 08:16:38 2022 daemon.err odhcpd[1074]: Failed to send to ff02::1%lan@eth0 (Network unreachable)
Sat Sep  3 08:16:54 2022 daemon.err odhcpd[1074]: Failed to send to ff02::1%lan@eth0 (Network unreachable)
Sat Sep  3 08:17:00 2022 daemon.info dnsmasq[1]: read /etc/hosts - 4 addresses
Sat Sep  3 08:17:00 2022 daemon.info dnsmasq[1]: read /tmp/hosts/dhcp.cfg01411c - 1 addresses
Sat Sep  3 08:17:00 2022 daemon.info dnsmasq-dhcp[1]: read /etc/ethers - 0 addresses
Sat Sep  3 08:17:10 2022 daemon.err odhcpd[1074]: Failed to send to ff02::1%lan@eth0 (Network unreachable)
Sat Sep  3 08:17:26 2022 daemon.err odhcpd[1074]: Failed to send to ff02::1%lan@eth0 (Network unreachable)
Sat Sep  3 08:17:42 2022 daemon.err odhcpd[1074]: Failed to send to ff02::1%lan@eth0 (Network unreachable)

So, after some testing and looking at those error messages I tried to disable IPv6 in Network -> Interface -> Devices -> Configure both eth0 and eth1. Just uncheck the IPv6 box on both and it seems to work now.

Do you guys want some more log data if somebody else has a similar problem?

EDIT
Was a bit quick to say Hurray, still not working apparently…

Try instead:

option device 'br-lan'

900 seconds is a very short dhcp lease time (15 minutes).

Was it working for 15 minutes and then stopped??

Tried, no changes. I'll leave it on br-lan for now.

It was working long enough to update okpg list and download irqbalance and sqm. But then it died.

Anything I could try?

bad sd-micro?

Tried two different cards. Same problem.

Tried different builds(wulfys and offical) same problem.

What do the logs say?

logread -e udhcpc
Fri Sep 30 21:06:18 2022 daemon.notice netifd: wan (2236): udhcpc: started, v1.35.0
Fri Sep 30 21:06:18 2022 daemon.notice netifd: wan (2236): udhcpc: broadcasting discover
Fri Sep 30 21:06:20 2022 daemon.notice netifd: wan (2236): udhcpc: broadcasting select for XX.XX.XX.62, server XX.XX.XX.33
Fri Sep 30 21:06:20 2022 daemon.notice netifd: wan (2236): udhcpc: lease of XX.XX.XX.62 obtained from XX.XX.XX.33, lease time 900
Fri Sep 30 21:13:50 2022 daemon.notice netifd: wan (2236): udhcpc: sending renew to server XX.XX.XX.33
Fri Sep 30 21:13:50 2022 daemon.notice netifd: wan (2236): udhcpc: lease of XX.XX.XX.62 obtained from XX.XX.XX.33, lease time 900
Fri Sep 30 21:21:20 2022 daemon.notice netifd: wan (2236): udhcpc: sending renew to server XX.XX.XX.33
Fri Sep 30 21:21:20 2022 daemon.notice netifd: wan (2236): udhcpc: lease of XX.XX.XX.62 obtained from XX.XX.XX.33, lease time 900

Looks like the dhcp renew is successful.

Run a ping test to 8.8.8.8 and see what happens.