I've spent a lot of time with the network stability and the only stable way seems to me to have fully static IP setup.
1) add "nodhcp" into cmdline.txt
2) add this at the beginning of the bootlocal.sh
# Start LAN and WiFi with fixed IP configuration
ifconfig eth0 down
ifconfig wlan0 down
ifconfig eth0 add 192.168.1.10 up
ifconfig wlan0 add 192.168.1.20 up
route add default gw 192.168.1.1
echo nameserver 192.168.1.1 >> /etc/resolv.conf
Than everything works well.