Router cannot connect to internet, but wifi connected devices are fine

I am a little dumbfounded. I am new to Lede, installed it on to my TP-Link TL-WR902AC which only has a single LAN port. I am trying to install Luci, but the router cannot get an Internet connection, the traceroute run while logged in via ssh stops at the gateway. Strangely, clients connected to the router via Wifi are absolutely fine going to the Internet.

Posting the network and wifi config here. I am skipping the firewall config, the problem persists even with firewall disabled. All I am trying to do is get an internet connection so that I can run opkg. I am sitting in a hotel here, so I don't have access to the gateway to change anything there. Thanks in advance!

root@LEDE:/etc/config# cat 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 'fd72:5f6f:d728::/48'

config interface 'lan'
option type 'bridge'
option ifname 'eth0'
option proto 'static'
option netmask '255.255.252.0'
option ip6assign '60'
option ipaddr '172.16.17.41'
option gateway '172.16.16.1'
option dns '8.8.8.8'

root@LEDE:/etc/config# cat wireless

config wifi-device 'radio0'
option type 'mac80211'
option channel '36'
option hwmode '11a'
option path 'pci0000:00/0000:00:00.0'
option htmode 'VHT80'
option disabled '0'

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

config wifi-device 'radio1'
option type 'mac80211'
option channel '11'
option hwmode '11g'
option path 'platform/qca953x_wmac'
option htmode 'HT20'
option disabled '0'

config wifi-iface 'default_radio1'
option device 'radio1'
option network 'lan'
option mode 'ap'
option ssid 'LEDE'
option encryption 'none'

Also weird is that I seem to have dns:

root@LEDE:/etc/config# ping xxx google xxx
PING www.google.com (216.58.192.132): 56 data bytes

But trace route just won't go anywhere:

root@LEDE:~# traceroute xxx google xxx
traceroute to www.google.com (216.58.192.132), 30 hops max, 38 byte packets
1 172.16.16.1 (172.16.16.1) 0.385 ms 0.326 ms 0.398 ms
2 * * *

Here the ifconfig output:

root@LEDE:/etc/config# ifconfig
br-lan Link encap:Ethernet HWaddr D4:6E:0E:F7:88:70
inet addr:172.16.17.41 Bcast:172.16.19.255 Mask:255.255.252.0
inet6 addr: fe80::d66e:eff:fef7:8870/64 Scope:Link
inet6 addr: fd72:5f6f:d728::1/60 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10232 errors:0 dropped:0 overruns:0 frame:0
TX packets:9634 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1417098 (1.3 MiB) TX bytes:1461648 (1.3 MiB)

eth0 Link encap:Ethernet HWaddr D4:6E:0E:F7:88:70
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9599 errors:0 dropped:0 overruns:0 frame:0
TX packets:9255 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7889964 (7.5 MiB) TX bytes:1371509 (1.3 MiB)
Interrupt:4

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:257 errors:0 dropped:0 overruns:0 frame:0
TX packets:257 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:34021 (33.2 KiB) TX bytes:34021 (33.2 KiB)

wlan0 Link encap:Ethernet HWaddr D4:6E:0E:F7:88:6E
inet6 addr: fe80::d66e:eff:fef7:886e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9267 errors:0 dropped:0 overruns:0 frame:0
TX packets:9718 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1379441 (1.3 MiB) TX bytes:8105956 (7.7 MiB)

wlan1 Link encap:Ethernet HWaddr D4:6E:0E:F7:88:6F
inet6 addr: fe80::d66e:eff:fef7:886f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:786 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:122849 (119.9 KiB)

root@LEDE:/etc/config# ip route
default via 172.16.16.1 dev br-lan
172.16.16.0/22 dev br-lan src 172.16.17.41

how the openwrt router connected to your other router?

The router is connected via its single LAN port to the Ethernet jack in the hotel room. My laptop is connecting to the router via the LEDE wifi network.

Like I stated above, my laptop connects to the Internet via the router fine, below my laptop's traceroute. I can also ssh fine to the router at 172.16.17.41, but when I run opkg or traceroute on the router itself, it has no connection to the Internet. So it looks to me like the router itself doesn't know how to properly route, while it's doing it fine for its clients.

