When using NuttX with TCP/IP support in the simulator you will not get network to the Internet. No ping to google, etc.

Fortunately it is easy to fix:

$ sudo sysctl -w net.ipv4.ip_forward=1

or

$ sudo ./tools/simhostroute.sh

Then everything works as expected:

nsh> ping 8.8.8.8
PING 8.8.8.8 56 bytes of data
56 bytes from 8.8.8.8: icmp_seq=0 time=40 ms
56 bytes from 8.8.8.8: icmp_seq=1 time=40 ms
56 bytes from 8.8.8.8: icmp_seq=2 time=40 ms
nsh> ping google.com
PING 142.250.218.174 56 bytes of data
56 bytes from 142.250.218.174: icmp_seq=0 time=40 ms
56 bytes from 142.250.218.174: icmp_seq=1 time=40 ms
56 bytes from 142.250.218.174: icmp_seq=2 time=40 ms