Ping: bad address 'openwrt.org'

Hi,

Keep receiving "Ping: bad address 'openwrt.org'" when trying to setup my BPI R64. I have trying putting the ip address of my main router and 1.1.1.1 in the Lan interface "Use custom DNS server" but nothing works.

I have setup the wifi interface too but can not access the pi through that either. Could that be causing the problem?

Edit:

Here is the result of the ping via Luci from the BPi to the main router using Diagnostics tool.

PING 192.168.1.1 (192.168.1.1): 56 data bytes
64 bytes from 192.168.1.1: seq=0 ttl=64 time=0.180 ms
64 bytes from 192.168.1.1: seq=1 ttl=64 time=0.146 ms
64 bytes from 192.168.1.1: seq=2 ttl=64 time=0.142 ms
64 bytes from 192.168.1.1: seq=3 ttl=64 time=0.143 ms
64 bytes from 192.168.1.1: seq=4 ttl=64 time=0.145 ms

--- 192.168.1.1 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 0.142/0.151/0.180 ms

Thanks,

Aaron

temp change LAN to DHCP client ?

or simply use the WAN port ?

No WAN just WWAN, what do mean by the temp change part?

device got more than one ethernet port, right ?
one of those will be configured as WAN.
or are you saying there's no wired upstream device ?

Ah! There is a WAN port but I am not using it.

then do use it.

2 Likes

Maybe it would be good to see the config:

Please connect to your OpenWrt device using ssh and 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:

ubus call system board
cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall

Just I get my laptop back from the repair shop openwrt start working correctly in regards to connectivity. Anyway here are the freshly installed version of those files.

root@OpenWrt:~# ubus call system board

{
        "kernel": "5.10.161",
        "hostname": "OpenWrt",
        "system": "ARMv8 Processor rev 4",
        "model": "Bananapi BPI-R64",
        "board_name": "bananapi,bpi-r64",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "22.03.3",
                "revision": "r20028-43d71ad93e",
                "target": "mediatek/mt7622",
                "description": "OpenWrt 22.03.3 r20028-43d71ad93e"
        }
}

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 'fde9:b639:d8cd::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'lan4'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'
        list dns '1.1.1.1'

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

config interface 'wan6'
        option device 'wan'
        option proto 'dhcpv6'

config interface 'wwan'
        option proto 'static'
        option device 'wlan0'
        option ipaddr '192.168.1.2'
        option netmask '255.255.255.0'
        option gateway '192.168.1.1'

wireless


config wifi-device 'radio0'
        option type 'mac80211'
        option path 'platform/18000000.wmac'
        option channel '1'
        option band '2g'
        option htmode 'HT20'
        option country 'AU'
        option cell_density '0'

config wifi-iface 'wifinet1'
        option device 'radio0'
        option mode 'sta'
        option network 'wwan'
        option ssid 'notshowingyouthis'
        option bssid '10:13:31:60:42:9B'
        option encryption 'psk2'
        option key 'notshowingyouthis'

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 dhcpv6 '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'

firewall

config defaults
        option syn_flood '1'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'REJECT'

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

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

config forwarding
        option src 'lan'
        option dest 'wan'

config rule
        option name 'Allow-DHCP-Renew'
        option src 'wan'
        option proto 'udp'
        option dest_port '68'
        option target 'ACCEPT'
        option family 'ipv4'

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'

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'

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'

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'

config zone
        option name 'wwan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'REJECT'
        list network 'wwan'

This version is eol and unsupported. You should upgrade to 23.05.

Remove this. It is unnecessary and conflicts with you lan interface. This will break routing

Change the network to lan

Delete this:

Then reboot and test again.

Can I upgrade to that version via Luci? The download img for the BPi64 of 23.05 is not playing well from a new install.

Yes, you can use the LuCI upgrade page (System > Backup / Flash Firmware > Flash new firmware image)

Download the sysupgrade file from the firmware selector page and go from there:
https://firmware-selector.openwrt.org/?version=23.05.5&target=mediatek%2Fmt7622&id=bananapi_bpi-r64

Thanks! For some reason the file download (in my case the .img had the expected size in
MB) but when I extracted the achive the size was 0 and hence luci and ssh fail when I tryed to log in to my BPi.

How did you came to invention to "extract" anything? You use unmodified sysupgrade file.

1 Like

Not sure what you mean?

Edit:

Oh! I had to redownload an old version first and install that from the web site. However, that is not working for some reason.

Can you elaborate on "installed" and "not working", without details those are meaningless.

1 Like

See the post above:

Edit:

frollic helped me solved the problem here:

if I change the "Name of the new network" from "wwan" to "lan" I receive "The network name is already used".

You misunderstood what I wrote... sorry if it wasn't entirely clear (as a function of the order of the comments and quotes...)

  • Remove the wwan network interface from /etc/config/network
  • change the network associated with the wifinet1 WiFi interface from wwan to lan in the /etc/config/wireless file.

Wireless

config wifi-device 'radio0'
	option type 'mac80211'
	option path 'platform/18000000.wmac'
	option channel '1'
	option band '2g'
	option htmode 'HT20'
	option country 'AU'
	option cell_density '0'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option ssid 'OpenWrt'
	option encryption 'none'
	option disabled '1'

config wifi-iface 'wifinet1'
	option device 'radio0'
	option mode 'sta'
	option ssid 'notshowingyouthis'
	option bssid '10:13:31:60:42:9B'
	option encryption 'psk2'
	option key 'notshowingyouthis'
	option network 'lan'

That looks better.

I can not access the rest of my network via the wwan just the lan interface thus I can not update nor install any software.