No internet connection on Omega2Pro wireless router setup

Hey everyone,

I am trying to setup a wireless router based on an Onion Omega2pro, but I can't get an IP address on the wan interface. A static address also didn't work, as no internet connection was established. My setup is as follows:
image
This is the output of cat 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 'fdb9:ba14:bada::/48'

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

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.80.1'
        option netmask '255.255.255.0'

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

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0 5t'

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

On the wireless side of things, all seems to be well, but here is the config anyway:

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

config wifi-iface 'default_radio0'
        option device 'radio0'
        option mode 'ap'
        option encryption 'psk2'
        option key 'xxx
        option ssid 'xxx'
        option network 'lan'

I am running openwrt 22.03, and I flashed it using this guide.
Any help is apreciated!

It is kinda expected not to work. Both wan and lan use the same physical port eth0.

It didn't help much, but yhea it was my bad, amidst all my retries I forgot to remove that port. Right now it looks like this:


But still no internet connection... I dont understand why wan interface isn't recieving IP address...

Please run the following commands (copy-paste the whole block) and paste the output 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; \
uci export network; uci export wireless; \
uci export dhcp; uci export firewall; \
ip -4 addr ; ip -4 ro li tab all ; ip -4 ru

Here is the output:

{
        "kernel": "5.10.176",
        "hostname": "xxx",
        "system": "MediaTek MT7688 ver:1 eco:2",
        "model": "Onion Omega2+",
        "board_name": "onion,omega2p",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "22.03.5",
                "revision": "r20134-5f15225c1e",
                "target": "ramips/mt76x8",
                "description": "OpenWrt 22.03.5 r20134-5f15225c1e"
        }
}
package 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 'fdb9:ba14:bada::/48'

config device
        option name 'br-lan'
        option type 'bridge'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.80.1'
        option netmask '255.255.255.0'

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

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0 5t'

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

package wireless

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

config wifi-iface 'default_radio0'
        option device 'radio0'
        option mode 'ap'
        option encryption 'psk2'
        option key 'xxx'
        option ssid 'Omega2Pro'
        option network 'lan'

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

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

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

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP qlen 1000
    inet 192.168.3.122/24 brd 192.168.3.255 scope global eth0
       valid_lft forever preferred_lft forever
4: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    inet 192.168.80.1/24 brd 192.168.80.255 scope global br-lan
       valid_lft forever preferred_lft forever
default via 192.168.3.1 dev eth0  src 192.168.3.122
192.168.3.0/24 dev eth0 scope link  src 192.168.3.122
192.168.80.0/24 dev br-lan scope link  src 192.168.80.1
broadcast 127.0.0.0 dev lo table local scope link  src 127.0.0.1
local 127.0.0.0/8 dev lo table local scope host  src 127.0.0.1
local 127.0.0.1 dev lo table local scope host  src 127.0.0.1
broadcast 127.255.255.255 dev lo table local scope link  src 127.0.0.1
broadcast 192.168.3.0 dev eth0 table local scope link  src 192.168.3.122
local 192.168.3.122 dev eth0 table local scope host  src 192.168.3.122
broadcast 192.168.3.255 dev eth0 table local scope link  src 192.168.3.122
broadcast 192.168.80.0 dev br-lan table local scope link  src 192.168.80.1
local 192.168.80.1 dev br-lan table local scope host  src 192.168.80.1
broadcast 192.168.80.255 dev br-lan table local scope link  src 192.168.80.1
0:      from all lookup local
32766:  from all lookup main
32767:  from all lookup default

For context, 192.168.3.0/24 is where i get my internet from, its my private subnet. 192.168.80.0/24 is the subnet for Wi Fi connections provided by this omega2pro.
192.168.3.1 is my gateway, and this subnet has dhcp range from 100-250.

That looks better.
What is not working now?

  1. Can a client connect by wifi?
  2. Does it get a valid address from 192.168.80.X with gateway and dns?
  3. Can you ping 1.1.1.1 from the router and a wifi client?
  4. Can you ping openwrt.org from the router and a wifi client?

Ok, this is strange but I swear I am not making this up...
So, when I replied to you, I had just started working on the router since yesterday. After I ran your commands, I did a 'ifconfig' command and noticed my eth0 interface FINNALY had an IP address assigned (which was not occuring yesterday) and now I have internet connection...
'ifconfig' command shows:

br-lan    Link encap:Ethernet  HWaddr xxx
          inet addr:192.168.80.1  Bcast:192.168.80.255  Mask:255.255.255.0
          inet6 addr: fe80::42a3:6bff:fecf:a4d5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:746 (746.0 B)

eth0      Link encap:Ethernet  HWaddr xxx
          inet addr:192.168.3.122  Bcast:192.168.3.255  Mask:255.255.255.0
          inet6 addr: fe80::42a3:6bff:fecf:a4d6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:10098 errors:0 dropped:23 overruns:0 frame:0
          TX packets:134 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1500893 (1.4 MiB)  TX bytes:11013 (10.7 KiB)
          Interrupt:5

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:42 errors:0 dropped:0 overruns:0 frame:0
          TX packets:42 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4353 (4.2 KiB)  TX bytes:4353 (4.2 KiB)

wlan0     Link encap:Ethernet  HWaddr xxx
          inet6 addr: fe80::42a3:6bff:fecf:a4d5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:1832 (1.7 KiB)

Yesterday, even after your advice to remove eth0 from lan interface, I didn't have connectivity...

Now that wan interface has an IP address from my private DHCP, I can verify all these points:

I don't understand how, but it's fixed!
Thank you for your time @trendy

1 Like

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