TP-Link TL-WR740N internet not working

What mechanism is used to access the Internet on the TP-Link TL-WR740N? I see that there is Internet on the WAN port, the LAN ports also work, but I do not have access to the Internet. Standard settings after firmware.

Welcome, tentakle.

Which OpenWrt release?
Which hardware revision?
This device has limited flash and RAM, please note the warning at the top of the device page.

How do you know that? Please show us the details.

From where? The router itself, or a PC connected to it?

Log in to the router, test your internet connection with the ping and nslookup tools and show us their output.
You can use the LuCI web interface (Network->Diagnostics) or the command line via SSH.

1 Like

TP-Link TL-WR740N v4.27

I tried different versions: 18.06.5 and 18.06.6
Used image builder and compiled openwrt-19.07.0-ath79-tiny-tplink_tl-wr740n-v4-squashfs-factory.bin version with LuCI and without LuCI. I also tried the ar71xx version.

The settings issued by the provider are the same as on the standard firmware https://imgur.com/a/jNfHt2k
I am connected via ethernet to a router that is connected via ethernet to a provider

So, like @mpa said, login to the router (via SSH or Luci) and try to ping some IP (e.g. 8.8.8.8) and some domain (e.g. Openwrt.org).

Also please send the output of the filling commands. Please use the Preformatted Text tool </> to include the code, and remember to redact your MAC addresses and any public IPs you may have

cat /etc/config/network 
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall

These are the standard settings after the firmware. I didn’t change anything.

root@OpenWrt:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
ping: sendto: Network unreachable
root@OpenWrt:~# ping openwrt.org
ping: bad address 'openwrt.org'
/etc/config/network

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

config globals 'globals'
	option ula_prefix 'fd06:efda:2f42::/48'

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

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

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

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

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option ports '1 2 3 4 0t'
/etc/config/wireless

config wifi-device 'radio0'
	option type 'mac80211'
	option channel '11'
	option hwmode '11g'
	option path 'platform/ar933x_wmac'
	option htmode 'HT20'
	option disabled '1'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option ssid 'OpenWrt'
	option encryption 'none'
/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.auto'
	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'
/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://dev.openwrt.org/ticket/10381
config rule
	option name		Allow-DHCPv6
	option src		wan
	option proto		udp
	option src_ip		fc00::/6
	option dest_ip		fc00::/6
	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

# include a file with users custom iptables rules
config include
	option path /etc/firewall.user


### 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

Try again with the IP addresses for Gateway, DNS1 and DNS2 from the IPv4 Upstream box.
In addition, please run ip route and post its output.

Gateway responds, DNS1 and DNS2 do not respond to ping.

ip route
10.206.236.0/22 via 10.206.236.5 dev eth1  src 10.206.236.78 
192.168.1.0/24 dev br-lan scope link  src 192.168.1.1 

The default route is missing, you should find out why. Try ifstatus wan.

1 Like

Okay, I added the route to the config and it worked, but I don’t understand why it doesn’t work right away?

/etc/config/network

config route
        option interface 'wan'
        option target '0.0.0.0'
        option netmask '0.0.0.0'
        option gateway '10.206.236.5'
ifstatus wan
{
	"up": true,
	"pending": false,
	"available": true,
	"autostart": true,
	"dynamic": false,
	"uptime": 287,
	"l3_device": "eth1",
	"proto": "dhcp",
	"device": "eth1",
	"updated": [
		"addresses",
		"routes",
		"data"
	],
	"metric": 0,
	"dns_metric": 0,
	"delegation": true,
	"ipv4-address": [
		{
			"address": "10.206.236.78",
			"mask": 22
		}
	],
	"ipv6-address": [
		
	],
	"ipv6-prefix": [
		
	],
	"ipv6-prefix-assignment": [
		
	],
	"route": [
		{
			"target": "0.0.0.0",
			"mask": 0,
			"nexthop": "10.206.236.5",
			"source": "0.0.0.0\/0"
		},
		{
			"target": "10.206.236.0",
			"mask": 22,
			"nexthop": "10.206.236.5",
			"source": "10.206.236.78\/32"
		},
		{
			"target": "0.0.0.0",
			"mask": 0,
			"nexthop": "10.206.236.5",
			"source": "10.206.236.78\/32"
		}
	],
	"dns-server": [
		"10.81.3.19",
		"10.59.3.19"
	],
	"dns-search": [
		"blablabla.com"
	],
	"inactive": {
		"ipv4-address": [
			
		],
		"ipv6-address": [
			
		],
		"route": [
			
		],
		"dns-server": [
			
		],
		"dns-search": [
			
		]
	},
	"data": {
		"leasetime": 42300
	}
}

What's the IP address of your upstream router?

But I do not have an upstream router except for the provider’s router and theoretically I should not know its address. This is the gateway address. And I used it in the route.

Well, you must know the IP address of the router if you want to connect another router to it. The thing is that if you connect to the LAN to WAN then you have to have the routers on different subnets, and if you connect LAN to LAN then they should be on the same subnet but different IPs. In all cases they can't have the same IP of they are connected to each other directly.

Most routers come with default IP of 192.168.1.1, so I thought this could be the problem. But if you say its your gateway IP then the problem is somewhere else.

Anyway thanks for help.

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