How to get router's ip aka gateway in Android's shell? In a normal linux environment we can do 

gateway=`netstat -rn | grep ^0\.0\.0\.0 | awk '{print $2}'`


or

gateway=$(netstat -rn | grep ^0\.0\.0\.0 | awk '{print $2}')

but since Android's busybox/magisk doesn't support netstat -rn, what other commands can we use to get the gateway or router ip?
It is as simple as getprop net.dns1