Network connection not working after installing OpenWrt


So im new to using openwrt but when install it i cant get my network to work
I have 2 router with config being (primary) - lan port > (secondary) - wan port
but when i instaled the openwrt on the seconary router i cant get it to work
the stranje thing is i can get the wifi to work when i put in on the wan side of the secondary

root@OpenWrt:~# ubus call system board; \
> uci export network; uci export wireless; \
> uci export dhcp
	"kernel": "4.9.243",
	"hostname": "OpenWrt",
	"system": "Atheros AR9330 rev 1",
	"model": "TP-Link TL-WR740N\/ND v4",
	"board_name": "tl-wr741nd-v4",
	"release": {
		"distribution": "OpenWrt",
		"version": "18.06.9",
		"revision": "r8077-7cbbab7246",
		"target": "ar71xx\/tiny",
		"description": "OpenWrt 18.06.9 r8077-7cbbab7246"
package network

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr ''
	option netmask ''

config globals 'globals'
	option ula_prefix 'fd2a:feb3:4719::/48'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth0.1'
	option proto 'static'
	option ipaddr ''
	option netmask ''
	option ip6assign '60'

config interface 'wan'
	option proto 'static'
	option ipaddr ''
	option netmask ''
	option gateway ''
	option type 'bridge'
	option ifname 'eth1'

config interface 'wan6'
	option ifname 'eth1'
	option proto 'dhcpv6'
	option type 'bridge'

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

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option ports '0t 1 2 3 4'
	option vid '1'

config interface 'wwan'
	option proto 'static'
	option ipaddr ''
	option netmask ''
	option gateway ''
	option dns ''
	option type 'bridge'

package wireless

config wifi-device 'radio0'
	option type 'mac80211'
	option hwmode '11g'
	option path 'platform/ar933x_wmac'
	option legacy_rates '1'
	option country 'BG'
	option channel 'auto'
	option htmode 'HT40'

config wifi-iface
	option device 'radio0'
	option mode 'sta'
	option ssid 'XXXXXXXX'
	option ifname 'wireless_wan'
	option encryption 'psk-mixed'
	option key 'XXXXXXXX'
	option network 'wwan'
	option wds '1'

config wifi-iface
	option device 'radio0'
	option mode 'ap'
	option wds '1'
	option ssid 'XXXXXXXX'
	option encryption 'psk-mixed'
	option key 'XXXXXXXX'
	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/'
	option nonwildcard '1'
	option localservice '1'

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option dhcpv6 'server'
	option ra 'server'

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'

Do you really want an additional NAT on the secondary router or do you want to extend your WiFi range? If it is the latter, you should connect the devices LAN-LAN and disable the DCHP server and other services on your secondary router. In this case, have a look at the following Wiki article:

That said, your configuration for wan doesn't look right.

  • Did you remove the VLAN config for wan?
  • Why is wan configured on eth1? Does this interface even exist?
  • Why is wan type bridge?

The wan and wwan have the same IP, which can be problematic when both are up.
But your version is old and unsupported, so there is not much to troubleshoot.

The default OpenWrt configuration, after changing the lan IP to a non conflicting, can work in your setup by connecting the cable from wan to the upstream router lan port and let it get the settings by dhcp.

Sadly, this is a 4/32 device where 18.06 is the latest available version.

Understood, still this is quite a simple configuration and as soon as you change the lan IP, the default configuration will work.

1 Like

Which router is this config from? It will not work to have exactly the same config in both.

It's important that the lan and wan are always different subnets. All the subnets in the house should be different, including the one from the ISP modem.

Since this is 18.06, it uses the old bridge syntax. But if you want to make wan a bridge, put option bridge in only on one of wan or wan6, not both.

1 Like

The problem is it dosent work no mater what i tried using only wwan with nothing in the wan port didunt work i tried the reverse it dosent work too, i tried factory reseting 6times still the wan/wwan to lan dosent work

Im out of ideas from what i will be i dosent change anything in the firewall except allowin trafik from wan to lan

My subnet from my isp router is
As it shoud - it cant be changed bc of them being ****

You don’t have dns in your wan configuration.

Test to see if you can ping an ip address ( If that works but pinging a domain fails, it’s just a dns problem.

Factory reset, run this code snippet to change the lan IP

uci set network.lan.ipaddr=''
uci commit
ifup lan

and then connect from wan to the upstream router. Verify that it works, lan hosts can connect to the internet. If it doesn't post the following:

Please run the following commands (copy-paste the whole block) and paste the output here, using the "Preformatted text </> " button:
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; \
head -n -0 /etc/firewall.user; \
ip -4 addr ; ip -4 ro li tab all ; ip -4 ru; \
ls -l  /etc/resolv.* /tmp/resolv.* /tmp/resolv.*/* ; head -n -0 /etc/resolv.* /tmp/resolv.* /tmp/resolv.*/*

Okay some how i tried factory reseting one Last time and some how worked the router setup evrything by defalt the only thing i cant get to work is the wwan

(and i need that bc i have a setup where router from another isp wich is in my neighbors, and has set up to exclude my mac address in to the neighbors isp and it work while im conecting from my pc i can get to the isp network and have internet and i want the client to be the router, if sombodey can give me a step by step tutorial where i get a wwan to work with a sepparete wwan firewall zone it will be great)

And somthing i will want to do is setup 2ports from the one isp and 2 from the another with vlan tags i think is what i need but idk how to set it up corectly without breacing evrything like the last times

If you want the equivalent of two routers working in parallel in one box, you need either policy based routing or manually set up multiple routing tables.

1 Like

I want just to be able to have some what relible conection and that for the 2 by 2 if is too complicated i will probably skip it xD
But is good to know how to do it

You need to do uplink failover (or load balancing) and you'd need mwan3 package.

Okay but how to set it up in a way that wwan can be used as upstream i managed to do it when i disconected the network cable from the wan and it become the wwan but i did not have acsess to internet is there somthing that im mising i replicated the wan port setup but for the wwan

Is this the main router or the secondary one? Forget the secondary router for now until you understand how WAN connections work. In the default setting where wan is a DHCP client and wwan was set up using the Join button on the wireless scan page, it will just work. This is mostly because as DHCP clients, wan loses its IP address with no cable connected, and similarly wwan loses its IP if the wifi link is disabled or down. If you set a static IP on wan (not recommended) then it will conflict with wwan while the cable is unplugged.

I alredy made that mistake and learned that, the solutions was to just tell the dhcp server to set static ip

But for the wwan conection if i leave it to make it by the button it will not work for me becuse i need it to be in a separte firewall zone somthing thats not done automaticly by the buton

And as i mentioned i will use it with two internet service providers so i really need to sepparete them and if posible to vlan tag the ports in a way that 1,2 ports are for the furst isp,and the 3,4 are for the second with bouth having acsess to the router settings and open wrt dashboard, but not enabling them to mesh with one another

With the Isp router2 having the abilty to copletly redirect my router mac adress to the isp2 network and is like its directly conected to the isp2 network

I found this Problem setting up 2 ISPs with respective WLAN for each one
but there the second wan is wired

You need to do Policy Based Routing and you have 3 options:

  1. mwan3 package
  2. pbr package
  3. a set of rules/routes for each internet connection.
    The other thing is to split the lan ports into two interfaces.
    But you won't be able to achieve these things with a 4/32 device, nor with 18.06 fw.

After i bricked the TL-WR740N (at least i was thinking i bricked it) I boght a Archer A5 wich is much better but i cant find a version of openwrt that is recent for that device the only thing i find it will probably be compatqble is the Archer C50 but its latest version is 19 and there will be not much difrence i think

You have a tendency to go for the low end models and eventually you'll be complaining why your connection is slow.