Hello everyone,
My first time to use OpenWrt, but I think my problem sits somewhere beyond being new here.
TL;DR: A PC connected to any LAN/WAN port of the MF283+ is not able to open GUI/LuCi or SSH or PING connection to 192.168.1.1. The same PC connecting over Wi-Fi connects just fine. First issue is, that no DHCP lease is issued, but even with a static IP address no connection is possible. The other way around is the same issue (the PC would answer a PING request, but never receives one).
I am running OpenWrt 22.03.0 r19685-512e76967f on a ZTE 283+ 3G/4G WLAN Router.
(Source)
I've used the Upgrade version from this site as described here by Lech Perczak.
After the first/initial installation I've tried to connect to LuCi on 192.168.1.1. Since no DHCP lease was issued, I've set up a static address in my PC and tried again without success.
A couple Google searches later I found a Filipino thread, that explained, that the network cable should be unplugged when the router is turned on and then it needs to be plugged in immediately once the boot finished.
Following that advice, I could successfully log in and set up my WLAN network. But soon I had to find out, that the communication over CABLE was impossible. Trying to find a fix, made me lose my wireless connection and I had to start over. You will find two sets of LAN and WLAN in my configuration. The second one is just the backdoor entry. Learned the hard way.
Let’s start with the configuration and then I'll describe my trails and errors.
(Please click for details.)
/etc/config/network
root@OpenWrt:/# 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 'fd21:ad7a:8d11::/48'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '6t 0 1 2'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '6t 3'
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0.1'
config interface 'lan'
option proto 'static'
option device 'br-lan'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option gateway '192.168.1.250'
list dns '8.8.8.8'
list dns '8.8.4.4'
config device
option name 'br-s_lan'
option type 'bridge'
list ports 'eth0.2'
config interface 's_lan'
option proto 'static'
option device 'br-s_lan'
option ipaddr '192.168.2.1'
option netmask '255.255.255.0'
/etc/config/wireless
root@OpenWrt:~# cat /etc/config/wireless
config wifi-device 'radio0'
option type 'mac80211'
option path 'platform/10180000.wmac'
option channel '1'
option band '2g'
option htmode 'HT20'
option cell_density '0'
option country 'TW'
config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid 'OpenWrt'
option encryption 'psk2'
option key '**secure_pass**'
config wifi-iface 'wifinet1'
option device 'radio0'
option network 's_lan'
option mode 'ap'
option ssid 'OpenWrt (System)'
option encryption 'psk2'
option key '**secure_pass**'
/etc/config/firewall
root@OpenWrt:~# cat /etc/config/firewall
config defaults
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
option synflood_protect '1'
config zone
option name 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 'lan'
config zone
option name 's_lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
list network 's_lan'
config zone
option name 'wan'
option output 'ACCEPT'
option forward 'REJECT'
option input 'REJECT'
option mtu_fix '1'
option masq '1'
list network 'wan6'
config forwarding
option src 'lan'
option dest 's_lan'
config forwarding
option src 'lan'
option dest 'wan'
config forwarding
option src 's_lan'
option dest 'lan'
config forwarding
option src 's_lan'
option dest 'wan'
config rule
option name 'Allow-DHCP-Renew'
option src 'wan'
option proto 'udp'
option dest_port '68'
option family 'ipv4'
option target 'ACCEPT'
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'
As you can see, it is a very standard configuration. I would like to point out, that Ports 1-3 are assigned to VLAN1 and only Port 4 is assigned to VLAN2. This is for test purposes, as described later. Also, the MF283+ doesn’t differentiate between LAN and WAN ports. The stock software uses Port 1 as LAN or WAN depending on the use MODE selected.
Here a little test setup:
PC1 is connected through an unmanaged switch to Port 1 of the box; PC2 is connected directly to Port 2; and PC3 is connected via WLAN. DHCP fails in both wired cases, so setting both PCs to static IPs (PC1: 192.168.1.11; PC2 192.168.1.12); PC3 got the IP 192.168.1.103 through a DHCP lease.
PING results: (details)
PC1
192.168.1.1 (OpenWrt)
192.168.1.12 (PC2)
192.168.1.103 (PC3)
PC2
192.168.1.1 (OpenWrt)
192.168.1.11 (PC1)
192.168.1.103 (PC3)
PC3
192.168.1.1 (OpenWrt)
192.168.1.11 (PC1)
192.168.1.12 (PC2)
OpenWrt | from device: br-lan
192.168.1.11 (PC1)
192.168.1.12 (PC2)
192.168.1.103 (PC3)
OpenWrt | from device: eth0
192.168.1.11 (PC1)
192.168.1.12 (PC2)
192.168.1.103 (PC3)
OpenWrt | from device: eth0.1
192.168.1.11 (PC1)
192.168.1.12 (PC2)
192.168.1.103 (PC3)
I believe this ping table gives a nice overview of what communication paths are available or not.
[Edit]: And now - for some reason (maybe reboot) - all communication via wired connection stopped. ping
only works on WLAN. [/Edit]
I was - however - wondering, if PC1 could communicate with PC2, if it was connected to Port 4 (VLAN2). I just wanted to check if VLAN actually worked or if the box simply turned into a hub. Like some kind of fallback behavior.
The result is, that VLAN is working fine and OpenWrt keeps them tidely separated.
PC1 <=> PC2 (original IP)
192.168.1.11 (PC1) => 192.168.1.12 (PC2)
192.168.1.12 (PC2) => 192.168.1.11 (PC1)
PC1 <=> PC2 (new/adjusted IP)
192.168.1.11 (PC1) => 192.168.2.12 (PC2)
192.168.2.12 (PC2) => 192.168.1.11 (PC1)
You might wonder if the gateway entry messes things up...
option gateway '192.168.1.250'
list dns '8.8.8.8'
list dns '8.8.4.4'
...but nope! Even without, still the same result. I’ve tried too often.
Changing the proto
doesn't help either, because...
option proto 'static'
option proto 'dhcp'
...even when I run a DHPC server on PC1 or PC2, it will never be able to see a request or offer/send a lease. And yes, I've tried.
Please help! I've searched and tried and nothing seems to fix the issue. I believe my configuration is fine.
If anyone can see my mistake or knows what the problem is or how to fix it, please be so kind to guide me. Even the slightest idea of a potential solution is welcome. I really run out of options/ideas at the moment.
Thank you and kind regards.