Client's traceroute:

konradsa@Saschas-MacBook:~$ traceroute 8.8.8.8
traceroute to 8.8.8.8 (8.8.8.8), 64 hops max, 52 byte packets
1 lede (172.16.17.41) 3.384 ms 1.242 ms 1.106 ms
2 172.16.16.1 (172.16.16.1) 1.303 ms 1.482 ms 1.392 ms
3 50.232.176.1 (50.232.176.1) 7.416 ms 4.763 ms 6.422 ms
4 50-232-172-137-static.hfc.comcastbusiness.net (50.232.172.137) 2.058 ms 2.116 ms 2.797 ms
5 162.151.93.25 (162.151.93.25) 1.893 ms 1.712 ms 1.571 ms
6 162.151.93.97 (162.151.93.97) 2.933 ms 3.736 ms 4.002 ms
7 be-33491-cr02.350ecermak.il.ibone.comcast.net (68.86.91.165) 4.318 ms 4.999 ms 4.299 ms
8 hu-0-16-0-0-pe04.350ecermak.il.ibone.comcast.net (68.86.85.230) 3.164 ms 2.997 ms 2.761 ms
9 as15169-3-c.350ecermak.il.ibone.comcast.net (173.167.57.210) 2.541 ms 2.646 ms 2.627 ms
10 108.170.243.197 (108.170.243.197) 3.122 ms
108.170.243.253 (108.170.243.253) 2.807 ms
108.170.243.219 (108.170.243.219) 2.959 ms
11 209.85.241.47 (209.85.241.47) 3.263 ms
209.85.243.173 (209.85.243.173) 3.532 ms
209.85.250.144 (209.85.250.144) 3.390 ms
12 72.14.232.70 (72.14.232.70) 25.808 ms
209.85.247.5 (209.85.247.5) 13.030 ms
209.85.143.103 (209.85.143.103) 48.734 ms
13 216.239.50.3 (216.239.50.3) 12.495 ms
216.239.49.27 (216.239.49.27) 12.727 ms
216.239.40.116 (216.239.40.116) 12.585 ms
14 * * *
15 google-public-dns-a.google.com (8.8.8.8) 14.288 ms * *

Router's traceroute:

root@LEDE:~# traceroute 8.8.8.8
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 38 byte packets
1 172.16.16.1 (172.16.16.1) 0.316 ms 0.292 ms 0.061 ms
2 * * *
3 * * *
4 * * *
5 * * *
6 * * *
7 * * *
8 * * *
9 * * *
10 * * *
11 * * *
12 * * *
13 * * *
14 * * *
15 * * *

You are running in bridge mode. Your laptop will be getting its ip config from the hotel router.
DNS from 8.8.8.8 will be blocked (typically in an hotel) so your router (in bridge mode) will not resolve anything.
Try changing option dns '8.8.8.8' to option dns '172.16.16.1' and rebooting.

Thanks, but dns seems to work, since it can resolve a ping to www.google.com. Also trace route to ip should work without dns, shouldn't it?

Is this bridge mode wrong? I want it to act like a router, where it gets an ip from the hotel router and assigns its own ips to the its clients. I noticed that my laptop gets a hotel ip, I would like to change that.

Ah yes - I just read your posts in more detail.
Check the default gateway your laptop is using and make it the same for LEDE.
Normally in a situation like this the LAN port will be used for the WAN (hotel) connection and the WiFi will be the LAN, making sure the LEDE router has its own IP range with no clashes with the WAN.
Your problem is you are having to use a Snapshot image without Luci, making it difficult to set up unless you are an expert.
Check the gateway config. If that does not work I can give you some sample config files but that might just make things worse.

Are you logging in to the hotel hotspot on your laptop? If so, the LEDE router will be blocked for everything but DNS most likely.

Thanks for your responses. The gateway is 172.16.16.1 on both laptop and router.

Yes, laptop is logging in to hotel page, i was thinking no login required via Ethernet since laptop gets internet via router, but looks like my router is just a bridge to hotel router. Any idea how to work around that?

