Route table question

Hello,
I have a question about route. Yesterday I f*cked it up and did a factory reset to fix it.
when I now Type route I see this, which is ok:

root@OpenWrt:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.178.1   0.0.0.0         UG    0      0        0 wlan1
192.168.1.0     *               255.255.255.0   U     0      0        0 br-lan
192.168.178.0   *               255.255.255.0   U     0      0        0 wlan1

but yesterday only the 2nd line was available. so there was no default route. and internet access was broken.
my question is,
when this happends, how to I fix it and how did I mess it up?
I installed python-pip and removed it afterwards as the script wouldn't run. that's all.

thank you.

Judging bythe fact that your wan is actually a wireless client, the wifi interface might be down or the client not connected to the access point.

4 Likes

that would be the first thought indeed,
but I was able to connect the device via my router. so over this very same wireless connection.

Find a way to reproduce the issue, otherwise it's problematic to troubleshoot.

2 Likes

It is not possible to connect to the device from a link that it is not up. As long as the wlan1 is up and connected you will have immediately the third line. And as soon as the default route is processed from the dhcp packet, you'll have the first line too.

2 Likes

maybe this is part of the issue,
I do not use dhcp for the client side of my AP. my wwan config here is static.
So at that piont maybe I need to specify routes manually? but now(after reset) static route is empty and everything works perfectly

With static configuration you will have the third line as long as the client is connected. And if the default gateway is configured, the first line will also appear.

Post here the following to have a look:
uci export network; uci export wireless; uci export dhcp; uci export firewall; ip -4 addr; ip -4 ro li tab all; ip -4 ru
Remember to redact passwords, public addresses, mac addresses, and anything else sensitive.

2 Likes