I've been struggling with the network dropping after a few hours while using ethernet. This seems to solve the problem:
Edit/lib/netifd/dhcp.script in function setup_interface() and statement
for i in $router; do
proto_add_ipv4_route 0.0.0.0 0 "$i"
done
Within the loop, add:
route add -net 0.0.0.0/0 gw "$i"
From: OpenWrt Forum Archive
The problem seems to be when a network connection is reconnected, the default route isn't added back. For example it should look like this:
root@linino:~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.42.1 0.0.0.0 UG 10 0 0 eth1
192.168.42.0 * 255.255.255.0 U 10 0 0 eth1
But eventually if DHCP is renewed (without this fix), it will look like this which seems to be the problem:
root@linino:~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.42.0 * 255.255.255.0 U 10 0 0 eth1
If anyone understands what is happening on a more detailed level please post some info. Is this the fault of OpenWRT? Is this the best way to go about this?