My grand plan eventually is to login via laptop on wifi, then set up router to spoof laptop's MAC address and connect to hotel wifi (since not all hotels have Ethernet jacks anymore), and then share the wifi among my devices so can I use chromecast and stuff. But I figured there is no way I can configure this without luci, so I am just trying to install that now. The router's default firmware unfortunately cannot spoof the wifi Mac, so that's why I installed lede.

Since it is a bridge, your laptop gets its own IP address in the 172. range and logs into the hotel network under its IP/MAC address. Since you never open the registration page from the IP/MAC address of the router, it is not logged in, and the router has no Internet access.

In other words it is working like you had an Ethernet switch, with the laptop as one user and the router as another.

If you route instead of bridge, the hotel always sees the MAC address of the router for all your connections. So after you log in on the laptop, the router will also have access.

So you should set up a WAN network which is a DHCP client and attached to the Ethernet port. Set the LAN back to a private network and have a firewall rule to forward from LAN to WAN.

You could manually download the Luci packages to your laptop, transfer to LEDE /tmp directory and install with opkg.
Once running as a router, any device connecting on your wifi will appear to the hotel router with the mac of your router. Log in on one device eg your laptop, and your router will be logged in, not the laptop. This means any device using your wifi will be logged in too. You do not need LEDE to do this specially, or spoof mac addresses, it will just work.

Can you give me some more details on that, point me to a page or some sample configs? I tried to do this yesterday, but the way I did it I kept losing access to the router and had to boot in fallback mode to undo the changes. Thanks!

I did consider that, but it looked like a lot of packages are required for that. In the end, would have probably been faster though.

I don't think this works, that should have even worked with the factory firmware, but router was not able to connect to internet when connected via wifi. I read on some pages that Mac spoofing is the way to go, and even that doesn't always work in hotels. Hotels really don't want you to setup your own wifi.

Ethernet from hotel to your router, wifi from your router (with totally different ip address range) DOES work out of the box with no need for mac address spoofing. I do this all the time.
I am not familiar with the TL-WR902AC, but any "Travel Router" will do. I use a GL-iNET MT300N v1 with no problems at all on any hotspot network either ethernet to the hotel or in WISP mode. Login only required on one device, all the others on your wifi will then have access.

Maybe I am missing something, but I though AC was not working in LEDE?

What actually works on this device?

Yeah, TL-WR902AC doesn't work like that. Wisp got stuck in init, that's why I installed lede. I got the TL-WR902AC because i wanted AC, but maybe I should get the GL-iNET MT300N instead.

Ac seems to work fine from what I can tell. The link you posted is talking about USB devices, don't think the applies here.

Well, the MT300N v1 should just work straight out of the box for the scenario you are in at the moment.
It runs a custom version of OpenWrt CC. It is a very high quality device that I have developed a custom version of LEDE for so I know it very well. I am sure the TL-WR902AC can do the same one way or another or it would not be marketed as a Travel Router.

Like I said, it's supposed to, but on amazon many people are complaining about issues with wisp.

@konradsa - I have been using a TL-MR3020 in a similar context and most recently picked up and started playing with the TL-WR902AC. They both work well with LEDE, but it can be tricky to setup the networking, especially without LuCI installed. And getting LuCI installed presents a bit of a challenge if you can't get the networking setup properly.

Ultimately, what you need is to define a wan interface. You can use the eth0 interface as long as you remove it from the lan configuration. Set the proto of the wan to dhcp.

looks like you already have the wifi setup and enabled, so make sure you can connect to the router via wifi from your computer/phone that you're using before you restart the network stack (else you may loose connectivity).

Once that is done, you can restart the networking stack (/etc/intit.d/network restart). When it comes back up, the ethernet port should be active as a wan port.

Now you can do opkg update and opkg install luci.

I've also been able to configure a WISP like scenario where I define a wwan interface that can connect to an upstream wifi AP while simultaneously creating a wlan for my own devices. There is one big complication, though -- if the MR3020/WR902AC cannot connect as a client to the upstream AP (for example: incorrect SSID or password, not available, etc.), the radio will stall out and your devices will not be able to connect to it. This is a radio chipset limitation, as far as I can tell. The good news is that the 902AC 2G and 5G radios operate independently. I use the slide switch to determine the boot mode, and I have setup one position to reset the network to a known/safe state (i.e. restore the wireless and network files with copies that have the upstream connection disabled and cleared).